tailjng 0.0.58 → 0.0.60
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/cli/settings/header-generator.js +1 -1
- package/fesm2022/tailjng.mjs +41 -15
- package/fesm2022/tailjng.mjs.map +1 -1
- package/lib/interfaces/crud/crud.interface.d.ts +1 -0
- package/lib/services/crud/generic-crud.service.d.ts +29 -5
- package/lib/services/static/icons.service.d.ts +2 -0
- package/package.json +1 -1
- package/src/lib/components/button/button.component.html +1 -1
- package/src/lib/components/button/button.component.ts +1 -1
- package/src/lib/components/card/card-complete/complete-card.component.html +4 -4
- package/src/lib/components/card/card-complete/complete-card.component.scss +0 -35
- package/src/lib/components/card/card-crud-complete/complete-crud-card.component.html +2 -2
- package/src/lib/components/card/card-crud-complete/complete-crud-card.component.scss +0 -5
- package/src/lib/components/card/card-crud-complete/complete-crud-card.component.ts +10 -33
- package/src/lib/components/checkbox/checkbox-input/input-checkbox.component.ts +5 -1
- package/src/lib/components/coach-mark/coach-mark.component.html +9 -2
- package/src/lib/components/coach-mark/coach-mark.component.ts +2 -0
- package/src/lib/components/coach-mark/coach-mark.directive.ts +4 -0
- package/src/lib/components/color/colors.service.ts +15 -15
- package/src/lib/components/filter/filter-complete/complete-filter.component.html +1 -1
- package/src/lib/components/input/input/input.component.html +4 -4
- package/src/lib/components/input/input/input.component.ts +2 -2
- package/src/lib/components/input/input-file/file-input.component.html +3 -3
- package/src/lib/components/input/input-file/file-input.component.ts +3 -3
- package/src/lib/components/input/input-range/range-input.component.html +1 -1
- package/src/lib/components/input/input-range/range-input.component.ts +2 -2
- package/src/lib/components/input/input-textarea/textarea-input.component.html +2 -2
- package/src/lib/components/input/input-textarea/textarea-input.component.ts +2 -2
- package/src/lib/components/mode-toggle/mode-toggle.component.html +21 -7
- package/src/lib/components/mode-toggle/mode-toggle.component.ts +8 -21
- package/src/lib/components/select/select-dropdown/dropdown-select.component.html +6 -6
- package/src/lib/components/select/select-dropdown/dropdown-select.component.ts +2 -2
- package/src/lib/components/select/select-multi-dropdown/multi-dropdown-select.component.html +6 -7
- package/src/lib/components/select/select-multi-dropdown/multi-dropdown-select.component.ts +3 -3
- package/src/lib/components/select/select-multi-table/multi-table-select.component.html +4 -4
- package/src/lib/components/select/select-multi-table/multi-table-select.component.ts +2 -2
- package/src/lib/components/table/table-crud-complete/complete-crud-table.component.html +1079 -330
- package/src/lib/components/table/table-crud-complete/complete-crud-table.component.scss +0 -5
- package/src/lib/components/table/table-crud-complete/complete-crud-table.component.ts +65 -3
- package/src/lib/components/viewer/viewer-image/image-viewer.component.html +170 -87
- package/src/lib/components/viewer/viewer-image/image-viewer.component.ts +88 -9
package/fesm2022/tailjng.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { es } from 'date-fns/locale';
|
|
|
6
6
|
import { map, firstValueFrom, isObservable, forkJoin } from 'rxjs';
|
|
7
7
|
import * as i1$1 from '@angular/common/http';
|
|
8
8
|
import { HttpParams } from '@angular/common/http';
|
|
9
|
-
import { Link2Off, Link, Clipboard, CircleAlert, Clock, Calendar, EllipsisVertical, Trash, Edit, Pencil, PencilLine, ListRestart, FileUp, Download, MonitorUp, FileSpreadsheet, Cpu, Trash2, Eraser, ArrowDownWideNarrow, Filter, ArrowBigRight, ChevronsRight, ChevronRight, ChevronLeft, ChevronsLeft, Loader2, Moon, Sun, Save, Copy, Search, SquareDashedMousePointer, ChevronsUpDown, ChevronDown, ChevronUp, Eye, Upload, ImageOff, Images, Image, Minimize2, Scan, RefreshCcw, RotateCcw, RotateCw, ZoomOut, ZoomIn, Check, X, CircleHelp, TriangleAlert, CircleX, CircleCheck, Info } from 'lucide-angular';
|
|
9
|
+
import { Link2Off, Link, Clipboard, CircleAlert, Clock, Calendar, EllipsisVertical, Trash, Edit, Pencil, PencilLine, ListRestart, FileUp, Download, MonitorUp, FileSpreadsheet, Cpu, Trash2, Eraser, ArrowDownWideNarrow, Filter, ArrowBigRight, ChevronsRight, ChevronRight, ChevronLeft, ChevronsLeft, ListFilter, Table, Loader2, Moon, Sun, Save, Copy, Search, SquareDashedMousePointer, ChevronsUpDown, ChevronDown, ChevronUp, Eye, Upload, ImageOff, Images, Image, Minimize2, Scan, RefreshCcw, RotateCcw, RotateCw, ZoomOut, ZoomIn, Check, X, CircleHelp, TriangleAlert, CircleX, CircleCheck, Info } from 'lucide-angular';
|
|
10
10
|
import * as FileSaver from 'file-saver';
|
|
11
11
|
import * as ExcelJS from 'exceljs';
|
|
12
12
|
import * as XLSX from 'xlsx';
|
|
@@ -938,6 +938,17 @@ class JGenericCrudService {
|
|
|
938
938
|
this.paramsHttpService = paramsHttpService;
|
|
939
939
|
this.converterCrudService = converterCrudService;
|
|
940
940
|
}
|
|
941
|
+
/**
|
|
942
|
+
* Method to build the URL for the request.
|
|
943
|
+
* @param urlBase Base URL for the request.
|
|
944
|
+
* @param endpoint Distinctive of the endpoint ('role', 'status', etc.)
|
|
945
|
+
* @param id Identifier of the record (optional).
|
|
946
|
+
* @returns
|
|
947
|
+
*/
|
|
948
|
+
buildUrl(urlBase, endpoint, id) {
|
|
949
|
+
const baseUrl = urlBase ? `${urlBase}/${endpoint}` : `${this.config.urlBase}/${endpoint}`;
|
|
950
|
+
return id !== undefined && id !== null ? `${baseUrl}/${id}` : baseUrl;
|
|
951
|
+
}
|
|
941
952
|
/**
|
|
942
953
|
* Method to get all records from an endpoint.
|
|
943
954
|
* @param urlBase Base URL for the request.
|
|
@@ -946,7 +957,7 @@ class JGenericCrudService {
|
|
|
946
957
|
* @returns Observable with the API response.
|
|
947
958
|
*/
|
|
948
959
|
findAll({ urlBase, endpoint, params }) {
|
|
949
|
-
const url =
|
|
960
|
+
const url = this.buildUrl(urlBase, endpoint);
|
|
950
961
|
let httpParams;
|
|
951
962
|
if (params)
|
|
952
963
|
httpParams = this.paramsHttpService.resParams(params);
|
|
@@ -960,8 +971,8 @@ class JGenericCrudService {
|
|
|
960
971
|
* @returns Observable with the API response.
|
|
961
972
|
*/
|
|
962
973
|
findOne({ urlBase, endpoint, id }) {
|
|
963
|
-
const url = urlBase
|
|
964
|
-
return this.http.get(
|
|
974
|
+
const url = this.buildUrl(urlBase, endpoint, id);
|
|
975
|
+
return this.http.get(url).pipe(map(response => response.data[endpoint]));
|
|
965
976
|
}
|
|
966
977
|
/**
|
|
967
978
|
* Method to count the records of an endpoint.
|
|
@@ -971,7 +982,7 @@ class JGenericCrudService {
|
|
|
971
982
|
* @returns Observable with the API response.
|
|
972
983
|
*/
|
|
973
984
|
count({ urlBase, endpoint, params }) {
|
|
974
|
-
const url =
|
|
985
|
+
const url = this.buildUrl(urlBase, endpoint);
|
|
975
986
|
let httpParams;
|
|
976
987
|
if (params)
|
|
977
988
|
httpParams = this.paramsHttpService.resParams(params);
|
|
@@ -985,7 +996,7 @@ class JGenericCrudService {
|
|
|
985
996
|
* @returns Observable with the API response.
|
|
986
997
|
*/
|
|
987
998
|
create({ urlBase, endpoint, data }) {
|
|
988
|
-
const url =
|
|
999
|
+
const url = this.buildUrl(urlBase, endpoint);
|
|
989
1000
|
return this.http.post(url, data);
|
|
990
1001
|
}
|
|
991
1002
|
/**
|
|
@@ -997,31 +1008,44 @@ class JGenericCrudService {
|
|
|
997
1008
|
* @returns Observable with the API response.
|
|
998
1009
|
*/
|
|
999
1010
|
update({ urlBase, endpoint, id, data }) {
|
|
1000
|
-
const url = urlBase
|
|
1001
|
-
return this.http.put(
|
|
1011
|
+
const url = this.buildUrl(urlBase, endpoint, id);
|
|
1012
|
+
return this.http.put(url, data);
|
|
1013
|
+
}
|
|
1014
|
+
/**
|
|
1015
|
+
* Method to partially update a record in an endpoint.
|
|
1016
|
+
* @param urlBase Base URL for the request.
|
|
1017
|
+
* @param endpoint Distinctive of the endpoint ('role', 'status', etc.)
|
|
1018
|
+
* @param id Identifier of the record.
|
|
1019
|
+
* @param data Data of the record to update.
|
|
1020
|
+
* @returns Observable with the API response.
|
|
1021
|
+
*/
|
|
1022
|
+
patch({ urlBase, endpoint, id, data }) {
|
|
1023
|
+
const url = this.buildUrl(urlBase, endpoint, id);
|
|
1024
|
+
return this.http.patch(url, data);
|
|
1002
1025
|
}
|
|
1003
1026
|
/**
|
|
1004
1027
|
* Method to delete a record from an endpoint.
|
|
1005
1028
|
* @param urlBase Base URL for the request.
|
|
1006
1029
|
* @param endpoint Distinctive of the endpoint ('role', 'status', etc.)
|
|
1007
1030
|
* @param id Identifier of the record.
|
|
1031
|
+
* @param data Data of the record to delete (optional, in case the API requires it in the body).
|
|
1008
1032
|
* @returns Observable with the API response.
|
|
1009
1033
|
*/
|
|
1010
|
-
delete({ urlBase, endpoint, id }) {
|
|
1011
|
-
const url = urlBase
|
|
1012
|
-
return this.http.delete(
|
|
1034
|
+
delete({ urlBase, endpoint, id, data }) {
|
|
1035
|
+
const url = this.buildUrl(urlBase, endpoint, id);
|
|
1036
|
+
return this.http.delete(url, { body: data });
|
|
1013
1037
|
}
|
|
1014
1038
|
/**
|
|
1015
1039
|
* Method to update the status of a record in an endpoint.
|
|
1016
|
-
|
|
1040
|
+
* @param urlBase Base URL for the request.
|
|
1017
1041
|
* @param endpoint Distinctive of the endpoint ('role', 'status', etc.)
|
|
1018
1042
|
* @param id Identifier of the record.
|
|
1019
1043
|
* @param data Data of a boolean record to update.
|
|
1020
1044
|
* @returns Observable with the API response.
|
|
1021
1045
|
*/
|
|
1022
1046
|
toggle({ urlBase, endpoint, id, data }) {
|
|
1023
|
-
const url = urlBase
|
|
1024
|
-
return this.http.patch(
|
|
1047
|
+
const url = this.buildUrl(urlBase, `${endpoint}/toggle`, id);
|
|
1048
|
+
return this.http.patch(url, data);
|
|
1025
1049
|
}
|
|
1026
1050
|
/**
|
|
1027
1051
|
* Method to create multiple records in an endpoint.
|
|
@@ -1031,7 +1055,7 @@ class JGenericCrudService {
|
|
|
1031
1055
|
* @returns Observable with the API response.
|
|
1032
1056
|
*/
|
|
1033
1057
|
createMany({ urlBase, endpoint, data }) {
|
|
1034
|
-
const url = urlBase
|
|
1058
|
+
const url = this.buildUrl(urlBase, `${endpoint}/bulk`);
|
|
1035
1059
|
return this.http.post(url, data);
|
|
1036
1060
|
}
|
|
1037
1061
|
/**
|
|
@@ -1237,6 +1261,8 @@ class JIconsService {
|
|
|
1237
1261
|
sun: Sun,
|
|
1238
1262
|
moon: Moon,
|
|
1239
1263
|
loading: Loader2,
|
|
1264
|
+
table: Table,
|
|
1265
|
+
listFilter: ListFilter,
|
|
1240
1266
|
firstPage: ChevronsLeft,
|
|
1241
1267
|
prevPage: ChevronLeft,
|
|
1242
1268
|
nextPage: ChevronRight,
|