@doyosi/laraisy 1.0.2 → 1.0.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 (51) hide show
  1. package/LICENSE +1 -1
  2. package/package.json +1 -1
  3. package/src/CodeInput.js +48 -48
  4. package/src/DSAlert.js +352 -352
  5. package/src/DSAvatar.js +207 -207
  6. package/src/DSDelete.js +274 -274
  7. package/src/DSForm.js +568 -568
  8. package/src/DSGridOrTable.js +453 -453
  9. package/src/DSLocaleSwitcher.js +239 -239
  10. package/src/DSLogout.js +293 -293
  11. package/src/DSNotifications.js +365 -365
  12. package/src/DSRestore.js +181 -181
  13. package/src/DSSelect.js +1071 -1071
  14. package/src/DSSelectBox.js +563 -563
  15. package/src/DSSimpleSlider.js +517 -517
  16. package/src/DSSvgFetch.js +69 -69
  17. package/src/DSTable/DSTableExport.js +68 -68
  18. package/src/DSTable/DSTableFilter.js +224 -224
  19. package/src/DSTable/DSTablePagination.js +136 -136
  20. package/src/DSTable/DSTableSearch.js +40 -40
  21. package/src/DSTable/DSTableSelection.js +192 -192
  22. package/src/DSTable/DSTableSort.js +58 -58
  23. package/src/DSTable.js +353 -353
  24. package/src/DSTabs.js +488 -488
  25. package/src/DSUpload.js +887 -887
  26. package/dist/CodeInput.d.ts +0 -10
  27. package/dist/DSAlert.d.ts +0 -112
  28. package/dist/DSAvatar.d.ts +0 -45
  29. package/dist/DSDelete.d.ts +0 -61
  30. package/dist/DSForm.d.ts +0 -151
  31. package/dist/DSGridOrTable/DSGOTRenderer.d.ts +0 -60
  32. package/dist/DSGridOrTable/DSGOTViewToggle.d.ts +0 -26
  33. package/dist/DSGridOrTable.d.ts +0 -296
  34. package/dist/DSLocaleSwitcher.d.ts +0 -71
  35. package/dist/DSLogout.d.ts +0 -76
  36. package/dist/DSNotifications.d.ts +0 -54
  37. package/dist/DSRestore.d.ts +0 -56
  38. package/dist/DSSelect.d.ts +0 -221
  39. package/dist/DSSelectBox.d.ts +0 -123
  40. package/dist/DSSimpleSlider.d.ts +0 -136
  41. package/dist/DSSvgFetch.d.ts +0 -17
  42. package/dist/DSTable/DSTableExport.d.ts +0 -11
  43. package/dist/DSTable/DSTableFilter.d.ts +0 -40
  44. package/dist/DSTable/DSTablePagination.d.ts +0 -12
  45. package/dist/DSTable/DSTableSearch.d.ts +0 -8
  46. package/dist/DSTable/DSTableSelection.d.ts +0 -46
  47. package/dist/DSTable/DSTableSort.d.ts +0 -8
  48. package/dist/DSTable.d.ts +0 -116
  49. package/dist/DSTabs.d.ts +0 -156
  50. package/dist/DSUpload.d.ts +0 -220
  51. package/dist/index.d.ts +0 -17
package/dist/DSTable.d.ts DELETED
@@ -1,116 +0,0 @@
1
- /**
2
- * DSTable
3
- *
4
- * A comprehensive table plugin for data management.
5
- * Supports: Pagination, Search, Sort, Filter, Export, Selection.
6
- */
7
- export class DSTable {
8
- static defaults: {
9
- pagination: boolean;
10
- pagination_translations: {
11
- prev: string;
12
- next: string;
13
- goto: string;
14
- stats: string;
15
- };
16
- search: boolean;
17
- sort: boolean;
18
- filter: boolean;
19
- export: boolean;
20
- selection: boolean;
21
- table_source: string;
22
- ajax_url: any;
23
- ajax_data: {};
24
- ajax_method: string;
25
- ajax_function: string;
26
- success: any;
27
- error: any;
28
- beforeSend: any;
29
- afterSend: any;
30
- template_source: string;
31
- template_function: any;
32
- template_html: any;
33
- template_response: string;
34
- emptyIcon: string;
35
- tableSelector: string;
36
- bodySelector: string;
37
- messageSelector: string;
38
- table_translations: {
39
- no_data: string;
40
- loading: string;
41
- error: string;
42
- empty: string;
43
- };
44
- };
45
- constructor(wrapper: any, options?: {});
46
- wrapper: any;
47
- config: {
48
- pagination: boolean;
49
- pagination_translations: {
50
- prev: string;
51
- next: string;
52
- goto: string;
53
- stats: string;
54
- };
55
- search: boolean;
56
- sort: boolean;
57
- filter: boolean;
58
- export: boolean;
59
- selection: boolean;
60
- table_source: string;
61
- ajax_url: any;
62
- ajax_data: {};
63
- ajax_method: string;
64
- ajax_function: string;
65
- success: any;
66
- error: any;
67
- beforeSend: any;
68
- afterSend: any;
69
- template_source: string;
70
- template_function: any;
71
- template_html: any;
72
- template_response: string;
73
- emptyIcon: string;
74
- tableSelector: string;
75
- bodySelector: string;
76
- messageSelector: string;
77
- table_translations: {
78
- no_data: string;
79
- loading: string;
80
- error: string;
81
- empty: string;
82
- };
83
- };
84
- data: any[];
85
- meta: {};
86
- params: {
87
- page: number;
88
- per_page: number;
89
- sort_by: any;
90
- sort_order: string;
91
- search: any;
92
- filters: {};
93
- };
94
- modules: {};
95
- isLoading: boolean;
96
- _init(): void;
97
- table: any;
98
- tbody: any;
99
- loadData(): Promise<void>;
100
- _loadFromAjax(): Promise<void>;
101
- _handleDataSuccess(response: any): void;
102
- render(): void;
103
- _renderTemplate(template: any, data: any): any;
104
- _showEmpty(): void;
105
- _showError(msg: any): void;
106
- _toggleLoading(loading: any): void;
107
- _showSkeleton(): void;
108
- refresh(): void;
109
- setParam(key: any, value: any): void;
110
- getParam(key: any): any;
111
- registerModule(name: any, instance: any): void;
112
- on(event: any, handler: any): void;
113
- _emit(event: any, detail?: {}): void;
114
- _getNestedValue(obj: any, path: any): any;
115
- }
116
- export default DSTable;
package/dist/DSTabs.d.ts DELETED
@@ -1,156 +0,0 @@
1
- /**
2
- * DSTabs
3
- *
4
- * A lightweight tab switching component with:
5
- * - Button/link click handlers for tab switching
6
- * - Radio input synchronization
7
- * - Active state management with disabled/enabled buttons
8
- * - CSS class-based content show/hide
9
- * - Data attribute configuration
10
- * - Full event system
11
- *
12
- * @example
13
- * // HTML structure:
14
- * // Buttons: <button data-tab="primary">Primary</button>
15
- * // Radio inputs: <input type="radio" data-tab="primary" checked />
16
- * // Tab content: <div class="tab-content">...</div>
17
- */
18
- export class DSTabs {
19
- static instances: Map<any, any>;
20
- static instanceCounter: number;
21
- /**
22
- * Default configuration
23
- */
24
- static defaults: {
25
- buttonSelector: string;
26
- radioSelector: string;
27
- contentSelector: string;
28
- tabsContainer: string;
29
- activeClass: string;
30
- disableActive: boolean;
31
- showFirst: boolean;
32
- buttonActiveClass: string;
33
- contentHiddenClass: string;
34
- onTabChange: any;
35
- };
36
- /**
37
- * Static factory method
38
- */
39
- static create(containerSelector: any, config?: {}): DSTabs;
40
- /**
41
- * Get instance by element
42
- */
43
- static getInstance(element: any): any;
44
- /**
45
- * Auto-initialize all elements with [data-ds-tabs]
46
- */
47
- static initAll(selector?: string): void;
48
- /**
49
- * @param {string|HTMLElement} containerSelector - Container element or selector
50
- * @param {Object} config - Configuration options
51
- */
52
- constructor(containerSelector: string | HTMLElement, config?: any);
53
- instanceId: string;
54
- container: Element;
55
- cfg: any;
56
- _currentTab: any;
57
- _prevTab: any;
58
- _listeners: {};
59
- _boundHandlers: {};
60
- _buildConfig(userConfig: any): any;
61
- _parseDataAttributes(): {
62
- buttonSelector: any;
63
- radioSelector: any;
64
- contentSelector: any;
65
- tabsContainer: any;
66
- activeClass: any;
67
- disableActive: boolean;
68
- showFirst: boolean;
69
- };
70
- _init(): void;
71
- _cacheElements(): void;
72
- buttons: any[];
73
- tabsContainer: any;
74
- radios: any[];
75
- contents: any[];
76
- _tabMap: Map<any, any>;
77
- _bindEvents(): void;
78
- _initActiveTab(): void;
79
- _onButtonClick(e: any): void;
80
- _switchTab(tabName: any, emit?: boolean): boolean;
81
- /**
82
- * Switch to a specific tab
83
- * @param {string} tabName - The tab to switch to
84
- * @returns {boolean} - Whether the switch was successful
85
- */
86
- switchTo(tabName: string): boolean;
87
- /**
88
- * Get the current active tab name
89
- * @returns {string|null}
90
- */
91
- getCurrentTab(): string | null;
92
- /**
93
- * Get the previous tab name
94
- * @returns {string|null}
95
- */
96
- getPreviousTab(): string | null;
97
- /**
98
- * Get all available tab names
99
- * @returns {string[]}
100
- */
101
- getTabNames(): string[];
102
- /**
103
- * Check if a tab exists
104
- * @param {string} tabName
105
- * @returns {boolean}
106
- */
107
- hasTab(tabName: string): boolean;
108
- /**
109
- * Switch to next tab (loops back to first)
110
- * @returns {string|null} - The new active tab name
111
- */
112
- next(): string | null;
113
- /**
114
- * Switch to previous tab (loops to last)
115
- * @returns {string|null} - The new active tab name
116
- */
117
- prev(): string | null;
118
- /**
119
- * Enable a specific tab button
120
- * @param {string} tabName
121
- */
122
- enableTab(tabName: string): void;
123
- /**
124
- * Disable a specific tab button
125
- * @param {string} tabName
126
- */
127
- disableTab(tabName: string): void;
128
- /**
129
- * Subscribe to events
130
- * @param {string} event - Event name ('ready', 'change')
131
- * @param {Function} handler - Event handler
132
- * @returns {DSTabs} - For chaining
133
- */
134
- on(event: string, handler: Function): DSTabs;
135
- /**
136
- * Unsubscribe from events
137
- * @param {string} event - Event name
138
- * @param {Function} handler - Event handler (optional, removes all if not provided)
139
- * @returns {DSTabs} - For chaining
140
- */
141
- off(event: string, handler: Function): DSTabs;
142
- /**
143
- * Emit an event
144
- * @private
145
- */
146
- private _emit;
147
- /**
148
- * Refresh the tabs (re-cache elements and reinitialize)
149
- */
150
- refresh(): void;
151
- /**
152
- * Destroy the instance and cleanup
153
- */
154
- destroy(): void;
155
- }
156
- export default DSTabs;
@@ -1,220 +0,0 @@
1
- /**
2
- * DSUpload
3
- *
4
- * A comprehensive file upload component with:
5
- * - Image/file preview
6
- * - Progress bar support
7
- * - File type validation
8
- * - File size validation
9
- * - Old value / default image support
10
- * - Reset functionality
11
- * - Drag and drop support
12
- * - Full event system
13
- */
14
- export class DSUpload {
15
- static instances: Map<any, any>;
16
- static instanceCounter: number;
17
- /**
18
- * Default Icons
19
- */
20
- static icons: {
21
- upload: string;
22
- file: string;
23
- image: string;
24
- close: string;
25
- reset: string;
26
- check: string;
27
- };
28
- /**
29
- * Default configuration
30
- */
31
- static defaults: {
32
- preview: boolean;
33
- previewMaxHeight: string;
34
- defaultImage: any;
35
- oldValue: any;
36
- accept: string;
37
- maxSize: number;
38
- minSize: number;
39
- showProgressBar: boolean;
40
- showFileInfo: boolean;
41
- showResetButton: boolean;
42
- showRemoveButton: boolean;
43
- dropzone: boolean;
44
- dropzoneText: string;
45
- browseText: string;
46
- wrapperClass: string;
47
- previewClass: string;
48
- dropzoneClass: string;
49
- autoUpload: boolean;
50
- uploadUrl: any;
51
- removeUrl: any;
52
- uploadMethod: string;
53
- uploadFieldName: any;
54
- sizeUnit: string;
55
- translations: {
56
- dropzone: string;
57
- browse: string;
58
- remove: string;
59
- reset: string;
60
- fileTooBig: string;
61
- fileTooSmall: string;
62
- invalidType: string;
63
- uploadError: string;
64
- uploading: string;
65
- };
66
- };
67
- /**
68
- * Static factory
69
- */
70
- static create(selector: any, config?: {}): DSUpload;
71
- /**
72
- * Get instance by element
73
- */
74
- static getInstance(element: any): any;
75
- /**
76
- * Auto-initialize all elements with [data-ds-upload]
77
- */
78
- static initAll(selector?: string): void;
79
- /**
80
- * @param {string|HTMLElement} selector - Input element or selector
81
- * @param {Object} config - Configuration options
82
- */
83
- constructor(selector: string | HTMLElement, config?: any);
84
- instanceId: string;
85
- originalInput: Element;
86
- wrapper: Element;
87
- cfg: any;
88
- _file: any;
89
- _previewUrl: any;
90
- _isUploading: boolean;
91
- _progress: number;
92
- _originalValue: any;
93
- _listeners: {};
94
- _boundHandlers: {};
95
- _buildConfig(userConfig: any): any;
96
- _parseDataAttributes(): {
97
- preview: boolean;
98
- defaultImage: any;
99
- fallbackImage: any;
100
- oldValue: any;
101
- accept: any;
102
- maxSize: number;
103
- minSize: number;
104
- dropzone: boolean;
105
- showProgressBar: boolean;
106
- uploadUrl: any;
107
- removeUrl: any;
108
- };
109
- _init(): void;
110
- _buildDOM(): void;
111
- container: HTMLDivElement;
112
- _cacheElements(): void;
113
- elements: {
114
- dropzone: Element;
115
- placeholder: Element;
116
- preview: Element;
117
- previewImg: Element;
118
- filePreview: Element;
119
- filename: Element;
120
- info: Element;
121
- name: Element;
122
- size: Element;
123
- reset: Element;
124
- remove: Element;
125
- browse: Element;
126
- progress: Element;
127
- progressBar: Element;
128
- progressText: Element;
129
- error: Element;
130
- errorText: Element;
131
- };
132
- _bindEvents(): void;
133
- _setInitialPreview(): void;
134
- _onInputChange(e: any): void;
135
- _onDropzoneClick(e: any): void;
136
- _onBrowse(e: any): void;
137
- _onDragOver(e: any): void;
138
- _onDragLeave(e: any): void;
139
- _onDrop(e: any): void;
140
- _onReset(e: any): void;
141
- _onRemove(e: any): Promise<void>;
142
- _processFile(file: any): boolean;
143
- _validateType(file: any): any;
144
- _validateSize(file: any): boolean;
145
- _isImage(file: any): any;
146
- _showPreview(url: any, file: any, isInitial?: boolean, hasRealValue?: boolean): void;
147
- _showPlaceholder(): void;
148
- _showProgress(percent: any): void;
149
- _hideProgress(): void;
150
- _showError(message: any): void;
151
- _hideError(): void;
152
- /**
153
- * Get the current file
154
- */
155
- getFile(): any;
156
- /**
157
- * Get file info
158
- */
159
- getFileInfo(): {
160
- name: any;
161
- size: any;
162
- type: any;
163
- formattedSize: string;
164
- };
165
- /**
166
- * Check if a file is selected
167
- */
168
- hasFile(): boolean;
169
- /**
170
- * Get preview URL
171
- */
172
- getPreviewUrl(): any;
173
- /**
174
- * Clear the file input
175
- */
176
- clear(): void;
177
- /**
178
- * Reset to original/old value
179
- */
180
- reset(): void;
181
- /**
182
- * Set a file programmatically
183
- */
184
- setFile(file: any): void;
185
- /**
186
- * Set preview URL directly (for existing files)
187
- */
188
- setPreview(url: any): void;
189
- /**
190
- * Upload file via AJAX
191
- */
192
- upload(): Promise<any>;
193
- /**
194
- * Remove file via AJAX
195
- */
196
- remove(): Promise<boolean>;
197
- _sendRequest(formData?: any, method?: any, url?: any): Promise<any>;
198
- /**
199
- * Enable the uploader
200
- */
201
- enable(): void;
202
- /**
203
- * Disable the uploader
204
- */
205
- disable(): void;
206
- /**
207
- * Subscribe to events
208
- */
209
- on(event: any, handler: any): this;
210
- /**
211
- * Unsubscribe from events
212
- */
213
- off(event: any, handler: any): this;
214
- /**
215
- * Destroy instance
216
- */
217
- destroy(): void;
218
- _emit(event: any, detail?: {}): void;
219
- _formatSize(bytes: any): string;
220
- }
package/dist/index.d.ts DELETED
@@ -1,17 +0,0 @@
1
- export * from "./CodeInput.js";
2
- export * from "./DSAlert.js";
3
- export * from "./DSAvatar.js";
4
- export * from "./DSDelete.js";
5
- export * from "./DSForm.js";
6
- export * from "./DSGridOrTable.js";
7
- export * from "./DSLocaleSwitcher.js";
8
- export * from "./DSLogout.js";
9
- export * from "./DSNotifications.js";
10
- export * from "./DSRestore.js";
11
- export * from "./DSSelect.js";
12
- export * from "./DSSelectBox.js";
13
- export * from "./DSSimpleSlider.js";
14
- export * from "./DSSvgFetch.js";
15
- export * from "./DSTable.js";
16
- export * from "./DSTabs.js";
17
- export * from "./DSUpload.js";