jsuites 6.4.2 → 6.4.3

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 (78) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +119 -119
  3. package/dist/jsuites.css +3424 -3424
  4. package/dist/jsuites.d.ts +10 -10
  5. package/dist/jsuites.js +22475 -22450
  6. package/dist/jsuites.webcomponents.js +501 -501
  7. package/dist/types/animation.d.ts +23 -23
  8. package/dist/types/calendar.d.ts +87 -87
  9. package/dist/types/color.d.ts +50 -50
  10. package/dist/types/contextmenu.d.ts +43 -43
  11. package/dist/types/dropdown.d.ts +177 -177
  12. package/dist/types/editor.d.ts +96 -96
  13. package/dist/types/floating.d.ts +23 -23
  14. package/dist/types/form.d.ts +57 -57
  15. package/dist/types/index.d.ts +59 -59
  16. package/dist/types/mask.d.ts +50 -50
  17. package/dist/types/modal.d.ts +35 -35
  18. package/dist/types/notification.d.ts +27 -27
  19. package/dist/types/picker.d.ts +45 -45
  20. package/dist/types/rating.d.ts +19 -19
  21. package/dist/types/search.d.ts +23 -23
  22. package/dist/types/slider.d.ts +31 -31
  23. package/dist/types/tabs.d.ts +79 -79
  24. package/dist/types/tags.d.ts +105 -105
  25. package/dist/types/toolbar.d.ts +70 -70
  26. package/dist/types/upload.d.ts +45 -45
  27. package/dist/types/validations.d.ts +39 -39
  28. package/package.json +4 -4
  29. package/react/calendar/index.d.ts +105 -105
  30. package/react/calendar/index.js +28 -28
  31. package/react/color/index.d.ts +84 -84
  32. package/react/color/index.js +28 -28
  33. package/react/contextmenu/index.d.ts +61 -61
  34. package/react/contextmenu/index.js +24 -24
  35. package/react/dropdown/index.d.ts +184 -184
  36. package/react/dropdown/index.js +25 -25
  37. package/react/editor/index.d.ts +114 -114
  38. package/react/editor/index.js +31 -31
  39. package/react/index.js +26 -26
  40. package/react/modal/index.d.ts +53 -53
  41. package/react/modal/index.js +30 -30
  42. package/react/picker/index.d.ts +64 -64
  43. package/react/picker/index.js +28 -28
  44. package/react/rating/index.d.ts +37 -37
  45. package/react/rating/index.js +28 -28
  46. package/react/slider/index.d.ts +49 -49
  47. package/react/slider/index.js +30 -30
  48. package/react/tabs/index.d.ts +97 -97
  49. package/react/tabs/index.js +29 -29
  50. package/react/tags/index.d.ts +121 -121
  51. package/react/tags/index.js +24 -24
  52. package/react/toolbar/index.d.ts +88 -88
  53. package/react/toolbar/index.js +24 -24
  54. package/vue/calendar/index.d.ts +105 -105
  55. package/vue/calendar/index.js +36 -36
  56. package/vue/color/index.d.ts +84 -84
  57. package/vue/color/index.js +36 -36
  58. package/vue/contextmenu/index.d.ts +61 -61
  59. package/vue/contextmenu/index.js +21 -21
  60. package/vue/dropdown/index.d.ts +184 -184
  61. package/vue/dropdown/index.js +25 -25
  62. package/vue/editor/index.d.ts +114 -114
  63. package/vue/editor/index.js +40 -40
  64. package/vue/index.js +40 -40
  65. package/vue/modal/index.d.ts +53 -53
  66. package/vue/modal/index.js +41 -41
  67. package/vue/picker/index.d.ts +64 -64
  68. package/vue/picker/index.js +36 -36
  69. package/vue/rating/index.d.ts +37 -37
  70. package/vue/rating/index.js +36 -36
  71. package/vue/slider/index.d.ts +49 -49
  72. package/vue/slider/index.js +33 -33
  73. package/vue/tabs/index.d.ts +97 -97
  74. package/vue/tabs/index.js +28 -28
  75. package/vue/tags/index.d.ts +121 -121
  76. package/vue/tags/index.js +21 -21
  77. package/vue/toolbar/index.d.ts +88 -88
  78. package/vue/toolbar/index.js +21 -21
@@ -1,31 +1,31 @@
1
- interface Options {
2
- /** Items */
3
- items: [];
4
- /** Height */
5
- height: number
6
- /** Height */
7
- width: number
8
- /** Height */
9
- grid: boolean
10
- /** Height */
11
- onopen: (el: HTMLElement) => void
12
- /** Height */
13
- onclose: (el: HTMLElement) => void
14
- }
15
-
16
- export type Slider = (el: HTMLElement, options: Options) => {
17
- /** Update the number of photos label */
18
- updateCounter: (index) => void;
19
- /** Open photo preview with a photo define in the arguments */
20
- show: (target) => void;
21
- /** Open photo preview */
22
- open: () => void;
23
- /** Close the photo preview */
24
- close: () => void;
25
- /** Reset photos */
26
- reset: () => void;
27
- /** Next photo */
28
- next: () => void;
29
- /** Previous photo */
30
- prev: () => void;
31
- }
1
+ interface Options {
2
+ /** Items */
3
+ items: [];
4
+ /** Height */
5
+ height: number
6
+ /** Height */
7
+ width: number
8
+ /** Height */
9
+ grid: boolean
10
+ /** Height */
11
+ onopen: (el: HTMLElement) => void
12
+ /** Height */
13
+ onclose: (el: HTMLElement) => void
14
+ }
15
+
16
+ export type Slider = (el: HTMLElement, options: Options) => {
17
+ /** Update the number of photos label */
18
+ updateCounter: (index) => void;
19
+ /** Open photo preview with a photo define in the arguments */
20
+ show: (target) => void;
21
+ /** Open photo preview */
22
+ open: () => void;
23
+ /** Close the photo preview */
24
+ close: () => void;
25
+ /** Reset photos */
26
+ reset: () => void;
27
+ /** Next photo */
28
+ next: () => void;
29
+ /** Previous photo */
30
+ prev: () => void;
31
+ }
@@ -1,79 +1,79 @@
1
- interface Item {
2
- /** DOMElement for the header title */
3
- titleElement?: HTMLElement;
4
- /** DOMElement for the header content */
5
- contentElement?: HTMLElement;
6
- /** Material icon keyword */
7
- icon?: string;
8
- /** Tab header */
9
- title?: string;
10
- /** Width */
11
- width?: number;
12
- }
13
-
14
- interface Options {
15
- /** Tabs definition */
16
- data: Item[],
17
- /** Position */
18
- position: 'top' | 'bottom' | null,
19
- /** Show the add new tab button. Default: false */
20
- allowCreate: boolean,
21
- /** Allow drag and drop to change the tabs position. Default: false */
22
- allowChangePosition: boolean,
23
- /** On click event */
24
- onclick: (el: HTMLElement, instance: Tabs, index: number, header: HTMLElement, content: HTMLElement) => void;
25
- /** On load event */
26
- onload: (el: HTMLElement, instance: Tabs) => void,
27
- /** On change event */
28
- onchange: (el: HTMLElement, instance: Tabs, index: number, header: HTMLElement, content: HTMLElement) => void;
29
- /** On create new tab event */
30
- oncreate: (el: HTMLElement, div: HTMLElement) => void;
31
- /** On delete tab event */
32
- ondelete: (el: HTMLElement, index: number) => void;
33
- /**
34
- * On before create new tab event
35
- * @return {string} Header title
36
- */
37
- onbeforecreate: (el: HTMLElement, title: string | undefined) => string | false;
38
- /** On change tab position event */
39
- onchangeposition: (headers: HTMLElement[], from: number, to: number) => void;
40
- /** Enable animation. Default: false */
41
- animation: boolean,
42
- /** Hide headers. Default: false */
43
- hideHeaders: boolean,
44
- /** Content padding */
45
- padding: number,
46
- /** Design */
47
- palette?: 'modern' | null,
48
- /** Max container width */
49
- maxWidth: number,
50
- }
51
-
52
- export type Tabs = (el: HTMLElement, options: Options) => {
53
- /** Set the border to a header */
54
- setBorder: (index: number) => void;
55
- /** Open a tab by number */
56
- open: (index: number) => void;
57
- /** Open a tab by its header DOM element */
58
- selectIndex: (element: HTMLElement) => void;
59
- /** Rename a header title */
60
- rename: (index: number, title: string) => void;
61
- /** Create a new tab */
62
- create: (title: string, url: string) => void;
63
- /** Remove a tab */
64
- remove: (index: number) => void;
65
- /** Automatic name the next tab number */
66
- nextNumber: () => void;
67
- /** Delete tab element */
68
- deleteElement: (index: number) => void;
69
- /** Append tab element */
70
- appendElement: (title?: string, callback?: Function, openTab?: boolean, position?: number) => void;
71
- /** Get the active tab index */
72
- getActive: () => number;
73
- /** Update the content of a tab */
74
- updateContent: (index: number, newContent: string) => void;
75
- /** Update tab position */
76
- updatePosition: (from: number, to: number, ignoreEvents?: boolean, openTab?: boolean) => void;
77
- /** Update DOM position */
78
- move: (from: number, to: number, ignoreEvents?: boolean, openTab?: boolean) => void;
79
- }
1
+ interface Item {
2
+ /** DOMElement for the header title */
3
+ titleElement?: HTMLElement;
4
+ /** DOMElement for the header content */
5
+ contentElement?: HTMLElement;
6
+ /** Material icon keyword */
7
+ icon?: string;
8
+ /** Tab header */
9
+ title?: string;
10
+ /** Width */
11
+ width?: number;
12
+ }
13
+
14
+ interface Options {
15
+ /** Tabs definition */
16
+ data: Item[],
17
+ /** Position */
18
+ position: 'top' | 'bottom' | null,
19
+ /** Show the add new tab button. Default: false */
20
+ allowCreate: boolean,
21
+ /** Allow drag and drop to change the tabs position. Default: false */
22
+ allowChangePosition: boolean,
23
+ /** On click event */
24
+ onclick: (el: HTMLElement, instance: Tabs, index: number, header: HTMLElement, content: HTMLElement) => void;
25
+ /** On load event */
26
+ onload: (el: HTMLElement, instance: Tabs) => void,
27
+ /** On change event */
28
+ onchange: (el: HTMLElement, instance: Tabs, index: number, header: HTMLElement, content: HTMLElement) => void;
29
+ /** On create new tab event */
30
+ oncreate: (el: HTMLElement, div: HTMLElement) => void;
31
+ /** On delete tab event */
32
+ ondelete: (el: HTMLElement, index: number) => void;
33
+ /**
34
+ * On before create new tab event
35
+ * @return {string} Header title
36
+ */
37
+ onbeforecreate: (el: HTMLElement, title: string | undefined) => string | false;
38
+ /** On change tab position event */
39
+ onchangeposition: (headers: HTMLElement[], from: number, to: number) => void;
40
+ /** Enable animation. Default: false */
41
+ animation: boolean,
42
+ /** Hide headers. Default: false */
43
+ hideHeaders: boolean,
44
+ /** Content padding */
45
+ padding: number,
46
+ /** Design */
47
+ palette?: 'modern' | null,
48
+ /** Max container width */
49
+ maxWidth: number,
50
+ }
51
+
52
+ export type Tabs = (el: HTMLElement, options: Options) => {
53
+ /** Set the border to a header */
54
+ setBorder: (index: number) => void;
55
+ /** Open a tab by number */
56
+ open: (index: number) => void;
57
+ /** Open a tab by its header DOM element */
58
+ selectIndex: (element: HTMLElement) => void;
59
+ /** Rename a header title */
60
+ rename: (index: number, title: string) => void;
61
+ /** Create a new tab */
62
+ create: (title: string, url: string) => void;
63
+ /** Remove a tab */
64
+ remove: (index: number) => void;
65
+ /** Automatic name the next tab number */
66
+ nextNumber: () => void;
67
+ /** Delete tab element */
68
+ deleteElement: (index: number) => void;
69
+ /** Append tab element */
70
+ appendElement: (title?: string, callback?: Function, openTab?: boolean, position?: number) => void;
71
+ /** Get the active tab index */
72
+ getActive: () => number;
73
+ /** Update the content of a tab */
74
+ updateContent: (index: number, newContent: string) => void;
75
+ /** Update tab position */
76
+ updatePosition: (from: number, to: number, ignoreEvents?: boolean, openTab?: boolean) => void;
77
+ /** Update DOM position */
78
+ move: (from: number, to: number, ignoreEvents?: boolean, openTab?: boolean) => void;
79
+ }
@@ -1,105 +1,105 @@
1
- interface Options {
2
- /** Initial value of the compontent */
3
- value?: string;
4
- /** Max number of tags inside the element */
5
- limit?: number;
6
- /** The URL for suggestions */
7
- search?: string;
8
- /** The default instruction text on the element */
9
- placeholder?: string;
10
- /** Method to validate the tags */
11
- validation?: (el: HTMLElement, text: string, value: string) => boolean;
12
- /** Method to be execute before any changes on the element */
13
- onbeforepaste?: (el: HTMLElement, instance: Tags, data: string[]) => string[];
14
- /** Method to be execute after any changes on the element */
15
- onbeforechange?: (el: HTMLElement, instance: Tags, currentValue: string, value: string) => string | string[] | boolean;
16
- /** On remove item */
17
- onremoveitem?: (el: HTMLElement, instance: Tags, node: object) => void;
18
- /** Method to be execute when the user reach the limit number entries */
19
- onlimit?: (instance: Tags, limit: number) => void;
20
- /** Method to be execute when on changed */
21
- onchange?: (el: HTMLElement, instance: Tags, value: string) => void;
22
- /** Method to be execute when on focus */
23
- onfocus?: (el: HTMLElement, instance: Tags, value: string) => void;
24
- /** Method to be execute when on blur */
25
- onblur?: (el: HTMLElement, instance: Tags, value: string) => void;
26
- /** Method to be execute when the element is loaded */
27
- onload?: (el: HTMLElement, instance: Tags) => void;
28
- /** Colors */
29
- colors?: null;
30
- }
31
-
32
- export type Tags = (el: HTMLElement, options: Options) => {
33
- /**
34
- * Change the component settings
35
- * @param {object} - New options
36
- * @param {boolean} - Reset to the defaults when option not specified
37
- */
38
- setOptions: (options: Options, reset?: boolean) => void;
39
-
40
- /**
41
- * Add a new tag to the element
42
- * @param {string|string[]} value - The value of the new element
43
- * @param {boolean} - focus on this new element
44
- */
45
- add: (value?: string | string[], focus?: boolean) => void;
46
-
47
- /**
48
- * Set the limit of entries for the component
49
- * @param {number} - New limit
50
- */
51
- setLimit: (limit) => void;
52
-
53
- /**
54
- * Remove a item node
55
- */
56
- remove: (node: HTMLElement) => void;
57
-
58
- /**
59
- * Get all tags in the element
60
- * @return {Array} data - All tags as an array
61
- */
62
- getData: () => string[];
63
-
64
- /**
65
- * Get the value of one tag. Null for all tags
66
- * @param {number} index - Tag index number. Null for all tags.
67
- * @return {string} value - All tags separated by comma
68
- */
69
- getValue: (index?: number) => string;
70
-
71
- /**
72
- * Set the value of the element based on a string separated by (,|;|\r\n) or array
73
- * @param {string|string[]} value - A string or array object with values
74
- */
75
- setValue: (value: string | string[]) => void;
76
-
77
- /**
78
- * Reset the value from the component
79
- */
80
- reset: () => void;
81
-
82
- /**
83
- * Verify if all tags in the element are valid
84
- * @return {boolean}
85
- */
86
- isValid: () => boolean;
87
-
88
- /**
89
- * Add one element from the suggestions to the component
90
- * @param {string} text - Label
91
- * @param {string} value - Value
92
- */
93
- selectIndex: (text: string, value?: string) => void;
94
-
95
- /**
96
- * Search for suggestions
97
- * @param {object} node - Target node for any suggestions
98
- */
99
- search: (node: HTMLElement) => void;
100
-
101
- /**
102
- * Destroy the component
103
- */
104
- destroy: () => void;
105
- }
1
+ interface Options {
2
+ /** Initial value of the compontent */
3
+ value?: string;
4
+ /** Max number of tags inside the element */
5
+ limit?: number;
6
+ /** The URL for suggestions */
7
+ search?: string;
8
+ /** The default instruction text on the element */
9
+ placeholder?: string;
10
+ /** Method to validate the tags */
11
+ validation?: (el: HTMLElement, text: string, value: string) => boolean;
12
+ /** Method to be execute before any changes on the element */
13
+ onbeforepaste?: (el: HTMLElement, instance: Tags, data: string[]) => string[];
14
+ /** Method to be execute after any changes on the element */
15
+ onbeforechange?: (el: HTMLElement, instance: Tags, currentValue: string, value: string) => string | string[] | boolean;
16
+ /** On remove item */
17
+ onremoveitem?: (el: HTMLElement, instance: Tags, node: object) => void;
18
+ /** Method to be execute when the user reach the limit number entries */
19
+ onlimit?: (instance: Tags, limit: number) => void;
20
+ /** Method to be execute when on changed */
21
+ onchange?: (el: HTMLElement, instance: Tags, value: string) => void;
22
+ /** Method to be execute when on focus */
23
+ onfocus?: (el: HTMLElement, instance: Tags, value: string) => void;
24
+ /** Method to be execute when on blur */
25
+ onblur?: (el: HTMLElement, instance: Tags, value: string) => void;
26
+ /** Method to be execute when the element is loaded */
27
+ onload?: (el: HTMLElement, instance: Tags) => void;
28
+ /** Colors */
29
+ colors?: null;
30
+ }
31
+
32
+ export type Tags = (el: HTMLElement, options: Options) => {
33
+ /**
34
+ * Change the component settings
35
+ * @param {object} - New options
36
+ * @param {boolean} - Reset to the defaults when option not specified
37
+ */
38
+ setOptions: (options: Options, reset?: boolean) => void;
39
+
40
+ /**
41
+ * Add a new tag to the element
42
+ * @param {string|string[]} value - The value of the new element
43
+ * @param {boolean} - focus on this new element
44
+ */
45
+ add: (value?: string | string[], focus?: boolean) => void;
46
+
47
+ /**
48
+ * Set the limit of entries for the component
49
+ * @param {number} - New limit
50
+ */
51
+ setLimit: (limit) => void;
52
+
53
+ /**
54
+ * Remove a item node
55
+ */
56
+ remove: (node: HTMLElement) => void;
57
+
58
+ /**
59
+ * Get all tags in the element
60
+ * @return {Array} data - All tags as an array
61
+ */
62
+ getData: () => string[];
63
+
64
+ /**
65
+ * Get the value of one tag. Null for all tags
66
+ * @param {number} index - Tag index number. Null for all tags.
67
+ * @return {string} value - All tags separated by comma
68
+ */
69
+ getValue: (index?: number) => string;
70
+
71
+ /**
72
+ * Set the value of the element based on a string separated by (,|;|\r\n) or array
73
+ * @param {string|string[]} value - A string or array object with values
74
+ */
75
+ setValue: (value: string | string[]) => void;
76
+
77
+ /**
78
+ * Reset the value from the component
79
+ */
80
+ reset: () => void;
81
+
82
+ /**
83
+ * Verify if all tags in the element are valid
84
+ * @return {boolean}
85
+ */
86
+ isValid: () => boolean;
87
+
88
+ /**
89
+ * Add one element from the suggestions to the component
90
+ * @param {string} text - Label
91
+ * @param {string} value - Value
92
+ */
93
+ selectIndex: (text: string, value?: string) => void;
94
+
95
+ /**
96
+ * Search for suggestions
97
+ * @param {object} node - Target node for any suggestions
98
+ */
99
+ search: (node: HTMLElement) => void;
100
+
101
+ /**
102
+ * Destroy the component
103
+ */
104
+ destroy: () => void;
105
+ }
@@ -1,70 +1,70 @@
1
- interface Item {
2
- /** Toolbar item type */
3
- type?: 'icon' | 'divisor' | 'label' | 'select';
4
- /** Content of the toolbar element */
5
- content?: string;
6
- /** Tooltip for the toolbar element */
7
- tooltip?: string;
8
- /** Toolbar element width */
9
- width?: number;
10
- /** The initial selected option for the type: select */
11
- value?: string;
12
- /** Render method parser for the elements in the dropdown when type: select */
13
- render?: Function;
14
- /** When a item is clicked */
15
- onclick?: (el: HTMLElement, iconObject: object, toolbarItem: HTMLElement) => void;
16
- /** For the type select when a new item is selected */
17
- onchange?: (el: HTMLElement, pickerObject: object, reservedValue: any, itemValue: string, itemKey: string, mouseEvent: object) => void;
18
- /** To update the state of the toolbar */
19
- updateState?: (toolbarObject: object, toolbarItem: HTMLElement, option: any, extendOption: any) => void;
20
- }
21
-
22
- interface Options {
23
- /** Instance for the application you integrate your toolbar */
24
- app?: any;
25
- /** Container of the toolbar */
26
- container?: boolean;
27
- /** Show badge. Default: false */
28
- badge?: boolean;
29
- /** Show titles */
30
- title?: boolean;
31
- /** Responsive toolbar. Default: false */
32
- responsive?: boolean;
33
- /** Max toolbar width */
34
- maxWidth?: number | null;
35
- /** Show toolbar in the bottom of the component */
36
- bottom?: boolean;
37
- /** Items */
38
- items: Item[];
39
- }
40
-
41
- export type Toolbar = (el: HTMLElement, options: Options) => {
42
- /** Close the floating extended options */
43
- close: () => void;
44
- /** Create the toolbar */
45
- create: (items: Item[]) => void;
46
- /** Destroy the toolbar */
47
- destroy: () => void;
48
- /** Return the HTMLElement container */
49
- get: () => void;
50
- /** Hide the toolbar */
51
- hide: () => void;
52
- /** Open the floating extended options */
53
- open: () => void;
54
- /** Toolbar settings */
55
- options: Options;
56
- /** Refresh the toolbar items */
57
- refresh: () => void;
58
- /** Select the toolbar item */
59
- selectItem: (element: HTMLElement) => void;
60
- /** Set the badge for a toolbar item */
61
- setBadge: (index: number, value: number) => void;
62
- /** Define readonly status */
63
- setReadonly: (state: boolean) => void;
64
- /** Show the toolbar */
65
- show: () => void;
66
- /** Internal controller */
67
- type: 'toolbar';
68
- /** Update the state of a toolbar item. Arguments to be sent to the items */
69
- update: (option?: any, extendedOption?: any) => void;
70
- }
1
+ interface Item {
2
+ /** Toolbar item type */
3
+ type?: 'icon' | 'divisor' | 'label' | 'select';
4
+ /** Content of the toolbar element */
5
+ content?: string;
6
+ /** Tooltip for the toolbar element */
7
+ tooltip?: string;
8
+ /** Toolbar element width */
9
+ width?: number;
10
+ /** The initial selected option for the type: select */
11
+ value?: string;
12
+ /** Render method parser for the elements in the dropdown when type: select */
13
+ render?: Function;
14
+ /** When a item is clicked */
15
+ onclick?: (el: HTMLElement, iconObject: object, toolbarItem: HTMLElement) => void;
16
+ /** For the type select when a new item is selected */
17
+ onchange?: (el: HTMLElement, pickerObject: object, reservedValue: any, itemValue: string, itemKey: string, mouseEvent: object) => void;
18
+ /** To update the state of the toolbar */
19
+ updateState?: (toolbarObject: object, toolbarItem: HTMLElement, option: any, extendOption: any) => void;
20
+ }
21
+
22
+ interface Options {
23
+ /** Instance for the application you integrate your toolbar */
24
+ app?: any;
25
+ /** Container of the toolbar */
26
+ container?: boolean;
27
+ /** Show badge. Default: false */
28
+ badge?: boolean;
29
+ /** Show titles */
30
+ title?: boolean;
31
+ /** Responsive toolbar. Default: false */
32
+ responsive?: boolean;
33
+ /** Max toolbar width */
34
+ maxWidth?: number | null;
35
+ /** Show toolbar in the bottom of the component */
36
+ bottom?: boolean;
37
+ /** Items */
38
+ items: Item[];
39
+ }
40
+
41
+ export type Toolbar = (el: HTMLElement, options: Options) => {
42
+ /** Close the floating extended options */
43
+ close: () => void;
44
+ /** Create the toolbar */
45
+ create: (items: Item[]) => void;
46
+ /** Destroy the toolbar */
47
+ destroy: () => void;
48
+ /** Return the HTMLElement container */
49
+ get: () => void;
50
+ /** Hide the toolbar */
51
+ hide: () => void;
52
+ /** Open the floating extended options */
53
+ open: () => void;
54
+ /** Toolbar settings */
55
+ options: Options;
56
+ /** Refresh the toolbar items */
57
+ refresh: () => void;
58
+ /** Select the toolbar item */
59
+ selectItem: (element: HTMLElement) => void;
60
+ /** Set the badge for a toolbar item */
61
+ setBadge: (index: number, value: number) => void;
62
+ /** Define readonly status */
63
+ setReadonly: (state: boolean) => void;
64
+ /** Show the toolbar */
65
+ show: () => void;
66
+ /** Internal controller */
67
+ type: 'toolbar';
68
+ /** Update the state of a toolbar item. Arguments to be sent to the items */
69
+ update: (option?: any, extendedOption?: any) => void;
70
+ }
@@ -1,45 +1,45 @@
1
- interface File {
2
- /** File object */
3
- file: object;
4
- /** Extension */
5
- extension: string;
6
- /** Filename */
7
- name: string;
8
- /** File size */
9
- size: number;
10
- /** File last modification */
11
- lastmodified: string;
12
- /** Alias for the file object */
13
- content: object;
14
- }
15
- interface Options {
16
- /** Upload type. Default: image */
17
- type?: 'image' | string,
18
- /** Excepted extensions. Default: '*' for all */
19
- extension?: string,
20
- /** Show input */
21
- input?: boolean,
22
- /** Min width */
23
- minWidth?: number,
24
- /** Max width */
25
- maxWidth?: null,
26
- /** Max height */
27
- maxHeight?: null,
28
- /** Max size */
29
- maxJpegSizeBytes?: null, // For example, 350Kb would be 350000
30
- /** Onchange event */
31
- onchange?: null,
32
- /** Accept multiple files */
33
- multiple?: false,
34
- /** URL for the remove parser */
35
- remoteParser?: null,
36
- }
37
-
38
- export type Upload = (el: HTMLElement, options: Options) => {
39
- /** Add files to the component */
40
- add: (data: File[]) => void;
41
- /** Add a new file */
42
- addFromFile: (file) => void;
43
- /** Add a file from a remote URL */
44
- addFromUrl: (src) => void;
45
- }
1
+ interface File {
2
+ /** File object */
3
+ file: object;
4
+ /** Extension */
5
+ extension: string;
6
+ /** Filename */
7
+ name: string;
8
+ /** File size */
9
+ size: number;
10
+ /** File last modification */
11
+ lastmodified: string;
12
+ /** Alias for the file object */
13
+ content: object;
14
+ }
15
+ interface Options {
16
+ /** Upload type. Default: image */
17
+ type?: 'image' | string,
18
+ /** Excepted extensions. Default: '*' for all */
19
+ extension?: string,
20
+ /** Show input */
21
+ input?: boolean,
22
+ /** Min width */
23
+ minWidth?: number,
24
+ /** Max width */
25
+ maxWidth?: null,
26
+ /** Max height */
27
+ maxHeight?: null,
28
+ /** Max size */
29
+ maxJpegSizeBytes?: null, // For example, 350Kb would be 350000
30
+ /** Onchange event */
31
+ onchange?: null,
32
+ /** Accept multiple files */
33
+ multiple?: false,
34
+ /** URL for the remove parser */
35
+ remoteParser?: null,
36
+ }
37
+
38
+ export type Upload = (el: HTMLElement, options: Options) => {
39
+ /** Add files to the component */
40
+ add: (data: File[]) => void;
41
+ /** Add a new file */
42
+ addFromFile: (file) => void;
43
+ /** Add a file from a remote URL */
44
+ addFromUrl: (src) => void;
45
+ }