Skip to content
Snippets Groups Projects
Verified Commit f7cffedf authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: filter init, form readonly

parent d97d645e
No related branches found
No related tags found
No related merge requests found
export const projectRoot = "/home/vs/workspaces/oss/monster/monster"; export const projectRoot = "/home/vs/workspaces/oss/monster/monster";
export const sourcePath = "/home/vs/workspaces/oss/monster/monster/source"; export const sourcePath = "/home/vs/workspaces/oss/monster/monster/source";
export const developmentPath = "/home/vs/workspaces/oss/monster/monster/development"; export const developmentPath = "/home/vs/workspaces/oss/monster/monster/development";
export const pnpxBin = "/nix/store/zp7k4i6w42mmi43cjmbyv8x8v3mgp1ck-pnpm-9.15.2/bin/pnpx"; export const pnpxBin = "/nix/store/by7hqplbckljzzsq6jpmcjp1w4jzvxpg-pnpm-9.15.3/bin/pnpx";
export const nodeBin = "/nix/store/hnkyz55vndmvwhg6nzpliv86gh6sxg7h-nodejs-22.10.0/bin/node"; export const nodeBin = "/nix/store/hnkyz55vndmvwhg6nzpliv86gh6sxg7h-nodejs-22.10.0/bin/node";
export const license = "/**" + "\n" + export const license = "/**" + "\n" +
" * Copyright © schukai GmbH and all contributing authors, {{copyRightYear}}. All rights reserved." + "\n" + " * Copyright © schukai GmbH and all contributing authors, {{copyRightYear}}. All rights reserved." + "\n" +
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</ul> </ul>
<main> <main>
<!--monster-host><monster-config-manager></monster-config-manager></monster-host --> <monster-host><monster-config-manager></monster-config-manager></monster-host>
<monster-notify data-monster-option-orientation="bottom right"></monster-notify> <monster-notify data-monster-option-orientation="bottom right"></monster-notify>
<monster-monitor-attribute-errors <monster-monitor-attribute-errors
data-monster-option-features-notifyUser="false" data-monster-option-features-notifyUser="false"
......
...@@ -168,11 +168,11 @@ ...@@ -168,11 +168,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1735922141, "lastModified": 1736200483,
"narHash": "sha256-vk0xwGZSlvZ/596yxOtsk4gxsIx2VemzdjiU8zhjgWw=", "narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d29ab98cd4a70a387b8ceea3e930b3340d41ac5a", "rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -261,11 +261,11 @@ ...@@ -261,11 +261,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1716914109, "lastModified": 1736378864,
"narHash": "sha256-JY0PLGWzYRDQ9daKLGOBWHHuYun9nSpH9J3aSk8iDmQ=", "narHash": "sha256-7JSw/0AbjzM9jdkJQILEHKq8hjfTDB1tHJPLDI2oLVo=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "fe8dd932d6c414a93b4a69c470792b2db038e0fb", "rev": "b721b3d463b9f796b7652df59de975a362cc7542",
"revCount": 129, "revCount": 130,
"type": "git", "type": "git",
"url": "https://gitlab.schukai.com/oss/utilities/version.git" "url": "https://gitlab.schukai.com/oss/utilities/version.git"
}, },
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
"@playwright/test": "^1.49.1", "@playwright/test": "^1.49.1",
"@roarr/cli": "^5.12.4", "@roarr/cli": "^5.12.4",
"autoprefixer": "^10.4.20", "autoprefixer": "^10.4.20",
"browserslist": "^4.24.3", "browserslist": "^4.24.4",
"btoa": "^1.2.1", "btoa": "^1.2.1",
"c8": "^10.1.3", "c8": "^10.1.3",
"chai": "^5.1.2", "chai": "^5.1.2",
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"estraverse": "^5.3.0", "estraverse": "^5.3.0",
"flow-bin": "^0.247.1", "flow-bin": "^0.247.1",
"fs": "0.0.1-security", "fs": "0.0.1-security",
"glob": "^11.0.0", "glob": "^11.0.1",
"graphviz": "^0.0.9", "graphviz": "^0.0.9",
"jsdom": "^25.0.1", "jsdom": "^25.0.1",
"jsdom-global": "^3.0.2", "jsdom-global": "^3.0.2",
......
This diff is collapsed.
...@@ -136,7 +136,7 @@ const resizeObserverSymbol = Symbol("resizeObserver"); ...@@ -136,7 +136,7 @@ const resizeObserverSymbol = Symbol("resizeObserver");
* @example /examples/components/datatable/datasource Use a datasource * @example /examples/components/datatable/datasource Use a datasource
* @example /examples/components/datatable/pagination Use pagination * @example /examples/components/datatable/pagination Use pagination
* @example /examples/components/datatable/filter Filer the data * @example /examples/components/datatable/filter Filer the data
* @example /examples/components/datatable/order-by Order the data * @example /examples/components/datatable/order-by Sort data
* @example /examples/components/datatable/select-rows Select rows * @example /examples/components/datatable/select-rows Select rows
* *
* @copyright schukai GmbH * @copyright schukai GmbH
...@@ -1348,7 +1348,7 @@ function initControlReferences() { ...@@ -1348,7 +1348,7 @@ function initControlReferences() {
* @throws {Error} the datasource could not be initialized * @throws {Error} the datasource could not be initialized
*/ */
function initOptionsFromArguments() { function initOptionsFromArguments() {
const options = {}; const options = {datasource:{}};
const selector = this.getAttribute(ATTRIBUTE_DATASOURCE_SELECTOR); const selector = this.getAttribute(ATTRIBUTE_DATASOURCE_SELECTOR);
if (selector) { if (selector) {
......
...@@ -63,6 +63,7 @@ import "../form/toggle-switch.mjs"; ...@@ -63,6 +63,7 @@ import "../form/toggle-switch.mjs";
import "../form/context-help.mjs"; import "../form/context-help.mjs";
import "../form/context-error.mjs"; import "../form/context-error.mjs";
import "../form/message-state-button.mjs"; import "../form/message-state-button.mjs";
import {getLocaleOfDocument} from "../../dom/locale.mjs"; import {getLocaleOfDocument} from "../../dom/locale.mjs";
export {Filter}; export {Filter};
...@@ -329,11 +330,14 @@ class Filter extends CustomElement { ...@@ -329,11 +330,14 @@ class Filter extends CustomElement {
super[assembleMethodSymbol](); super[assembleMethodSymbol]();
initControlReferences.call(this); initControlReferences.call(this);
getWindow().requestAnimationFrame(() => {
initEventHandler.call(this); initEventHandler.call(this);
});
initFromConfig initFromConfig
.call(this) .call(this)
.then(() => {}) .then(() => {
})
.catch((error) => { .catch((error) => {
addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, error?.message); addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, error?.message);
}) })
...@@ -345,7 +349,8 @@ class Filter extends CustomElement { ...@@ -345,7 +349,8 @@ class Filter extends CustomElement {
.then(() => { .then(() => {
fireCustomEvent(this, "monster-filter-initialized"); fireCustomEvent(this, "monster-filter-initialized");
}) })
.catch(() => {}); .catch(() => {
});
}); });
} }
...@@ -589,7 +594,8 @@ function initFilter() { ...@@ -589,7 +594,8 @@ function initFilter() {
const searchInput = element.firstElementChild; const searchInput = element.firstElementChild;
try { try {
searchInput.value = v; searchInput.value = v;
} catch (error) {} } catch (error) {
}
} }
setting = this[settingsSymbol].get(value); setting = this[settingsSymbol].get(value);
...@@ -675,8 +681,10 @@ function initEventHandler() { ...@@ -675,8 +681,10 @@ function initEventHandler() {
doSearch doSearch
.call(self) .call(self)
.then(() => {}) .then(() => {
.catch((error) => {}) })
.catch((error) => {
})
.finally(() => { .finally(() => {
lastHash = getGlobal().location.hash; lastHash = getGlobal().location.hash;
}); });
...@@ -829,8 +837,10 @@ function initEventHandler() { ...@@ -829,8 +837,10 @@ function initEventHandler() {
doSearch doSearch
.call(self) .call(self)
.then(() => {}) .then(() => {
.catch((error) => {}); })
.catch((error) => {
});
}); });
// the reset button should reset the filter and the search query // the reset button should reset the filter and the search query
...@@ -855,7 +865,8 @@ function initEventHandler() { ...@@ -855,7 +865,8 @@ function initEventHandler() {
doSearch doSearch
.call(self, {showEffect: false}) .call(self, {showEffect: false})
.then(() => {}) .then(() => {
})
.catch((e) => addAttributeToken(self, ATTRIBUTE_ERRORMESSAGE, e.message)); .catch((e) => addAttributeToken(self, ATTRIBUTE_ERRORMESSAGE, e.message));
}); });
...@@ -872,8 +883,10 @@ function initEventHandler() { ...@@ -872,8 +883,10 @@ function initEventHandler() {
if (event.keyCode === 13) { if (event.keyCode === 13) {
doSearch doSearch
.call(self, {showEffect: false}) .call(self, {showEffect: false})
.then(() => {}) .then(() => {
.catch((error) => {}); })
.catch((error) => {
});
} }
}); });
......
...@@ -46,3 +46,11 @@ textarea:focus { ...@@ -46,3 +46,11 @@ textarea:focus {
outline: 1px dashed var(--monster-color-selection-3); outline: 1px dashed var(--monster-color-selection-3);
outline-offset: 3px; outline-offset: 3px;
} }
input[readonly]:not([type="checkbox"]):not([type="radio"]),
select[readonly],
textarea[readonly] {
background-color: var(--monster-bg-color-primary-2);
color: var(--monster-color-primary-2);
cursor: default;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment