@componyx/ui 0.0.0-stage → 1.0.3
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/AppSkin/AppSkin.css +1268 -0
- package/AppSkin/AppSkin.js +2748 -0
- package/AppSkin/Themes/Default.css +241 -0
- package/Base/Base.js +3407 -0
- package/Base/ComponentIcons.css +66 -0
- package/Base/Font/ComponentIcons.woff +0 -0
- package/Base/Font/UI.woff +0 -0
- package/Base/Library.js +8432 -0
- package/Base/NavigationManager.js +462 -0
- package/Base/ResponsiveTemplates.js +371 -0
- package/Base/Sanitizer.js +288 -0
- package/Base/Themes/Default.css +255 -0
- package/Base/UI.css +618 -0
- package/Base/UIResourcePath.js +6 -0
- package/Bindary/Bindary.js +2011 -0
- package/Bindary/Modules/Connection.js +216 -0
- package/Bindary/Modules/Core.js +854 -0
- package/Bindary/Modules/DataUpdater.js +351 -0
- package/Bindary/Modules/ExpressionEngine.js +347 -0
- package/Bindary/Modules/ProxyManager.js +482 -0
- package/Bindary/Modules/Renderer.js +605 -0
- package/Bindary/Modules/Router.js +291 -0
- package/Bindary/Modules/Scroller.js +89 -0
- package/Bindary/Modules/Template.js +1273 -0
- package/BookmarkSpy/BookmarkSpy.js +430 -0
- package/Box/Box.css +36 -0
- package/Box/Box.js +1685 -0
- package/Button/Button.css +470 -0
- package/Button/Button.js +1398 -0
- package/Button/Themes/Default.css +200 -0
- package/Carousel/Carousel.css +273 -0
- package/Carousel/Carousel.js +607 -0
- package/ColorButton/ColorButton.css +39 -0
- package/ColorButton/ColorButton.js +336 -0
- package/ColorPicker/ColorPicker.css +359 -0
- package/ColorPicker/ColorPicker.js +972 -0
- package/ComboBox/ComboBox.css +357 -0
- package/ComboBox/ComboBox.js +2342 -0
- package/ComboBox/Themes/Default.css +23 -0
- package/DataPager/DataPager.css +72 -0
- package/DataPager/DataPager.js +674 -0
- package/DatePicker/DatePicker.css +227 -0
- package/DatePicker/DatePicker.js +1531 -0
- package/DatePicker/Themes/Default.css +26 -0
- package/Dialog/Dialog.css +106 -0
- package/Dialog/Dialog.js +572 -0
- package/Dialog/Themes/Default.css +10 -0
- package/Editor/Data/Emoji.json +8285 -0
- package/Editor/Data/Special.json +1042 -0
- package/Editor/Editor.css +1562 -0
- package/Editor/Editor.js +4058 -0
- package/Editor/Font/Editor.woff +0 -0
- package/Editor/Modules/ComponentFactory.js +565 -0
- package/Editor/Modules/ContentManager.js +748 -0
- package/Editor/Modules/DialogManager.js +1234 -0
- package/Editor/Modules/EventManager.js +458 -0
- package/Editor/Modules/Format.js +950 -0
- package/Editor/Modules/History.js +191 -0
- package/Editor/Modules/LayoutState.js +379 -0
- package/Editor/Modules/ListManager.js +296 -0
- package/Editor/Modules/MenuManager.js +388 -0
- package/Editor/Modules/NodeManager.js +681 -0
- package/Editor/Modules/ParagraphButtons.js +122 -0
- package/Editor/Modules/Resizer.js +176 -0
- package/Editor/Modules/SelectionRange.js +564 -0
- package/Editor/Modules/SourceViewBuilder.js +212 -0
- package/Editor/Modules/SymbolPicker.js +208 -0
- package/Editor/Modules/Table.js +2327 -0
- package/Editor/Modules/TableDialog.js +757 -0
- package/Editor/Modules/Toolbar.js +375 -0
- package/Editor/Modules/TooltipMenu.js +125 -0
- package/Editor/Modules/Utility.js +131 -0
- package/Editor/Themes/Default.css +204 -0
- package/FileUpload/FileUpload.css +156 -0
- package/FileUpload/FileUpload.js +898 -0
- package/FileUpload/Themes/Default.css +17 -0
- package/Form/Form.css +1934 -0
- package/Form/Form.js +4943 -0
- package/Form/Modules/ActionManager.js +368 -0
- package/Form/Modules/BuildPanelManager.js +319 -0
- package/Form/Modules/ComponentFactory.js +468 -0
- package/Form/Modules/ComponentPanel.js +265 -0
- package/Form/Modules/ConfigPanelManager.js +685 -0
- package/Form/Modules/DataObserver.js +717 -0
- package/Form/Modules/Databinder.js +602 -0
- package/Form/Modules/Draggable.js +756 -0
- package/Form/Modules/OptionsPanel.js +342 -0
- package/Form/Modules/Renderer.js +1889 -0
- package/Form/Modules/RuleEngine.js +585 -0
- package/Form/Modules/RulesPanel.js +1158 -0
- package/Form/Modules/Types.js +1709 -0
- package/Form/Modules/ValidationManager.js +194 -0
- package/Form/Themes/Default.css +216 -0
- package/FormField/FormField.css +468 -0
- package/FormField/FormField.js +576 -0
- package/FormField/Themes/Default.css +99 -0
- package/Grid/Grid.css +544 -0
- package/Grid/Grid.js +3761 -0
- package/Grid/Themes/Default.css +43 -0
- package/LICENSE +126 -0
- package/MaskedTextBox/MaskedTextBox.css +28 -0
- package/MaskedTextBox/MaskedTextBox.js +642 -0
- package/MaskedTextBox/Themes/Default.css +6 -0
- package/Menu/Menu.css +328 -0
- package/Menu/Menu.js +2386 -0
- package/Menu/Themes/Default.css +24 -0
- package/NumericBox/NumericBox.css +120 -0
- package/NumericBox/NumericBox.js +984 -0
- package/PanelBar/PanelBar.css +123 -0
- package/PanelBar/PanelBar.js +505 -0
- package/PanelBar/Themes/Default.css +51 -0
- package/PieChart/PieChart.css +95 -0
- package/PieChart/PieChart.js +820 -0
- package/PieChart/Themes/Default.css +9 -0
- package/README.md +178 -3
- package/Slider/Slider.css +348 -0
- package/Slider/Slider.js +1306 -0
- package/Slider/Themes/Default.css +44 -0
- package/TabStrip/TabStrip.css +52 -0
- package/TabStrip/TabStrip.js +362 -0
- package/TabStrip/Themes/Default.css +35 -0
- package/TimePicker/Themes/Default.css +30 -0
- package/TimePicker/TimePicker.css +253 -0
- package/TimePicker/TimePicker.js +1485 -0
- package/TooltipManager/Themes/Default.css +21 -0
- package/TooltipManager/TooltipManager.css +227 -0
- package/TooltipManager/TooltipManager.js +791 -0
- package/Validator/Validator.css +54 -0
- package/Validator/Validator.js +2508 -0
- package/componyx.html-data.json +619 -0
- package/index.js +27 -0
- package/package.json +43 -4
- package/types/AppSkin.d.ts +842 -0
- package/types/Base.d.ts +1034 -0
- package/types/Bindary.d.ts +1196 -0
- package/types/BookmarkSpy.d.ts +112 -0
- package/types/Box.d.ts +374 -0
- package/types/Button.d.ts +455 -0
- package/types/Carousel.d.ts +136 -0
- package/types/ColorButton.d.ts +120 -0
- package/types/ColorPicker.d.ts +225 -0
- package/types/ComboBox.d.ts +507 -0
- package/types/DataPager.d.ts +152 -0
- package/types/DatePicker.d.ts +354 -0
- package/types/Dialog.d.ts +160 -0
- package/types/Editor.d.ts +1289 -0
- package/types/FileUpload.d.ts +206 -0
- package/types/Form.d.ts +3078 -0
- package/types/FormField.d.ts +204 -0
- package/types/Grid.d.ts +911 -0
- package/types/Library.d.ts +1899 -0
- package/types/MaskedTextBox.d.ts +91 -0
- package/types/Menu.d.ts +577 -0
- package/types/NumericBox.d.ts +310 -0
- package/types/PanelBar.d.ts +223 -0
- package/types/PieChart.d.ts +224 -0
- package/types/ResponsiveTemplates.d.ts +108 -0
- package/types/Slider.d.ts +227 -0
- package/types/TabStrip.d.ts +185 -0
- package/types/TimePicker.d.ts +265 -0
- package/types/TooltipManager.d.ts +178 -0
- package/types/UI.d.ts +29 -0
- package/types/Validator.d.ts +653 -0
- package/types/index.d.ts +59 -0
- package/ui.css +11783 -0
- package/ui.js +79477 -0
- package/ui.min.css +138 -0
- package/ui.min.js +264 -0
- package/ui.min.js.map +1 -0
|
@@ -0,0 +1,1196 @@
|
|
|
1
|
+
declare namespace componyx
|
|
2
|
+
{
|
|
3
|
+
/**
|
|
4
|
+
* <p>Namespace for bindary modules.</p>
|
|
5
|
+
*/
|
|
6
|
+
namespace bindary_modules
|
|
7
|
+
{
|
|
8
|
+
/**
|
|
9
|
+
* <p>Promise that resolves when all bindary modules are loaded asynchronously.</p>
|
|
10
|
+
*/
|
|
11
|
+
var loaded: Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* <p>Bindary ($bindary) is a highly flexible data-binding framework for developing web applications. It utilizes declarative HTML templates based on data-attributes to bind the DOM- to the -JavaScript world.</p>
|
|
16
|
+
*/
|
|
17
|
+
namespace bindary
|
|
18
|
+
{
|
|
19
|
+
/**
|
|
20
|
+
* <p>The data request is a JSON serialized object sent to the backend data server.</p>
|
|
21
|
+
* @property [clientId] - <p>The id of the active client.</p>
|
|
22
|
+
* @property routeIndex - <p>The index of the active route.</p>
|
|
23
|
+
* @property routePath - <p>The path of the active route.</p>
|
|
24
|
+
* @property serverMethod - <p>A class type and static method (dot separated) to call on the server when executing the data request. Requires the .NET server-side Bindary framework.</p>
|
|
25
|
+
* @property callbackId - <p>The identifier of the client callback method to invoke when the data request has finished.</p>
|
|
26
|
+
* @property initialLoad - <p>A value indicating if this is the route's initial load.</p>
|
|
27
|
+
* @property data - <p>The custom data object.</p>
|
|
28
|
+
*/
|
|
29
|
+
type dataRequestType = {
|
|
30
|
+
clientId?: string;
|
|
31
|
+
routeIndex: number;
|
|
32
|
+
routePath: string;
|
|
33
|
+
serverMethod: string;
|
|
34
|
+
callbackId: number;
|
|
35
|
+
initialLoad: number;
|
|
36
|
+
data: any;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* <p>The data response is a JSON serialized object returned from a backend data server.</p>
|
|
40
|
+
* @property [clientId] - <p>The id of the active client.</p>
|
|
41
|
+
* @property callbackId - <p>The identifier of the client callback method to invoke when the data request has finished.</p>
|
|
42
|
+
* @property isError - <p>A value indicating that an error occurred.</p>
|
|
43
|
+
* @property data - <p>An object which holds the data and data-rules.</p>
|
|
44
|
+
*/
|
|
45
|
+
type dataResponse = {
|
|
46
|
+
clientId?: string;
|
|
47
|
+
callbackId: number;
|
|
48
|
+
isError: string;
|
|
49
|
+
data: dataContainer;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* <p>The data container is part of the data response and holds data and optionally rules for at least one data container.</p>
|
|
53
|
+
* @property [appData] - <p>The app data.</p>
|
|
54
|
+
* @property [routeData] - <p>The route data.</p>
|
|
55
|
+
* @property [viewData] - <p>The view data.</p>
|
|
56
|
+
* @property [appDataRules] - <p>Data rules for app data.</p>
|
|
57
|
+
* @property [routeDataRules] - <p>Data rules for route data.</p>
|
|
58
|
+
* @property [viewDataRules] - <p>Data rules for view data.</p>
|
|
59
|
+
*/
|
|
60
|
+
type dataContainer = {
|
|
61
|
+
appData?: any;
|
|
62
|
+
routeData?: any;
|
|
63
|
+
viewData?: any;
|
|
64
|
+
appDataRules?: dataRules;
|
|
65
|
+
routeDataRules?: dataRules;
|
|
66
|
+
viewDataRules?: dataRules;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* <p>The data rules define how data from the server is updated on the client.</p>
|
|
70
|
+
* @property routeIndex - <p>The route index for updating route data on a different route than the currently active route.</p>
|
|
71
|
+
* @property routePath - <p>The route path for updating view data on a different view than the currently active view.</p>
|
|
72
|
+
* @property path - <p>The hierarchical path on the target object where the source object will be added/updated.</p>
|
|
73
|
+
* @property updateKey - <p>The key used to match and update items on the target array. The array item is updated when the value on both source and target of specified key matches.</p>
|
|
74
|
+
* @property removeByKeyValues - <p>A collection of key values to remove. Items on the target client object with a matching value for the specified UpdateKey will be removed.</p>
|
|
75
|
+
* @property addIndex - <p>The position within the array where the items must be added. Do not specify the index (Null/Undefined) when items must be added at the end of the array.</p>
|
|
76
|
+
* @property removeIndex - <p>The position within the array where the items must be removed. Do not specify the index (Null/Undefined) when items must be removed at the end of the array.</p>
|
|
77
|
+
* @property removeCount - <p>The number of items to remove from the target array.</p>
|
|
78
|
+
* @property ignoreNullValues - <p>A value indicating if null values in the response data will be ignored.</p>
|
|
79
|
+
* @property update - <p>A value indicating if server data overwrittes (false) or updates (true) data on the client.</p>
|
|
80
|
+
* @property recreate - <p>A value indicating if the HTML element must be recreated when there is already an element for the relevant index/key.</p>
|
|
81
|
+
* @property omitKeys - <p>A collection of keys to omit on the target client object.</p>
|
|
82
|
+
*/
|
|
83
|
+
type dataRules = {
|
|
84
|
+
routeIndex: string;
|
|
85
|
+
routePath: string;
|
|
86
|
+
path: string;
|
|
87
|
+
updateKey: number;
|
|
88
|
+
removeByKeyValues: string[];
|
|
89
|
+
addIndex: number;
|
|
90
|
+
removeIndex: number;
|
|
91
|
+
removeCount: number;
|
|
92
|
+
ignoreNullValues: number;
|
|
93
|
+
update: boolean;
|
|
94
|
+
recreate: boolean;
|
|
95
|
+
omitKeys: {
|
|
96
|
+
[key: string]: object;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* @property name - <p>The name of the element.</p>
|
|
101
|
+
* @property isInput - <p>A value indicating if the element is an input.</p>
|
|
102
|
+
* @property isTextarea - <p>A value indicating if the element is a textarea.</p>
|
|
103
|
+
* @property isSelect - <p>A value indicating if the element is a select.</p>
|
|
104
|
+
* @property isCheck - <p>A value indicating if the element is a checkbox.</p>
|
|
105
|
+
* @property isRadio - <p>A value indicating if the element is a radiobutton.</p>
|
|
106
|
+
*/
|
|
107
|
+
type elementInfo = {
|
|
108
|
+
name: string;
|
|
109
|
+
isInput: boolean;
|
|
110
|
+
isTextarea: boolean;
|
|
111
|
+
isSelect: boolean;
|
|
112
|
+
isCheck: boolean;
|
|
113
|
+
isRadio: boolean;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* @property cancel - <p>Set to <code>true</code> to cancel the event.</p>
|
|
117
|
+
*/
|
|
118
|
+
type CancelToken = {
|
|
119
|
+
cancel: boolean;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* @property socket - <p>The WebSocket instance.</p>
|
|
123
|
+
* @property event - <p>The native event object.</p>
|
|
124
|
+
*/
|
|
125
|
+
type WebSocketEventArgs = {
|
|
126
|
+
socket: WebSocket;
|
|
127
|
+
event: Event;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* @property templateItem - <p>The template item.</p>
|
|
131
|
+
* @property field - <p>The field element.</p>
|
|
132
|
+
* @property dataBind - <p>Function to trigger manual data binding.</p>
|
|
133
|
+
* @property cancelToken - <p>Token to cancel automatic data binding.</p>
|
|
134
|
+
*/
|
|
135
|
+
type PreDataBindEventArgs = {
|
|
136
|
+
templateItem: componyx.bindary.TemplateItem;
|
|
137
|
+
field: HTMLElement;
|
|
138
|
+
dataBind: (...params: any[]) => any;
|
|
139
|
+
cancelToken: componyx.bindary.CancelToken;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* @property templateItem - <p>The template item.</p>
|
|
143
|
+
* @property field - <p>The field element.</p>
|
|
144
|
+
* @property model - <p>The data model.</p>
|
|
145
|
+
* @property value - <p>The bound value.</p>
|
|
146
|
+
*/
|
|
147
|
+
type PostDataBindEventArgs = {
|
|
148
|
+
templateItem: componyx.bindary.TemplateItem;
|
|
149
|
+
field: HTMLElement;
|
|
150
|
+
model: any;
|
|
151
|
+
value: any;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* @property error - <p>The error object returned by the server.</p>
|
|
155
|
+
*/
|
|
156
|
+
type ErrorEventArgs = {
|
|
157
|
+
error: any;
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* @property type - <p>What failed: 'route' (no route matches the route path), 'view' or 'controller'.</p>
|
|
161
|
+
* @property [status] - <p>The HTTP status of the failed request, for 'view' and 'controller' when available.</p>
|
|
162
|
+
* @property [url] - <p>The URL of the view or controller that failed to load.</p>
|
|
163
|
+
* @property routePath - <p>The route path that was requested.</p>
|
|
164
|
+
*/
|
|
165
|
+
type RouteErrorEventArgs = {
|
|
166
|
+
type: 'route' | 'view' | 'controller';
|
|
167
|
+
status?: number;
|
|
168
|
+
url?: string;
|
|
169
|
+
routePath: string;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* @property cancelToken - <p>Token to cancel loading.</p>
|
|
173
|
+
*/
|
|
174
|
+
type PreLoadEventArgs = {
|
|
175
|
+
cancelToken: componyx.bindary.CancelToken;
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* @property dataRequest - <p>The requested data identifier.</p>
|
|
179
|
+
* @property routeReady - <p>Callback to continue route loading.</p>
|
|
180
|
+
* @property cancelToken - <p>Token to cancel loading.</p>
|
|
181
|
+
*/
|
|
182
|
+
type DataRequestEventArgs = {
|
|
183
|
+
dataRequest: string;
|
|
184
|
+
routeReady: (...params: any[]) => any;
|
|
185
|
+
cancelToken: componyx.bindary.CancelToken;
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* @property [data] - <p>The loaded route data.</p>
|
|
189
|
+
*/
|
|
190
|
+
type LoadEventArgs = {
|
|
191
|
+
data?: any;
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* @property dataMessage - <p>The incoming data object.</p>
|
|
195
|
+
* @property cancelToken - <p>Token to cancel updating.</p>
|
|
196
|
+
*/
|
|
197
|
+
type PreDataUpdateEventArgs = {
|
|
198
|
+
dataMessage: any;
|
|
199
|
+
cancelToken: componyx.bindary.CancelToken;
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* @property [data] - <p>The updated data object.</p>
|
|
203
|
+
*/
|
|
204
|
+
type PostDataUpdateEventArgs = {
|
|
205
|
+
data?: any;
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* @property [context] - <p>Optional render context.</p>
|
|
209
|
+
*/
|
|
210
|
+
type RenderEventArgs = {
|
|
211
|
+
context?: any;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* @property visible - <p>Whether the document is now visible.</p>
|
|
215
|
+
* @property cancelToken - <p>Token to cancel the default visibility action. The default action checks if there is an open websocket connection and if so it will send a request to the server to update the websocket object on the client.</p>
|
|
216
|
+
*/
|
|
217
|
+
type VisibilityChangeEventArgs = {
|
|
218
|
+
visible: boolean;
|
|
219
|
+
cancelToken: componyx.bindary.CancelToken;
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* @property [el] - <p>The anchor element.</p>
|
|
223
|
+
*/
|
|
224
|
+
type AnchorScrollEventArgs = {
|
|
225
|
+
el?: HTMLElement;
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* @property routeIndex - <p>The index of the route being unloaded.</p>
|
|
229
|
+
* @property routePath - <p>The path of the route being unloaded.</p>
|
|
230
|
+
* @property cancelToken - <p>Token to cancel unloading.</p>
|
|
231
|
+
*/
|
|
232
|
+
type UnloadEventArgs = {
|
|
233
|
+
routeIndex: number;
|
|
234
|
+
routePath: string;
|
|
235
|
+
cancelToken: componyx.bindary.CancelToken;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @property {String|RegEx} path The route path to map. A string to map an exact route or a regex to map a dynamic route. Capture groups from the path with the regex and use them with $groupnumber in the URL, dataRequest and controller method settings.
|
|
240
|
+
* @property {String} [controllerURL] URL of the controller js file.
|
|
241
|
+
* @property {String} [viewURL] URL of the template view.
|
|
242
|
+
* @property {String|Object} [data] JSON data to send with the data load (XHR or WS).
|
|
243
|
+
* @property {Boolean} [dataConnect] A value indicating if the data source will be connected (default) or disconnected when this route is active.
|
|
244
|
+
* @property {Boolean} [observing] A value indicating if changes are being observed for the routeData and viewData data-containers (ECMAScript 6 required).
|
|
245
|
+
* @property {String} [controllerLoad] Name of the controller method invoked after loading the required route data and sources.
|
|
246
|
+
* @property {String} [controllerPreDataUpdate] Name of the controller method invoked when data is received but before the client data is updated. The data object is passed as single argument. Use false as method return value to cancel further processing of the data object. Defaults to 'preDataUpdate'.
|
|
247
|
+
* @property {String} [controllerPostDataUpdate] Name of the controller method invoked after the data is updated. Defaults to 'postDataUpdate'.
|
|
248
|
+
* @property {String} [controllerPreRender] Name of the controller method invoked every time before the view is rendered. Defaults to 'preRender'.
|
|
249
|
+
* @property {String} [controllerPostRender] Name of the controller method invoked every time after the view is rendered. Defaults to 'postRender'.
|
|
250
|
+
* @property {String} [controllerPostLoad] Name of the controller method invoked when the route is loaded. Defaults to 'postLoad'.
|
|
251
|
+
* @property {String} [controllerUnload] Name of the controller method invoked when the route is unloaded because a new route is requested. The routeIndex and routePath of the requested route are passed as arguments. A value of true/null/undefined to unload the current route and load the requested route or false to cancel the unload and keep the current route active. Defaults to 'unLoad'.
|
|
252
|
+
* @property {String} [dataServerLoad] A class type and static method (dot separated) to invoke on the server to load data. Requires the .NET server-side Bindary framework.
|
|
253
|
+
* @property {String} [dataServerUnload] A class type and static method (dot separated) to invoke on the server to unload data. Requires the .NET server-side Bindary framework.
|
|
254
|
+
*/
|
|
255
|
+
type Route =
|
|
256
|
+
{
|
|
257
|
+
path: string | RegExp;
|
|
258
|
+
controllerURL?: string;
|
|
259
|
+
viewURL?: string;
|
|
260
|
+
data?: string | any;
|
|
261
|
+
dataConnect?: boolean;
|
|
262
|
+
observing?: boolean;
|
|
263
|
+
controllerLoad?: string;
|
|
264
|
+
controllerPreDataUpdate?: string;
|
|
265
|
+
controllerPostDataUpdate?: string;
|
|
266
|
+
controllerPreRender?: string;
|
|
267
|
+
controllerPostRender?: string;
|
|
268
|
+
controllerPostLoad?: string;
|
|
269
|
+
controllerUnload?: string;
|
|
270
|
+
dataServerLoad?: string;
|
|
271
|
+
dataServerUnload?: string;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* <p>A value indicating if the route for the initial route path value is loaded when the DOM is ready.</p>
|
|
276
|
+
*/
|
|
277
|
+
var launchOnLoad: boolean;
|
|
278
|
+
/**
|
|
279
|
+
* <p>The connection URL of the server side data-server for retrieving app/view data. Leave this setting empty when custom data retrieval methods are desired.</p>
|
|
280
|
+
*/
|
|
281
|
+
var dataServerURL: string | null;
|
|
282
|
+
/**
|
|
283
|
+
* <p>A value indicating if a relative data-server URL is used.</p>
|
|
284
|
+
*/
|
|
285
|
+
var relativeDataServerURL: boolean;
|
|
286
|
+
/**
|
|
287
|
+
* <p>The relative or absolute root URL where views are located.</p>
|
|
288
|
+
*/
|
|
289
|
+
var viewRootURL: string;
|
|
290
|
+
/**
|
|
291
|
+
* <p>The relative or absolute root URL where client controllers are located.</p>
|
|
292
|
+
*/
|
|
293
|
+
var controllerRootURL: string;
|
|
294
|
+
/**
|
|
295
|
+
* <p>The relative or absolute root URL where includables are located.</p>
|
|
296
|
+
*/
|
|
297
|
+
var includeRootURL: string;
|
|
298
|
+
/**
|
|
299
|
+
* <p>A value indicating if the browser has support for the websocket protocol.</p>
|
|
300
|
+
*/
|
|
301
|
+
const websocketSupport: boolean;
|
|
302
|
+
/**
|
|
303
|
+
* <p>A value indicating if websockets should be used for updating view data.</p>
|
|
304
|
+
*/
|
|
305
|
+
var useWebSocket: boolean;
|
|
306
|
+
/**
|
|
307
|
+
* <p>A value indicating to use a secure connection (SSL/TLS). Defaults to true if a HTTPS connection is detected.</p>
|
|
308
|
+
*/
|
|
309
|
+
var secure: boolean | null;
|
|
310
|
+
/**
|
|
311
|
+
* <p>The interval time in milliseconds between xhr data update checks when websockets are not supported/enabled.</p>
|
|
312
|
+
*/
|
|
313
|
+
var xhrUpdateInterval: number | null;
|
|
314
|
+
/**
|
|
315
|
+
* <p>The time in milliseconds before a new attempt is made, when a previous attempt failed, to scroll to the anchor or history scroll position.</p>
|
|
316
|
+
*/
|
|
317
|
+
var scrollRetryInterval: number;
|
|
318
|
+
/**
|
|
319
|
+
* <p>The time in milliseconds before attempting to set the correct scroll position stops.</p>
|
|
320
|
+
*/
|
|
321
|
+
var scrollRetryTimeout: number;
|
|
322
|
+
/**
|
|
323
|
+
* <p>A value indicating if a data-bound input element performs a live update of the corresponding data model (keyup events) or after a change (change/blur events).</p>
|
|
324
|
+
*/
|
|
325
|
+
var liveBind: boolean;
|
|
326
|
+
/**
|
|
327
|
+
* <p>The delay in milliseconds for a live update.</p>
|
|
328
|
+
*/
|
|
329
|
+
var liveBindDelay: number;
|
|
330
|
+
/**
|
|
331
|
+
* <p>A Bindary event. Handlers receive the event arguments as first parameter.</p>
|
|
332
|
+
* @template TArgs - The type of the event arguments.
|
|
333
|
+
*/
|
|
334
|
+
type BindaryEvent<TArgs = any> = componyx.library.Event<(eventArgs: TArgs, ...params: any[]) => any>;
|
|
335
|
+
/**
|
|
336
|
+
* <p>Fires when the WebSocket connection is opened.</p>
|
|
337
|
+
*/
|
|
338
|
+
var onWebSocketOpen: componyx.bindary.BindaryEvent<componyx.bindary.WebSocketEventArgs>;
|
|
339
|
+
/**
|
|
340
|
+
* <p>Fires when the WebSocket connection is closed (server can close connection also).</p>
|
|
341
|
+
*/
|
|
342
|
+
var onWebSocketClose: componyx.bindary.BindaryEvent<componyx.bindary.WebSocketEventArgs>;
|
|
343
|
+
/**
|
|
344
|
+
* <p>Fires before a data-bound input element is updated. Can be used for validation.</p>
|
|
345
|
+
*/
|
|
346
|
+
var onPreDataBind: componyx.bindary.BindaryEvent<componyx.bindary.PreDataBindEventArgs>;
|
|
347
|
+
/**
|
|
348
|
+
* <p>Fires after data binding is applied to an input element.</p>
|
|
349
|
+
*/
|
|
350
|
+
var onPostDataBind: componyx.bindary.BindaryEvent<componyx.bindary.PostDataBindEventArgs>;
|
|
351
|
+
/**
|
|
352
|
+
* <p>Fires when the returned data object contains an error (<code>isError: true</code>).</p>
|
|
353
|
+
*/
|
|
354
|
+
var onDataError: componyx.bindary.BindaryEvent<componyx.bindary.ErrorEventArgs>;
|
|
355
|
+
/**
|
|
356
|
+
* <p>Fires when a route cannot be loaded: no route matches the route path, or the route's view or controller fails to load.</p>
|
|
357
|
+
*/
|
|
358
|
+
var onRouteError: componyx.bindary.BindaryEvent<componyx.bindary.RouteErrorEventArgs>;
|
|
359
|
+
/**
|
|
360
|
+
* <p>Fires before loading route data and sources.</p>
|
|
361
|
+
*/
|
|
362
|
+
var onPreLoad: componyx.bindary.BindaryEvent<componyx.bindary.PreLoadEventArgs>;
|
|
363
|
+
/**
|
|
364
|
+
* <p>Fires when the view data is requested.</p>
|
|
365
|
+
*/
|
|
366
|
+
var onDataRequest: componyx.bindary.BindaryEvent<componyx.bindary.DataRequestEventArgs>;
|
|
367
|
+
/**
|
|
368
|
+
* <p>Fires after route data and sources are loaded.</p>
|
|
369
|
+
*/
|
|
370
|
+
var onLoad: componyx.bindary.BindaryEvent<componyx.bindary.LoadEventArgs>;
|
|
371
|
+
/**
|
|
372
|
+
* <p>Fires when new data is received, before the client data is updated.</p>
|
|
373
|
+
*/
|
|
374
|
+
var onPreDataUpdate: componyx.bindary.BindaryEvent<componyx.bindary.PreDataUpdateEventArgs>;
|
|
375
|
+
/**
|
|
376
|
+
* <p>Fires after the client data has been updated.</p>
|
|
377
|
+
*/
|
|
378
|
+
var onPostDataUpdate: componyx.bindary.BindaryEvent<componyx.bindary.PostDataUpdateEventArgs>;
|
|
379
|
+
/**
|
|
380
|
+
* <p>Fires before the view is rendered.</p>
|
|
381
|
+
*/
|
|
382
|
+
var onPreRender: componyx.library.Event;
|
|
383
|
+
/**
|
|
384
|
+
* <p>Fires after the view is rendered.</p>
|
|
385
|
+
*/
|
|
386
|
+
var onPostRender: componyx.library.Event;
|
|
387
|
+
/**
|
|
388
|
+
* <p>Fires after the route has fully loaded.</p>
|
|
389
|
+
*/
|
|
390
|
+
var onPostLoad: componyx.bindary.BindaryEvent<componyx.bindary.LoadEventArgs>;
|
|
391
|
+
/**
|
|
392
|
+
* <p>Fires when the document tab becomes visible or hidden.</p>
|
|
393
|
+
*/
|
|
394
|
+
var onVisibilityChange: componyx.bindary.BindaryEvent<componyx.bindary.VisibilityChangeEventArgs>;
|
|
395
|
+
/**
|
|
396
|
+
* <p>Fires when the document is scrolled to an anchor.</p>
|
|
397
|
+
*/
|
|
398
|
+
var onAnchorScroll: componyx.bindary.BindaryEvent<componyx.bindary.AnchorScrollEventArgs>;
|
|
399
|
+
/**
|
|
400
|
+
* <p>Fires after the route is unloaded because a new route is requested.</p>
|
|
401
|
+
*/
|
|
402
|
+
var onUnload: componyx.bindary.BindaryEvent<componyx.bindary.UnloadEventArgs>;
|
|
403
|
+
/**
|
|
404
|
+
* <p>The id prefix for bindary elements within the view.</p>
|
|
405
|
+
*/
|
|
406
|
+
var idPrefix: string;
|
|
407
|
+
/**
|
|
408
|
+
* <p>The date format used to convert date(time) types for textual display. Defaults to MM/dd/yyyy hh:mm.</p>
|
|
409
|
+
*/
|
|
410
|
+
var dateFormat: string;
|
|
411
|
+
/**
|
|
412
|
+
* <p>The decimal separator used to convert numeric types for textual display. Defaults to '.'.</p>
|
|
413
|
+
*/
|
|
414
|
+
var decimalSeparator: string;
|
|
415
|
+
/**
|
|
416
|
+
* <p>The decimal precision used to convert numeric types for textual display.</p>
|
|
417
|
+
*/
|
|
418
|
+
var decimalPrecision: string | null;
|
|
419
|
+
/**
|
|
420
|
+
* <p>A value which is sent with each data request to be able to uniquely identify clients on the server. Only required when the client-id is not stored in a server-side Session.</p>
|
|
421
|
+
*/
|
|
422
|
+
var clientId: string | null;
|
|
423
|
+
/**
|
|
424
|
+
* <p>Holds the current data request object.</p>
|
|
425
|
+
*/
|
|
426
|
+
var dataRequest: dataRequestType | null;
|
|
427
|
+
/**
|
|
428
|
+
* <p>Holds the current active route.</p>
|
|
429
|
+
*/
|
|
430
|
+
var route: Route | null;
|
|
431
|
+
/**
|
|
432
|
+
* <p>Holds the current active route index.</p>
|
|
433
|
+
*/
|
|
434
|
+
var routeIndex: string | null;
|
|
435
|
+
/**
|
|
436
|
+
* <p>Holds the current active route path and can be set as initial launch value.</p>
|
|
437
|
+
*/
|
|
438
|
+
var routePath: string;
|
|
439
|
+
/**
|
|
440
|
+
* <p>The root path of the application must be specified when "prettyURL" is enabled and the application URL contains a path after the URL origin (protocol//domain:port), so that Bindary can detect the route path within the URL.
|
|
441
|
+
* The rootPath must start and end with a forward slash (/).</p>
|
|
442
|
+
*/
|
|
443
|
+
var rootPath: string;
|
|
444
|
+
/**
|
|
445
|
+
* <p>The base title of the application.</p>
|
|
446
|
+
*/
|
|
447
|
+
var baseTitle: string;
|
|
448
|
+
/**
|
|
449
|
+
* <p>Holds the controller object for the active route.</p>
|
|
450
|
+
*/
|
|
451
|
+
var controller: any;
|
|
452
|
+
/**
|
|
453
|
+
* <p>Holds the data object which is bound to the global application context.</p>
|
|
454
|
+
*/
|
|
455
|
+
var appData: any;
|
|
456
|
+
/**
|
|
457
|
+
* <p>Holds the data object which is bound to the context of the active route.</p>
|
|
458
|
+
*/
|
|
459
|
+
var routeData: any;
|
|
460
|
+
/**
|
|
461
|
+
* <p>Holds the data object which is bound to the context of the active view.</p>
|
|
462
|
+
*/
|
|
463
|
+
var viewData: any;
|
|
464
|
+
/**
|
|
465
|
+
* <p>The list of mapped routes.</p>
|
|
466
|
+
*/
|
|
467
|
+
var routes: object[];
|
|
468
|
+
/**
|
|
469
|
+
* <p>A value indicating if Bindary data-bound elements (template-items) are being detected outside of the view container element.
|
|
470
|
+
* Set to false if template elements are only defined inside of the view container for better performance.</p>
|
|
471
|
+
*/
|
|
472
|
+
var detectOutsideView: boolean;
|
|
473
|
+
/**
|
|
474
|
+
* <p>A value indicating if the data change detection must be precise (false) or as fast as possible (true).
|
|
475
|
+
* When changed, it will have direct effect on the next view update. With dirty checks enabled: detection of changes during the view update works by checking if the data-key for a registered change is equal or inside an item's context.
|
|
476
|
+
* Items that don't match with a registered data change are skipped and possible child items are not processed. Therefore possible context switching (by root/parent navigators) inside a template item is not considered. Nor are the preRender event actions, which may decide if a template item is rendered.</p>
|
|
477
|
+
*/
|
|
478
|
+
var dirtyChecks: boolean;
|
|
479
|
+
/**
|
|
480
|
+
* <p>A value indicating if the route path in the URL starts with a forward slash (pretty) instead of a hash(#) or hash-bang(#!).
|
|
481
|
+
* e.g. /Category/Product instead of #Category/Product.
|
|
482
|
+
* When enabled, server-side routing of the route-path to the application's entrance page is required to deal with initial page loads where a route path is part of the URL (direct link).
|
|
483
|
+
* Bindary will detect the route path in the URL and launch with the relevant route.</p>
|
|
484
|
+
*/
|
|
485
|
+
var prettyURL: boolean;
|
|
486
|
+
/**
|
|
487
|
+
* <p>A value indicating if relative hyperlinks are dispatched to (handled by) the Bindary routing.</p>
|
|
488
|
+
*/
|
|
489
|
+
var linkDispatching: boolean;
|
|
490
|
+
/**
|
|
491
|
+
* <p>A value indicating if the view HTML is cleared when a route is unloaded.</p>
|
|
492
|
+
*/
|
|
493
|
+
var clearViewOnUnload: boolean;
|
|
494
|
+
/**
|
|
495
|
+
* <p>A value indicating if the framework is connected with a data provider.</p>
|
|
496
|
+
*/
|
|
497
|
+
var connected: boolean;
|
|
498
|
+
/**
|
|
499
|
+
* <p>A value indicating if data-bindary attributes on the element are retained.
|
|
500
|
+
* When disabled, calling updateTemplateItem() will update the defined attributes and hold previously stored values; clearing can be accomplished by specifying 'null' as attribute value.
|
|
501
|
+
* When enabled, calling updateTemplateItem() will clear undefined attributes.</p>
|
|
502
|
+
*/
|
|
503
|
+
var keepAttributes: boolean;
|
|
504
|
+
/**
|
|
505
|
+
* <p>A value indicating if a fragment identifier (anchor tag) specified in the URL through a hashtag is automatically scrolled into view after loading the route.
|
|
506
|
+
* Use a second hashtag in the URL (without a matching route) to jump to a bookmark when the first hashtag contains the route-path.</p>
|
|
507
|
+
*/
|
|
508
|
+
var anchorScroll: boolean;
|
|
509
|
+
/**
|
|
510
|
+
* <p>A value indicating whether client-side caching of views, view-css, view-scripts, controllers and data is enabled.</p>
|
|
511
|
+
*/
|
|
512
|
+
var caching: boolean;
|
|
513
|
+
/**
|
|
514
|
+
* <p>A value indicating whether internal script and css tags loaded with a specific view are being cached.</p>
|
|
515
|
+
*/
|
|
516
|
+
var cacheInternalTags: boolean;
|
|
517
|
+
/**
|
|
518
|
+
* <p>A value indicating whether the routeData container is retained in cache when a route is unloaded. Route data is keyed by route index, so it is shared by every URL matching the same route definition.</p>
|
|
519
|
+
*/
|
|
520
|
+
var cacheRouteData: boolean;
|
|
521
|
+
/**
|
|
522
|
+
* <p>A value indicating whether the viewData container is retained in cache when a route is unloaded. View data is keyed by route path, so each distinct URL holds its own.</p>
|
|
523
|
+
*/
|
|
524
|
+
var cacheViewData: boolean;
|
|
525
|
+
/**
|
|
526
|
+
* <p>A value indicating if server data overwrites (false) or updates (true) data on the client.</p>
|
|
527
|
+
*/
|
|
528
|
+
var defaultUpdateRule: boolean;
|
|
529
|
+
/**
|
|
530
|
+
* <p>A value indicating whether incoming data responses are compared for equality before updating to avoid redundant changes.</p>
|
|
531
|
+
*/
|
|
532
|
+
var equalityCheck: boolean;
|
|
533
|
+
/**
|
|
534
|
+
* <p>A value indicating if the HTML element must be recreated when there is already an element for the relevant index/key.</p>
|
|
535
|
+
*/
|
|
536
|
+
var defaultRecreateRule: boolean;
|
|
537
|
+
/**
|
|
538
|
+
* <p>A value indicating if changes are being observed for the default appData, routeData and viewData data-containers (ECMAScript 6 required).</p>
|
|
539
|
+
*/
|
|
540
|
+
var observing: boolean;
|
|
541
|
+
/**
|
|
542
|
+
* <p>A value indicating if changes are being observed during the view rendering process.</p>
|
|
543
|
+
*/
|
|
544
|
+
var observeDuringRender: boolean;
|
|
545
|
+
/**
|
|
546
|
+
* <p>A value indicating if the view is automatically updated when changes are being observed.</p>
|
|
547
|
+
*/
|
|
548
|
+
var autoUpdateView: boolean;
|
|
549
|
+
/**
|
|
550
|
+
* <p>A value indicating if all data provided through data-bindary-html attributes are trusted.
|
|
551
|
+
* Enable this option only if there are no (sanitized) user defined HTML data-sources (potential security risks).
|
|
552
|
+
* To trust a specific attribute use data-bindary-html="trust:dataKey".</p>
|
|
553
|
+
*/
|
|
554
|
+
var trustHTML: boolean;
|
|
555
|
+
/**
|
|
556
|
+
* <p>A value indicating that the page is reloaded when the WebSocket is closed by the server due to an internal server error.</p>
|
|
557
|
+
*/
|
|
558
|
+
var reloadPageOnWebSocketServerError: boolean;
|
|
559
|
+
/**
|
|
560
|
+
* <p>A value indicating that the route is reloaded when the page is restored from the back/forward cache (bfcache) after navigating back to the page.</p>
|
|
561
|
+
*/
|
|
562
|
+
var reloadRouteOnPageRestore: boolean;
|
|
563
|
+
/**
|
|
564
|
+
* <p>The element that triggered a data-bind.
|
|
565
|
+
* Used to prevent updating the field value while typing. Cleared after a view update or can be manually cleared to force the element’s value to update on the next view refresh.</p>
|
|
566
|
+
*/
|
|
567
|
+
var dataBindTrigger: HTMLElement | null;
|
|
568
|
+
/**
|
|
569
|
+
* <p>Gets or sets a custom sanitizer function. Overrides built-in sanitizer.</p>
|
|
570
|
+
*/
|
|
571
|
+
var sanitizer: ((...params: any[]) => any) | null;
|
|
572
|
+
/**
|
|
573
|
+
* <p>A value indicating whether to use shorthand ('m-') or default ('data-bindary-') prefixes for attributes.</p>
|
|
574
|
+
*/
|
|
575
|
+
var useShorthand: boolean;
|
|
576
|
+
/**
|
|
577
|
+
* <p>A value indicating if attribute names use the hyphenated form (e.g. view-formatter) instead of the fused form (e.g. viewFormatter). This setting exists for backwards compatibility.</p>
|
|
578
|
+
*/
|
|
579
|
+
var hyphenatedAttributes: boolean;
|
|
580
|
+
/**
|
|
581
|
+
* <p>A value indicating if the framework is busy loading a route or rendering the view.</p>
|
|
582
|
+
*/
|
|
583
|
+
const busy: boolean;
|
|
584
|
+
/**
|
|
585
|
+
* <p>The character(s) used as data-key separator. Defaults to '.' (dot). Only change if a dot is used in object keys.</p>
|
|
586
|
+
*/
|
|
587
|
+
var dataKeySeparatorChar: string;
|
|
588
|
+
/**
|
|
589
|
+
* <p>The character(s) used to indicate an index pointer within a data-key. Defaults to '@' (at sign). Only change if an at sign is used in object keys.</p>
|
|
590
|
+
*/
|
|
591
|
+
var indexPointerChar: string;
|
|
592
|
+
/**
|
|
593
|
+
* <p>Gets the custom prefix.</p>
|
|
594
|
+
*/
|
|
595
|
+
const attributePrefix: string;
|
|
596
|
+
/**
|
|
597
|
+
* <p>Sets and uses a custom prefix to use for the 'data-bindary-' attributes.</p>
|
|
598
|
+
* @param [prefix] - <p>The custom attribute prefix to use.</p>
|
|
599
|
+
*/
|
|
600
|
+
function setCustomPrefix(prefix?: string): void;
|
|
601
|
+
/**
|
|
602
|
+
* <p>Launches the route for the initial route path value.</p>
|
|
603
|
+
*/
|
|
604
|
+
function launch(): void;
|
|
605
|
+
/**
|
|
606
|
+
* <p>Adds a route with the specified route settings.</p>
|
|
607
|
+
* @param route - <p>An object with configuration settings for the route.</p>
|
|
608
|
+
* @returns <p>The array index of the added route within the $bindary.routes array.</p>
|
|
609
|
+
*/
|
|
610
|
+
function addRoute(route: Route): number;
|
|
611
|
+
/**
|
|
612
|
+
* <p>Loads the route based on the current URL or based on the specified route path. Method is only applicable when $bindary.prettyURL is enabled.</p>
|
|
613
|
+
* @param [routePath] - <p>The route path to load.</p>
|
|
614
|
+
* @returns <p>The route index.</p>
|
|
615
|
+
*/
|
|
616
|
+
function loadRoute(routePath?: string): number;
|
|
617
|
+
/**
|
|
618
|
+
* <p>Dispatches anchor links so that they are handled by the framework's routing. Method is only applicable when "pretty URL" is enabled.</p>
|
|
619
|
+
* @param [container] - <p>The container element in which hyperlinks will be updated.</p>
|
|
620
|
+
*/
|
|
621
|
+
function dispatchLinks(container?: HTMLElement): void;
|
|
622
|
+
/**
|
|
623
|
+
* <p>Dispatch an anchor link so that it is handled by the framework's routing. Method is only applicable when "pretty URL" is enabled.</p>
|
|
624
|
+
* @param anchor - <p>The anchor link tag.</p>
|
|
625
|
+
*/
|
|
626
|
+
function dispatchLink(anchor: HTMLElement): void;
|
|
627
|
+
/**
|
|
628
|
+
* <p>Adds a component.</p>
|
|
629
|
+
* @param name - <p>The name of the component.</p>
|
|
630
|
+
* @param initiator - <p>A method which initializes and returns a new instance of the component.</p>
|
|
631
|
+
*/
|
|
632
|
+
function addComponent(name: string, initiator: (...params: any[]) => any): void;
|
|
633
|
+
/**
|
|
634
|
+
* <p>Observes the specified object for changes (ECMAScript 6 required). This method is intended to observe objects on the global (window) scope. Observing of the appData, routeData and viewData containers can be enabled through $bindary.observing.</p>
|
|
635
|
+
* @example
|
|
636
|
+
* window.myContainer = $bindary.observe({}, 'myContainer');
|
|
637
|
+
* @param obj - <p>The object to observe.</p>
|
|
638
|
+
* @param dataContainer - <p>The name of the root data-container on which the proxy object is defined.</p>
|
|
639
|
+
* @param settings - <p>An object with configuration settings for observing the object.</p>
|
|
640
|
+
* @param settings.event - <p>The custom event to dispatch when a property is changed. This can be used in combination with Native WebComponents to update your custom HTML component when an object property changes. Return false from this event to cancel data-change and view update.</p>
|
|
641
|
+
* @param [settings.createEvent] - <p>A factory function that returns a new CustomEvent for each change. Recommended when changes are batched, deferred, or when change isolation is required.</p>
|
|
642
|
+
* @param settings.eventPayload - <p>The additional data included in the event.detail, providing context for the data change.</p>
|
|
643
|
+
* @param settings.element - <p>The element on which the custom event is fired. By default, the event is fired on the document object.</p>
|
|
644
|
+
* @param settings.viewTree - <p>The root tree to use when updating the view after a data change.</p>
|
|
645
|
+
* @param [settings.reuseProxy = true] - <p>A value indicating whether a single proxy instance is shared across multiple data paths. When disabled, each path gets its own independent proxy, losing cross-path change propagation.</p>
|
|
646
|
+
* @returns <p>A proxy object for template-binding on which modifications are immediately noticed and result in an update of the view.</p>
|
|
647
|
+
*/
|
|
648
|
+
function observe(obj: any, dataContainer: string, settings: {
|
|
649
|
+
event: CustomEvent;
|
|
650
|
+
createEvent?: (...params: any[]) => any;
|
|
651
|
+
eventPayload: any;
|
|
652
|
+
element: HTMLElement;
|
|
653
|
+
viewTree: TemplateItem[];
|
|
654
|
+
reuseProxy?: boolean;
|
|
655
|
+
}): any;
|
|
656
|
+
/**
|
|
657
|
+
* @property isProxy - <p>Returns true if the object is a proxy.</p>
|
|
658
|
+
* @property getTarget - <p>Gets the underlying target of the given proxy.</p>
|
|
659
|
+
*/
|
|
660
|
+
type ProxyManager = {
|
|
661
|
+
isProxy: (...params: any[]) => any;
|
|
662
|
+
getTarget: (...params: any[]) => any;
|
|
663
|
+
};
|
|
664
|
+
/**
|
|
665
|
+
* <p>Gets the proxy manager used to create observable objects.</p>
|
|
666
|
+
* @returns <p>The proxy manager object.</p>
|
|
667
|
+
*/
|
|
668
|
+
function getProxyManager(): ProxyManager;
|
|
669
|
+
/**
|
|
670
|
+
* <p>Stops observing for data-changes on observed objects until startObserving() is called.</p>
|
|
671
|
+
*/
|
|
672
|
+
function stopObserving(): void;
|
|
673
|
+
/**
|
|
674
|
+
* <p>Restarts observing for data-changes on observed objects.</p>
|
|
675
|
+
*/
|
|
676
|
+
function startObserving(): void;
|
|
677
|
+
/**
|
|
678
|
+
* <p>A function that determines if the handler applies to a specific template item or element.</p>
|
|
679
|
+
* @param item - <p>The template item containing the element.</p>
|
|
680
|
+
*/
|
|
681
|
+
type ValueMatcher = (item: componyx.bindary.TemplateItem) => boolean;
|
|
682
|
+
/**
|
|
683
|
+
* <p>A function that retrieves the value from an element.</p>
|
|
684
|
+
* @param element - <p>The target element from which the value should be retrieved.</p>
|
|
685
|
+
*/
|
|
686
|
+
type ValueGetter = (element: HTMLElement) => string;
|
|
687
|
+
/**
|
|
688
|
+
* <p>A function that sets the value on an element.</p>
|
|
689
|
+
* @param element - <p>The target element on which the value should be set.</p>
|
|
690
|
+
* @param value - <p>The value to set on the element.</p>
|
|
691
|
+
*/
|
|
692
|
+
type ValueSetter = (element: HTMLElement, value: string) => void;
|
|
693
|
+
/**
|
|
694
|
+
* <p>Registers a value handler for data-bound elements.</p>
|
|
695
|
+
* @param matcher - <p>A function that checks if the handler applies for the specified template item.</p>
|
|
696
|
+
* @param getValue - <p>A function that retrieves the value from the element.</p>
|
|
697
|
+
* @param setValue - <p>A function that sets the value on the element.</p>
|
|
698
|
+
* @returns <p>The id of the registered handler (needed in case of removal).</p>
|
|
699
|
+
*/
|
|
700
|
+
function registerValueHandler(matcher: ValueMatcher, getValue: ValueGetter, setValue: ValueSetter): string;
|
|
701
|
+
/**
|
|
702
|
+
* <p>Unregisters a value handler.</p>
|
|
703
|
+
* @param id - <p>The id of the handler to remove.</p>
|
|
704
|
+
*/
|
|
705
|
+
function unregisterValueHandler(id: string): void;
|
|
706
|
+
/**
|
|
707
|
+
* <p>Places a lock (on the specified dataKey and/or dataContainer) to postpone data updates until unlock is called.
|
|
708
|
+
* Ommit parameters to lock complete data-tree or specify dataContainer only to lock container.</p>
|
|
709
|
+
* @param dataKey - <p>The hierarchical path of the object or object value. This string value should consist of object keys separated by a '.' (dot) character (default, change via dataKeySeparatorChar) and without the data container name.</p>
|
|
710
|
+
* @param [dataContainer] - <p>One of the following data containers: appData, routeData or viewData. Defaults to viewData when dataKey is specified.</p>
|
|
711
|
+
*/
|
|
712
|
+
function lock(dataKey: string, dataContainer?: string): void;
|
|
713
|
+
/**
|
|
714
|
+
* <p>Removes the lock (on the specified dataKey and/or dataContainer) to re-enable data updates.
|
|
715
|
+
* Ommit parameters to unlock complete data-tree or specify dataContainer only to unlock container.</p>
|
|
716
|
+
* @param dataKey - <p>The hierarchical path of the object or object value. This string value should consist of object keys separated by a '.' (dot) character (default, change via dataKeySeparatorChar) and without the data container name.</p>
|
|
717
|
+
* @param [dataContainer] - <p>One of the following data containers: appData, routeData or viewData. Defaults to viewData when dataKey is specified.</p>
|
|
718
|
+
* @param [ignore] - <p>A value indicating that previous received data must be ignored.</p>
|
|
719
|
+
* @param [update] - <p>The view is updated automatically after the unlock. This default update behaviour can be cancelled by specifying false for this argument.</p>
|
|
720
|
+
*/
|
|
721
|
+
function unlock(dataKey: string, dataContainer?: string, ignore?: boolean, update?: boolean): void;
|
|
722
|
+
/**
|
|
723
|
+
* <p>Updates data-model values for data-bound elements.</p>
|
|
724
|
+
* @param elements - <p>A collection of data-bound elements for which the data-model values must be updated.</p>
|
|
725
|
+
*/
|
|
726
|
+
function dataBind(elements: HTMLElement[]): void;
|
|
727
|
+
/**
|
|
728
|
+
* <p>Registers a data change for the specified model (object reference) so that the next view update will display the new data.</p>
|
|
729
|
+
* @param model - <p>The model of the corresponding data-bound element.</p>
|
|
730
|
+
* @param arrayUpdateRules - <p>An array of updateRule objects for the array corresponding with the data-bound repeat element.</p>
|
|
731
|
+
* @param arrayUpdateRules.keys - <p>Indexes or keys within the collection where items where updated.</p>
|
|
732
|
+
* @param arrayUpdateRules.recreate - <p>A value indicating if the HTML element must be recreated when there is already an element for the relevant index/key.</p>
|
|
733
|
+
* @param arrayUpdateRules.addIndex - <p>Position within the array where the items where added. Do not specify the index (Null/Undefined) when items where added at the end of the array.</p>
|
|
734
|
+
* @param arrayUpdateRules.addCount - <p>Number of items that where added to the array.</p>
|
|
735
|
+
* @param arrayUpdateRules.removeIndex - <p>Position within the array where the items where removed. Do not specify the index (Null/Undefined) when items where removed at the end of the array.</p>
|
|
736
|
+
* @param arrayUpdateRules.removeCount - <p>Number of items that where removed from the array.</p>
|
|
737
|
+
* @param [update] - <p>The view is updated automatically after a data change. This default update behaviour can be cancelled by specifying false for this argument.</p>
|
|
738
|
+
*/
|
|
739
|
+
function dataChangeForModel(model: any, arrayUpdateRules?: {
|
|
740
|
+
keys?: number[];
|
|
741
|
+
recreate?: boolean;
|
|
742
|
+
addIndex?: number | null;
|
|
743
|
+
addCount?: number;
|
|
744
|
+
removeIndex?: number | null;
|
|
745
|
+
removeCount?: number;
|
|
746
|
+
}[], update?: boolean): void;
|
|
747
|
+
/**
|
|
748
|
+
* <p>Registers a data change for the element with the specified updateId so that the next view update will display the new data.</p>
|
|
749
|
+
* @param updateId - <p>The update id of the corresponding data-bound element.</p>
|
|
750
|
+
* @param arrayUpdateRules - <p>An array of updateRule objects for the array corresponding with the data-bound repeat element.</p>
|
|
751
|
+
* @param arrayUpdateRules.keys - <p>Indexes or keys within the collection where items where updated.</p>
|
|
752
|
+
* @param arrayUpdateRules.recreate - <p>A value indicating if the HTML element must be recreated when there is already an element for the relevant index/key.</p>
|
|
753
|
+
* @param arrayUpdateRules.addIndex - <p>Position within the array where the items where added. Do not specify the index (Null/Undefined) when items where added at the end of the array.</p>
|
|
754
|
+
* @param arrayUpdateRules.addCount - <p>Number of items that where added to the array.</p>
|
|
755
|
+
* @param arrayUpdateRules.removeIndex - <p>Position within the array where the items where removed. Do not specify the index (Null/Undefined) when items where removed at the end of the array.</p>
|
|
756
|
+
* @param arrayUpdateRules.removeCount - <p>Number of items that where removed from the array.</p>
|
|
757
|
+
* @param [update] - <p>The view is updated automatically after a data change. This default update behaviour can be cancelled by specifying false for this argument.</p>
|
|
758
|
+
*/
|
|
759
|
+
function dataChangeForId(updateId: string, arrayUpdateRules?: {
|
|
760
|
+
keys?: number[];
|
|
761
|
+
recreate?: boolean;
|
|
762
|
+
addIndex?: number | null;
|
|
763
|
+
addCount?: number;
|
|
764
|
+
removeIndex?: number | null;
|
|
765
|
+
removeCount?: number;
|
|
766
|
+
}[], update?: boolean): void;
|
|
767
|
+
/**
|
|
768
|
+
* <p>Registers a data change for the specified dataKey so that the next view update will display the new data.</p>
|
|
769
|
+
* @param dataKey - <p>The hierarchical path of the changed object or object value. This string value should consist of object keys separated by a '.' (dot) character (default, change via dataKeySeparatorChar) and without the data container name.</p>
|
|
770
|
+
* @param [dataContainer] - <p>One of the root data-containers to which the data-key belongs: appData(0), routeData(1) or viewData(2).</p>
|
|
771
|
+
* @param arrayUpdateRules - <p>An array of updateRule objects for the array corresponding with the data-bound repeat element.</p>
|
|
772
|
+
* @param arrayUpdateRules.keys - <p>Indexes or keys within the collection where items where updated.</p>
|
|
773
|
+
* @param arrayUpdateRules.recreate - <p>A value indicating if the HTML element must be recreated when there is already an element for the relevant index/key.</p>
|
|
774
|
+
* @param arrayUpdateRules.addIndex - <p>Position within the array where the items where added. Do not specify the index (Null/Undefined) when items where added at the end of the array.</p>
|
|
775
|
+
* @param arrayUpdateRules.addCount - <p>Number of items that where added to the array.</p>
|
|
776
|
+
* @param arrayUpdateRules.removeIndex - <p>Position within the array where the items where removed. Do not specify the index (Null/Undefined) when items where removed at the end of the array.</p>
|
|
777
|
+
* @param arrayUpdateRules.removeCount - <p>Number of items that where removed from the array.</p>
|
|
778
|
+
* @param [update] - <p>The view is updated automatically after a data change. This default update behaviour can be cancelled by specifying false for this argument.</p>
|
|
779
|
+
*/
|
|
780
|
+
function dataChange(dataKey: string, dataContainer?: string | number, arrayUpdateRules?: {
|
|
781
|
+
keys?: number[];
|
|
782
|
+
recreate?: boolean;
|
|
783
|
+
addIndex?: number | null;
|
|
784
|
+
addCount?: number;
|
|
785
|
+
removeIndex?: number | null;
|
|
786
|
+
removeCount?: number;
|
|
787
|
+
}[], update?: boolean): void;
|
|
788
|
+
/**
|
|
789
|
+
* <p>Clears all registered data changes and cancels the delayed view update.</p>
|
|
790
|
+
*/
|
|
791
|
+
function clearDataChanges(): void;
|
|
792
|
+
/**
|
|
793
|
+
* <p>Sends the specified data to the server through the connected websocket or new xhr connection and returns an awaitable Promise that resolves when the response is received.</p>
|
|
794
|
+
* @param data - <p>The JSON data request.</p>
|
|
795
|
+
* @param [serverMethod] - <p>A class type and static method (dot separated) to call on the server when executing the data request. Requires the .NET server-side Bindary framework.</p>
|
|
796
|
+
* @param [clientId] - <p>A value which is send with each data request to be able to uniquely identify clients on the server side.</p>
|
|
797
|
+
* @param [updateView] - <p>A value indicating if the view is updated after the data response. Defaults to true.</p>
|
|
798
|
+
* @returns <p>Resolves with the server response message.</p>
|
|
799
|
+
*/
|
|
800
|
+
function dataSendAsync(data: any, serverMethod?: string, clientId?: string, updateView?: boolean): Promise<object>;
|
|
801
|
+
/**
|
|
802
|
+
* <p>Sends the specified data to the server through the connected websocket or new xhr connection.</p>
|
|
803
|
+
* @param data - <p>The JSON data request.</p>
|
|
804
|
+
* @param [serverMethod] - <p>A class type and static method (dot separated) to call on the server when executing the data request. Requires the .NET server-side Bindary framework.</p>
|
|
805
|
+
* @param [clientId] - <p>A value which is send with each data request to be able to uniquely identify clients on the server side.</p>
|
|
806
|
+
* @param [onDataResponse] - <p>An event callback method which is invoked on the response for this request. Method parameters: data (Object).</p>
|
|
807
|
+
* @param [updateView] - <p>A value indicating if the view is updated after the data response. Defaults to true.</p>
|
|
808
|
+
* @returns <p>The WebSocket or XHR object used to transfer the data.</p>
|
|
809
|
+
*/
|
|
810
|
+
function dataSend(data: any, serverMethod?: string, clientId?: string, onDataResponse?: (...params: any[]) => any, updateView?: boolean): WebSocket | XMLHttpRequest;
|
|
811
|
+
/**
|
|
812
|
+
* <p>Sends the specified data to the server while attempting to keep the browser responsive to user-input. Use this method to send data only when the window is being unloaded. Check the 3rd argument (boolean) in the controller's unload method to see if the call came from a window-before-unload event. When Websockets are disabled or unsupported an attempt is made to send the data through navigator.sendBeacon, to keep the browser responsive to user-input. However, if sendBeacon is unsupported a fallback to a synchronous XHR call is made.</p>
|
|
813
|
+
* @param data - <p>The JSON data request. The navigator.sendBeacon method has browser-specific data size limitations.</p>
|
|
814
|
+
* @param [serverMethod] - <p>A class type and static method (dot separated) to call on the server when executing the data request. Requires the .NET server-side Bindary framework.</p>
|
|
815
|
+
* @param [clientId] - <p>A value which is send with each data request to be able to uniquely identify clients on the server side.</p>
|
|
816
|
+
* @returns <p>A value is only returned when the data is sent through navigator.sendBeacon. This value indicates if the data was Successfully sent or if a data limit was reached.</p>
|
|
817
|
+
*/
|
|
818
|
+
function unload(data: any, serverMethod?: string, clientId?: string): boolean | void;
|
|
819
|
+
/**
|
|
820
|
+
* <p>Creates or updates a data-bound template item. The item will be rendered on the next view update.</p>
|
|
821
|
+
* @param element - <p>An HTML element having attributes to serve as data-bound template item.</p>
|
|
822
|
+
* @param [deep = false] - <p>A value indicating if child elements should be updated.</p>
|
|
823
|
+
* @param [clear = false] - <p>A value indicating if child items must be cleared.</p>
|
|
824
|
+
*/
|
|
825
|
+
function updateTemplateItem(element: HTMLElement, deep?: boolean, clear?: boolean): void;
|
|
826
|
+
/**
|
|
827
|
+
* <p>Removes a data-bound template item.</p>
|
|
828
|
+
* @param element - <p>The original element.</p>
|
|
829
|
+
*/
|
|
830
|
+
function removeTemplateItem(element: HTMLElement): void;
|
|
831
|
+
/**
|
|
832
|
+
* <p>(Re)Renders the view with the active data objects.</p>
|
|
833
|
+
* @param complete - <p>A value indicating if the view must be refreshed completely instead of checking for registered data changes.</p>
|
|
834
|
+
* @param redetectTemplateElements - <p>A value indicating if the template elements should be redetected. Make sure keep attributes is set to true, either globally or on the elements, otherwise these elements are not redetected.</p>
|
|
835
|
+
* @param [viewTree] - <p>The root template items for the view tree, from which the update will propagate.</p>
|
|
836
|
+
*/
|
|
837
|
+
function updateView(complete: boolean, redetectTemplateElements: boolean, viewTree?: TemplateItem[]): void;
|
|
838
|
+
/**
|
|
839
|
+
* <p>(Re)Renders the view with the active data objects. The delayed update call is placed at the end of the execution queue through setTimeout()</p>
|
|
840
|
+
* @param complete - <p>A value indicating if the view must be refreshed completely instead of checking for registered data changes.</p>
|
|
841
|
+
* @param [redetectTemplateElements] - <p>A value indicating if the template elements should be redetected.</p>
|
|
842
|
+
* @param [viewTree] - <p>The root template items for the view tree, from which the update will propagate.</p>
|
|
843
|
+
*/
|
|
844
|
+
function updateViewDelayed(complete: boolean, redetectTemplateElements?: boolean, viewTree?: TemplateItem[]): void;
|
|
845
|
+
/**
|
|
846
|
+
* <p>Creates the view tree with data-bound template items.</p>
|
|
847
|
+
* @param [rootEl] - <p>The root HTML Element.</p>
|
|
848
|
+
* @param [rootItem] - <p>The root Template Item.</p>
|
|
849
|
+
*/
|
|
850
|
+
function createViewTree(rootEl?: HTMLElement, rootItem?: componyx.bindary.TemplateItem): void;
|
|
851
|
+
/**
|
|
852
|
+
* <p>Renders the view tree using data-bound template items.
|
|
853
|
+
* <b>Important:</b> This method should only be called during an active render cycle, otherwise use updateViewDelayed() or updateView() instead.
|
|
854
|
+
* Note that unlike updateView(), this method does <b>not</b> trigger preRender or postRender events.</p>
|
|
855
|
+
* @param [update] - <p>A value indicating if this is an update.</p>
|
|
856
|
+
* @param [viewTree] - <p>The view tree to create.</p>
|
|
857
|
+
*/
|
|
858
|
+
function renderView(update?: boolean, viewTree?: TemplateItem[]): void;
|
|
859
|
+
/**
|
|
860
|
+
* <p>Disconnects the data connection.</p>
|
|
861
|
+
*/
|
|
862
|
+
function disconnect(): void;
|
|
863
|
+
/**
|
|
864
|
+
* <p>Gets the template item that belongs to the specified element.</p>
|
|
865
|
+
* @param element - <p>The element for which to retrieve the template item.</p>
|
|
866
|
+
* @returns <p>The template item.</p>
|
|
867
|
+
*/
|
|
868
|
+
function getTemplateItem(element: HTMLElement): componyx.bindary.TemplateItem;
|
|
869
|
+
/**
|
|
870
|
+
* <p>Gets the view container element.</p>
|
|
871
|
+
* @returns <p>The view container element.</p>
|
|
872
|
+
*/
|
|
873
|
+
function getViewContainer(): HTMLElement;
|
|
874
|
+
/**
|
|
875
|
+
* <p>Gets the page anchor.</p>
|
|
876
|
+
* @returns <p>The page anchor.</p>
|
|
877
|
+
*/
|
|
878
|
+
function getAnchor(): string;
|
|
879
|
+
/**
|
|
880
|
+
* <p>Gets the base href which precedes all route paths when prettyURL is enabled.</p>
|
|
881
|
+
* @returns <p>The base href.</p>
|
|
882
|
+
*/
|
|
883
|
+
function getBaseHref(): string;
|
|
884
|
+
/**
|
|
885
|
+
* <p>Gets the internal cache object in where views, controllers and data are stored.</p>
|
|
886
|
+
* @returns <p>The cache object.</p>
|
|
887
|
+
*/
|
|
888
|
+
function getCache(): any;
|
|
889
|
+
/**
|
|
890
|
+
* <p>Clears the internal cache object in where views, includes, controllers and data are stored. Loaded script and CSS tags from a view or includable file will also be removed from the page when clearing the cache (unless indicated otherwise through the parameters).</p>
|
|
891
|
+
* @param [keepControllers] - <p>A value indicating if loaded controller script tags must remain on the page.</p>
|
|
892
|
+
* @param [keepExternalScripts] - <p>A value indicating if external script tags from a view or includable file must remain on the page.</p>
|
|
893
|
+
* @param [keepExternalCss] - <p>A value indicating if external css tags from a view or includable file must remain on the page.</p>
|
|
894
|
+
* @param [keepInternalScripts] - <p>A value indicating if internal (also called inline) script tags from a view or includable file must remain on the page.</p>
|
|
895
|
+
* @param [keepInternalCss] - <p>A value indicating if internal (also called inline) css tags from a view or includable file must remain on the page.</p>
|
|
896
|
+
*/
|
|
897
|
+
function clearCache(keepControllers?: boolean, keepExternalScripts?: boolean, keepExternalCss?: boolean, keepInternalScripts?: boolean, keepInternalCss?: boolean): void;
|
|
898
|
+
/**
|
|
899
|
+
* <p>Creates an instance of TemplateItem.</p>
|
|
900
|
+
* @property root - <p>The root item or itself if this is the root of the item tree.</p>
|
|
901
|
+
* @property parent - <p>The parent item.</p>
|
|
902
|
+
* @property children - <p>The child items of the current item.</p>
|
|
903
|
+
* @property id - <p>The unique identifier of the item.</p>
|
|
904
|
+
* @property placeHolder - <p>A place holder element for an item that is not rendered.</p>
|
|
905
|
+
* @property repeatPlaceHolder - <p>A place holder element for a repeating item.</p>
|
|
906
|
+
* @property trusted - <p>A value indicating if the HTML value is trusted.</p>
|
|
907
|
+
* @property includable - <p>A value indicating if the item is an includable item.</p>
|
|
908
|
+
* @property includableRoot - <p>A value indicating if the item is the root of the includable.</p>
|
|
909
|
+
* @property included - <p>A value indicating if an includable is included.</p>
|
|
910
|
+
* @property includeFile - <p>The include file data-key or path.</p>
|
|
911
|
+
* @property include - <p>The include data-key or identifier.</p>
|
|
912
|
+
* @property isComponent - <p>A value indicating if the item is a component.</p>
|
|
913
|
+
* @property loaded - <p>A value indicating if the included data or component is loaded.</p>
|
|
914
|
+
* @property element - <p>The rendered element.</p>
|
|
915
|
+
* @property sourceElement - <p>The original collected element. This element can differ from the rendered element when it is included or within a repeater.</p>
|
|
916
|
+
* @property display - <p>The original display style of the element.</p>
|
|
917
|
+
* @property elementInfo - <p>Information about the element.</p>
|
|
918
|
+
* @property context - <p>The object context.</p>
|
|
919
|
+
* @property repeatValue - <p>The repeat value context.</p>
|
|
920
|
+
* @property repeatItemIdValue - <p>The value of the repeat item id.</p>
|
|
921
|
+
* @property itemId - <p>The item is rendered if the item id matches the value of the repeat item id.</p>
|
|
922
|
+
* @property index - <p>The current index within the array repeater.</p>
|
|
923
|
+
* @property key - <p>The current key within the object repeater.</p>
|
|
924
|
+
* @property value - <p>The data value.</p>
|
|
925
|
+
* @property isRendered - <p>A value indicating if the element is rendered.</p>
|
|
926
|
+
* @property dataChange - <p>Holds the active data change rules for the item.</p>
|
|
927
|
+
* @property indexKey - <p>The index key holds the dynamic (data-key) or static index pointer.</p>
|
|
928
|
+
* @property repeatElements - <p>The collection of elements within the repeater.</p>
|
|
929
|
+
* @property dataType - <p>The type of the data value.</p>
|
|
930
|
+
* @property inputBind - <p>The data bind value.</p>
|
|
931
|
+
* @property liveBind - <p>A value indicating if live binding is enabled (true) or disabled (false) or the debounce delay in milliseconds.</p>
|
|
932
|
+
* @property updateId - <p>The update identifier.</p>
|
|
933
|
+
* @property updateIdFromParent - <p>A value indicating that the updateId was copied from the parent item in the update loop.</p>
|
|
934
|
+
* @property attributes - <p>The data bound attributes.</p>
|
|
935
|
+
* @property isHTML - <p>A value indicating if the data value is HTML.</p>
|
|
936
|
+
* @property if - <p>The function invoked to test the conditional if statement.</p>
|
|
937
|
+
* @property elseIf - <p>The function invoked to test the conditional else if statement.</p>
|
|
938
|
+
* @property else - <p>The function invoked to test the conditional else statement.</p>
|
|
939
|
+
* @property dataFormatter - <p>The function invoked when the value is set on the data object.</p>
|
|
940
|
+
* @property viewFormatter - <p>The function invoked when the value is set on the element.</p>
|
|
941
|
+
* @property preRender - <p>The function invoked before the element is rendered.</p>
|
|
942
|
+
* @property postRender - <p>The function invoked after the element is rendered.</p>
|
|
943
|
+
* @property load - <p>The function invoked when an includable is included.</p>
|
|
944
|
+
* @property filter - <p>The function invoked to filter a collection.</p>
|
|
945
|
+
* @property events - <p>The element events.</p>
|
|
946
|
+
* @property repeatDataKey - <p>The data-key for the repeat value.</p>
|
|
947
|
+
* @property repeatItemIdDataKey - <p>The data-key for the repeat item id.</p>
|
|
948
|
+
* @property contextDataKey - <p>The data-key for the context value.</p>
|
|
949
|
+
* @property hasValue - <p>The data-key for the value check.</p>
|
|
950
|
+
* @property dataKey - <p>The data-key for the data value.</p>
|
|
951
|
+
* @property repeatDataKeyPath - <p>The data-key for the repeat value.</p>
|
|
952
|
+
* @property contextDataKeyPath - <p>The data-key for the context value.</p>
|
|
953
|
+
* @property hasValueDataKeyPath - <p>The data-key for the value check.</p>
|
|
954
|
+
* @property dataKeyPath - <p>The data-key for the data value.</p>
|
|
955
|
+
* @property conditionMet - <p>A value indicating the state of the conditional statement.</p>
|
|
956
|
+
* @param el - <p>The DOM element associated with the template item.</p>
|
|
957
|
+
* @param events - <p>The events related to the template item.</p>
|
|
958
|
+
* @param attributes - <p>The attributes for the template item.</p>
|
|
959
|
+
* @param parent - <p>The parent TemplateItem if this item is a child.</p>
|
|
960
|
+
* @param appendToRoot - <p>Determines whether to append to the root.</p>
|
|
961
|
+
*/
|
|
962
|
+
class TemplateItem
|
|
963
|
+
{
|
|
964
|
+
constructor(el: HTMLElement, events: any, attributes: any, parent: componyx.bindary.TemplateItem, appendToRoot: boolean);
|
|
965
|
+
/**
|
|
966
|
+
* <p>The root item or itself if this is the root of the item tree.</p>
|
|
967
|
+
*/
|
|
968
|
+
root: componyx.bindary.TemplateItem;
|
|
969
|
+
/**
|
|
970
|
+
* <p>The parent item.</p>
|
|
971
|
+
*/
|
|
972
|
+
parent: componyx.bindary.TemplateItem;
|
|
973
|
+
/**
|
|
974
|
+
* <p>The child items of the current item.</p>
|
|
975
|
+
*/
|
|
976
|
+
children: TemplateItem[];
|
|
977
|
+
/**
|
|
978
|
+
* <p>The unique identifier of the item.</p>
|
|
979
|
+
*/
|
|
980
|
+
id: string;
|
|
981
|
+
/**
|
|
982
|
+
* <p>A place holder element for an item that is not rendered.</p>
|
|
983
|
+
*/
|
|
984
|
+
placeHolder: HTMLElement;
|
|
985
|
+
/**
|
|
986
|
+
* <p>A place holder element for a repeating item.</p>
|
|
987
|
+
*/
|
|
988
|
+
repeatPlaceHolder: HTMLElement;
|
|
989
|
+
/**
|
|
990
|
+
* <p>A value indicating if the HTML value is trusted.</p>
|
|
991
|
+
*/
|
|
992
|
+
trusted: boolean;
|
|
993
|
+
/**
|
|
994
|
+
* <p>A value indicating if the item is an includable item.</p>
|
|
995
|
+
*/
|
|
996
|
+
includable: boolean;
|
|
997
|
+
/**
|
|
998
|
+
* <p>A value indicating if the item is the root of the includable.</p>
|
|
999
|
+
*/
|
|
1000
|
+
includableRoot: boolean;
|
|
1001
|
+
/**
|
|
1002
|
+
* <p>A value indicating if an includable is included.</p>
|
|
1003
|
+
*/
|
|
1004
|
+
included: boolean;
|
|
1005
|
+
/**
|
|
1006
|
+
* <p>The include file data-key or path.</p>
|
|
1007
|
+
*/
|
|
1008
|
+
includeFile: string;
|
|
1009
|
+
/**
|
|
1010
|
+
* <p>The include data-key or identifier.</p>
|
|
1011
|
+
*/
|
|
1012
|
+
include: string;
|
|
1013
|
+
/**
|
|
1014
|
+
* <p>A value indicating if the item is a component.</p>
|
|
1015
|
+
*/
|
|
1016
|
+
isComponent: boolean;
|
|
1017
|
+
/**
|
|
1018
|
+
* <p>A value indicating if the included data or component is loaded.</p>
|
|
1019
|
+
*/
|
|
1020
|
+
loaded: boolean;
|
|
1021
|
+
/**
|
|
1022
|
+
* <p>The rendered element.</p>
|
|
1023
|
+
*/
|
|
1024
|
+
element: HTMLElement;
|
|
1025
|
+
/**
|
|
1026
|
+
* <p>The original collected element. This element can differ from the rendered element when it is included or within a repeater.</p>
|
|
1027
|
+
*/
|
|
1028
|
+
sourceElement: HTMLElement;
|
|
1029
|
+
/**
|
|
1030
|
+
* <p>The original display style of the element.</p>
|
|
1031
|
+
*/
|
|
1032
|
+
display: string;
|
|
1033
|
+
/**
|
|
1034
|
+
* <p>Information about the element.</p>
|
|
1035
|
+
*/
|
|
1036
|
+
elementInfo: elementInfo;
|
|
1037
|
+
/**
|
|
1038
|
+
* <p>The object context.</p>
|
|
1039
|
+
*/
|
|
1040
|
+
context: any;
|
|
1041
|
+
/**
|
|
1042
|
+
* <p>The repeat value context.</p>
|
|
1043
|
+
*/
|
|
1044
|
+
repeatValue: any;
|
|
1045
|
+
/**
|
|
1046
|
+
* <p>The value of the repeat item id.</p>
|
|
1047
|
+
*/
|
|
1048
|
+
repeatItemIdValue: any;
|
|
1049
|
+
/**
|
|
1050
|
+
* <p>The item is rendered if the item id matches the value of the repeat item id.</p>
|
|
1051
|
+
*/
|
|
1052
|
+
itemId: any;
|
|
1053
|
+
/**
|
|
1054
|
+
* <p>The current index within the array repeater.</p>
|
|
1055
|
+
*/
|
|
1056
|
+
index: number;
|
|
1057
|
+
/**
|
|
1058
|
+
* <p>The current key within the object repeater.</p>
|
|
1059
|
+
*/
|
|
1060
|
+
key: string;
|
|
1061
|
+
/**
|
|
1062
|
+
* <p>The data value.</p>
|
|
1063
|
+
*/
|
|
1064
|
+
value: any;
|
|
1065
|
+
/**
|
|
1066
|
+
* <p>A value indicating if the element is rendered.</p>
|
|
1067
|
+
*/
|
|
1068
|
+
isRendered: boolean;
|
|
1069
|
+
/**
|
|
1070
|
+
* <p>Holds the active data change rules for the item.</p>
|
|
1071
|
+
*/
|
|
1072
|
+
dataChange: object[];
|
|
1073
|
+
/**
|
|
1074
|
+
* <p>The index key holds the dynamic (data-key) or static index pointer.</p>
|
|
1075
|
+
*/
|
|
1076
|
+
indexKey: String[] | Number[];
|
|
1077
|
+
/**
|
|
1078
|
+
* <p>The collection of elements within the repeater.</p>
|
|
1079
|
+
*/
|
|
1080
|
+
repeatElements: HTMLElement[];
|
|
1081
|
+
/**
|
|
1082
|
+
* <p>The type of the data value.</p>
|
|
1083
|
+
*/
|
|
1084
|
+
dataType: string;
|
|
1085
|
+
/**
|
|
1086
|
+
* <p>The data bind value.</p>
|
|
1087
|
+
*/
|
|
1088
|
+
inputBind: string;
|
|
1089
|
+
/**
|
|
1090
|
+
* <p>A value indicating if live binding is enabled (true) or disabled (false) or the debounce delay in milliseconds.</p>
|
|
1091
|
+
*/
|
|
1092
|
+
liveBind: boolean | number;
|
|
1093
|
+
/**
|
|
1094
|
+
* <p>The update identifier.</p>
|
|
1095
|
+
*/
|
|
1096
|
+
updateId: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* <p>A value indicating that the updateId was copied from the parent item in the update loop.</p>
|
|
1099
|
+
*/
|
|
1100
|
+
updateIdFromParent: boolean;
|
|
1101
|
+
/**
|
|
1102
|
+
* <p>The data bound attributes.</p>
|
|
1103
|
+
*/
|
|
1104
|
+
attributes: any;
|
|
1105
|
+
/**
|
|
1106
|
+
* <p>A value indicating if the data value is HTML.</p>
|
|
1107
|
+
*/
|
|
1108
|
+
isHTML: boolean;
|
|
1109
|
+
/**
|
|
1110
|
+
* <p>The function invoked to test the conditional if statement.</p>
|
|
1111
|
+
*/
|
|
1112
|
+
if: string;
|
|
1113
|
+
/**
|
|
1114
|
+
* <p>The function invoked to test the conditional else if statement.</p>
|
|
1115
|
+
*/
|
|
1116
|
+
elseIf: string;
|
|
1117
|
+
/**
|
|
1118
|
+
* <p>The function invoked to test the conditional else statement.</p>
|
|
1119
|
+
*/
|
|
1120
|
+
else: string;
|
|
1121
|
+
/**
|
|
1122
|
+
* <p>The function invoked when the value is set on the data object.</p>
|
|
1123
|
+
*/
|
|
1124
|
+
dataFormatter: string;
|
|
1125
|
+
/**
|
|
1126
|
+
* <p>The function invoked when the value is set on the element.</p>
|
|
1127
|
+
*/
|
|
1128
|
+
viewFormatter: string;
|
|
1129
|
+
/**
|
|
1130
|
+
* <p>The function invoked before the element is rendered.</p>
|
|
1131
|
+
*/
|
|
1132
|
+
preRender: string;
|
|
1133
|
+
/**
|
|
1134
|
+
* <p>The function invoked after the element is rendered.</p>
|
|
1135
|
+
*/
|
|
1136
|
+
postRender: string;
|
|
1137
|
+
/**
|
|
1138
|
+
* <p>The function invoked when an includable is included.</p>
|
|
1139
|
+
*/
|
|
1140
|
+
load: string;
|
|
1141
|
+
/**
|
|
1142
|
+
* <p>The function invoked to filter a collection.</p>
|
|
1143
|
+
*/
|
|
1144
|
+
filter: string;
|
|
1145
|
+
/**
|
|
1146
|
+
* <p>The element events.</p>
|
|
1147
|
+
*/
|
|
1148
|
+
events: any;
|
|
1149
|
+
/**
|
|
1150
|
+
* <p>The data-key for the repeat value.</p>
|
|
1151
|
+
*/
|
|
1152
|
+
repeatDataKey: String[];
|
|
1153
|
+
/**
|
|
1154
|
+
* <p>The data-key for the repeat item id.</p>
|
|
1155
|
+
*/
|
|
1156
|
+
repeatItemIdDataKey: String[];
|
|
1157
|
+
/**
|
|
1158
|
+
* <p>The data-key for the context value.</p>
|
|
1159
|
+
*/
|
|
1160
|
+
contextDataKey: String[];
|
|
1161
|
+
/**
|
|
1162
|
+
* <p>The data-key for the value check.</p>
|
|
1163
|
+
*/
|
|
1164
|
+
hasValue: String[];
|
|
1165
|
+
/**
|
|
1166
|
+
* <p>The data-key for the data value.</p>
|
|
1167
|
+
*/
|
|
1168
|
+
dataKey: String[];
|
|
1169
|
+
/**
|
|
1170
|
+
* <p>The data-key for the repeat value.</p>
|
|
1171
|
+
*/
|
|
1172
|
+
repeatDataKeyPath: string;
|
|
1173
|
+
/**
|
|
1174
|
+
* <p>The data-key for the context value.</p>
|
|
1175
|
+
*/
|
|
1176
|
+
contextDataKeyPath: string;
|
|
1177
|
+
/**
|
|
1178
|
+
* <p>The data-key for the value check.</p>
|
|
1179
|
+
*/
|
|
1180
|
+
hasValueDataKeyPath: string;
|
|
1181
|
+
/**
|
|
1182
|
+
* <p>The data-key for the data value.</p>
|
|
1183
|
+
*/
|
|
1184
|
+
dataKeyPath: string;
|
|
1185
|
+
/**
|
|
1186
|
+
* <p>A value indicating the state of the conditional statement.</p>
|
|
1187
|
+
*/
|
|
1188
|
+
conditionMet: boolean;
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
/**
|
|
1194
|
+
* <p>Bindary ($bindary) is a highly flexible data-binding framework for developing web applications. It utilizes declarative HTML templates based on data-attributes to bind the DOM- to the -JavaScript world.</p>
|
|
1195
|
+
*/
|
|
1196
|
+
declare var $bindary: typeof componyx.bindary;
|