js:add es5 compile option
This commit is contained in:
2
doric-js/lib/index.runtime.es5.d.ts
vendored
2
doric-js/lib/index.runtime.es5.d.ts
vendored
@@ -1,2 +0,0 @@
|
||||
export * from './src/runtime/sandbox';
|
||||
export * from 'core-js';
|
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
class ProxyPolyfill {
|
||||
constructor(target, handler) {
|
||||
this.__target__ = target;
|
||||
this.__handler__ = handler;
|
||||
this.defineProps();
|
||||
return target;
|
||||
}
|
||||
defineProps() {
|
||||
const keys = Object.keys(this.__target__);
|
||||
keys.forEach(property => {
|
||||
if (Object.getOwnPropertyDescriptor(this.__target__, property) !== undefined) {
|
||||
return;
|
||||
}
|
||||
Object.defineProperty(this, property, {
|
||||
get: () => {
|
||||
this.defineProps();
|
||||
if (this.__handler__.get) {
|
||||
return this.__handler__.get(this.__target__, property, this);
|
||||
}
|
||||
else {
|
||||
return this.__target__[property];
|
||||
}
|
||||
},
|
||||
set: (value) => {
|
||||
this.defineProps();
|
||||
if (this.__handler__.set) {
|
||||
this.__handler__.set(this.__target__, property, value, property);
|
||||
}
|
||||
else {
|
||||
this.__target__[property] = value;
|
||||
}
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
const global = Function('return this')();
|
||||
global.Proxy = ProxyPolyfill;
|
||||
export * from './src/runtime/sandbox';
|
||||
export * from 'core-js';
|
33
doric-js/lib/src/ui/animation.d.ts
vendored
33
doric-js/lib/src/ui/animation.d.ts
vendored
@@ -82,43 +82,32 @@ export declare class ScaleAnimation extends Animation {
|
||||
private scaleXChangeable;
|
||||
private scaleYChangeable;
|
||||
constructor();
|
||||
set fromScaleX(v: number);
|
||||
get fromScaleX(): number;
|
||||
set toScaleX(v: number);
|
||||
get toScaleX(): number;
|
||||
set fromScaleY(v: number);
|
||||
get fromScaleY(): number;
|
||||
set toScaleY(v: number);
|
||||
get toScaleY(): number;
|
||||
fromScaleX: number;
|
||||
toScaleX: number;
|
||||
fromScaleY: number;
|
||||
toScaleY: number;
|
||||
}
|
||||
export declare class TranslationAnimation extends Animation {
|
||||
private translationXChangeable;
|
||||
private translationYChangeable;
|
||||
constructor();
|
||||
set fromTranslationX(v: number);
|
||||
get fromTranslationX(): number;
|
||||
set toTranslationX(v: number);
|
||||
get toTranslationX(): number;
|
||||
set fromTranslationY(v: number);
|
||||
get fromTranslationY(): number;
|
||||
set toTranslationY(v: number);
|
||||
get toTranslationY(): number;
|
||||
fromTranslationX: number;
|
||||
toTranslationX: number;
|
||||
fromTranslationY: number;
|
||||
toTranslationY: number;
|
||||
}
|
||||
export declare class RotationAnimation extends Animation {
|
||||
private rotationChaneable;
|
||||
constructor();
|
||||
set fromRotation(v: number);
|
||||
get fromRotation(): number;
|
||||
set toRotation(v: number);
|
||||
get toRotation(): number;
|
||||
fromRotation: number;
|
||||
toRotation: number;
|
||||
}
|
||||
export declare class AnimationSet implements IAnimation {
|
||||
private animations;
|
||||
_duration: number;
|
||||
delay?: number;
|
||||
addAnimation(anim: IAnimation): void;
|
||||
get duration(): number;
|
||||
set duration(v: number);
|
||||
duration: number;
|
||||
toModel(): {
|
||||
animations: Model;
|
||||
delay: number | undefined;
|
||||
|
20
doric-js/lib/src/ui/view.d.ts
vendored
20
doric-js/lib/src/ui/view.d.ts
vendored
@@ -104,21 +104,15 @@ export declare abstract class View implements Modeling, IView {
|
||||
private id2Callback;
|
||||
constructor();
|
||||
/** Anchor start*/
|
||||
get left(): number;
|
||||
set left(v: number);
|
||||
get right(): number;
|
||||
set right(v: number);
|
||||
get top(): number;
|
||||
set top(v: number);
|
||||
get bottom(): number;
|
||||
set bottom(v: number);
|
||||
get centerX(): number;
|
||||
get centerY(): number;
|
||||
set centerX(v: number);
|
||||
set centerY(v: number);
|
||||
left: number;
|
||||
right: number;
|
||||
top: number;
|
||||
bottom: number;
|
||||
centerX: number;
|
||||
centerY: number;
|
||||
/** Anchor end*/
|
||||
private __dirty_props__;
|
||||
get dirtyProps(): {
|
||||
readonly dirtyProps: {
|
||||
[index: string]: Model;
|
||||
};
|
||||
nativeViewModel: NativeViewModel;
|
||||
|
Reference in New Issue
Block a user