@jvsoft/components 1.0.0-alpha.10 → 1.0.0-alpha.12

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/index.d.ts CHANGED
@@ -6,3 +6,4 @@ export * from './mat-suffix-search-button';
6
6
  export * from './menu';
7
7
  export * from './lista-arbol/public-api';
8
8
  export * from './filtro-busqueda';
9
+ export * from './alerta';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jvsoft/components",
3
- "version": "1.0.0-alpha.10",
3
+ "version": "1.0.0-alpha.12",
4
4
  "description": "JVSOFT Angular Components",
5
5
  "publishConfig": {
6
6
  "tag": "alpha",
@@ -12,30 +12,35 @@
12
12
  "@angular/forms": ">=16.0.0",
13
13
  "@angular/material": ">=16.0.0",
14
14
  "@jvsoft/utils": "workspace:*",
15
- "@ngneat/until-destroy": "^10.0.0",
16
- "moment": "^2.30.1",
17
- "shorthash2": "^1.0.5",
18
15
  "tailwindcss": "3",
19
16
  "xlsx": "^0.18.5"
20
17
  },
18
+ "dependencies": {
19
+ "tslib": "^2.3.0"
20
+ },
21
21
  "sideEffects": false,
22
22
  "exports": {
23
+ ".": {
24
+ "sass": "./src/styles/base.scss",
25
+ "default": "./fesm2022/jvsoft-components.mjs",
26
+ "types": "./index.d.ts"
27
+ },
28
+ "./tailwind": "./src/tailwind/index.js",
23
29
  "./base.scss": "./src/styles/base.scss",
24
- "./styles.css": "./src/styles/base-jvsoft-components.css",
25
30
  "./package.json": {
26
31
  "default": "./package.json"
27
32
  },
28
- ".": {
29
- "types": "./index.d.ts",
30
- "default": "./fesm2022/jvsoft-components.mjs"
33
+ "./alerta": {
34
+ "types": "./alerta/index.d.ts",
35
+ "default": "./fesm2022/jvsoft-components-alerta.mjs"
31
36
  },
32
37
  "./dialog-flotante": {
33
38
  "types": "./dialog-flotante/index.d.ts",
34
39
  "default": "./fesm2022/jvsoft-components-dialog-flotante.mjs"
35
40
  },
36
- "./filtro-busqueda": {
37
- "types": "./filtro-busqueda/index.d.ts",
38
- "default": "./fesm2022/jvsoft-components-filtro-busqueda.mjs"
41
+ "./lista-arbol": {
42
+ "types": "./lista-arbol/index.d.ts",
43
+ "default": "./fesm2022/jvsoft-components-lista-arbol.mjs"
39
44
  },
40
45
  "./luces-navidad": {
41
46
  "types": "./luces-navidad/index.d.ts",
@@ -45,14 +50,14 @@
45
50
  "types": "./mat-suffix-search-button/index.d.ts",
46
51
  "default": "./fesm2022/jvsoft-components-mat-suffix-search-button.mjs"
47
52
  },
53
+ "./filtro-busqueda": {
54
+ "types": "./filtro-busqueda/index.d.ts",
55
+ "default": "./fesm2022/jvsoft-components-filtro-busqueda.mjs"
56
+ },
48
57
  "./menu": {
49
58
  "types": "./menu/index.d.ts",
50
59
  "default": "./fesm2022/jvsoft-components-menu.mjs"
51
60
  },
52
- "./lista-arbol": {
53
- "types": "./lista-arbol/index.d.ts",
54
- "default": "./fesm2022/jvsoft-components-lista-arbol.mjs"
55
- },
56
61
  "./tabla-mantenimiento": {
57
62
  "types": "./tabla-mantenimiento/index.d.ts",
58
63
  "default": "./fesm2022/jvsoft-components-tabla-mantenimiento.mjs"
@@ -63,8 +68,5 @@
63
68
  }
64
69
  },
65
70
  "module": "fesm2022/jvsoft-components.mjs",
66
- "typings": "index.d.ts",
67
- "dependencies": {
68
- "tslib": "^2.3.0"
69
- }
71
+ "typings": "index.d.ts"
70
72
  }
@@ -1,10 +1,7 @@
1
- @use "tailwind.scss";
2
- /*@use "components/index.scss";*/
3
-
4
-
5
-
6
- @use "../../../components/tabla-mantenimiento/tabla-mantenimiento.component";
7
- @use "../../../components/dialog-flotante/dialog-flotante.component";
8
- @use "../../../components/filtro-busqueda/filtro-busqueda.component";
9
-
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
10
4
 
5
+ @import "../../../components/tabla-mantenimiento/tabla-mantenimiento.component";
6
+ @import "../../../components/dialog-flotante/dialog-flotante.component";
7
+ @import "../../../components/filtro-busqueda/filtro-busqueda.component";
@@ -0,0 +1,66 @@
1
+ module.exports = {
2
+ current: 'currentColor',
3
+ transparent: 'transparent',
4
+
5
+ 'contrast-black': 'black',
6
+ 'contrast-white': 'white',
7
+
8
+ gray: {
9
+ light: 'rgba(158, 158, 158, 0.1)',
10
+ DEFAULT: 'rgb(158, 158, 158)',
11
+ },
12
+ red: {
13
+ light: 'rgba(244, 67, 54, 0.1)',
14
+ DEFAULT: 'rgb(244, 67, 54)',
15
+ },
16
+ orange: {
17
+ light: 'rgba(255, 152, 0, 0.1)',
18
+ DEFAULT: 'rgb(255, 152, 0)',
19
+ },
20
+ 'deep-orange': {
21
+ light: 'rgba(255, 87, 34, 0.1)',
22
+ DEFAULT: 'rgb(255, 87, 34)',
23
+ },
24
+ amber: {
25
+ light: 'rgba(255, 193, 7, 0.1)',
26
+ DEFAULT: 'rgb(255, 193, 7)',
27
+ },
28
+ green: {
29
+ light: 'rgba(76, 175, 80, 0.1)',
30
+ DEFAULT: 'rgb(76, 175, 80)',
31
+ },
32
+ teal: {
33
+ light: 'rgba(0, 150, 136, 0.1)',
34
+ DEFAULT: 'rgb(0, 150, 136)',
35
+ },
36
+ cyan: {
37
+ light: 'rgba(0, 188, 212, 0.1)',
38
+ DEFAULT: 'rgb(0, 188, 212)',
39
+ },
40
+ purple: {
41
+ light: 'rgba(156, 39, 176, 0.1)',
42
+ DEFAULT: 'rgb(156, 39, 176)',
43
+ },
44
+ 'deep-purple': {
45
+ light: 'rgba(103, 58, 183, 0.1)',
46
+ DEFAULT: 'rgb(103, 58, 183)',
47
+ },
48
+ pink: {
49
+ light: 'rgba(233, 30, 99, 0.1)',
50
+ DEFAULT: 'rgb(233, 30, 99)',
51
+ },
52
+ pdf: {
53
+ light: 'rgba(179,11,0, 0.1)',
54
+ DEFAULT: 'rgb(179,11,0)',
55
+ "100": 'rgba(179,11,0, 0.1)',
56
+ "700": 'rgb(179,11,0)',
57
+ "900": 'rgb(121,9,0)',
58
+ },
59
+ excel: {
60
+ light: 'rgba(30, 110, 66, 0.1)',
61
+ DEFAULT: 'rgb(30 110 66)',
62
+ "100": 'rgba(30, 110, 66, 0.1)',
63
+ "700": 'rgb(30 110 66)',
64
+ "900": 'rgb(17,75,44)',
65
+ }
66
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * JVSoft Tailwind Plugins
3
+ * -----------------------
4
+ * Punto de entrada para todos los plugins personalizados de Tailwind.
5
+ * Esto permite a los consumidores importar todos los plugins con un solo require.
6
+ */
7
+ module.exports = [
8
+ require('./plugins/jvs-buttons'),
9
+ require('./plugins/jvs-grid'),
10
+ require('./plugins/jvs-icons'),
11
+ ];
@@ -0,0 +1,32 @@
1
+ const plugin = require('tailwindcss/plugin');
2
+
3
+ /**
4
+ * Plugin de Botones JVSoft
5
+ * -----------------------
6
+ * Define clases base para botones consistentes en toda la plataforma.
7
+ */
8
+ module.exports = plugin(function ({ addComponents, theme }) {
9
+ const colors = {
10
+ primary: theme('colors.primary.DEFAULT'),
11
+ accent: theme('colors.accent.DEFAULT'),
12
+ warn: theme('colors.warn.DEFAULT'),
13
+ };
14
+
15
+ addComponents({
16
+ '.jvs-button': {
17
+ '@apply inline-flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors duration-200': {},
18
+ '&:disabled': {
19
+ '@apply opacity-50 cursor-not-allowed': {},
20
+ }
21
+ },
22
+ '.jvs-button-primary': {
23
+ '@apply text-white bg-primary hover:bg-primary-dark focus:ring-primary': {},
24
+ },
25
+ '.jvs-button-accent': {
26
+ '@apply text-white bg-accent hover:bg-accent-dark focus:ring-accent': {},
27
+ },
28
+ '.jvs-button-warn': {
29
+ '@apply text-white bg-warn hover:bg-warn-dark focus:ring-warn': {},
30
+ }
31
+ });
32
+ });
@@ -0,0 +1,69 @@
1
+ const plugin = require('tailwindcss/plugin');
2
+
3
+ /**
4
+ * Plugin de Grid y Layout JVSoft
5
+ * ------------------------------
6
+ * Proporciona utilidades para el sistema de rejilla y espaciado de cabeceras.
7
+ */
8
+ module.exports = plugin(function ({ addComponents, theme }) {
9
+ const gutter = theme('spacing.gutter', '1rem');
10
+ const colors = {
11
+ primary: theme('colors.primary.DEFAULT'),
12
+ icon: 'rgba(0, 0, 0, 0.54)',
13
+ };
14
+
15
+ addComponents({
16
+ '.jvs-grid-title': {
17
+ '@apply flex items-center gap-2 text-lg font-bold py-3 px-4 border-b border-gray-100 mb-4': {},
18
+ 'mat-icon': {
19
+ color: colors.icon,
20
+ },
21
+ '&.jvs-grid-title-primary': {
22
+ color: colors.primary,
23
+ 'mat-icon': {
24
+ color: colors.primary,
25
+ }
26
+ }
27
+ }
28
+ });
29
+
30
+ // --- Generación Automática de Columnas (1-12) ---
31
+ const numericColumns = {};
32
+ for (let i = 1; i <= 12; i++) {
33
+ numericColumns[`.jvs-col-${i}`] = {
34
+ flexBasis: `${(i / 12) * 100}%`,
35
+ maxWidth: `${(i / 12) * 100}%`,
36
+ paddingLeft: gutter,
37
+ paddingRight: gutter,
38
+ };
39
+ }
40
+ addComponents(numericColumns);
41
+
42
+ // --- Generación Automática de Fracciones ---
43
+ const fractions = {
44
+ '1/2': '50%',
45
+ '1/3': '33.333333%',
46
+ '2/3': '66.666667%',
47
+ '1/4': '25%',
48
+ '2/4': '50%',
49
+ '3/4': '75%',
50
+ '1/5': '20%',
51
+ '2/5': '40%',
52
+ '3/5': '60%',
53
+ '4/5': '80%',
54
+ '1/6': '16.666667%',
55
+ '5/6': '83.333333%',
56
+ };
57
+
58
+ const fractionalColumns = {};
59
+ Object.entries(fractions).forEach(([key, value]) => {
60
+ fractionalColumns[`.jvs-col-${key.replace('/', '\\/')}`] = {
61
+ flexBasis: value,
62
+ maxWidth: value,
63
+ paddingLeft: gutter,
64
+ paddingRight: gutter,
65
+ };
66
+ });
67
+ addComponents(fractionalColumns);
68
+
69
+ });
@@ -0,0 +1,36 @@
1
+ const plugin = require('tailwindcss/plugin');
2
+
3
+ /**
4
+ * Plugin de Iconos JVSoft
5
+ * -----------------------
6
+ * Genera utilidades de tamaño para mat-icon y SVG.
7
+ * Centraliza las dimensiones para evitar redundancia.
8
+ */
9
+ module.exports = plugin(function ({ addUtilities }) {
10
+ const iconSizes = {
11
+ '3xs': '0.5rem',
12
+ '2xs': '0.75rem',
13
+ 'xs': '1rem',
14
+ 'sm': '1.25rem',
15
+ 'base': '1.5rem',
16
+ 'lg': '1.75rem',
17
+ 'xl': '2rem',
18
+ '2xl': '2.25rem',
19
+ '3xl': '2.5rem',
20
+ '4xl': '2.75rem',
21
+ '5xl': '3rem',
22
+ };
23
+
24
+ const utilities = {};
25
+
26
+ Object.entries(iconSizes).forEach(([size, value]) => {
27
+ utilities[`.icon-${size}, .icon-${size} svg`] = {
28
+ 'font-size': value,
29
+ 'height': value,
30
+ 'width': value,
31
+ 'line-height': value,
32
+ };
33
+ });
34
+
35
+ addUtilities(utilities);
36
+ });
@@ -29,6 +29,7 @@ export declare class TablaMantenimientoComponent<T> implements OnInit, AfterCont
29
29
  readonly id: string;
30
30
  readonly router: Router;
31
31
  readonly route: ActivatedRoute;
32
+ private readonly destroyRef;
32
33
  get templateBotonesComunes(): BotonMantenimiento[];
33
34
  get templateColumnasTabla(): ColumnaTabla<any>[];
34
35
  dataSuscription: Observable<any> | undefined;