tsgrid-ui 2.7.1 → 2.9.0
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/CHANGELOG.md +173 -0
- package/dist/base.d.ts +148 -0
- package/dist/base.es6.js +11 -0
- package/dist/base.es6.js.map +1 -0
- package/dist/chunks/chunk-26XP2XU3.js +1795 -0
- package/dist/chunks/chunk-26XP2XU3.js.map +1 -0
- package/dist/chunks/chunk-3NYH6545.js +2423 -0
- package/dist/chunks/chunk-3NYH6545.js.map +1 -0
- package/dist/chunks/chunk-BIB3X2TW.js +1638 -0
- package/dist/chunks/chunk-BIB3X2TW.js.map +1 -0
- package/dist/chunks/chunk-DXZJHS4M.js +1283 -0
- package/dist/chunks/chunk-DXZJHS4M.js.map +1 -0
- package/dist/chunks/chunk-EVZMMVXO.js +1212 -0
- package/dist/chunks/chunk-EVZMMVXO.js.map +1 -0
- package/dist/chunks/chunk-GJD5NFWQ.js +2305 -0
- package/dist/chunks/chunk-GJD5NFWQ.js.map +1 -0
- package/dist/chunks/chunk-IYF3Q7GX.js +127 -0
- package/dist/chunks/chunk-IYF3Q7GX.js.map +1 -0
- package/dist/chunks/chunk-OFASTA2A.js +2980 -0
- package/dist/chunks/chunk-OFASTA2A.js.map +1 -0
- package/dist/chunks/chunk-OMLGN735.js +677 -0
- package/dist/chunks/chunk-OMLGN735.js.map +1 -0
- package/dist/chunks/chunk-WKSLGUB3.js +1127 -0
- package/dist/chunks/chunk-WKSLGUB3.js.map +1 -0
- package/dist/chunks/chunk-YBY52G2U.js +849 -0
- package/dist/chunks/chunk-YBY52G2U.js.map +1 -0
- package/dist/field.d.ts +329 -0
- package/dist/field.es6.js +11 -0
- package/dist/field.es6.js.map +1 -0
- package/dist/form.d.ts +162 -0
- package/dist/form.es6.js +14 -0
- package/dist/form.es6.js.map +1 -0
- package/dist/layout.d.ts +108 -0
- package/dist/layout.es6.js +13 -0
- package/dist/layout.es6.js.map +1 -0
- package/dist/locale.d.ts +30 -0
- package/dist/locale.es6.js +7 -0
- package/dist/locale.es6.js.map +1 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/popup.d.ts +92 -0
- package/dist/popup.es6.js +18 -0
- package/dist/popup.es6.js.map +1 -0
- package/dist/query-CKGg5Ugv.d.ts +81 -0
- package/dist/sidebar.d.ts +138 -0
- package/dist/sidebar.es6.js +11 -0
- package/dist/sidebar.es6.js.map +1 -0
- package/dist/tabs.d.ts +63 -0
- package/dist/tabs.es6.js +11 -0
- package/dist/tabs.es6.js.map +1 -0
- package/dist/toolbar.d.ts +97 -0
- package/dist/toolbar.es6.js +11 -0
- package/dist/toolbar.es6.js.map +1 -0
- package/dist/tooltip.d.ts +322 -0
- package/dist/tooltip.es6.js +18 -0
- package/dist/tooltip.es6.js.map +1 -0
- package/dist/tsgrid-ui.css +2 -2
- package/dist/tsgrid-ui.d.ts +16 -2004
- package/dist/tsgrid-ui.es6.js +7750 -23830
- package/dist/tsgrid-ui.es6.js.map +1 -1
- package/dist/tsgrid-ui.es6.min.js +28 -28
- package/dist/tsgrid-ui.js +96 -17
- package/dist/tsgrid-ui.min.css +2 -2
- package/dist/tsgrid-ui.min.js +24 -24
- package/dist/tsutils-message-CogFtVtO.d.ts +82 -0
- package/dist/utils.d.ts +418 -0
- package/dist/utils.es6.js +14 -0
- package/dist/utils.es6.js.map +1 -0
- package/package.json +26 -5
package/dist/tsgrid-ui.d.ts
CHANGED
|
@@ -1,1522 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
_mQuery?: MQueryData;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
declare class Query {
|
|
20
|
-
static version: number;
|
|
21
|
-
context: QueryContext;
|
|
22
|
-
nodes: Node[];
|
|
23
|
-
length: number;
|
|
24
|
-
[index: number]: Node;
|
|
25
|
-
constructor(selector: QuerySelector, context?: QueryContext);
|
|
26
|
-
static _fragment(html: string): DocumentFragment;
|
|
27
|
-
static _scriptConvert(node: Node): Node;
|
|
28
|
-
static _fixProp(name: string): string;
|
|
29
|
-
_insert(method: string, html: string | Query | Node): Query;
|
|
30
|
-
_save(node: Node, name: string, value: unknown): void;
|
|
31
|
-
get(index?: number): Node | Node[] | null;
|
|
32
|
-
eq(index: number): Query;
|
|
33
|
-
then(fun: (q: Query) => Query | null | undefined): Query;
|
|
34
|
-
find(selector: string): Query;
|
|
35
|
-
filter(selector: string | Node | ((node: Node) => boolean)): Query;
|
|
36
|
-
next(): Query;
|
|
37
|
-
prev(): Query;
|
|
38
|
-
shadow(selector?: string): Query;
|
|
39
|
-
closest(selector: string): Query;
|
|
40
|
-
host(all?: boolean): Query;
|
|
41
|
-
parent(selector?: string): Query;
|
|
42
|
-
parents(selector?: string, firstOnly?: boolean): Query;
|
|
43
|
-
add(more: Query | Node | Node[]): Query;
|
|
44
|
-
each(func: (node: Node, ind: number, col: Query) => void): Query;
|
|
45
|
-
append(html: string | Query | Node): Query;
|
|
46
|
-
prepend(html: string | Query | Node): Query;
|
|
47
|
-
after(html: string | Query | Node): Query;
|
|
48
|
-
before(html: string | Query | Node): Query;
|
|
49
|
-
replace(html: string | Query | Node): Query;
|
|
50
|
-
remove(): Query;
|
|
51
|
-
css(key?: string | Record<string, string | number>, value?: string | number): string | Record<string, string> | undefined | Query;
|
|
52
|
-
addClass(classes: string): Query;
|
|
53
|
-
removeClass(classes: string | string[] | null): Query;
|
|
54
|
-
toggleClass(classes: string | string[] | null, force?: boolean): Query;
|
|
55
|
-
hasClass(classes: string | string[] | null): boolean | string[];
|
|
56
|
-
on(events: string, options: AddEventListenerOptions | EventListener | {
|
|
57
|
-
delegate?: string;
|
|
58
|
-
} | undefined, callback?: EventListener): Query;
|
|
59
|
-
on(events: string, callback: EventListener): Query;
|
|
60
|
-
off(events?: string, options?: AddEventListenerOptions | EventListener, callback?: EventListener): Query;
|
|
61
|
-
trigger(name: string | Event | CustomEvent, options?: EventInit): Query;
|
|
62
|
-
attr(name: string): string | undefined;
|
|
63
|
-
attr(name: string | Record<string, string>, value?: string): Query;
|
|
64
|
-
removeAttr(...attrs: string[]): Query;
|
|
65
|
-
prop(name: string): unknown;
|
|
66
|
-
prop(name: string | Record<string, unknown>, value?: unknown): Query;
|
|
67
|
-
removeProp(...props: string[]): Query;
|
|
68
|
-
data(key?: string | Record<string, unknown>, value?: unknown): unknown | Query;
|
|
69
|
-
removeData(key: string | string[]): Query;
|
|
70
|
-
show(): Query;
|
|
71
|
-
hide(): Query;
|
|
72
|
-
toggle(force?: boolean): Query;
|
|
73
|
-
empty(): Query;
|
|
74
|
-
html(html?: string | HTMLElement): string | Query | undefined;
|
|
75
|
-
text(text?: string): unknown | Query;
|
|
76
|
-
val(value?: string): unknown | Query;
|
|
77
|
-
change(): Query;
|
|
78
|
-
click(): Query;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Part of TsUi 2.0 library — color cluster sub-module
|
|
83
|
-
* - Extracted from src/tsutils.ts by v2.1 SDD refactor (Phase 2)
|
|
84
|
-
* - No dependencies on TsBase, TsUtils, or any other sub-module (L1 DAG leaf)
|
|
85
|
-
* - All exports are plain functions — no default export
|
|
86
|
-
*
|
|
87
|
-
* 4-space indent (project convention for sub-modules).
|
|
88
|
-
*/
|
|
89
|
-
/** RGB(A) color as returned by parseColor() */
|
|
90
|
-
interface TsColorRgb {
|
|
91
|
-
r: number;
|
|
92
|
-
g: number;
|
|
93
|
-
b: number;
|
|
94
|
-
a: number;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* TsUtils v2.1 — Data / Object helpers sub-module (Phase 3+4 of v2.1 SDD)
|
|
99
|
-
*
|
|
100
|
-
* Contains: TsCloneOptions, clone, extend,
|
|
101
|
-
* naturalCompare, normMenu, getNested, encodeParams,
|
|
102
|
-
* prepareParams, parseRoute, debounce, wait
|
|
103
|
-
*
|
|
104
|
-
* Rules:
|
|
105
|
-
* - No default export
|
|
106
|
-
* - No import from tsbase.ts (INV-4)
|
|
107
|
-
* - No this.-dispatch inside function bodies (INV-8)
|
|
108
|
-
* - 4-space indent
|
|
109
|
-
*/
|
|
110
|
-
/** Options for TsUtils.clone() */
|
|
111
|
-
interface TsCloneOptions {
|
|
112
|
-
functions?: boolean;
|
|
113
|
-
elements?: boolean;
|
|
114
|
-
events?: boolean;
|
|
115
|
-
exclude?: string[] | ((key: string, ctx: {
|
|
116
|
-
obj: unknown;
|
|
117
|
-
parent: string;
|
|
118
|
-
}) => boolean);
|
|
119
|
-
parent?: string;
|
|
120
|
-
}
|
|
121
|
-
/** Options for TsUtils.normMenu() */
|
|
122
|
-
interface TsNormMenuOptions {
|
|
123
|
-
itemMap?: {
|
|
124
|
-
id: string;
|
|
125
|
-
text: string;
|
|
126
|
-
};
|
|
127
|
-
[key: string]: unknown;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* TsUi registry + checkName — Phase 0 of v2.3 SDD.
|
|
132
|
-
* DEPENDENCY-FREE: zero imports from tsutils/tsbase family.
|
|
133
|
-
*
|
|
134
|
-
* Hosts the mutable widget registry object (TsUi) and the name-validation
|
|
135
|
-
* helper (checkName) that were previously coupled to tsbase.ts via tsutils.ts,
|
|
136
|
-
* creating a tsbase ↔ tsutils import cycle. Moving them here breaks that cycle:
|
|
137
|
-
*
|
|
138
|
-
* tsbase.ts → tsutils-registry.ts → tsutils-type-guards.ts → (leaf)
|
|
139
|
-
*
|
|
140
|
-
* tsutils.ts re-exports TsUi from this module (does NOT re-declare it) to
|
|
141
|
-
* preserve the single-object identity required by INV-12 (referential equality
|
|
142
|
-
* across all import paths).
|
|
143
|
-
*
|
|
144
|
-
* Imports: only isAlphaNumeric from ./tsutils-type-guards.js
|
|
145
|
-
* Exports: TsUi, checkName
|
|
146
|
-
*/
|
|
147
|
-
/** Widget registry — widgets register here when constructed with a `name`. */
|
|
148
|
-
declare const TsUi: Record<string, unknown>;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Part of TsUi 2.0 library
|
|
152
|
-
* - Dependencies: TsUtils
|
|
153
|
-
* - on/off/trigger methods id not showing in help
|
|
154
|
-
* - refactored with event object
|
|
155
|
-
*
|
|
156
|
-
* Chanes in 2.0.+
|
|
157
|
-
* - added unmount that cleans up the box
|
|
158
|
-
*
|
|
159
|
-
*/
|
|
160
|
-
/**
|
|
161
|
-
* Payload object passed to handlers registered via `.on(eventName, handler)`.
|
|
162
|
-
*
|
|
163
|
-
* IMPORTANT — circular references:
|
|
164
|
-
* `event.owner` points back to the widget that triggered the event, and that
|
|
165
|
-
* widget keeps `activeEvents: TsEvent[]` referencing this same payload.
|
|
166
|
-
* Calling `JSON.stringify(event)` will throw "Converting circular structure
|
|
167
|
-
* to JSON". Use `toSafeEvent(event)` from `tsgrid-ui` to extract a
|
|
168
|
-
* serializable subset before storing in reactive state (Angular signals,
|
|
169
|
-
* React state, Pinia/Redux stores, etc.).
|
|
170
|
-
*
|
|
171
|
-
* Note: the per-class declarations like `onSelect: (event: CustomEvent) => void`
|
|
172
|
-
* in TsGrid/TsForm/etc. are historical noise — the runtime always passes a
|
|
173
|
-
* `TsEventPayload`, never a DOM `CustomEvent`. This will be corrected in v2.0.
|
|
174
|
-
*/
|
|
175
|
-
interface TsEventPayload<TDetail = unknown> {
|
|
176
|
-
type: string | null;
|
|
177
|
-
phase: 'before' | 'after' | string;
|
|
178
|
-
detail: TDetail & TsEventData;
|
|
179
|
-
target: unknown;
|
|
180
|
-
object: unknown;
|
|
181
|
-
isStopped: boolean;
|
|
182
|
-
isCancelled: boolean;
|
|
183
|
-
/** Reference to the widget that triggered this event. CIRCULAR — do not serialize. */
|
|
184
|
-
owner: unknown;
|
|
185
|
-
}
|
|
186
|
-
interface TsEventData {
|
|
187
|
-
type?: string | null;
|
|
188
|
-
target?: unknown;
|
|
189
|
-
phase?: string;
|
|
190
|
-
object?: unknown;
|
|
191
|
-
[key: string]: unknown;
|
|
192
|
-
}
|
|
193
|
-
interface TsEventListener {
|
|
194
|
-
name: string;
|
|
195
|
-
edata: {
|
|
196
|
-
type: string | null;
|
|
197
|
-
execute: string;
|
|
198
|
-
onComplete: null;
|
|
199
|
-
scope?: string;
|
|
200
|
-
handler?: unknown;
|
|
201
|
-
[key: string]: unknown;
|
|
202
|
-
};
|
|
203
|
-
handler: Function;
|
|
204
|
-
}
|
|
205
|
-
declare class TsEvent {
|
|
206
|
-
type: string | null;
|
|
207
|
-
detail: TsEventData;
|
|
208
|
-
owner: TsBase;
|
|
209
|
-
target: unknown;
|
|
210
|
-
phase: string;
|
|
211
|
-
object: unknown;
|
|
212
|
-
execute: null;
|
|
213
|
-
isStopped: boolean;
|
|
214
|
-
isCancelled: boolean;
|
|
215
|
-
onComplete: ((edata: TsEvent) => void) | null;
|
|
216
|
-
listeners: Array<(edata: TsEvent) => void>;
|
|
217
|
-
complete: Promise<TsEvent>;
|
|
218
|
-
_resolve: (value: TsEvent) => void;
|
|
219
|
-
_reject: (reason?: unknown) => void;
|
|
220
|
-
constructor(owner: TsBase, edata: TsEventData);
|
|
221
|
-
finish(detail?: Partial<TsEventData>): void;
|
|
222
|
-
done(func: (edata: TsEvent) => void): void;
|
|
223
|
-
preventDefault(): void;
|
|
224
|
-
stopPropagation(): void;
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Extract a JSON-serializable subset of a TsEvent payload, dropping the
|
|
228
|
-
* circular `owner` and `complete` references. Use before storing in
|
|
229
|
-
* Angular signals, React state, Pinia/Redux stores, or any DevTools that
|
|
230
|
-
* snapshots state via JSON.
|
|
231
|
-
*
|
|
232
|
-
* @example
|
|
233
|
-
* grid.on('select', (event) => {
|
|
234
|
-
* this.lastSelection.set(toSafeEvent(event))
|
|
235
|
-
* })
|
|
236
|
-
*/
|
|
237
|
-
declare function toSafeEvent<TDetail = unknown>(event: unknown): {
|
|
238
|
-
type: string | null;
|
|
239
|
-
phase: string;
|
|
240
|
-
detail: TDetail & TsEventData;
|
|
241
|
-
isStopped: boolean;
|
|
242
|
-
isCancelled: boolean;
|
|
243
|
-
};
|
|
244
|
-
declare class TsBase {
|
|
245
|
-
activeEvents: TsEvent[];
|
|
246
|
-
listeners: TsEventListener[];
|
|
247
|
-
debug: boolean;
|
|
248
|
-
name?: string;
|
|
249
|
-
box?: HTMLElement | null;
|
|
250
|
-
[key: string]: unknown;
|
|
251
|
-
/**
|
|
252
|
-
* Initializes base object for TsUi, registers it with TsUi object
|
|
253
|
-
*
|
|
254
|
-
* @param {string} name - name of the object
|
|
255
|
-
* @returns
|
|
256
|
-
*/
|
|
257
|
-
constructor(name?: string);
|
|
258
|
-
/**
|
|
259
|
-
* Adds event listener, supports event phase and event scoping
|
|
260
|
-
*
|
|
261
|
-
* @param {*} edata - an object or string, if string "eventName:phase.scope"
|
|
262
|
-
* @param {*} handler
|
|
263
|
-
* @returns itself
|
|
264
|
-
*/
|
|
265
|
-
on(events: string | TsEventData | Array<string | TsEventData>, handler: Function): this;
|
|
266
|
-
/**
|
|
267
|
-
* Removes event listener, supports event phase and event scoping
|
|
268
|
-
*
|
|
269
|
-
* @param {*} edata - an object or string, if string "eventName:phase.scope"
|
|
270
|
-
* @param {*} handler
|
|
271
|
-
* @returns itself
|
|
272
|
-
*/
|
|
273
|
-
off(events: string | TsEventData | Array<string | TsEventData>, handler?: Function): this;
|
|
274
|
-
/**
|
|
275
|
-
* Triggers even listeners for a specific event, loops through this.listeners
|
|
276
|
-
*
|
|
277
|
-
* @param {Object} edata - Object
|
|
278
|
-
* @returns modified edata
|
|
279
|
-
*
|
|
280
|
-
* NOTE: `edata` is typed as `any` here intentionally. The method mutates the argument
|
|
281
|
-
* from TsEventData into a TsEvent mid-execution. Runtime type mutation is inherent
|
|
282
|
-
* to the event dispatch pattern. Phase 6 strict tighten will revisit this.
|
|
283
|
-
*/
|
|
284
|
-
trigger(eventName: string | TsEventData | TsEvent, edataIn?: TsEventData): TsEvent;
|
|
285
|
-
/**
|
|
286
|
-
* This method renders component into the box. It is overwritten in descendents and in this base
|
|
287
|
-
* component it is empty.
|
|
288
|
-
*/
|
|
289
|
-
render(_box?: HTMLElement | string | null): void;
|
|
290
|
-
/**
|
|
291
|
-
* Removes all classes that start with tsg-* and sets box to null. It is needed so that control will
|
|
292
|
-
* release the box to be used for other widgets
|
|
293
|
-
*/
|
|
294
|
-
unmount(): void;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* TsUtils message cluster (message/alert/confirm/prompt/normButtons + types)
|
|
299
|
-
* — Phase 2-4 of v2.3 SDD (message-cluster-extraction).
|
|
300
|
-
*
|
|
301
|
-
* IMPORTANT: This module imports TsBase from tsbase.ts — the only carve-out
|
|
302
|
-
* to INV-4. Rationale: message() does `new TsBase()` to mix events into msgBase.
|
|
303
|
-
* This exception is documented here and whitelisted in the INV-4 grep policy.
|
|
304
|
-
*
|
|
305
|
-
* Exports (Phase 2):
|
|
306
|
-
* normButtons — standalone pure helper; no DOM, no timers
|
|
307
|
-
*
|
|
308
|
-
* Exports (Phase 3a):
|
|
309
|
-
* TsMessageProm, TsMessageWhere, TsMessageOptions (types)
|
|
310
|
-
* MessageDeps (deps interface for _message — scaffold for Phase 3b)
|
|
311
|
-
* _message (stub — body lands in Phase 3b)
|
|
312
|
-
*
|
|
313
|
-
* Exports (Phase 3b+):
|
|
314
|
-
* _message (full body), _alert, _confirm, _prompt (Phase 4)
|
|
315
|
-
*
|
|
316
|
-
* Imports: TsBase from tsbase.ts (INV-4 carve-out, see above)
|
|
317
|
-
* TsUISettings type from tsutils.ts (type-only, no runtime dep)
|
|
318
|
-
* query from query.js (DOM helper)
|
|
319
|
-
*/
|
|
320
|
-
|
|
321
|
-
/** Promise-chain handle returned by message() / confirm() / prompt() */
|
|
322
|
-
interface TsMessageProm {
|
|
323
|
-
self: TsBase;
|
|
324
|
-
action(callBack: (event: unknown) => void): TsMessageProm;
|
|
325
|
-
close(callBack: (event: unknown) => void): TsMessageProm;
|
|
326
|
-
open(callBack: (event: unknown) => void): TsMessageProm;
|
|
327
|
-
then(callBack: (event: unknown) => void): TsMessageProm;
|
|
328
|
-
change?: (callBack: (event: unknown) => void) => TsMessageProm;
|
|
329
|
-
[key: string]: unknown;
|
|
330
|
-
}
|
|
331
|
-
/** Where-descriptor for message() */
|
|
332
|
-
interface TsMessageWhere {
|
|
333
|
-
box: string | Element | null;
|
|
334
|
-
after?: string | Element | null;
|
|
335
|
-
owner?: {
|
|
336
|
-
name?: string;
|
|
337
|
-
lock?: (...args: unknown[]) => void;
|
|
338
|
-
unlock?: (...args: unknown[]) => void;
|
|
339
|
-
focus?: () => void;
|
|
340
|
-
};
|
|
341
|
-
param?: unknown;
|
|
342
|
-
}
|
|
343
|
-
/** Options for message() */
|
|
344
|
-
interface TsMessageOptions {
|
|
345
|
-
width?: number;
|
|
346
|
-
height?: number;
|
|
347
|
-
text?: string | null;
|
|
348
|
-
body?: string;
|
|
349
|
-
buttons?: string;
|
|
350
|
-
html?: string;
|
|
351
|
-
focus?: number | string | null;
|
|
352
|
-
hideOn?: string[];
|
|
353
|
-
actions?: Record<string, unknown>;
|
|
354
|
-
cancelAction?: string;
|
|
355
|
-
on?: unknown;
|
|
356
|
-
onOpen?: unknown;
|
|
357
|
-
onClose?: unknown;
|
|
358
|
-
onAction?: unknown;
|
|
359
|
-
originalWidth?: number;
|
|
360
|
-
originalHeight?: number;
|
|
361
|
-
msgIndex?: number;
|
|
362
|
-
tmp?: {
|
|
363
|
-
zIndex: string;
|
|
364
|
-
overflow: string;
|
|
365
|
-
};
|
|
366
|
-
input?: Element | null;
|
|
367
|
-
box?: Element | null;
|
|
368
|
-
trigger?: (event: string, data: Record<string, unknown>) => unknown;
|
|
369
|
-
close?: () => void;
|
|
370
|
-
setFocus?: (focus: number | string | null | undefined) => void;
|
|
371
|
-
action?: (action: string, event: unknown) => void;
|
|
372
|
-
[key: string]: unknown;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* TsUtils DOM sub-module — Phase 5b of v2.4 SDD.
|
|
377
|
-
* DAG position: leaf module (no tsbase/tsutils imports).
|
|
378
|
-
*
|
|
379
|
-
* Imports: ./tsutils-string.js (_encodeTags), ./tsutils-type-guards.js (_isInt),
|
|
380
|
-
* ./tsutils-data.js (_extend), ./query.js (query, Query), DOM globals only.
|
|
381
|
-
* 4-space indent convention.
|
|
382
|
-
*
|
|
383
|
-
* INV-4: MUST NOT import from tsbase.ts or tsutils.ts.
|
|
384
|
-
* INV-8: No arguments.length usage.
|
|
385
|
-
* INV-9: No this.X in exported function bodies.
|
|
386
|
-
*/
|
|
387
|
-
/** Options for TsUtils.lock() — moved from tsutils.ts (Phase 5a of v2.4 SDD) */
|
|
388
|
-
interface TsLockOptions {
|
|
389
|
-
msg?: string | number;
|
|
390
|
-
spinner?: boolean;
|
|
391
|
-
opacity?: number;
|
|
392
|
-
bgColor?: string;
|
|
393
|
-
onClick?: () => void;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* TsUtils date-time sub-module — Phase 5b of v2.5 SDD.
|
|
398
|
-
* DAG position: leaf module (no tsbase/tsutils imports).
|
|
399
|
-
*
|
|
400
|
-
* Imports:
|
|
401
|
-
* ./tsutils-type-guards.js — isInt as _isInt (needed by isDate, isTime, formatDate, formatTime)
|
|
402
|
-
* ./tsutils.js — type-only import type { TsUISettings } (TS erases at emit)
|
|
403
|
-
* Precedent: tsutils-type-guards.ts:9, tsutils-message.ts:26
|
|
404
|
-
*
|
|
405
|
-
* INV-4: MUST NOT import from tsbase.ts or tsutils.ts at runtime.
|
|
406
|
-
* INV-8: No arguments.length usage.
|
|
407
|
-
* INV-9: No this.X in exported function bodies.
|
|
408
|
-
*
|
|
409
|
-
* 4-space indent convention.
|
|
410
|
-
*
|
|
411
|
-
* OQ-2 (TsTimeResult): local non-exported interface `TsTimeResult` defined inline
|
|
412
|
-
* here (structurally identical to tsutils.ts copy). Avoids back-import of a
|
|
413
|
-
* non-exported type; the class delegator in tsutils.ts casts via `as boolean | TsTimeResult`.
|
|
414
|
-
*
|
|
415
|
-
* R-DT-3 (settings reference): `settings` is passed as a reference to `this.settings`
|
|
416
|
-
* from delegators — never cloned. TsLocale mutations to fullmonths/shortmonths/dateFormat
|
|
417
|
-
* etc. flow through without restart.
|
|
418
|
-
*
|
|
419
|
-
* R-DT-2 / R-DT-8 (intra-cluster calls): _isDateTime calls _isDate + _isTime directly
|
|
420
|
-
* as module-level function refs. _formatDateTime calls _formatDate + _formatTime directly.
|
|
421
|
-
* _formatTime calls _isTime directly. Zero this.X inside any extracted body.
|
|
422
|
-
*/
|
|
423
|
-
|
|
424
|
-
/** Return value from _isTime() / TsUtils.isTime() when retTime === true — single canonical declaration (v2.6 dedup) */
|
|
425
|
-
interface TsTimeResult {
|
|
426
|
-
hours: number;
|
|
427
|
-
minutes: number;
|
|
428
|
-
seconds: number;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
/**
|
|
432
|
-
* Part of TsUi 2.0 library
|
|
433
|
-
* - Dependencies: mQuery, TsUtils, TsBase, TsLocale
|
|
434
|
-
*
|
|
435
|
-
* T2.5: @ts-nocheck removed; file typed aggressively per typing_policy.
|
|
436
|
-
* See commit body for targeted-any inventory.
|
|
437
|
-
*
|
|
438
|
-
* == TODO ==
|
|
439
|
-
* - add TsUtils.lang wrap for all captions in all buttons.
|
|
440
|
-
* - check transition (also with layout)
|
|
441
|
-
* - deprecate TsUtils.tooltip
|
|
442
|
-
*
|
|
443
|
-
* == 2.0 changes
|
|
444
|
-
* - CSP - fixed inline events (TsUtils.tooltip still has it)
|
|
445
|
-
* - transition returns a promise
|
|
446
|
-
* - removed jQuery
|
|
447
|
-
* - refactores TsUtils.message()
|
|
448
|
-
* - added TsUtils.confirm()
|
|
449
|
-
* - added isPlainObject
|
|
450
|
-
* - added stripSpaces
|
|
451
|
-
* - implemented marker - can now take an element or just html
|
|
452
|
-
* - cssPrefix - deprecated
|
|
453
|
-
* - TsUtils.debounce
|
|
454
|
-
* - TsUtils.prepareParams
|
|
455
|
-
* - TsUtils.getStrHeight
|
|
456
|
-
* - TsUtils.getStrDimentions
|
|
457
|
-
* - TsUtils.alrert() - same as TsUtils.message()
|
|
458
|
-
* - TsUtils.prompt() - similar to TsPrompt
|
|
459
|
-
* - TsUtils.normMenu(..., options) got options parameter that can have itemMap
|
|
460
|
-
* - TsUtils.getNested()
|
|
461
|
-
* - TsUtils.wait() - async timer
|
|
462
|
-
*/
|
|
463
|
-
|
|
464
|
-
declare const query: (selector: unknown, context?: unknown) => Query;
|
|
465
|
-
/** Settings object merged from TsLocale + user locale overrides */
|
|
466
|
-
interface TsUISettings {
|
|
467
|
-
dataType: string;
|
|
468
|
-
dateFormat: string;
|
|
469
|
-
timeFormat: string;
|
|
470
|
-
datetimeFormat: string;
|
|
471
|
-
dateStartYear: number;
|
|
472
|
-
dateEndYear: number;
|
|
473
|
-
currencyPrefix: string;
|
|
474
|
-
currencySuffix: string;
|
|
475
|
-
currencyPrecision: number;
|
|
476
|
-
groupSymbol: string;
|
|
477
|
-
decimalSymbol: string;
|
|
478
|
-
shortmonths: string[];
|
|
479
|
-
fullmonths: string[];
|
|
480
|
-
shortdays: string[];
|
|
481
|
-
fulldays: string[];
|
|
482
|
-
weekStarts: string;
|
|
483
|
-
macButtonOrder: boolean;
|
|
484
|
-
warnNoPhrase: boolean;
|
|
485
|
-
phrases: Record<string, string> | null;
|
|
486
|
-
missing?: Record<string, string>;
|
|
487
|
-
locale?: string;
|
|
488
|
-
[key: string]: unknown;
|
|
489
|
-
}
|
|
490
|
-
/** Extra data passed to grid cell formatters */
|
|
491
|
-
interface TsFormatterExtra {
|
|
492
|
-
value: unknown;
|
|
493
|
-
params?: unknown;
|
|
494
|
-
record?: unknown;
|
|
495
|
-
[key: string]: unknown;
|
|
496
|
-
}
|
|
497
|
-
/** Signature of a grid-cell formatter function */
|
|
498
|
-
type TsFormatter = (record: TsFormatterExtra, extra?: TsFormatterExtra) => string;
|
|
499
|
-
|
|
500
|
-
/** A normalized menu item */
|
|
501
|
-
interface TsMenuItem {
|
|
502
|
-
id: string | number | null;
|
|
503
|
-
text: string;
|
|
504
|
-
caption?: string;
|
|
505
|
-
class?: string;
|
|
506
|
-
style?: string;
|
|
507
|
-
attrs?: string;
|
|
508
|
-
[key: string]: unknown;
|
|
509
|
-
}
|
|
510
|
-
declare class Utils {
|
|
511
|
-
version: string;
|
|
512
|
-
tmp: Record<string, unknown>;
|
|
513
|
-
settings: TsUISettings;
|
|
514
|
-
i18nCompare: (a: string, b: string) => number;
|
|
515
|
-
hasLocalStorage: boolean;
|
|
516
|
-
isMac: boolean;
|
|
517
|
-
isMobile: boolean;
|
|
518
|
-
isIOS: boolean;
|
|
519
|
-
isAndroid: boolean;
|
|
520
|
-
isSafari: boolean;
|
|
521
|
-
isFirefox: boolean;
|
|
522
|
-
formatters: Record<string, TsFormatter>;
|
|
523
|
-
constructor();
|
|
524
|
-
isBin(val: unknown): boolean;
|
|
525
|
-
isInt(val: unknown): boolean;
|
|
526
|
-
isFloat(val: unknown): boolean;
|
|
527
|
-
isMoney(val: unknown): boolean;
|
|
528
|
-
isHex(val: unknown): boolean;
|
|
529
|
-
isAlphaNumeric(val: unknown): boolean;
|
|
530
|
-
isEmail(val: unknown): boolean;
|
|
531
|
-
isIpAddress(val: unknown): boolean;
|
|
532
|
-
isDate(val: unknown, format?: string | null, retDate?: boolean): boolean | Date;
|
|
533
|
-
isTime(val: unknown, retTime?: boolean): boolean | TsTimeResult;
|
|
534
|
-
isDateTime(val: unknown, format?: string | null, retDate?: boolean): boolean | Date;
|
|
535
|
-
age(dateStr: unknown): string;
|
|
536
|
-
interval(value: number): string;
|
|
537
|
-
date(dateStr: unknown): string;
|
|
538
|
-
formatSize(sizeStr: unknown): string | number;
|
|
539
|
-
formatNumber(val: unknown, fraction?: number | string | null, useGrouping?: boolean): string;
|
|
540
|
-
formatDate(dateStr: unknown, format?: string | null): string;
|
|
541
|
-
formatTime(dateStr: unknown, format?: string | null): string;
|
|
542
|
-
formatDateTime(dateStr: unknown, format?: string | null): string;
|
|
543
|
-
stripSpaces(html: unknown): unknown;
|
|
544
|
-
stripTags(html: unknown): unknown;
|
|
545
|
-
encodeTags(html: unknown): unknown;
|
|
546
|
-
decodeTags(html: unknown): unknown;
|
|
547
|
-
escapeId(id: unknown): string;
|
|
548
|
-
unescapeId(id: string | null | undefined): string;
|
|
549
|
-
base64encode(str: string): string;
|
|
550
|
-
base64decode(encodedStr: string): string;
|
|
551
|
-
sha256(str: string): Promise<string>;
|
|
552
|
-
transition(div_old: HTMLElement, div_new: HTMLElement, type: string, callBack?: () => void): Promise<void>;
|
|
553
|
-
lock(box: unknown, options?: TsLockOptions | string, ...rest: unknown[]): void;
|
|
554
|
-
unlock(box: unknown, speed?: number): void;
|
|
555
|
-
/**
|
|
556
|
-
* Opens a context message, similar in parameters as TsPopup.open()
|
|
557
|
-
*
|
|
558
|
-
* Sample Calls
|
|
559
|
-
* TsUtils.message({ box: '#div', text: 'message' }).ok(() => {})
|
|
560
|
-
* TsUtils.message({ box: '#div', text: 'message', width: 300 }).ok(() => {})
|
|
561
|
-
* TsUtils.message({ box: '#div', text: 'message', actions: ['Save'] }).Save(() => {})
|
|
562
|
-
*
|
|
563
|
-
* Used in TsGrid, TsForm, TsLayout (should be in TsPopup too)
|
|
564
|
-
* should be called with .call(...) method
|
|
565
|
-
*
|
|
566
|
-
* @param where = {
|
|
567
|
-
* box, // where to open
|
|
568
|
-
* after, // title if any, adds title heights
|
|
569
|
-
* param // additional parameters, used in layouts for panel
|
|
570
|
-
* }
|
|
571
|
-
* @param options {
|
|
572
|
-
* width, // (int), width in px, if negative, then it is maxWidth - width
|
|
573
|
-
* height, // (int), height in px, if negative, then it is maxHeight - height
|
|
574
|
-
* text, // centered text
|
|
575
|
-
* body, // body of the message
|
|
576
|
-
* buttons, // buttons of the message
|
|
577
|
-
* html, // if body & buttons are not defined, then html is the entire message
|
|
578
|
-
* focus, // int or id with a selector, default is 0
|
|
579
|
-
* hideOn, // ['esc', 'click'], default is ['esc']
|
|
580
|
-
* actions, // array of actions (only if buttons is not defined)
|
|
581
|
-
* onOpen, // event when opened
|
|
582
|
-
* onClose, // event when closed
|
|
583
|
-
* onAction, // event on action
|
|
584
|
-
* }
|
|
585
|
-
*/
|
|
586
|
-
message(where: TsMessageWhere, options?: TsMessageOptions | string | number): TsMessageProm | undefined;
|
|
587
|
-
alert(where: TsMessageWhere, options?: TsMessageOptions | string | number): TsMessageProm | undefined;
|
|
588
|
-
/**
|
|
589
|
-
* Shows a prompt as a context message. It will use same where: { box: ... } as TsUtils.message() function
|
|
590
|
-
* but it will have options similar to TsPrompt dialog
|
|
591
|
-
*
|
|
592
|
-
* Example:
|
|
593
|
-
* - TsUtils.conrirm({
|
|
594
|
-
* box: '#custom',
|
|
595
|
-
* text: 'Some message'
|
|
596
|
-
* })
|
|
597
|
-
* .yes(event => console.log(event))
|
|
598
|
-
*/
|
|
599
|
-
confirm(where: TsMessageWhere, options?: TsMessageOptions | string | number): TsMessageProm | undefined;
|
|
600
|
-
/**
|
|
601
|
-
* Shows a prompt as a context message. It will use same where: { box: ... } as TsUtils.message() function
|
|
602
|
-
* but it will have options similar to TsPrompt dialog
|
|
603
|
-
*
|
|
604
|
-
* Example:
|
|
605
|
-
* - TsUtils.prompt({
|
|
606
|
-
* box: '#custom',
|
|
607
|
-
* label: 'Enter Name',
|
|
608
|
-
* textarea: false,
|
|
609
|
-
* attrs: 'style="border: 1px solid red"'
|
|
610
|
-
* })
|
|
611
|
-
* .ok(event => console.log(event))
|
|
612
|
-
*/
|
|
613
|
-
prompt(where: TsMessageWhere, options?: TsMessageOptions | string | number): TsMessageProm | undefined;
|
|
614
|
-
/**
|
|
615
|
-
* Normalizes yes, no buttons for confirmation dialog
|
|
616
|
-
*
|
|
617
|
-
* @param {*} options
|
|
618
|
-
* @returns options
|
|
619
|
-
*/
|
|
620
|
-
normButtons(options: Record<string, unknown>, btn: Record<string, unknown>): Record<string, unknown>;
|
|
621
|
-
/**
|
|
622
|
-
* Shows small notification message at the bottom of the page, or containter that you specify
|
|
623
|
-
* in options.where (could be element or a selector)
|
|
624
|
-
*
|
|
625
|
-
* TsUtils.notify('Document saved')
|
|
626
|
-
* TsUtils.notify('Mesage sent ${udon}', { actions: { undo: function () {...} }})
|
|
627
|
-
*
|
|
628
|
-
* @param {String/Object} options can be {
|
|
629
|
-
* text: string, // message, can be html
|
|
630
|
-
* where: el/selector, // element or selector where to show, default is document.body
|
|
631
|
-
* timeout: int, // timeout when to hide, if 0 - indefinite
|
|
632
|
-
* error: boolean, // add error clases
|
|
633
|
-
* class: string, // additional class strings
|
|
634
|
-
* actions: object // object with action functions, it should correspot to templated text: '... ${action} ...'
|
|
635
|
-
* }
|
|
636
|
-
* @returns promise
|
|
637
|
-
*/
|
|
638
|
-
notify(text: string | Record<string, unknown>, options?: Record<string, unknown>): Promise<void>;
|
|
639
|
-
getSize(el: unknown, type: string): number;
|
|
640
|
-
getStrDimentions(str: string, styles?: string, raw?: boolean): {
|
|
641
|
-
width: number;
|
|
642
|
-
height: number;
|
|
643
|
-
};
|
|
644
|
-
getStrWidth(str: string, styles?: string, raw?: boolean): number;
|
|
645
|
-
getStrHeight(str: string, styles?: string, raw?: boolean): number;
|
|
646
|
-
execTemplate(str: any, replace_obj: any): any;
|
|
647
|
-
marker(el: any, items: any, options?: any): unknown;
|
|
648
|
-
lang(phrase: string, params?: Record<string, string | number> | boolean): string;
|
|
649
|
-
locale(locale: string | string[] | Record<string, unknown>, keepPhrases?: boolean, noMerge?: boolean): Promise<{
|
|
650
|
-
file: string;
|
|
651
|
-
data: unknown;
|
|
652
|
-
} | void>;
|
|
653
|
-
scrollBarSize(): unknown;
|
|
654
|
-
checkName(name: string): boolean;
|
|
655
|
-
checkUniqueId(id: any, items: any, desc: any, obj: any): boolean;
|
|
656
|
-
/**
|
|
657
|
-
* Takes an object and encodes it into params string to be passed as a url
|
|
658
|
-
* { a: 1, b: 'str'} => "a=1&b=str"
|
|
659
|
-
* { a: 1, b: { c: 2 }} => "a=1&b[c]=2"
|
|
660
|
-
* { a: 1, b: {c: { k: 'dfdf' } } } => "a=1&b[c][k]=dfdf"
|
|
661
|
-
*/
|
|
662
|
-
encodeParams(obj: any, prefix?: string): string;
|
|
663
|
-
parseRoute(route: string): {
|
|
664
|
-
path: RegExp;
|
|
665
|
-
keys: {
|
|
666
|
-
name: string;
|
|
667
|
-
optional: boolean;
|
|
668
|
-
}[];
|
|
669
|
-
};
|
|
670
|
-
getCursorPosition(input: any): number | null;
|
|
671
|
-
setCursorPosition(input: HTMLElement | null, pos: number, posEnd?: number): void;
|
|
672
|
-
parseColor(str: string | null | undefined): TsColorRgb | null;
|
|
673
|
-
colorContrast(color1: string, color2: string): string;
|
|
674
|
-
colorContrastValue(color1: string, color2: string): number;
|
|
675
|
-
hsv2rgb(h: any, s?: any, v?: any, a?: any): {
|
|
676
|
-
r: number;
|
|
677
|
-
g: number;
|
|
678
|
-
b: number;
|
|
679
|
-
a: number;
|
|
680
|
-
};
|
|
681
|
-
rgb2hsv(r: any, g?: any, b?: any, a?: any): {
|
|
682
|
-
h: number;
|
|
683
|
-
s: number;
|
|
684
|
-
v: number;
|
|
685
|
-
a: number;
|
|
686
|
-
};
|
|
687
|
-
tooltip(html: string | Record<string, unknown>, options?: Record<string, unknown>): string;
|
|
688
|
-
isPlainObject(value: unknown): boolean;
|
|
689
|
-
/**
|
|
690
|
-
* Deep copy of an object or an array. Function, events and HTML elements will not be cloned,
|
|
691
|
-
* you can choose to include them or not, by default they are included.
|
|
692
|
-
* You can also exclude certain elements from final object if used with options: { exclude }
|
|
693
|
-
*/
|
|
694
|
-
clone(obj: unknown, options?: Partial<TsCloneOptions>): any;
|
|
695
|
-
/**
|
|
696
|
-
* Deep extend an object, if an array, it overwrrites it, cloning objects in the process
|
|
697
|
-
* target, source1, source2, ...
|
|
698
|
-
*/
|
|
699
|
-
extend(target: any, source: any, ...rest: unknown[]): any;
|
|
700
|
-
naturalCompare(a: unknown, b: unknown): number;
|
|
701
|
-
/**
|
|
702
|
-
* Takes a menu (used in drop downs, context menu, field: list/combo/enum) and normalizes it to the common structure, which
|
|
703
|
-
* is { id: ..., text: ... }. In options you can pass { itemMap: { id: 'id_field', text: 'text_field' }} that will be used
|
|
704
|
-
* to find out id and text fields.
|
|
705
|
-
*/
|
|
706
|
-
normMenu(menu: unknown, options?: TsNormMenuOptions): TsMenuItem[] | undefined;
|
|
707
|
-
/**
|
|
708
|
-
* Takes Url object and fetchOptions and changes it in place applying selected user dataType. Since
|
|
709
|
-
* dataType is in TsUtils. This method is used in grid, form and tooltip to prepare fetch parameters
|
|
710
|
-
*/
|
|
711
|
-
prepareParams(url: URL, fetchOptions: Record<string, unknown>, options?: Record<string, unknown>): Record<string, unknown>;
|
|
712
|
-
bindEvents(selector: unknown, subject: Record<string, unknown>): void;
|
|
713
|
-
debounce(func: (...args: any[]) => void, wait?: number): (...args: any[]) => void;
|
|
714
|
-
wait(time?: number): Promise<void>;
|
|
715
|
-
getNested(obj: any, prop: any): unknown;
|
|
716
|
-
}
|
|
717
|
-
declare var TsUtils: Utils;
|
|
718
|
-
|
|
719
|
-
/**
|
|
720
|
-
* Part of TsUi 2.0 library
|
|
721
|
-
* - Dependencies: none
|
|
722
|
-
*
|
|
723
|
-
* These are the master locale settings that will be used by TsUtils
|
|
724
|
-
*
|
|
725
|
-
* "locale" should be the IETF language tag in the form xx-YY,
|
|
726
|
-
* where xx is the ISO 639-1 language code ( see https://en.wikipedia.org/wiki/ISO_639-1 ) and
|
|
727
|
-
* YY is the ISO 3166-1 alpha-2 country code ( see https://en.wikipedia.org/wiki/ISO_3166-2 )
|
|
728
|
-
*/
|
|
729
|
-
interface TsLocaleSettings {
|
|
730
|
-
locale: string;
|
|
731
|
-
dateFormat: string;
|
|
732
|
-
timeFormat: string;
|
|
733
|
-
datetimeFormat: string;
|
|
734
|
-
currencyPrefix: string;
|
|
735
|
-
currencySuffix: string;
|
|
736
|
-
currencyPrecision: number;
|
|
737
|
-
groupSymbol: string;
|
|
738
|
-
decimalSymbol: string;
|
|
739
|
-
shortmonths: string[];
|
|
740
|
-
fullmonths: string[];
|
|
741
|
-
shortdays: string[];
|
|
742
|
-
fulldays: string[];
|
|
743
|
-
weekStarts: string;
|
|
744
|
-
phrases: Record<string, string> | null;
|
|
745
|
-
}
|
|
746
|
-
declare const TsLocale: TsLocaleSettings;
|
|
747
|
-
|
|
748
|
-
interface DialogOptions {
|
|
749
|
-
title?: string;
|
|
750
|
-
text?: string;
|
|
751
|
-
body?: string;
|
|
752
|
-
buttons?: string;
|
|
753
|
-
width?: number;
|
|
754
|
-
height?: number;
|
|
755
|
-
focus?: number | string | null;
|
|
756
|
-
actions?: Record<string, unknown> | null;
|
|
757
|
-
style?: string;
|
|
758
|
-
speed?: number;
|
|
759
|
-
blockPage?: boolean;
|
|
760
|
-
modal?: boolean;
|
|
761
|
-
maximized?: boolean;
|
|
762
|
-
keyboard?: boolean;
|
|
763
|
-
showClose?: boolean;
|
|
764
|
-
showMax?: boolean;
|
|
765
|
-
resizable?: boolean;
|
|
766
|
-
transition?: unknown;
|
|
767
|
-
openMaximized?: boolean;
|
|
768
|
-
moved?: boolean;
|
|
769
|
-
prevSize?: string | null;
|
|
770
|
-
cancelAction?: string;
|
|
771
|
-
closingTimer?: ReturnType<typeof setTimeout>;
|
|
772
|
-
_last_focus?: HTMLElement | null;
|
|
773
|
-
[key: string]: unknown;
|
|
774
|
-
}
|
|
775
|
-
declare class TsDialog extends TsBase {
|
|
776
|
-
defaults: DialogOptions;
|
|
777
|
-
options: DialogOptions;
|
|
778
|
-
name: string;
|
|
779
|
-
status: string;
|
|
780
|
-
tmp: Record<string, unknown>;
|
|
781
|
-
handleResize: (event?: any) => void;
|
|
782
|
-
_promCreated: (value?: unknown) => void;
|
|
783
|
-
_promOpened: (value?: unknown) => void;
|
|
784
|
-
_promClosing: (value?: unknown) => void;
|
|
785
|
-
_promClosed: (value?: unknown) => void;
|
|
786
|
-
_timer?: ReturnType<typeof setTimeout>;
|
|
787
|
-
constructor();
|
|
788
|
-
/**
|
|
789
|
-
* Sample calls
|
|
790
|
-
* - TsPopup.open('ddd').ok(() => { TsPopup.close() })
|
|
791
|
-
* - TsPopup.open('ddd', { height: 120 }).ok(() => { TsPopup.close() })
|
|
792
|
-
* - TsPopup.open({ body: 'text', title: 'caption', actions: ["Close"] }).close(() => { TsPopup.close() })
|
|
793
|
-
* - TsPopup.open({ body: 'text', title: 'caption', actions: { Close() { TsPopup.close() }} })
|
|
794
|
-
*/
|
|
795
|
-
open(options?: any, extraOptions?: any): (Record<string, unknown> & {
|
|
796
|
-
self: TsDialog;
|
|
797
|
-
action(callBack: any): Record<string, unknown> & /*elided*/ any;
|
|
798
|
-
close(callBack: any): Record<string, unknown> & /*elided*/ any;
|
|
799
|
-
then(callBack: any): Record<string, unknown> & /*elided*/ any;
|
|
800
|
-
}) | undefined;
|
|
801
|
-
load(options: any): Promise<unknown>;
|
|
802
|
-
template(data: any, id: any, options?: any): (Record<string, unknown> & {
|
|
803
|
-
self: TsDialog;
|
|
804
|
-
action(callBack: any): Record<string, unknown> & /*elided*/ any;
|
|
805
|
-
close(callBack: any): Record<string, unknown> & /*elided*/ any;
|
|
806
|
-
then(callBack: any): Record<string, unknown> & /*elided*/ any;
|
|
807
|
-
}) | undefined;
|
|
808
|
-
action(action: any, event?: any): void;
|
|
809
|
-
keydown(event: any): void;
|
|
810
|
-
close(immediate?: any): void;
|
|
811
|
-
toggle(): void;
|
|
812
|
-
max(): void;
|
|
813
|
-
min(): void;
|
|
814
|
-
clear(): void;
|
|
815
|
-
reset(): void;
|
|
816
|
-
message(options: any): TsMessageProm | undefined;
|
|
817
|
-
confirm(options: any): TsMessageProm | undefined;
|
|
818
|
-
setFocus(focus?: any): void;
|
|
819
|
-
lock(msg?: any, showSpinner?: any): void;
|
|
820
|
-
unlock(speed?: any): void;
|
|
821
|
-
center(width?: any, height?: any, force?: any): {
|
|
822
|
-
top: number;
|
|
823
|
-
left: number;
|
|
824
|
-
width: any;
|
|
825
|
-
height: any;
|
|
826
|
-
};
|
|
827
|
-
resize(newWidth: any, newHeight: any, callBack?: any): Promise<unknown>;
|
|
828
|
-
resizeMessages(): void;
|
|
829
|
-
}
|
|
830
|
-
declare function TsAlert(msg: any, title?: any, callBack?: any): any;
|
|
831
|
-
declare function TsConfirm(msg: any, title?: any, callBack?: any): any;
|
|
832
|
-
declare function TsPrompt(label: any, title?: any, callBack?: any): any;
|
|
833
|
-
declare const TsPopup: TsDialog;
|
|
834
|
-
|
|
835
|
-
/**
|
|
836
|
-
* Part of TsUi 2.0 library
|
|
837
|
-
* - Dependencies: mQuery, TsUtils, TsBase
|
|
838
|
-
*
|
|
839
|
-
* T3.1: Ported to TypeScript with aggressive typing per typing_policy.
|
|
840
|
-
* No @ts-nocheck. Targeted `any` sites documented with // any: comments.
|
|
841
|
-
*
|
|
842
|
-
* TODO:
|
|
843
|
-
* - need help pages
|
|
844
|
-
*
|
|
845
|
-
* 2.0 Changes
|
|
846
|
-
* - multiple tooltips to the same anchor
|
|
847
|
-
* - options.contextMenu
|
|
848
|
-
* - options.prefilter - if true, it will show prefiltered items for TsMenu, otherwise all
|
|
849
|
-
* - menu.item.help, menu.item.hotkey, menu.item.extra
|
|
850
|
-
* - options.selected -> for TsMenu
|
|
851
|
-
* - options.tooltip => {}
|
|
852
|
-
* - TsMenu event onTooltip
|
|
853
|
-
* - added onMouseEnter and onMouseLeave for TsMenu
|
|
854
|
-
*/
|
|
855
|
-
|
|
856
|
-
/** Base options shared by all tooltip variants */
|
|
857
|
-
interface TooltipOptions {
|
|
858
|
-
name?: string | null;
|
|
859
|
-
html?: string;
|
|
860
|
-
style?: string;
|
|
861
|
-
class?: string;
|
|
862
|
-
position?: string | string[];
|
|
863
|
-
draggable?: boolean;
|
|
864
|
-
align?: string;
|
|
865
|
-
anchor?: HTMLElement | null;
|
|
866
|
-
contextMenu?: boolean;
|
|
867
|
-
anchorClass?: string;
|
|
868
|
-
anchorStyle?: string;
|
|
869
|
-
autoShow?: boolean;
|
|
870
|
-
autoShowOn?: string | null;
|
|
871
|
-
autoHideOn?: string | null;
|
|
872
|
-
arrowSize?: number;
|
|
873
|
-
screenMargin?: number;
|
|
874
|
-
autoResize?: boolean;
|
|
875
|
-
margin?: number;
|
|
876
|
-
offsetX?: number;
|
|
877
|
-
offsetY?: number;
|
|
878
|
-
maxWidth?: number | null;
|
|
879
|
-
maxHeight?: number | null;
|
|
880
|
-
hideOn?: string | string[] | null;
|
|
881
|
-
onThen?: ((event: unknown) => void) | null;
|
|
882
|
-
onShow?: ((event: unknown) => void) | null;
|
|
883
|
-
onHide?: ((event: unknown) => void) | null;
|
|
884
|
-
onUpdate?: ((event: unknown) => void) | null;
|
|
885
|
-
onMove?: ((event: unknown) => void) | null;
|
|
886
|
-
_keep?: boolean;
|
|
887
|
-
text?: string;
|
|
888
|
-
[key: string]: unknown;
|
|
889
|
-
}
|
|
890
|
-
/** A single menu item */
|
|
891
|
-
interface MenuItem {
|
|
892
|
-
id?: string | number | null;
|
|
893
|
-
text?: string | null | ((item: MenuItem, options: MenuOptions) => string);
|
|
894
|
-
style?: string;
|
|
895
|
-
icon?: string | null;
|
|
896
|
-
count?: string | number | null;
|
|
897
|
-
tooltip?: string | {
|
|
898
|
-
html?: string;
|
|
899
|
-
[key: string]: unknown;
|
|
900
|
-
} | null;
|
|
901
|
-
hint?: string | null;
|
|
902
|
-
hotkey?: string | null;
|
|
903
|
-
removable?: boolean | null;
|
|
904
|
-
remove?: boolean | null;
|
|
905
|
-
help?: string | null;
|
|
906
|
-
items?: MenuItem[] | ((item: MenuItem) => MenuItem[]) | null;
|
|
907
|
-
indent?: number;
|
|
908
|
-
type?: 'check' | 'radio' | 'break' | null;
|
|
909
|
-
group?: string | boolean | null;
|
|
910
|
-
expanded?: boolean;
|
|
911
|
-
hidden?: boolean;
|
|
912
|
-
checked?: boolean | null;
|
|
913
|
-
disabled?: boolean;
|
|
914
|
-
keepOpen?: boolean | null;
|
|
915
|
-
extra?: string;
|
|
916
|
-
_noSearchInside?: boolean;
|
|
917
|
-
[key: string]: unknown;
|
|
918
|
-
}
|
|
919
|
-
/** Options for TsMenu (MenuTooltip) */
|
|
920
|
-
interface MenuOptions extends TooltipOptions {
|
|
921
|
-
type?: 'normal' | 'radio' | 'check';
|
|
922
|
-
items?: MenuItem[];
|
|
923
|
-
selected?: null | string | number | MenuItem | Array<string | number | MenuItem>;
|
|
924
|
-
render?: ((item: MenuItem, options: MenuOptions) => string) | null;
|
|
925
|
-
spinner?: boolean;
|
|
926
|
-
msgNoItems?: string;
|
|
927
|
-
msgSearch?: string;
|
|
928
|
-
topHTML?: string;
|
|
929
|
-
menuStyle?: string;
|
|
930
|
-
search?: boolean;
|
|
931
|
-
filter?: boolean;
|
|
932
|
-
match?: 'contains' | 'is' | 'begins' | 'begins with' | 'ends' | 'ends with' | 'regexp';
|
|
933
|
-
markSearch?: boolean;
|
|
934
|
-
prefilter?: boolean;
|
|
935
|
-
altRows?: boolean;
|
|
936
|
-
url?: string;
|
|
937
|
-
postData?: Record<string, unknown>;
|
|
938
|
-
method?: string;
|
|
939
|
-
recId?: string | ((item: Record<string, unknown>) => unknown) | null;
|
|
940
|
-
recid?: string | null;
|
|
941
|
-
recText?: string | ((item: Record<string, unknown>) => unknown) | null;
|
|
942
|
-
cacheMax?: number;
|
|
943
|
-
minLength?: number;
|
|
944
|
-
debounce?: number;
|
|
945
|
-
hideSelected?: boolean;
|
|
946
|
-
parentOverlay?: TooltipOverlay | null;
|
|
947
|
-
parents?: number[];
|
|
948
|
-
onSelect?: ((event: unknown) => void) | null;
|
|
949
|
-
onSubMenu?: ((event: unknown) => void) | null;
|
|
950
|
-
onRemove?: ((event: unknown) => void) | null;
|
|
951
|
-
onTooltip?: ((event: unknown) => void) | null;
|
|
952
|
-
onMouseEnter?: ((event: unknown) => void) | null;
|
|
953
|
-
onMouseLeave?: ((event: unknown) => void) | null;
|
|
954
|
-
}
|
|
955
|
-
/** Options for TsColor (ColorTooltip) */
|
|
956
|
-
interface ColorOptions extends TooltipOptions {
|
|
957
|
-
advanced?: boolean;
|
|
958
|
-
transparent?: boolean;
|
|
959
|
-
color?: string;
|
|
960
|
-
updateInput?: boolean;
|
|
961
|
-
onSelect?: ((event: unknown) => void) | null;
|
|
962
|
-
onLiveUpdate?: ((event: unknown) => void) | null;
|
|
963
|
-
}
|
|
964
|
-
/** Options for TsDate (DateTooltip) */
|
|
965
|
-
interface DateOptions extends TooltipOptions {
|
|
966
|
-
type?: 'date' | 'time' | 'datetime';
|
|
967
|
-
value?: string;
|
|
968
|
-
format?: string;
|
|
969
|
-
start?: string | HTMLElement | null;
|
|
970
|
-
end?: string | HTMLElement | null;
|
|
971
|
-
btnNow?: boolean;
|
|
972
|
-
blockDates?: string[];
|
|
973
|
-
blockWeekdays?: number[];
|
|
974
|
-
colored?: Record<string, string>;
|
|
975
|
-
noMinutes?: boolean;
|
|
976
|
-
startTime?: string;
|
|
977
|
-
endTime?: string;
|
|
978
|
-
onSelect?: ((event: unknown) => void) | null;
|
|
979
|
-
}
|
|
980
|
-
/** The overlay object — a TsBase instance extended at runtime with many dynamic props */
|
|
981
|
-
type TooltipOverlay = // any: dynamic TsBase extension
|
|
982
|
-
InstanceType<typeof TsBase> & {
|
|
983
|
-
id: string;
|
|
984
|
-
name: string;
|
|
985
|
-
options: TooltipOptions & MenuOptions & ColorOptions & DateOptions;
|
|
986
|
-
anchor: HTMLElement;
|
|
987
|
-
self: Tooltip;
|
|
988
|
-
displayed: boolean;
|
|
989
|
-
box: HTMLElement & {
|
|
990
|
-
overlay?: TooltipOverlay;
|
|
991
|
-
} | null;
|
|
992
|
-
needsUpdate?: boolean;
|
|
993
|
-
prevOptions?: TooltipOptions;
|
|
994
|
-
tmp: Record<string, unknown>;
|
|
995
|
-
selected?: string | number | null;
|
|
996
|
-
newColor?: string;
|
|
997
|
-
newValue?: string;
|
|
998
|
-
newDate?: string;
|
|
999
|
-
next?: () => void;
|
|
1000
|
-
prev?: () => void;
|
|
1001
|
-
click?: () => void;
|
|
1002
|
-
hide: () => void;
|
|
1003
|
-
};
|
|
1004
|
-
/** Return value of Tooltip.attach() */
|
|
1005
|
-
interface AttachReturn {
|
|
1006
|
-
overlay: TooltipOverlay;
|
|
1007
|
-
then: (callback: (event: unknown) => void) => AttachReturn;
|
|
1008
|
-
show: (callback: (event: unknown) => void) => AttachReturn;
|
|
1009
|
-
hide: (callback: (event: unknown) => void) => AttachReturn;
|
|
1010
|
-
update: (callback: (event: unknown) => void) => AttachReturn;
|
|
1011
|
-
move: (callback: (event: unknown) => void) => AttachReturn;
|
|
1012
|
-
liveUpdate?: (callback: (event: unknown) => void) => AttachReturn;
|
|
1013
|
-
select?: (callback: (event: unknown) => void) => AttachReturn;
|
|
1014
|
-
remove?: (callback: (event: unknown) => void) => AttachReturn;
|
|
1015
|
-
subMenu?: (callback: (event: unknown) => void) => AttachReturn;
|
|
1016
|
-
}
|
|
1017
|
-
/** Position calculation result */
|
|
1018
|
-
interface TooltipPosition {
|
|
1019
|
-
left: number;
|
|
1020
|
-
top: number;
|
|
1021
|
-
arrow: {
|
|
1022
|
-
offset: number;
|
|
1023
|
-
class: string;
|
|
1024
|
-
style: string;
|
|
1025
|
-
};
|
|
1026
|
-
adjust: {
|
|
1027
|
-
left: number;
|
|
1028
|
-
top: number;
|
|
1029
|
-
};
|
|
1030
|
-
width?: number;
|
|
1031
|
-
height?: number;
|
|
1032
|
-
pos: string;
|
|
1033
|
-
}
|
|
1034
|
-
declare class Tooltip {
|
|
1035
|
-
static active: Record<string, TooltipOverlay>;
|
|
1036
|
-
defaults: TooltipOptions;
|
|
1037
|
-
setColor?: (color: Partial<{
|
|
1038
|
-
h: number;
|
|
1039
|
-
s: number;
|
|
1040
|
-
v: number;
|
|
1041
|
-
a: number;
|
|
1042
|
-
}>, fullUpdate?: boolean, initial?: string) => void;
|
|
1043
|
-
initControls(_overlay: any): void;
|
|
1044
|
-
constructor();
|
|
1045
|
-
static observeRemove: MutationObserver;
|
|
1046
|
-
trigger(event: any, data?: any): {
|
|
1047
|
-
isCancelled?: boolean;
|
|
1048
|
-
finish: () => void;
|
|
1049
|
-
detail?: Record<string, unknown>;
|
|
1050
|
-
};
|
|
1051
|
-
get(name?: string | true): string[] | Record<string, TooltipOverlay> | TooltipOverlay | undefined;
|
|
1052
|
-
attach(anchorArg?: HTMLElement | TooltipOptions | null, textArg?: string | TooltipOptions): AttachReturn | undefined;
|
|
1053
|
-
update(name: string, html: string): void;
|
|
1054
|
-
show(name?: string | HTMLElement | TooltipOptions, extraOptions?: TooltipOptions): AttachReturn | {
|
|
1055
|
-
overlay: TooltipOverlay;
|
|
1056
|
-
} | undefined;
|
|
1057
|
-
hide(name?: string | HTMLElement): void;
|
|
1058
|
-
resize(name?: string): {
|
|
1059
|
-
moved: boolean;
|
|
1060
|
-
resize: boolean;
|
|
1061
|
-
} | {
|
|
1062
|
-
multiple: boolean;
|
|
1063
|
-
} | void;
|
|
1064
|
-
getPosition(name: string): TooltipPosition | undefined;
|
|
1065
|
-
/**
|
|
1066
|
-
* Move overlay node to the end of its parent (typically body) so it stacks above other .tsg-overlay siblings
|
|
1067
|
-
* without relying on z-index. No-op if it is already the last element child.
|
|
1068
|
-
*/
|
|
1069
|
-
bringOverlayToFront(overlay: TooltipOverlay): void;
|
|
1070
|
-
startDrag(event: MouseEvent & {
|
|
1071
|
-
target: EventTarget & {
|
|
1072
|
-
_lastBoundingRect?: DOMRect;
|
|
1073
|
-
};
|
|
1074
|
-
}): void;
|
|
1075
|
-
}
|
|
1076
|
-
declare class ColorTooltip extends Tooltip {
|
|
1077
|
-
static custom_colors: string[];
|
|
1078
|
-
palette: string[][];
|
|
1079
|
-
index: [number, number];
|
|
1080
|
-
constructor();
|
|
1081
|
-
attach(anchor: any, text?: any): AttachReturn | undefined;
|
|
1082
|
-
select(color: any, name: any): void;
|
|
1083
|
-
nextColor(direction: string): string | undefined;
|
|
1084
|
-
tabClick(index: any, name: any): void;
|
|
1085
|
-
getColorHTML(name: any, options: any): string;
|
|
1086
|
-
getCustomColorsHTML(name: string): string;
|
|
1087
|
-
initControls(overlay: TooltipOverlay): void;
|
|
1088
|
-
addCustomColor(color: any, _name: any): any;
|
|
1089
|
-
pickAndSelect(name: string, event: any): Promise<void>;
|
|
1090
|
-
pickAndUse(_name: string): Promise<void>;
|
|
1091
|
-
pickColor(): Promise<string | undefined>;
|
|
1092
|
-
}
|
|
1093
|
-
declare class MenuTooltip extends Tooltip {
|
|
1094
|
-
constructor();
|
|
1095
|
-
attach(anchor: any, text?: any): AttachReturn | undefined;
|
|
1096
|
-
update(name: any, items: any): void;
|
|
1097
|
-
initControls(overlay: any): void;
|
|
1098
|
-
getCurrent(name: string, id?: any): {
|
|
1099
|
-
last: number;
|
|
1100
|
-
index: any;
|
|
1101
|
-
items: any;
|
|
1102
|
-
item: any;
|
|
1103
|
-
parents: string;
|
|
1104
|
-
};
|
|
1105
|
-
getMenuHTML(options: any): string;
|
|
1106
|
-
openSubMenu(event: any): void;
|
|
1107
|
-
closeSubMenu(event: any): void;
|
|
1108
|
-
refreshIndex(name: string, instant?: boolean): void;
|
|
1109
|
-
showTooltip(name: string, options?: any): void;
|
|
1110
|
-
refreshSearch(name: string): void;
|
|
1111
|
-
/**
|
|
1112
|
-
* Loops through the items and markes item.hidden = true for those that need to be hidden, and item.hidden = false
|
|
1113
|
-
* for those that are visible. Return a promise (since items can be on the server) with the number of visible items.
|
|
1114
|
-
*/
|
|
1115
|
-
applyFilter(name: string, items: any, search: any, debounce?: any): Promise<any>;
|
|
1116
|
-
request(overlay: any, search: any, debounce: any): Promise<any>;
|
|
1117
|
-
/**
|
|
1118
|
-
* Builds an array of item ids that sequencial order for navigation with up/down keys. Skips hidden and disabled items
|
|
1119
|
-
* and goes into nested structures. It will remember last active chain in 'overlay.tmp.activeChain'
|
|
1120
|
-
*/
|
|
1121
|
-
getActiveChain(name: string, items?: any, parents?: any[], res?: any[], noSave?: boolean): any[];
|
|
1122
|
-
menuDown(overlay: any, event: any, index: any, parents: any): void;
|
|
1123
|
-
menuClick(overlay: any, event: any, index: any, parents: any): void;
|
|
1124
|
-
findChecked(items: any): any[];
|
|
1125
|
-
keyUp(overlay: any, event: any): void;
|
|
1126
|
-
}
|
|
1127
|
-
declare class DateTooltip extends Tooltip {
|
|
1128
|
-
daysCount: number[];
|
|
1129
|
-
today: string;
|
|
1130
|
-
constructor();
|
|
1131
|
-
attach(anchor: any, text?: any): AttachReturn | undefined;
|
|
1132
|
-
initControls(overlay: any): void;
|
|
1133
|
-
getMonthHTML(options: any, month?: any, year?: any): {
|
|
1134
|
-
html: string;
|
|
1135
|
-
month: any;
|
|
1136
|
-
year: any;
|
|
1137
|
-
};
|
|
1138
|
-
getYearHTML(): string;
|
|
1139
|
-
getHourHTML(options: any): {
|
|
1140
|
-
html: string;
|
|
1141
|
-
};
|
|
1142
|
-
getMinHTML(hour: any, options: any): {
|
|
1143
|
-
html: string;
|
|
1144
|
-
};
|
|
1145
|
-
inRange(str: any, options: any, dateOnly?: boolean): boolean;
|
|
1146
|
-
str2min(str: any): number | null;
|
|
1147
|
-
min2str(time: number, format?: any): string;
|
|
1148
|
-
}
|
|
1149
|
-
declare const TsTooltip: Tooltip;
|
|
1150
|
-
declare const TsMenu: MenuTooltip;
|
|
1151
|
-
declare const TsColor: ColorTooltip;
|
|
1152
|
-
declare const TsDate: DateTooltip;
|
|
1153
|
-
|
|
1154
|
-
/**
|
|
1155
|
-
* Part of TsUi 2.0 library
|
|
1156
|
-
* - Dependencies: mQuery, TsUtils, TsBase, TsTooltip, TsColor, TsMenu
|
|
1157
|
-
*
|
|
1158
|
-
* == TODO ==
|
|
1159
|
-
* - tab navigation (index state)
|
|
1160
|
-
* - vertical toolbar
|
|
1161
|
-
* - TsMenu on second click of tb button should hide
|
|
1162
|
-
* - button display groups for each show/hide, possibly add state: { single: t/f, multiple: t/f, type: 'font' }
|
|
1163
|
-
* - item.count - should just support html, so a custom block can be created, such as a colored line
|
|
1164
|
-
*
|
|
1165
|
-
* == 2.0 changes
|
|
1166
|
-
* - CSP - fixed inline events
|
|
1167
|
-
* - removed jQuery dependency
|
|
1168
|
-
* - item.icon - can be class or <custom-icon-component> or <svg>
|
|
1169
|
-
* - new w2tooltips and TsMenu
|
|
1170
|
-
* - scroll returns promise
|
|
1171
|
-
* - added onMouseEntter, onMouseLeave, onMouseDown, onMouseUp events
|
|
1172
|
-
* - add(..., skipRefresh), insert(..., skipRefresh)
|
|
1173
|
-
* - item.items can be a function
|
|
1174
|
-
* - item.icon_style - style for the icon
|
|
1175
|
-
* - item.icon - can be a function
|
|
1176
|
-
* - item.type = 'label', item.type = 'input'
|
|
1177
|
-
* - item.placeholder
|
|
1178
|
-
* - item.input: { spinner, style, min, max, step, precision, suffix }
|
|
1179
|
-
* - item.backColor
|
|
1180
|
-
* - onLiveUpdate - for colors
|
|
1181
|
-
*/
|
|
1182
|
-
|
|
1183
|
-
declare class TsToolbar extends TsBase {
|
|
1184
|
-
box: HTMLElement | null;
|
|
1185
|
-
name: string;
|
|
1186
|
-
routeData: Record<string, unknown>;
|
|
1187
|
-
items: any[];
|
|
1188
|
-
right: string | string[];
|
|
1189
|
-
tooltip: string;
|
|
1190
|
-
item_template: Record<string, unknown>;
|
|
1191
|
-
last: any;
|
|
1192
|
-
_refresh: (opts: any) => void;
|
|
1193
|
-
_refreshDebounced: () => void;
|
|
1194
|
-
[key: string]: any;
|
|
1195
|
-
constructor(options: any);
|
|
1196
|
-
add(items: any, skipRefresh?: any): void;
|
|
1197
|
-
insert(id: any, items: any, skipRefresh?: any): void;
|
|
1198
|
-
remove(...args: any[]): number;
|
|
1199
|
-
set(id: any, newOptions: any): boolean;
|
|
1200
|
-
get(id?: any, returnIndex?: boolean, items?: any[]): any;
|
|
1201
|
-
setCount(id: any, count: any, className?: any, style?: any): void;
|
|
1202
|
-
show(...args: any[]): any[];
|
|
1203
|
-
hide(...args: any[]): any[];
|
|
1204
|
-
enable(...args: any[]): any[];
|
|
1205
|
-
disable(...args: any[]): any[];
|
|
1206
|
-
check(...args: any[]): any[];
|
|
1207
|
-
uncheck(...args: any[]): any[];
|
|
1208
|
-
click(id: any, event?: any): void;
|
|
1209
|
-
scroll(direction?: any, line?: any, instant?: any): Promise<void>;
|
|
1210
|
-
render(box?: any): number | undefined;
|
|
1211
|
-
refresh(id?: any): number | false | undefined;
|
|
1212
|
-
resize(): number | undefined;
|
|
1213
|
-
destroy(): void;
|
|
1214
|
-
unmount(): void;
|
|
1215
|
-
getItemHTML(item: any): string;
|
|
1216
|
-
spinner(id: any, action: any, event?: any): void;
|
|
1217
|
-
change(id?: any, value?: any, dynamic?: any): void;
|
|
1218
|
-
tooltipShow(id: any): void;
|
|
1219
|
-
tooltipHide(_id: any): void;
|
|
1220
|
-
menuClick(event: any): void;
|
|
1221
|
-
colorClick(event: any): void;
|
|
1222
|
-
mouseAction(event: any, target: any, action: any, id: any): void;
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1225
|
-
/**
|
|
1226
|
-
* Part of TsUi 2.0 library
|
|
1227
|
-
* - Dependencies: mQuery, TsUtils, TsBase, TsTooltip, TsMenu
|
|
1228
|
-
*
|
|
1229
|
-
* == TODO ==
|
|
1230
|
-
* - dbl click should be like it is in grid (with timer not HTML dbl click event)
|
|
1231
|
-
* - node.style is misleading - should be there to apply color for example
|
|
1232
|
-
* - node.plus - is not working
|
|
1233
|
-
*
|
|
1234
|
-
* == 2.0 changes
|
|
1235
|
-
* - remove jQuery dependency
|
|
1236
|
-
* - deprecarted obj.img, node.img
|
|
1237
|
-
* - CSP - fixed inline events
|
|
1238
|
-
* - observeResize for the box
|
|
1239
|
-
* - search(..., compare) - comparison function
|
|
1240
|
-
* - editable = true
|
|
1241
|
-
* - edit(id) - new method
|
|
1242
|
-
* - onEdit, onRename - new events
|
|
1243
|
-
* - reorder = true - to allow reorder
|
|
1244
|
-
* - mouseDown - for reorder
|
|
1245
|
-
* - onReorder, onDragStart, onDragOver - events
|
|
1246
|
-
* - this.mutlti - for multi select (ctrl for one at a time and shift for range)
|
|
1247
|
-
* - onSelect, onUnselect - new events
|
|
1248
|
-
* - prev(), next(), getChain()
|
|
1249
|
-
*/
|
|
1250
|
-
|
|
1251
|
-
/** Options accepted by refresh() */
|
|
1252
|
-
interface TsSidebarRefreshOptions {
|
|
1253
|
-
recursive?: boolean;
|
|
1254
|
-
}
|
|
1255
|
-
/** Options accepted by update() — mirrors node property names that can be updated in-place */
|
|
1256
|
-
interface TsSidebarUpdateOptions {
|
|
1257
|
-
icon?: string | ((nd: unknown, level: number) => string) | null;
|
|
1258
|
-
class?: string | null;
|
|
1259
|
-
style?: string | null;
|
|
1260
|
-
text?: string | ((nd: unknown, level: number) => string) | null;
|
|
1261
|
-
count?: number | string | null;
|
|
1262
|
-
[key: string]: unknown;
|
|
1263
|
-
}
|
|
1264
|
-
/** Options accepted by setCount() */
|
|
1265
|
-
interface TsSidebarSetCountOptions {
|
|
1266
|
-
className?: string;
|
|
1267
|
-
style?: string;
|
|
1268
|
-
noRepeat?: boolean;
|
|
1269
|
-
}
|
|
1270
|
-
/** Options for find() */
|
|
1271
|
-
interface TsSidebarFindOptions {
|
|
1272
|
-
returnDisabled?: boolean;
|
|
1273
|
-
returnGroups?: boolean;
|
|
1274
|
-
[key: string]: unknown;
|
|
1275
|
-
}
|
|
1276
|
-
/** Options for sort() */
|
|
1277
|
-
interface TsSidebarSortOptions {
|
|
1278
|
-
foldersFirst?: boolean;
|
|
1279
|
-
caseSensitive?: boolean;
|
|
1280
|
-
reverse?: boolean;
|
|
1281
|
-
[key: string]: unknown;
|
|
1282
|
-
}
|
|
1283
|
-
declare class TsSidebar extends TsBase {
|
|
1284
|
-
box: HTMLElement | null;
|
|
1285
|
-
name: string;
|
|
1286
|
-
nodes: any[];
|
|
1287
|
-
selected: any;
|
|
1288
|
-
img: any;
|
|
1289
|
-
icon: any;
|
|
1290
|
-
style: string;
|
|
1291
|
-
hasFocus: boolean;
|
|
1292
|
-
flat: boolean;
|
|
1293
|
-
flatButton: boolean;
|
|
1294
|
-
keyboard: boolean;
|
|
1295
|
-
editable: boolean;
|
|
1296
|
-
reorder: boolean;
|
|
1297
|
-
tabIndex: number | null;
|
|
1298
|
-
routeData: Record<string, unknown>;
|
|
1299
|
-
multi: boolean;
|
|
1300
|
-
skipRefresh: boolean;
|
|
1301
|
-
last: any;
|
|
1302
|
-
node_template: Record<string, unknown>;
|
|
1303
|
-
[key: string]: any;
|
|
1304
|
-
constructor(options: any);
|
|
1305
|
-
add(parent?: any, nodes?: any): any;
|
|
1306
|
-
insert(parent?: any, before?: any, nodes?: any): any;
|
|
1307
|
-
remove(...args: any[]): number;
|
|
1308
|
-
set(parent?: any, id?: any, node?: any): boolean | null;
|
|
1309
|
-
get(parent?: any, id?: any, returnIndex?: any): any;
|
|
1310
|
-
setCount(id: any, count: any, options?: TsSidebarSetCountOptions): void;
|
|
1311
|
-
find(parent?: any, params?: any, results?: any): any;
|
|
1312
|
-
sort(options: TsSidebarSortOptions | null | undefined, nodes?: any): void;
|
|
1313
|
-
each(fn: any, nodes?: any): void;
|
|
1314
|
-
search(str: any, compare?: any): number;
|
|
1315
|
-
show(...args: any[]): any[];
|
|
1316
|
-
hide(...args: any[]): any[];
|
|
1317
|
-
enable(...args: any[]): any[];
|
|
1318
|
-
disable(...args: any[]): any[];
|
|
1319
|
-
select(id: any): boolean | undefined;
|
|
1320
|
-
unselect(id?: any): boolean | undefined;
|
|
1321
|
-
toggle(id: any): boolean | undefined;
|
|
1322
|
-
collapse(id: any): boolean | undefined;
|
|
1323
|
-
expand(id: any): true | undefined;
|
|
1324
|
-
collapseAll(parent?: any): boolean;
|
|
1325
|
-
expandAll(parent?: any): false | undefined;
|
|
1326
|
-
expandParents(id: any): boolean;
|
|
1327
|
-
click(id: any, event?: any): void;
|
|
1328
|
-
flatMenu(el: any, items: any): void;
|
|
1329
|
-
focus(event?: any): false | undefined;
|
|
1330
|
-
blur(event: any): false | undefined;
|
|
1331
|
-
next(node: any, noSubs?: any): any;
|
|
1332
|
-
prev(node: any): any;
|
|
1333
|
-
getChain(nodes?: any, options?: TsSidebarFindOptions): any[];
|
|
1334
|
-
keydown(event: any): void;
|
|
1335
|
-
inView(id: any): boolean;
|
|
1336
|
-
scrollIntoView(id?: any, instant?: any): Promise<void>;
|
|
1337
|
-
dblClick(id: any, event: any): void;
|
|
1338
|
-
/**
|
|
1339
|
-
* This is needed for not reorder
|
|
1340
|
-
*/
|
|
1341
|
-
mouseDown(id: any, event: any): void;
|
|
1342
|
-
edit(id: any): Node | Node[] | null | undefined;
|
|
1343
|
-
contextMenu(id: any, event: any): void;
|
|
1344
|
-
menuClick(itemId: any, detail?: any): void;
|
|
1345
|
-
goFlat(): void;
|
|
1346
|
-
render(box?: any): number | undefined;
|
|
1347
|
-
update(id: any, options?: TsSidebarUpdateOptions): TsSidebarUpdateOptions;
|
|
1348
|
-
refresh(id?: any, options?: TsSidebarRefreshOptions): number | undefined;
|
|
1349
|
-
mouseAction(action: any, anchor: any, nodeId: any, event: any, type: any): void;
|
|
1350
|
-
tooltip(el: any, text: any): void;
|
|
1351
|
-
otherTooltip(el: any, text: any): void;
|
|
1352
|
-
showPlus(el: any, color: any): void;
|
|
1353
|
-
resize(): number | undefined;
|
|
1354
|
-
destroy(): void;
|
|
1355
|
-
unmount(): void;
|
|
1356
|
-
lock(msg?: any, showSpinner?: any): void;
|
|
1357
|
-
unlock(speed: any): void;
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
/**
|
|
1361
|
-
* Part of TsUi 2.0 library
|
|
1362
|
-
* - Dependencies: mQuery, TsUtils, TsBase, TsTooltip
|
|
1363
|
-
*
|
|
1364
|
-
* == 2.0 changes
|
|
1365
|
-
* - CSP - fixed inline events
|
|
1366
|
-
* - removed jQuery dependency
|
|
1367
|
-
* - observeResize for the box
|
|
1368
|
-
* - refactored w2events
|
|
1369
|
-
* - scrollIntoView - removed callback
|
|
1370
|
-
* - scroll, scrollIntoView return promise
|
|
1371
|
-
* - animateInsert, animateClose - returns a promise
|
|
1372
|
-
* - add, insert return a promise
|
|
1373
|
-
* - onMouseEnter, onMouseLeave, onMouseDown, onMouseUp
|
|
1374
|
-
*/
|
|
1375
|
-
|
|
1376
|
-
declare class TsTabs extends TsBase {
|
|
1377
|
-
box: HTMLElement | null;
|
|
1378
|
-
name: string;
|
|
1379
|
-
active: any;
|
|
1380
|
-
reorder: boolean;
|
|
1381
|
-
flow: string;
|
|
1382
|
-
tooltip: string;
|
|
1383
|
-
tabs: any[];
|
|
1384
|
-
routeData: Record<string, unknown>;
|
|
1385
|
-
last: any;
|
|
1386
|
-
right: string;
|
|
1387
|
-
style: string;
|
|
1388
|
-
tab_template: Record<string, unknown>;
|
|
1389
|
-
[key: string]: any;
|
|
1390
|
-
constructor(options: any);
|
|
1391
|
-
add(tab: any): Promise<any>;
|
|
1392
|
-
insert(id: any, tabs: any): Promise<any>;
|
|
1393
|
-
remove(...ids: any[]): number;
|
|
1394
|
-
select(id: any): boolean;
|
|
1395
|
-
set(id: any, tab: any): boolean;
|
|
1396
|
-
get(id?: any, returnIndex?: boolean): any;
|
|
1397
|
-
show(...ids: any[]): any[];
|
|
1398
|
-
hide(...ids: any[]): any[];
|
|
1399
|
-
enable(...ids: any[]): any[];
|
|
1400
|
-
disable(...ids: any[]): any[];
|
|
1401
|
-
dragMove(event: MouseEvent): void;
|
|
1402
|
-
mouseAction(action: string, id: any, event: MouseEvent): void;
|
|
1403
|
-
tooltipShow(id: any): void;
|
|
1404
|
-
tooltipHide(_id: any): void;
|
|
1405
|
-
getTabHTML(id: any): string | false;
|
|
1406
|
-
refresh(id?: any): number | undefined;
|
|
1407
|
-
render(box?: any): number | false | undefined;
|
|
1408
|
-
initReorder(id: any, event: MouseEvent): void;
|
|
1409
|
-
scroll(direction?: any, instant?: any): Promise<void>;
|
|
1410
|
-
scrollIntoView(id?: any, instant?: any): Promise<void>;
|
|
1411
|
-
resize(): number | undefined;
|
|
1412
|
-
destroy(): void;
|
|
1413
|
-
unmount(): void;
|
|
1414
|
-
click(id: any, event?: MouseEvent): false | void;
|
|
1415
|
-
clickClose(id: any, event?: MouseEvent): false | void;
|
|
1416
|
-
animateClose(id?: any): Promise<void>;
|
|
1417
|
-
animateInsert(id: any, tab: any): Promise<void>;
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
/** Valid panel type names in a layout */
|
|
1421
|
-
type TsPanelType = 'top' | 'left' | 'main' | 'preview' | 'right' | 'bottom';
|
|
1422
|
-
/** Content that can be placed in a layout panel */
|
|
1423
|
-
type TsPanelContent = string | {
|
|
1424
|
-
render: (box?: HTMLElement) => void;
|
|
1425
|
-
unmount?: () => void;
|
|
1426
|
-
box?: HTMLElement | null;
|
|
1427
|
-
[key: string]: unknown;
|
|
1428
|
-
};
|
|
1429
|
-
/** Individual panel configuration and runtime state */
|
|
1430
|
-
interface TsLayoutPanel {
|
|
1431
|
-
type: TsPanelType | null;
|
|
1432
|
-
title: string;
|
|
1433
|
-
size: number | string;
|
|
1434
|
-
minSize: number;
|
|
1435
|
-
maxSize: number | boolean;
|
|
1436
|
-
hidden: boolean;
|
|
1437
|
-
resizable: boolean;
|
|
1438
|
-
overflow: string;
|
|
1439
|
-
style: string;
|
|
1440
|
-
html: TsPanelContent;
|
|
1441
|
-
tabs: TsTabs | Record<string, unknown> | null;
|
|
1442
|
-
toolbar: TsToolbar | Record<string, unknown> | null;
|
|
1443
|
-
/** Runtime-computed width (read-only after resize) */
|
|
1444
|
-
width: number | null;
|
|
1445
|
-
/** Runtime-computed height (read-only after resize) */
|
|
1446
|
-
height: number | null;
|
|
1447
|
-
/** Runtime-computed size in pixels */
|
|
1448
|
-
sizeCalculated?: number;
|
|
1449
|
-
show: {
|
|
1450
|
-
toolbar: boolean;
|
|
1451
|
-
tabs: boolean;
|
|
1452
|
-
};
|
|
1453
|
-
removed: ((info: {
|
|
1454
|
-
panel: string;
|
|
1455
|
-
html: TsPanelContent;
|
|
1456
|
-
html_new: TsPanelContent;
|
|
1457
|
-
transition: string;
|
|
1458
|
-
}) => void) | null;
|
|
1459
|
-
onRefresh: ((event: unknown) => void) | null;
|
|
1460
|
-
onShow: ((event: unknown) => void) | null;
|
|
1461
|
-
onHide: ((event: unknown) => void) | null;
|
|
1462
|
-
}
|
|
1463
|
-
/** Options for the html() method return promise-like */
|
|
1464
|
-
interface TsHtmlResult {
|
|
1465
|
-
panel: string;
|
|
1466
|
-
html: TsPanelContent;
|
|
1467
|
-
error: boolean;
|
|
1468
|
-
cancelled: boolean;
|
|
1469
|
-
status?: boolean;
|
|
1470
|
-
removed: (cb: () => void) => void;
|
|
1471
|
-
}
|
|
1472
|
-
declare class TsLayout extends TsBase {
|
|
1473
|
-
box: HTMLElement | null;
|
|
1474
|
-
name: string;
|
|
1475
|
-
panels: TsLayoutPanel[];
|
|
1476
|
-
last: Record<string, any>;
|
|
1477
|
-
padding: number;
|
|
1478
|
-
resizer: number;
|
|
1479
|
-
style: string;
|
|
1480
|
-
onShow: ((event: unknown) => void) | null;
|
|
1481
|
-
onHide: ((event: unknown) => void) | null;
|
|
1482
|
-
onResizing: ((event: unknown) => void) | null;
|
|
1483
|
-
onResizerClick: ((event: unknown) => void) | null;
|
|
1484
|
-
onRender: ((event: unknown) => void) | null;
|
|
1485
|
-
onRefresh: ((event: unknown) => void) | null;
|
|
1486
|
-
onChange: ((event: unknown) => void) | null;
|
|
1487
|
-
onResize: ((event: unknown) => void) | null;
|
|
1488
|
-
onDestroy: ((event: unknown) => void) | null;
|
|
1489
|
-
panel_template: TsLayoutPanel;
|
|
1490
|
-
[key: string]: any;
|
|
1491
|
-
constructor(options: any);
|
|
1492
|
-
html(panel: string, data: TsPanelContent, transition?: string): TsHtmlResult;
|
|
1493
|
-
message(panel: string, options: unknown): TsMessageProm | undefined;
|
|
1494
|
-
confirm(panel: string, options: unknown): TsMessageProm | undefined;
|
|
1495
|
-
load(panel: string, url: string, transition?: string): Promise<void | TsHtmlResult>;
|
|
1496
|
-
sizeTo(panel: string, size: number | string, instant?: boolean): boolean;
|
|
1497
|
-
show(panel: string, immediate?: boolean): boolean | undefined;
|
|
1498
|
-
hide(panel: string, immediate?: boolean): boolean | undefined;
|
|
1499
|
-
toggle(panel: string, immediate?: boolean): boolean | undefined;
|
|
1500
|
-
set(panel: string, options: Partial<TsLayoutPanel>): boolean;
|
|
1501
|
-
get(panel: string, returnIndex?: boolean): any;
|
|
1502
|
-
el(panel: string): HTMLElement | null;
|
|
1503
|
-
hideToolbar(panel: string): void;
|
|
1504
|
-
showToolbar(panel: string): void;
|
|
1505
|
-
toggleToolbar(panel: string): void;
|
|
1506
|
-
assignToolbar(panel: string, toolbar: TsToolbar | string | null): void;
|
|
1507
|
-
hideTabs(panel: string): void;
|
|
1508
|
-
showTabs(panel: string): void;
|
|
1509
|
-
toggleTabs(panel: string): void;
|
|
1510
|
-
assignTabs(panel: string, tabs: TsTabs | string | null): void;
|
|
1511
|
-
render(box?: HTMLElement | string): number | false | undefined;
|
|
1512
|
-
unmount(): void;
|
|
1513
|
-
destroy(): boolean | undefined;
|
|
1514
|
-
refresh(panel?: string): number | undefined;
|
|
1515
|
-
resize(): number | false | undefined;
|
|
1516
|
-
resizeBoxes(panel?: string): void;
|
|
1517
|
-
lock(panel: string, msg: unknown, showSpinner?: boolean): void;
|
|
1518
|
-
unlock(panel: string, speed?: number): void;
|
|
1519
|
-
}
|
|
1
|
+
export { TsCloneOptions, TsColorRgb, TsLockOptions, TsMenuItem, TsUi, TsUtils, query } from './utils.js';
|
|
2
|
+
export { TsLocale, TsLocaleSettings } from './locale.js';
|
|
3
|
+
import { TsBase, TsEventPayload } from './base.js';
|
|
4
|
+
export { TsEvent, TsEventData, toSafeEvent } from './base.js';
|
|
5
|
+
export { TsAlert, TsConfirm, TsDialog, TsPopup, TsPrompt } from './popup.js';
|
|
6
|
+
export { Tooltip, TsColor, TsDate, TsMenu, TsTooltip } from './tooltip.js';
|
|
7
|
+
export { TsToolbar } from './toolbar.js';
|
|
8
|
+
export { TsSidebar, TsSidebarFindOptions, TsSidebarRefreshOptions, TsSidebarSetCountOptions, TsSidebarSortOptions, TsSidebarUpdateOptions } from './sidebar.js';
|
|
9
|
+
export { TsTabs } from './tabs.js';
|
|
10
|
+
export { TsLayout, TsLayoutPanel, TsPanelContent, TsPanelType } from './layout.js';
|
|
11
|
+
import { T as TsMessageProm } from './tsutils-message-CogFtVtO.js';
|
|
12
|
+
export { a as TsMessageOptions, b as TsMessageWhere } from './tsutils-message-CogFtVtO.js';
|
|
13
|
+
export { TsForm } from './form.js';
|
|
14
|
+
export { TsField, TsFieldColorOptions, TsFieldDateOptions, TsFieldDateTimeOptions, TsFieldElement, TsFieldEnumOptions, TsFieldFileOptions, TsFieldListOptions, TsFieldNumericOptions, TsFieldOptions, TsFieldTimeOptions } from './field.js';
|
|
15
|
+
import './query-CKGg5Ugv.js';
|
|
1520
16
|
|
|
1521
17
|
/**
|
|
1522
18
|
* Shared branded primitive types for TsUi public API.
|
|
@@ -2089,488 +585,4 @@ declare class TsGrid extends TsBase {
|
|
|
2089
585
|
confirm(options: any): TsMessageProm | undefined;
|
|
2090
586
|
}
|
|
2091
587
|
|
|
2092
|
-
|
|
2093
|
-
* Part of TsUi 2.0 library
|
|
2094
|
-
* - Dependencies: mQuery, TsUtils, TsBase, TsTabs, TsToolbar, TsTooltip, TsField
|
|
2095
|
-
*
|
|
2096
|
-
* T4.2: Ported to TypeScript with aggressive typing per typing_policy.
|
|
2097
|
-
* No @ts-nocheck. Targeted `any` sites documented with // any: comments.
|
|
2098
|
-
* Bug fix: line 1317 (original) `?? response.statusText` was unreachable
|
|
2099
|
-
* because string concat always produces non-null; fixed to `|| response.statusText`.
|
|
2100
|
-
*
|
|
2101
|
-
* == TODO ==
|
|
2102
|
-
* - include delta on save
|
|
2103
|
-
* - tabs below some fields (could already be implemented)
|
|
2104
|
-
* - form with toolbar & tabs
|
|
2105
|
-
* - promise for load, save, etc.
|
|
2106
|
-
*
|
|
2107
|
-
* == 2.0 changes
|
|
2108
|
-
* - CSP - fixed inline events
|
|
2109
|
-
* - removed jQuery dependency
|
|
2110
|
-
* - better groups support tabs now
|
|
2111
|
-
* - form.confirm - refactored
|
|
2112
|
-
* - form.message - refactored
|
|
2113
|
-
* - observeResize for the box
|
|
2114
|
-
* - removed msgNotJSON, msgAJAXerror
|
|
2115
|
-
* - applyFocus -> setFocus
|
|
2116
|
-
* - getFieldValue(fieldName) = returns { curent, previous, original }
|
|
2117
|
-
* - setFieldVallue(fieldName, value)
|
|
2118
|
-
* - getValue(..., original) -- return original if any
|
|
2119
|
-
* - added .hideErrors()
|
|
2120
|
-
* - reuqest, save, submit - return promises
|
|
2121
|
-
* - this.recid = null if no record needs to be pulled
|
|
2122
|
-
* - remove form.multiplart
|
|
2123
|
-
* - this.method - for saving only
|
|
2124
|
-
* - added field.html.class
|
|
2125
|
-
* - setValue(..., noRefresh)
|
|
2126
|
-
* - rememberOriginal()
|
|
2127
|
-
* - saveCleanRecord
|
|
2128
|
-
* - added options.itemMap = { id: 'id', text: 'text' } - to map id, text fields if needed
|
|
2129
|
-
* - hideGroup/showGroup - new methods
|
|
2130
|
-
* - getAction/actionHide/actionShow/actionDisable/actionEnable - new methods
|
|
2131
|
-
*/
|
|
2132
|
-
|
|
2133
|
-
declare class TsForm extends TsBase {
|
|
2134
|
-
[key: string]: any;
|
|
2135
|
-
name: string;
|
|
2136
|
-
header: string;
|
|
2137
|
-
box: HTMLElement | null;
|
|
2138
|
-
url: string | {
|
|
2139
|
-
get?: string;
|
|
2140
|
-
save?: string;
|
|
2141
|
-
};
|
|
2142
|
-
method: string | null;
|
|
2143
|
-
routeData: Record<string, any>;
|
|
2144
|
-
formURL: string;
|
|
2145
|
-
formHTML: string;
|
|
2146
|
-
page: number;
|
|
2147
|
-
pageStyle: string;
|
|
2148
|
-
recid: any;
|
|
2149
|
-
fields: any[];
|
|
2150
|
-
actions: Record<string, any>;
|
|
2151
|
-
record: Record<string, any>;
|
|
2152
|
-
original: Record<string, any> | null;
|
|
2153
|
-
dataType: string | null;
|
|
2154
|
-
saveCleanRecord: boolean;
|
|
2155
|
-
postData: Record<string, any>;
|
|
2156
|
-
httpHeaders: Record<string, string>;
|
|
2157
|
-
toolbar: any;
|
|
2158
|
-
tabs: any;
|
|
2159
|
-
style: string;
|
|
2160
|
-
focus: number | string;
|
|
2161
|
-
autosize: boolean;
|
|
2162
|
-
nestedFields: boolean;
|
|
2163
|
-
tabindexBase: number;
|
|
2164
|
-
isGenerated: boolean;
|
|
2165
|
-
last: {
|
|
2166
|
-
fetchCtrl: AbortController | null;
|
|
2167
|
-
fetchOptions: RequestInit | null;
|
|
2168
|
-
errors: any[];
|
|
2169
|
-
errorsShown?: boolean;
|
|
2170
|
-
observeResize?: ResizeObserver;
|
|
2171
|
-
};
|
|
2172
|
-
onRequest: ((event: TsEventPayload) => void) | null;
|
|
2173
|
-
onLoad: ((event: TsEventPayload) => void) | null;
|
|
2174
|
-
onValidate: ((event: TsEventPayload) => void) | null;
|
|
2175
|
-
onSubmit: ((event: TsEventPayload) => void) | null;
|
|
2176
|
-
onProgress: ((event: TsEventPayload) => void) | null;
|
|
2177
|
-
onSave: ((event: TsEventPayload) => void) | null;
|
|
2178
|
-
onChange: ((event: TsEventPayload) => void) | null;
|
|
2179
|
-
onInput: ((event: TsEventPayload) => void) | null;
|
|
2180
|
-
onRender: ((event: TsEventPayload) => void) | null;
|
|
2181
|
-
onRefresh: ((event: TsEventPayload) => void) | null;
|
|
2182
|
-
onResize: ((event: TsEventPayload) => void) | null;
|
|
2183
|
-
onDestroy: ((event: TsEventPayload) => void) | null;
|
|
2184
|
-
onAction: ((event: TsEventPayload) => void) | null;
|
|
2185
|
-
onToolbar: ((event: TsEventPayload) => void) | null;
|
|
2186
|
-
onError: ((event: TsEventPayload) => void) | null;
|
|
2187
|
-
msgRefresh: string;
|
|
2188
|
-
msgSaving: string;
|
|
2189
|
-
msgServerError: string;
|
|
2190
|
-
ALL_TYPES: string[];
|
|
2191
|
-
LIST_TYPES: string[];
|
|
2192
|
-
TsFIELD_TYPES: string[];
|
|
2193
|
-
constructor(options: Record<string, any>);
|
|
2194
|
-
get(field?: string, returnIndex?: boolean): any;
|
|
2195
|
-
set(field: string, obj: Record<string, any>): boolean;
|
|
2196
|
-
getValue(field: string, original?: boolean): any;
|
|
2197
|
-
setValue(field: string, value: any, noRefresh?: boolean): boolean;
|
|
2198
|
-
rememberOriginal(): void;
|
|
2199
|
-
getFieldValue(name: string): {
|
|
2200
|
-
current: any;
|
|
2201
|
-
previous: any;
|
|
2202
|
-
original: any;
|
|
2203
|
-
} | undefined;
|
|
2204
|
-
findItem(item: any, items: any[]): any;
|
|
2205
|
-
setFieldValue(name: string, value: any): void;
|
|
2206
|
-
show(...args: string[]): string[];
|
|
2207
|
-
hide(...args: string[]): string[];
|
|
2208
|
-
enable(...args: string[]): string[];
|
|
2209
|
-
disable(...args: string[]): string[];
|
|
2210
|
-
updateEmptyGroups(): void;
|
|
2211
|
-
hideGroup(groupName: string): void;
|
|
2212
|
-
showGroup(groupName: string): void;
|
|
2213
|
-
/**
|
|
2214
|
-
* When user clicks on group title, it will toggle the group (collapse or expand it).
|
|
2215
|
-
*/
|
|
2216
|
-
toggleGroup(groupName: string, show?: boolean): void;
|
|
2217
|
-
change(...args: string[]): void;
|
|
2218
|
-
reload(callBack?: (() => void)): Promise<any>;
|
|
2219
|
-
clear(...args: any[]): void;
|
|
2220
|
-
error(msg: string): void;
|
|
2221
|
-
message(options: any): any;
|
|
2222
|
-
confirm(options: any): any;
|
|
2223
|
-
validate(showErrors?: boolean): any[] | undefined;
|
|
2224
|
-
showErrors(): void;
|
|
2225
|
-
hideErrors(): void;
|
|
2226
|
-
getChanges(): Record<string, any> | null;
|
|
2227
|
-
getCleanRecord(strict?: boolean): Record<string, any>;
|
|
2228
|
-
request(postData?: any, callBack?: (data: any) => void): Promise<any> | void;
|
|
2229
|
-
submit(postData?: any, callBack?: (data: any) => void): Promise<any> | void;
|
|
2230
|
-
save(postData?: any, callBack?: (data: any) => void): Promise<any> | void;
|
|
2231
|
-
lock(msg: string, showSpinner?: boolean): void;
|
|
2232
|
-
unlock(speed?: number): void;
|
|
2233
|
-
lockPage(page: number, msg?: string, spinner?: boolean): boolean;
|
|
2234
|
-
unlockPage(page: number, speed?: number): boolean;
|
|
2235
|
-
goto(page: number): void;
|
|
2236
|
-
generateHTML(): string | false;
|
|
2237
|
-
action(action: string, event: Event): void;
|
|
2238
|
-
getAction(action: string): any;
|
|
2239
|
-
actionHide(action: string): void;
|
|
2240
|
-
actionShow(action: string): void;
|
|
2241
|
-
actionDisable(action: string): void;
|
|
2242
|
-
actionEnable(action: string): void;
|
|
2243
|
-
resize(): void;
|
|
2244
|
-
refresh(...args: any[]): number;
|
|
2245
|
-
render(box?: HTMLElement | string): number | void;
|
|
2246
|
-
unmount(): void;
|
|
2247
|
-
destroy(): void;
|
|
2248
|
-
setFocus(focus?: number | string): any;
|
|
2249
|
-
}
|
|
2250
|
-
|
|
2251
|
-
/**
|
|
2252
|
-
* Part of TsUi 2.0 library
|
|
2253
|
-
* - Dependencies: mQuery, TsUtils, TsBase, TsTooltip, TsColor, TsMenu, TsDate
|
|
2254
|
-
*
|
|
2255
|
-
* T4.1: Ported to TypeScript with aggressive typing per typing_policy.
|
|
2256
|
-
* No @ts-nocheck. Targeted `any` sites documented with // any: comments.
|
|
2257
|
-
* Discriminated union on `type` property for per-type option shapes.
|
|
2258
|
-
*
|
|
2259
|
-
* == TODO ==
|
|
2260
|
-
* - upload (regular files)
|
|
2261
|
-
* - BUG with prefix/postfix and arrows (test in different contexts)
|
|
2262
|
-
* - multiple date selection
|
|
2263
|
-
* - month selection, year selections
|
|
2264
|
-
* - MultiSelect - Allow Copy/Paste for single and multi values
|
|
2265
|
-
* - add routeData to list/enum
|
|
2266
|
-
* - ENUM, LIST: should have same as grid (limit, offset, search, sort)
|
|
2267
|
-
* - ENUM, LIST: should support wild chars
|
|
2268
|
-
* - add selection of predefined times (used for appointments)
|
|
2269
|
-
* - options.items - can be an array
|
|
2270
|
-
* - options.msgNoItems - can be a function
|
|
2271
|
-
* - REMOTE fields
|
|
2272
|
-
*
|
|
2273
|
-
* == 2.0 changes
|
|
2274
|
-
* - removed jQuery dependency
|
|
2275
|
-
* - enum options.autoAdd
|
|
2276
|
-
* - [numeric, date] - options.autoCorrect to enforce range and validity
|
|
2277
|
-
* - remote source response items => records or just an array
|
|
2278
|
-
* - deprecated "success" field for remote source response
|
|
2279
|
-
* - CSP - fixed inline events
|
|
2280
|
-
* - remove clear, use reset instead
|
|
2281
|
-
* - options.msgSearch
|
|
2282
|
-
* - options.msgNoItems
|
|
2283
|
-
*/
|
|
2284
|
-
|
|
2285
|
-
/** Shared numeric-field options (int, float, money, currency, percent, alphanumeric, bin, hex, text) */
|
|
2286
|
-
interface TsFieldNumericOptions {
|
|
2287
|
-
type?: string;
|
|
2288
|
-
min?: number | null;
|
|
2289
|
-
max?: number | null;
|
|
2290
|
-
step?: number;
|
|
2291
|
-
autoFormat?: boolean;
|
|
2292
|
-
autoCorrect?: boolean;
|
|
2293
|
-
currency?: {
|
|
2294
|
-
prefix: string;
|
|
2295
|
-
suffix: string;
|
|
2296
|
-
precision: number;
|
|
2297
|
-
};
|
|
2298
|
-
decimalSymbol?: string;
|
|
2299
|
-
groupSymbol?: string;
|
|
2300
|
-
arrows?: boolean;
|
|
2301
|
-
keyboard?: boolean;
|
|
2302
|
-
precision?: number | null;
|
|
2303
|
-
prefix?: string;
|
|
2304
|
-
suffix?: string;
|
|
2305
|
-
numberRE?: RegExp;
|
|
2306
|
-
moneyRE?: RegExp;
|
|
2307
|
-
percentRE?: RegExp;
|
|
2308
|
-
[key: string]: any;
|
|
2309
|
-
}
|
|
2310
|
-
/** Color-field options */
|
|
2311
|
-
interface TsFieldColorOptions {
|
|
2312
|
-
type?: string;
|
|
2313
|
-
prefix?: string;
|
|
2314
|
-
suffix?: string;
|
|
2315
|
-
arrows?: boolean;
|
|
2316
|
-
advanced?: boolean | null;
|
|
2317
|
-
transparent?: boolean;
|
|
2318
|
-
[key: string]: any;
|
|
2319
|
-
}
|
|
2320
|
-
/** Date-field options */
|
|
2321
|
-
interface TsFieldDateOptions {
|
|
2322
|
-
type?: string;
|
|
2323
|
-
format?: string;
|
|
2324
|
-
keyboard?: boolean;
|
|
2325
|
-
autoCorrect?: boolean;
|
|
2326
|
-
start?: string | null;
|
|
2327
|
-
end?: string | null;
|
|
2328
|
-
blockDates?: string[];
|
|
2329
|
-
blockWeekdays?: number[];
|
|
2330
|
-
colored?: Record<string, string>;
|
|
2331
|
-
btnNow?: boolean;
|
|
2332
|
-
[key: string]: any;
|
|
2333
|
-
}
|
|
2334
|
-
/** Time-field options */
|
|
2335
|
-
interface TsFieldTimeOptions {
|
|
2336
|
-
type?: string;
|
|
2337
|
-
format?: string;
|
|
2338
|
-
keyboard?: boolean;
|
|
2339
|
-
autoCorrect?: boolean;
|
|
2340
|
-
start?: string | null;
|
|
2341
|
-
end?: string | null;
|
|
2342
|
-
btnNow?: boolean;
|
|
2343
|
-
noMinutes?: boolean;
|
|
2344
|
-
[key: string]: any;
|
|
2345
|
-
}
|
|
2346
|
-
/** DateTime-field options */
|
|
2347
|
-
interface TsFieldDateTimeOptions {
|
|
2348
|
-
type?: string;
|
|
2349
|
-
format?: string;
|
|
2350
|
-
keyboard?: boolean;
|
|
2351
|
-
autoCorrect?: boolean;
|
|
2352
|
-
start?: string | null;
|
|
2353
|
-
end?: string | null;
|
|
2354
|
-
startTime?: string | null;
|
|
2355
|
-
endTime?: string | null;
|
|
2356
|
-
blockDates?: string[];
|
|
2357
|
-
blockWeekdays?: number[];
|
|
2358
|
-
colored?: Record<string, string>;
|
|
2359
|
-
btnNow?: boolean;
|
|
2360
|
-
noMinutes?: boolean;
|
|
2361
|
-
[key: string]: any;
|
|
2362
|
-
}
|
|
2363
|
-
/** List/combo-field options */
|
|
2364
|
-
interface TsFieldListOptions {
|
|
2365
|
-
type?: string;
|
|
2366
|
-
items?: any[];
|
|
2367
|
-
_items_fun?: ((...args: any[]) => any) | null;
|
|
2368
|
-
selected?: Record<string, any> | null;
|
|
2369
|
-
itemMap?: {
|
|
2370
|
-
id: string;
|
|
2371
|
-
text: string;
|
|
2372
|
-
} | null;
|
|
2373
|
-
match?: 'contains' | 'is' | 'begins' | 'ends';
|
|
2374
|
-
filter?: boolean;
|
|
2375
|
-
compare?: ((...args: any[]) => any) | null;
|
|
2376
|
-
prefix?: string;
|
|
2377
|
-
suffix?: string;
|
|
2378
|
-
icon?: string | null;
|
|
2379
|
-
iconStyle?: string;
|
|
2380
|
-
url?: string | null;
|
|
2381
|
-
method?: string | null;
|
|
2382
|
-
postData?: Record<string, unknown>;
|
|
2383
|
-
recId?: string | ((item: any) => any) | null;
|
|
2384
|
-
recText?: string | ((item: any) => any) | null;
|
|
2385
|
-
debounce?: number;
|
|
2386
|
-
minLength?: number;
|
|
2387
|
-
cacheMax?: number;
|
|
2388
|
-
renderDrop?: ((...args: any[]) => string) | null;
|
|
2389
|
-
maxDropHeight?: number;
|
|
2390
|
-
maxDropWidth?: number | null;
|
|
2391
|
-
minDropWidth?: number | null;
|
|
2392
|
-
markSearch?: boolean;
|
|
2393
|
-
align?: 'left' | 'right' | 'both' | 'none';
|
|
2394
|
-
altRows?: boolean;
|
|
2395
|
-
openOnFocus?: boolean;
|
|
2396
|
-
hideSelected?: boolean;
|
|
2397
|
-
msgNoItems?: string;
|
|
2398
|
-
msgSearch?: string;
|
|
2399
|
-
onSearch?: ((...args: any[]) => void) | null;
|
|
2400
|
-
onRequest?: ((...args: any[]) => void) | null;
|
|
2401
|
-
onLoad?: ((...args: any[]) => void) | null;
|
|
2402
|
-
onError?: ((...args: any[]) => void) | null;
|
|
2403
|
-
index?: number[];
|
|
2404
|
-
[key: string]: any;
|
|
2405
|
-
}
|
|
2406
|
-
/** Enum-field options */
|
|
2407
|
-
interface TsFieldEnumOptions {
|
|
2408
|
-
type?: string;
|
|
2409
|
-
items?: any[];
|
|
2410
|
-
_items_fun?: ((...args: any[]) => any) | null;
|
|
2411
|
-
selected?: any[];
|
|
2412
|
-
itemMap?: {
|
|
2413
|
-
id: string;
|
|
2414
|
-
text: string;
|
|
2415
|
-
} | null;
|
|
2416
|
-
max?: number;
|
|
2417
|
-
match?: 'contains' | 'is' | 'begins' | 'ends';
|
|
2418
|
-
filter?: boolean;
|
|
2419
|
-
compare?: ((...args: any[]) => any) | null;
|
|
2420
|
-
url?: string | null;
|
|
2421
|
-
method?: string | null;
|
|
2422
|
-
postData?: Record<string, unknown>;
|
|
2423
|
-
recId?: string | ((item: any) => any) | null;
|
|
2424
|
-
recText?: string | ((item: any) => any) | null;
|
|
2425
|
-
debounce?: number;
|
|
2426
|
-
minLength?: number;
|
|
2427
|
-
cacheMax?: number;
|
|
2428
|
-
maxItemWidth?: number;
|
|
2429
|
-
maxDropHeight?: number;
|
|
2430
|
-
maxDropWidth?: number | null;
|
|
2431
|
-
renderItem?: ((item: any, ind: number, removeBtn: string) => string) | null;
|
|
2432
|
-
renderDrop?: ((...args: any[]) => string) | null;
|
|
2433
|
-
style?: string;
|
|
2434
|
-
openOnFocus?: boolean;
|
|
2435
|
-
markSearch?: boolean;
|
|
2436
|
-
align?: 'left' | 'right' | 'both' | 'none';
|
|
2437
|
-
altRows?: boolean;
|
|
2438
|
-
hideSelected?: boolean;
|
|
2439
|
-
msgNoItems?: string;
|
|
2440
|
-
msgSearch?: string;
|
|
2441
|
-
onAdd?: ((...args: any[]) => void) | null;
|
|
2442
|
-
onNew?: ((...args: any[]) => void) | null;
|
|
2443
|
-
onRemove?: ((...args: any[]) => void) | null;
|
|
2444
|
-
onSearch?: ((...args: any[]) => void) | null;
|
|
2445
|
-
onClick?: ((...args: any[]) => void) | null;
|
|
2446
|
-
onRequest?: ((...args: any[]) => void) | null;
|
|
2447
|
-
onLoad?: ((...args: any[]) => void) | null;
|
|
2448
|
-
onError?: ((...args: any[]) => void) | null;
|
|
2449
|
-
onScroll?: ((...args: any[]) => void) | null;
|
|
2450
|
-
onMouseEnter?: ((...args: any[]) => void) | null;
|
|
2451
|
-
onMouseLeave?: ((...args: any[]) => void) | null;
|
|
2452
|
-
[key: string]: any;
|
|
2453
|
-
}
|
|
2454
|
-
/** File-field options */
|
|
2455
|
-
interface TsFieldFileOptions {
|
|
2456
|
-
type?: string;
|
|
2457
|
-
selected?: any[];
|
|
2458
|
-
max?: number;
|
|
2459
|
-
maxSize?: number;
|
|
2460
|
-
maxFileSize?: number;
|
|
2461
|
-
renderItem?: ((item: any, ind: number, removeBtn: string) => string) | null;
|
|
2462
|
-
maxItemWidth?: number;
|
|
2463
|
-
maxDropHeight?: number;
|
|
2464
|
-
maxDropWidth?: number | null;
|
|
2465
|
-
readContent?: boolean;
|
|
2466
|
-
showErrors?: boolean;
|
|
2467
|
-
align?: 'left' | 'right' | 'both' | 'none';
|
|
2468
|
-
altRows?: boolean;
|
|
2469
|
-
style?: string;
|
|
2470
|
-
onClick?: ((...args: any[]) => void) | null;
|
|
2471
|
-
onAdd?: ((...args: any[]) => void) | null;
|
|
2472
|
-
onRemove?: ((...args: any[]) => void) | null;
|
|
2473
|
-
onMouseEnter?: ((...args: any[]) => void) | null;
|
|
2474
|
-
onMouseLeave?: ((...args: any[]) => void) | null;
|
|
2475
|
-
[key: string]: any;
|
|
2476
|
-
}
|
|
2477
|
-
/** Discriminated union: all possible options for a TsField instance */
|
|
2478
|
-
type TsFieldOptions = TsFieldNumericOptions | TsFieldColorOptions | TsFieldDateOptions | TsFieldTimeOptions | TsFieldDateTimeOptions | TsFieldListOptions | TsFieldEnumOptions | TsFieldFileOptions;
|
|
2479
|
-
/** Constructor input — the type discriminant lives here */
|
|
2480
|
-
interface TsFieldInput {
|
|
2481
|
-
type?: string;
|
|
2482
|
-
el?: HTMLElement | null;
|
|
2483
|
-
onClick?: ((...args: any[]) => void) | null;
|
|
2484
|
-
onAdd?: ((...args: any[]) => void) | null;
|
|
2485
|
-
onNew?: ((...args: any[]) => void) | null;
|
|
2486
|
-
onRemove?: ((...args: any[]) => void) | null;
|
|
2487
|
-
onMouseEnter?: ((...args: any[]) => void) | null;
|
|
2488
|
-
onMouseLeave?: ((...args: any[]) => void) | null;
|
|
2489
|
-
onScroll?: ((...args: any[]) => void) | null;
|
|
2490
|
-
[key: string]: any;
|
|
2491
|
-
}
|
|
2492
|
-
/** Helper elements bag */
|
|
2493
|
-
interface TsFieldHelpers {
|
|
2494
|
-
prefix?: HTMLElement | null;
|
|
2495
|
-
suffix?: HTMLElement | null;
|
|
2496
|
-
arrows?: HTMLElement | null;
|
|
2497
|
-
search?: HTMLElement | null;
|
|
2498
|
-
search_focus?: HTMLInputElement;
|
|
2499
|
-
multi?: Query;
|
|
2500
|
-
[key: string]: any;
|
|
2501
|
-
}
|
|
2502
|
-
/** Temp state bag */
|
|
2503
|
-
interface TsFieldTmp {
|
|
2504
|
-
'old-padding-left'?: string | null;
|
|
2505
|
-
'old-padding-right'?: string | null;
|
|
2506
|
-
'old-background-color'?: string;
|
|
2507
|
-
'old-border-color'?: string;
|
|
2508
|
-
'old-tabIndex'?: number;
|
|
2509
|
-
'min-height'?: number;
|
|
2510
|
-
'max-height'?: number;
|
|
2511
|
-
'current_width'?: number;
|
|
2512
|
-
pholder?: string;
|
|
2513
|
-
overlay?: any;
|
|
2514
|
-
openedOnFocus?: boolean;
|
|
2515
|
-
sizeTimer?: ReturnType<typeof setInterval>;
|
|
2516
|
-
[key: string]: any;
|
|
2517
|
-
}
|
|
2518
|
-
declare global {
|
|
2519
|
-
interface HTMLElement {
|
|
2520
|
-
_w2field?: TsField;
|
|
2521
|
-
}
|
|
2522
|
-
interface HTMLInputElement {
|
|
2523
|
-
_w2field?: TsField;
|
|
2524
|
-
}
|
|
2525
|
-
interface HTMLTextAreaElement {
|
|
2526
|
-
_w2field?: TsField;
|
|
2527
|
-
}
|
|
2528
|
-
}
|
|
2529
|
-
type TsFieldElement = HTMLInputElement | HTMLTextAreaElement;
|
|
2530
|
-
declare class TsField extends TsBase {
|
|
2531
|
-
el: TsFieldElement | null;
|
|
2532
|
-
selected: any;
|
|
2533
|
-
helpers: TsFieldHelpers;
|
|
2534
|
-
type: string;
|
|
2535
|
-
options: TsFieldOptions;
|
|
2536
|
-
onClick: ((...args: any[]) => void) | null;
|
|
2537
|
-
onAdd: ((...args: any[]) => void) | null;
|
|
2538
|
-
onNew: ((...args: any[]) => void) | null;
|
|
2539
|
-
onRemove: ((...args: any[]) => void) | null;
|
|
2540
|
-
onMouseEnter: ((...args: any[]) => void) | null;
|
|
2541
|
-
onMouseLeave: ((...args: any[]) => void) | null;
|
|
2542
|
-
onScroll: ((...args: any[]) => void) | null;
|
|
2543
|
-
tmp: TsFieldTmp;
|
|
2544
|
-
constructor(type: string | TsFieldInput, options?: TsFieldInput);
|
|
2545
|
-
render(el: HTMLElement): void;
|
|
2546
|
-
init(): void;
|
|
2547
|
-
get(): any;
|
|
2548
|
-
set(val: any, append?: boolean): void;
|
|
2549
|
-
setIndex(ind: number, append?: boolean): boolean;
|
|
2550
|
-
refresh(): number;
|
|
2551
|
-
resize(): void;
|
|
2552
|
-
reset(): void;
|
|
2553
|
-
clean(val: any): any;
|
|
2554
|
-
format(val: any): any;
|
|
2555
|
-
change(event: Event): false | void;
|
|
2556
|
-
click(event: MouseEvent): void;
|
|
2557
|
-
focus(event: FocusEvent & {
|
|
2558
|
-
showMenu?: boolean;
|
|
2559
|
-
}): void;
|
|
2560
|
-
blur(_event: FocusEvent): void;
|
|
2561
|
-
keyDown(event: KeyboardEvent, extra?: {
|
|
2562
|
-
keyCode?: number;
|
|
2563
|
-
}): false | void;
|
|
2564
|
-
keyUp(event: KeyboardEvent): void;
|
|
2565
|
-
findItemIndex(items: any[], id: any, parents?: number[]): number[];
|
|
2566
|
-
updateOverlay(_indexOnly?: boolean): void;
|
|
2567
|
-
isStrValid(ch: string, loose?: boolean): boolean;
|
|
2568
|
-
addPrefix(): void;
|
|
2569
|
-
addSuffix(): void;
|
|
2570
|
-
addSearch(): void;
|
|
2571
|
-
addMultiSearch(): void;
|
|
2572
|
-
addFile(file: File): void;
|
|
2573
|
-
moveCaret2end(): void;
|
|
2574
|
-
}
|
|
2575
|
-
|
|
2576
|
-
export { type RecId, Tooltip, TsAlert, TsBase, type TsCloneOptions, TsColor, type TsColorRgb, TsConfirm, TsDate, TsDialog, TsEvent, type TsEventData, type TsEventPayload, TsField, type TsFieldColorOptions, type TsFieldDateOptions, type TsFieldDateTimeOptions, type TsFieldElement, type TsFieldEnumOptions, type TsFieldFileOptions, type TsFieldListOptions, type TsFieldNumericOptions, type TsFieldOptions, type TsFieldTimeOptions, TsForm, TsGrid, type TsGridCellSelection, type TsGridColumn, type TsGridGroupBy, type TsGridRange, type TsGridRangeEndpoint, type TsGridRecord, type TsGridSearch, type TsGridSelection, type TsGridSortData, TsLayout, type TsLayoutPanel, TsLocale, type TsLocaleSettings, type TsLockOptions, TsMenu, type TsMenuItem, type TsMessageOptions, type TsMessageProm, type TsMessageWhere, type TsPanelContent, type TsPanelType, TsPopup, TsPrompt, TsSidebar, type TsSidebarFindOptions, type TsSidebarRefreshOptions, type TsSidebarSetCountOptions, type TsSidebarSortOptions, type TsSidebarUpdateOptions, TsTabs, TsToolbar, TsTooltip, TsUi, TsUtils, query, toSafeEvent };
|
|
588
|
+
export { type RecId, TsBase, TsEventPayload, TsGrid, type TsGridCellSelection, type TsGridColumn, type TsGridGroupBy, type TsGridRange, type TsGridRangeEndpoint, type TsGridRecord, type TsGridSearch, type TsGridSelection, type TsGridSortData, TsMessageProm };
|