From c5b3b86a4d4b9f79a59d396555a36c0e46f1892a Mon Sep 17 00:00:00 2001 From: Gisce Date: Tue, 10 Dec 2024 12:45:38 +0100 Subject: [PATCH] feat: sync changes from v2 to v2-develop (#150) Co-authored-by: ecarreras <294235+ecarreras@users.noreply.github.com> --- package-lock.json | 4 ++-- package.json | 2 +- src/Field.ts | 12 ------------ src/Widget.ts | 11 +++++++++++ 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 96212a6..38e1e73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gisce/ooui", - "version": "2.21.0", + "version": "2.22.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@gisce/ooui", - "version": "2.21.0", + "version": "2.22.0", "dependencies": { "@gisce/conscheck": "1.0.9", "html-entities": "^2.3.3", diff --git a/package.json b/package.json index fda612b..9d1a67c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gisce/ooui", - "version": "2.21.0", + "version": "2.22.0", "engines": { "node": "20.5.0" }, diff --git a/src/Field.ts b/src/Field.ts index e53e830..fbb2295 100644 --- a/src/Field.ts +++ b/src/Field.ts @@ -117,14 +117,6 @@ class Field extends Widget { this._selectionValues = value; } - /** - * Base type of the field - */ - _fieldType: string = ""; - get fieldType(): string { - return this._fieldType; - } - constructor(props: any) { super(props); @@ -136,10 +128,6 @@ class Field extends Widget { this._id = props.name; } - if (props.type) { - this._fieldType = props.fieldsWidgetType; - } - if (props.activated) { this._activated = props.activated; } diff --git a/src/Widget.ts b/src/Widget.ts index 13fe06d..cbf97b6 100644 --- a/src/Widget.ts +++ b/src/Widget.ts @@ -115,6 +115,14 @@ abstract class Widget { this._isFunction = value; } + /** + * Base type of the field + */ + _fieldType: string = ""; + get fieldType(): string { + return this._fieldType; + } + constructor(props?: any) { this._colspan = Widget._defaultColspan; this._invisible = false; @@ -160,6 +168,9 @@ abstract class Widget { this._domain = replaceEntities(props.domain); } } + if (props.type) { + this._fieldType = props.fieldsWidgetType; + } if (props.widget_props) { if (typeof props.widget_props === "string") { try {