x4js 1.5.34 → 1.5.36
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/lib/cjs/index.js +2 -2
- package/lib/cjs/index.js.map +3 -3
- package/lib/esm/index.mjs +21 -2
- package/lib/esm/index.mjs.map +2 -2
- package/lib/src/label.ts +25 -1
- package/lib/src/version.ts +1 -1
- package/lib/types/label.d.ts +9 -0
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/esm/index.mjs
CHANGED
|
@@ -4600,7 +4600,7 @@ var Label = class extends Component {
|
|
|
4600
4600
|
this.setTag("span");
|
|
4601
4601
|
this.addClass("@hlayout");
|
|
4602
4602
|
this.setContent([
|
|
4603
|
-
new Icon({ icon: props.icon }),
|
|
4603
|
+
new Icon({ id: "l_icon", icon: props.icon }),
|
|
4604
4604
|
new Component({ content: text, ref: "text" })
|
|
4605
4605
|
]);
|
|
4606
4606
|
}
|
|
@@ -4633,6 +4633,25 @@ var Label = class extends Component {
|
|
|
4633
4633
|
get text() {
|
|
4634
4634
|
return this.m_props.text;
|
|
4635
4635
|
}
|
|
4636
|
+
/**
|
|
4637
|
+
* change the displayed icon
|
|
4638
|
+
* @param icon - new icon
|
|
4639
|
+
*/
|
|
4640
|
+
set icon(icon) {
|
|
4641
|
+
let ico = this.itemWithRef("l_icon");
|
|
4642
|
+
if (ico) {
|
|
4643
|
+
ico.icon = icon;
|
|
4644
|
+
} else {
|
|
4645
|
+
this.update(0);
|
|
4646
|
+
}
|
|
4647
|
+
}
|
|
4648
|
+
/**
|
|
4649
|
+
*
|
|
4650
|
+
*/
|
|
4651
|
+
get icon() {
|
|
4652
|
+
let ico = this.itemWithRef("l_icon");
|
|
4653
|
+
return ico?.icon;
|
|
4654
|
+
}
|
|
4636
4655
|
};
|
|
4637
4656
|
__name(Label, "Label");
|
|
4638
4657
|
|
|
@@ -15727,7 +15746,7 @@ function setupWSMessaging(closeCB) {
|
|
|
15727
15746
|
__name(setupWSMessaging, "setupWSMessaging");
|
|
15728
15747
|
|
|
15729
15748
|
// src/version.ts
|
|
15730
|
-
var x4js_version = "1.5.
|
|
15749
|
+
var x4js_version = "1.5.36";
|
|
15731
15750
|
export {
|
|
15732
15751
|
AbsLayout,
|
|
15733
15752
|
Application,
|