d5-userscript-types 1.1.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 +16 -0
- package/package.json +33 -0
- package/publish/d5-userscript-types.d.mts +816 -0
- package/publish/d5-userscript-types.js +69 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## [1.1.0] — 2026-04-09
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- `index.js`: runtime constants layer exporting all D5 enum constants (`D5TitlePosition`, `DecorDisplayType`, `ToolBarViewType`, `FormViewMode`, `FormCreateMode`, `FormToolBarButtons``) as frozen plain objects. Downstream user script projects can now `import {FormCreateMode} from 'd5-userscript-types'` and receive real runtime values instead of `undefined`.
|
|
9
|
+
- `"main": "./index.js"` field in `package.json` so CJS-style imports resolve to the runtime constants file.
|
|
10
|
+
|
|
11
|
+
> **Maintainer note:** `index.js` and `index.d.ts` are manually maintained in parallel. When adding or modifying an enum member, both files must be updated in the same release.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## [1.0.0] — 2026-04-08
|
|
16
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "d5-userscript-types",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Public TypeScript declarations and runtime enum constants for D5 user-script API",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"private": false,
|
|
7
|
+
"scripts": {
|
|
8
|
+
"clean": "rimraf publish",
|
|
9
|
+
"prepublishOnly": "yarn clean",
|
|
10
|
+
"prepack": "yarn compile",
|
|
11
|
+
"compile": "tsup"
|
|
12
|
+
},
|
|
13
|
+
"main": "publish/d5-userscript-types.js",
|
|
14
|
+
"module": "publish/d5-userscript-types.js",
|
|
15
|
+
"types": "publish/d5-userscript-types.d.mts",
|
|
16
|
+
"exports": {
|
|
17
|
+
"./package.json": "./package.json",
|
|
18
|
+
".": {
|
|
19
|
+
"types": {
|
|
20
|
+
"default": "./publish/d5-userscript-types.d.mts"
|
|
21
|
+
},
|
|
22
|
+
"default": "./publish/d5-userscript-types.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"publish",
|
|
27
|
+
"CHANGELOG.md"
|
|
28
|
+
],
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"rimraf": "5.0.5",
|
|
31
|
+
"tsup": "8.5.0"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,816 @@
|
|
|
1
|
+
interface CustomDialogButton {
|
|
2
|
+
text: string;
|
|
3
|
+
value: any;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface IApplication {
|
|
7
|
+
name: string;
|
|
8
|
+
title: string;
|
|
9
|
+
version: string;
|
|
10
|
+
}
|
|
11
|
+
type DialogButton = 'ok' | 'cancel' | 'yes' | 'no' | 'copy' | CustomDialogButton;
|
|
12
|
+
type Language = 'ua' | 'ru' | 'en';
|
|
13
|
+
declare enum D5TitlePosition {
|
|
14
|
+
Top = 0,
|
|
15
|
+
Left = 1,
|
|
16
|
+
Right = 2,
|
|
17
|
+
OnBorder = 3,
|
|
18
|
+
Floating = 4
|
|
19
|
+
}
|
|
20
|
+
declare enum DecorDisplayType {
|
|
21
|
+
LABEL = 0,
|
|
22
|
+
IMAGE = 1,
|
|
23
|
+
ICON = 2,
|
|
24
|
+
LINK = 3,
|
|
25
|
+
HTML = 4,
|
|
26
|
+
FILE_VIEWER = 5,
|
|
27
|
+
LINE = 6
|
|
28
|
+
}
|
|
29
|
+
declare enum ToolBarViewType {
|
|
30
|
+
NONE = 0,
|
|
31
|
+
TOP_AND_CONTEXT = 1,
|
|
32
|
+
TOP = 2,
|
|
33
|
+
CONTEXT = 3
|
|
34
|
+
}
|
|
35
|
+
interface D5CurrentUser {
|
|
36
|
+
readonly userID: number;
|
|
37
|
+
readonly login: string;
|
|
38
|
+
readonly fullName: string;
|
|
39
|
+
}
|
|
40
|
+
interface UserStorage {
|
|
41
|
+
getStorageItem: (key: string) => string | null;
|
|
42
|
+
setStorageItem: (key: string, value: any) => void;
|
|
43
|
+
removeStorageItem: (key: string) => void;
|
|
44
|
+
clearStorage: () => void;
|
|
45
|
+
}
|
|
46
|
+
declare enum FormViewMode {
|
|
47
|
+
FULL_SCREEN = 1,
|
|
48
|
+
MODAL = 2,
|
|
49
|
+
IN_NEW_WINDOW = 3
|
|
50
|
+
}
|
|
51
|
+
declare enum FormCreateMode {
|
|
52
|
+
ADD = "add",
|
|
53
|
+
ADD_CHILD = "addChild",
|
|
54
|
+
EDIT = "edit",
|
|
55
|
+
MULTI_EDIT = "multiEdit",
|
|
56
|
+
FILTER_MODAL = "filterModal",
|
|
57
|
+
REPORT = "report",
|
|
58
|
+
FORM_SELECT = "formSelect",
|
|
59
|
+
LIST = "listForm",
|
|
60
|
+
TREE = "treeForm",
|
|
61
|
+
FREE = "freeForm"
|
|
62
|
+
}
|
|
63
|
+
declare enum FormToolBarButtons {
|
|
64
|
+
SAVE = "save",
|
|
65
|
+
CLOSE = "close",
|
|
66
|
+
APPLY = "apply",
|
|
67
|
+
SELECT = "select",
|
|
68
|
+
SAVE_CLOSE = "saveClose",
|
|
69
|
+
CANCEL = "cancel",
|
|
70
|
+
SaveAndCreateOneMore = "saveAndCreateOneMore"
|
|
71
|
+
}
|
|
72
|
+
interface CloseFormResolveOptions {
|
|
73
|
+
button: FormToolBarButtons;
|
|
74
|
+
userData: any;
|
|
75
|
+
}
|
|
76
|
+
interface OpeningFormOptions {
|
|
77
|
+
createMode?: FormCreateMode;
|
|
78
|
+
id?: number | string | Array<number | string>;
|
|
79
|
+
viewMode?: FormViewMode;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Base interface of all the layout items are passed to user script.
|
|
83
|
+
*/
|
|
84
|
+
interface BaseItem {
|
|
85
|
+
readonly name: string;
|
|
86
|
+
readonly id: number;
|
|
87
|
+
readonly groupID: number | null;
|
|
88
|
+
order: number;
|
|
89
|
+
isVisible: boolean;
|
|
90
|
+
}
|
|
91
|
+
type ILanguage = {
|
|
92
|
+
id: number;
|
|
93
|
+
code: string;
|
|
94
|
+
title: string;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Base interface for fields, filters and decorations
|
|
98
|
+
*/
|
|
99
|
+
interface BaseControl extends BaseItem {
|
|
100
|
+
isReadOnly: boolean;
|
|
101
|
+
}
|
|
102
|
+
interface D5Core {
|
|
103
|
+
currentUser: D5CurrentUser;
|
|
104
|
+
languages: ILanguage[];
|
|
105
|
+
userLocalStorage: UserStorage;
|
|
106
|
+
userSessionStorage: UserStorage;
|
|
107
|
+
lang(): Language;
|
|
108
|
+
numberPrompt(title: string, defaultValue?: number): Promise<number | undefined>;
|
|
109
|
+
stringPrompt(title: string, defaultValue?: string): Promise<string | undefined>;
|
|
110
|
+
datePrompt(title: string, defaultValue?: Date | string): Promise<Date | string | undefined>;
|
|
111
|
+
dateRangePrompt(title: string, defaultValue?: Array<Date | string>): Promise<Array<Date | string> | undefined>;
|
|
112
|
+
getApplications(): IApplication[];
|
|
113
|
+
getApplication(name: string): IApplication | null;
|
|
114
|
+
getFormStorageData(key: string): Promise<any>;
|
|
115
|
+
setFormStorageData(key: string, value: any): Promise<void>;
|
|
116
|
+
removeFormStorageData(key: string): Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Stores user data in the storage with optional encryption.
|
|
119
|
+
*
|
|
120
|
+
* @param {Record<string, any>} data - The user data to be stored.
|
|
121
|
+
* @param {boolean} [encrypt=false] - Indicates whether the data should be encrypted before storage.
|
|
122
|
+
* @param {string} [salt] - An optional salt value used if encryption is enabled. If not provided, the application name will be taken .
|
|
123
|
+
* @return {Promise<void>} A promise that resolves when the data is successfully stored.
|
|
124
|
+
*/
|
|
125
|
+
userStorageSet(data: Record<string, any>, encrypt?: boolean, salt?: string): Promise<void>;
|
|
126
|
+
/**
|
|
127
|
+
* Retrieves user storage data based on the provided property and optional salt.
|
|
128
|
+
*
|
|
129
|
+
* @param {string} property - The key of the user data to retrieve.
|
|
130
|
+
* @param {string} [salt=''] - If the data were encrypted with user-defined salt, then the same salt must be provided.
|
|
131
|
+
* @return {Promise<any>} A promise that resolves with the retrieved user data.
|
|
132
|
+
*/
|
|
133
|
+
userStorageGet(property: string, salt?: string): Promise<any>;
|
|
134
|
+
/**
|
|
135
|
+
* Removes a specified property from the user storage.
|
|
136
|
+
*
|
|
137
|
+
* @param {string} property - The key representing the property to be removed from the user storage.
|
|
138
|
+
* @return {Promise<void>} A promise that resolves when the property has been successfully removed.
|
|
139
|
+
*/
|
|
140
|
+
userStorageRemove(property: string | string[]): Promise<void>;
|
|
141
|
+
enumPrompt(title: string, dataSource: Record<string | number, string | number>[], { isMultiSelect, defaultValue, widget }: {
|
|
142
|
+
isMultiSelect?: boolean;
|
|
143
|
+
defaultValue?: number | number[];
|
|
144
|
+
widget?: 'listSelector' | 'lookup';
|
|
145
|
+
}): Promise<any | undefined>;
|
|
146
|
+
showWarningDialog(text: string, buttons?: DialogButton[], title?: string): Promise<DialogButton | string>;
|
|
147
|
+
showInfoDialog(text: string, buttons?: DialogButton[], title?: string): Promise<DialogButton | string>;
|
|
148
|
+
showErrorDialog(text: string, buttons?: DialogButton[], title?: string): Promise<DialogButton | string>;
|
|
149
|
+
showSuccessDialog(text: string, buttons?: DialogButton[], title?: string): Promise<DialogButton | string>;
|
|
150
|
+
showCustomDialog(text: string, buttons?: DialogButton[], title?: string): Promise<DialogButton | string>;
|
|
151
|
+
showConfirmDialog(text: string, buttons?: DialogButton[], title?: string): Promise<DialogButton | string>;
|
|
152
|
+
formatNumber(value: string | number, format: string): string;
|
|
153
|
+
formatDate(value: Date | string, format: string): string;
|
|
154
|
+
hideLoader(): void;
|
|
155
|
+
showLoader(): void;
|
|
156
|
+
showInfo(msg: string, title?: string, messageTimeout?: number): void;
|
|
157
|
+
showWarning(msg: string, title?: string, messageTimeout?: number): void;
|
|
158
|
+
showSuccess(msg: string, title?: string, messageTimeout?: number): void;
|
|
159
|
+
showError(msg: string, title?: string, messageTimeout?: number): void;
|
|
160
|
+
/**
|
|
161
|
+
* Якщо передано filePath, то ще додає хеш збірки для кешування ресурсу
|
|
162
|
+
* @example
|
|
163
|
+
* core.resourcePath('myapp');
|
|
164
|
+
* core.resourcePath('myapp', '/path/img.png') // .../path/img.png?hash=123456
|
|
165
|
+
* core.resourcePath('myapp', '/path/img.png?param=1') // .../path/img.png?param=1&hash=123456
|
|
166
|
+
*/
|
|
167
|
+
resourcePath(application: string, filePath?: string): string;
|
|
168
|
+
/**
|
|
169
|
+
* Повертає хеш збірки застосунку
|
|
170
|
+
*/
|
|
171
|
+
buildHash(application: string): string;
|
|
172
|
+
/**
|
|
173
|
+
* navigate - метод который служит для перерисовки текущей страницы без ее перезагрузки.
|
|
174
|
+
* @param {string} url - часть роута, например: /subsystem/92
|
|
175
|
+
*/
|
|
176
|
+
navigate(url: string): void;
|
|
177
|
+
/**
|
|
178
|
+
* newTab и newWindow работают по принципу window.open (это просто алиасы).
|
|
179
|
+
* Для переброса по текущему домену приложения url обязательно нужно начинать с #, например: #/subsystem/92.
|
|
180
|
+
* Для перехода на стороннюю страницу нужно указывать абсолютный путь.
|
|
181
|
+
* @param {string} url
|
|
182
|
+
*/
|
|
183
|
+
newTab(url: string): void;
|
|
184
|
+
currentSubsystemName(): string;
|
|
185
|
+
currentSubsystemTitle(): string;
|
|
186
|
+
newWindow(url: string): void;
|
|
187
|
+
/**
|
|
188
|
+
* Делает запрос на сервер. Если сервер возвращает ошибку, то возвращаем полносью весь объект.
|
|
189
|
+
* @param {string} objectName - имя объекта
|
|
190
|
+
* @param {'List' | 'Ins' | 'Mod' | 'Del'} objectOperation - операция запроса
|
|
191
|
+
* @param {Object} requestBody - тело запроса
|
|
192
|
+
* @param {boolean} [plainResponse] - если true, то возвращает полный ответ такой как отдает сервер.
|
|
193
|
+
*/
|
|
194
|
+
execObjectOperation(objectName: string, objectOperation: string, requestBody: Record<string, any>, plainResponse?: boolean): Promise<any>;
|
|
195
|
+
/**
|
|
196
|
+
* Делает запрос на получение данных (List). Возвращает список значенией по запрашиваемому объекту
|
|
197
|
+
* @param {string} objectName - имя объекта
|
|
198
|
+
* @param {Object} requestBody - тело запроса
|
|
199
|
+
*/
|
|
200
|
+
loadObjectCollection(objectName: string, requestBody: Record<string, any>): Promise<any>;
|
|
201
|
+
/**
|
|
202
|
+
* Делает запрос на получение данных (List). Возвращает список всех значений по запрашиваемому объекту.
|
|
203
|
+
* Делает постраничный запрос, пока страницы не закончатся на сервере.
|
|
204
|
+
* Возвращает массив объектов, которые нужно итерировать с помощью for await... of
|
|
205
|
+
* @param objectName
|
|
206
|
+
* @param requestBody
|
|
207
|
+
*/
|
|
208
|
+
objectCollectionIterator(objectName: string, requestBody: Record<string, any>): AsyncGenerator<Object[]>;
|
|
209
|
+
/** Открывает в текущем окне Полноэкранную форму по Name. Бросает исключение если форма не найдена.
|
|
210
|
+
* @param {number | string} formName - Name формы которую нужно открыть.
|
|
211
|
+
* @param {OpeningFormOptions} options
|
|
212
|
+
* @param {*} [userData] - любые данные которые передаются в форму и будут дальше передаваться во все
|
|
213
|
+
* события. Пользователь сам управляет что это может быть
|
|
214
|
+
*/
|
|
215
|
+
openFullScreen(formName: string, options?: OpeningFormOptions, userData?: any): Promise<unknown>;
|
|
216
|
+
/**
|
|
217
|
+
* Открывает Модальную форму по Name. Возвращает промис по закрытию. Бросает исключение если форма не найдена.
|
|
218
|
+
* @param {number | string} formName - Name формы которую нужно открыть.
|
|
219
|
+
* @param {OpeningFormOptions} options
|
|
220
|
+
* @param {*} [userData] - любые данные которые передаются в форму и будут дальше передаваться во все
|
|
221
|
+
* события. Пользователь сам управляет что это может быть
|
|
222
|
+
*/
|
|
223
|
+
openModal(formName: string, options?: OpeningFormOptions, userData?: any): Promise<CloseFormResolveOptions>;
|
|
224
|
+
/**
|
|
225
|
+
* Открывает Модальную или Полноэкранную(в текущем окне) форму по ID или Name, в зависимости от options.viewMode.
|
|
226
|
+
* Бросает исключение если форма не найдена.
|
|
227
|
+
* @param {number | string} form - ID | Name формы которую нужно открыть.
|
|
228
|
+
* @param {OpeningFormOptions} options
|
|
229
|
+
* @param {*} [userData] - любые данные которые передаются в форму и будут дальше передаваться во все
|
|
230
|
+
* события. Пользователь сам управляет что это может быть
|
|
231
|
+
*/
|
|
232
|
+
openForm(form: number | string, options?: OpeningFormOptions, userData?: any): void;
|
|
233
|
+
/**
|
|
234
|
+
* Инициализация словаря переводов.
|
|
235
|
+
* @param dictionary
|
|
236
|
+
* @example Пример строки перевода
|
|
237
|
+
* { ...
|
|
238
|
+
* "ru": {"key": 'some text {0} {1}'}
|
|
239
|
+
* ...
|
|
240
|
+
* }
|
|
241
|
+
*
|
|
242
|
+
* core.t('key', ['test1', 'test2']); // 'some text test1 test2'
|
|
243
|
+
*/
|
|
244
|
+
initTranslation(dictionary: Record<'ru' | 'ua' | 'en', Record<string, string>>): void;
|
|
245
|
+
/**
|
|
246
|
+
* Переводит и форматирует строку из словаря переводов согласно текущего языка приложения.
|
|
247
|
+
* @param msgKey
|
|
248
|
+
* @param params
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* {
|
|
252
|
+
* ...
|
|
253
|
+
* "myKey": 'some text with {0}'
|
|
254
|
+
* ...
|
|
255
|
+
* }
|
|
256
|
+
* t('myKey', ['placeholder text']) // 'some text with placeholder text'
|
|
257
|
+
*/
|
|
258
|
+
t(msgKey: string, params?: string[]): string;
|
|
259
|
+
}
|
|
260
|
+
interface BaseDataSource {
|
|
261
|
+
refreshData(): Promise<boolean>;
|
|
262
|
+
data: Record<string, any> | Record<string, any>[];
|
|
263
|
+
}
|
|
264
|
+
interface ListDataSource extends BaseDataSource {
|
|
265
|
+
rowsPerPage: number | 'all' | undefined;
|
|
266
|
+
readonly rowsData: Record<string, any>[];
|
|
267
|
+
readonly rowsCount: number;
|
|
268
|
+
disabled: boolean;
|
|
269
|
+
}
|
|
270
|
+
interface D5FormDecorationElement extends BaseItem {
|
|
271
|
+
title: string;
|
|
272
|
+
lineCount: number;
|
|
273
|
+
displayType: DecorDisplayType;
|
|
274
|
+
displayCustomParam: string;
|
|
275
|
+
readonly parentGroup: D5FormGroup | undefined;
|
|
276
|
+
text: string;
|
|
277
|
+
}
|
|
278
|
+
interface IBaseDynamicItem<Item> {
|
|
279
|
+
field(name: string): Item | undefined;
|
|
280
|
+
insertField(_: {
|
|
281
|
+
name: string;
|
|
282
|
+
title?: string;
|
|
283
|
+
value?: any;
|
|
284
|
+
}): void;
|
|
285
|
+
removeField(name: string): void;
|
|
286
|
+
fields: Item[];
|
|
287
|
+
name: string;
|
|
288
|
+
}
|
|
289
|
+
interface ID5Column {
|
|
290
|
+
isRequired: boolean;
|
|
291
|
+
isVisible: boolean;
|
|
292
|
+
isCustomizable: boolean;
|
|
293
|
+
isReadOnly: boolean;
|
|
294
|
+
readonly name: string;
|
|
295
|
+
title: string;
|
|
296
|
+
readonly isBaseMultiField: boolean | undefined;
|
|
297
|
+
readonly isDynamicColumn: boolean | undefined;
|
|
298
|
+
readonly groupID: number | null;
|
|
299
|
+
fixedToLeft: boolean;
|
|
300
|
+
lineCount: number;
|
|
301
|
+
datasource: any;
|
|
302
|
+
filter: any;
|
|
303
|
+
operationsParams: Record<string, any> | null;
|
|
304
|
+
displayValue: string | undefined;
|
|
305
|
+
value: any;
|
|
306
|
+
iconColor: string;
|
|
307
|
+
iconSize: string;
|
|
308
|
+
sortOrder: 'asc' | 'desc' | undefined;
|
|
309
|
+
sortIndex: number | undefined;
|
|
310
|
+
summaryValue: number;
|
|
311
|
+
}
|
|
312
|
+
interface D5DynamicColumn extends IBaseDynamicItem<ID5Column> {
|
|
313
|
+
}
|
|
314
|
+
interface D5DynamicFormField extends IBaseDynamicItem<D5FormField> {
|
|
315
|
+
}
|
|
316
|
+
interface D5FormField extends BaseControl {
|
|
317
|
+
title: string;
|
|
318
|
+
isShowTitle: boolean;
|
|
319
|
+
datasource: any;
|
|
320
|
+
/**
|
|
321
|
+
* Тип поля. string - 0, number - 1, date - 2, boolean - 3, nested - 4.
|
|
322
|
+
*/
|
|
323
|
+
fieldType: number;
|
|
324
|
+
exportAsSVG?: () => Promise<string | null>;
|
|
325
|
+
/**
|
|
326
|
+
* Зберігає пароль поточного поля до менеджера облікових даних браузера.
|
|
327
|
+
* Використовує Credential Management API (PasswordCredential).
|
|
328
|
+
*
|
|
329
|
+
* Ідентифікатор облікового запису генерується автоматично
|
|
330
|
+
* з ідентифікатора форми та імені поля.
|
|
331
|
+
*
|
|
332
|
+
* @param {string} name - Ім'я користувача або відображуване ім'я для облікового запису.
|
|
333
|
+
* @returns {Promise<void>}
|
|
334
|
+
* @throws {Error} Якщо тип відображення поля не є "password".
|
|
335
|
+
*/
|
|
336
|
+
savePassword(name: string): Promise<void>;
|
|
337
|
+
/**
|
|
338
|
+
* Используется для экспорта данных в виде объекта File.
|
|
339
|
+
* Разрешается использовать только для компонент с типом File и установленным признаком IsFile.
|
|
340
|
+
* @link https://developer.mozilla.org/en-US/docs/Web/API/File
|
|
341
|
+
*/
|
|
342
|
+
exportAsFile?: () => File | null;
|
|
343
|
+
titlePosition: D5TitlePosition;
|
|
344
|
+
isRequired: boolean;
|
|
345
|
+
lineCount: number;
|
|
346
|
+
value: string | number | boolean | any;
|
|
347
|
+
displayValue: string;
|
|
348
|
+
operationsParams: Record<string, any> | null;
|
|
349
|
+
color: string;
|
|
350
|
+
fontSize: string;
|
|
351
|
+
readonly parentField: D5FormField | undefined;
|
|
352
|
+
readonly parentGroup: D5FormGroup | undefined;
|
|
353
|
+
filter: Record<string, any> | null;
|
|
354
|
+
}
|
|
355
|
+
type FilterOperations = '=' | '<>' | '<' | '>' | '<=' | '>=' | 'contains' | 'between' | 'isanyof' | 'isnotanyof' | 'isblank' | 'isnotblank';
|
|
356
|
+
interface D5FormFilterField extends BaseControl {
|
|
357
|
+
title: string;
|
|
358
|
+
isRequired: boolean;
|
|
359
|
+
isShowTitle: boolean;
|
|
360
|
+
isCustomizable: boolean;
|
|
361
|
+
titlePosition: D5TitlePosition;
|
|
362
|
+
/**
|
|
363
|
+
* Тип поля. string - 0, number - 1, date - 2, boolean - 3, nested - 4.
|
|
364
|
+
*/
|
|
365
|
+
fieldType: number;
|
|
366
|
+
value: string | number | boolean | any;
|
|
367
|
+
displayValue: string;
|
|
368
|
+
operationsParams: Record<string, any> | null;
|
|
369
|
+
filter: Record<string, any> | null;
|
|
370
|
+
operation: FilterOperations;
|
|
371
|
+
defaultValue: any;
|
|
372
|
+
defaultOperation: FilterOperations;
|
|
373
|
+
readonly parentGroup: D5FormGroup | undefined;
|
|
374
|
+
/**
|
|
375
|
+
* Only for Enums
|
|
376
|
+
*/
|
|
377
|
+
datasource: [];
|
|
378
|
+
/**
|
|
379
|
+
* Value as API object
|
|
380
|
+
*/
|
|
381
|
+
valueAsObject: Record<any, any>;
|
|
382
|
+
isBlank: boolean;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Base interface for groups
|
|
386
|
+
*/
|
|
387
|
+
interface D5FormGroup extends BaseItem {
|
|
388
|
+
title: string;
|
|
389
|
+
isCollapsed: boolean;
|
|
390
|
+
isShowTitle: boolean;
|
|
391
|
+
isActive: boolean;
|
|
392
|
+
isDisabled: boolean;
|
|
393
|
+
colorScheme: D5ColorScheme | null;
|
|
394
|
+
stylingMode: D5StylingMode | null;
|
|
395
|
+
readonly parentGroup: D5FormGroup | undefined;
|
|
396
|
+
}
|
|
397
|
+
type ColorScheme = 'default' | 'primary' | 'success' | 'danger' | 'warning' | 'main scheme';
|
|
398
|
+
type ReplaceSubFormArgs = {
|
|
399
|
+
name: string;
|
|
400
|
+
formName: string;
|
|
401
|
+
masterFieldName?: string;
|
|
402
|
+
detailFieldName?: string;
|
|
403
|
+
nestedFieldName?: string;
|
|
404
|
+
relationType?: number;
|
|
405
|
+
order: number;
|
|
406
|
+
};
|
|
407
|
+
type AddSubFormArgs = ReplaceSubFormArgs & {
|
|
408
|
+
groupName?: string;
|
|
409
|
+
groupID?: number;
|
|
410
|
+
};
|
|
411
|
+
interface D5ColorScheme {
|
|
412
|
+
/**
|
|
413
|
+
* Метод getCurrent() класса ColorScheme - возвращает текущие значение.
|
|
414
|
+
* Может быть - default | primary | success | danger | warning | main scheme
|
|
415
|
+
*/
|
|
416
|
+
getCurrent(): ColorScheme;
|
|
417
|
+
/**
|
|
418
|
+
* Метод setDefault() класса ColorScheme - устанавливает значение default.
|
|
419
|
+
*/
|
|
420
|
+
setDefault(): void;
|
|
421
|
+
/**
|
|
422
|
+
* Метод setPrimary() класса ColorScheme - устанавливает значение primary.
|
|
423
|
+
*/
|
|
424
|
+
setPrimary(): void;
|
|
425
|
+
/**
|
|
426
|
+
* Метод setSuccess() класса ColorScheme - устанавливает значение success.
|
|
427
|
+
*/
|
|
428
|
+
setSuccess(): void;
|
|
429
|
+
/**
|
|
430
|
+
* Метод setDanger() класса ColorScheme - устанавливает значение danger.
|
|
431
|
+
*/
|
|
432
|
+
setDanger(): void;
|
|
433
|
+
/**
|
|
434
|
+
* Метод setWarning() класса ColorScheme - устанавливает значение warning.
|
|
435
|
+
*/
|
|
436
|
+
setWarning(): void;
|
|
437
|
+
/**
|
|
438
|
+
* Метод setMainScheme() класса ColorScheme - устанавливает значение main scheme.
|
|
439
|
+
*/
|
|
440
|
+
setMainScheme(): void;
|
|
441
|
+
}
|
|
442
|
+
type StylingMode = 'none' | 'outlined' | 'contained';
|
|
443
|
+
interface D5StylingMode {
|
|
444
|
+
/**
|
|
445
|
+
* Метод getCurrent() класса StylingMode - возвращает текущие значение. Может быть - none | outlined | contained
|
|
446
|
+
*/
|
|
447
|
+
getCurrent(): StylingMode;
|
|
448
|
+
/**
|
|
449
|
+
* Метод setNone() класса StylingMode - устанавливает значение none.
|
|
450
|
+
*/
|
|
451
|
+
setNone(): void;
|
|
452
|
+
/**
|
|
453
|
+
* Метод setOutlined() класса StylingMode - устанавливает значение outlined.
|
|
454
|
+
*/
|
|
455
|
+
setOutlined(): void;
|
|
456
|
+
/**
|
|
457
|
+
* Метод setContained() класса StylingMode - устанавливает значение contained.
|
|
458
|
+
*/
|
|
459
|
+
setContained(): void;
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Base interface for buttons
|
|
463
|
+
*/
|
|
464
|
+
interface D5FormButton extends BaseItem {
|
|
465
|
+
title: string;
|
|
466
|
+
isDisabled: boolean;
|
|
467
|
+
isPressed: boolean;
|
|
468
|
+
isEditButtonByDefault: boolean;
|
|
469
|
+
icon: string;
|
|
470
|
+
readonly actionForm: string | null;
|
|
471
|
+
colorScheme: D5ColorScheme | null;
|
|
472
|
+
stylingMode: D5StylingMode | null;
|
|
473
|
+
readonly parentField: D5FormField | undefined;
|
|
474
|
+
readonly parentGroup: D5FormGroup | undefined;
|
|
475
|
+
}
|
|
476
|
+
interface D5BaseForm {
|
|
477
|
+
readonly id: string;
|
|
478
|
+
readonly name: string;
|
|
479
|
+
readonly applicationName: string;
|
|
480
|
+
readonly objectName: string;
|
|
481
|
+
readonly keyField: string;
|
|
482
|
+
readonly parentField: string | undefined;
|
|
483
|
+
subFormName: string | undefined;
|
|
484
|
+
title: string;
|
|
485
|
+
insOperation: string;
|
|
486
|
+
modOperation: string;
|
|
487
|
+
delOperation: string;
|
|
488
|
+
listOperation: string;
|
|
489
|
+
operationsParams: any;
|
|
490
|
+
/**
|
|
491
|
+
* Пользовательские данные формы. Задаются из пользовательского скрипта. Передаются по ссылке.
|
|
492
|
+
*/
|
|
493
|
+
userData?: any;
|
|
494
|
+
readonly buttons: Array<D5FormButton>;
|
|
495
|
+
/**
|
|
496
|
+
* @param name - Sys_Forms.Sys_FormButtons.Name
|
|
497
|
+
*/
|
|
498
|
+
button: (name: string) => D5FormButton | undefined;
|
|
499
|
+
readonly groups: Array<D5FormGroup>;
|
|
500
|
+
group: (name: string) => D5FormGroup | undefined;
|
|
501
|
+
readonly decorationElements: Array<D5FormDecorationElement>;
|
|
502
|
+
decorationElement: (name: string) => D5FormDecorationElement | undefined;
|
|
503
|
+
readonly subForms: Array<D5BaseForm>;
|
|
504
|
+
subForm: (name: string) => D5BaseForm | undefined;
|
|
505
|
+
parentForm: D5BaseForm | undefined;
|
|
506
|
+
/**
|
|
507
|
+
* @param {boolean} [silentMode=false] - если true, то закрывает форму не вызывая диалоговые окна с подтверждением.
|
|
508
|
+
*/
|
|
509
|
+
close(silentMode: boolean): void;
|
|
510
|
+
removeSubForm: (subFormName: string) => void;
|
|
511
|
+
replaceSubForm: (options: ReplaceSubFormArgs, destSubFormName: string) => void;
|
|
512
|
+
addSubForm: (options: AddSubFormArgs) => void;
|
|
513
|
+
autoRefreshTimeout: number;
|
|
514
|
+
isAutoRefresh: boolean;
|
|
515
|
+
isShowTitle: boolean;
|
|
516
|
+
isModified: boolean;
|
|
517
|
+
isSilentClosing: boolean;
|
|
518
|
+
navigateToElement(layoutItem: BaseControl | D5BaseForm): void;
|
|
519
|
+
setFocus(layoutItem: BaseControl | D5BaseForm): void;
|
|
520
|
+
/**
|
|
521
|
+
* Возвращает строку - текущий язык приложения, например ua, ru, en
|
|
522
|
+
*/
|
|
523
|
+
lang(): Language;
|
|
524
|
+
/**
|
|
525
|
+
* Метод, который открывает панель фильтрации, без параметров.
|
|
526
|
+
*/
|
|
527
|
+
showFilter(): void;
|
|
528
|
+
/**
|
|
529
|
+
* Метод, который открывает панель фильтра(смарт папки). Без параметров.
|
|
530
|
+
*/
|
|
531
|
+
showFilterDockPanel(): void;
|
|
532
|
+
/**
|
|
533
|
+
* Метод, который открывает панель редактирования с правой стороны. Без параметров.
|
|
534
|
+
*/
|
|
535
|
+
showEditDockPanel(): void;
|
|
536
|
+
disabled: boolean;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Base interface for new button
|
|
540
|
+
*/
|
|
541
|
+
interface NewButtonProps {
|
|
542
|
+
name: string;
|
|
543
|
+
clickEvent: string;
|
|
544
|
+
groupName?: string;
|
|
545
|
+
order?: number;
|
|
546
|
+
title?: string;
|
|
547
|
+
colorScheme: number;
|
|
548
|
+
dockingSide: number;
|
|
549
|
+
icon?: string;
|
|
550
|
+
}
|
|
551
|
+
interface D5Column {
|
|
552
|
+
order: number;
|
|
553
|
+
isRequired: boolean;
|
|
554
|
+
isVisible: boolean;
|
|
555
|
+
isCustomizable: boolean;
|
|
556
|
+
isReadOnly: boolean;
|
|
557
|
+
readonly name: string;
|
|
558
|
+
title: string;
|
|
559
|
+
readonly isBaseMultiField: boolean | undefined;
|
|
560
|
+
readonly isDynamicColumn: boolean | undefined;
|
|
561
|
+
readonly groupID: number | null;
|
|
562
|
+
fixedToLeft: boolean;
|
|
563
|
+
lineCount: number;
|
|
564
|
+
datasource: any;
|
|
565
|
+
filter: any;
|
|
566
|
+
value: any;
|
|
567
|
+
}
|
|
568
|
+
interface D5ListForm extends D5BaseForm {
|
|
569
|
+
datasource: ListDataSource;
|
|
570
|
+
filterField(name: string): D5FormFilterField | undefined;
|
|
571
|
+
readonly filterFields: Array<D5FormFilterField>;
|
|
572
|
+
toolBarViewType: ToolBarViewType;
|
|
573
|
+
readonly fields: Array<D5Column | D5DynamicColumn>;
|
|
574
|
+
isFixedOrder: boolean;
|
|
575
|
+
readonly subsystemName: string | undefined;
|
|
576
|
+
field(name: string): D5Column | D5DynamicColumn | undefined;
|
|
577
|
+
/** Создает урл текущей формы с установленным фильтром.
|
|
578
|
+
*/
|
|
579
|
+
filterUrl(): Promise<string | null>;
|
|
580
|
+
/** Створює нову кнопку в тулбарі і контекстному меню
|
|
581
|
+
* @param name - ім'я нової кнопки
|
|
582
|
+
* @param clickEvent - назва eventName
|
|
583
|
+
* @param groupName - назва групи
|
|
584
|
+
* @param colorScheme - кольорова схема кнопки
|
|
585
|
+
* @param dockingSide - сторона відображення кнопки в тулбарі
|
|
586
|
+
* @param order - порядок розсташування кнопки
|
|
587
|
+
* @param title - заголовок кнопки
|
|
588
|
+
* @param icon - іконка
|
|
589
|
+
*/
|
|
590
|
+
addButton(props: NewButtonProps): void;
|
|
591
|
+
/** Видаляє тільки ті кнопки, які були створенні в клієнтських скріптах.
|
|
592
|
+
* @param name - назва кнопки
|
|
593
|
+
*/
|
|
594
|
+
removeButton(name: string): void;
|
|
595
|
+
/**
|
|
596
|
+
* Обновляет записи по указанным ключам. Добавляет новые записи, удаляет ненайденные.
|
|
597
|
+
* @param keys
|
|
598
|
+
* @param [useFilter]
|
|
599
|
+
*/
|
|
600
|
+
refreshRecords(keys: Array<string | number>, useFilter?: boolean): Promise<void>;
|
|
601
|
+
/**
|
|
602
|
+
* Добавляет сортировку для форм типа Таблицы или Дерева.
|
|
603
|
+
* @param sorting
|
|
604
|
+
*/
|
|
605
|
+
setSorting(sorting: string[] | null): void;
|
|
606
|
+
/**
|
|
607
|
+
* Метод, который открывает форму отчета в другой вкладке.
|
|
608
|
+
* @param reportName
|
|
609
|
+
* @param userData
|
|
610
|
+
*/
|
|
611
|
+
openReportGroup(reportName: string, userData?: any): void;
|
|
612
|
+
}
|
|
613
|
+
interface D5USEvent {
|
|
614
|
+
cancel: boolean;
|
|
615
|
+
resolve: () => void;
|
|
616
|
+
reject: () => void;
|
|
617
|
+
}
|
|
618
|
+
interface D5Row {
|
|
619
|
+
readonly data: Record<string, any>;
|
|
620
|
+
readonly key: string | number;
|
|
621
|
+
}
|
|
622
|
+
interface D5Cell {
|
|
623
|
+
rowIndex: number;
|
|
624
|
+
columnIndex: number;
|
|
625
|
+
cellValue: any;
|
|
626
|
+
}
|
|
627
|
+
interface D5TableForm extends D5ListForm {
|
|
628
|
+
readonly focusedRow: D5Row;
|
|
629
|
+
readonly focusedCell: D5Cell;
|
|
630
|
+
readonly rows: D5Row[];
|
|
631
|
+
readonly selectedRows: D5Row[];
|
|
632
|
+
/**
|
|
633
|
+
* Выделяет строки таблицы.
|
|
634
|
+
* @param keys - массив ключей, может быть пустым, если нужно снять выделение.
|
|
635
|
+
*/
|
|
636
|
+
selectRowKeys(keys: Array<string | number>): void;
|
|
637
|
+
/**
|
|
638
|
+
* Удаляет строки в таблице по ключам.
|
|
639
|
+
* @param keys
|
|
640
|
+
* @param remote
|
|
641
|
+
*/
|
|
642
|
+
delRows(keys: string[] | number[], remote?: boolean): void;
|
|
643
|
+
/**
|
|
644
|
+
* Заменяет строку в таблице по ключу.
|
|
645
|
+
* @param key
|
|
646
|
+
* @param newRow
|
|
647
|
+
* @param remote
|
|
648
|
+
*/
|
|
649
|
+
editRow(key: string | number, newRow: Record<string, any>, remote?: boolean): void;
|
|
650
|
+
/**
|
|
651
|
+
* Добавляет строку в таблице.
|
|
652
|
+
* @param newRow
|
|
653
|
+
* @param remote
|
|
654
|
+
*/
|
|
655
|
+
addRow(newRow: Record<string, any>, remote?: boolean): void;
|
|
656
|
+
/**
|
|
657
|
+
* Фиксирует заданные колонки влево.
|
|
658
|
+
* @param keys
|
|
659
|
+
*/
|
|
660
|
+
fixColumnsToLeft(keys: string[] | number[]): void;
|
|
661
|
+
}
|
|
662
|
+
interface D5TreeForm extends D5ListForm {
|
|
663
|
+
selectedNodes: D5Row[];
|
|
664
|
+
focusedNode: D5Row;
|
|
665
|
+
readonly focusedCell: D5Cell;
|
|
666
|
+
nodes: D5Row[];
|
|
667
|
+
/**
|
|
668
|
+
* Выделяет строки дерева.
|
|
669
|
+
* @param keys - массив ключей, может быть пустым, если нужно снять выделение.
|
|
670
|
+
*/
|
|
671
|
+
selectNodeKeys(keys: Array<string | number>): void;
|
|
672
|
+
/**
|
|
673
|
+
* Удаляет строки в дереве по ключам.
|
|
674
|
+
* @param keys
|
|
675
|
+
* @param remote
|
|
676
|
+
*/
|
|
677
|
+
delNodes(keys: string[] | number[], remote?: boolean): void;
|
|
678
|
+
/**
|
|
679
|
+
* Заменяет строку в дереве по ключу.
|
|
680
|
+
* @param key
|
|
681
|
+
* @param newRow
|
|
682
|
+
* @param remote
|
|
683
|
+
*/
|
|
684
|
+
editNode(key: string | number, newRow: Record<string, any>, remote?: boolean): void;
|
|
685
|
+
/**
|
|
686
|
+
* Добавляет строку в дереве.
|
|
687
|
+
* @param newRow
|
|
688
|
+
* @param remote
|
|
689
|
+
*/
|
|
690
|
+
addNode(newRow: Record<string, any>, remote?: boolean): void;
|
|
691
|
+
/**
|
|
692
|
+
* Раскрывает все родительские ноды и выделяет запись с ид nodeId.
|
|
693
|
+
*/
|
|
694
|
+
navigateToNode(nodeId: string | number): void;
|
|
695
|
+
collapseRow(nodeIds: []): void;
|
|
696
|
+
expandRow(nodeIds: []): void;
|
|
697
|
+
collapseAll(): void;
|
|
698
|
+
expandAll(): void;
|
|
699
|
+
/**
|
|
700
|
+
* Фиксирует заданные колонки влево.
|
|
701
|
+
* @param keys
|
|
702
|
+
*/
|
|
703
|
+
fixColumnsToLeft(keys: string[] | number[]): void;
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* Типу форми редагування
|
|
707
|
+
*/
|
|
708
|
+
interface D5Form extends D5BaseForm {
|
|
709
|
+
/**
|
|
710
|
+
* @param silentMode - если равен true то нотивикейшены из приложения вызываться не будут
|
|
711
|
+
* @param operation
|
|
712
|
+
* @throws Error
|
|
713
|
+
*/
|
|
714
|
+
save: (silentMode: boolean, operation: 'Ins' | 'Mod') => Promise<Response | true>;
|
|
715
|
+
/**
|
|
716
|
+
* Установка заголовка кнопки сохранить
|
|
717
|
+
*/
|
|
718
|
+
saveButtonTitle: string;
|
|
719
|
+
/**
|
|
720
|
+
* Установка кастомного сообщения при сохранении
|
|
721
|
+
*/
|
|
722
|
+
saveSuccessMessage: string;
|
|
723
|
+
/**
|
|
724
|
+
* Режим открываемой формы редактирования
|
|
725
|
+
*/
|
|
726
|
+
createMode: FormCreateMode;
|
|
727
|
+
/**
|
|
728
|
+
* Текст под заголовком открываемой формы редактирования
|
|
729
|
+
*/
|
|
730
|
+
subTitle: string;
|
|
731
|
+
filterField(name: string): D5FormFilterField | undefined;
|
|
732
|
+
readonly filterFields: Array<D5FormFilterField>;
|
|
733
|
+
/**
|
|
734
|
+
* Ключевые значения
|
|
735
|
+
*/
|
|
736
|
+
keyValue: string[] | number[];
|
|
737
|
+
/**
|
|
738
|
+
* Возвращает массив данных из выделеных строк которые редактируются
|
|
739
|
+
*/
|
|
740
|
+
readonly rowsData: any[];
|
|
741
|
+
/**
|
|
742
|
+
* Возвращает массив данных из выделенных строк которые редактируются
|
|
743
|
+
*/
|
|
744
|
+
readonly rows: any[];
|
|
745
|
+
/**
|
|
746
|
+
* Возвращает значение свойства readOnly формы редактирования
|
|
747
|
+
*/
|
|
748
|
+
get readOnly(): boolean;
|
|
749
|
+
/**
|
|
750
|
+
* Возвращает или устанавливает значение операции вставки
|
|
751
|
+
*/
|
|
752
|
+
insOperation: string;
|
|
753
|
+
/**
|
|
754
|
+
* Возвращает или устанавливает значение операции модификации
|
|
755
|
+
*/
|
|
756
|
+
modOperation: string;
|
|
757
|
+
/**
|
|
758
|
+
* Форма со значением readOnly === true открывается только для просмотра
|
|
759
|
+
* @param value
|
|
760
|
+
*/
|
|
761
|
+
set readOnly(value: boolean);
|
|
762
|
+
/**
|
|
763
|
+
* Обновляет значения в таблице и во всех вложенных таблицах
|
|
764
|
+
*/
|
|
765
|
+
refresh(): void;
|
|
766
|
+
datasource: BaseDataSource;
|
|
767
|
+
readonly fields: Array<D5FormField>;
|
|
768
|
+
/**
|
|
769
|
+
* @param name - Sys_Forms.Sys_FormFields.Name
|
|
770
|
+
*/
|
|
771
|
+
field: (name: string) => D5FormField | undefined;
|
|
772
|
+
}
|
|
773
|
+
interface D5SchedulerResource {
|
|
774
|
+
filter: Record<string, any> | null;
|
|
775
|
+
isGroup: boolean;
|
|
776
|
+
name: string;
|
|
777
|
+
datasource: Record<string, any>[];
|
|
778
|
+
}
|
|
779
|
+
interface SysFormSchedulerResources {
|
|
780
|
+
dataSource: Record<string, any>[];
|
|
781
|
+
FormID: number;
|
|
782
|
+
GroupOrder: number;
|
|
783
|
+
ID: number;
|
|
784
|
+
IsGroup: number;
|
|
785
|
+
ResourcesColorFieldName: string;
|
|
786
|
+
ResourcesNameFieldName: string;
|
|
787
|
+
ResourcesSortFieldName: string;
|
|
788
|
+
ResourcesObjectName: string;
|
|
789
|
+
SchedulerResourceFieldName: string;
|
|
790
|
+
SchedulerResourceFieldTitle: string;
|
|
791
|
+
}
|
|
792
|
+
interface D5Kanban extends D5BaseForm {
|
|
793
|
+
}
|
|
794
|
+
interface D5Scheduler extends Omit<D5ListForm, 'isFixedOrder' | 'refreshRecords' | 'setSorting' | 'openReportGroup'> {
|
|
795
|
+
readonly datasource: any;
|
|
796
|
+
readonly resources: D5SchedulerResource[];
|
|
797
|
+
startDayHour: number;
|
|
798
|
+
endDayHour: number;
|
|
799
|
+
selectedItems: Record<string, any>[];
|
|
800
|
+
resource(name: string): D5SchedulerResource | undefined;
|
|
801
|
+
addResource(resource: SysFormSchedulerResources): void;
|
|
802
|
+
}
|
|
803
|
+
interface D5TileList extends D5BaseForm {
|
|
804
|
+
selectedTiles: Record<string, any>[];
|
|
805
|
+
}
|
|
806
|
+
interface D5ListView extends D5BaseForm {
|
|
807
|
+
selectedItems: Record<string, any>[];
|
|
808
|
+
/**
|
|
809
|
+
* Асинхронный метод. Обновляет строки в компоненте, по заданным ключам.
|
|
810
|
+
* @param keys
|
|
811
|
+
* @param [useFilter]
|
|
812
|
+
*/
|
|
813
|
+
refreshRecords(keys: Array<string | number>, useFilter?: boolean): Promise<void>;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
export { type AddSubFormArgs, type BaseControl, type BaseDataSource, type BaseItem, type CloseFormResolveOptions, type ColorScheme, type CustomDialogButton, type D5BaseForm, type D5Cell, type D5ColorScheme, type D5Column, type D5Core, type D5CurrentUser, type D5DynamicColumn, type D5DynamicFormField, type D5Form, type D5FormButton, type D5FormDecorationElement, type D5FormField, type D5FormFilterField, type D5FormGroup, type D5Kanban, type D5ListForm, type D5ListView, type D5Row, type D5Scheduler, type D5SchedulerResource, type D5StylingMode, type D5TableForm, type D5TileList, D5TitlePosition, type D5TreeForm, type D5USEvent, DecorDisplayType, type DialogButton, type FilterOperations, FormCreateMode, FormToolBarButtons, FormViewMode, type IApplication, type IBaseDynamicItem, type ID5Column, type ILanguage, type Language, type ListDataSource, type NewButtonProps, type OpeningFormOptions, type ReplaceSubFormArgs, type StylingMode, type SysFormSchedulerResources, ToolBarViewType, type UserStorage };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
var D5TitlePosition = /* @__PURE__ */ ((D5TitlePosition2) => {
|
|
3
|
+
D5TitlePosition2[D5TitlePosition2["Top"] = 0] = "Top";
|
|
4
|
+
D5TitlePosition2[D5TitlePosition2["Left"] = 1] = "Left";
|
|
5
|
+
D5TitlePosition2[D5TitlePosition2["Right"] = 2] = "Right";
|
|
6
|
+
D5TitlePosition2[D5TitlePosition2["OnBorder"] = 3] = "OnBorder";
|
|
7
|
+
D5TitlePosition2[D5TitlePosition2["Floating"] = 4] = "Floating";
|
|
8
|
+
return D5TitlePosition2;
|
|
9
|
+
})(D5TitlePosition || {});
|
|
10
|
+
Object.freeze(D5TitlePosition);
|
|
11
|
+
var DecorDisplayType = /* @__PURE__ */ ((DecorDisplayType2) => {
|
|
12
|
+
DecorDisplayType2[DecorDisplayType2["LABEL"] = 0] = "LABEL";
|
|
13
|
+
DecorDisplayType2[DecorDisplayType2["IMAGE"] = 1] = "IMAGE";
|
|
14
|
+
DecorDisplayType2[DecorDisplayType2["ICON"] = 2] = "ICON";
|
|
15
|
+
DecorDisplayType2[DecorDisplayType2["LINK"] = 3] = "LINK";
|
|
16
|
+
DecorDisplayType2[DecorDisplayType2["HTML"] = 4] = "HTML";
|
|
17
|
+
DecorDisplayType2[DecorDisplayType2["FILE_VIEWER"] = 5] = "FILE_VIEWER";
|
|
18
|
+
DecorDisplayType2[DecorDisplayType2["LINE"] = 6] = "LINE";
|
|
19
|
+
return DecorDisplayType2;
|
|
20
|
+
})(DecorDisplayType || {});
|
|
21
|
+
Object.freeze(DecorDisplayType);
|
|
22
|
+
var ToolBarViewType = /* @__PURE__ */ ((ToolBarViewType2) => {
|
|
23
|
+
ToolBarViewType2[ToolBarViewType2["NONE"] = 0] = "NONE";
|
|
24
|
+
ToolBarViewType2[ToolBarViewType2["TOP_AND_CONTEXT"] = 1] = "TOP_AND_CONTEXT";
|
|
25
|
+
ToolBarViewType2[ToolBarViewType2["TOP"] = 2] = "TOP";
|
|
26
|
+
ToolBarViewType2[ToolBarViewType2["CONTEXT"] = 3] = "CONTEXT";
|
|
27
|
+
return ToolBarViewType2;
|
|
28
|
+
})(ToolBarViewType || {});
|
|
29
|
+
Object.freeze(ToolBarViewType);
|
|
30
|
+
var FormViewMode = /* @__PURE__ */ ((FormViewMode2) => {
|
|
31
|
+
FormViewMode2[FormViewMode2["FULL_SCREEN"] = 1] = "FULL_SCREEN";
|
|
32
|
+
FormViewMode2[FormViewMode2["MODAL"] = 2] = "MODAL";
|
|
33
|
+
FormViewMode2[FormViewMode2["IN_NEW_WINDOW"] = 3] = "IN_NEW_WINDOW";
|
|
34
|
+
return FormViewMode2;
|
|
35
|
+
})(FormViewMode || {});
|
|
36
|
+
Object.freeze(FormViewMode);
|
|
37
|
+
var FormCreateMode = /* @__PURE__ */ ((FormCreateMode2) => {
|
|
38
|
+
FormCreateMode2["ADD"] = "add";
|
|
39
|
+
FormCreateMode2["ADD_CHILD"] = "addChild";
|
|
40
|
+
FormCreateMode2["EDIT"] = "edit";
|
|
41
|
+
FormCreateMode2["MULTI_EDIT"] = "multiEdit";
|
|
42
|
+
FormCreateMode2["FILTER_MODAL"] = "filterModal";
|
|
43
|
+
FormCreateMode2["REPORT"] = "report";
|
|
44
|
+
FormCreateMode2["FORM_SELECT"] = "formSelect";
|
|
45
|
+
FormCreateMode2["LIST"] = "listForm";
|
|
46
|
+
FormCreateMode2["TREE"] = "treeForm";
|
|
47
|
+
FormCreateMode2["FREE"] = "freeForm";
|
|
48
|
+
return FormCreateMode2;
|
|
49
|
+
})(FormCreateMode || {});
|
|
50
|
+
Object.freeze(FormCreateMode);
|
|
51
|
+
var FormToolBarButtons = /* @__PURE__ */ ((FormToolBarButtons2) => {
|
|
52
|
+
FormToolBarButtons2["SAVE"] = "save";
|
|
53
|
+
FormToolBarButtons2["CLOSE"] = "close";
|
|
54
|
+
FormToolBarButtons2["APPLY"] = "apply";
|
|
55
|
+
FormToolBarButtons2["SELECT"] = "select";
|
|
56
|
+
FormToolBarButtons2["SAVE_CLOSE"] = "saveClose";
|
|
57
|
+
FormToolBarButtons2["CANCEL"] = "cancel";
|
|
58
|
+
FormToolBarButtons2["SaveAndCreateOneMore"] = "saveAndCreateOneMore";
|
|
59
|
+
return FormToolBarButtons2;
|
|
60
|
+
})(FormToolBarButtons || {});
|
|
61
|
+
Object.freeze(FormToolBarButtons);
|
|
62
|
+
export {
|
|
63
|
+
D5TitlePosition,
|
|
64
|
+
DecorDisplayType,
|
|
65
|
+
FormCreateMode,
|
|
66
|
+
FormToolBarButtons,
|
|
67
|
+
FormViewMode,
|
|
68
|
+
ToolBarViewType
|
|
69
|
+
};
|