tailjng 0.0.36 → 0.0.37
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/component-manager.js +79 -55
- package/cli/dependency-manager.js +43 -26
- package/cli/settings/header-generator.js +1 -1
- package/fesm2022/tailjng.mjs +2 -1
- package/fesm2022/tailjng.mjs.map +1 -1
- package/lib/services/http/error-handler-http.service.d.ts +1 -1
- package/lib/services/static/icons.service.d.ts +1 -0
- package/package.json +2 -2
- package/src/lib/components/badge/badge.component.html +6 -6
- package/src/lib/components/badge/badge.component.ts +11 -16
- package/src/lib/components/image/image-viewer/viewer-image.component.html +32 -24
- package/src/lib/components/image/image-viewer/viewer-image.component.ts +50 -4
- package/src/lib/components/input/input-textarea/textarea-input.component.html +1 -1
- package/src/lib/components/select/select-multi-table/multi-table-select.component.html +61 -94
- package/src/lib/components/select/select-multi-table/multi-table-select.component.ts +112 -314
package/cli/component-manager.js
CHANGED
|
@@ -1,71 +1,95 @@
|
|
|
1
1
|
// component-manager.js
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const {
|
|
6
|
-
const { installDependencies } = require("./dependency-manager")
|
|
7
|
-
const { COLORS } = require("./settings/colors")
|
|
3
|
+
const { copyComponentFiles } = require("./file-operations");
|
|
4
|
+
const { installDependencies } = require("./dependency-manager");
|
|
5
|
+
const { COLORS } = require("./settings/colors");
|
|
8
6
|
|
|
7
|
+
// Registro global para evitar re-instalaciones duplicadas
|
|
8
|
+
const installedComponentsGlobal = new Set();
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Instala un componente individual y sus dependencias.
|
|
12
|
+
*/
|
|
9
13
|
async function addComponent(componentName, componentList) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const componentData = componentList[componentName];
|
|
15
|
+
if (!componentData) {
|
|
16
|
+
console.error(
|
|
17
|
+
`${COLORS.red}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.red}ERROR: Component ${COLORS.bright}"${componentName}"${COLORS.reset} ${COLORS.red}not found in the component list.${COLORS.reset}`
|
|
18
|
+
);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
console.log(
|
|
23
|
+
`${COLORS.blue}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.blue}Adding component: ${COLORS.bright}"${componentName}"${COLORS.reset}`
|
|
24
|
+
);
|
|
19
25
|
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
// Instalar dependencias primero
|
|
27
|
+
await installDependencies(componentData.dependencies, componentList, installedComponentsGlobal);
|
|
22
28
|
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
// Si el componente principal ya fue procesado (como dependencia), saltarlo
|
|
30
|
+
if (installedComponentsGlobal.has(componentName)) {
|
|
31
|
+
console.log(
|
|
32
|
+
`${COLORS.dim}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.dim}Main component ${COLORS.bright}"${componentName}"${COLORS.reset} ${COLORS.dim}was already processed as a dependency.${COLORS.reset}`
|
|
33
|
+
);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
25
36
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
// Copy the main component files to the project
|
|
29
|
-
const wasInstalled = await copyComponentFiles(componentName, componentData.path, false)
|
|
37
|
+
// Copiar los archivos del componente principal
|
|
38
|
+
const wasInstalled = await copyComponentFiles(componentName, componentData.path, false);
|
|
30
39
|
|
|
31
|
-
|
|
32
|
-
console.log(
|
|
33
|
-
`${COLORS.greenBright}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.greenBright}✔ Component ${COLORS.bright}"${componentName}"${COLORS.reset} ${COLORS.greenBright}installed successfully.${COLORS.reset}`,
|
|
34
|
-
)
|
|
35
|
-
} else {
|
|
36
|
-
console.log(
|
|
37
|
-
`${COLORS.yellow}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.yellow}Component ${COLORS.bright}"${componentName}"${COLORS.reset} ${COLORS.yellow}installation was cancelled by user.${COLORS.reset}`,
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
} else {
|
|
41
|
-
console.log(
|
|
42
|
-
`${COLORS.dim}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.dim}Main component ${COLORS.bright}"${componentName}"${COLORS.reset} ${COLORS.dim}was already processed as a dependency.${COLORS.reset}`,
|
|
43
|
-
)
|
|
44
|
-
}
|
|
45
|
-
}
|
|
40
|
+
installedComponentsGlobal.add(componentName); // lo marcamos como instalado
|
|
46
41
|
|
|
42
|
+
if (wasInstalled) {
|
|
43
|
+
console.log(
|
|
44
|
+
`${COLORS.greenBright}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.greenBright}✔ Component ${COLORS.bright}"${componentName}"${COLORS.reset} ${COLORS.greenBright}installed successfully.${COLORS.reset}`
|
|
45
|
+
);
|
|
46
|
+
} else {
|
|
47
|
+
console.log(
|
|
48
|
+
`${COLORS.yellow}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.yellow}Component ${COLORS.bright}"${componentName}"${COLORS.reset} ${COLORS.yellow}installation was cancelled by user.${COLORS.reset}`
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
47
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Instala todos los componentes disponibles en la lista.
|
|
55
|
+
*/
|
|
48
56
|
async function installAllComponents(componentList) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
console.log(
|
|
58
|
+
`${COLORS.blue}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.blue}Installing all components...${COLORS.reset}`
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
for (const componentName of Object.keys(componentList)) {
|
|
62
|
+
const componentData = componentList[componentName];
|
|
63
|
+
|
|
64
|
+
// Evita duplicados
|
|
65
|
+
if (installedComponentsGlobal.has(componentName)) {
|
|
66
|
+
console.log(
|
|
67
|
+
`${COLORS.dim}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.dim}Skipping already installed: ${COLORS.bright}"${componentName}"${COLORS.reset}`
|
|
68
|
+
);
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Instalar dependencias
|
|
73
|
+
await installDependencies(componentData.dependencies, componentList, installedComponentsGlobal);
|
|
74
|
+
|
|
75
|
+
// Instalar el componente principal
|
|
76
|
+
const wasInstalled = await copyComponentFiles(componentName, componentData.path, false);
|
|
77
|
+
installedComponentsGlobal.add(componentName);
|
|
78
|
+
|
|
79
|
+
if (wasInstalled) {
|
|
80
|
+
console.log(
|
|
81
|
+
`${COLORS.greenBright}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.greenBright}✔ Component ${COLORS.bright}"${componentName}"${COLORS.reset} ${COLORS.greenBright}installed successfully.${COLORS.reset}`
|
|
82
|
+
);
|
|
83
|
+
} else {
|
|
84
|
+
console.log(
|
|
85
|
+
`${COLORS.yellow}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.yellow}Component ${COLORS.bright}"${componentName}"${COLORS.reset} ${COLORS.yellow}installation was skipped by user.${COLORS.reset}`
|
|
86
|
+
);
|
|
66
87
|
}
|
|
88
|
+
}
|
|
67
89
|
|
|
68
|
-
|
|
90
|
+
console.log(
|
|
91
|
+
`${COLORS.greenBright}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.greenBright}✔ All components processed.${COLORS.reset}`
|
|
92
|
+
);
|
|
69
93
|
}
|
|
70
94
|
|
|
71
|
-
module.exports = { addComponent, installAllComponents }
|
|
95
|
+
module.exports = { addComponent, installAllComponents };
|
|
@@ -1,54 +1,71 @@
|
|
|
1
1
|
// dependency-manager.js
|
|
2
|
+
const { copyComponentFiles } = require("./file-operations");
|
|
3
|
+
const { COLORS } = require("./settings/colors");
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Instala recursivamente dependencias de componentes,
|
|
7
|
+
* evitando re-instalar o re-actualizar los mismos componentes.
|
|
8
|
+
*/
|
|
6
9
|
async function installDependencies(dependencies = [], componentList, installedComponents = new Set()) {
|
|
7
|
-
if (dependencies.length === 0) {
|
|
8
|
-
console.log(
|
|
9
|
-
|
|
10
|
+
if (!dependencies || dependencies.length === 0) {
|
|
11
|
+
console.log(
|
|
12
|
+
`${COLORS.dim}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.dim}No dependencies to install.${COLORS.reset}`
|
|
13
|
+
);
|
|
14
|
+
return;
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
for (const dep of dependencies) {
|
|
13
|
-
//
|
|
18
|
+
// Evita duplicados y bucles
|
|
14
19
|
if (installedComponents.has(dep)) {
|
|
15
|
-
console.log(
|
|
16
|
-
|
|
20
|
+
console.log(
|
|
21
|
+
`${COLORS.dim}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.dim}Component ${COLORS.bright}"${dep}"${COLORS.reset} ${COLORS.dim}already processed, skipping.${COLORS.reset}`
|
|
22
|
+
);
|
|
23
|
+
continue;
|
|
17
24
|
}
|
|
18
25
|
|
|
19
|
-
const depComponentData = componentList[dep]
|
|
26
|
+
const depComponentData = componentList[dep];
|
|
20
27
|
if (!depComponentData) {
|
|
21
28
|
console.error(
|
|
22
|
-
`${COLORS.red}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.red}ERROR: Dependency component ${COLORS.bright}"${dep}"
|
|
23
|
-
)
|
|
24
|
-
process.exit(1)
|
|
29
|
+
`${COLORS.red}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.red}ERROR: Dependency component ${COLORS.bright}"${dep}"${COLORS.red} not found in the component list.${COLORS.reset}`
|
|
30
|
+
);
|
|
31
|
+
process.exit(1);
|
|
25
32
|
}
|
|
26
33
|
|
|
27
|
-
|
|
34
|
+
// Marca como instalado antes de procesarlo (previene loops circulares)
|
|
35
|
+
installedComponents.add(dep);
|
|
28
36
|
|
|
29
|
-
|
|
30
|
-
|
|
37
|
+
console.log(
|
|
38
|
+
`${COLORS.magenta}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.magenta}Installing dependency: ${COLORS.bright}"${dep}"${COLORS.reset}`
|
|
39
|
+
);
|
|
31
40
|
|
|
32
|
-
//
|
|
41
|
+
// Instalar dependencias internas del dependency
|
|
33
42
|
if (depComponentData.dependencies && depComponentData.dependencies.length > 0) {
|
|
34
|
-
await installDependencies(depComponentData.dependencies, componentList, installedComponents)
|
|
43
|
+
await installDependencies(depComponentData.dependencies, componentList, installedComponents);
|
|
35
44
|
}
|
|
36
45
|
|
|
37
|
-
//
|
|
46
|
+
// Copiar los archivos del componente
|
|
38
47
|
try {
|
|
39
|
-
const wasInstalled = await copyComponentFiles(dep, depComponentData.path, true)
|
|
48
|
+
const wasInstalled = await copyComponentFiles(dep, depComponentData.path, true);
|
|
40
49
|
|
|
41
50
|
if (wasInstalled) {
|
|
42
|
-
console.log(
|
|
51
|
+
console.log(
|
|
52
|
+
`${COLORS.green}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.green}Successfully installed dependency: ${COLORS.bright}"${dep}"${COLORS.reset}`
|
|
53
|
+
);
|
|
43
54
|
} else {
|
|
44
|
-
console.log(
|
|
55
|
+
console.log(
|
|
56
|
+
`${COLORS.dim}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.dim}Dependency ${COLORS.bright}"${dep}"${COLORS.reset} ${COLORS.dim}was skipped by user choice.${COLORS.reset}`
|
|
57
|
+
);
|
|
45
58
|
}
|
|
46
59
|
} catch (err) {
|
|
47
|
-
console.error(
|
|
48
|
-
|
|
49
|
-
|
|
60
|
+
console.error(
|
|
61
|
+
`${COLORS.red}${COLORS.bright}[tailjng CLI]${COLORS.reset} ${COLORS.red}Failed to install dependency: ${COLORS.bright}"${dep}"${COLORS.reset}`
|
|
62
|
+
);
|
|
63
|
+
console.error(`${COLORS.red}Error details:${COLORS.reset}`, err);
|
|
64
|
+
process.exit(1);
|
|
50
65
|
}
|
|
51
66
|
}
|
|
67
|
+
|
|
68
|
+
return installedComponents;
|
|
52
69
|
}
|
|
53
70
|
|
|
54
|
-
module.exports = { installDependencies }
|
|
71
|
+
module.exports = { installDependencies };
|
package/fesm2022/tailjng.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { es } from 'date-fns/locale';
|
|
|
6
6
|
import { map, isObservable, firstValueFrom, forkJoin } from 'rxjs';
|
|
7
7
|
import * as i1$1 from '@angular/common/http';
|
|
8
8
|
import { HttpParams } from '@angular/common/http';
|
|
9
|
-
import { Clock, Calendar, EllipsisVertical, Trash, Edit, Pencil, PencilLine, ListRestart, FileUp, 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 { 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';
|
|
10
10
|
import * as FileSaver from 'file-saver';
|
|
11
11
|
import * as ExcelJS from 'exceljs';
|
|
12
12
|
import * as XLSX from 'xlsx';
|
|
@@ -1070,6 +1070,7 @@ class JIconsService {
|
|
|
1070
1070
|
default: Cpu,
|
|
1071
1071
|
fileSpreadsheet: FileSpreadsheet,
|
|
1072
1072
|
monitorUp: MonitorUp,
|
|
1073
|
+
download: Download,
|
|
1073
1074
|
fileUp: FileUp,
|
|
1074
1075
|
listRestart: ListRestart,
|
|
1075
1076
|
editRowLine: PencilLine,
|