feat:Scroller add contentOffset property
This commit is contained in:
parent
46255632ec
commit
6d7562877e
@ -109,6 +109,11 @@ public class ScrollerNode extends SuperNode<HVScrollView> implements IDoricScrol
|
||||
mChildNode.blend(props);
|
||||
mView.addView(mChildNode.getNodeView());
|
||||
}
|
||||
if (jsObject.getProperty("contentOffset").isObject()) {
|
||||
JSObject offset = jsObject.getProperty("contentOffset").asObject();
|
||||
mView.scrollTo(DoricUtils.dp2px(offset.getProperty("x").asNumber().toFloat()),
|
||||
DoricUtils.dp2px(offset.getProperty("y").asNumber().toFloat()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -150,7 +150,7 @@ class MovieVM extends ViewModel<MovieModel, MovieVH>{
|
||||
imageUrl: e.images.large,
|
||||
onClick: () => {
|
||||
this.updateState(state => state.selectedIdx = idx)
|
||||
vh.scrolled.scrollTo(context, { x: idx * 200, y: 0 })
|
||||
vh.scrolled.contentOffset = { x: idx * 200, y: 0 }
|
||||
},
|
||||
})
|
||||
],
|
||||
|
@ -107,6 +107,10 @@ - (void)blend:(NSDictionary *)props {
|
||||
self.view.contentView = it.view;
|
||||
}];
|
||||
}
|
||||
if (props[@"contentOffset"]) {
|
||||
NSDictionary *prop = props[@"contentOffset"];
|
||||
self.view.contentOffset = CGPointMake([prop[@"x"] floatValue], [prop[@"y"] floatValue]);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)blendView:(DoricScrollView *)view forPropName:(NSString *)name propValue:(id)prop {
|
||||
|
@ -1981,6 +1981,15 @@ var __extends$7 = (undefined && undefined.__extends) || (function () {
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __decorate$7 = (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$7 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") { return Reflect.metadata(k, v); }
|
||||
};
|
||||
function scroller(content, config) {
|
||||
return (new Scroller).also(function (v) {
|
||||
v.layoutConfig = layoutConfig().fit();
|
||||
@ -2007,6 +2016,10 @@ var Scroller = /** @class */ (function (_super) {
|
||||
Scroller.prototype.scrollTo = function (context, offset, animated) {
|
||||
return this.nativeChannel(context, "scrollTo")({ offset: offset, animated: animated });
|
||||
};
|
||||
__decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Object)
|
||||
], Scroller.prototype, "contentOffset", void 0);
|
||||
return Scroller;
|
||||
}(Superview));
|
||||
|
||||
@ -2023,13 +2036,13 @@ var __extends$8 = (undefined && undefined.__extends) || (function () {
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$8 = (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$7 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$8 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") { return Reflect.metadata(k, v); }
|
||||
};
|
||||
var Refreshable = /** @class */ (function (_super) {
|
||||
@ -2061,9 +2074,9 @@ var Refreshable = /** @class */ (function (_super) {
|
||||
this.dirtyProps.header = (this.header || {}).viewId;
|
||||
return _super.prototype.toModel.call(this);
|
||||
};
|
||||
__decorate$7([
|
||||
__decorate$8([
|
||||
Property,
|
||||
__metadata$7("design:type", Function)
|
||||
__metadata$8("design:type", Function)
|
||||
], Refreshable.prototype, "onRefresh", void 0);
|
||||
return Refreshable;
|
||||
}(Superview));
|
||||
@ -2095,13 +2108,13 @@ var __extends$9 = (undefined && undefined.__extends) || (function () {
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$9 = (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$8 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$9 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") { return Reflect.metadata(k, v); }
|
||||
};
|
||||
var __read$1 = (undefined && undefined.__read) || function (o, n) {
|
||||
@ -2131,9 +2144,9 @@ var FlowLayoutItem = /** @class */ (function (_super) {
|
||||
function FlowLayoutItem() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", String)
|
||||
__metadata$9("design:type", String)
|
||||
], FlowLayoutItem.prototype, "identifier", void 0);
|
||||
return FlowLayoutItem;
|
||||
}(Stack));
|
||||
@ -2188,41 +2201,41 @@ var FlowLayout = /** @class */ (function (_super) {
|
||||
}
|
||||
return _super.prototype.toModel.call(this);
|
||||
};
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Object)
|
||||
__metadata$9("design:type", Object)
|
||||
], FlowLayout.prototype, "columnCount", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Number)
|
||||
__metadata$9("design:type", Number)
|
||||
], FlowLayout.prototype, "columnSpace", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Number)
|
||||
__metadata$9("design:type", Number)
|
||||
], FlowLayout.prototype, "rowSpace", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Object)
|
||||
__metadata$9("design:type", Object)
|
||||
], FlowLayout.prototype, "itemCount", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Function)
|
||||
__metadata$9("design:type", Function)
|
||||
], FlowLayout.prototype, "renderItem", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Object)
|
||||
__metadata$9("design:type", Object)
|
||||
], FlowLayout.prototype, "batchCount", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Function)
|
||||
__metadata$9("design:type", Function)
|
||||
], FlowLayout.prototype, "onLoadMore", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Boolean)
|
||||
__metadata$9("design:type", Boolean)
|
||||
], FlowLayout.prototype, "loadMore", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", FlowLayoutItem)
|
||||
__metadata$9("design:type", FlowLayoutItem)
|
||||
], FlowLayout.prototype, "loadMoreView", void 0);
|
||||
return FlowLayout;
|
||||
}(Superview));
|
||||
@ -2265,13 +2278,13 @@ var __extends$a = (undefined && undefined.__extends) || (function () {
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$a = (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$9 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$a = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") { return Reflect.metadata(k, v); }
|
||||
};
|
||||
var Input = /** @class */ (function (_super) {
|
||||
@ -2295,41 +2308,41 @@ var Input = /** @class */ (function (_super) {
|
||||
Input.prototype.releaseFocus = function (context) {
|
||||
return this.nativeChannel(context, 'releaseFocus')();
|
||||
};
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", String)
|
||||
__metadata$a("design:type", String)
|
||||
], Input.prototype, "text", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Color)
|
||||
__metadata$a("design:type", Color)
|
||||
], Input.prototype, "textColor", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Number)
|
||||
__metadata$a("design:type", Number)
|
||||
], Input.prototype, "textSize", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", String)
|
||||
__metadata$a("design:type", String)
|
||||
], Input.prototype, "hintText", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Color)
|
||||
__metadata$a("design:type", Color)
|
||||
], Input.prototype, "hintTextColor", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Boolean)
|
||||
__metadata$a("design:type", Boolean)
|
||||
], Input.prototype, "multiline", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Gravity)
|
||||
__metadata$a("design:type", Gravity)
|
||||
], Input.prototype, "textAlignment", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Function)
|
||||
__metadata$a("design:type", Function)
|
||||
], Input.prototype, "onTextChange", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Function)
|
||||
__metadata$a("design:type", Function)
|
||||
], Input.prototype, "onFocusChange", void 0);
|
||||
return Input;
|
||||
}(View));
|
||||
@ -2355,13 +2368,13 @@ var __extends$b = (undefined && undefined.__extends) || (function () {
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$b = (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$a = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$b = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") { return Reflect.metadata(k, v); }
|
||||
};
|
||||
var NestedSlider = /** @class */ (function (_super) {
|
||||
@ -2379,9 +2392,9 @@ var NestedSlider = /** @class */ (function (_super) {
|
||||
NestedSlider.prototype.getSlidedPage = function (context) {
|
||||
return this.nativeChannel(context, "getSlidedPage")();
|
||||
};
|
||||
__decorate$a([
|
||||
__decorate$b([
|
||||
Property,
|
||||
__metadata$a("design:type", Function)
|
||||
__metadata$b("design:type", Function)
|
||||
], NestedSlider.prototype, "onPageSlided", void 0);
|
||||
return NestedSlider;
|
||||
}(Group));
|
||||
@ -2399,13 +2412,13 @@ var __extends$c = (undefined && undefined.__extends) || (function () {
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$c = (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$b = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$c = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") { return Reflect.metadata(k, v); }
|
||||
};
|
||||
var Draggable = /** @class */ (function (_super) {
|
||||
@ -2413,9 +2426,9 @@ var Draggable = /** @class */ (function (_super) {
|
||||
function Draggable() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
__decorate$b([
|
||||
__decorate$c([
|
||||
Property,
|
||||
__metadata$b("design:type", Function)
|
||||
__metadata$c("design:type", Function)
|
||||
], Draggable.prototype, "onDrag", void 0);
|
||||
return Draggable;
|
||||
}(Stack));
|
||||
|
@ -1465,21 +1465,15 @@ function slideItem(item, config) {
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* Copyright [2019] [Doric.Pub]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
var __decorate$7 = (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$7 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
function scroller(content, config) {
|
||||
return (new Scroller).also(v => {
|
||||
v.layoutConfig = layoutConfig().fit();
|
||||
@ -1503,14 +1497,18 @@ class Scroller extends Superview {
|
||||
return this.nativeChannel(context, "scrollTo")({ offset, animated });
|
||||
}
|
||||
}
|
||||
__decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Object)
|
||||
], Scroller.prototype, "contentOffset", void 0);
|
||||
|
||||
var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$8 = (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$7 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$8 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class Refreshable extends Superview {
|
||||
@ -1539,9 +1537,9 @@ class Refreshable extends Superview {
|
||||
return super.toModel();
|
||||
}
|
||||
}
|
||||
__decorate$7([
|
||||
__decorate$8([
|
||||
Property,
|
||||
__metadata$7("design:type", Function)
|
||||
__metadata$8("design:type", Function)
|
||||
], Refreshable.prototype, "onRefresh", void 0);
|
||||
function refreshable(config) {
|
||||
const ret = new Refreshable;
|
||||
@ -1558,20 +1556,20 @@ function pullable(v, config) {
|
||||
return v;
|
||||
}
|
||||
|
||||
var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$9 = (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$8 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$9 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class FlowLayoutItem extends Stack {
|
||||
}
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", String)
|
||||
__metadata$9("design:type", String)
|
||||
], FlowLayoutItem.prototype, "identifier", void 0);
|
||||
class FlowLayout extends Superview {
|
||||
constructor() {
|
||||
@ -1622,41 +1620,41 @@ class FlowLayout extends Superview {
|
||||
return super.toModel();
|
||||
}
|
||||
}
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Object)
|
||||
__metadata$9("design:type", Object)
|
||||
], FlowLayout.prototype, "columnCount", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Number)
|
||||
__metadata$9("design:type", Number)
|
||||
], FlowLayout.prototype, "columnSpace", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Number)
|
||||
__metadata$9("design:type", Number)
|
||||
], FlowLayout.prototype, "rowSpace", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Object)
|
||||
__metadata$9("design:type", Object)
|
||||
], FlowLayout.prototype, "itemCount", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Function)
|
||||
__metadata$9("design:type", Function)
|
||||
], FlowLayout.prototype, "renderItem", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Object)
|
||||
__metadata$9("design:type", Object)
|
||||
], FlowLayout.prototype, "batchCount", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Function)
|
||||
__metadata$9("design:type", Function)
|
||||
], FlowLayout.prototype, "onLoadMore", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Boolean)
|
||||
__metadata$9("design:type", Boolean)
|
||||
], FlowLayout.prototype, "loadMore", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", FlowLayoutItem)
|
||||
__metadata$9("design:type", FlowLayoutItem)
|
||||
], FlowLayout.prototype, "loadMoreView", void 0);
|
||||
function flowlayout(config) {
|
||||
const ret = new FlowLayout;
|
||||
@ -1684,13 +1682,13 @@ function flowItem(item, config) {
|
||||
});
|
||||
}
|
||||
|
||||
var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$a = (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$9 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$a = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class Input extends View {
|
||||
@ -1710,41 +1708,41 @@ class Input extends View {
|
||||
return this.nativeChannel(context, 'releaseFocus')();
|
||||
}
|
||||
}
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", String)
|
||||
__metadata$a("design:type", String)
|
||||
], Input.prototype, "text", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Color)
|
||||
__metadata$a("design:type", Color)
|
||||
], Input.prototype, "textColor", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Number)
|
||||
__metadata$a("design:type", Number)
|
||||
], Input.prototype, "textSize", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", String)
|
||||
__metadata$a("design:type", String)
|
||||
], Input.prototype, "hintText", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Color)
|
||||
__metadata$a("design:type", Color)
|
||||
], Input.prototype, "hintTextColor", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Boolean)
|
||||
__metadata$a("design:type", Boolean)
|
||||
], Input.prototype, "multiline", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Gravity)
|
||||
__metadata$a("design:type", Gravity)
|
||||
], Input.prototype, "textAlignment", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Function)
|
||||
__metadata$a("design:type", Function)
|
||||
], Input.prototype, "onTextChange", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Function)
|
||||
__metadata$a("design:type", Function)
|
||||
], Input.prototype, "onFocusChange", void 0);
|
||||
function input(config) {
|
||||
const ret = new Input;
|
||||
@ -1755,13 +1753,13 @@ function input(config) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$b = (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$a = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$b = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class NestedSlider extends Group {
|
||||
@ -1775,25 +1773,25 @@ class NestedSlider extends Group {
|
||||
return this.nativeChannel(context, "getSlidedPage")();
|
||||
}
|
||||
}
|
||||
__decorate$a([
|
||||
__decorate$b([
|
||||
Property,
|
||||
__metadata$a("design:type", Function)
|
||||
__metadata$b("design:type", Function)
|
||||
], NestedSlider.prototype, "onPageSlided", void 0);
|
||||
|
||||
var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$c = (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$b = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$c = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class Draggable extends Stack {
|
||||
}
|
||||
__decorate$b([
|
||||
__decorate$c([
|
||||
Property,
|
||||
__metadata$b("design:type", Function)
|
||||
__metadata$c("design:type", Function)
|
||||
], Draggable.prototype, "onDrag", void 0);
|
||||
function draggable(views, config) {
|
||||
const ret = new Draggable;
|
||||
|
@ -2924,21 +2924,15 @@ function slideItem(item, config) {
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* Copyright [2019] [Doric.Pub]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
var __decorate$7 = (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$7 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
function scroller(content, config) {
|
||||
return (new Scroller).also(v => {
|
||||
v.layoutConfig = layoutConfig().fit();
|
||||
@ -2962,14 +2956,18 @@ class Scroller extends Superview {
|
||||
return this.nativeChannel(context, "scrollTo")({ offset, animated });
|
||||
}
|
||||
}
|
||||
__decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Object)
|
||||
], Scroller.prototype, "contentOffset", void 0);
|
||||
|
||||
var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$8 = (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$7 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$8 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class Refreshable extends Superview {
|
||||
@ -2998,9 +2996,9 @@ class Refreshable extends Superview {
|
||||
return super.toModel();
|
||||
}
|
||||
}
|
||||
__decorate$7([
|
||||
__decorate$8([
|
||||
Property,
|
||||
__metadata$7("design:type", Function)
|
||||
__metadata$8("design:type", Function)
|
||||
], Refreshable.prototype, "onRefresh", void 0);
|
||||
function refreshable(config) {
|
||||
const ret = new Refreshable;
|
||||
@ -3017,20 +3015,20 @@ function pullable(v, config) {
|
||||
return v;
|
||||
}
|
||||
|
||||
var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$9 = (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$8 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$9 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class FlowLayoutItem extends Stack {
|
||||
}
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", String)
|
||||
__metadata$9("design:type", String)
|
||||
], FlowLayoutItem.prototype, "identifier", void 0);
|
||||
class FlowLayout extends Superview {
|
||||
constructor() {
|
||||
@ -3081,41 +3079,41 @@ class FlowLayout extends Superview {
|
||||
return super.toModel();
|
||||
}
|
||||
}
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Object)
|
||||
__metadata$9("design:type", Object)
|
||||
], FlowLayout.prototype, "columnCount", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Number)
|
||||
__metadata$9("design:type", Number)
|
||||
], FlowLayout.prototype, "columnSpace", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Number)
|
||||
__metadata$9("design:type", Number)
|
||||
], FlowLayout.prototype, "rowSpace", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Object)
|
||||
__metadata$9("design:type", Object)
|
||||
], FlowLayout.prototype, "itemCount", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Function)
|
||||
__metadata$9("design:type", Function)
|
||||
], FlowLayout.prototype, "renderItem", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Object)
|
||||
__metadata$9("design:type", Object)
|
||||
], FlowLayout.prototype, "batchCount", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Function)
|
||||
__metadata$9("design:type", Function)
|
||||
], FlowLayout.prototype, "onLoadMore", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Boolean)
|
||||
__metadata$9("design:type", Boolean)
|
||||
], FlowLayout.prototype, "loadMore", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", FlowLayoutItem)
|
||||
__metadata$9("design:type", FlowLayoutItem)
|
||||
], FlowLayout.prototype, "loadMoreView", void 0);
|
||||
function flowlayout(config) {
|
||||
const ret = new FlowLayout;
|
||||
@ -3143,13 +3141,13 @@ function flowItem(item, config) {
|
||||
});
|
||||
}
|
||||
|
||||
var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$a = (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$9 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$a = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class Input extends View {
|
||||
@ -3169,41 +3167,41 @@ class Input extends View {
|
||||
return this.nativeChannel(context, 'releaseFocus')();
|
||||
}
|
||||
}
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", String)
|
||||
__metadata$a("design:type", String)
|
||||
], Input.prototype, "text", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Color)
|
||||
__metadata$a("design:type", Color)
|
||||
], Input.prototype, "textColor", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Number)
|
||||
__metadata$a("design:type", Number)
|
||||
], Input.prototype, "textSize", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", String)
|
||||
__metadata$a("design:type", String)
|
||||
], Input.prototype, "hintText", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Color)
|
||||
__metadata$a("design:type", Color)
|
||||
], Input.prototype, "hintTextColor", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Boolean)
|
||||
__metadata$a("design:type", Boolean)
|
||||
], Input.prototype, "multiline", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Gravity)
|
||||
__metadata$a("design:type", Gravity)
|
||||
], Input.prototype, "textAlignment", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Function)
|
||||
__metadata$a("design:type", Function)
|
||||
], Input.prototype, "onTextChange", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Function)
|
||||
__metadata$a("design:type", Function)
|
||||
], Input.prototype, "onFocusChange", void 0);
|
||||
function input(config) {
|
||||
const ret = new Input;
|
||||
@ -3214,13 +3212,13 @@ function input(config) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$b = (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$a = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$b = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class NestedSlider extends Group {
|
||||
@ -3234,25 +3232,25 @@ class NestedSlider extends Group {
|
||||
return this.nativeChannel(context, "getSlidedPage")();
|
||||
}
|
||||
}
|
||||
__decorate$a([
|
||||
__decorate$b([
|
||||
Property,
|
||||
__metadata$a("design:type", Function)
|
||||
__metadata$b("design:type", Function)
|
||||
], NestedSlider.prototype, "onPageSlided", void 0);
|
||||
|
||||
var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$c = (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$b = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$c = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class Draggable extends Stack {
|
||||
}
|
||||
__decorate$b([
|
||||
__decorate$c([
|
||||
Property,
|
||||
__metadata$b("design:type", Function)
|
||||
__metadata$c("design:type", Function)
|
||||
], Draggable.prototype, "onDrag", void 0);
|
||||
function draggable(views, config) {
|
||||
const ret = new Draggable;
|
||||
|
8
doric-js/index.d.ts
vendored
8
doric-js/index.d.ts
vendored
@ -574,9 +574,17 @@ declare module 'doric/lib/src/widget/scroller' {
|
||||
export function scroller(content: View, config?: IScroller): Scroller;
|
||||
export interface IScroller extends IView {
|
||||
content?: View;
|
||||
contentOffset?: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
}
|
||||
export class Scroller extends Superview implements IScroller {
|
||||
content: View;
|
||||
contentOffset?: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
allSubviews(): View[];
|
||||
toModel(): NativeViewModel;
|
||||
scrollTo(context: BridgeContext, offset: {
|
||||
|
8
doric-js/lib/src/widget/scroller.d.ts
vendored
8
doric-js/lib/src/widget/scroller.d.ts
vendored
@ -3,9 +3,17 @@ import { BridgeContext } from '../runtime/global';
|
||||
export declare function scroller(content: View, config?: IScroller): Scroller;
|
||||
export interface IScroller extends IView {
|
||||
content?: View;
|
||||
contentOffset?: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
}
|
||||
export declare class Scroller extends Superview implements IScroller {
|
||||
content: View;
|
||||
contentOffset?: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
allSubviews(): View[];
|
||||
toModel(): NativeViewModel;
|
||||
scrollTo(context: BridgeContext, offset: {
|
||||
|
@ -1,3 +1,12 @@
|
||||
var __decorate = (this && this.__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 = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
/*
|
||||
* Copyright [2019] [Doric.Pub]
|
||||
*
|
||||
@ -13,7 +22,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { Superview } from '../ui/view';
|
||||
import { Superview, Property } from '../ui/view';
|
||||
import { layoutConfig } from '../util/layoutconfig';
|
||||
export function scroller(content, config) {
|
||||
return (new Scroller).also(v => {
|
||||
@ -38,3 +47,7 @@ export class Scroller extends Superview {
|
||||
return this.nativeChannel(context, "scrollTo")({ offset, animated });
|
||||
}
|
||||
}
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Object)
|
||||
], Scroller.prototype, "contentOffset", void 0);
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { Superview, View, IView, NativeViewModel } from '../ui/view'
|
||||
import { Superview, View, IView, NativeViewModel, Property } from '../ui/view'
|
||||
import { layoutConfig } from '../util/layoutconfig'
|
||||
import { BridgeContext } from '../runtime/global'
|
||||
|
||||
@ -31,11 +31,15 @@ export function scroller(content: View, config?: IScroller) {
|
||||
|
||||
export interface IScroller extends IView {
|
||||
content?: View
|
||||
contentOffset?: { x: number, y: number }
|
||||
}
|
||||
|
||||
export class Scroller extends Superview implements IScroller {
|
||||
content!: View
|
||||
|
||||
@Property
|
||||
contentOffset?: { x: number, y: number }
|
||||
|
||||
allSubviews() {
|
||||
return [this.content]
|
||||
}
|
||||
|
136
doric-web/dist/index.js
vendored
136
doric-web/dist/index.js
vendored
@ -2982,21 +2982,15 @@ function slideItem(item, config) {
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* Copyright [2019] [Doric.Pub]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
var __decorate$7 = (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$7 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
function scroller(content, config) {
|
||||
return (new Scroller).also(v => {
|
||||
v.layoutConfig = layoutConfig().fit();
|
||||
@ -3020,14 +3014,18 @@ class Scroller extends Superview {
|
||||
return this.nativeChannel(context, "scrollTo")({ offset, animated });
|
||||
}
|
||||
}
|
||||
__decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Object)
|
||||
], Scroller.prototype, "contentOffset", void 0);
|
||||
|
||||
var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$8 = (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$7 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$8 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class Refreshable extends Superview {
|
||||
@ -3056,9 +3054,9 @@ class Refreshable extends Superview {
|
||||
return super.toModel();
|
||||
}
|
||||
}
|
||||
__decorate$7([
|
||||
__decorate$8([
|
||||
Property,
|
||||
__metadata$7("design:type", Function)
|
||||
__metadata$8("design:type", Function)
|
||||
], Refreshable.prototype, "onRefresh", void 0);
|
||||
function refreshable(config) {
|
||||
const ret = new Refreshable;
|
||||
@ -3075,20 +3073,20 @@ function pullable(v, config) {
|
||||
return v;
|
||||
}
|
||||
|
||||
var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$9 = (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$8 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$9 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class FlowLayoutItem extends Stack {
|
||||
}
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", String)
|
||||
__metadata$9("design:type", String)
|
||||
], FlowLayoutItem.prototype, "identifier", void 0);
|
||||
class FlowLayout extends Superview {
|
||||
constructor() {
|
||||
@ -3139,41 +3137,41 @@ class FlowLayout extends Superview {
|
||||
return super.toModel();
|
||||
}
|
||||
}
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Object)
|
||||
__metadata$9("design:type", Object)
|
||||
], FlowLayout.prototype, "columnCount", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Number)
|
||||
__metadata$9("design:type", Number)
|
||||
], FlowLayout.prototype, "columnSpace", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Number)
|
||||
__metadata$9("design:type", Number)
|
||||
], FlowLayout.prototype, "rowSpace", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Object)
|
||||
__metadata$9("design:type", Object)
|
||||
], FlowLayout.prototype, "itemCount", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Function)
|
||||
__metadata$9("design:type", Function)
|
||||
], FlowLayout.prototype, "renderItem", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Object)
|
||||
__metadata$9("design:type", Object)
|
||||
], FlowLayout.prototype, "batchCount", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Function)
|
||||
__metadata$9("design:type", Function)
|
||||
], FlowLayout.prototype, "onLoadMore", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", Boolean)
|
||||
__metadata$9("design:type", Boolean)
|
||||
], FlowLayout.prototype, "loadMore", void 0);
|
||||
__decorate$8([
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$8("design:type", FlowLayoutItem)
|
||||
__metadata$9("design:type", FlowLayoutItem)
|
||||
], FlowLayout.prototype, "loadMoreView", void 0);
|
||||
function flowlayout(config) {
|
||||
const ret = new FlowLayout;
|
||||
@ -3201,13 +3199,13 @@ function flowItem(item, config) {
|
||||
});
|
||||
}
|
||||
|
||||
var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$a = (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$9 = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$a = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class Input extends View {
|
||||
@ -3227,41 +3225,41 @@ class Input extends View {
|
||||
return this.nativeChannel(context, 'releaseFocus')();
|
||||
}
|
||||
}
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", String)
|
||||
__metadata$a("design:type", String)
|
||||
], Input.prototype, "text", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Color)
|
||||
__metadata$a("design:type", Color)
|
||||
], Input.prototype, "textColor", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Number)
|
||||
__metadata$a("design:type", Number)
|
||||
], Input.prototype, "textSize", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", String)
|
||||
__metadata$a("design:type", String)
|
||||
], Input.prototype, "hintText", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Color)
|
||||
__metadata$a("design:type", Color)
|
||||
], Input.prototype, "hintTextColor", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Boolean)
|
||||
__metadata$a("design:type", Boolean)
|
||||
], Input.prototype, "multiline", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Gravity)
|
||||
__metadata$a("design:type", Gravity)
|
||||
], Input.prototype, "textAlignment", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Function)
|
||||
__metadata$a("design:type", Function)
|
||||
], Input.prototype, "onTextChange", void 0);
|
||||
__decorate$9([
|
||||
__decorate$a([
|
||||
Property,
|
||||
__metadata$9("design:type", Function)
|
||||
__metadata$a("design:type", Function)
|
||||
], Input.prototype, "onFocusChange", void 0);
|
||||
function input(config) {
|
||||
const ret = new Input;
|
||||
@ -3272,13 +3270,13 @@ function input(config) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$b = (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$a = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$b = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class NestedSlider extends Group {
|
||||
@ -3292,25 +3290,25 @@ class NestedSlider extends Group {
|
||||
return this.nativeChannel(context, "getSlidedPage")();
|
||||
}
|
||||
}
|
||||
__decorate$a([
|
||||
__decorate$b([
|
||||
Property,
|
||||
__metadata$a("design:type", Function)
|
||||
__metadata$b("design:type", Function)
|
||||
], NestedSlider.prototype, "onPageSlided", void 0);
|
||||
|
||||
var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
||||
var __decorate$c = (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$b = (undefined && undefined.__metadata) || function (k, v) {
|
||||
var __metadata$c = (undefined && undefined.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
class Draggable extends Stack {
|
||||
}
|
||||
__decorate$b([
|
||||
__decorate$c([
|
||||
Property,
|
||||
__metadata$b("design:type", Function)
|
||||
__metadata$c("design:type", Function)
|
||||
], Draggable.prototype, "onDrag", void 0);
|
||||
function draggable(views, config) {
|
||||
const ret = new Draggable;
|
||||
|
2
doric-web/dist/index.js.map
vendored
2
doric-web/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user