@base-framework/base 3.0.79 → 3.0.80

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.
Files changed (103) hide show
  1. package/dist/base.js +1 -1
  2. package/dist/base.js.map +3 -3
  3. package/dist/types/base.d.ts +25 -0
  4. package/dist/types/main/base.d.ts +94 -0
  5. package/dist/types/main/data-tracker/data-tracker.d.ts +93 -0
  6. package/dist/types/main/data-tracker/tracker-types.d.ts +23 -0
  7. package/dist/types/main/data-tracker/tracker.d.ts +56 -0
  8. package/dist/types/main/equals.d.ts +1 -0
  9. package/dist/types/main/events/event-methods.d.ts +124 -0
  10. package/dist/types/main/events/events.d.ts +208 -0
  11. package/dist/types/modules/ajax/ajax.d.ts +153 -0
  12. package/dist/types/modules/animation/animation.d.ts +79 -0
  13. package/dist/types/modules/animations/animation-controller.d.ts +61 -0
  14. package/dist/types/modules/animations/animation.d.ts +28 -0
  15. package/dist/types/modules/animations/attr-movement.d.ts +5 -0
  16. package/dist/types/modules/animations/css-movement.d.ts +8 -0
  17. package/dist/types/modules/animations/movement-factory.d.ts +34 -0
  18. package/dist/types/modules/animations/movement.d.ts +24 -0
  19. package/dist/types/modules/animations/value.d.ts +30 -0
  20. package/dist/types/modules/atom/atom.d.ts +1 -0
  21. package/dist/types/modules/atom/atoms.d.ts +343 -0
  22. package/dist/types/modules/component/component.d.ts +99 -0
  23. package/dist/types/modules/component/event-helper.d.ts +59 -0
  24. package/dist/types/modules/component/jot.d.ts +1 -0
  25. package/dist/types/modules/component/parse-args.d.ts +1 -0
  26. package/dist/types/modules/component/state-helper.d.ts +102 -0
  27. package/dist/types/modules/component/unit.d.ts +281 -0
  28. package/dist/types/modules/data/attrs.d.ts +1 -0
  29. package/dist/types/modules/data/basic-data.d.ts +259 -0
  30. package/dist/types/modules/data/data-proxy.d.ts +1 -0
  31. package/dist/types/modules/data/data-utils.d.ts +17 -0
  32. package/dist/types/modules/data/data.d.ts +3 -0
  33. package/dist/types/modules/data/deep-data.d.ts +162 -0
  34. package/dist/types/modules/data/model-service.d.ts +280 -0
  35. package/dist/types/modules/data/model.d.ts +33 -0
  36. package/dist/types/modules/data/simple-data.d.ts +12 -0
  37. package/dist/types/modules/data-binder/connection-tracker/connection-tracker.d.ts +45 -0
  38. package/dist/types/modules/data-binder/connection-tracker/connections/connection.d.ts +15 -0
  39. package/dist/types/modules/data-binder/connection-tracker/connections/one-way-connection.d.ts +23 -0
  40. package/dist/types/modules/data-binder/connection-tracker/connections/two-way-connection.d.ts +62 -0
  41. package/dist/types/modules/data-binder/data-binder.d.ts +175 -0
  42. package/dist/types/modules/data-binder/data-pub-sub.d.ts +66 -0
  43. package/dist/types/modules/data-binder/sources/data-source.d.ts +51 -0
  44. package/dist/types/modules/data-binder/sources/element-source.d.ts +84 -0
  45. package/dist/types/modules/data-binder/sources/one-way-source.d.ts +33 -0
  46. package/dist/types/modules/data-binder/sources/source.d.ts +26 -0
  47. package/dist/types/modules/data-binder/sources/two-way-source.d.ts +42 -0
  48. package/dist/types/modules/date/date-time.d.ts +165 -0
  49. package/dist/types/modules/history/history.d.ts +10 -0
  50. package/dist/types/modules/html/html.d.ts +136 -0
  51. package/dist/types/modules/import/import.d.ts +1 -0
  52. package/dist/types/modules/layout/builder.d.ts +102 -0
  53. package/dist/types/modules/layout/directives/core/aria/aria.d.ts +2 -0
  54. package/dist/types/modules/layout/directives/core/context/context-directives.d.ts +3 -0
  55. package/dist/types/modules/layout/directives/core/default-directives.d.ts +1 -0
  56. package/dist/types/modules/layout/directives/core/dom-methods.d.ts +1 -0
  57. package/dist/types/modules/layout/directives/core/parent/parent-directives.d.ts +5 -0
  58. package/dist/types/modules/layout/directives/core/reactive/bind.d.ts +1 -0
  59. package/dist/types/modules/layout/directives/core/reactive/for-each.d.ts +1 -0
  60. package/dist/types/modules/layout/directives/core/reactive/get-parent-data.d.ts +1 -0
  61. package/dist/types/modules/layout/directives/core/reactive/map.d.ts +1 -0
  62. package/dist/types/modules/layout/directives/core/reactive/on-created.d.ts +1 -0
  63. package/dist/types/modules/layout/directives/core/reactive/on-destroyed.d.ts +1 -0
  64. package/dist/types/modules/layout/directives/core/reactive/on-set.d.ts +1 -0
  65. package/dist/types/modules/layout/directives/core/reactive/on-state.d.ts +1 -0
  66. package/dist/types/modules/layout/directives/core/reactive/watch.d.ts +1 -0
  67. package/dist/types/modules/layout/directives/core/route.d.ts +1 -0
  68. package/dist/types/modules/layout/directives/core/switch.d.ts +1 -0
  69. package/dist/types/modules/layout/directives/directive.d.ts +1 -0
  70. package/dist/types/modules/layout/directives/directives.d.ts +25 -0
  71. package/dist/types/modules/layout/element/attribute-directive.d.ts +1 -0
  72. package/dist/types/modules/layout/element/attribute.d.ts +1 -0
  73. package/dist/types/modules/layout/element/element.d.ts +1 -0
  74. package/dist/types/modules/layout/element/parser.d.ts +65 -0
  75. package/dist/types/modules/layout/html-helper.d.ts +57 -0
  76. package/dist/types/modules/layout/render/browser-render.d.ts +10 -0
  77. package/dist/types/modules/layout/render/render-controller.d.ts +23 -0
  78. package/dist/types/modules/layout/render/render.d.ts +18 -0
  79. package/dist/types/modules/layout/render/server-render.d.ts +10 -0
  80. package/dist/types/modules/layout/watcher-helper.d.ts +103 -0
  81. package/dist/types/modules/mouse/mouse.d.ts +45 -0
  82. package/dist/types/modules/router/history/browser-history.d.ts +39 -0
  83. package/dist/types/modules/router/history/hash-history.d.ts +25 -0
  84. package/dist/types/modules/router/history/history-controller.d.ts +21 -0
  85. package/dist/types/modules/router/history/history.d.ts +35 -0
  86. package/dist/types/modules/router/nav-link.d.ts +37 -0
  87. package/dist/types/modules/router/router.d.ts +268 -0
  88. package/dist/types/modules/router/routes/component-helper.d.ts +75 -0
  89. package/dist/types/modules/router/routes/param-pattern.d.ts +2 -0
  90. package/dist/types/modules/router/routes/route-pattern.d.ts +1 -0
  91. package/dist/types/modules/router/routes/route.d.ts +120 -0
  92. package/dist/types/modules/router/set-title.d.ts +1 -0
  93. package/dist/types/modules/router/utils.d.ts +9 -0
  94. package/dist/types/modules/state/state-target.d.ts +45 -0
  95. package/dist/types/modules/state/state-tracker.d.ts +103 -0
  96. package/dist/types/shared/arrays.d.ts +26 -0
  97. package/dist/types/shared/dom.d.ts +272 -0
  98. package/dist/types/shared/encode/encode.d.ts +38 -0
  99. package/dist/types/shared/encode/json.d.ts +15 -0
  100. package/dist/types/shared/objects.d.ts +62 -0
  101. package/dist/types/shared/strings.d.ts +34 -0
  102. package/dist/types/shared/types.d.ts +52 -0
  103. package/package.json +5 -3
@@ -0,0 +1,153 @@
1
+ /**
2
+ * This will make an xhr (ajax) request.
3
+ *
4
+ * @overload
5
+ * @param {string} url
6
+ * @param {string} params
7
+ * @param {function} callBackFn
8
+ * @param {string} responseType
9
+ * @param {string} [method=POST]
10
+ * @param {boolean} async
11
+ *
12
+ * @overload
13
+ * @param {object} settings
14
+ * @example
15
+ * {
16
+ * url: '',
17
+ * params: '',
18
+ * completed(response)
19
+ * {
20
+ *
21
+ * }
22
+ * }
23
+ *
24
+ * @returns {object} xhr object.
25
+ */
26
+ export function Ajax(url: string, params: string, callBackFn: Function, responseType: string, method?: string, async: boolean): any;
27
+ /**
28
+ * This will make an xhr (ajax) request.
29
+ *
30
+ * @overload
31
+ * @param {string} url
32
+ * @param {string} params
33
+ * @param {function} callBackFn
34
+ * @param {string} responseType
35
+ * @param {string} [method=POST]
36
+ * @param {boolean} async
37
+ *
38
+ * @overload
39
+ * @param {object} settings
40
+ * @example
41
+ * {
42
+ * url: '',
43
+ * params: '',
44
+ * completed(response)
45
+ * {
46
+ *
47
+ * }
48
+ * }
49
+ *
50
+ * @returns {object} xhr object.
51
+ */
52
+ export function Ajax(settings: object): any;
53
+ /**
54
+ * XhrRequest
55
+ *
56
+ * This will create an xhr request object.
57
+ *
58
+ * @class
59
+ */
60
+ export class XhrRequest {
61
+ /**
62
+ * This will create an xhr request object.
63
+ *
64
+ * @constructor
65
+ * @param {*} args
66
+ */
67
+ constructor(args: any);
68
+ settings: any;
69
+ xhr: any;
70
+ /**
71
+ * This will setup the xhr request.
72
+ *
73
+ * @protected
74
+ * @param {*} args
75
+ * @returns {(object|boolean)}
76
+ */
77
+ protected setup(args: any): (object | boolean);
78
+ /**
79
+ * This will call all before send callbacks.
80
+ *
81
+ * @protected
82
+ * @returns {void}
83
+ */
84
+ protected beforeSend(): void;
85
+ /**
86
+ * This will convert an object to a string.
87
+ *
88
+ * @protected
89
+ * @param {object} object
90
+ * @returns {string}
91
+ */
92
+ protected objectToString(object: object): string;
93
+ /**
94
+ * This will add the base params to the request params.
95
+ *
96
+ * @protected
97
+ * @param {*} params
98
+ * @param {*} addingParams
99
+ * @returns {*}
100
+ */
101
+ protected setupParams(params: any, addingParams: any): any;
102
+ /**
103
+ * This will get the params.
104
+ *
105
+ * @protected
106
+ * @returns {*}
107
+ */
108
+ protected getParams(): any;
109
+ /**
110
+ * This will set the settings from the args.
111
+ *
112
+ * @protected
113
+ * @param {array} args
114
+ * @returns {void}
115
+ */
116
+ protected getXhrSettings(args: any[]): void;
117
+ /**
118
+ * This will create the xhr object.
119
+ *
120
+ * @protected
121
+ * @returns {(object|boolean)}
122
+ */
123
+ protected createXHR(): (object | boolean);
124
+ /**
125
+ * This will setup the request headers.
126
+ *
127
+ * @protected
128
+ * @returns {void}
129
+ */
130
+ protected setupHeaders(): void;
131
+ /**
132
+ * This will update the request status.
133
+ *
134
+ * @protected
135
+ * @param {object} e
136
+ * @param {string} [overrideType]
137
+ */
138
+ protected update(e: object, overrideType?: string): boolean;
139
+ /**
140
+ * This will get the response data.
141
+ *
142
+ * @protected
143
+ * @returns {*}
144
+ */
145
+ protected getResponseData(): any;
146
+ /**
147
+ * This will add the xhr events.
148
+ *
149
+ * @protected
150
+ * @returns {void}
151
+ */
152
+ protected addXhrEvents(): void;
153
+ }
@@ -0,0 +1,79 @@
1
+ export namespace animate {
2
+ namespace animating {
3
+ let objects: any[];
4
+ /**
5
+ * This will add an animation.
6
+ *
7
+ * @param {object} object
8
+ * @param {string} className
9
+ * @param {number} timer
10
+ */
11
+ function add(object: any, className: string, timer: number): void;
12
+ /**
13
+ * This will remove an animation from an element.
14
+ *
15
+ * @param {object} object
16
+ * @param {string|number} removeClass
17
+ */
18
+ function remove(object: any, removeClass: string | number): void;
19
+ /**
20
+ * This will stop an animation timer.
21
+ * @param {object} animation
22
+ */
23
+ function stopTimer(animation: any): void;
24
+ /**
25
+ * This will check if the element is animating.
26
+ * @param {object} obj
27
+ * @returns {array}
28
+ */
29
+ function checkAnimating(obj: any): any[];
30
+ /**
31
+ * This will stop previous animations still animating.
32
+ * @param {object} obj
33
+ */
34
+ function stopPreviousAnimations(obj: any): void;
35
+ /**
36
+ * This will reset the objects.
37
+ */
38
+ function reset(): void;
39
+ }
40
+ /**
41
+ * This will create an animation.
42
+ *
43
+ * @param {object} obj
44
+ * @param {string} animationClass
45
+ * @param {number} duration
46
+ * @param {function} callBack
47
+ * @param {function} endCallBack
48
+ * @returns {void}
49
+ */
50
+ function create(obj: any, animationClass: string, duration: number, callBack: Function, endCallBack: Function): void;
51
+ /**
52
+ * This will add an animation then hide the element.
53
+ *
54
+ * @param {object} object
55
+ * @param {string} animationClass
56
+ * @param {number} duration
57
+ * @param {function} endCallBack
58
+ * @returns {void}
59
+ */
60
+ function hide(object: any, animationClass: string, duration: number, endCallBack: Function): void;
61
+ /**
62
+ * This will add an animation then show the element.
63
+ *
64
+ * @param {object} object
65
+ * @param {string} animationClass
66
+ * @param {number} duration
67
+ * @param {function} endCallBack
68
+ */
69
+ function show(object: any, animationClass: string, duration: number, endCallBack: Function): void;
70
+ /**
71
+ * This will add an animation to the element.
72
+ *
73
+ * @param {object} object
74
+ * @param {string} animationClass
75
+ * @param {number} duration
76
+ * @param {function} endCallBack
77
+ */
78
+ function set(object: any, animationClass: string, duration: number, endCallBack: Function): void;
79
+ }
@@ -0,0 +1,61 @@
1
+ export class AnimationController {
2
+ constructor(settings: any, callBack: any);
3
+ delay: any;
4
+ delayTimer: number;
5
+ startTime: Date;
6
+ duration: any;
7
+ element: any;
8
+ status: string;
9
+ animation: Animation;
10
+ ease: any;
11
+ callBack: any;
12
+ fps: any;
13
+ setup(settings: any): this;
14
+ animationCallBack: any;
15
+ /**
16
+ * This will setup the animation.
17
+ *
18
+ * @param {object} element
19
+ * @param {object} settings
20
+ * @returns {void}
21
+ */
22
+ setupAnimation(element: object, settings: object): void;
23
+ /**
24
+ * This will start the animation.
25
+ *
26
+ * @returns {object}
27
+ */
28
+ start(): object;
29
+ timePassed: number;
30
+ progress: number;
31
+ timer: number;
32
+ /**
33
+ * This will stop the animation.
34
+ *
35
+ * @returns {object}
36
+ */
37
+ stop(): object;
38
+ /**
39
+ * This will get the element.
40
+ *
41
+ * @param {object} element
42
+ * @returns {object}
43
+ */
44
+ getElement(element: object): object;
45
+ /**
46
+ * This will get the delta.
47
+ *
48
+ * @param {number} t
49
+ * @returns {number}
50
+ */
51
+ delta(t: number): number;
52
+ /**
53
+ * This will animate the element.
54
+ */
55
+ animate(): void;
56
+ updateStatus(status: any): void;
57
+ checkCallBack(): void;
58
+ startTimer(): this;
59
+ stopTimer(): this;
60
+ }
61
+ import { Animation } from './animation.js';
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Class representing an animation.
3
+ */
4
+ export class Animation {
5
+ /**
6
+ * Create an animation.
7
+ * @param {HTMLElement} element - The element to animate.
8
+ * @param {Object} settings - The settings for the animation.
9
+ */
10
+ constructor(element: HTMLElement, settings: any);
11
+ element: HTMLElement;
12
+ movements: any[];
13
+ /**
14
+ * Setup the animation with the given settings.
15
+ * @param {Object} settings - The settings for the animation.
16
+ */
17
+ setup(settings: any): void;
18
+ /**
19
+ * Add a movement to the animation.
20
+ * @param {Object} property - The property to animate.
21
+ */
22
+ addMovement(property: any): void;
23
+ /**
24
+ * Setup the movements for the animation.
25
+ * @param {Object} settings - The settings for the animation.
26
+ */
27
+ setupMovements(settings: any): void;
28
+ }
@@ -0,0 +1,5 @@
1
+ export class AttrMovement extends Movement {
2
+ filter: any;
3
+ filterValue(value: any, ...args: any[]): any;
4
+ }
5
+ import { Movement } from './movement.js';
@@ -0,0 +1,8 @@
1
+ export class CssMovement extends Movement {
2
+ style: any;
3
+ getCssValue(text: any): any;
4
+ setMethod(method: any): void;
5
+ method: any;
6
+ updateValue(delta: any): any[];
7
+ }
8
+ import { Movement } from './movement.js';
@@ -0,0 +1,34 @@
1
+ /**
2
+ * MovementFactory
3
+ *
4
+ * This will create a movement.
5
+ *
6
+ * @class
7
+ */
8
+ export class MovementFactory {
9
+ /**
10
+ * This will setup the movement type.
11
+ *
12
+ * @param {object} element
13
+ * @param {object} settings
14
+ * @returns {object|null}
15
+ */
16
+ static setupMovementType(element: object, settings: object): object | null;
17
+ /**
18
+ * This will get the movement type.
19
+ *
20
+ * @param {object} element
21
+ * @param {object} settings
22
+ * @returns {string}
23
+ */
24
+ static getType(element: object, settings: object): string;
25
+ /**
26
+ * This will create a movement.
27
+ *
28
+ * @param {object} element
29
+ * @param {object} settings
30
+ * @returns {Movement}
31
+ */
32
+ static create(element: object, settings: object): Movement;
33
+ }
34
+ import { Movement } from './movement.js';
@@ -0,0 +1,24 @@
1
+ export class Movement {
2
+ constructor(element: any, settings: any);
3
+ element: any;
4
+ property: any;
5
+ value: any;
6
+ setup(settings: any): void;
7
+ /**
8
+ * This will create a value.
9
+ *
10
+ * @param {object} settings
11
+ * @returns {object}
12
+ */
13
+ createValue(settings: object): object;
14
+ getValue(settings: any): {
15
+ start: any;
16
+ end: any;
17
+ };
18
+ getStartValue(value: any, end: any): any;
19
+ getEndValue(text: any): any;
20
+ setupProperty(settings: any): void;
21
+ updateValue(delta: any): any;
22
+ step(delta: any): void;
23
+ update(value: any): void;
24
+ }
@@ -0,0 +1,30 @@
1
+ export class Value {
2
+ constructor(settings: any);
3
+ value: {
4
+ combining: boolean;
5
+ start: number;
6
+ end: number;
7
+ units: any;
8
+ difference: number;
9
+ };
10
+ setup(settings: any): void;
11
+ createValue(settings: any): {
12
+ combining: boolean;
13
+ start: number;
14
+ end: number;
15
+ units: any;
16
+ difference: number;
17
+ };
18
+ getUnits(text: any): any;
19
+ checkCombind(end: any): boolean;
20
+ getString(value: any): any;
21
+ getValue(text: any): number;
22
+ isIncreasing(endValue: any): boolean;
23
+ combindValue(delta: any): number;
24
+ calcValue(delta: any): number;
25
+ step(delta: any, ...args: any[]): any;
26
+ update(delta: any): any;
27
+ increaseValue(value: any, step: any): any;
28
+ decreaseValue(value: any, step: any): any;
29
+ applyStep(value: any, step: any, ...args: any[]): any;
30
+ }
@@ -0,0 +1 @@
1
+ export function Atom(callBack: Function): Function;