feat:add switch for Android and iOS
This commit is contained in:
@@ -1686,12 +1686,7 @@ var Image = /** @class */ (function (_super) {
|
||||
], Image.prototype, "placeHolderImage", void 0);
|
||||
__decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", Color
|
||||
/**
|
||||
* Display while image is failed to load
|
||||
* It can be file name in local path
|
||||
*/
|
||||
)
|
||||
__metadata$4("design:type", Color)
|
||||
], Image.prototype, "placeHolderColor", void 0);
|
||||
__decorate$4([
|
||||
Property,
|
||||
@@ -2523,6 +2518,66 @@ function draggable(views, config) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
var __extends$d = (undefined && undefined.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) { if (b.hasOwnProperty(p)) { d[p] = b[p]; } } };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __decorate$d = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") { r = Reflect.decorate(decorators, target, key, desc); }
|
||||
else { for (var i = decorators.length - 1; i >= 0; i--) { if (d = decorators[i]) { r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; } } }
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata$d = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") { return Reflect.metadata(k, v); }
|
||||
};
|
||||
var Switch = /** @class */ (function (_super) {
|
||||
__extends$d(Switch, _super);
|
||||
function Switch() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
__decorate$d([
|
||||
Property,
|
||||
__metadata$d("design:type", Boolean)
|
||||
], Switch.prototype, "state", void 0);
|
||||
__decorate$d([
|
||||
Property,
|
||||
__metadata$d("design:type", Function)
|
||||
], Switch.prototype, "onSwitch", void 0);
|
||||
__decorate$d([
|
||||
Property,
|
||||
__metadata$d("design:type", Color)
|
||||
], Switch.prototype, "offTintColor", void 0);
|
||||
__decorate$d([
|
||||
Property,
|
||||
__metadata$d("design:type", Color)
|
||||
], Switch.prototype, "onTintColor", void 0);
|
||||
__decorate$d([
|
||||
Property,
|
||||
__metadata$d("design:type", Color)
|
||||
], Switch.prototype, "thumbTintColor", void 0);
|
||||
return Switch;
|
||||
}(View));
|
||||
function switchView(config) {
|
||||
var ret = new Switch;
|
||||
ret.layoutConfig = layoutConfig().just();
|
||||
ret.width = 50;
|
||||
ret.height = 30;
|
||||
for (var key in config) {
|
||||
Reflect.set(ret, key, Reflect.get(config, key, config), ret);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
function modal(context) {
|
||||
return {
|
||||
toast: function (msg, gravity) {
|
||||
@@ -3038,7 +3093,7 @@ var Provider = /** @class */ (function () {
|
||||
return Provider;
|
||||
}());
|
||||
|
||||
var __extends$d = (undefined && undefined.__extends) || (function () {
|
||||
var __extends$e = (undefined && undefined.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
@@ -3079,7 +3134,7 @@ var ViewModel = /** @class */ (function () {
|
||||
return ViewModel;
|
||||
}());
|
||||
var VMPanel = /** @class */ (function (_super) {
|
||||
__extends$d(VMPanel, _super);
|
||||
__extends$e(VMPanel, _super);
|
||||
function VMPanel() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
@@ -3129,6 +3184,7 @@ exports.SlideItem = SlideItem;
|
||||
exports.Slider = Slider;
|
||||
exports.Stack = Stack;
|
||||
exports.Superview = Superview;
|
||||
exports.Switch = Switch;
|
||||
exports.TOP = TOP;
|
||||
exports.Text = Text;
|
||||
exports.TranslationAnimation = TranslationAnimation;
|
||||
@@ -3168,6 +3224,7 @@ exports.slider = slider;
|
||||
exports.stack = stack;
|
||||
exports.statusbar = statusbar;
|
||||
exports.storage = storage;
|
||||
exports.switchView = switchView;
|
||||
exports.take = take;
|
||||
exports.takeAlso = takeAlso;
|
||||
exports.takeIf = takeIf;
|
||||
|
@@ -1252,12 +1252,7 @@ __decorate$4([
|
||||
], Image.prototype, "placeHolderImage", void 0);
|
||||
__decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", Color
|
||||
/**
|
||||
* Display while image is failed to load
|
||||
* It can be file name in local path
|
||||
*/
|
||||
)
|
||||
__metadata$4("design:type", Color)
|
||||
], Image.prototype, "placeHolderColor", void 0);
|
||||
__decorate$4([
|
||||
Property,
|
||||
@@ -1884,6 +1879,48 @@ function draggable(views, config) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
var __decorate$d = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata$d = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class Switch extends View {
|
||||
}
|
||||
__decorate$d([
|
||||
Property,
|
||||
__metadata$d("design:type", Boolean)
|
||||
], Switch.prototype, "state", void 0);
|
||||
__decorate$d([
|
||||
Property,
|
||||
__metadata$d("design:type", Function)
|
||||
], Switch.prototype, "onSwitch", void 0);
|
||||
__decorate$d([
|
||||
Property,
|
||||
__metadata$d("design:type", Color)
|
||||
], Switch.prototype, "offTintColor", void 0);
|
||||
__decorate$d([
|
||||
Property,
|
||||
__metadata$d("design:type", Color)
|
||||
], Switch.prototype, "onTintColor", void 0);
|
||||
__decorate$d([
|
||||
Property,
|
||||
__metadata$d("design:type", Color)
|
||||
], Switch.prototype, "thumbTintColor", void 0);
|
||||
function switchView(config) {
|
||||
const ret = new Switch;
|
||||
ret.layoutConfig = layoutConfig().just();
|
||||
ret.width = 50;
|
||||
ret.height = 30;
|
||||
for (let key in config) {
|
||||
Reflect.set(ret, key, Reflect.get(config, key, config), ret);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
function modal(context) {
|
||||
return {
|
||||
toast: (msg, gravity = Gravity.Bottom) => {
|
||||
@@ -2375,6 +2412,7 @@ exports.SlideItem = SlideItem;
|
||||
exports.Slider = Slider;
|
||||
exports.Stack = Stack;
|
||||
exports.Superview = Superview;
|
||||
exports.Switch = Switch;
|
||||
exports.TOP = TOP;
|
||||
exports.Text = Text;
|
||||
exports.TranslationAnimation = TranslationAnimation;
|
||||
@@ -2414,6 +2452,7 @@ exports.slider = slider;
|
||||
exports.stack = stack;
|
||||
exports.statusbar = statusbar;
|
||||
exports.storage = storage;
|
||||
exports.switchView = switchView;
|
||||
exports.take = take;
|
||||
exports.takeAlso = takeAlso;
|
||||
exports.takeIf = takeIf;
|
||||
|
@@ -2711,12 +2711,7 @@ __decorate$4([
|
||||
], Image.prototype, "placeHolderImage", void 0);
|
||||
__decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", Color
|
||||
/**
|
||||
* Display while image is failed to load
|
||||
* It can be file name in local path
|
||||
*/
|
||||
)
|
||||
__metadata$4("design:type", Color)
|
||||
], Image.prototype, "placeHolderColor", void 0);
|
||||
__decorate$4([
|
||||
Property,
|
||||
@@ -3343,6 +3338,48 @@ function draggable(views, config) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
var __decorate$d = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata$d = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class Switch extends View {
|
||||
}
|
||||
__decorate$d([
|
||||
Property,
|
||||
__metadata$d("design:type", Boolean)
|
||||
], Switch.prototype, "state", void 0);
|
||||
__decorate$d([
|
||||
Property,
|
||||
__metadata$d("design:type", Function)
|
||||
], Switch.prototype, "onSwitch", void 0);
|
||||
__decorate$d([
|
||||
Property,
|
||||
__metadata$d("design:type", Color)
|
||||
], Switch.prototype, "offTintColor", void 0);
|
||||
__decorate$d([
|
||||
Property,
|
||||
__metadata$d("design:type", Color)
|
||||
], Switch.prototype, "onTintColor", void 0);
|
||||
__decorate$d([
|
||||
Property,
|
||||
__metadata$d("design:type", Color)
|
||||
], Switch.prototype, "thumbTintColor", void 0);
|
||||
function switchView(config) {
|
||||
const ret = new Switch;
|
||||
ret.layoutConfig = layoutConfig().just();
|
||||
ret.width = 50;
|
||||
ret.height = 30;
|
||||
for (let key in config) {
|
||||
Reflect.set(ret, key, Reflect.get(config, key, config), ret);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
function modal(context) {
|
||||
return {
|
||||
toast: (msg, gravity = Gravity.Bottom) => {
|
||||
@@ -3969,6 +4006,7 @@ exports.SlideItem = SlideItem;
|
||||
exports.Slider = Slider;
|
||||
exports.Stack = Stack;
|
||||
exports.Superview = Superview;
|
||||
exports.Switch = Switch;
|
||||
exports.TOP = TOP;
|
||||
exports.Text = Text;
|
||||
exports.TranslationAnimation = TranslationAnimation;
|
||||
@@ -4008,6 +4046,7 @@ exports.slider = slider;
|
||||
exports.stack = stack;
|
||||
exports.statusbar = statusbar;
|
||||
exports.storage = storage;
|
||||
exports.switchView = switchView;
|
||||
exports.take = take;
|
||||
exports.takeAlso = takeAlso;
|
||||
exports.takeIf = takeIf;
|
||||
|
Reference in New Issue
Block a user