@dhtmlx/vault 5.0.6

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.
Files changed (175) hide show
  1. package/README.md +251 -0
  2. package/codebase/fonts/roboto-bold-webfont.woff +0 -0
  3. package/codebase/fonts/roboto-bold-webfont.woff2 +0 -0
  4. package/codebase/fonts/roboto-medium-webfont.woff +0 -0
  5. package/codebase/fonts/roboto-medium-webfont.woff2 +0 -0
  6. package/codebase/fonts/roboto-regular-webfont.woff +0 -0
  7. package/codebase/fonts/roboto-regular-webfont.woff2 +0 -0
  8. package/codebase/types/ts-calendar/index.d.ts +2 -0
  9. package/codebase/types/ts-calendar/sources/Calendar.d.ts +37 -0
  10. package/codebase/types/ts-calendar/sources/helper.d.ts +1 -0
  11. package/codebase/types/ts-calendar/sources/types.d.ts +64 -0
  12. package/codebase/types/ts-combobox/index.d.ts +3 -0
  13. package/codebase/types/ts-combobox/sources/Combobox.d.ts +53 -0
  14. package/codebase/types/ts-combobox/sources/ProCombobox.d.ts +6 -0
  15. package/codebase/types/ts-combobox/sources/helper.d.ts +4 -0
  16. package/codebase/types/ts-combobox/sources/keyListener.d.ts +14 -0
  17. package/codebase/types/ts-combobox/sources/locales/en.d.ts +8 -0
  18. package/codebase/types/ts-combobox/sources/types.d.ts +95 -0
  19. package/codebase/types/ts-common/FocusManager.d.ts +15 -0
  20. package/codebase/types/ts-common/KeyManager.d.ts +19 -0
  21. package/codebase/types/ts-common/ScrollView.d.ts +40 -0
  22. package/codebase/types/ts-common/core.d.ts +40 -0
  23. package/codebase/types/ts-common/date.d.ts +34 -0
  24. package/codebase/types/ts-common/dom.d.ts +24 -0
  25. package/codebase/types/ts-common/events.d.ts +35 -0
  26. package/codebase/types/ts-common/html.d.ts +74 -0
  27. package/codebase/types/ts-common/input.d.ts +24 -0
  28. package/codebase/types/ts-common/keycodes.d.ts +9 -0
  29. package/codebase/types/ts-common/locale.d.ts +1 -0
  30. package/codebase/types/ts-common/polyfills/array.d.ts +0 -0
  31. package/codebase/types/ts-common/polyfills/element.d.ts +0 -0
  32. package/codebase/types/ts-common/polyfills/fetch.d.ts +0 -0
  33. package/codebase/types/ts-common/polyfills/math.d.ts +0 -0
  34. package/codebase/types/ts-common/polyfills/object.d.ts +0 -0
  35. package/codebase/types/ts-common/polyfills/string.d.ts +0 -0
  36. package/codebase/types/ts-common/types.d.ts +76 -0
  37. package/codebase/types/ts-common/view.d.ts +27 -0
  38. package/codebase/types/ts-data/index.d.ts +13 -0
  39. package/codebase/types/ts-data/sources/CollectionStore.d.ts +7 -0
  40. package/codebase/types/ts-data/sources/DragManager.d.ts +19 -0
  41. package/codebase/types/ts-data/sources/ajax.d.ts +2 -0
  42. package/codebase/types/ts-data/sources/datacollection/group.d.ts +43 -0
  43. package/codebase/types/ts-data/sources/datacollection/loader.d.ts +16 -0
  44. package/codebase/types/ts-data/sources/datacollection/sort.d.ts +7 -0
  45. package/codebase/types/ts-data/sources/datacollection.d.ts +101 -0
  46. package/codebase/types/ts-data/sources/dataproxy.d.ts +10 -0
  47. package/codebase/types/ts-data/sources/drivers/CsvDriver.d.ts +16 -0
  48. package/codebase/types/ts-data/sources/drivers/JsonDriver.d.ts +10 -0
  49. package/codebase/types/ts-data/sources/drivers/XMLDriver.d.ts +18 -0
  50. package/codebase/types/ts-data/sources/drivers/drivers.d.ts +12 -0
  51. package/codebase/types/ts-data/sources/helpers.d.ts +17 -0
  52. package/codebase/types/ts-data/sources/lazydataproxy.d.ts +9 -0
  53. package/codebase/types/ts-data/sources/methods.d.ts +11 -0
  54. package/codebase/types/ts-data/sources/selection.d.ts +17 -0
  55. package/codebase/types/ts-data/sources/serializers/xml.d.ts +2 -0
  56. package/codebase/types/ts-data/sources/treecollection.d.ts +72 -0
  57. package/codebase/types/ts-data/sources/types.d.ts +340 -0
  58. package/codebase/types/ts-dataview/index.d.ts +3 -0
  59. package/codebase/types/ts-dataview/sources/DataView.d.ts +41 -0
  60. package/codebase/types/ts-dataview/sources/ProDataView.d.ts +11 -0
  61. package/codebase/types/ts-dataview/sources/editors/InputEditor.d.ts +16 -0
  62. package/codebase/types/ts-dataview/sources/editors/editors.d.ts +4 -0
  63. package/codebase/types/ts-dataview/sources/types.d.ts +63 -0
  64. package/codebase/types/ts-grid/index.d.ts +7 -0
  65. package/codebase/types/ts-grid/sources/ExtendedGrid.d.ts +47 -0
  66. package/codebase/types/ts-grid/sources/Grid.d.ts +114 -0
  67. package/codebase/types/ts-grid/sources/ProGrid.d.ts +67 -0
  68. package/codebase/types/ts-grid/sources/helpers/cells.d.ts +9 -0
  69. package/codebase/types/ts-grid/sources/helpers/data.d.ts +36 -0
  70. package/codebase/types/ts-grid/sources/helpers/default.d.ts +6 -0
  71. package/codebase/types/ts-grid/sources/helpers/dom.d.ts +3 -0
  72. package/codebase/types/ts-grid/sources/helpers/keys.d.ts +27 -0
  73. package/codebase/types/ts-grid/sources/helpers/main.d.ts +23 -0
  74. package/codebase/types/ts-grid/sources/locales/en.d.ts +7 -0
  75. package/codebase/types/ts-grid/sources/modules/BlockSelection.d.ts +122 -0
  76. package/codebase/types/ts-grid/sources/modules/Clipboard.d.ts +55 -0
  77. package/codebase/types/ts-grid/sources/modules/DropManager.d.ts +21 -0
  78. package/codebase/types/ts-grid/sources/modules/Exporter.d.ts +80 -0
  79. package/codebase/types/ts-grid/sources/modules/History.d.ts +72 -0
  80. package/codebase/types/ts-grid/sources/modules/Range.d.ts +71 -0
  81. package/codebase/types/ts-grid/sources/modules/Resizer.d.ts +2 -0
  82. package/codebase/types/ts-grid/sources/modules/Selection.d.ts +58 -0
  83. package/codebase/types/ts-grid/sources/types.d.ts +660 -0
  84. package/codebase/types/ts-grid/sources/ui/FixedCols.d.ts +3 -0
  85. package/codebase/types/ts-grid/sources/ui/FixedRows.d.ts +5 -0
  86. package/codebase/types/ts-grid/sources/ui/cells.d.ts +34 -0
  87. package/codebase/types/ts-grid/sources/ui/common.d.ts +8 -0
  88. package/codebase/types/ts-grid/sources/ui/components/dragPanel.d.ts +7 -0
  89. package/codebase/types/ts-grid/sources/ui/components/groupPanel.d.ts +13 -0
  90. package/codebase/types/ts-grid/sources/ui/components/subRow.d.ts +4 -0
  91. package/codebase/types/ts-grid/sources/ui/content/ComboFilter.d.ts +35 -0
  92. package/codebase/types/ts-grid/sources/ui/content/DateFilter.d.ts +42 -0
  93. package/codebase/types/ts-grid/sources/ui/content/InputFilter.d.ts +32 -0
  94. package/codebase/types/ts-grid/sources/ui/content/SelectFilter.d.ts +28 -0
  95. package/codebase/types/ts-grid/sources/ui/content.d.ts +55 -0
  96. package/codebase/types/ts-grid/sources/ui/editors/CheckboxEditor.d.ts +18 -0
  97. package/codebase/types/ts-grid/sources/ui/editors/ComboboxEditor.d.ts +18 -0
  98. package/codebase/types/ts-grid/sources/ui/editors/DateEditor.d.ts +37 -0
  99. package/codebase/types/ts-grid/sources/ui/editors/InputEditor.d.ts +22 -0
  100. package/codebase/types/ts-grid/sources/ui/editors/SelectEditor.d.ts +16 -0
  101. package/codebase/types/ts-grid/sources/ui/editors/TextAreaEditor.d.ts +27 -0
  102. package/codebase/types/ts-grid/sources/ui/editors/editors.d.ts +2 -0
  103. package/codebase/types/ts-grid/sources/ui/proContent.d.ts +37 -0
  104. package/codebase/types/ts-grid/sources/ui/render.d.ts +9 -0
  105. package/codebase/types/ts-layout/index.d.ts +3 -0
  106. package/codebase/types/ts-layout/sources/Cell.d.ts +60 -0
  107. package/codebase/types/ts-layout/sources/Layout.d.ts +29 -0
  108. package/codebase/types/ts-layout/sources/ProCell.d.ts +9 -0
  109. package/codebase/types/ts-layout/sources/ProLayout.d.ts +6 -0
  110. package/codebase/types/ts-layout/sources/helpers.d.ts +6 -0
  111. package/codebase/types/ts-layout/sources/types.d.ts +129 -0
  112. package/codebase/types/ts-list/index.d.ts +4 -0
  113. package/codebase/types/ts-list/sources/List.d.ts +56 -0
  114. package/codebase/types/ts-list/sources/ProList.d.ts +11 -0
  115. package/codebase/types/ts-list/sources/Selection.d.ts +24 -0
  116. package/codebase/types/ts-list/sources/editors/InputEditor.d.ts +16 -0
  117. package/codebase/types/ts-list/sources/editors/editors.d.ts +4 -0
  118. package/codebase/types/ts-list/sources/types.d.ts +98 -0
  119. package/codebase/types/ts-message/index.d.ts +5 -0
  120. package/codebase/types/ts-message/sources/alert.d.ts +2 -0
  121. package/codebase/types/ts-message/sources/common.d.ts +1 -0
  122. package/codebase/types/ts-message/sources/confirm.d.ts +2 -0
  123. package/codebase/types/ts-message/sources/locales/en.d.ts +5 -0
  124. package/codebase/types/ts-message/sources/message.d.ts +4 -0
  125. package/codebase/types/ts-message/sources/tooltip.d.ts +6 -0
  126. package/codebase/types/ts-message/sources/types.d.ts +79 -0
  127. package/codebase/types/ts-navbar/index.d.ts +3 -0
  128. package/codebase/types/ts-navbar/sources/Navbar.d.ts +61 -0
  129. package/codebase/types/ts-navbar/sources/elements/button.d.ts +1 -0
  130. package/codebase/types/ts-navbar/sources/elements/customHTMLButton.d.ts +1 -0
  131. package/codebase/types/ts-navbar/sources/elements/datePicker.d.ts +1 -0
  132. package/codebase/types/ts-navbar/sources/elements/helpers.d.ts +17 -0
  133. package/codebase/types/ts-navbar/sources/elements/imageButton.d.ts +1 -0
  134. package/codebase/types/ts-navbar/sources/elements/input.d.ts +1 -0
  135. package/codebase/types/ts-navbar/sources/elements/menuItem.d.ts +1 -0
  136. package/codebase/types/ts-navbar/sources/elements/navItem.d.ts +1 -0
  137. package/codebase/types/ts-navbar/sources/elements/separator.d.ts +1 -0
  138. package/codebase/types/ts-navbar/sources/elements/spacer.d.ts +1 -0
  139. package/codebase/types/ts-navbar/sources/elements/title.d.ts +1 -0
  140. package/codebase/types/ts-navbar/sources/itemfactory.d.ts +10 -0
  141. package/codebase/types/ts-navbar/sources/types.d.ts +210 -0
  142. package/codebase/types/ts-popup/index.d.ts +2 -0
  143. package/codebase/types/ts-popup/sources/Popup.d.ts +29 -0
  144. package/codebase/types/ts-popup/sources/types.d.ts +42 -0
  145. package/codebase/types/ts-slider/index.d.ts +2 -0
  146. package/codebase/types/ts-slider/sources/Slider.d.ts +55 -0
  147. package/codebase/types/ts-slider/sources/types.d.ts +60 -0
  148. package/codebase/types/ts-timepicker/index.d.ts +2 -0
  149. package/codebase/types/ts-timepicker/sources/Timepicker.d.ts +28 -0
  150. package/codebase/types/ts-timepicker/sources/helper.d.ts +4 -0
  151. package/codebase/types/ts-timepicker/sources/locales/en.d.ts +6 -0
  152. package/codebase/types/ts-timepicker/sources/types.d.ts +52 -0
  153. package/codebase/types/ts-toolbar/index.d.ts +2 -0
  154. package/codebase/types/ts-toolbar/sources/ProToolbar.d.ts +10 -0
  155. package/codebase/types/ts-toolbar/sources/Toolbar.d.ts +33 -0
  156. package/codebase/types/ts-treegrid/index.d.ts +3 -0
  157. package/codebase/types/ts-treegrid/sources/TreeGrid.d.ts +26 -0
  158. package/codebase/types/ts-treegrid/sources/TreeGridCollection.d.ts +21 -0
  159. package/codebase/types/ts-treegrid/sources/types.d.ts +17 -0
  160. package/codebase/types/ts-vault/sources/ProgressBar.d.ts +12 -0
  161. package/codebase/types/ts-vault/sources/ReadStackPreview.d.ts +11 -0
  162. package/codebase/types/ts-vault/sources/Uploader.d.ts +26 -0
  163. package/codebase/types/ts-vault/sources/Vault.d.ts +39 -0
  164. package/codebase/types/ts-vault/sources/configs.d.ts +2 -0
  165. package/codebase/types/ts-vault/sources/entry.d.ts +8 -0
  166. package/codebase/types/ts-vault/sources/helper.d.ts +31 -0
  167. package/codebase/types/ts-vault/sources/locales/en.d.ts +21 -0
  168. package/codebase/types/ts-vault/sources/types.d.ts +127 -0
  169. package/codebase/vault.d.ts +3 -0
  170. package/codebase/vault.min.css +1 -0
  171. package/codebase/vault.min.js +21 -0
  172. package/codebase/vault.min.js.map +1 -0
  173. package/license.md +360 -0
  174. package/package.json +14 -0
  175. package/whatsnew.txt +99 -0
@@ -0,0 +1,129 @@
1
+ import { IView, IViewLike } from "../../ts-common/view";
2
+ import { VNode } from "../../ts-common/dom";
3
+ import { IEventSystem } from "../../ts-common/events";
4
+ import { FlexDirection } from "../../ts-common/html";
5
+ import { ScrollView } from "../../ts-common/ScrollView";
6
+ import { TLabelAlignment } from "../../ts-common/types";
7
+ export interface ICellConfig {
8
+ id?: string;
9
+ html?: string;
10
+ hidden?: boolean;
11
+ header?: string;
12
+ headerIcon?: string;
13
+ headerImage?: string;
14
+ headerHeight?: number;
15
+ on?: {
16
+ [key: string]: any;
17
+ };
18
+ width?: number | string;
19
+ height?: number | string;
20
+ minWidth?: number | string;
21
+ maxWidth?: number | string;
22
+ minHeight?: number | string;
23
+ maxHeight?: number | string;
24
+ css?: string;
25
+ padding?: number | string;
26
+ align?: FlexDirection;
27
+ type?: "line" | "wide" | "space" | string;
28
+ gravity?: number | boolean;
29
+ collapsable?: boolean;
30
+ resizable?: boolean;
31
+ collapsed?: boolean;
32
+ tab?: string;
33
+ tabCss?: string;
34
+ full?: boolean;
35
+ progressDefault?: boolean;
36
+ init?: (c: ICell, cfg: ICellConfig | IView) => void;
37
+ $fixed?: boolean;
38
+ $autoWidth?: boolean;
39
+ $autoHeight?: boolean;
40
+ $fieldset?: boolean;
41
+ $disabled?: boolean;
42
+ label?: string;
43
+ labelAlignment?: TLabelAlignment;
44
+ }
45
+ export interface ILayoutConfig extends ICellConfig {
46
+ rows?: ICellConfig[] | ILayoutConfig[];
47
+ cols?: ICellConfig[] | ILayoutConfig[];
48
+ views?: ICellConfig[] | ILayoutConfig[];
49
+ activeView?: string;
50
+ activeTab?: string;
51
+ parent?: ILayout;
52
+ }
53
+ export type IViewFn = (cfg: any) => VNode;
54
+ export interface IViewConstructor {
55
+ new: (container: HTMLElement | string | null, config: any) => IView;
56
+ }
57
+ export interface ICell extends IView {
58
+ id: string;
59
+ config: ICellConfig;
60
+ events: IEventSystem<LayoutEvents, ILayoutEventHandlersMap>;
61
+ attach(component: string | IViewFn | IView | IViewConstructor, config?: any): IViewLike;
62
+ attachHTML(html: string): void;
63
+ isVisible(): boolean;
64
+ toVDOM(nodes?: any[]): any;
65
+ getParent(): ILayout;
66
+ show(): void;
67
+ hide(): void;
68
+ paint(): void;
69
+ destructor(): void;
70
+ getWidget(): any;
71
+ collapse(): void;
72
+ expand(): void;
73
+ toggle(): void;
74
+ detach(): void;
75
+ progressShow(): void;
76
+ progressHide(): void;
77
+ isVisibleProgress(): boolean;
78
+ }
79
+ export interface IProCell extends ICell {
80
+ scrollView: ScrollView;
81
+ }
82
+ export interface ILayout extends ICell {
83
+ config: ILayoutConfig;
84
+ removeCell(id: string): void;
85
+ getRefs(str: any): any;
86
+ getCell(id: string): ICell;
87
+ getId(index: number): string;
88
+ forEach(callback: LayoutCallback): void;
89
+ destructor(): void;
90
+ /** @deprecated See a documentation: https://docs.dhtmlx.com/ */
91
+ cell(id: string): ICell;
92
+ }
93
+ export declare enum LayoutEvents {
94
+ beforeShow = "beforeShow",
95
+ afterShow = "afterShow",
96
+ beforeHide = "beforeHide",
97
+ afterHide = "afterHide",
98
+ beforeResizeStart = "beforeResizeStart",
99
+ resize = "resize",
100
+ afterResizeEnd = "afterResizeEnd",
101
+ beforeAdd = "beforeAdd",
102
+ afterAdd = "afterAdd",
103
+ beforeRemove = "beforeRemove",
104
+ afterRemove = "afterRemove",
105
+ beforeCollapse = "beforeCollapse",
106
+ afterCollapse = "afterCollapse",
107
+ beforeExpand = "beforeExpand",
108
+ afterExpand = "afterExpand"
109
+ }
110
+ export interface ILayoutEventHandlersMap {
111
+ [key: string]: (...args: any[]) => any;
112
+ [LayoutEvents.beforeShow]: (id: string) => boolean | void;
113
+ [LayoutEvents.afterShow]: (id: string) => void;
114
+ [LayoutEvents.beforeHide]: (id: string) => boolean | void;
115
+ [LayoutEvents.afterHide]: (id: string) => any;
116
+ [LayoutEvents.beforeResizeStart]: (id: string) => boolean | void;
117
+ [LayoutEvents.resize]: (id: string) => void;
118
+ [LayoutEvents.afterResizeEnd]: (id: string) => void;
119
+ [LayoutEvents.beforeAdd]: (id: string) => boolean | void;
120
+ [LayoutEvents.afterAdd]: (id: string) => void;
121
+ [LayoutEvents.beforeRemove]: (id: string) => boolean | void;
122
+ [LayoutEvents.afterRemove]: (id: string) => void;
123
+ [LayoutEvents.beforeCollapse]: (id: string) => boolean | void;
124
+ [LayoutEvents.afterCollapse]: (id: string) => void;
125
+ [LayoutEvents.beforeExpand]: (id: string) => boolean | void;
126
+ [LayoutEvents.afterExpand]: (id: string) => void;
127
+ }
128
+ export type LayoutCallback = (cell: ICell, index: number, array: any) => any;
129
+ export type IFillSpace = boolean | "x" | "y";
@@ -0,0 +1,4 @@
1
+ export * from "./sources/List";
2
+ export * from "./sources/ProList";
3
+ export * from "./sources/Selection";
4
+ export * from "./sources/types";
@@ -0,0 +1,56 @@
1
+ import { DataCollection, DataEvents, DragEvents, IDataEventsHandlersMap, IDragEventsHandlersMap } from "../../ts-data";
2
+ import { VNode } from "../../ts-common/dom";
3
+ import { IEventSystem } from "../../ts-common/events";
4
+ import { IKeyManager } from "../../ts-common/KeyManager";
5
+ import { IHandlers, Id } from "../../ts-common/types";
6
+ import { View } from "../../ts-common/view";
7
+ import { IList, IListConfig, IListEventHandlersMap, IListItem, ISelection, ListEvents } from "./types";
8
+ export declare const MOVE_UP = 1;
9
+ export declare const MOVE_DOWN = 2;
10
+ export declare class List extends View implements IList {
11
+ config: IListConfig;
12
+ data: DataCollection;
13
+ events: IEventSystem<DataEvents | ListEvents | DragEvents, IListEventHandlersMap & IDataEventsHandlersMap & IDragEventsHandlersMap>;
14
+ selection: ISelection;
15
+ keyManager: IKeyManager;
16
+ protected _handlers: IHandlers;
17
+ protected _focus: Id | undefined;
18
+ protected _edited: Id;
19
+ protected _events: IHandlers;
20
+ private _topOffset;
21
+ private _visibleHeight;
22
+ private _touch;
23
+ protected _changed: boolean;
24
+ protected _destructed: boolean;
25
+ constructor(node: HTMLElement | string, config?: IListConfig);
26
+ protected _didRedraw(vm: any): void;
27
+ private _dblClick;
28
+ private _clearTouchTimer;
29
+ private _dragStart;
30
+ /** @deprecated See a documentation: https://docs.dhtmlx.com/ */
31
+ disableSelection(): void;
32
+ /** @deprecated See a documentation: https://docs.dhtmlx.com/ */
33
+ enableSelection(): void;
34
+ editItem(id: Id): void;
35
+ editEnd(value: any, id?: Id): void;
36
+ getFocusItem(): any;
37
+ setFocus(id: Id): void;
38
+ resetFocus(): void;
39
+ getFocus(): Id;
40
+ destructor(): void;
41
+ scrollTo(id: Id): void;
42
+ protected _scrollTo(id: Id, el: HTMLElement): void;
43
+ protected _renderItem(item: IListItem, index: number): VNode;
44
+ protected _renderList(): VNode;
45
+ moveFocus(mode: number, step?: number): void;
46
+ protected _getRange(): [number, number, number, number];
47
+ protected _getHotkeys(): IHandlers;
48
+ private _initHotKey;
49
+ private getItemAriaAttrs;
50
+ protected _getListAriaAttrs(config: any, dataLength: any): {
51
+ role: string;
52
+ "aria-label": string;
53
+ "aria-multiselectable": string;
54
+ "aria-readonly": string;
55
+ };
56
+ }
@@ -0,0 +1,11 @@
1
+ import { VNode } from "../../ts-common/dom";
2
+ import { ScrollView } from "../../ts-common/ScrollView";
3
+ import { List } from "./List";
4
+ import { IListConfig, IProList } from "./types";
5
+ export declare class ProList extends List implements IProList {
6
+ scrollView: ScrollView;
7
+ constructor(container: HTMLElement | string, config?: IListConfig);
8
+ destructor(): void;
9
+ scrollTo(id: string): void;
10
+ protected _renderList(): VNode;
11
+ }
@@ -0,0 +1,24 @@
1
+ import { IEventSystem } from "../../ts-common/events";
2
+ import { SelectionEvents, ISelectionEventsHandlersMap, Id } from "../../ts-common/types";
3
+ import { DataCollection, DataEvents, IDataEventsHandlersMap, IDataItem } from "../../ts-data";
4
+ import { ISelectionConfig, ISelection } from "./types";
5
+ export declare class Selection implements ISelection {
6
+ config: ISelectionConfig;
7
+ events: IEventSystem<SelectionEvents | DataEvents, ISelectionEventsHandlersMap & IDataEventsHandlersMap>;
8
+ private _selected;
9
+ private _data;
10
+ private _nextSelection;
11
+ constructor(config: ISelectionConfig, data: DataCollection, events: IEventSystem<any>);
12
+ enable(): void;
13
+ disable(): void;
14
+ getId(): Id | Id[] | undefined;
15
+ getItem(): IDataItem | IDataItem[];
16
+ contains(id?: Id): boolean;
17
+ remove(id?: Id, silent?: boolean): void;
18
+ add(id?: Id, isCtrl?: boolean, isShift?: boolean, silent?: boolean): void;
19
+ destructor(): void;
20
+ private _addMulti;
21
+ private _addSingle;
22
+ private _selectItem;
23
+ private _unselectItem;
24
+ }
@@ -0,0 +1,16 @@
1
+ import { IListConfig, IListItem } from "../types";
2
+ import { List } from "../List";
3
+ export declare class InputEditor {
4
+ protected _handlers: {
5
+ [key: string]: (...args: any[]) => void;
6
+ };
7
+ protected _mode: boolean;
8
+ protected _config: IListConfig;
9
+ protected _list: List;
10
+ protected _item: IListItem;
11
+ protected _input: HTMLInputElement;
12
+ constructor(item: any, list: List);
13
+ endEdit(): void;
14
+ toHTML(): any;
15
+ protected _initHandlers(): void;
16
+ }
@@ -0,0 +1,4 @@
1
+ import { InputEditor } from "./InputEditor";
2
+ import { List } from "../List";
3
+ import { IListItem } from "../types";
4
+ export declare function getEditor(item: IListItem, list: List): InputEditor;
@@ -0,0 +1,98 @@
1
+ import { IDataItem, DataCollection, DataEvents, DragEvents, IDataEventsHandlersMap, IDragEventsHandlersMap, IDragConfig } from "../../ts-data";
2
+ import { IEventSystem } from "../../ts-common/events";
3
+ import { IHandlers, SelectionEvents, ISelectionEventsHandlersMap, Id } from "../../ts-common/types";
4
+ import { IKeyManager } from "../../ts-common/KeyManager";
5
+ import { ScrollView } from "../../ts-common/ScrollView";
6
+ import { VNode } from "../../ts-common/dom";
7
+ export type MultiselectionMode = "click" | "ctrlClick";
8
+ export interface IListConfig extends IDragConfig {
9
+ template?: (obj: IDataItem) => string;
10
+ data?: DataCollection<any> | any[];
11
+ virtual?: boolean;
12
+ itemHeight?: number | string;
13
+ css?: string;
14
+ height?: number | string;
15
+ selection?: boolean;
16
+ multiselection?: boolean | MultiselectionMode;
17
+ keyNavigation?: boolean | (() => boolean);
18
+ editable?: boolean;
19
+ hotkeys?: IHandlers;
20
+ eventHandlers?: {
21
+ [eventName: string]: {
22
+ [className: string]: (event: Event, id: Id) => void | boolean;
23
+ };
24
+ };
25
+ htmlEnable?: boolean;
26
+ $template?: (obj: IDataItem) => VNode;
27
+ /** @deprecated See a documentation: https://docs.dhtmlx.com/ */
28
+ editing?: boolean;
29
+ /** @deprecated See a documentation: https://docs.dhtmlx.com/ */
30
+ multiselectionMode?: MultiselectionMode;
31
+ }
32
+ export declare enum ListEvents {
33
+ click = "click",
34
+ doubleClick = "doubleclick",
35
+ focusChange = "focuschange",
36
+ beforeEditStart = "beforeEditStart",
37
+ afterEditStart = "afterEditStart",
38
+ beforeEditEnd = "beforeEditEnd",
39
+ afterEditEnd = "afterEditEnd",
40
+ itemRightClick = "itemRightClick",
41
+ itemMouseOver = "itemMouseOver",
42
+ /** @deprecated See a documentation: https://docs.dhtmlx.com/ */
43
+ contextmenu = "contextmenu"
44
+ }
45
+ export interface IListEventHandlersMap {
46
+ [key: string]: (...args: any[]) => any;
47
+ [ListEvents.click]: (id: Id, e: Event) => void;
48
+ [ListEvents.itemMouseOver]: (id: Id, e: Event) => void;
49
+ [ListEvents.doubleClick]: (id: Id, e: Event) => void;
50
+ [ListEvents.itemRightClick]: (id: Id, e: MouseEvent) => void;
51
+ [ListEvents.focusChange]: (focusIndex?: number, id?: Id) => void;
52
+ [ListEvents.beforeEditStart]: (id: Id) => void | boolean;
53
+ [ListEvents.afterEditStart]: (id: Id) => void;
54
+ [ListEvents.beforeEditEnd]: (value: string, id: Id) => void | boolean;
55
+ [ListEvents.afterEditEnd]: (value: string, id: Id) => void;
56
+ [ListEvents.contextmenu]: (id: Id, e: MouseEvent) => any;
57
+ }
58
+ export interface ISelectionConfig {
59
+ multiselection?: boolean | MultiselectionMode;
60
+ disabled?: boolean;
61
+ }
62
+ export interface IList<T extends IDataItem = any> {
63
+ config: IListConfig;
64
+ data: DataCollection<T>;
65
+ events: IEventSystem<DataEvents | ListEvents | DragEvents, IListEventHandlersMap & IDataEventsHandlersMap & IDragEventsHandlersMap>;
66
+ selection: ISelection;
67
+ keyManager: IKeyManager;
68
+ paint(): void;
69
+ destructor(): void;
70
+ editItem(id: Id): void;
71
+ getFocusItem(): T;
72
+ setFocus(id: Id): void;
73
+ resetFocus(): void;
74
+ getFocus(): Id;
75
+ scrollTo(id: Id): void;
76
+ /** @deprecated See a documentation: https://docs.dhtmlx.com/ */
77
+ disableSelection(): void;
78
+ /** @deprecated See a documentation: https://docs.dhtmlx.com/ */
79
+ enableSelection(): void;
80
+ }
81
+ export interface IProList extends IList {
82
+ scrollView: ScrollView;
83
+ }
84
+ export interface ISelection<T = any> {
85
+ config: ISelectionConfig;
86
+ events: IEventSystem<SelectionEvents | DataEvents, ISelectionEventsHandlersMap & IDataEventsHandlersMap>;
87
+ getId(): Id | Id[] | undefined;
88
+ getItem(): T;
89
+ contains(id?: Id): boolean;
90
+ remove(id?: Id, silent?: boolean): void;
91
+ add(id?: Id, isShift?: boolean, isCtrl?: boolean, silent?: boolean): void;
92
+ enable(): void;
93
+ disable(): void;
94
+ destructor(): void;
95
+ }
96
+ export interface IListItem {
97
+ [key: string]: any;
98
+ }
@@ -0,0 +1,5 @@
1
+ export * from "./sources/message";
2
+ export * from "./sources/alert";
3
+ export * from "./sources/confirm";
4
+ export * from "./sources/tooltip";
5
+ export * from "./sources/types";
@@ -0,0 +1,2 @@
1
+ import { IAlertProps } from "./types";
2
+ export declare function alert(props: IAlertProps): Promise<unknown>;
@@ -0,0 +1 @@
1
+ export declare function blockScreen(css?: string): () => void;
@@ -0,0 +1,2 @@
1
+ import { IConfirmProps } from "./types";
2
+ export declare function confirm(props: IConfirmProps): Promise<unknown>;
@@ -0,0 +1,5 @@
1
+ declare const locale: {
2
+ apply: string;
3
+ reject: string;
4
+ };
5
+ export default locale;
@@ -0,0 +1,4 @@
1
+ import { IMessageProps } from "./types";
2
+ export declare function message(props: string | IMessageProps): {
3
+ close: () => void;
4
+ };
@@ -0,0 +1,6 @@
1
+ import { IPosition, ITooltipConfig, Position } from "./types";
2
+ export declare function findPosition(targetRect: ClientRect, position: Position, width: number, height: number, margin?: number, recursion?: number): IPosition;
3
+ export declare function getZIndex(node: Element | HTMLElement): 10000000 | 9999999;
4
+ export declare function tooltip(text: string, config: ITooltipConfig): void;
5
+ export declare function enableTooltip(): void;
6
+ export declare function disableTooltip(): void;
@@ -0,0 +1,79 @@
1
+ import { IAlign } from "../../ts-common/html";
2
+ export interface IBaseProps {
3
+ text: string;
4
+ header?: string;
5
+ css?: string;
6
+ buttonsAlignment?: IAlign;
7
+ blockerCss?: string;
8
+ htmlEnable?: boolean;
9
+ }
10
+ export interface IAlertProps extends IBaseProps {
11
+ buttons?: [string];
12
+ }
13
+ export interface IConfirmProps extends IBaseProps {
14
+ buttons?: [string, string?];
15
+ }
16
+ export declare enum RealPosition {
17
+ left = "left",
18
+ right = "right",
19
+ top = "top",
20
+ bottom = "bottom",
21
+ center = "center"
22
+ }
23
+ export interface ITooltipConfig extends IScreenPosition {
24
+ force?: boolean;
25
+ showDelay?: number;
26
+ hideDelay?: number;
27
+ htmlEnable?: boolean;
28
+ margin?: number;
29
+ }
30
+ export interface IPosition {
31
+ left: number;
32
+ top: number;
33
+ pos: RealPosition;
34
+ }
35
+ export interface IScreenPosition {
36
+ node: HTMLElement | string;
37
+ position?: Position;
38
+ css?: string;
39
+ }
40
+ export declare enum Position {
41
+ right = "right",
42
+ bottom = "bottom",
43
+ center = "center",
44
+ left = "left",
45
+ top = "top"
46
+ }
47
+ export declare enum MessageContainerPosition {
48
+ topLeft = "top-left",
49
+ topRight = "top-right",
50
+ bottomLeft = "bottom-left",
51
+ bottomRight = "bottom-right"
52
+ }
53
+ export interface IMessageProps {
54
+ text?: string;
55
+ html?: string;
56
+ css?: string;
57
+ expire?: number;
58
+ node?: HTMLElement;
59
+ icon?: string;
60
+ position?: MessageContainerPosition;
61
+ }
62
+ export interface IMessageContainerInfo {
63
+ [MessageContainerPosition.bottomLeft]?: {
64
+ stack: HTMLElement[];
65
+ container: HTMLElement;
66
+ };
67
+ [MessageContainerPosition.bottomRight]?: {
68
+ stack: HTMLElement[];
69
+ container: HTMLElement;
70
+ };
71
+ [MessageContainerPosition.topLeft]?: {
72
+ stack: HTMLElement[];
73
+ container: HTMLElement;
74
+ };
75
+ [MessageContainerPosition.topRight]?: {
76
+ stack: HTMLElement[];
77
+ container: HTMLElement;
78
+ };
79
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./sources/Navbar";
2
+ export * from "./sources/itemfactory";
3
+ export * from "./sources/types";
@@ -0,0 +1,61 @@
1
+ import { Id, IHandlers } from "../../ts-common/types";
2
+ import { VNode } from "../../ts-common/dom";
3
+ import { IEventSystem } from "../../ts-common/events";
4
+ import { View } from "../../ts-common/view";
5
+ import { TreeCollection, IDataEventsHandlersMap } from "../../ts-data";
6
+ import { DataEvents, IItem, IGroups, NavigationBarEvents, INavbarEventHandlersMap, INavbarConfig } from "./types";
7
+ export declare abstract class Navbar<T extends IItem = IItem> extends View {
8
+ data: TreeCollection<T>;
9
+ events: IEventSystem<DataEvents | NavigationBarEvents, IDataEventsHandlersMap & INavbarEventHandlersMap>;
10
+ config: INavbarConfig;
11
+ protected _vpopups: VNode;
12
+ protected _activeMenu: Id;
13
+ protected _activePosition: {
14
+ left: number;
15
+ right: number;
16
+ top: number;
17
+ bottom: number;
18
+ zIndex?: number;
19
+ };
20
+ protected _handlers: IHandlers;
21
+ protected _currentRoot: Id;
22
+ protected _factory: (item: T, asMenuItem?: boolean) => any;
23
+ protected _groups: IGroups;
24
+ private _isActive;
25
+ private _popupActive;
26
+ private _currentTimeout;
27
+ private _documentClick;
28
+ private _documentHaveListener;
29
+ private _rootItem;
30
+ private _activeParents;
31
+ private _keyManager;
32
+ constructor(element?: string | HTMLElement, config?: any);
33
+ paint(): void;
34
+ disable(ids: Id | Id[]): void;
35
+ enable(ids: Id | Id[]): void;
36
+ isDisabled(id: Id): boolean;
37
+ show(ids: Id | Id[]): void;
38
+ hide(ids: Id | Id[]): void;
39
+ destructor(): void;
40
+ select(id: Id, unselect?: boolean): void;
41
+ unselect(id?: Id): void;
42
+ isSelected(id: Id): boolean;
43
+ getSelected(): Id[];
44
+ protected abstract _getFactory(): (item: T, asMenuItem?: boolean) => any;
45
+ protected _customHandlers(): {};
46
+ protected _close(e: MouseEvent | TouchEvent): void;
47
+ protected _init(): void;
48
+ protected _initHandlers(): void;
49
+ protected _initEvents(): void;
50
+ protected _getMode(item: T, root: Id, _active?: boolean): "bottom" | "right";
51
+ protected _drawMenuItems(id: Id, asMenuItem?: boolean): any[];
52
+ protected _setRoot(_id: Id): void;
53
+ protected _getParents(id: any, root: any): Id[];
54
+ protected _listenOuterClick(): void;
55
+ protected _customInitEvents(): void;
56
+ private _drawPopups;
57
+ private _onMenuItemClick;
58
+ private _activeItemChange;
59
+ private _resetHotkeys;
60
+ private _setProp;
61
+ }
@@ -0,0 +1 @@
1
+ export declare function button(item: any, widgetName: string): any;
@@ -0,0 +1 @@
1
+ export declare function customHTMLButton(item: any, widgetName?: string, asMenuItem?: boolean): any;
@@ -0,0 +1 @@
1
+ export declare function datePicker(item: any, events: any, widgetName: string): any;
@@ -0,0 +1,17 @@
1
+ import { VNode } from "../../../ts-common/dom";
2
+ import { IItem } from "../types";
3
+ export declare function getCount(item: any, widgetClass: any, isLimited: any): any;
4
+ export declare function getIcon(iconName: string, type: any): any;
5
+ export declare function navbarComponentMixin(widgetName: string, item: IItem, asMenuItem: boolean, body: VNode): VNode;
6
+ export declare function getNavbarButtonCSS({ color, size, view, full, icon, circle, loading, value, active, count }: {
7
+ color: any;
8
+ size: any;
9
+ view: any;
10
+ full: any;
11
+ icon: any;
12
+ circle: any;
13
+ loading: any;
14
+ value: any;
15
+ active: any;
16
+ count: any;
17
+ }, widgetName: any): string;
@@ -0,0 +1 @@
1
+ export declare function imageButton(item: any, widgetName: string): any;
@@ -0,0 +1 @@
1
+ export declare function input(item: any, events: any, widgetName: string): any;
@@ -0,0 +1 @@
1
+ export declare function menuItem(item: any, widgetName: string, asMenuItem: boolean): any;
@@ -0,0 +1 @@
1
+ export declare function navItem(item: any, widgetName: string, collapsed?: boolean): any;
@@ -0,0 +1 @@
1
+ export declare function separator(item: any, widgetName: string): any;
@@ -0,0 +1 @@
1
+ export declare function spacer(item: any, widgetName: string): any;
@@ -0,0 +1 @@
1
+ export declare function title(item: any, widgetName: string): any;
@@ -0,0 +1,10 @@
1
+ import { Navbar } from "./Navbar";
2
+ import { IItem, ItemType } from "./types";
3
+ interface IFactoryConfig<T extends Navbar> {
4
+ defaultType: ItemType;
5
+ allowedTypes: ItemType[];
6
+ widgetName: string;
7
+ widget: T;
8
+ }
9
+ export declare function createFactory<T extends Navbar>({ defaultType, allowedTypes, widgetName, widget, }: IFactoryConfig<T>): (item: IItem, asMenuItem?: boolean) => any;
10
+ export {};