dazscript-framework 0.1.10 → 0.1.12
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/package.json
CHANGED
|
@@ -23,6 +23,21 @@ export abstract class WidgetBuilderBase<T extends DzWidget> implements IWidgetBu
|
|
|
23
23
|
return this
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
clickFocus(): this {
|
|
27
|
+
this.widget.getWidget().focusPolicy = DzWidget.ClickFocus
|
|
28
|
+
return this
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
tabFocus(): this {
|
|
32
|
+
this.widget.getWidget().focusPolicy = DzWidget.TabFocus
|
|
33
|
+
return this
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
noFocus(): this {
|
|
37
|
+
this.widget.getWidget().focusPolicy = DzWidget.NoFocus
|
|
38
|
+
return this
|
|
39
|
+
}
|
|
40
|
+
|
|
26
41
|
toolTip(toolTip: string): this {
|
|
27
42
|
this.widget.toolTip = toolTip
|
|
28
43
|
this.widget.whatsThis = toolTip
|
|
@@ -18,6 +18,10 @@ export const remove = (source: string, search: string): string => {
|
|
|
18
18
|
return source.replace(search, "")
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
export const trimEnd = (source: string, search: string): string => {
|
|
22
|
+
return source.endsWith(search) ? source.slice(0, -search.length) : source
|
|
23
|
+
}
|
|
24
|
+
|
|
21
25
|
export const count = (source: string, search: string): number => {
|
|
22
26
|
return source.split(search).length - 1
|
|
23
27
|
}
|