@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,281 @@
1
+ /**
2
+ * Unit
3
+ *
4
+ * @class
5
+ *
6
+ * This will allow units to be extended
7
+ * from a single factory.
8
+ *
9
+ * @example
10
+ * class Alert extends Unit
11
+ * {
12
+ * render()
13
+ * {
14
+ * return {
15
+ *
16
+ * };
17
+ * }
18
+ * }
19
+ */
20
+ export class Unit {
21
+ /**
22
+ * This will create a unit.
23
+ *
24
+ * @constructor
25
+ * @param {array} args
26
+ */
27
+ constructor(...args: any[]);
28
+ /**
29
+ * @member {boolean} isUnit
30
+ */
31
+ isUnit: boolean;
32
+ /**
33
+ * @member {?object} data
34
+ */
35
+ data: any;
36
+ /**
37
+ * @member {boolean} persist
38
+ */
39
+ persist: boolean;
40
+ /**
41
+ * @member {?array} children
42
+ */
43
+ children: any;
44
+ /**
45
+ * @member {?array} nest
46
+ */
47
+ nest: any;
48
+ /**
49
+ * @member {?object} state
50
+ */
51
+ state: any;
52
+ /**
53
+ * @member {?object} panel
54
+ */
55
+ panel: any;
56
+ /**
57
+ * @member {?object} parent
58
+ */
59
+ parent: any;
60
+ rendered: boolean;
61
+ container: any;
62
+ /**
63
+ * This will setup the component number and unique
64
+ * instance id for the component elements.
65
+ *
66
+ * @protected
67
+ * @returns {void}
68
+ */
69
+ protected init(): void;
70
+ id: string;
71
+ /**
72
+ * This will setup the component props.
73
+ *
74
+ * @param {object} [props]
75
+ * @returns {void}
76
+ */
77
+ setupProps(props?: object): void;
78
+ /**
79
+ * This will get the parent context.
80
+ *
81
+ * @returns {object|null}
82
+ */
83
+ getParentContext(): object | null;
84
+ /**
85
+ * This will set up the context.
86
+ *
87
+ * @returns {void}
88
+ */
89
+ setupContext(): void;
90
+ context: any;
91
+ /**
92
+ * This will set up the adding context.
93
+ *
94
+ * @returns {void}
95
+ */
96
+ setupAddingContext(): void;
97
+ addingContext: boolean;
98
+ contextBranchName: any;
99
+ /**
100
+ * This will add a branch to the context.
101
+ *
102
+ * @protected
103
+ * @param {string} branchName
104
+ * @param {*} value
105
+ * @returns {void}
106
+ */
107
+ protected addContextBranch(branchName: string, value: any): void;
108
+ /**
109
+ * This will set the component context.
110
+ *
111
+ * @param {object|null} context
112
+ * @returns {object|null}
113
+ */
114
+ setContext(context: object | null): object | null;
115
+ /**
116
+ * This will add context to the parent context.
117
+ *
118
+ * @param {object|null} context
119
+ * @returns {array|null}
120
+ */
121
+ addContext(context: object | null): any[] | null;
122
+ /**
123
+ * This will remove the added context from the parent.
124
+ *
125
+ * @protected
126
+ * @returns {void}
127
+ */
128
+ protected removeContext(): void;
129
+ /**
130
+ * This will remove a context branch.
131
+ *
132
+ * @protected
133
+ * @param {string} branch
134
+ * @returns {void}
135
+ */
136
+ protected removeContextBranch(branch: string): void;
137
+ /**
138
+ * This will get the context.
139
+ *
140
+ * @protected
141
+ * @returns {object|null}
142
+ */
143
+ protected getContext(): object | null;
144
+ /**
145
+ * override this to do something when created.
146
+ *
147
+ * @returns {void}
148
+ */
149
+ onCreated(): void;
150
+ /**
151
+ * This will render the component.
152
+ *
153
+ * @returns {object}
154
+ */
155
+ render(): object;
156
+ /**
157
+ * This will cache the layout panel and set the main id.
158
+ * @param {object} layout
159
+ * @returns {object}
160
+ */
161
+ _cacheRoot(layout: object): object;
162
+ /**
163
+ * This will create the component layout.
164
+ *
165
+ * @protected
166
+ * @returns {object}
167
+ */
168
+ protected _createLayout(): object;
169
+ _layout: any;
170
+ /**
171
+ * This will prepare the layout.
172
+ *
173
+ * @protected
174
+ * @returns {object}
175
+ */
176
+ protected prepareLayout(): object;
177
+ /**
178
+ * This will build the layout.
179
+ *
180
+ * @protected
181
+ * @returns {void}
182
+ */
183
+ protected afterBuild(): void;
184
+ /**
185
+ * This will activate the post build actions.
186
+ *
187
+ * @protected
188
+ * @returns {void}
189
+ */
190
+ protected afterLayout(): void;
191
+ /**
192
+ * This will render the content on condition of a property.
193
+ *
194
+ * @protected
195
+ * @param {*} prop
196
+ * @param {*} content
197
+ * @returns {object}
198
+ */
199
+ protected if(prop: any, content: any): object;
200
+ /**
201
+ * This will map an array to children elements.
202
+ *
203
+ * @protected
204
+ * @param {array} items
205
+ * @param {function} callBack
206
+ * @returns {array}
207
+ */
208
+ protected map(items: any[], callBack: Function): any[];
209
+ /**
210
+ * This will remove children from an element.
211
+ *
212
+ * @protected
213
+ * @param {object} ele
214
+ * @returns {object}
215
+ */
216
+ protected removeAll(ele: object): object;
217
+ /**
218
+ * This will get an id of the component or the full
219
+ * id that has the component id prepended to the
220
+ * requested id.
221
+ *
222
+ * @param {string} [id]
223
+ * @returns {string}
224
+ */
225
+ getId(id?: string): string;
226
+ /**
227
+ * This will initialize the component.
228
+ *
229
+ * @protected
230
+ * @returns {void}
231
+ */
232
+ protected initialize(): void;
233
+ /**
234
+ * override this to do something before setup.
235
+ *
236
+ * @protected
237
+ * @returns {void}
238
+ */
239
+ protected beforeSetup(): void;
240
+ /**
241
+ * override this to do something after setup.
242
+ *
243
+ * @protected
244
+ * @returns {void}
245
+ */
246
+ protected afterSetup(): void;
247
+ /**
248
+ * This will setup and render the component.
249
+ *
250
+ * @param {object} container
251
+ * @returns {void}
252
+ */
253
+ setup(container: object): void;
254
+ /**
255
+ * This will remove the component.
256
+ *
257
+ * @protected
258
+ * @returns {void}
259
+ */
260
+ protected remove(): void;
261
+ /**
262
+ * This will prepare the component to be destroyed.
263
+ *
264
+ * @protected
265
+ * @returns {void}
266
+ */
267
+ protected prepareDestroy(): void;
268
+ /**
269
+ * Override this to do something before destroy.
270
+ *
271
+ * @protected
272
+ * @returns {void}
273
+ */
274
+ protected beforeDestroy(): void;
275
+ /**
276
+ * This will destroy the component.
277
+ *
278
+ * @returns {void}
279
+ */
280
+ destroy(): void;
281
+ }
@@ -0,0 +1 @@
1
+ export function setupAttrSettings(settings: object): object;
@@ -0,0 +1,259 @@
1
+ /**
2
+ * BasicData
3
+ *
4
+ * This will create a bindable base class. This will
5
+ * allow shallow one level deep data to be created
6
+ * and watched.
7
+ *
8
+ * @class
9
+ */
10
+ export class BasicData {
11
+ /**
12
+ * This will create a basic data object.
13
+ *
14
+ * @constructor
15
+ * @param {object} [settings]
16
+ */
17
+ constructor(settings?: object);
18
+ dirty: boolean;
19
+ links: {};
20
+ /**
21
+ * @member {string} dataTypeId
22
+ */
23
+ dataTypeId: string;
24
+ eventSub: DataPubSub;
25
+ /**
26
+ * This will setup the data object.
27
+ *
28
+ * @protected
29
+ * @returns {void}
30
+ */
31
+ protected setup(): void;
32
+ stage: {};
33
+ /**
34
+ * This will setup the number and unique id of the data object.
35
+ *
36
+ * @protected
37
+ * @returns {void}
38
+ */
39
+ protected _init(): void;
40
+ _dataNumber: number;
41
+ _id: string;
42
+ _dataId: string;
43
+ /**
44
+ * This will get the data id.
45
+ *
46
+ * @returns {string}
47
+ */
48
+ getDataId(): string;
49
+ /**
50
+ * This is a placeholder.
51
+ *
52
+ * @returns {void}
53
+ */
54
+ remove(): void;
55
+ /**
56
+ * This will setup a one way bind.
57
+ *
58
+ * @param {string} attrName
59
+ * @param {function} callBack
60
+ * @returns {string} The subscription token.
61
+ */
62
+ on(attrName: string, callBack: Function): string;
63
+ /**
64
+ * This will unbind from a one way bind.
65
+ *
66
+ * @param {string} attrName
67
+ * @param {string} token
68
+ * @returns {void}
69
+ */
70
+ off(attrName: string, token: string): void;
71
+ /**
72
+ * This will set the attribute value.
73
+ *
74
+ * @protected
75
+ * @param {string} attr
76
+ * @param {*} val
77
+ * @param {object} committer
78
+ * @param {boolean} stopMerge
79
+ * @returns {void}
80
+ */
81
+ protected _setAttr(attr: string, val: any, committer?: object, stopMerge?: boolean): void;
82
+ /**
83
+ * This will publish an update to the data binder.
84
+ *
85
+ * @protected
86
+ * @param {string} attr
87
+ * @param {*} val
88
+ * @param {*} committer
89
+ * @param {*} prevValue
90
+ * @returns {void}
91
+ */
92
+ protected _publish(attr: string, val: any, committer: any, prevValue: any): void;
93
+ /**
94
+ * This will set the data value of an attribute or attributes.
95
+ *
96
+ * @overload
97
+ * @param {string} key
98
+ * @param {*} value
99
+ * @param {object} [committer]
100
+ *
101
+ * @overload
102
+ * @param {object} data
103
+ * @returns {object} this
104
+ */
105
+ set(key: string, value: any, committer?: object): any;
106
+ /**
107
+ * This will set the data value of an attribute or attributes.
108
+ *
109
+ * @overload
110
+ * @param {string} key
111
+ * @param {*} value
112
+ * @param {object} [committer]
113
+ *
114
+ * @overload
115
+ * @param {object} data
116
+ * @returns {object} this
117
+ */
118
+ set(data: object): object;
119
+ /**
120
+ * This will get the model data.
121
+ *
122
+ * @protected
123
+ * @returns {object}
124
+ */
125
+ protected getModelData(): object;
126
+ /**
127
+ * This will delete an attribute.
128
+ *
129
+ * @protected
130
+ * @param {object} obj
131
+ * @param {string} attr
132
+ * @returns {void}
133
+ */
134
+ protected _deleteAttr(obj: object, attr: string): void;
135
+ /**
136
+ * This will toggle a bool attribute.
137
+ *
138
+ * @param {string} attr
139
+ * @returns {object} this
140
+ */
141
+ toggle(attr: string): object;
142
+ /**
143
+ * This will increment an attribute.
144
+ *
145
+ * @param {string} attr
146
+ * @returns {object} this
147
+ */
148
+ increment(attr: string): object;
149
+ /**
150
+ * This will decrement an attribute.
151
+ *
152
+ * @param {string} attr
153
+ * @returns {object} this
154
+ */
155
+ decrement(attr: string): object;
156
+ /**
157
+ * This will concat an attribute.
158
+ *
159
+ * @param {string} attr
160
+ * @returns {object} this
161
+ */
162
+ concat(attr: string, value: any): object;
163
+ /**
164
+ * This will set the key value if it is null.
165
+ *
166
+ * @param {string} key
167
+ * @param {*} value
168
+ * @returns {object} this
169
+ */
170
+ ifNull(key: string, value: any): object;
171
+ /**
172
+ * This will set the data local storage key.
173
+ *
174
+ * @param {string} key
175
+ * @returns {object} this
176
+ */
177
+ setKey(key: string): object;
178
+ key: string;
179
+ /**
180
+ * This will restore the data from local storage.
181
+ *
182
+ * @param {*} defaultValue
183
+ * @returns {object} this
184
+ */
185
+ resume(defaultValue: any): object;
186
+ /**
187
+ * This will store the data to the local stoage under
188
+ * the storage key.
189
+ *
190
+ * @returns {boolean}
191
+ */
192
+ store(): boolean;
193
+ /**
194
+ * This will delete a property value or the model data.
195
+ *
196
+ * @param {string} [attrName]
197
+ * @returns {*}
198
+ */
199
+ delete(attrName?: string): any;
200
+ /**
201
+ * This will get the value of an attribute.
202
+ *
203
+ * @protected
204
+ * @param {object} obj
205
+ * @param {string} attr
206
+ * @returns {*}
207
+ */
208
+ protected _getAttr(obj: object, attr: string): any;
209
+ /**
210
+ * This will get a property value or the model data.
211
+ *
212
+ * @param {string} [attrName]
213
+ * @returns {*}
214
+ */
215
+ get(attrName?: string): any;
216
+ /**
217
+ * This will link a data source property to another data source.
218
+ *
219
+ * @param {object} data
220
+ * @param {string|object} attr
221
+ * @param {string} alias
222
+ * @returns {string|array}
223
+ */
224
+ link(data: object, attr: string | object, alias: string, ...args: any[]): string | any[];
225
+ /**
226
+ * This will link a remote data source by property.
227
+ *
228
+ * @param {object} data
229
+ * @param {string} attr
230
+ * @param {string} [alias]
231
+ * @returns {string}
232
+ */
233
+ remoteLink(data: object, attr: string, alias?: string): string;
234
+ /**
235
+ * This will add a link token to the links array.
236
+ *
237
+ * @param {string} token
238
+ * @param {object} data
239
+ * @returns {void}
240
+ */
241
+ addLink(token: string, data: object): void;
242
+ /**
243
+ * This will remove a link or all links if no token is provided.
244
+ *
245
+ * @param {string} [token]
246
+ * @returns {void}
247
+ */
248
+ unlink(token?: string): void;
249
+ /**
250
+ * This will remove the linked subscription.
251
+ *
252
+ * @param {string} token
253
+ * @param {boolean} [removeFromLinks]
254
+ * @returns {void}
255
+ */
256
+ removeLink(token: string, removeFromLinks?: boolean): void;
257
+ isData: boolean;
258
+ }
259
+ import { DataPubSub } from '../data-binder/data-pub-sub.js';
@@ -0,0 +1 @@
1
+ export function DataProxy(data: object, root?: string): ProxyConstructor;
@@ -0,0 +1,17 @@
1
+ export namespace DataUtils {
2
+ let deepDataPattern: RegExp;
3
+ /**
4
+ * This will check if a string has deep data.
5
+ *
6
+ * @param {string} str
7
+ * @returns {boolean}
8
+ */
9
+ function hasDeepData(str: string): boolean;
10
+ /**
11
+ * This will get the deep data segments.
12
+ *
13
+ * @param {string} str
14
+ * @returns {array}
15
+ */
16
+ function getSegments(str: string): any[];
17
+ }
@@ -0,0 +1,3 @@
1
+ export { Data } from "./deep-data.js";
2
+ export { Model } from "./model.js";
3
+ export { SimpleData } from "./simple-data.js";