@base-framework/base 3.5.49 → 3.5.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.js +1 -1
- package/dist/base.js.map +3 -3
- package/dist/types/main/base.d.ts +10 -11
- package/dist/types/main/data-tracker/data-tracker.d.ts +2 -2
- package/dist/types/main/data-tracker/tracker.d.ts +1 -1
- package/dist/types/main/events/event-methods.d.ts +1 -1
- package/dist/types/main/events/events.d.ts +9 -9
- package/dist/types/modules/ajax/ajax.d.ts +2 -2
- package/dist/types/modules/ajax/xhr-default-settings.d.ts +7 -9
- package/dist/types/modules/ajax/xhr-request.d.ts +4 -4
- package/dist/types/modules/animation/animation.d.ts +3 -3
- package/dist/types/modules/animations/animation-controller.d.ts +4 -1
- package/dist/types/modules/animations/attr-movement.d.ts +0 -14
- package/dist/types/modules/animations/css-movement.d.ts +11 -1
- package/dist/types/modules/animations/movement.d.ts +79 -14
- package/dist/types/modules/animations/value.d.ts +113 -25
- package/dist/types/modules/component/cloak.d.ts +1 -1
- package/dist/types/modules/component/component.d.ts +12 -13
- package/dist/types/modules/component/event-helper.d.ts +4 -4
- package/dist/types/modules/component/parse-args.d.ts +1 -1
- package/dist/types/modules/component/pod.d.ts +1 -1
- package/dist/types/modules/component/prop-utils.d.ts +2 -2
- package/dist/types/modules/component/state-helper.d.ts +13 -13
- package/dist/types/modules/component/unit.d.ts +27 -25
- package/dist/types/modules/data/types/basic-data.d.ts +6 -6
- package/dist/types/modules/data/types/deep-data/data-utils.d.ts +2 -2
- package/dist/types/modules/data/types/deep-data/deep-data.d.ts +2 -2
- package/dist/types/modules/data/types/deep-data/publisher.d.ts +2 -2
- package/dist/types/modules/data/types/model/model-service.d.ts +28 -28
- package/dist/types/modules/data-binder/connection-tracker/connection-tracker.d.ts +2 -2
- package/dist/types/modules/data-binder/connection-tracker/connections/one-way-connection.d.ts +2 -3
- package/dist/types/modules/data-binder/connection-tracker/connections/two-way-connection.d.ts +8 -10
- package/dist/types/modules/data-binder/data-binder.d.ts +17 -16
- package/dist/types/modules/data-binder/data-pub-sub.d.ts +1 -1
- package/dist/types/modules/data-binder/sources/data-source.d.ts +3 -3
- package/dist/types/modules/data-binder/sources/element-source.d.ts +4 -4
- package/dist/types/modules/data-binder/sources/source.d.ts +4 -4
- package/dist/types/modules/data-binder/sources/two-way-source.d.ts +2 -2
- package/dist/types/modules/date/date-time.d.ts +4 -4
- package/dist/types/modules/html/html.d.ts +2 -2
- package/dist/types/modules/import/group.d.ts +4 -4
- package/dist/types/modules/import/import-wrapper.d.ts +2 -2
- package/dist/types/modules/layout/builder.d.ts +2 -2
- package/dist/types/modules/layout/directives/core/parent/parent-directives.d.ts +1 -1
- package/dist/types/modules/layout/directives/core/reactive/data-set.d.ts +2 -2
- package/dist/types/modules/layout/directives/core/reactive/map.d.ts +1 -1
- package/dist/types/modules/layout/directives/core/reactive/on-set.d.ts +1 -1
- package/dist/types/modules/layout/directives/core/reactive/on-state.d.ts +1 -1
- package/dist/types/modules/layout/directives/core/switch.d.ts +1 -1
- package/dist/types/modules/layout/directives/directives.d.ts +4 -4
- package/dist/types/modules/layout/element/element.d.ts +1 -1
- package/dist/types/modules/layout/element/parser.d.ts +6 -6
- package/dist/types/modules/layout/html-helper.d.ts +4 -4
- package/dist/types/modules/layout/html-to-string.d.ts +4 -4
- package/dist/types/modules/layout/render/render.d.ts +2 -2
- package/dist/types/modules/router/history/browser-history.d.ts +6 -6
- package/dist/types/modules/router/history/hash-history.d.ts +6 -0
- package/dist/types/modules/router/history/history.d.ts +2 -2
- package/dist/types/modules/router/nav-link.d.ts +2 -2
- package/dist/types/modules/router/router.d.ts +37 -28
- package/dist/types/modules/router/routes/component-helper.d.ts +0 -5
- package/dist/types/modules/router/routes/param-pattern.d.ts +2 -2
- package/dist/types/modules/router/routes/route.d.ts +1 -1
- package/dist/types/modules/router/utils.d.ts +9 -9
- package/dist/types/modules/state/state-tracker.d.ts +1 -1
- package/dist/types/shared/arrays.d.ts +4 -4
- package/dist/types/shared/dom.d.ts +2 -2
- package/dist/types/shared/encode/encode.d.ts +4 -9
- package/package.json +1 -1
- package/dist/types/modules/atom/atoms.d.ts +0 -343
- package/dist/types/modules/data/attrs.d.ts +0 -1
- package/dist/types/modules/data/basic-data.d.ts +0 -259
- package/dist/types/modules/data/data-utils.d.ts +0 -17
- package/dist/types/modules/data/deep-data.d.ts +0 -162
- package/dist/types/modules/data/model-service.d.ts +0 -280
- package/dist/types/modules/data/model.d.ts +0 -33
- package/dist/types/modules/data/simple-data.d.ts +0 -12
- package/dist/types/modules/router/routes/cloak.d.ts +0 -12
|
@@ -13,13 +13,13 @@ export const base: Base;
|
|
|
13
13
|
*/
|
|
14
14
|
declare class Base {
|
|
15
15
|
/**
|
|
16
|
-
* @
|
|
16
|
+
* @type {Array<any>} errors
|
|
17
17
|
*/
|
|
18
|
-
errors: any
|
|
18
|
+
errors: Array<any>;
|
|
19
19
|
/**
|
|
20
|
-
* @
|
|
20
|
+
* @type {object} dataTracker
|
|
21
21
|
*/
|
|
22
|
-
dataTracker:
|
|
22
|
+
dataTracker: object;
|
|
23
23
|
/**
|
|
24
24
|
* this will augement the base framework with new functionality.
|
|
25
25
|
*
|
|
@@ -33,10 +33,10 @@ declare class Base {
|
|
|
33
33
|
* @param {object} obj The object being modified.
|
|
34
34
|
* @param {string} methodName the method name being overriden.
|
|
35
35
|
* @param {function} overrideMethod The new function to call.
|
|
36
|
-
* @param {
|
|
36
|
+
* @param {Array<any>} args The args to pass to the first function call.
|
|
37
37
|
* @returns {*} The results of the function being called.
|
|
38
38
|
*/
|
|
39
|
-
override(obj: object, methodName: string, overrideMethod: Function, args: any
|
|
39
|
+
override(obj: object, methodName: string, overrideMethod: Function, args: Array<any>): any;
|
|
40
40
|
/**
|
|
41
41
|
* This will get the last error.
|
|
42
42
|
*
|
|
@@ -53,23 +53,23 @@ declare class Base {
|
|
|
53
53
|
/**
|
|
54
54
|
* This will get the value from a property on an object.
|
|
55
55
|
*
|
|
56
|
-
* @param {
|
|
56
|
+
* @param {Record<string, any>} obj
|
|
57
57
|
* @param {string} property
|
|
58
58
|
* @param {*} [defaultText] A value if no value is set.
|
|
59
59
|
* @returns {string}
|
|
60
60
|
*/
|
|
61
|
-
getProperty(obj:
|
|
61
|
+
getProperty(obj: Record<string, any>, property: string, defaultText?: any): string;
|
|
62
62
|
/**
|
|
63
63
|
* This will create a callBack.
|
|
64
64
|
*
|
|
65
65
|
* @param {object} obj
|
|
66
66
|
* @param {function} method
|
|
67
|
-
* @param {
|
|
67
|
+
* @param {Array<any>} [argArray] Default args to pass.
|
|
68
68
|
* @param {boolean} [addArgs] Set to add merge args from the
|
|
69
69
|
* curried function.
|
|
70
70
|
* @returns {function|boolean} The callBack function or false.
|
|
71
71
|
*/
|
|
72
|
-
createCallBack(obj: object, method: Function, argArray?: any
|
|
72
|
+
createCallBack(obj: object, method: Function, argArray?: Array<any>, addArgs?: boolean): Function | boolean;
|
|
73
73
|
/**
|
|
74
74
|
* This will bind scope to a method.
|
|
75
75
|
*
|
|
@@ -86,5 +86,4 @@ declare class Base {
|
|
|
86
86
|
*/
|
|
87
87
|
extend: Base;
|
|
88
88
|
}
|
|
89
|
-
import { DataTracker } from './data-tracker/data-tracker.js';
|
|
90
89
|
export {};
|
|
@@ -13,14 +13,14 @@ export class DataTracker {
|
|
|
13
13
|
/**
|
|
14
14
|
* @private
|
|
15
15
|
* @static
|
|
16
|
-
* @
|
|
16
|
+
* @type {Map} trackers This is an object that stores all tracker
|
|
17
17
|
* objects by tracking id.
|
|
18
18
|
*/
|
|
19
19
|
private static trackers;
|
|
20
20
|
/**
|
|
21
21
|
* @private
|
|
22
22
|
* @static
|
|
23
|
-
* @
|
|
23
|
+
* @type {number} trackingCount
|
|
24
24
|
*/
|
|
25
25
|
private static trackingCount;
|
|
26
26
|
/**
|
|
@@ -79,7 +79,7 @@ export namespace EventMethods {
|
|
|
79
79
|
* @returns {object}
|
|
80
80
|
*/
|
|
81
81
|
export function trigger(event: string | object, obj: object, params?: object): object;
|
|
82
|
-
export let mouseWheelEventType:
|
|
82
|
+
export let mouseWheelEventType: string | null;
|
|
83
83
|
/**
|
|
84
84
|
* This will get the system mouse event.
|
|
85
85
|
*
|
|
@@ -3,9 +3,9 @@ export namespace Events {
|
|
|
3
3
|
* This will get the events on an element.
|
|
4
4
|
*
|
|
5
5
|
* @param {object} obj
|
|
6
|
-
* @returns {
|
|
6
|
+
* @returns {Array<any>}
|
|
7
7
|
*/
|
|
8
|
-
function getEvents(obj: object): any
|
|
8
|
+
function getEvents(obj: object): Array<any>;
|
|
9
9
|
/**
|
|
10
10
|
* This will create an object to use with the dataTracker.
|
|
11
11
|
*
|
|
@@ -14,10 +14,10 @@ export namespace Events {
|
|
|
14
14
|
* @param {function} fn
|
|
15
15
|
* @param {boolean|object} [capture]
|
|
16
16
|
* @param {boolean} [swapped]
|
|
17
|
-
* @param {function} [originalFn]
|
|
17
|
+
* @param {function|null} [originalFn]
|
|
18
18
|
* @returns {object}
|
|
19
19
|
*/
|
|
20
|
-
function create(event: string, obj: object, fn: Function, capture?: boolean | object, swapped?: boolean, originalFn?: Function): object;
|
|
20
|
+
function create(event: string, obj: object, fn: Function, capture?: boolean | object, swapped?: boolean, originalFn?: Function | null): object;
|
|
21
21
|
/**
|
|
22
22
|
* This will add an event to an object.
|
|
23
23
|
*
|
|
@@ -46,10 +46,10 @@ export namespace Events {
|
|
|
46
46
|
* @param {function} fn
|
|
47
47
|
* @param {object|boolean} [capture]
|
|
48
48
|
* @param {boolean} [swapped]
|
|
49
|
-
* @param {function} [originalFn]
|
|
49
|
+
* @param {function|null} [originalFn]
|
|
50
50
|
* @returns {object} The events object.
|
|
51
51
|
*/
|
|
52
|
-
function add(event: string, obj: object, fn: Function, capture?: object | boolean, swapped?: boolean, originalFn?: Function): object;
|
|
52
|
+
function add(event: string, obj: object, fn: Function, capture?: object | boolean, swapped?: boolean, originalFn?: Function | null): object;
|
|
53
53
|
/**
|
|
54
54
|
* This will remove an event from an object.
|
|
55
55
|
*
|
|
@@ -81,10 +81,10 @@ export namespace Events {
|
|
|
81
81
|
* This will search for an event from the object events.
|
|
82
82
|
*
|
|
83
83
|
* @param {object} eventObj
|
|
84
|
-
* @param {
|
|
84
|
+
* @param {Array<any>} events
|
|
85
85
|
* @returns {object|boolean}
|
|
86
86
|
*/
|
|
87
|
-
function search(eventObj: object, events: any
|
|
87
|
+
function search(eventObj: object, events: Array<any>): object | boolean;
|
|
88
88
|
/**
|
|
89
89
|
* This will remove all events on an object.
|
|
90
90
|
*
|
|
@@ -92,7 +92,7 @@ export namespace Events {
|
|
|
92
92
|
* @returns {object} a reference to the events object.
|
|
93
93
|
*/
|
|
94
94
|
function removeEvents(obj: object): object;
|
|
95
|
-
let swap:
|
|
95
|
+
let swap: Array<any>;
|
|
96
96
|
/**
|
|
97
97
|
* This will a event type to the swappable array.
|
|
98
98
|
*
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* }
|
|
22
22
|
* }
|
|
23
23
|
*
|
|
24
|
-
* @returns {XMLHttpRequest} xhr object.
|
|
24
|
+
* @returns {XMLHttpRequest|null} xhr object.
|
|
25
25
|
*/
|
|
26
26
|
export function Ajax(url: string, params?: string, callBackFn?: Function, responseType?: string, method?: string, async?: boolean): any;
|
|
27
27
|
/**
|
|
@@ -47,7 +47,7 @@ export function Ajax(url: string, params?: string, callBackFn?: Function, respon
|
|
|
47
47
|
* }
|
|
48
48
|
* }
|
|
49
49
|
*
|
|
50
|
-
* @returns {XMLHttpRequest} xhr object.
|
|
50
|
+
* @returns {XMLHttpRequest|null} xhr object.
|
|
51
51
|
*/
|
|
52
52
|
export function Ajax(settings: object): any;
|
|
53
53
|
export { XhrRequest };
|
|
@@ -2,16 +2,14 @@ export namespace XhrDefaultSettings {
|
|
|
2
2
|
let url: string;
|
|
3
3
|
let responseType: string;
|
|
4
4
|
let method: string;
|
|
5
|
-
let fixedParams: string;
|
|
6
|
-
let headers:
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
let beforeSend: any[];
|
|
5
|
+
let fixedParams: object | string;
|
|
6
|
+
let headers: object;
|
|
7
|
+
let beforeSend: Array<any>;
|
|
10
8
|
let async: boolean;
|
|
11
9
|
let crossDomain: boolean;
|
|
12
10
|
let withCredentials: boolean;
|
|
13
|
-
let completed:
|
|
14
|
-
let failed:
|
|
15
|
-
let aborted:
|
|
16
|
-
let progress:
|
|
11
|
+
let completed: Function | null;
|
|
12
|
+
let failed: Function | null;
|
|
13
|
+
let aborted: Function | null;
|
|
14
|
+
let progress: Function | null;
|
|
17
15
|
}
|
|
@@ -42,10 +42,10 @@ export class XhrRequest {
|
|
|
42
42
|
*
|
|
43
43
|
* @protected
|
|
44
44
|
* @param {*} params
|
|
45
|
-
* @param {*} addingParams
|
|
45
|
+
* @param {*} [addingParams]
|
|
46
46
|
* @returns {*}
|
|
47
47
|
*/
|
|
48
|
-
protected setupParams(params: any, addingParams
|
|
48
|
+
protected setupParams(params: any, addingParams?: any): any;
|
|
49
49
|
/**
|
|
50
50
|
* This will get the params.
|
|
51
51
|
*
|
|
@@ -57,10 +57,10 @@ export class XhrRequest {
|
|
|
57
57
|
* This will set the settings from the args.
|
|
58
58
|
*
|
|
59
59
|
* @protected
|
|
60
|
-
* @param {
|
|
60
|
+
* @param {Array<any>} args
|
|
61
61
|
* @returns {void}
|
|
62
62
|
*/
|
|
63
|
-
protected getXhrSettings(args: any
|
|
63
|
+
protected getXhrSettings(args: Array<any>): void;
|
|
64
64
|
/**
|
|
65
65
|
* This will create the xhr object.
|
|
66
66
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export namespace animate {
|
|
2
2
|
namespace animating {
|
|
3
|
-
let objects:
|
|
3
|
+
let objects: Array<object>;
|
|
4
4
|
/**
|
|
5
5
|
* This will add an animation.
|
|
6
6
|
*
|
|
@@ -24,9 +24,9 @@ export namespace animate {
|
|
|
24
24
|
/**
|
|
25
25
|
* This will check if the element is animating.
|
|
26
26
|
* @param {object} obj
|
|
27
|
-
* @returns {
|
|
27
|
+
* @returns {Array<any>}
|
|
28
28
|
*/
|
|
29
|
-
function checkAnimating(obj: object): any
|
|
29
|
+
function checkAnimating(obj: object): Array<any>;
|
|
30
30
|
/**
|
|
31
31
|
* This will stop previous animations still animating.
|
|
32
32
|
* @param {object} obj
|
|
@@ -10,8 +10,11 @@ export class AnimationController {
|
|
|
10
10
|
ease: any;
|
|
11
11
|
callBack: any;
|
|
12
12
|
fps: any;
|
|
13
|
+
/**
|
|
14
|
+
* @type {Function|null} animationCallBack
|
|
15
|
+
*/
|
|
16
|
+
animationCallBack: Function | null;
|
|
13
17
|
setup(settings: any): this;
|
|
14
|
-
animationCallBack: any;
|
|
15
18
|
/**
|
|
16
19
|
* This will setup the animation.
|
|
17
20
|
*
|
|
@@ -14,14 +14,6 @@ export class AttrMovement extends Movement {
|
|
|
14
14
|
*/
|
|
15
15
|
constructor(element: object, settings: object);
|
|
16
16
|
filter: any;
|
|
17
|
-
/**
|
|
18
|
-
* This will get the value of the element property.
|
|
19
|
-
*
|
|
20
|
-
* @param {*} value - The value to get.
|
|
21
|
-
* @param {*} end - The end value.
|
|
22
|
-
* @returns {*} The value.
|
|
23
|
-
*/
|
|
24
|
-
getStartValue(value: any, end: any): any;
|
|
25
17
|
/**
|
|
26
18
|
* This will get the value of the element property.
|
|
27
19
|
*
|
|
@@ -29,11 +21,5 @@ export class AttrMovement extends Movement {
|
|
|
29
21
|
* @returns {*} The value.
|
|
30
22
|
*/
|
|
31
23
|
filterValue(value: any, ...args: any[]): any;
|
|
32
|
-
/**
|
|
33
|
-
* This will update the value of the element property.
|
|
34
|
-
*
|
|
35
|
-
* @param {*} value
|
|
36
|
-
*/
|
|
37
|
-
update(value: any): void;
|
|
38
24
|
}
|
|
39
25
|
import { Movement } from './movement.js';
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
export class CssMovement extends Movement {
|
|
2
|
+
constructor(element: any, settings: any);
|
|
2
3
|
style: any;
|
|
4
|
+
getStartValue(value: any, end: any): any;
|
|
5
|
+
getEndValue(text: any): any;
|
|
3
6
|
getCssValue(text: any): any;
|
|
4
7
|
setMethod(method: any): void;
|
|
5
8
|
method: any;
|
|
6
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Updates the value based on the animation delta.
|
|
11
|
+
*
|
|
12
|
+
* @param {number} delta - The delta value (0-1) representing animation progress
|
|
13
|
+
* @returns {Array<string>} The updated value as an array of strings
|
|
14
|
+
*/
|
|
15
|
+
updateValue(delta: number): Array<string>;
|
|
16
|
+
update(value: any): void;
|
|
7
17
|
}
|
|
8
18
|
import { Movement } from './movement.js';
|
|
@@ -1,24 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Movement
|
|
3
|
+
*
|
|
4
|
+
* This class manages animation movements for DOM elements,
|
|
5
|
+
* handling property updates and value calculations.
|
|
6
|
+
*
|
|
7
|
+
* @class
|
|
8
|
+
*/
|
|
1
9
|
export class Movement {
|
|
2
|
-
|
|
3
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new Movement instance.
|
|
12
|
+
*
|
|
13
|
+
* @constructor
|
|
14
|
+
* @param {HTMLElement} element - The DOM element to animate
|
|
15
|
+
* @param {object} settings - The movement settings
|
|
16
|
+
*/
|
|
17
|
+
constructor(element: HTMLElement, settings: object);
|
|
18
|
+
element: HTMLElement;
|
|
4
19
|
property: any;
|
|
20
|
+
/**
|
|
21
|
+
* @type {any}
|
|
22
|
+
*/
|
|
5
23
|
value: any;
|
|
6
|
-
setup(settings: any): void;
|
|
7
24
|
/**
|
|
8
|
-
*
|
|
25
|
+
* Sets up the movement with the given settings.
|
|
26
|
+
*
|
|
27
|
+
* @param {object} settings - The movement settings
|
|
28
|
+
* @returns {void}
|
|
29
|
+
*/
|
|
30
|
+
setup(settings: object): void;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a Value instance for the movement.
|
|
9
33
|
*
|
|
10
|
-
* @param {object} settings
|
|
11
|
-
* @returns {
|
|
34
|
+
* @param {object} settings - The settings containing start and end values
|
|
35
|
+
* @returns {any} A Value instance or array of Value instances
|
|
36
|
+
*/
|
|
37
|
+
createValue(settings: object): any;
|
|
38
|
+
/**
|
|
39
|
+
* Gets the start and end values from settings.
|
|
40
|
+
*
|
|
41
|
+
* @param {object} settings - The settings containing startValue and endValue
|
|
42
|
+
* @returns {object} Object with start and end properties
|
|
43
|
+
*/
|
|
44
|
+
getValue(settings: object): object;
|
|
45
|
+
/**
|
|
46
|
+
* Gets the start value for the animation.
|
|
47
|
+
*
|
|
48
|
+
* @param {*} value - The start value
|
|
49
|
+
* @param {*} end - The end value
|
|
50
|
+
* @returns {*} The start value
|
|
12
51
|
*/
|
|
13
|
-
createValue(settings: object): object;
|
|
14
|
-
getValue(settings: any): {
|
|
15
|
-
start: any;
|
|
16
|
-
end: any;
|
|
17
|
-
};
|
|
18
52
|
getStartValue(value: any, end: any): any;
|
|
53
|
+
/**
|
|
54
|
+
* Gets the end value for the animation.
|
|
55
|
+
*
|
|
56
|
+
* @param {*} text - The end value
|
|
57
|
+
* @returns {*} The end value
|
|
58
|
+
*/
|
|
19
59
|
getEndValue(text: any): any;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Sets up the property and value for the movement.
|
|
62
|
+
*
|
|
63
|
+
* @param {object} settings - The settings containing property and values
|
|
64
|
+
* @returns {void}
|
|
65
|
+
*/
|
|
66
|
+
setupProperty(settings: object): void;
|
|
67
|
+
/**
|
|
68
|
+
* Updates the value based on the animation delta.
|
|
69
|
+
*
|
|
70
|
+
* @param {number} delta - The delta value (0-1) representing animation progress
|
|
71
|
+
* @returns {any} The updated value (string or array of strings)
|
|
72
|
+
*/
|
|
73
|
+
updateValue(delta: number): any;
|
|
74
|
+
/**
|
|
75
|
+
* Performs a step in the animation.
|
|
76
|
+
*
|
|
77
|
+
* @param {number} delta - The delta value (0-1) representing animation progress
|
|
78
|
+
* @returns {void}
|
|
79
|
+
*/
|
|
80
|
+
step(delta: number): void;
|
|
81
|
+
/**
|
|
82
|
+
* Updates the element with the new value.
|
|
83
|
+
* Override this method in subclasses to implement specific update logic.
|
|
84
|
+
*
|
|
85
|
+
* @param {*} value - The value to apply
|
|
86
|
+
* @returns {void}
|
|
87
|
+
*/
|
|
23
88
|
update(value: any): void;
|
|
24
89
|
}
|
|
@@ -1,30 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Value
|
|
3
|
+
*
|
|
4
|
+
* This class manages animation values including start, end, units,
|
|
5
|
+
* and calculations for smooth transitions.
|
|
6
|
+
*
|
|
7
|
+
* @class
|
|
8
|
+
*/
|
|
1
9
|
export class Value {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new Value instance.
|
|
12
|
+
*
|
|
13
|
+
* @constructor
|
|
14
|
+
* @param {object} settings - The settings object containing start and end values
|
|
15
|
+
*/
|
|
16
|
+
constructor(settings: object);
|
|
17
|
+
value: any;
|
|
18
|
+
/**
|
|
19
|
+
* Sets up the value by creating and configuring it.
|
|
20
|
+
*
|
|
21
|
+
* @param {object} settings - The settings object containing start and end values
|
|
22
|
+
* @returns {void}
|
|
23
|
+
*/
|
|
24
|
+
setup(settings: object): void;
|
|
25
|
+
/**
|
|
26
|
+
* Creates a value object with start, end, units, and difference properties.
|
|
27
|
+
*
|
|
28
|
+
* @param {object} settings - The settings object containing start and end values
|
|
29
|
+
* @returns {object} The value object with combining, start, end, units, and difference properties
|
|
30
|
+
*/ createValue(settings: object): object;
|
|
31
|
+
/**
|
|
32
|
+
* Extracts the units from a value string (e.g., 'px', 'em', '%').
|
|
33
|
+
*
|
|
34
|
+
* @param {*} text - The text to extract units from
|
|
35
|
+
* @returns {string} The extracted units or empty string
|
|
36
|
+
*/
|
|
37
|
+
getUnits(text: any): string;
|
|
38
|
+
/**
|
|
39
|
+
* Checks if the value should be combined with the current value (+= or -=).
|
|
40
|
+
*
|
|
41
|
+
* @param {*} end - The end value to check
|
|
42
|
+
* @returns {boolean} True if combining, false otherwise
|
|
43
|
+
*/
|
|
19
44
|
checkCombind(end: any): boolean;
|
|
20
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Converts a value to a string.
|
|
47
|
+
*
|
|
48
|
+
* @param {*} value - The value to convert
|
|
49
|
+
* @returns {string} The string representation of the value
|
|
50
|
+
*/
|
|
51
|
+
getString(value: any): string;
|
|
52
|
+
/**
|
|
53
|
+
* Extracts the numeric value from a string.
|
|
54
|
+
*
|
|
55
|
+
* @param {*} text - The text to extract numeric value from
|
|
56
|
+
* @returns {number} The numeric value or 0
|
|
57
|
+
*/
|
|
21
58
|
getValue(text: any): number;
|
|
59
|
+
/**
|
|
60
|
+
* Determines if the animation value is increasing or decreasing.
|
|
61
|
+
*
|
|
62
|
+
* @param {*} endValue - The end value to check against
|
|
63
|
+
* @returns {boolean} True if increasing, false if decreasing
|
|
64
|
+
*/
|
|
22
65
|
isIncreasing(endValue: any): boolean;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Calculates the combined value for += or -= operations.
|
|
68
|
+
*
|
|
69
|
+
* @param {number} delta - The delta value (0-1) representing animation progress
|
|
70
|
+
* @returns {number} The calculated combined value
|
|
71
|
+
*/
|
|
72
|
+
combindValue(delta: number): number;
|
|
73
|
+
/**
|
|
74
|
+
* Calculates the value based on the difference between start and end.
|
|
75
|
+
*
|
|
76
|
+
* @param {number} delta - The delta value (0-1) representing animation progress
|
|
77
|
+
* @returns {number} The calculated value
|
|
78
|
+
*/
|
|
79
|
+
calcValue(delta: number): number;
|
|
80
|
+
/**
|
|
81
|
+
* Calculates the step value for the current animation frame.
|
|
82
|
+
*
|
|
83
|
+
* @param {number} delta - The delta value (0-1) representing animation progress
|
|
84
|
+
* @returns {number} The calculated step value
|
|
85
|
+
*/
|
|
86
|
+
step(delta: number): number;
|
|
87
|
+
/**
|
|
88
|
+
* Updates the value based on the animation delta.
|
|
89
|
+
*
|
|
90
|
+
* @param {number} delta - The delta value (0-1) representing animation progress
|
|
91
|
+
* @returns {string} The updated value with units
|
|
92
|
+
*/
|
|
93
|
+
update(delta: number): string;
|
|
94
|
+
/**
|
|
95
|
+
* Increases a value by the given step.
|
|
96
|
+
*
|
|
97
|
+
* @param {object} value - The value object containing start and units
|
|
98
|
+
* @param {number} step - The step amount to add
|
|
99
|
+
* @returns {string} The increased value with units
|
|
100
|
+
*/
|
|
101
|
+
increaseValue(value: object, step: number): string;
|
|
102
|
+
/**
|
|
103
|
+
* Decreases a value by the given step.
|
|
104
|
+
*
|
|
105
|
+
* @param {object} value - The value object containing start and units
|
|
106
|
+
* @param {number} step - The step amount to subtract
|
|
107
|
+
* @returns {string} The decreased value with units
|
|
108
|
+
*/
|
|
109
|
+
decreaseValue(value: object, step: number): string;
|
|
110
|
+
/**
|
|
111
|
+
* Applies the step to the value (increase or decrease).
|
|
112
|
+
*
|
|
113
|
+
* @param {object} value - The value object
|
|
114
|
+
* @param {number} step - The step amount
|
|
115
|
+
* @returns {string} The updated value with units
|
|
116
|
+
*/
|
|
117
|
+
applyStep(value: object, step: number): string;
|
|
30
118
|
}
|
|
@@ -30,9 +30,9 @@ export class Component extends Unit {
|
|
|
30
30
|
*/
|
|
31
31
|
stateResumed: boolean;
|
|
32
32
|
/**
|
|
33
|
-
* @
|
|
33
|
+
* @type {string|null} stateTargetId // optional override of state id
|
|
34
34
|
*/
|
|
35
|
-
stateTargetId:
|
|
35
|
+
stateTargetId: string | null;
|
|
36
36
|
/**
|
|
37
37
|
* This will set the data.
|
|
38
38
|
*
|
|
@@ -49,18 +49,17 @@ export class Component extends Unit {
|
|
|
49
49
|
/**
|
|
50
50
|
* This will resume the component scope when persisting.
|
|
51
51
|
*
|
|
52
|
-
* @param {
|
|
52
|
+
* @param {{data: any, state: any, stateHelper: any, persistedChildren: any, id: string}} persistedLayout
|
|
53
53
|
* @returns {void}
|
|
54
54
|
*/
|
|
55
|
-
resumeScope(persistedLayout:
|
|
55
|
+
resumeScope(persistedLayout: {
|
|
56
|
+
data: any;
|
|
57
|
+
state: any;
|
|
58
|
+
stateHelper: any;
|
|
59
|
+
persistedChildren: any;
|
|
60
|
+
id: string;
|
|
61
|
+
}): void;
|
|
56
62
|
stateHelper: any;
|
|
57
|
-
/**
|
|
58
|
-
* This will initialize the component.
|
|
59
|
-
*
|
|
60
|
-
* @protected
|
|
61
|
-
* @returns {object}
|
|
62
|
-
*/
|
|
63
|
-
protected initialize(): object;
|
|
64
63
|
/**
|
|
65
64
|
* This will setup the state target.
|
|
66
65
|
*
|
|
@@ -131,7 +130,7 @@ export class Component extends Unit {
|
|
|
131
130
|
* This will setup the events.
|
|
132
131
|
*
|
|
133
132
|
* @protected
|
|
134
|
-
* @returns {
|
|
133
|
+
* @returns {Array<Array<any>>}
|
|
135
134
|
*
|
|
136
135
|
* @example
|
|
137
136
|
* return [
|
|
@@ -139,7 +138,7 @@ export class Component extends Unit {
|
|
|
139
138
|
* ['click', this.element, function(e){}, false]
|
|
140
139
|
* ];
|
|
141
140
|
*/
|
|
142
|
-
protected setupEvents(): any
|
|
141
|
+
protected setupEvents(): Array<Array<any>>;
|
|
143
142
|
/**
|
|
144
143
|
* This will add the events.
|
|
145
144
|
*
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export class EventHelper {
|
|
10
10
|
/**
|
|
11
|
-
* @
|
|
11
|
+
* @type {Array<object>} events
|
|
12
12
|
*/
|
|
13
|
-
events:
|
|
13
|
+
events: Array<object>;
|
|
14
14
|
/**
|
|
15
15
|
* This will add an array of events.
|
|
16
16
|
*
|
|
17
|
-
* @param {Array<Array
|
|
17
|
+
* @param {Array<Array<any>>} events
|
|
18
18
|
* @returns {void}
|
|
19
19
|
*/
|
|
20
|
-
addEvents(events: Array<any
|
|
20
|
+
addEvents(events: Array<Array<any>>): void;
|
|
21
21
|
/**
|
|
22
22
|
* This will add an event.
|
|
23
23
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function parseArgs(args: any
|
|
1
|
+
export function parseArgs(args: Array<any>): object;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function Pod(callBack: Function, extend?: typeof Component): typeof Component;
|
|
1
|
+
export function Pod(callBack: Function, extend?: typeof Component): typeof Component | null;
|
|
2
2
|
import { Component } from './component.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export function DefaultProps(): object;
|
|
2
2
|
export function StringProp(value: string): object;
|
|
3
|
-
export function ArrayProp(value: any
|
|
4
|
-
export function ObjectProp(args: any
|
|
3
|
+
export function ArrayProp(value: Array<any>): object;
|
|
4
|
+
export function ObjectProp(args: Array<any>): object;
|