@base-framework/base 3.0.509 → 3.5.1

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.
@@ -21,8 +21,9 @@ import { Objects } from './shared/objects.js';
21
21
  import { Pod } from './modules/component/pod.js';
22
22
  import { router } from './modules/router/router.js';
23
23
  import { SimpleData } from './modules/data/data.js';
24
- import { StateTracker as State } from './modules/state/state-tracker.js';
24
+ import { State } from './modules/state/state.js';
25
+ import { StateTracker as Store } from './modules/state/state-tracker.js';
25
26
  import { Strings } from './shared/strings.js';
26
27
  import { Types } from './shared/types.js';
27
28
  import { Unit } from './modules/component/unit.js';
28
- export { Ajax, Arrays, Atom, base, Builder, Component, Data, dataBinder, DataTracker, DateTime, Directives, Dom, Encode, EventMethods as Events, Html, Import, Jot, Model, NavLink, Objects, Pod, router, SimpleData, State, Strings, Types, Unit };
29
+ export { Ajax, Arrays, Atom, base, Builder, Component, Data, dataBinder, DataTracker, DateTime, Directives, Dom, Encode, EventMethods as Events, Html, Import, Jot, Model, NavLink, Objects, Pod, router, SimpleData, State, Store, Strings, Types, Unit };
@@ -0,0 +1 @@
1
+ export function data(ele: object, data: any, parent: object): void;
@@ -0,0 +1 @@
1
+ export function state(ele: object, data: any, parent: object): void;
@@ -26,6 +26,16 @@ export class BrowserRender extends Render {
26
26
  * @returns {void}
27
27
  */
28
28
  protected createElement(obj: object, container: object, parent?: object): void;
29
+ /**
30
+ * This will create a temporary component for data/state
31
+ * bindings in the layout.
32
+ *
33
+ * @param {object} obj
34
+ * @param {object} container
35
+ * @param {object} parent
36
+ * @returns {void}
37
+ */
38
+ createTempComponent(obj: object, container: object, parent: object): void;
29
39
  /**
30
40
  * This will handle an attr directive.
31
41
  *
@@ -5,9 +5,9 @@
5
5
  * of an object.
6
6
  *
7
7
  * @class
8
- * @augments SimpleData
8
+ * @augments State
9
9
  */
10
- export class StateTarget extends SimpleData {
10
+ export class StateTarget extends State {
11
11
  /**
12
12
  * This will create a state target.
13
13
  *
@@ -16,30 +16,5 @@ export class StateTarget extends SimpleData {
16
16
  */
17
17
  constructor(id: string);
18
18
  id: string;
19
- /**
20
- * This will add an action to the target.
21
- *
22
- * @param {string} action
23
- * @param {*} state
24
- * @returns {void}
25
- */
26
- addAction(action: string, state: any): void;
27
- /**
28
- * This will get the state of an action.
29
- *
30
- * @param {string} action
31
- * @returns {*}
32
- */
33
- getState(action: string): any;
34
- /**
35
- * This will remove an action or a callBack
36
- * from an action. if no token is passed the
37
- * whole action is removed.
38
- *
39
- * @param {string} action
40
- * @param {string} [token]
41
- * @returns {void}
42
- */
43
- removeAction(action: string, token?: string): void;
44
19
  }
45
- import { SimpleData } from '../data/data.js';
20
+ import { State } from './state.js';
@@ -0,0 +1,37 @@
1
+ /**
2
+ * State
3
+ *
4
+ * This will create a state to track the state
5
+ * of an object.
6
+ *
7
+ * @class
8
+ * @augments SimpleData
9
+ */
10
+ export class State extends SimpleData {
11
+ /**
12
+ * This will add an action to the state.
13
+ *
14
+ * @param {string} action
15
+ * @param {*} state
16
+ * @returns {void}
17
+ */
18
+ addAction(action: string, state: any): void;
19
+ /**
20
+ * This will get the state of an action.
21
+ *
22
+ * @param {string} action
23
+ * @returns {*}
24
+ */
25
+ getState(action: string): any;
26
+ /**
27
+ * This will remove an action or a callBack
28
+ * from an action. if no token is passed the
29
+ * whole action is removed.
30
+ *
31
+ * @param {string} action
32
+ * @param {string} [token]
33
+ * @returns {void}
34
+ */
35
+ removeAction(action: string, token?: string): void;
36
+ }
37
+ import { SimpleData } from '../data/data.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/base",
3
- "version": "3.0.509",
3
+ "version": "3.5.1",
4
4
  "description": "This is a javascript framework.",
5
5
  "main": "./dist/base.js",
6
6
  "type": "module",