feat:add lib and bundle
This commit is contained in:
@@ -2130,6 +2130,10 @@ var List = /** @class */ (function (_super) {
|
||||
Property,
|
||||
__metadata$8("design:type", Number)
|
||||
], List.prototype, "scrolledPosition", void 0);
|
||||
__decorate$8([
|
||||
Property,
|
||||
__metadata$8("design:type", Boolean)
|
||||
], List.prototype, "scrollable", void 0);
|
||||
return List;
|
||||
}(Superview));
|
||||
function list(config) {
|
||||
@@ -2245,6 +2249,10 @@ var Slider = /** @class */ (function (_super) {
|
||||
Property,
|
||||
__metadata$7("design:type", Boolean)
|
||||
], Slider.prototype, "loop", void 0);
|
||||
__decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Boolean)
|
||||
], Slider.prototype, "scrollable", void 0);
|
||||
return Slider;
|
||||
}(Superview));
|
||||
function slider(config) {
|
||||
@@ -2338,6 +2346,10 @@ var Scroller = /** @class */ (function (_super) {
|
||||
Property,
|
||||
__metadata$6("design:type", Function)
|
||||
], Scroller.prototype, "onScrollEnd", void 0);
|
||||
__decorate$6([
|
||||
Property,
|
||||
__metadata$6("design:type", Boolean)
|
||||
], Scroller.prototype, "scrollable", void 0);
|
||||
return Scroller;
|
||||
}(Superview));
|
||||
|
||||
@@ -2643,6 +2655,10 @@ var FlowLayout = /** @class */ (function (_super) {
|
||||
Property,
|
||||
__metadata$4("design:type", Function)
|
||||
], FlowLayout.prototype, "onScrollEnd", void 0);
|
||||
__decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", Boolean)
|
||||
], FlowLayout.prototype, "scrollable", void 0);
|
||||
return FlowLayout;
|
||||
}(Superview));
|
||||
function flowlayout(config) {
|
||||
@@ -2826,6 +2842,10 @@ var NestedSlider = /** @class */ (function (_super) {
|
||||
Property,
|
||||
__metadata$2("design:type", Function)
|
||||
], NestedSlider.prototype, "onPageSlided", void 0);
|
||||
__decorate$2([
|
||||
Property,
|
||||
__metadata$2("design:type", Boolean)
|
||||
], NestedSlider.prototype, "scrollable", void 0);
|
||||
return NestedSlider;
|
||||
}(Group));
|
||||
|
||||
|
@@ -116,110 +116,6 @@ function logw(...message) {
|
||||
nativeLog('w', out);
|
||||
}
|
||||
|
||||
const SPECIFIED = 1;
|
||||
const START = 1 << 1;
|
||||
const END = 1 << 2;
|
||||
const SHIFT_X = 0;
|
||||
const SHIFT_Y = 4;
|
||||
const LEFT = (START | SPECIFIED) << SHIFT_X;
|
||||
const RIGHT = (END | SPECIFIED) << SHIFT_X;
|
||||
const TOP = (START | SPECIFIED) << SHIFT_Y;
|
||||
const BOTTOM = (END | SPECIFIED) << SHIFT_Y;
|
||||
const CENTER_X = SPECIFIED << SHIFT_X;
|
||||
const CENTER_Y = SPECIFIED << SHIFT_Y;
|
||||
const CENTER = CENTER_X | CENTER_Y;
|
||||
class Gravity {
|
||||
constructor() {
|
||||
this.val = 0;
|
||||
}
|
||||
left() {
|
||||
const val = this.val | LEFT;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
right() {
|
||||
const val = this.val | RIGHT;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
top() {
|
||||
const val = this.val | TOP;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
bottom() {
|
||||
const val = this.val | BOTTOM;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
center() {
|
||||
const val = this.val | CENTER;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
centerX() {
|
||||
const val = this.val | CENTER_X;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
centerY() {
|
||||
const val = this.val | CENTER_Y;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
toModel() {
|
||||
return this.val;
|
||||
}
|
||||
}
|
||||
Gravity.origin = new Gravity;
|
||||
Gravity.Center = Gravity.origin.center();
|
||||
Gravity.CenterX = Gravity.origin.centerX();
|
||||
Gravity.CenterY = Gravity.origin.centerY();
|
||||
Gravity.Left = Gravity.origin.left();
|
||||
Gravity.Right = Gravity.origin.right();
|
||||
Gravity.Top = Gravity.origin.top();
|
||||
Gravity.Bottom = Gravity.origin.bottom();
|
||||
function gravity() {
|
||||
return new Gravity;
|
||||
}
|
||||
|
||||
function modal(context) {
|
||||
return {
|
||||
toast: (msg, gravity = Gravity.Bottom) => {
|
||||
context.callNative('modal', 'toast', {
|
||||
msg,
|
||||
gravity: gravity.toModel(),
|
||||
});
|
||||
},
|
||||
alert: (arg) => {
|
||||
if (typeof arg === 'string') {
|
||||
return context.callNative('modal', 'alert', { msg: arg });
|
||||
}
|
||||
else {
|
||||
return context.callNative('modal', 'alert', arg);
|
||||
}
|
||||
},
|
||||
confirm: (arg) => {
|
||||
if (typeof arg === 'string') {
|
||||
return context.callNative('modal', 'confirm', { msg: arg });
|
||||
}
|
||||
else {
|
||||
return context.callNative('modal', 'confirm', arg);
|
||||
}
|
||||
},
|
||||
prompt: (arg) => {
|
||||
return context.callNative('modal', 'prompt', arg);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
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);
|
||||
@@ -431,9 +327,8 @@ class View {
|
||||
return this.nativeChannel(context, "cancelAnimation")(animation.id).then((args) => {
|
||||
for (let key in args) {
|
||||
Reflect.set(this, key, Reflect.get(args, key, args), this);
|
||||
//Reflect.deleteProperty(this.__dirty_props__, key)
|
||||
Reflect.deleteProperty(this.__dirty_props__, key);
|
||||
}
|
||||
modal(context).alert(JSON.stringify(this.__dirty_props__));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -617,6 +512,80 @@ class Group extends Superview {
|
||||
}
|
||||
}
|
||||
|
||||
const SPECIFIED = 1;
|
||||
const START = 1 << 1;
|
||||
const END = 1 << 2;
|
||||
const SHIFT_X = 0;
|
||||
const SHIFT_Y = 4;
|
||||
const LEFT = (START | SPECIFIED) << SHIFT_X;
|
||||
const RIGHT = (END | SPECIFIED) << SHIFT_X;
|
||||
const TOP = (START | SPECIFIED) << SHIFT_Y;
|
||||
const BOTTOM = (END | SPECIFIED) << SHIFT_Y;
|
||||
const CENTER_X = SPECIFIED << SHIFT_X;
|
||||
const CENTER_Y = SPECIFIED << SHIFT_Y;
|
||||
const CENTER = CENTER_X | CENTER_Y;
|
||||
class Gravity {
|
||||
constructor() {
|
||||
this.val = 0;
|
||||
}
|
||||
left() {
|
||||
const val = this.val | LEFT;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
right() {
|
||||
const val = this.val | RIGHT;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
top() {
|
||||
const val = this.val | TOP;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
bottom() {
|
||||
const val = this.val | BOTTOM;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
center() {
|
||||
const val = this.val | CENTER;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
centerX() {
|
||||
const val = this.val | CENTER_X;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
centerY() {
|
||||
const val = this.val | CENTER_Y;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
toModel() {
|
||||
return this.val;
|
||||
}
|
||||
}
|
||||
Gravity.origin = new Gravity;
|
||||
Gravity.Center = Gravity.origin.center();
|
||||
Gravity.CenterX = Gravity.origin.centerX();
|
||||
Gravity.CenterY = Gravity.origin.centerY();
|
||||
Gravity.Left = Gravity.origin.left();
|
||||
Gravity.Right = Gravity.origin.right();
|
||||
Gravity.Top = Gravity.origin.top();
|
||||
Gravity.Bottom = Gravity.origin.bottom();
|
||||
function gravity() {
|
||||
return new Gravity;
|
||||
}
|
||||
|
||||
exports.LayoutSpec = void 0;
|
||||
(function (LayoutSpec) {
|
||||
/**
|
||||
@@ -1657,6 +1626,10 @@ __decorate$8([
|
||||
Property,
|
||||
__metadata$8("design:type", Number)
|
||||
], List.prototype, "scrolledPosition", void 0);
|
||||
__decorate$8([
|
||||
Property,
|
||||
__metadata$8("design:type", Boolean)
|
||||
], List.prototype, "scrollable", void 0);
|
||||
function list(config) {
|
||||
const ret = new List;
|
||||
for (let key in config) {
|
||||
@@ -1747,6 +1720,10 @@ __decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Boolean)
|
||||
], Slider.prototype, "loop", void 0);
|
||||
__decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Boolean)
|
||||
], Slider.prototype, "scrollable", void 0);
|
||||
function slider(config) {
|
||||
const ret = new Slider;
|
||||
for (let key in config) {
|
||||
@@ -1820,6 +1797,10 @@ __decorate$6([
|
||||
Property,
|
||||
__metadata$6("design:type", Function)
|
||||
], Scroller.prototype, "onScrollEnd", void 0);
|
||||
__decorate$6([
|
||||
Property,
|
||||
__metadata$6("design:type", Boolean)
|
||||
], Scroller.prototype, "scrollable", void 0);
|
||||
|
||||
var __decorate$5 = (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;
|
||||
@@ -2059,6 +2040,10 @@ __decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", Function)
|
||||
], FlowLayout.prototype, "onScrollEnd", void 0);
|
||||
__decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", Boolean)
|
||||
], FlowLayout.prototype, "scrollable", void 0);
|
||||
function flowlayout(config) {
|
||||
const ret = new FlowLayout;
|
||||
for (let key in config) {
|
||||
@@ -2200,6 +2185,10 @@ __decorate$2([
|
||||
Property,
|
||||
__metadata$2("design:type", Function)
|
||||
], NestedSlider.prototype, "onPageSlided", void 0);
|
||||
__decorate$2([
|
||||
Property,
|
||||
__metadata$2("design:type", Boolean)
|
||||
], NestedSlider.prototype, "scrollable", void 0);
|
||||
|
||||
var __decorate$1 = (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;
|
||||
@@ -2277,6 +2266,36 @@ function switchView(config) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
function modal(context) {
|
||||
return {
|
||||
toast: (msg, gravity = Gravity.Bottom) => {
|
||||
context.callNative('modal', 'toast', {
|
||||
msg,
|
||||
gravity: gravity.toModel(),
|
||||
});
|
||||
},
|
||||
alert: (arg) => {
|
||||
if (typeof arg === 'string') {
|
||||
return context.callNative('modal', 'alert', { msg: arg });
|
||||
}
|
||||
else {
|
||||
return context.callNative('modal', 'alert', arg);
|
||||
}
|
||||
},
|
||||
confirm: (arg) => {
|
||||
if (typeof arg === 'string') {
|
||||
return context.callNative('modal', 'confirm', { msg: arg });
|
||||
}
|
||||
else {
|
||||
return context.callNative('modal', 'confirm', arg);
|
||||
}
|
||||
},
|
||||
prompt: (arg) => {
|
||||
return context.callNative('modal', 'prompt', arg);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function navbar(context) {
|
||||
const entity = context.entity;
|
||||
let panel = undefined;
|
||||
|
@@ -1637,110 +1637,6 @@ class Mutable {
|
||||
}
|
||||
}
|
||||
|
||||
const SPECIFIED = 1;
|
||||
const START = 1 << 1;
|
||||
const END = 1 << 2;
|
||||
const SHIFT_X = 0;
|
||||
const SHIFT_Y = 4;
|
||||
const LEFT = (START | SPECIFIED) << SHIFT_X;
|
||||
const RIGHT = (END | SPECIFIED) << SHIFT_X;
|
||||
const TOP = (START | SPECIFIED) << SHIFT_Y;
|
||||
const BOTTOM = (END | SPECIFIED) << SHIFT_Y;
|
||||
const CENTER_X = SPECIFIED << SHIFT_X;
|
||||
const CENTER_Y = SPECIFIED << SHIFT_Y;
|
||||
const CENTER = CENTER_X | CENTER_Y;
|
||||
class Gravity {
|
||||
constructor() {
|
||||
this.val = 0;
|
||||
}
|
||||
left() {
|
||||
const val = this.val | LEFT;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
right() {
|
||||
const val = this.val | RIGHT;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
top() {
|
||||
const val = this.val | TOP;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
bottom() {
|
||||
const val = this.val | BOTTOM;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
center() {
|
||||
const val = this.val | CENTER;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
centerX() {
|
||||
const val = this.val | CENTER_X;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
centerY() {
|
||||
const val = this.val | CENTER_Y;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
toModel() {
|
||||
return this.val;
|
||||
}
|
||||
}
|
||||
Gravity.origin = new Gravity;
|
||||
Gravity.Center = Gravity.origin.center();
|
||||
Gravity.CenterX = Gravity.origin.centerX();
|
||||
Gravity.CenterY = Gravity.origin.centerY();
|
||||
Gravity.Left = Gravity.origin.left();
|
||||
Gravity.Right = Gravity.origin.right();
|
||||
Gravity.Top = Gravity.origin.top();
|
||||
Gravity.Bottom = Gravity.origin.bottom();
|
||||
function gravity() {
|
||||
return new Gravity;
|
||||
}
|
||||
|
||||
function modal(context) {
|
||||
return {
|
||||
toast: (msg, gravity = Gravity.Bottom) => {
|
||||
context.callNative('modal', 'toast', {
|
||||
msg,
|
||||
gravity: gravity.toModel(),
|
||||
});
|
||||
},
|
||||
alert: (arg) => {
|
||||
if (typeof arg === 'string') {
|
||||
return context.callNative('modal', 'alert', { msg: arg });
|
||||
}
|
||||
else {
|
||||
return context.callNative('modal', 'alert', arg);
|
||||
}
|
||||
},
|
||||
confirm: (arg) => {
|
||||
if (typeof arg === 'string') {
|
||||
return context.callNative('modal', 'confirm', { msg: arg });
|
||||
}
|
||||
else {
|
||||
return context.callNative('modal', 'confirm', arg);
|
||||
}
|
||||
},
|
||||
prompt: (arg) => {
|
||||
return context.callNative('modal', 'prompt', arg);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
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);
|
||||
@@ -1952,9 +1848,8 @@ class View {
|
||||
return this.nativeChannel(context, "cancelAnimation")(animation.id).then((args) => {
|
||||
for (let key in args) {
|
||||
Reflect.set(this, key, Reflect.get(args, key, args), this);
|
||||
//Reflect.deleteProperty(this.__dirty_props__, key)
|
||||
Reflect.deleteProperty(this.__dirty_props__, key);
|
||||
}
|
||||
modal(context).alert(JSON.stringify(this.__dirty_props__));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -2138,6 +2033,80 @@ class Group extends Superview {
|
||||
}
|
||||
}
|
||||
|
||||
const SPECIFIED = 1;
|
||||
const START = 1 << 1;
|
||||
const END = 1 << 2;
|
||||
const SHIFT_X = 0;
|
||||
const SHIFT_Y = 4;
|
||||
const LEFT = (START | SPECIFIED) << SHIFT_X;
|
||||
const RIGHT = (END | SPECIFIED) << SHIFT_X;
|
||||
const TOP = (START | SPECIFIED) << SHIFT_Y;
|
||||
const BOTTOM = (END | SPECIFIED) << SHIFT_Y;
|
||||
const CENTER_X = SPECIFIED << SHIFT_X;
|
||||
const CENTER_Y = SPECIFIED << SHIFT_Y;
|
||||
const CENTER = CENTER_X | CENTER_Y;
|
||||
class Gravity {
|
||||
constructor() {
|
||||
this.val = 0;
|
||||
}
|
||||
left() {
|
||||
const val = this.val | LEFT;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
right() {
|
||||
const val = this.val | RIGHT;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
top() {
|
||||
const val = this.val | TOP;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
bottom() {
|
||||
const val = this.val | BOTTOM;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
center() {
|
||||
const val = this.val | CENTER;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
centerX() {
|
||||
const val = this.val | CENTER_X;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
centerY() {
|
||||
const val = this.val | CENTER_Y;
|
||||
const ret = new Gravity;
|
||||
ret.val = val;
|
||||
return ret;
|
||||
}
|
||||
toModel() {
|
||||
return this.val;
|
||||
}
|
||||
}
|
||||
Gravity.origin = new Gravity;
|
||||
Gravity.Center = Gravity.origin.center();
|
||||
Gravity.CenterX = Gravity.origin.centerX();
|
||||
Gravity.CenterY = Gravity.origin.centerY();
|
||||
Gravity.Left = Gravity.origin.left();
|
||||
Gravity.Right = Gravity.origin.right();
|
||||
Gravity.Top = Gravity.origin.top();
|
||||
Gravity.Bottom = Gravity.origin.bottom();
|
||||
function gravity() {
|
||||
return new Gravity;
|
||||
}
|
||||
|
||||
exports.LayoutSpec = void 0;
|
||||
(function (LayoutSpec) {
|
||||
/**
|
||||
@@ -3178,6 +3147,10 @@ __decorate$8([
|
||||
Property,
|
||||
__metadata$8("design:type", Number)
|
||||
], List.prototype, "scrolledPosition", void 0);
|
||||
__decorate$8([
|
||||
Property,
|
||||
__metadata$8("design:type", Boolean)
|
||||
], List.prototype, "scrollable", void 0);
|
||||
function list(config) {
|
||||
const ret = new List;
|
||||
for (let key in config) {
|
||||
@@ -3268,6 +3241,10 @@ __decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Boolean)
|
||||
], Slider.prototype, "loop", void 0);
|
||||
__decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Boolean)
|
||||
], Slider.prototype, "scrollable", void 0);
|
||||
function slider(config) {
|
||||
const ret = new Slider;
|
||||
for (let key in config) {
|
||||
@@ -3341,6 +3318,10 @@ __decorate$6([
|
||||
Property,
|
||||
__metadata$6("design:type", Function)
|
||||
], Scroller.prototype, "onScrollEnd", void 0);
|
||||
__decorate$6([
|
||||
Property,
|
||||
__metadata$6("design:type", Boolean)
|
||||
], Scroller.prototype, "scrollable", void 0);
|
||||
|
||||
var __decorate$5 = (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;
|
||||
@@ -3580,6 +3561,10 @@ __decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", Function)
|
||||
], FlowLayout.prototype, "onScrollEnd", void 0);
|
||||
__decorate$4([
|
||||
Property,
|
||||
__metadata$4("design:type", Boolean)
|
||||
], FlowLayout.prototype, "scrollable", void 0);
|
||||
function flowlayout(config) {
|
||||
const ret = new FlowLayout;
|
||||
for (let key in config) {
|
||||
@@ -3721,6 +3706,10 @@ __decorate$2([
|
||||
Property,
|
||||
__metadata$2("design:type", Function)
|
||||
], NestedSlider.prototype, "onPageSlided", void 0);
|
||||
__decorate$2([
|
||||
Property,
|
||||
__metadata$2("design:type", Boolean)
|
||||
], NestedSlider.prototype, "scrollable", void 0);
|
||||
|
||||
var __decorate$1 = (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;
|
||||
@@ -3798,6 +3787,36 @@ function switchView(config) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
function modal(context) {
|
||||
return {
|
||||
toast: (msg, gravity = Gravity.Bottom) => {
|
||||
context.callNative('modal', 'toast', {
|
||||
msg,
|
||||
gravity: gravity.toModel(),
|
||||
});
|
||||
},
|
||||
alert: (arg) => {
|
||||
if (typeof arg === 'string') {
|
||||
return context.callNative('modal', 'alert', { msg: arg });
|
||||
}
|
||||
else {
|
||||
return context.callNative('modal', 'alert', arg);
|
||||
}
|
||||
},
|
||||
confirm: (arg) => {
|
||||
if (typeof arg === 'string') {
|
||||
return context.callNative('modal', 'confirm', { msg: arg });
|
||||
}
|
||||
else {
|
||||
return context.callNative('modal', 'confirm', arg);
|
||||
}
|
||||
},
|
||||
prompt: (arg) => {
|
||||
return context.callNative('modal', 'prompt', arg);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function navbar(context) {
|
||||
const entity = context.entity;
|
||||
let panel = undefined;
|
||||
|
Reference in New Issue
Block a user