api/js/egw_action/egw_action.d.ts   F
last analyzed

Complexity

Total Complexity 172
Complexity/F 1

Size

Lines of Code 884
Function Count 172

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 430
c 0
b 0
f 0
dl 0
loc 884
rs 2
wmc 172
mnd 0
bc 0
fnc 172
bpm 0
cpm 1
noi 0

171 Functions

Rating   Name   Duplication   Size   Complexity  
A egwAction.set_disableIfNoEPL 0 1 1
A egwAction.set_hideOnDisabled 0 1 1
A egwMenuItem.set_hint 0 1 1
A egwActionObject.getSelectedObjects 0 1 1
A egwActionObject.getActionImplementationGroups 0 1 1
A egwActionObject.getSelected 0 1 1
A egwActionObject.getAllSelected 0 1 1
A egwActionLink.set_actionId 0 1 1
A egwActionObjectInterface.makeVisible 0 1 1
A egwAction._check_confirm 0 1 1
A egw_action.d.ts ➔ egwPreventSelect 0 1 1
A egw_action.d.ts ➔ str_repeat 0 50 1
A egwMenuItem.set_data 0 1 1
A egwMenuItem.addItem 0 1 1
A egwAction.enableId 0 1 1
A egwMenuItem.set_id 0 1 1
A egwActionObject.setFocused 0 1 1
A egwEventQueue.flush 0 1 1
A egwActionObject.traversePath 0 1 1
A egwActionObject.registerActions 0 1 1
A egwMenuItem.set_groupIndex 0 1 1
A egw_action.d.ts ➔ getDragImplementation 0 1 1
A egwAction._check_confirm_mass_selections 0 1 1
A egwActionObject._ifaceCallback 0 1 1
A egwActionLink.updateLink 0 1 1
A egwActionObject.isDragOut 0 1 1
A egwActionObject.updateFocusedChild 0 1 1
A egw_action.d.ts ➔ egwActionImplementation 0 14 1
A egw_action.d.ts ➔ egwActionLink 0 10 1
A egwActionObject._reconnectCallback 0 1 1
A egwMenu.loadStructure 0 1 1
A egw_action.d.ts ➔ egwCallAbstract 0 1 1
A egwActionObject._getLinks 0 1 1
A egwActionObject.getIndex 0 1 1
A egwMenuItem.set_onClick 0 1 1
A egwAction.appendToTree 0 3 1
A egwActionObjectInterface.setState 0 1 1
A egwActionObject.updateSelectedChildren 0 1 1
A egw_action.d.ts ➔ egwDropActionImplementation 0 1 1
A egwAction.enableClass 0 1 1
A egw_action.d.ts ➔ egwArraysEqual 0 1 1
A egwActionImplementation.unregisterAction 0 1 1
A egwAction.remove 0 1 1
A egwAction.addAction 0 1 1
A egw_action.d.ts ➔ egwAction 0 12 1
A egwAction.set_enabled 0 1 1
A egwActionObject.insertObject 0 1 1
A egw_action.d.ts ➔ dhtmlxTree_getNode 0 16 1
A egwActionObject.getActionLink 0 1 1
A egwMenuItem.getItem 0 1 1
A egw_action.d.ts ➔ egw_getObjectManager 0 13 1
A egwActionLink.set_visible 0 1 1
A egw_action.d.ts ➔ egw_unregisterGlobalShortcut 0 4 1
A egw_action.d.ts ➔ _egwActionTreeContains 0 1 1
A egwMenu.addItem 0 1 1
A egwMenuImpl.hide 0 1 1
A egwActionObject.makeVisible 0 1 1
A egwMenuItem.set_checkbox 0 1 1
A egw_action.d.ts ➔ egwDynStyleSheet 0 6 1
A egw_action.d.ts ➔ egw_getAppObjectManager 0 7 1
A egwActionObject.clear 0 1 1
A egwAction.getManager 0 1 1
A egw_action.d.ts ➔ egw_registerGlobalShortcut 0 12 1
A egwActionObjectInterface.triggerEvent 0 1 1
A egw_action.d.ts ➔ egwBitIsSet 0 4 1
A egw_action.d.ts ➔ egwSetBit 0 9 1
A egwMenu.getItem 0 1 1
A egw_action.d.ts ➔ egwGetShiftState 0 4 1
A egw_action.d.ts ➔ egwActionHandler 0 9 1
A egwActionObject.flatList 0 1 1
A egw_action.d.ts ➔ getPopupImplementation 0 1 1
A egwActionObjectInterface.updateState 0 1 1
A egwActionObject.getVisible 0 1 1
A egwActionObject.getFocused 0 1 1
A egw_action.d.ts ➔ egwIsMobile 0 1 1
A egwMenuImpl._translateStructure 0 1 1
A egwActionObject.setSelected 0 1 1
A egwActionObject.toggleAllSelected 0 1 1
A egwActionObject.forceSelection 0 1 1
A egwMenuItem.set_enabled 0 1 1
A egwActionObject.executeActionImplementation 0 1 1
A egw_action.d.ts ➔ egwActionObjectInterface 0 13 1
A egwMenuItem.set_default 0 1 1
A egwDynStyleSheet.updateRule 0 1 1
A egwActionLink.set_enabled 0 1 1
A egwMenuItem.setGlobalOnClick 0 1 1
A egw_action.d.ts ➔ egwActionObjectManager 0 10 1
A egwActionObject.getContainerRoot 0 1 1
A egw_action.d.ts ➔ egwQueueCallback 0 1 1
A egw_action.d.ts ➔ egwObjectLength 0 1 1
A egwFnct.setValue 0 1 1
A egwMenuItem.set_iconUrl 0 1 1
A egwAction.set_iconUrl 0 1 1
A egwMenuItem.set_shortcutCaption 0 1 1
A egwActionObjectInterface.setReconnectActionsCallback 0 1 1
A egwAction.set_hideOnMobile 0 1 1
A egw_action.d.ts ➔ egwUnfocus 0 1 1
A egwMenu.hide 0 1 1
A egwActionObject.getNext 0 1 1
A egw_action.d.ts ➔ egwDropAction 0 13 1
A egwActionObject.getObjectById 0 1 1
A egwAction.updateActions 0 1 1
A egw_action.d.ts ➔ egwMenuItem 0 5 1
A egw_action.d.ts ➔ dhtmlxtreeItemAOI 0 1 1
A egw_action.d.ts ➔ egwPopupAction 0 1 1
A egwActionObject.triggerCallback 0 1 1
A egwActionObject.setAOI 0 1 1
A egwActionObjectInterface.getState 0 1 1
A egwMenu.setGlobalOnClick 0 1 1
A egwEventQueue.queue 0 1 1
A egw_action.d.ts ➔ egwResetPreventSelect 0 1 1
A egwAction.execute 0 1 1
A egwActionImplementation.registerAction 0 1 1
A egwActionObject.handleKeyPress 0 1 1
A egwMenu.clear 0 1 1
A egw_action.d.ts ➔ egw_shortcutIdx 0 4 1
A egw_action.d.ts ➔ _egwSetMenuOnClick 0 4 1
A egw_action.d.ts ➔ egwDragActionImplementation 0 1 1
A egwActionObjectInterface.setStateChangeCallback 0 1 1
A egwMenuItem.set_caption 0 1 1
A egw_action.d.ts ➔ _egwGenMenuItem 0 5 1
A egw_action.d.ts ➔ egwFnct 0 12 1
A egwAction.set_data 0 1 1
A egw_action.d.ts ➔ egw_keycode_translation_function 0 1 1
A egw_action.d.ts ➔ egwPopupActionImplementation 0 1 1
A egwActionObject.updateActionLinks 0 1 1
A egw_action.d.ts ➔ egwMenu 0 10 1
A egw_action.d.ts ➔ egw_keycode_makeValid 0 5 1
A egwAction.set_caption 0 1 1
A egw_action.d.ts ➔ egwDragAction 0 15 1
A egw_action.d.ts ➔ egwActionManager 0 10 1
A egw_action.d.ts ➔ egw_keyHandler 0 6 1
A egwActionObject.unregisterActions 0 1 1
A egw_action.d.ts ➔ _egwGenMenuStructure 0 5 1
A egwMenuItem.set_checked 0 1 1
A egwAction.getActionById 0 1 1
A egwFnct.hasHandler 0 1 1
A egwActionObject.setAllSelected 0 1 1
A egwFnct.exec 0 1 1
A egwEventQueue.queueTimeout 0 1 1
A egwActionObject.getRootObject 0 1 1
A egw_action.d.ts ➔ egwEventQueue 0 11 1
A egw_action.d.ts ➔ egwActionStoreJSON 0 21 1
A egwActionObject.getParentList 0 1 1
A egwActionImplementation.executeImplementation 0 1 1
A egw_action.d.ts ➔ getDropImplementation 0 1 1
A egwMenu._checkImpl 0 1 1
A egwAction.not_disableClass 0 1 1
A egwEventQueue.run 0 1 1
A egwActionObjectInterface.getDOMNode 0 1 1
A egwAction.setDefaultExecute 0 1 1
A egwActionObject.remove 0 1 1
A egwActionObject.getFocusedObject 0 1 1
A egw_action.d.ts ➔ egwActionObject 0 17 1
A egw_action.d.ts ➔ egw_getAppActionManager 0 7 1
A egwActionObject.addObject 0 1 1
A egw_action.d.ts ➔ _egwSearchMenuItem 0 4 1
A egw_action.d.ts ➔ _egw_nodeIsInInput 0 1 1
A egwActionObject.getSelectedLinks 0 1 1
A egw_action.d.ts ➔ sprintf 0 1 1
A egwMenuImpl.showAt 0 1 1
A egwMenu.showAt 0 1 1
A egwAction.getActionsByAttr 0 1 1
A egwActionObject.getPrevious 0 1 1
A egwActionObjectInterface.reconnectActions 0 1 1
A egwActionObject.getState 0 1 1
A egwAction.set_allowOnMultiple 0 1 1
A egwAction.updateAction 0 1 1
A egwActionObject.isSelection 0 1 1
A egwAction.set_onExecute 0 1 1
A egw_action.d.ts ➔ egwMenuImpl 0 15 1

How to fix   Complexity   

Complexity

Complex classes like api/js/egw_action/egw_action.d.ts often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

1
/**
2
 * EGroupware egw_action framework - TS declarations
3
 *
4
 * Generated with:
5
 * mkdir /tmp/egw_action
6
 * cd api/js/egw_action
7
 * tsc --declaration --allowJS --outDir /tmp/egw_action *.js
8
 * cat /tmp/egw_action/*.d.ts > egw_action.d.ts
9
 *
10
 * @link http://www.egroupware.org
11
 * @author Andreas Stöckel <[email protected]>
12
 * @copyright 2011 by Andreas Stöckel
13
 * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
14
 * @package egw_action
15
 */
16
/**
17
 * Returns the action manager for the given application - each application has its
18
 * own sub-ActionManager in the global action manager object to prevent collisions
19
 * from happening
20
 *
21
 * @param _id is the name of the sub-actionManager which should be returned.
22
 * 	If the action manager does not exist right now, it is created. If the
23
 * 	parameter is ommited or null, the global action manager is returned.
24
 * @param {boolean} [_create=true] If an objectManager with the given id is not
25
 *	found, it will be created at the top level.
26
 * @param {number} [_search_depth=Infinite] How deep into existing action children
27
 *	to search.
28
 */
29
declare function egw_getActionManager(_id: any, _create?: boolean, _search_depth?: number): any;
30
/**
31
 * Returns the object manager for the given application - each application may
32
 * have its own object manager where it can place action objects or containers.
33
 *
34
 * @param _id is the name of the sub-object manager should be returned. If the
35
 * 	object manager does not exists right now, it is created. If the parameter
36
 *	is ommited or null, the global object manager is returned.
37
 * @param {boolean} [_create=true] If an objectManager with the given id is not
38
 *	found, it will be created at the top level.
39
 * @param {number} [_search_depth=Infinite] How deep into existing action children
40
 *	to search.
41
 */
42
declare function egw_getObjectManager(_id: any, _create?: boolean, _search_depth?: number): any;
43
/**
44
 * Returns the object manager for the current application
45
 *
46
 * @param {boolean} _create
47
 * @return {egwActionObjectManager}
48
 */
49
declare function egw_getAppObjectManager(_create?: boolean): typeof egwActionObjectManager;
50
/**
51
 * Returns the action manager for the current application
52
 *
53
 * @param {boolean} _create
54
 * @return {egwActionManager}
55
 */
56
declare function egw_getAppActionManager(_create: boolean): typeof egwActionManager;
57
/** egwActionHandler Interface **/
58
/**
59
 * Constructor for the egwActionHandler interface which (at least) should have the
60
 * execute function implemented.
61
 *
62
 * @param {function} _executeEvent
63
 * @return {egwActionHandler}
64
 */
65
declare function egwActionHandler(_executeEvent: Function): egwActionHandler;
66
declare class egwActionHandler {
67
    /** egwActionHandler Interface **/
68
    /**
69
     * Constructor for the egwActionHandler interface which (at least) should have the
70
     * execute function implemented.
71
     *
72
     * @param {function} _executeEvent
73
     * @return {egwActionHandler}
74
     */
75
    constructor(_executeEvent: Function);
76
    execute: Function;
77
}
78
/**
79
 * Constructor for egwAction object
80
 *
81
 * @param {egwAction} _parent
82
 * @param {string} _id
83
 * @param {string} _caption
84
 * @param {string} _iconUrl
85
 * @param {(string|function)} _onExecute
86
 * @param {boolean} _allowOnMultiple
87
 * @returns {egwAction}
88
 */
89
declare function egwAction(_parent: egwAction, _id: string, _caption: string, _iconUrl: string, _onExecute: TimerHandler, _allowOnMultiple: boolean): egwAction;
90
declare class egwAction {
91
    /**
92
     * Constructor for egwAction object
93
     *
94
     * @param {egwAction} _parent
95
     * @param {string} _id
96
     * @param {string} _caption
97
     * @param {string} _iconUrl
98
     * @param {(string|function)} _onExecute
99
     * @param {boolean} _allowOnMultiple
100
     * @returns {egwAction}
101
     */
102
    constructor(_parent: egwAction, _id: string, _caption: string, _iconUrl: string, _onExecute: TimerHandler, _allowOnMultiple: boolean);
103
    id: string;
104
    caption: string;
105
    iconUrl: string;
106
    allowOnMultiple: boolean;
107
    enabled: any;
108
    hideOnDisabled: boolean;
109
    data: {};
110
    type: string;
111
    canHaveChildren: boolean;
112
    parent: egwAction;
113
    children: any[];
114
    onExecute: egwFnct;
115
    hideOnMobile: boolean;
116
    disableIfNoEPL: boolean;
117
    remove(): void;
118
    getActionById(_id: string | number, _search_depth?: number): egwAction;
119
    getActionsByAttr(_attr: string, _val: any): egwAction[];
120
    addAction(_type: string, _id: string, _caption: string, _iconUrl: any, _onExecute: TimerHandler, _allowOnMultiple: boolean): any;
121
    /**
122
     * Default icons for given id
123
     */
124
    defaultIcons: {
125
        view: string;
126
        edit: string;
127
        open: string;
128
        add: string;
129
        "new": string;
130
        "delete": string;
131
        cat: string;
132
        document: string;
133
        print: string;
134
        copy: string;
135
        move: string;
136
        cut: string;
137
        paste: string;
138
        save: string;
139
        apply: string;
140
        cancel: string;
141
        'continue': string;
142
        next: string;
143
        finish: string;
144
        back: string;
145
        previous: string;
146
        close: string;
147
    };
148
    updateActions(_actions: any, _app: string): void;
149
    not_disableClass(_action: any, _senders: any, _target: any): boolean;
150
    enableClass(_action: any, _senders: any, _target: any): boolean;
151
    enableId(_action: any, _senders: any, _target: any): any;
152
    setDefaultExecute(_value: TimerHandler): void;
153
    execute(_senders: any[], _target: any): void;
154
    _check_confirm_mass_selections(_senders: any, _target: any): boolean;
155
    _check_confirm(_senders: any, _target: any): any;
156
    set_onExecute(_value: string | boolean | Function): void;
157
    set_caption(_value: any): void;
158
    set_iconUrl(_value: any): void;
159
    set_enabled(_value: any): void;
160
    set_allowOnMultiple(_value: string | number | boolean): void;
161
    set_hideOnDisabled(_value: any): void;
162
    set_hideOnMobile(_value: any): void;
163
    set_disableIfNoEPL(_value: any): void;
164
    set_data(_value: any): void;
165
    updateAction(_data: any): void;
166
    appendToTree(_tree: any[], _addChildren: boolean): {
167
        "action": egwAction;
168
        "children": any[];
169
    };
170
    getManager(): any;
171
}
172
declare function _egwActionTreeContains(_tree: any, _elem: any): any;
173
/** egwActionManager Object **/
174
/**
175
 * egwActionManager manages a list of actions - it overwrites the egwAction class
176
 * and allows child actions to be added to it.
177
 *
178
 * @param {egwAction} _parent
179
 * @param {string} _id
180
 * @return {egwActionManager}
181
 */
182
declare function egwActionManager(_parent: egwAction, _id: string): typeof egwActionManager;
183
/** egwActionImplementation Interface **/
184
/**
185
 * Abstract interface for the egwActionImplementation object. The egwActionImplementation
186
 * object is responsible for inserting the actual action representation (context menu,
187
 * drag-drop code) into the DOM Tree by using the egwActionObjectInterface object
188
 * supplied by the object.
189
 * To write a "class" which derives from this object, simply write a own constructor,
190
 * which replaces "this" with a "new egwActionImplementation" and implement your
191
 * code in "doRegisterAction" und "doUnregisterAction".
192
 * Register your own implementation within the _egwActionClasses object.
193
 *
194
 * @return {egwActionImplementation}
195
 */
196
declare function egwActionImplementation(): egwActionImplementation;
197
declare class egwActionImplementation {
198
    doRegisterAction: () => never;
199
    doUnregisterAction: () => never;
200
    doExecuteImplementation: () => never;
201
    type: string;
202
    registerAction(_actionObjectInterface: any, _triggerCallback: Function, _context: any): any;
203
    unregisterAction(_actionObjectInterface: egwActionObjectInterface): any;
204
    executeImplementation(_context: any, _selected: any, _links: any): any;
205
}
206
/** egwActionLink Object **/
207
/**
208
 * The egwActionLink is used to interconnect egwActionObjects and egwActions.
209
 * This gives each action object the possibility to decide, whether the action
210
 * should be active in this context or not.
211
 *
212
 * @param _manager is a reference to the egwActionManager whic contains the action
213
 * 	the object wants to link to.
214
 */
215
declare function egwActionLink(_manager: any): void;
216
declare class egwActionLink {
217
    /** egwActionLink Object **/
218
    /**
219
     * The egwActionLink is used to interconnect egwActionObjects and egwActions.
220
     * This gives each action object the possibility to decide, whether the action
221
     * should be active in this context or not.
222
     *
223
     * @param _manager is a reference to the egwActionManager whic contains the action
224
     * 	the object wants to link to.
225
     */
226
    constructor(_manager: any);
227
    enabled: boolean;
228
    visible: boolean;
229
    actionId: string;
230
    actionObj: any;
231
    manager: any;
232
    updateLink(_data: any): void;
233
    set_enabled(_value: any): void;
234
    set_visible(_value: any): void;
235
    set_actionId(_value: any): void;
236
}
237
/**
238
 * The egwActionObject represents an abstract object to which actions may be
239
 * applied. Communication with the DOM tree is established by using the
240
 * egwActionObjectInterface (AOI), which is passed in the constructor.
241
 * egwActionObjects are organized in a tree structure.
242
 *
243
 * @param {string} _id is the identifier of the object which
244
 * @param {egwActionObject} _parent is the parent object in the hirachy. This may be set to NULL
245
 * @param {egwActionObjectInterface} _iface is the egwActionObjectInterface which connects the object
246
 * 	to the outer world.
247
 * @param {egwActionManager} _manager is the action manager this object is connected to
248
 * 	this object to the DOM tree. If the _manager isn't supplied, the parent manager
249
 * 	is taken.
250
 * @param {number} _flags a set of additional flags being applied to the object,
251
 * 	defaults to 0
252
 */
253
declare function egwActionObject(_id: string, _parent: egwActionObject, _iface: egwActionObjectInterface, _manager: typeof egwActionManager, _flags: number): void;
254
declare class egwActionObject {
255
    /**
256
     * The egwActionObject represents an abstract object to which actions may be
257
     * applied. Communication with the DOM tree is established by using the
258
     * egwActionObjectInterface (AOI), which is passed in the constructor.
259
     * egwActionObjects are organized in a tree structure.
260
     *
261
     * @param {string} _id is the identifier of the object which
262
     * @param {egwActionObject} _parent is the parent object in the hirachy. This may be set to NULL
263
     * @param {egwActionObjectInterface} _iface is the egwActionObjectInterface which connects the object
264
     * 	to the outer world.
265
     * @param {egwActionManager} _manager is the action manager this object is connected to
266
     * 	this object to the DOM tree. If the _manager isn't supplied, the parent manager
267
     * 	is taken.
268
     * @param {number} _flags a set of additional flags being applied to the object,
269
     * 	defaults to 0
270
     */
271
    constructor(_id: string, _parent: egwActionObject, _iface: egwActionObjectInterface, _manager: typeof egwActionManager, _flags: number);
272
    id: string;
273
    parent: egwActionObject;
274
    children: any[];
275
    actionLinks: any[];
276
    manager: typeof egwActionManager;
277
    flags: number;
278
    data: any;
279
    setSelectedCallback: any;
280
    registeredImpls: any[];
281
    selectedChildren: any[];
282
    focusedChild: string | egwActionObject;
283
    setAOI(_aoi: egwActionObjectInterface): void;
284
    iface: egwActionObjectInterface;
285
    getObjectById(_id: string, _search_depth?: number): egwActionObject;
286
    addObject(_id: any, _interface: any, _flags?: number): any;
287
    insertObject(_index: number, _id: any, _iface: any, _flags: number): any;
288
    clear(): void;
289
    remove(): void;
290
    getRootObject(): any;
291
    getParentList(): any;
292
    getContainerRoot(): any;
293
    getSelectedObjects(_test: Function, _list: any[]): any;
294
    getAllSelected(): boolean;
295
    toggleAllSelected(_select: any): any;
296
    flatList(_visibleOnly: boolean, _obj: any): any[];
297
    traversePath(_to: any): any[];
298
    getIndex(): number;
299
    getFocusedObject(): string | egwActionObject;
300
    _ifaceCallback(_newState: number, _changedBit: number, _shiftState: number): number;
301
    handleKeyPress(_keyCode: number, _shift: boolean, _ctrl: boolean, _alt: boolean): boolean;
302
    getPrevious(_intval: any): any;
303
    getNext(_intval: any): any;
304
    getSelected(): boolean;
305
    getFocused(): boolean;
306
    getVisible(): boolean;
307
    getState(): number;
308
    setFocused(_focused: boolean): void;
309
    setSelected(_selected: boolean): void;
310
    setAllSelected(_selected: boolean, _informParent: boolean): void;
311
    updateSelectedChildren(_child: string | egwActionObject, _selected: boolean): void;
312
    updateFocusedChild(_child: string | egwActionObject, _focused: boolean): void;
313
    updateActionLinks(_actionLinks: any[], _recursive?: boolean, _doCreate?: boolean): void;
314
    _reconnectCallback(): void;
315
    registerActions(): void;
316
    unregisterActions(): void;
317
    triggerCallback(): any;
318
    makeVisible(): void;
319
    executeActionImplementation(_implContext: any, _implType: string, _execType: number): any;
320
    forceSelection(): void;
321
    getSelectedLinks(_actionType: any): any;
322
    _getLinks(_objs: any[], _actionType: string): any;
323
    getActionLink(_actionId: string): any;
324
    getActionImplementationGroups(_test: Function, _groups: any): any;
325
    isDragOut(_event: Event): boolean;
326
    isSelection(_event: any): boolean;
327
}
328
/** egwActionObjectInterface Interface **/
329
/**
330
 * The egwActionObjectInterface has to be implemented for each actual object in
331
 * the browser. E.g. for the object "DataGridRow", there has to be an
332
 * egwActionObjectInterface which is responsible for returning the outer DOMNode
333
 * of the object to which JS-Events may be attached by the egwActionImplementation
334
 * object, and to do object specific stuff like highlighting the object in the
335
 * correct way and to route state changes (like: "object has been selected")
336
 * to the egwActionObject object the interface is associated to.
337
 *
338
 * @return {egwActionObjectInterface}
339
 */
340
declare function egwActionObjectInterface(): egwActionObjectInterface;
341
declare class egwActionObjectInterface {
342
    doGetDOMNode: () => any;
343
    doSetState: (_state: any, _outerCall: any) => void;
344
    doTriggerEvent: (_event: any, _data: any) => boolean;
345
    doMakeVisible: () => void;
346
    _state: number;
347
    stateChangeCallback: Function;
348
    stateChangeContext: any;
349
    reconnectActionsCallback: Function;
350
    reconnectActionsContext: any;
351
    setStateChangeCallback(_callback: Function, _context: any): void;
352
    setReconnectActionsCallback(_callback: Function, _context: any): void;
353
    reconnectActions(): void;
354
    updateState(_stateBit: number, _set: boolean, _shiftState: boolean): void;
355
    getDOMNode(): any;
356
    setState(_state: any): void;
357
    getState(): number;
358
    triggerEvent(_event: any, _data: any): boolean;
359
    makeVisible(): void;
360
}
361
/** egwActionObjectManager Object **/
362
/**
363
 * The egwActionObjectManager is a dummy class which only contains a dummy
364
 * AOI. It may be used as root object or as object containers.
365
 *
366
 * @param {egwAction} _id
367
 * @param {string} _manager
368
 * @return {egwActionObjectManager}
369
 */
370
declare function egwActionObjectManager(_id: egwAction, _manager: string): typeof egwActionObjectManager;
371
/**
372
 * eGroupWare egw_action framework - egw action framework
373
 *
374
 * @link http://www.egroupware.org
375
 * @author Andreas Stöckel <[email protected]>
376
 * @copyright 2011 by Andreas Stöckel
377
 * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
378
 * @package egw_action
379
 * @version $Id$
380
 */
381
/**
382
 * Getter functions for the global egwActionManager and egwObjectManager objects
383
 */
384
declare var egw_globalActionManager: any;
385
declare var egw_globalObjectManager: any;
386
/** egwActionObject Object **/
387
declare var EGW_AO_STATE_NORMAL: number;
388
declare var EGW_AO_STATE_SELECTED: number;
389
declare var EGW_AO_STATE_FOCUSED: number;
390
declare var EGW_AO_STATE_VISIBLE: number;
391
declare var EGW_AO_EVENT_DRAG_OVER_ENTER: number;
392
declare var EGW_AO_EVENT_DRAG_OVER_LEAVE: number;
393
declare var EGW_AO_SHIFT_STATE_NONE: number;
394
declare var EGW_AO_SHIFT_STATE_MULTI: number;
395
declare var EGW_AO_SHIFT_STATE_BLOCK: number;
396
declare var EGW_AO_FLAG_IS_CONTAINER: number;
397
declare var EGW_AO_FLAG_DEFAULT_FOCUS: number;
398
declare var EGW_AO_EXEC_SELECTED: number;
399
declare var EGW_AO_EXEC_THIS: number;
400
/** -- egwActionObjectDummyInterface Class -- **/
401
declare var egwActionObjectDummyInterface: typeof egwActionObjectInterface;
402
/**
403
 * eGroupWare egw_action framework - egw action framework
404
 *
405
 * @link http://www.egroupware.org
406
 * @author Andreas Stöckel <[email protected]>
407
 * @copyright 2011 by Andreas Stöckel
408
 * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
409
 * @package egw_action
410
 * @version $Id$
411
 */
412
/**
413
 * Sets properties given in _data in _obj. Checks whether the property keys
414
 * exists and if corresponding setter functions are available. Properties starting
415
 * with "_" are ignored.
416
 *
417
 * @param object _data may be an object with data that will be stored inside the
418
 * 	given object.
419
 * @param object _obj is the object where the data will be stored.
420
 * @param mixed _setterOnly false: store everything, true: only store when setter exists, "data" store rest in data property
421
 */
422
declare function egwActionStoreJSON(_data: any, _obj: any, _setterOnly: any): void;
423
/**
424
 * Switches the given bit in the set on or off.
425
 *
426
 * @param int _set is the current set
427
 * @param int _bit is the position of the bit which should be switched on/off
428
 * @param boolean _state is whether the bit should be switched on or off
429
 * @returns the new set
430
 */
431
declare function egwSetBit(_set: any, _bit: any, _state: any): number;
432
/**
433
 * Returns whether the given bit is set in the set.
434
 */
435
declare function egwBitIsSet(_set: any, _bit: any): boolean;
436
declare function egwObjectLength(_obj: any): number;
437
/**
438
 * Isolates the shift state from an event object
439
 */
440
declare function egwGetShiftState(e: any): number;
441
declare function egwPreventSelect(e: any): boolean;
442
declare class egwPreventSelect {
443
    constructor(e: any);
444
    onselectstart: () => boolean;
445
}
446
declare function egwResetPreventSelect(elem: any): void;
447
declare function egwUnfocus(): void;
448
declare function egwCallAbstract(_obj: any, _fn: any, _args: any): any;
449
declare function egwArraysEqual(_ar1: any, _ar2: any): boolean;
450
declare function egwQueueCallback(_proc: any, _args: any, _context: any, _id: any): void;
451
/**
452
 * The eventQueue object is used to have control over certain events such as
453
 * ajax responses or timeouts. Sometimes it may happen, that a function attached
454
 * to such an event should no longer be called - with egwEventQueue one has
455
 * a simple possibility to control that.
456
 */
457
/**
458
 * Constructor for the egwEventQueue class. Initializes the queue object and the
459
 * internal data structures such as the internal key.
460
 */
461
declare function egwEventQueue(): void;
462
declare class egwEventQueue {
463
    events: {};
464
    key_id: number;
465
    flush(): void;
466
    queue(_proc: any, _context: any, _args: any, _id: any): string;
467
    run(_key: any): void;
468
    queueTimeout(_proc: any, _context: any, _args: any, _id: any, _timeout: any): void;
469
}
470
/**
471
 * Class which is used to be able to handle references to JavaScript functions
472
 * from strings.
473
 *
474
 * @param object _context is the context in which the function will be executed.
475
 * @param mixed _default is the default value which should be returned when no
476
 * 	function (string) has been set. If it is a function this function will be
477
 * 	called.
478
 * @param array _acceptedTypes is an array of types which contains the "typeof"
479
 * 	strings of accepted non-functions in setValue
480
 */
481
declare function egwFnct(_context: any, _default: any, _acceptedTypes: any): void;
482
declare class egwFnct {
483
    /**
484
     * Class which is used to be able to handle references to JavaScript functions
485
     * from strings.
486
     *
487
     * @param object _context is the context in which the function will be executed.
488
     * @param mixed _default is the default value which should be returned when no
489
     * 	function (string) has been set. If it is a function this function will be
490
     * 	called.
491
     * @param array _acceptedTypes is an array of types which contains the "typeof"
492
     * 	strings of accepted non-functions in setValue
493
     */
494
    constructor(_context: any, _default: any, _acceptedTypes: any);
495
    context: any;
496
    acceptedTypes: any;
497
    fnct: any;
498
    value: any;
499
    isDefault: boolean;
500
    hasHandler(): boolean;
501
    setValue(_value: any): void;
502
    exec(...args: any[]): any;
503
}
504
declare function egwIsMobile(): any;
505
/**
506
sprintf() for JavaScript 0.6
507
508
Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
509
All rights reserved.
510
511
Redistribution and use in source and binary forms, with or without
512
modification, are permitted provided that the following conditions are met:
513
    * Redistributions of source code must retain the above copyright
514
      notice, this list of conditions and the following disclaimer.
515
    * Redistributions in binary form must reproduce the above copyright
516
      notice, this list of conditions and the following disclaimer in the
517
      documentation and/or other materials provided with the distribution.
518
    * Neither the name of sprintf() for JavaScript nor the
519
      names of its contributors may be used to endorse or promote products
520
      derived from this software without specific prior written permission.
521
522
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
523
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
524
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
525
DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY
526
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
527
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
528
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
529
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
530
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
531
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
532
533
534
Changelog:
535
2007.04.03 - 0.1:
536
 - initial release
537
2007.09.11 - 0.2:
538
 - feature: added argument swapping
539
2007.09.17 - 0.3:
540
 - bug fix: no longer throws exception on empty paramenters (Hans Pufal)
541
2007.10.21 - 0.4:
542
 - unit test and patch (David Baird)
543
2010.05.09 - 0.5:
544
 - bug fix: 0 is now preceeded with a + sign
545
 - bug fix: the sign was not at the right position on padded results (Kamal Abdali)
546
 - switched from GPL to BSD license
547
2010.05.22 - 0.6:
548
 - reverted to 0.4 and fixed the bug regarding the sign of the number 0
549
 Note:
550
 Thanks to Raphael Pigulla <raph (at] n3rd [dot) org> (http://www.n3rd.org/)
551
 who warned me about a bug in 0.5, I discovered that the last update was
552
 a regress. I appologize for that.
553
**/
554
declare function str_repeat(i: any, m: any): string;
555
declare function sprintf(...args: any[]): string;
556
declare var _egwQueuedCallbacks: {};
557
/**
558
 * Checks whether this is currently run on a mobile browser
559
 */
560
declare var _egw_mobileBrowser: any;
561
/**
562
 * The egwDragAction class overwrites the egwAction class and adds the new
563
 * "dragType" propery. The "onExecute" event of the drag action will be called
564
 * whenever dragging starts. The onExecute JS handler should return the
565
 * drag-drop helper object - otherwise an default helper will be generated.
566
 *
567
 * @param {egwAction} _id
568
 * @param {string} _handler
569
 * @param {string} _caption
570
 * @param {string} _icon
571
 * @param {(string|function)} _onExecute
572
 * @param {bool} _allowOnMultiple
573
 * @returns {egwDragAction}
574
 */
575
declare function egwDragAction(_id: egwAction, _handler: string, _caption: string, _icon: string, _onExecute: TimerHandler, _allowOnMultiple: any): typeof egwDragAction;
576
declare function getDragImplementation(): any;
577
declare function egwDragActionImplementation(): egwActionImplementation;
578
/**
579
 * The egwDropAction class overwrites the egwAction class and adds the "acceptedTypes"
580
 * property. This array should contain all "dragTypes" the drop action is allowed to
581
 *
582
 * @param {egwAction} _id
583
 * @param {string} _handler
584
 * @param {string} _caption
585
 * @param {string} _icon
586
 * @param {(string|function)} _onExecute
587
 * @param {bool} _allowOnMultiple
588
 * @returns {egwDropAction}
589
 */
590
declare function egwDropAction(_id: egwAction, _handler: string, _caption: string, _icon: string, _onExecute: TimerHandler, _allowOnMultiple: any): typeof egwDropAction;
591
declare function getDropImplementation(): any;
592
declare function egwDropActionImplementation(): egwActionImplementation;
593
declare var _dragActionImpl: any;
594
declare var _dropActionImpl: any;
595
declare var EGW_AI_DRAG: number;
596
declare var EGW_AI_DRAG_OUT: number;
597
declare var EGW_AI_DRAG_OVER: number;
598
declare function egwPopupAction(_id: any, _handler: any, _caption: any, _icon: any, _onExecute: any, _allowOnMultiple: any): egwAction;
599
declare function getPopupImplementation(): any;
600
declare function egwPopupActionImplementation(): egwActionImplementation;
601
declare var _popupActionImpl: any;
602
/**
603
 * eGroupWare egw_dragdrop_dhtmlxmenu - egw action framework
604
 *
605
 * @link http://www.egroupware.org
606
 * @author Andreas Stöckel <[email protected]>
607
 * @copyright 2011 by Andreas Stöckel
608
 * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
609
 * @package egw_action
610
 * @version $Id$
611
 */
612
/**
613
* This file contains an egw_actionObjectInterface which allows a dhtmlx tree
614
* row to be a drag target and contains a function which transforms a complete
615
* dhtmlx tree into egw_actionObjects
616
*/
617
declare function dhtmlxTree_getNode(_tree: any, _itemId: any): JQuery;
618
declare function dhtmlxtreeItemAOI(_tree: any, _itemId: any): egwActionObjectInterface;
619
/**
620
 * Checks whether the given keycode is in the list of valid key codes. If not,
621
 * returns -1.
622
 */
623
declare function egw_keycode_makeValid(_keyCode: any): any;
624
declare function _egw_nodeIsInInput(_node: any): any;
625
/**
626
 * Creates an unique key for the given shortcut
627
 */
628
declare function egw_shortcutIdx(_keyCode: any, _shift: any, _ctrl: any, _alt: any): string;
629
/**
630
 * Registers a global shortcut. If the shortcut already exists, it is overwritten.
631
 * @param int _keyCode is one of the keycode constants
632
 * @param bool _shift whether shift has to be set
633
 * @param bool _ctrl whether ctrl has to be set
634
 * @param bool _alt whether alt has to be set
635
 * @param function _handler the function which will be called when the shortcut
636
 * 	is evoked. An object containing the shortcut data will be passed as first
637
 * 	parameter.
638
 * @param object _context is the context in which the function will be executed
639
 */
640
declare function egw_registerGlobalShortcut(_keyCode: any, _shift: any, _ctrl: any, _alt: any, _handler: any, _context: any): void;
641
/**
642
 * Unregisters the given shortcut.
643
 */
644
declare function egw_unregisterGlobalShortcut(_keyCode: any, _shift: any, _ctrl: any, _alt: any): void;
645
/**
646
 * the egw_keyHandler function handles various key presses. The boolean
647
 * _shift, _ctrl, _alt values have been translated into platform independent
648
 * values (for apple devices).
649
 */
650
declare function egw_keyHandler(_keyCode: any, _shift: any, _ctrl: any, _alt: any): any;
651
/**
652
 * eGroupWare egw_action framework - Shortcut/Keyboard input manager
653
 *
654
 * @link http://www.egroupware.org
655
 * @author Andreas Stöckel <[email protected]>
656
 * @copyright 2011 by Andreas Stöckel
657
 * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
658
 * @package egw_action
659
 * @version $Id$
660
 */
661
/**
662
 * Define the key constants (IE doesn't support "const" keyword)
663
 */
664
declare var EGW_KEY_BACKSPACE: number;
665
declare var EGW_KEY_TAB: number;
666
declare var EGW_KEY_ENTER: number;
667
declare var EGW_KEY_ESCAPE: number;
668
declare var EGW_KEY_DELETE: number;
669
declare var EGW_KEY_SPACE: number;
670
declare var EGW_KEY_PAGE_UP: number;
671
declare var EGW_KEY_PAGE_DOWN: number;
672
declare var EGW_KEY_ARROW_LEFT: number;
673
declare var EGW_KEY_ARROW_UP: number;
674
declare var EGW_KEY_ARROW_RIGHT: number;
675
declare var EGW_KEY_ARROW_DOWN: number;
676
declare var EGW_KEY_0: number;
677
declare var EGW_KEY_1: number;
678
declare var EGW_KEY_2: number;
679
declare var EGW_KEY_3: number;
680
declare var EGW_KEY_4: number;
681
declare var EGW_KEY_5: number;
682
declare var EGW_KEY_6: number;
683
declare var EGW_KEY_7: number;
684
declare var EGW_KEY_8: number;
685
declare var EGW_KEY_9: number;
686
declare var EGW_KEY_A: number;
687
declare var EGW_KEY_B: number;
688
declare var EGW_KEY_C: number;
689
declare var EGW_KEY_D: number;
690
declare var EGW_KEY_E: number;
691
declare var EGW_KEY_F: number;
692
declare var EGW_KEY_G: number;
693
declare var EGW_KEY_H: number;
694
declare var EGW_KEY_I: number;
695
declare var EGW_KEY_J: number;
696
declare var EGW_KEY_K: number;
697
declare var EGW_KEY_L: number;
698
declare var EGW_KEY_M: number;
699
declare var EGW_KEY_N: number;
700
declare var EGW_KEY_O: number;
701
declare var EGW_KEY_P: number;
702
declare var EGW_KEY_Q: number;
703
declare var EGW_KEY_R: number;
704
declare var EGW_KEY_S: number;
705
declare var EGW_KEY_T: number;
706
declare var EGW_KEY_U: number;
707
declare var EGW_KEY_V: number;
708
declare var EGW_KEY_W: number;
709
declare var EGW_KEY_X: number;
710
declare var EGW_KEY_Y: number;
711
declare var EGW_KEY_Z: number;
712
declare var EGW_KEY_MENU: number;
713
declare var EGW_KEY_F1: number;
714
declare var EGW_KEY_F2: number;
715
declare var EGW_KEY_F3: number;
716
declare var EGW_KEY_F4: number;
717
declare var EGW_KEY_F5: number;
718
declare var EGW_KEY_F6: number;
719
declare var EGW_KEY_F7: number;
720
declare var EGW_KEY_F8: number;
721
declare var EGW_KEY_F9: number;
722
declare var EGW_KEY_F10: number;
723
declare var EGW_KEY_F11: number;
724
declare var EGW_KEY_F12: number;
725
declare var EGW_VALID_KEYS: number[];
726
declare function egw_keycode_translation_function(_nativeKeyCode: any): any;
727
declare var egw_registeredShortcuts: {};
728
/**
729
 * Internal function which generates a menu item with the given parameters as used
730
 * in e.g. the egwMenu.addItem function.
731
 */
732
declare function _egwGenMenuItem(_parent: any, _id: any, _caption: any, _iconUrl: any, _onClick: any): egwMenuItem;
733
/**
734
 * Internal function which parses the given menu tree in _elements and adds the
735
 * elements to the given parent.
736
 */
737
declare function _egwGenMenuStructure(_elements: any, _parent: any): egwMenuItem[];
738
/**
739
 * Internal function which searches for the given ID inside an element tree.
740
 */
741
declare function _egwSearchMenuItem(_elements: any, _id: any): any;
742
/**
743
 * Internal function which alows to set the onClick handler of multiple menu items
744
 */
745
declare function _egwSetMenuOnClick(_elements: any, _onClick: any): void;
746
/**
747
 * Constructor for the egwMenu object. The egwMenu object is a abstract representation
748
 * of a context/popup menu. The actual generation of the menu can by done by so
749
 * called menu implementations. Those are activated by simply including the JS file
750
 * of such an implementation.
751
 *
752
 * The currently available implementation is the "egwDhtmlxMenu.js" which is based
753
 * upon the dhtmlxmenu component.
754
 */
755
declare function egwMenu(): void;
756
declare class egwMenu {
757
    children: any[];
758
    instance: egwMenuImpl;
759
    _checkImpl(): boolean;
760
    showAt(_x: any, _y: any, _force: any): boolean;
761
    hide(): void;
762
    addItem(_id: any, _caption: any, _iconUrl: any, _onClick: any): egwMenuItem;
763
    clear(): void;
764
    loadStructure(_elements: any): void;
765
    getItem(_id: any): any;
766
    setGlobalOnClick(_onClick: any): void;
767
}
768
/**
769
 * Constructor for the egwMenuItem. Each entry in a menu (including seperators)
770
 * is represented by a menu item.
771
 */
772
declare function egwMenuItem(_parent: any, _id: any): void;
773
declare class egwMenuItem {
774
    /**
775
     * Constructor for the egwMenuItem. Each entry in a menu (including seperators)
776
     * is represented by a menu item.
777
     */
778
    constructor(_parent: any, _id: any);
779
    id: any;
780
    caption: string;
781
    checkbox: boolean;
782
    checked: boolean;
783
    groupIndex: number;
784
    enabled: boolean;
785
    iconUrl: string;
786
    onClick: any;
787
    default: boolean;
788
    data: any;
789
    shortcutCaption: any;
790
    children: any[];
791
    parent: any;
792
    getItem(_id: any): any;
793
    setGlobalOnClick(_onClick: any): void;
794
    addItem(_id: any, _caption: any, _iconUrl: any, _onClick: any): egwMenuItem;
795
    set_id(_value: any): void;
796
    set_caption(_value: any): void;
797
    set_checkbox(_value: any): void;
798
    set_checked(_value: any): void;
799
    set_groupIndex(_value: any): void;
800
    set_enabled(_value: any): void;
801
    set_onClick(_value: any): void;
802
    set_iconUrl(_value: any): void;
803
    set_default(_value: any): void;
804
    set_data(_value: any): void;
805
    set_hint(_value: any): void;
806
    hint: any;
807
    set_shortcutCaption(_value: any): void;
808
}
809
/**
810
 * eGroupWare egw_action framework - JS Menu abstraction
811
 *
812
 * @link http://www.egroupware.org
813
 * @author Andreas Stöckel <[email protected]>
814
 * @copyright 2011 by Andreas Stöckel
815
 * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
816
 * @package egw_action
817
 * @version $Id$
818
 */
819
declare var _egw_active_menu: any;
820
/**
821
 * eGroupWare egw_action framework - JS Menu abstraction
822
 *
823
 * @link http://www.egroupware.org
824
 * @author Andreas Stöckel <[email protected]>
825
 * @copyright 2011 by Andreas Stöckel
826
 * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
827
 * @package egw_action
828
 * @version $Id$
829
 */
830
/**
831
 *
832
 * @param {type} _structure
833
 */
834
declare function egwMenuImpl(_structure: any): void;
835
declare class egwMenuImpl {
836
    /**
837
     * eGroupWare egw_action framework - JS Menu abstraction
838
     *
839
     * @link http://www.egroupware.org
840
     * @author Andreas Stöckel <[email protected]>
841
     * @copyright 2011 by Andreas Stöckel
842
     * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
843
     * @package egw_action
844
     * @version $Id$
845
     */
846
    /**
847
     *
848
     * @param {type} _structure
849
     */
850
    constructor(_structure: any);
851
    dhtmlxmenu: any;
852
    _translateStructure(_structure: any, _parentId: any, _idCnt: any): number;
853
    showAt(_x: any, _y: any, _onHide: any): void;
854
    hide(): void;
855
}
856
/**
857
 * Main egwDynStyleSheet class - all egwDynStyleSheets share the same stylesheet
858
 * which is dynamically inserted into the head section of the DOM-Tree.
859
 * This stylesheet is created with the first egwDynStyleSheet class.
860
 */
861
declare function egwDynStyleSheet(): any;
862
declare class egwDynStyleSheet {
863
    styleSheet: any;
864
    selectors: {};
865
    selectorCount: number;
866
    updateRule(_selector: any, _rule: any): void;
867
}
868
/**
869
 * eGroupWare egw_action framework - egw action framework
870
 *
871
 * @link http://www.egroupware.org
872
 * @author Andreas Stöckel <[email protected]>
873
 * @copyright 2011 by Andreas Stöckel
874
 * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
875
 * @package egw_action
876
 * @version $Id$
877
 */
878
/**
879
 * Contains the egwDynStyleSheet class which allows dynamic generation of stylesheet
880
 * rules - updating a single stylesheet rule is way more efficient than updating
881
 * the element style of many objects.
882
 */
883
declare var EGW_DYNAMIC_STYLESHEET: any;
884