tsgrid-ui 2.7.1 → 2.10.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 +217 -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-3NYH6545.js +2423 -0
- package/dist/chunks/chunk-3NYH6545.js.map +1 -0
- package/dist/chunks/chunk-6MOFFUV2.js +2305 -0
- package/dist/chunks/chunk-6MOFFUV2.js.map +1 -0
- package/dist/chunks/chunk-6UCGFWIQ.js +865 -0
- package/dist/chunks/chunk-6UCGFWIQ.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-DZSFZLV6.js +1638 -0
- package/dist/chunks/chunk-DZSFZLV6.js.map +1 -0
- package/dist/chunks/chunk-EQK6JAHT.js +33 -0
- package/dist/chunks/chunk-EQK6JAHT.js.map +1 -0
- package/dist/chunks/chunk-FAIRNXQR.js +3020 -0
- package/dist/chunks/chunk-FAIRNXQR.js.map +1 -0
- package/dist/chunks/chunk-GZFWK4LZ.js +677 -0
- package/dist/chunks/chunk-GZFWK4LZ.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-KLJ35UAH.js +1795 -0
- package/dist/chunks/chunk-KLJ35UAH.js.map +1 -0
- package/dist/chunks/chunk-LUSNRF73.js +1212 -0
- package/dist/chunks/chunk-LUSNRF73.js.map +1 -0
- package/dist/chunks/chunk-N3GASHTI.js +1127 -0
- package/dist/chunks/chunk-N3GASHTI.js.map +1 -0
- package/dist/field.d.ts +329 -0
- package/dist/field.es6.js +12 -0
- package/dist/field.es6.js.map +1 -0
- package/dist/form.d.ts +162 -0
- package/dist/form.es6.js +15 -0
- package/dist/form.es6.js.map +1 -0
- package/dist/layout.d.ts +108 -0
- package/dist/layout.es6.js +14 -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/popup.d.ts +97 -0
- package/dist/popup.es6.js +21 -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 +12 -0
- package/dist/sidebar.es6.js.map +1 -0
- package/dist/tabs.d.ts +63 -0
- package/dist/tabs.es6.js +12 -0
- package/dist/tabs.es6.js.map +1 -0
- package/dist/toolbar.d.ts +97 -0
- package/dist/toolbar.es6.js +12 -0
- package/dist/toolbar.es6.js.map +1 -0
- package/dist/tooltip.d.ts +330 -0
- package/dist/tooltip.es6.js +21 -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 +7751 -23830
- package/dist/tsgrid-ui.es6.js.map +1 -1
- package/dist/tsgrid-ui.es6.min.js +37 -37
- package/dist/tsgrid-ui.js +150 -22
- package/dist/tsgrid-ui.min.css +2 -2
- package/dist/tsgrid-ui.min.js +39 -39
- 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 +25 -5
package/dist/form.d.ts
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { TsBase, TsEventPayload } from './base.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Part of TsUi 2.0 library
|
|
5
|
+
* - Dependencies: mQuery, TsUtils, TsBase, TsTabs, TsToolbar, TsTooltip, TsField
|
|
6
|
+
*
|
|
7
|
+
* T4.2: Ported to TypeScript with aggressive typing per typing_policy.
|
|
8
|
+
* No @ts-nocheck. Targeted `any` sites documented with // any: comments.
|
|
9
|
+
* Bug fix: line 1317 (original) `?? response.statusText` was unreachable
|
|
10
|
+
* because string concat always produces non-null; fixed to `|| response.statusText`.
|
|
11
|
+
*
|
|
12
|
+
* == TODO ==
|
|
13
|
+
* - include delta on save
|
|
14
|
+
* - tabs below some fields (could already be implemented)
|
|
15
|
+
* - form with toolbar & tabs
|
|
16
|
+
* - promise for load, save, etc.
|
|
17
|
+
*
|
|
18
|
+
* == 2.0 changes
|
|
19
|
+
* - CSP - fixed inline events
|
|
20
|
+
* - removed jQuery dependency
|
|
21
|
+
* - better groups support tabs now
|
|
22
|
+
* - form.confirm - refactored
|
|
23
|
+
* - form.message - refactored
|
|
24
|
+
* - observeResize for the box
|
|
25
|
+
* - removed msgNotJSON, msgAJAXerror
|
|
26
|
+
* - applyFocus -> setFocus
|
|
27
|
+
* - getFieldValue(fieldName) = returns { curent, previous, original }
|
|
28
|
+
* - setFieldVallue(fieldName, value)
|
|
29
|
+
* - getValue(..., original) -- return original if any
|
|
30
|
+
* - added .hideErrors()
|
|
31
|
+
* - reuqest, save, submit - return promises
|
|
32
|
+
* - this.recid = null if no record needs to be pulled
|
|
33
|
+
* - remove form.multiplart
|
|
34
|
+
* - this.method - for saving only
|
|
35
|
+
* - added field.html.class
|
|
36
|
+
* - setValue(..., noRefresh)
|
|
37
|
+
* - rememberOriginal()
|
|
38
|
+
* - saveCleanRecord
|
|
39
|
+
* - added options.itemMap = { id: 'id', text: 'text' } - to map id, text fields if needed
|
|
40
|
+
* - hideGroup/showGroup - new methods
|
|
41
|
+
* - getAction/actionHide/actionShow/actionDisable/actionEnable - new methods
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
declare class TsForm extends TsBase {
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
name: string;
|
|
47
|
+
header: string;
|
|
48
|
+
box: HTMLElement | null;
|
|
49
|
+
url: string | {
|
|
50
|
+
get?: string;
|
|
51
|
+
save?: string;
|
|
52
|
+
};
|
|
53
|
+
method: string | null;
|
|
54
|
+
routeData: Record<string, any>;
|
|
55
|
+
formURL: string;
|
|
56
|
+
formHTML: string;
|
|
57
|
+
page: number;
|
|
58
|
+
pageStyle: string;
|
|
59
|
+
recid: any;
|
|
60
|
+
fields: any[];
|
|
61
|
+
actions: Record<string, any>;
|
|
62
|
+
record: Record<string, any>;
|
|
63
|
+
original: Record<string, any> | null;
|
|
64
|
+
dataType: string | null;
|
|
65
|
+
saveCleanRecord: boolean;
|
|
66
|
+
postData: Record<string, any>;
|
|
67
|
+
httpHeaders: Record<string, string>;
|
|
68
|
+
toolbar: any;
|
|
69
|
+
tabs: any;
|
|
70
|
+
style: string;
|
|
71
|
+
focus: number | string;
|
|
72
|
+
autosize: boolean;
|
|
73
|
+
nestedFields: boolean;
|
|
74
|
+
tabindexBase: number;
|
|
75
|
+
isGenerated: boolean;
|
|
76
|
+
last: {
|
|
77
|
+
fetchCtrl: AbortController | null;
|
|
78
|
+
fetchOptions: RequestInit | null;
|
|
79
|
+
errors: any[];
|
|
80
|
+
errorsShown?: boolean;
|
|
81
|
+
observeResize?: ResizeObserver;
|
|
82
|
+
};
|
|
83
|
+
onRequest: ((event: TsEventPayload) => void) | null;
|
|
84
|
+
onLoad: ((event: TsEventPayload) => void) | null;
|
|
85
|
+
onValidate: ((event: TsEventPayload) => void) | null;
|
|
86
|
+
onSubmit: ((event: TsEventPayload) => void) | null;
|
|
87
|
+
onProgress: ((event: TsEventPayload) => void) | null;
|
|
88
|
+
onSave: ((event: TsEventPayload) => void) | null;
|
|
89
|
+
onChange: ((event: TsEventPayload) => void) | null;
|
|
90
|
+
onInput: ((event: TsEventPayload) => void) | null;
|
|
91
|
+
onRender: ((event: TsEventPayload) => void) | null;
|
|
92
|
+
onRefresh: ((event: TsEventPayload) => void) | null;
|
|
93
|
+
onResize: ((event: TsEventPayload) => void) | null;
|
|
94
|
+
onDestroy: ((event: TsEventPayload) => void) | null;
|
|
95
|
+
onAction: ((event: TsEventPayload) => void) | null;
|
|
96
|
+
onToolbar: ((event: TsEventPayload) => void) | null;
|
|
97
|
+
onError: ((event: TsEventPayload) => void) | null;
|
|
98
|
+
msgRefresh: string;
|
|
99
|
+
msgSaving: string;
|
|
100
|
+
msgServerError: string;
|
|
101
|
+
ALL_TYPES: string[];
|
|
102
|
+
LIST_TYPES: string[];
|
|
103
|
+
TsFIELD_TYPES: string[];
|
|
104
|
+
constructor(options: Record<string, any>);
|
|
105
|
+
get(field?: string, returnIndex?: boolean): any;
|
|
106
|
+
set(field: string, obj: Record<string, any>): boolean;
|
|
107
|
+
getValue(field: string, original?: boolean): any;
|
|
108
|
+
setValue(field: string, value: any, noRefresh?: boolean): boolean;
|
|
109
|
+
rememberOriginal(): void;
|
|
110
|
+
getFieldValue(name: string): {
|
|
111
|
+
current: any;
|
|
112
|
+
previous: any;
|
|
113
|
+
original: any;
|
|
114
|
+
} | undefined;
|
|
115
|
+
findItem(item: any, items: any[]): any;
|
|
116
|
+
setFieldValue(name: string, value: any): void;
|
|
117
|
+
show(...args: string[]): string[];
|
|
118
|
+
hide(...args: string[]): string[];
|
|
119
|
+
enable(...args: string[]): string[];
|
|
120
|
+
disable(...args: string[]): string[];
|
|
121
|
+
updateEmptyGroups(): void;
|
|
122
|
+
hideGroup(groupName: string): void;
|
|
123
|
+
showGroup(groupName: string): void;
|
|
124
|
+
/**
|
|
125
|
+
* When user clicks on group title, it will toggle the group (collapse or expand it).
|
|
126
|
+
*/
|
|
127
|
+
toggleGroup(groupName: string, show?: boolean): void;
|
|
128
|
+
change(...args: string[]): void;
|
|
129
|
+
reload(callBack?: (() => void)): Promise<any>;
|
|
130
|
+
clear(...args: any[]): void;
|
|
131
|
+
error(msg: string): void;
|
|
132
|
+
message(options: any): any;
|
|
133
|
+
confirm(options: any): any;
|
|
134
|
+
validate(showErrors?: boolean): any[] | undefined;
|
|
135
|
+
showErrors(): void;
|
|
136
|
+
hideErrors(): void;
|
|
137
|
+
getChanges(): Record<string, any> | null;
|
|
138
|
+
getCleanRecord(strict?: boolean): Record<string, any>;
|
|
139
|
+
request(postData?: any, callBack?: (data: any) => void): Promise<any> | void;
|
|
140
|
+
submit(postData?: any, callBack?: (data: any) => void): Promise<any> | void;
|
|
141
|
+
save(postData?: any, callBack?: (data: any) => void): Promise<any> | void;
|
|
142
|
+
lock(msg: string, showSpinner?: boolean): void;
|
|
143
|
+
unlock(speed?: number): void;
|
|
144
|
+
lockPage(page: number, msg?: string, spinner?: boolean): boolean;
|
|
145
|
+
unlockPage(page: number, speed?: number): boolean;
|
|
146
|
+
goto(page: number): void;
|
|
147
|
+
generateHTML(): string | false;
|
|
148
|
+
action(action: string, event: Event): void;
|
|
149
|
+
getAction(action: string): any;
|
|
150
|
+
actionHide(action: string): void;
|
|
151
|
+
actionShow(action: string): void;
|
|
152
|
+
actionDisable(action: string): void;
|
|
153
|
+
actionEnable(action: string): void;
|
|
154
|
+
resize(): void;
|
|
155
|
+
refresh(...args: any[]): number;
|
|
156
|
+
render(box?: HTMLElement | string): number | void;
|
|
157
|
+
unmount(): void;
|
|
158
|
+
destroy(): void;
|
|
159
|
+
setFocus(focus?: number | string): any;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export { TsForm };
|
package/dist/form.es6.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TsForm
|
|
3
|
+
} from "./chunks/chunk-6MOFFUV2.js";
|
|
4
|
+
import "./chunks/chunk-KLJ35UAH.js";
|
|
5
|
+
import "./chunks/chunk-GZFWK4LZ.js";
|
|
6
|
+
import "./chunks/chunk-LUSNRF73.js";
|
|
7
|
+
import "./chunks/chunk-FAIRNXQR.js";
|
|
8
|
+
import "./chunks/chunk-EQK6JAHT.js";
|
|
9
|
+
import "./chunks/chunk-3NYH6545.js";
|
|
10
|
+
import "./chunks/chunk-IYF3Q7GX.js";
|
|
11
|
+
import "./chunks/chunk-DXZJHS4M.js";
|
|
12
|
+
export {
|
|
13
|
+
TsForm
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=form.es6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/layout.d.ts
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { T as TsMessageProm } from './tsutils-message-CogFtVtO.js';
|
|
2
|
+
import { TsBase } from './base.js';
|
|
3
|
+
import { TsTabs } from './tabs.js';
|
|
4
|
+
import { TsToolbar } from './toolbar.js';
|
|
5
|
+
import './query-CKGg5Ugv.js';
|
|
6
|
+
|
|
7
|
+
/** Valid panel type names in a layout */
|
|
8
|
+
type TsPanelType = 'top' | 'left' | 'main' | 'preview' | 'right' | 'bottom';
|
|
9
|
+
/** Content that can be placed in a layout panel */
|
|
10
|
+
type TsPanelContent = string | {
|
|
11
|
+
render: (box?: HTMLElement) => void;
|
|
12
|
+
unmount?: () => void;
|
|
13
|
+
box?: HTMLElement | null;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
};
|
|
16
|
+
/** Individual panel configuration and runtime state */
|
|
17
|
+
interface TsLayoutPanel {
|
|
18
|
+
type: TsPanelType | null;
|
|
19
|
+
title: string;
|
|
20
|
+
size: number | string;
|
|
21
|
+
minSize: number;
|
|
22
|
+
maxSize: number | boolean;
|
|
23
|
+
hidden: boolean;
|
|
24
|
+
resizable: boolean;
|
|
25
|
+
overflow: string;
|
|
26
|
+
style: string;
|
|
27
|
+
html: TsPanelContent;
|
|
28
|
+
tabs: TsTabs | Record<string, unknown> | null;
|
|
29
|
+
toolbar: TsToolbar | Record<string, unknown> | null;
|
|
30
|
+
/** Runtime-computed width (read-only after resize) */
|
|
31
|
+
width: number | null;
|
|
32
|
+
/** Runtime-computed height (read-only after resize) */
|
|
33
|
+
height: number | null;
|
|
34
|
+
/** Runtime-computed size in pixels */
|
|
35
|
+
sizeCalculated?: number;
|
|
36
|
+
show: {
|
|
37
|
+
toolbar: boolean;
|
|
38
|
+
tabs: boolean;
|
|
39
|
+
};
|
|
40
|
+
removed: ((info: {
|
|
41
|
+
panel: string;
|
|
42
|
+
html: TsPanelContent;
|
|
43
|
+
html_new: TsPanelContent;
|
|
44
|
+
transition: string;
|
|
45
|
+
}) => void) | null;
|
|
46
|
+
onRefresh: ((event: unknown) => void) | null;
|
|
47
|
+
onShow: ((event: unknown) => void) | null;
|
|
48
|
+
onHide: ((event: unknown) => void) | null;
|
|
49
|
+
}
|
|
50
|
+
/** Options for the html() method return promise-like */
|
|
51
|
+
interface TsHtmlResult {
|
|
52
|
+
panel: string;
|
|
53
|
+
html: TsPanelContent;
|
|
54
|
+
error: boolean;
|
|
55
|
+
cancelled: boolean;
|
|
56
|
+
status?: boolean;
|
|
57
|
+
removed: (cb: () => void) => void;
|
|
58
|
+
}
|
|
59
|
+
declare class TsLayout extends TsBase {
|
|
60
|
+
box: HTMLElement | null;
|
|
61
|
+
name: string;
|
|
62
|
+
panels: TsLayoutPanel[];
|
|
63
|
+
last: Record<string, any>;
|
|
64
|
+
padding: number;
|
|
65
|
+
resizer: number;
|
|
66
|
+
style: string;
|
|
67
|
+
onShow: ((event: unknown) => void) | null;
|
|
68
|
+
onHide: ((event: unknown) => void) | null;
|
|
69
|
+
onResizing: ((event: unknown) => void) | null;
|
|
70
|
+
onResizerClick: ((event: unknown) => void) | null;
|
|
71
|
+
onRender: ((event: unknown) => void) | null;
|
|
72
|
+
onRefresh: ((event: unknown) => void) | null;
|
|
73
|
+
onChange: ((event: unknown) => void) | null;
|
|
74
|
+
onResize: ((event: unknown) => void) | null;
|
|
75
|
+
onDestroy: ((event: unknown) => void) | null;
|
|
76
|
+
panel_template: TsLayoutPanel;
|
|
77
|
+
[key: string]: any;
|
|
78
|
+
constructor(options: any);
|
|
79
|
+
html(panel: string, data: TsPanelContent, transition?: string): TsHtmlResult;
|
|
80
|
+
message(panel: string, options: unknown): TsMessageProm | undefined;
|
|
81
|
+
confirm(panel: string, options: unknown): TsMessageProm | undefined;
|
|
82
|
+
load(panel: string, url: string, transition?: string): Promise<void | TsHtmlResult>;
|
|
83
|
+
sizeTo(panel: string, size: number | string, instant?: boolean): boolean;
|
|
84
|
+
show(panel: string, immediate?: boolean): boolean | undefined;
|
|
85
|
+
hide(panel: string, immediate?: boolean): boolean | undefined;
|
|
86
|
+
toggle(panel: string, immediate?: boolean): boolean | undefined;
|
|
87
|
+
set(panel: string, options: Partial<TsLayoutPanel>): boolean;
|
|
88
|
+
get(panel: string, returnIndex?: boolean): any;
|
|
89
|
+
el(panel: string): HTMLElement | null;
|
|
90
|
+
hideToolbar(panel: string): void;
|
|
91
|
+
showToolbar(panel: string): void;
|
|
92
|
+
toggleToolbar(panel: string): void;
|
|
93
|
+
assignToolbar(panel: string, toolbar: TsToolbar | string | null): void;
|
|
94
|
+
hideTabs(panel: string): void;
|
|
95
|
+
showTabs(panel: string): void;
|
|
96
|
+
toggleTabs(panel: string): void;
|
|
97
|
+
assignTabs(panel: string, tabs: TsTabs | string | null): void;
|
|
98
|
+
render(box?: HTMLElement | string): number | false | undefined;
|
|
99
|
+
unmount(): void;
|
|
100
|
+
destroy(): boolean | undefined;
|
|
101
|
+
refresh(panel?: string): number | undefined;
|
|
102
|
+
resize(): number | false | undefined;
|
|
103
|
+
resizeBoxes(panel?: string): void;
|
|
104
|
+
lock(panel: string, msg: unknown, showSpinner?: boolean): void;
|
|
105
|
+
unlock(panel: string, speed?: number): void;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export { TsLayout, type TsLayoutPanel, type TsPanelContent, type TsPanelType };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TsLayout
|
|
3
|
+
} from "./chunks/chunk-N3GASHTI.js";
|
|
4
|
+
import "./chunks/chunk-GZFWK4LZ.js";
|
|
5
|
+
import "./chunks/chunk-LUSNRF73.js";
|
|
6
|
+
import "./chunks/chunk-FAIRNXQR.js";
|
|
7
|
+
import "./chunks/chunk-EQK6JAHT.js";
|
|
8
|
+
import "./chunks/chunk-3NYH6545.js";
|
|
9
|
+
import "./chunks/chunk-IYF3Q7GX.js";
|
|
10
|
+
import "./chunks/chunk-DXZJHS4M.js";
|
|
11
|
+
export {
|
|
12
|
+
TsLayout
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=layout.es6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/locale.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Part of TsUi 2.0 library
|
|
3
|
+
* - Dependencies: none
|
|
4
|
+
*
|
|
5
|
+
* These are the master locale settings that will be used by TsUtils
|
|
6
|
+
*
|
|
7
|
+
* "locale" should be the IETF language tag in the form xx-YY,
|
|
8
|
+
* where xx is the ISO 639-1 language code ( see https://en.wikipedia.org/wiki/ISO_639-1 ) and
|
|
9
|
+
* YY is the ISO 3166-1 alpha-2 country code ( see https://en.wikipedia.org/wiki/ISO_3166-2 )
|
|
10
|
+
*/
|
|
11
|
+
interface TsLocaleSettings {
|
|
12
|
+
locale: string;
|
|
13
|
+
dateFormat: string;
|
|
14
|
+
timeFormat: string;
|
|
15
|
+
datetimeFormat: string;
|
|
16
|
+
currencyPrefix: string;
|
|
17
|
+
currencySuffix: string;
|
|
18
|
+
currencyPrecision: number;
|
|
19
|
+
groupSymbol: string;
|
|
20
|
+
decimalSymbol: string;
|
|
21
|
+
shortmonths: string[];
|
|
22
|
+
fullmonths: string[];
|
|
23
|
+
shortdays: string[];
|
|
24
|
+
fulldays: string[];
|
|
25
|
+
weekStarts: string;
|
|
26
|
+
phrases: Record<string, string> | null;
|
|
27
|
+
}
|
|
28
|
+
declare const TsLocale: TsLocaleSettings;
|
|
29
|
+
|
|
30
|
+
export { TsLocale, type TsLocaleSettings };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/popup.d.ts
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { T as TsMessageProm } from './tsutils-message-CogFtVtO.js';
|
|
2
|
+
import { TsBase } from './base.js';
|
|
3
|
+
import './query-CKGg5Ugv.js';
|
|
4
|
+
|
|
5
|
+
interface DialogOptions {
|
|
6
|
+
title?: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
body?: string;
|
|
9
|
+
buttons?: string;
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
focus?: number | string | null;
|
|
13
|
+
actions?: Record<string, unknown> | null;
|
|
14
|
+
style?: string;
|
|
15
|
+
speed?: number;
|
|
16
|
+
blockPage?: boolean;
|
|
17
|
+
modal?: boolean;
|
|
18
|
+
maximized?: boolean;
|
|
19
|
+
keyboard?: boolean;
|
|
20
|
+
showClose?: boolean;
|
|
21
|
+
showMax?: boolean;
|
|
22
|
+
resizable?: boolean;
|
|
23
|
+
transition?: unknown;
|
|
24
|
+
openMaximized?: boolean;
|
|
25
|
+
moved?: boolean;
|
|
26
|
+
prevSize?: string | null;
|
|
27
|
+
cancelAction?: string;
|
|
28
|
+
closingTimer?: ReturnType<typeof setTimeout>;
|
|
29
|
+
_last_focus?: HTMLElement | null;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
}
|
|
32
|
+
declare class TsDialog extends TsBase {
|
|
33
|
+
defaults: DialogOptions;
|
|
34
|
+
options: DialogOptions;
|
|
35
|
+
name: string;
|
|
36
|
+
status: string;
|
|
37
|
+
tmp: Record<string, unknown>;
|
|
38
|
+
handleResize: (event?: any) => void;
|
|
39
|
+
_promCreated: (value?: unknown) => void;
|
|
40
|
+
_promOpened: (value?: unknown) => void;
|
|
41
|
+
_promClosing: (value?: unknown) => void;
|
|
42
|
+
_promClosed: (value?: unknown) => void;
|
|
43
|
+
_timer?: ReturnType<typeof setTimeout>;
|
|
44
|
+
constructor();
|
|
45
|
+
/**
|
|
46
|
+
* Sample calls
|
|
47
|
+
* - TsPopup.open('ddd').ok(() => { TsPopup.close() })
|
|
48
|
+
* - TsPopup.open('ddd', { height: 120 }).ok(() => { TsPopup.close() })
|
|
49
|
+
* - TsPopup.open({ body: 'text', title: 'caption', actions: ["Close"] }).close(() => { TsPopup.close() })
|
|
50
|
+
* - TsPopup.open({ body: 'text', title: 'caption', actions: { Close() { TsPopup.close() }} })
|
|
51
|
+
*/
|
|
52
|
+
open(options?: any, extraOptions?: any): (Record<string, unknown> & {
|
|
53
|
+
self: TsDialog;
|
|
54
|
+
action(callBack: any): Record<string, unknown> & /*elided*/ any;
|
|
55
|
+
close(callBack: any): Record<string, unknown> & /*elided*/ any;
|
|
56
|
+
then(callBack: any): Record<string, unknown> & /*elided*/ any;
|
|
57
|
+
}) | undefined;
|
|
58
|
+
load(options: any): Promise<unknown>;
|
|
59
|
+
template(data: any, id: any, options?: any): (Record<string, unknown> & {
|
|
60
|
+
self: TsDialog;
|
|
61
|
+
action(callBack: any): Record<string, unknown> & /*elided*/ any;
|
|
62
|
+
close(callBack: any): Record<string, unknown> & /*elided*/ any;
|
|
63
|
+
then(callBack: any): Record<string, unknown> & /*elided*/ any;
|
|
64
|
+
}) | undefined;
|
|
65
|
+
action(action: any, event?: any): void;
|
|
66
|
+
keydown(event: any): void;
|
|
67
|
+
close(immediate?: any): void;
|
|
68
|
+
toggle(): void;
|
|
69
|
+
max(): void;
|
|
70
|
+
min(): void;
|
|
71
|
+
clear(): void;
|
|
72
|
+
reset(): void;
|
|
73
|
+
message(options: any): TsMessageProm | undefined;
|
|
74
|
+
confirm(options: any): TsMessageProm | undefined;
|
|
75
|
+
setFocus(focus?: any): void;
|
|
76
|
+
lock(msg?: any, showSpinner?: any): void;
|
|
77
|
+
unlock(speed?: any): void;
|
|
78
|
+
center(width?: any, height?: any, force?: any): {
|
|
79
|
+
top: number;
|
|
80
|
+
left: number;
|
|
81
|
+
width: any;
|
|
82
|
+
height: any;
|
|
83
|
+
};
|
|
84
|
+
resize(newWidth: any, newHeight: any, callBack?: any): Promise<unknown>;
|
|
85
|
+
resizeMessages(): void;
|
|
86
|
+
}
|
|
87
|
+
declare function TsAlert(msg: any, title?: any, callBack?: any): any;
|
|
88
|
+
declare function TsConfirm(msg: any, title?: any, callBack?: any): any;
|
|
89
|
+
declare function TsPrompt(label: any, title?: any, callBack?: any): any;
|
|
90
|
+
declare const TsPopup: TsDialog;
|
|
91
|
+
|
|
92
|
+
declare const __test_internals: {
|
|
93
|
+
readonly tsDialogCtorCount: number;
|
|
94
|
+
reset(): void;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export { TsAlert, TsConfirm, TsDialog, TsPopup, TsPrompt, __test_internals };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TsAlert,
|
|
3
|
+
TsConfirm,
|
|
4
|
+
TsDialog,
|
|
5
|
+
TsPopup,
|
|
6
|
+
TsPrompt,
|
|
7
|
+
__test_internals
|
|
8
|
+
} from "./chunks/chunk-6UCGFWIQ.js";
|
|
9
|
+
import "./chunks/chunk-EQK6JAHT.js";
|
|
10
|
+
import "./chunks/chunk-3NYH6545.js";
|
|
11
|
+
import "./chunks/chunk-IYF3Q7GX.js";
|
|
12
|
+
import "./chunks/chunk-DXZJHS4M.js";
|
|
13
|
+
export {
|
|
14
|
+
TsAlert,
|
|
15
|
+
TsConfirm,
|
|
16
|
+
TsDialog,
|
|
17
|
+
TsPopup,
|
|
18
|
+
TsPrompt,
|
|
19
|
+
__test_internals
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=popup.es6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
type QuerySelector = string | Node | Window | Query | Array<Node | Element> | Iterable<Node | Element> | null | undefined;
|
|
2
|
+
type QueryContext = Document | Element | ShadowRoot | DocumentFragment;
|
|
3
|
+
interface EventRecord {
|
|
4
|
+
event: string;
|
|
5
|
+
scope: string | undefined;
|
|
6
|
+
callback: EventListener;
|
|
7
|
+
options: AddEventListenerOptions | boolean | undefined;
|
|
8
|
+
}
|
|
9
|
+
interface MQueryData {
|
|
10
|
+
events?: EventRecord[];
|
|
11
|
+
prevDisplay?: string;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
declare global {
|
|
15
|
+
interface Node {
|
|
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
|
+
export { Query as Q };
|