@green-code-studio/objects-list 1.6.5 → 1.7.0

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
@@ -114,7 +114,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
114
114
  \*****************************/
115
115
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
116
116
 
117
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ColumnFilter: () => (/* binding */ ColumnFilter)\n/* harmony export */ });\n/* harmony import */ var _i18n_xml__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./i18n.xml */ \"./src/i18n.xml\");\n/* harmony import */ var fast_creator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fast-creator */ \"./node_modules/fast-creator/dist/entry.js\");\n\r\n\r\n\r\nclass ColumnFilter extends HTMLElement {\r\n constructor(props) {\r\n super(props);\r\n this.select = (0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('select')\r\n this.appendChild(this.select)\r\n this.select.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('option', {value: 'none', text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_0__.t)('filter.none')}))\r\n this.select.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('option', {value: 'equals', text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_0__.t)('filter.equals')}))\r\n this.select.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('option', {value: 'less', text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_0__.t)('filter.lessThan')}))\r\n this.select.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('option', {value: 'more', text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_0__.t)('filter.greaterThan')}))\r\n this.select.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('option', {value: 'contains', text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_0__.t)('filter.contains')}))\r\n this.select.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('option', {value: 'oneOf', text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_0__.t)('filter.oneOf')}))\r\n this.select.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('option', {value: 'empty', text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_0__.t)('filter.empty')}))\r\n this.input = (0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('input')\r\n this.appendChild(this.input)\r\n this.input.oninput = () => this.emit();\r\n this.select.onchange = () => {\r\n this.updateInput();\r\n this.emit();\r\n }\r\n this.updateInput()\r\n }\r\n\r\n updateInput() {\r\n if (this.select.value == 'none' || this.select.value == 'empty') {\r\n this.input.style.display = 'none'\r\n } else if (this.select.value == 'less' || this.select.value == 'more') {\r\n this.input.style.display = ''\r\n this.input.type = 'number';\r\n } else {\r\n this.input.style.display = ''\r\n this.input.type = 'text';\r\n }\r\n }\r\n\r\n emit() {\r\n this.dispatchEvent(new CustomEvent('x-filter', {detail: {type: this.select.value, value: this.input.value}}))\r\n }\r\n set({type, value}) {\r\n this.select.value = type;\r\n this.input.value = value;\r\n this.updateInput();\r\n }\r\n}\r\n\r\n\r\ncustomElements.define('column-filter', ColumnFilter);\r\n\n\n//# sourceURL=webpack://@green-code-studio/objects-list/./src/ColumnFilter.js?");
117
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ColumnFilter: () => (/* binding */ ColumnFilter)\n/* harmony export */ });\n/* harmony import */ var _i18n_xml__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./i18n.xml */ \"./src/i18n.xml\");\n/* harmony import */ var fast_creator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fast-creator */ \"./node_modules/fast-creator/dist/entry.js\");\n\r\n\r\n\r\nclass ColumnFilter extends HTMLElement {\r\n constructor(props) {\r\n super(props);\r\n this.select = (0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('select')\r\n this.appendChild(this.select)\r\n this.select.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('option', {value: 'none', text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_0__.t)('filter.none')}))\r\n this.select.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('option', {value: 'equals', text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_0__.t)('filter.equals')}))\r\n this.select.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('option', {value: 'notEquals', text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_0__.t)('filter.notEquals')}))\r\n this.select.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('option', {value: 'less', text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_0__.t)('filter.lessThan')}))\r\n this.select.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('option', {value: 'more', text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_0__.t)('filter.greaterThan')}))\r\n this.select.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('option', {value: 'contains', text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_0__.t)('filter.contains')}))\r\n this.select.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('option', {value: 'oneOf', text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_0__.t)('filter.oneOf')}))\r\n this.select.append((0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('option', {value: 'empty', text: (0,_i18n_xml__WEBPACK_IMPORTED_MODULE_0__.t)('filter.empty')}))\r\n this.input = (0,fast_creator__WEBPACK_IMPORTED_MODULE_1__.create)('input')\r\n this.appendChild(this.input)\r\n this.input.oninput = () => this.emit();\r\n this.select.onchange = () => {\r\n this.updateInput();\r\n this.emit();\r\n }\r\n this.updateInput()\r\n }\r\n\r\n updateInput() {\r\n if (this.select.value == 'none' || this.select.value == 'empty') {\r\n this.input.style.display = 'none'\r\n } else if (this.select.value == 'less' || this.select.value == 'more') {\r\n this.input.style.display = ''\r\n this.input.type = 'number';\r\n } else {\r\n this.input.style.display = ''\r\n this.input.type = 'text';\r\n }\r\n }\r\n\r\n emit() {\r\n this.dispatchEvent(new CustomEvent('x-filter', {detail: {type: this.select.value, value: this.input.value}}))\r\n }\r\n set({type, value}) {\r\n this.select.value = type;\r\n this.input.value = value;\r\n this.updateInput();\r\n }\r\n}\r\n\r\n\r\ncustomElements.define('column-filter', ColumnFilter);\r\n\n\n//# sourceURL=webpack://@green-code-studio/objects-list/./src/ColumnFilter.js?");
118
118
 
119
119
  /***/ }),
120
120
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@green-code-studio/objects-list",
3
- "version": "1.6.5",
3
+ "version": "1.7.0",
4
4
  "main": "src/index.js",
5
5
  "author": "Mateusz Krawczyk",
6
6
  "license": "MIT",
@@ -8,6 +8,7 @@ export class ColumnFilter extends HTMLElement {
8
8
  this.appendChild(this.select)
9
9
  this.select.append(create('option', {value: 'none', text: t('filter.none')}))
10
10
  this.select.append(create('option', {value: 'equals', text: t('filter.equals')}))
11
+ this.select.append(create('option', {value: 'notEquals', text: t('filter.notEquals')}))
11
12
  this.select.append(create('option', {value: 'less', text: t('filter.lessThan')}))
12
13
  this.select.append(create('option', {value: 'more', text: t('filter.greaterThan')}))
13
14
  this.select.append(create('option', {value: 'contains', text: t('filter.contains')}))