jsbox-cview 1.3.3 → 1.3.5
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.
|
@@ -52,14 +52,20 @@ export class SymbolButton extends Base<UIButtonView, UiTypes.ButtonOptions> {
|
|
|
52
52
|
};
|
|
53
53
|
this._layout = layout;
|
|
54
54
|
this._defineView = () => {
|
|
55
|
+
const props = this._props.menu
|
|
56
|
+
? {
|
|
57
|
+
radius: 0,
|
|
58
|
+
bgcolor: $color("clear"),
|
|
59
|
+
id: this.id,
|
|
60
|
+
menu: this._props.menu,
|
|
61
|
+
} : {
|
|
62
|
+
radius: 0,
|
|
63
|
+
bgcolor: $color("clear"),
|
|
64
|
+
id: this.id
|
|
65
|
+
}
|
|
55
66
|
return {
|
|
56
67
|
type: "button",
|
|
57
|
-
props
|
|
58
|
-
radius: 0,
|
|
59
|
-
bgcolor: $color("clear"),
|
|
60
|
-
id: this.id,
|
|
61
|
-
menu: this._props.menu,
|
|
62
|
-
},
|
|
68
|
+
props,
|
|
63
69
|
views: [
|
|
64
70
|
{
|
|
65
71
|
type: "image",
|
|
@@ -8,14 +8,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
8
8
|
exports.textDialog = void 0;
|
|
9
9
|
const single_views_1 = require("../single-views");
|
|
10
10
|
const dialog_sheet_1 = require("./dialog-sheet");
|
|
11
|
-
function textDialog({ title, text = "", placeholder = "" }) {
|
|
11
|
+
function textDialog({ title, text = "", placeholder = "", editable = true }) {
|
|
12
12
|
const textView = new single_views_1.Text({
|
|
13
13
|
props: {
|
|
14
14
|
text,
|
|
15
|
-
placeholder
|
|
15
|
+
placeholder,
|
|
16
|
+
editable
|
|
16
17
|
},
|
|
17
18
|
events: {
|
|
18
|
-
ready: sender =>
|
|
19
|
+
ready: sender => {
|
|
20
|
+
if (sender.editable)
|
|
21
|
+
sender.focus();
|
|
22
|
+
}
|
|
19
23
|
}
|
|
20
24
|
});
|
|
21
25
|
const sheet = new dialog_sheet_1.DialogSheet({
|
|
@@ -32,14 +32,20 @@ class SymbolButton extends base_1.Base {
|
|
|
32
32
|
this._props = Object.assign({ insets: $insets(12.5, 12.5, 12.5, 12.5), tintColor: $color("primaryText") }, props);
|
|
33
33
|
this._layout = layout;
|
|
34
34
|
this._defineView = () => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
props: {
|
|
35
|
+
const props = this._props.menu
|
|
36
|
+
? {
|
|
38
37
|
radius: 0,
|
|
39
38
|
bgcolor: $color("clear"),
|
|
40
39
|
id: this.id,
|
|
41
40
|
menu: this._props.menu,
|
|
42
|
-
}
|
|
41
|
+
} : {
|
|
42
|
+
radius: 0,
|
|
43
|
+
bgcolor: $color("clear"),
|
|
44
|
+
id: this.id
|
|
45
|
+
};
|
|
46
|
+
return {
|
|
47
|
+
type: "button",
|
|
48
|
+
props,
|
|
43
49
|
views: [
|
|
44
50
|
{
|
|
45
51
|
type: "image",
|