@base-framework/base 3.0.226 → 3.0.228

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.
@@ -1,8 +1,3 @@
1
- /**
2
- * This defines an object that can have arbitrary string keys.
3
- * @typedef {Object} Props
4
- * @property {any} [key] - Catch-all for dynamic props
5
- */
6
1
  /**
7
2
  * Component
8
3
  *
@@ -24,6 +19,13 @@
24
19
  * }
25
20
  */
26
21
  export class Component extends Unit {
22
+ /**
23
+ * This will create a component.
24
+ *
25
+ * @constructor
26
+ * @param {array} args
27
+ */
28
+ constructor(...args: any[]);
27
29
  /**
28
30
  * @param {boolean} isComponent
29
31
  */
@@ -150,15 +152,6 @@ export class Component extends Unit {
150
152
  */
151
153
  protected removeEvents(): void;
152
154
  }
153
- /**
154
- * This defines an object that can have arbitrary string keys.
155
- */
156
- export type Props = {
157
- /**
158
- * - Catch-all for dynamic props
159
- */
160
- key?: any;
161
- };
162
155
  import { Unit } from './unit.js';
163
156
  import { StateHelper } from './state-helper.js';
164
157
  import { EventHelper } from './event-helper.js';
@@ -1,13 +1 @@
1
- export function parseArgs(args: (Props | string | object[])[]): {
2
- props?: Props;
3
- children?: (string | object[]);
4
- };
5
- /**
6
- * This defines an object that can have arbitrary string keys.
7
- */
8
- export type Props = {
9
- /**
10
- * - Catch-all for dynamic props
11
- */
12
- key?: any;
13
- };
1
+ export function parseArgs(args: any[]): object;
@@ -1,13 +1,4 @@
1
1
  export function DefaultProps(): object;
2
2
  export function StringProp(value: string): object;
3
3
  export function ArrayProp(value: any[]): object;
4
- export function ObjectProp(args: (Props | string | object[])[]): object;
5
- /**
6
- * This defines an object that can have arbitrary string keys.
7
- */
8
- export type Props = {
9
- /**
10
- * - Catch-all for dynamic props
11
- */
12
- key?: any;
13
- };
4
+ export function ObjectProp(args: any[]): object;
@@ -22,14 +22,78 @@ export class Unit {
22
22
  * This will create a unit.
23
23
  *
24
24
  * @constructor
25
- * @param {...(Props|string|Array<object>)} args
26
- * An array of arguments that can be:
27
- * - A `Props` object
28
- * - A string child
29
- * - An array of child objects
30
- * etc.
25
+ * @overload
26
+ * @param {object} props
27
+ * @param {Array<object>} [children=[]] - An array of children
28
+ *
29
+ * @overload
30
+ * @param {Array<object>} [children=[]] - An array of children
31
+ *
32
+ * @overload
33
+ * @param {string} [children] - A child string
34
+ *
35
+ * @overload
36
+ * @param {object} props
37
+ * @param {string} [children] - A child string
38
+ */
39
+ constructor(props: object, children?: Array<object>);
40
+ /**
41
+ * This will create a unit.
42
+ *
43
+ * @constructor
44
+ * @overload
45
+ * @param {object} props
46
+ * @param {Array<object>} [children=[]] - An array of children
47
+ *
48
+ * @overload
49
+ * @param {Array<object>} [children=[]] - An array of children
50
+ *
51
+ * @overload
52
+ * @param {string} [children] - A child string
53
+ *
54
+ * @overload
55
+ * @param {object} props
56
+ * @param {string} [children] - A child string
31
57
  */
32
- constructor(...args: (Props | string | Array<object>)[]);
58
+ constructor(children?: Array<object>);
59
+ /**
60
+ * This will create a unit.
61
+ *
62
+ * @constructor
63
+ * @overload
64
+ * @param {object} props
65
+ * @param {Array<object>} [children=[]] - An array of children
66
+ *
67
+ * @overload
68
+ * @param {Array<object>} [children=[]] - An array of children
69
+ *
70
+ * @overload
71
+ * @param {string} [children] - A child string
72
+ *
73
+ * @overload
74
+ * @param {object} props
75
+ * @param {string} [children] - A child string
76
+ */
77
+ constructor(children?: string);
78
+ /**
79
+ * This will create a unit.
80
+ *
81
+ * @constructor
82
+ * @overload
83
+ * @param {object} props
84
+ * @param {Array<object>} [children=[]] - An array of children
85
+ *
86
+ * @overload
87
+ * @param {Array<object>} [children=[]] - An array of children
88
+ *
89
+ * @overload
90
+ * @param {string} [children] - A child string
91
+ *
92
+ * @overload
93
+ * @param {object} props
94
+ * @param {string} [children] - A child string
95
+ */
96
+ constructor(props: object, children?: string);
33
97
  /**
34
98
  * @member {boolean} isUnit
35
99
  */
@@ -45,7 +109,7 @@ export class Unit {
45
109
  /**
46
110
  * @member {?array} children
47
111
  */
48
- children: string | any[];
112
+ children: any;
49
113
  /**
50
114
  * @member {?array} nest
51
115
  */
@@ -73,13 +137,19 @@ export class Unit {
73
137
  */
74
138
  protected init(): void;
75
139
  id: string;
140
+ /**
141
+ * This will declare the component props.
142
+ *
143
+ * @returns {void}
144
+ */
145
+ declareProps(): void;
76
146
  /**
77
147
  * This will setup the component props.
78
148
  *
79
- * @param {Props} [props]
149
+ * @param {object} [props]
80
150
  * @returns {void}
81
151
  */
82
- setupProps(props?: Props): void;
152
+ setupProps(props?: object): void;
83
153
  /**
84
154
  * This will get the child scope instance of the component.
85
155
  *
@@ -297,12 +367,3 @@ export class Unit {
297
367
  */
298
368
  destroy(): void;
299
369
  }
300
- /**
301
- * This defines an object that can have arbitrary string keys.
302
- */
303
- export type Props = {
304
- /**
305
- * - Catch-all for dynamic props
306
- */
307
- key?: any;
308
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/base",
3
- "version": "3.0.226",
3
+ "version": "3.0.228",
4
4
  "description": "This is a javascript framework.",
5
5
  "main": "./dist/base.js",
6
6
  "type": "module",