@xsmusices/ui 2.0.0-rc.1 → 2.0.1
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/fesm2022/xsmusices-ui-xs-map.xsstory-B0huSX4Q.mjs.map +1 -1
- package/fesm2022/xsmusices-ui.mjs +107 -15
- package/fesm2022/xsmusices-ui.mjs.map +1 -1
- package/index.d.ts +27 -14
- package/package.json +3 -4
- package/MIGRATION.md +0 -167
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xsmusices-ui-xs-map.xsstory-B0huSX4Q.mjs","sources":["../../../projects/xs-ui/src/lib/components/ui/map/xs-map.xsstory.ts"],"sourcesContent":["import { StoryMeta } from '../../../story.types';\nimport { XSMapComponent } from './xs-map.component';\nimport { XSMapInfoBlockComponent } from './info-block/xs-map-info-block.component';\n\nexport const story: StoryMeta = {\n id: 'map',\n name: 'Map',\n type: 'component',\n subtype: 'UI',\n status: 'active',\n usage: ['admin', 'app', 'monitor'],\n updated: '2026-02-17T11:00:00.000Z',\n created: '2026-01-15T08:15:50.647Z',\n description:\n 'Componente de mapa basado en Leaflet con soporte para Google Maps tiles, clusters de marcadores y soporte para modo oscuro.\\n\\nMultilenguaje: Sí — este componente dispone de traducciones por componente para textos del Info Block (ver carpeta i18n).',\n component: XSMapComponent,\n selector: 'xs-map',\n inputs: [\n {\n key: 'center',\n label: 'Centro (Lat, Lng)',\n type: 'json',\n default: [40.417244274063485, -3.7021285218467663],\n },\n {\n key: 'zoom',\n label: 'Zoom',\n type: 'number',\n default: 13,\n },\n {\n key: 'items',\n label: 'Marcadores',\n type: 'json',\n default: [\n {\n id: '1',\n lat: 40.417244274063485,\n lng: -3.7021285218467663,\n title: 'Puerta del Sol',\n image: 'https://via.placeholder.com/150',\n data: { type: 'landmark' },\n },\n ],\n },\n {\n key: 'draggable',\n label: 'Marcadores Arrastrables',\n type: 'boolean',\n default: false,\n },\n {\n key: 'isDarkMode',\n label: 'Modo Oscuro',\n type: 'boolean',\n default: true,\n },\n {\n key: 'style',\n label: 'Estilo (CSS)',\n type: 'text',\n default: 'height: 400px;',\n },\n {\n key: 'isSingle',\n label: 'Modo Single (Perfiles)',\n type: 'boolean',\n default: false,\n },\n {\n key: 'tileUrl',\n label: 'Tiles personalizados (URL Leaflet)',\n type: 'text',\n default: '',\n },\n ],\n examples: [\n {\n name: 'Madrid Centro',\n description:\n 'Vista básica con un marcador en la Puerta del Sol. Usa tiles de OpenStreetMap (sin clave) porque el proveedor por defecto (CARTO dark) exige API key.',\n inputs: {\n center: [40.41701, -3.70344],\n zoom: 16,\n tileUrl: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',\n items: [\n {\n id: 'sol',\n lat: 40.41701,\n lng: -3.70344,\n title: 'Puerta del Sol',\n image:\n 'https://dummyimage.com/100x100/18181b/ffffff&text=SOL',\n },\n ],\n },\n },\n {\n name: 'Clustering de Discotecas',\n description:\n 'Muchos marcadores en una misma zona que se agrupan automáticamente.',\n inputs: {\n center: [40.41, -3.7],\n zoom: 12,\n items: [\n {\n id: '1',\n lat: 40.41,\n lng: -3.7,\n title: 'Club 1',\n image:\n 'https://dummyimage.com/100x100/18181b/ffffff&text=C1',\n },\n { id: '2', lat: 40.412, lng: -3.702, title: 'Club 2' },\n { id: '3', lat: 40.415, lng: -3.701, title: 'Club 3' },\n { id: '4', lat: 40.408, lng: -3.698, title: 'Club 4' },\n { id: '5', lat: 40.418, lng: -3.705, title: 'Club 5' },\n { id: '6', lat: 40.411, lng: -3.708, title: 'Club 6' },\n { id: '7', lat: 40.414, lng: -3.703, title: 'Club 7' },\n { id: '8', lat: 40.405, lng: -3.695, title: 'Club 8' },\n { id: '9', lat: 40.42, lng: -3.71, title: 'Club 9' },\n {\n id: '10',\n lat: 40.413,\n lng: -3.697,\n title: 'Club 10',\n },\n ],\n },\n },\n {\n name: 'Localizador Draggable',\n description:\n 'Útil para formularios donde el usuario puede mover el pin para precisar una ubicación.',\n inputs: {\n center: [41.3851, 2.1734],\n zoom: 14,\n draggable: true,\n items: [\n {\n id: 'bcn',\n lat: 41.3851,\n lng: 2.1734,\n title: 'Barcelona (Mueveme)',\n },\n ],\n },\n },\n {\n name: 'Interactivo con Info Block',\n description:\n 'Mapa que utiliza el contenido proyectado para mostrar el XSMapInfoBlockComponent.',\n inputs: {\n center: [40.416, -3.703],\n zoom: 15,\n items: [\n {\n id: 'info',\n lat: 40.416,\n lng: -3.703,\n title: 'Teatro Kapital',\n data: {\n name: 'Teatro Kapital',\n site: { name: 'Teatro Kapital' },\n address: {\n street: 'Calle de Atocha, 125',\n town: 'Madrid',\n country: { name: 'España', code: 'es' },\n },\n eventsFuture: 3,\n },\n },\n ],\n projectedInputs: {\n item: null, // Se llenará desde el marcador seleccionado\n type: 'site',\n },\n },\n projectedComponent: XSMapInfoBlockComponent,\n template: `\n <xs-map [center]=\"[40.416, -3.703]\" [zoom]=\"15\" [items]=\"[...]\">\n <xs-map-info-block [item]=\"...\" type=\"site\">\n </xs-map-info-block>\n </xs-map>\n `,\n },\n {\n name: 'Clusters en múltiples regiones',\n description:\n 'Visualización de múltiples focos de marcadores que se agrupan por cercanía.',\n inputs: {\n center: [40.4167, -3.70325],\n zoom: 6,\n items: [\n { id: 'm1', lat: 40.41, lng: -3.7, title: 'Madrid 1' },\n {\n id: 'm2',\n lat: 40.42,\n lng: -3.71,\n title: 'Madrid 2',\n },\n {\n id: 'm3',\n lat: 40.415,\n lng: -3.69,\n title: 'Madrid 3',\n },\n { id: 'b1', lat: 41.38, lng: 2.17, title: 'BCN 1' },\n { id: 'b2', lat: 41.39, lng: 2.18, title: 'BCN 2' },\n { id: 'b3', lat: 41.4, lng: 2.16, title: 'BCN 3' },\n {\n id: 'v1',\n lat: 39.46,\n lng: -0.37,\n title: 'Valencia 1',\n },\n {\n id: 'v2',\n lat: 39.47,\n lng: -0.38,\n title: 'Valencia 2',\n },\n {\n id: 's1',\n lat: 37.38,\n lng: -5.98,\n title: 'Sevilla 1',\n },\n ],\n },\n },\n {\n name: 'Modo Claro (Fuerza Light Map)',\n description:\n 'Ejemplo de mapa con fondo claro forzado mediante el input isDarkMode.',\n inputs: {\n center: [40.4167, -3.70325],\n zoom: 13,\n isDarkMode: false,\n items: [\n {\n id: 'light',\n lat: 40.4167,\n lng: -3.70325,\n title: 'Modo Claro',\n },\n ],\n },\n },\n {\n name: 'Modo Single (Perfiles)',\n description:\n 'Desactiva pop-ups e interacciones para mapas en perfiles de artistas/locales.',\n inputs: {\n center: [40.416, -3.703],\n zoom: 16,\n isSingle: true,\n items: [\n {\n id: 'info',\n lat: 40.416,\n lng: -3.703,\n title: 'Teatro Kapital',\n data: {\n name: 'Teatro Kapital',\n site: { name: 'Teatro Kapital' },\n },\n },\n ],\n },\n },\n ],\n multilanguage: true,\n notes: [],\n coverage: {\n statements: 74,\n branches: 53,\n functions: 69,\n lines: 75,\n },\n};\n"],"names":[],"mappings":";;AAIO,MAAM,KAAK,GAAc;AAC9B,IAAA,EAAE,EAAE,KAAK;AACT,IAAA,IAAI,EAAE,KAAK;AACX,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC;AAClC,IAAA,OAAO,EAAE,0BAA0B;AACnC,IAAA,OAAO,EAAE,0BAA0B;AACnC,IAAA,WAAW,EACT,0PAA0P;AAC5P,IAAA,SAAS,EAAE,cAAc;AACzB,IAAA,QAAQ,EAAE,QAAQ;AAClB,IAAA,MAAM,EAAE;AACN,QAAA;AACE,YAAA,GAAG,EAAE,QAAQ;AACb,YAAA,KAAK,EAAE,mBAAmB;AAC1B,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,CAAC,kBAAkB,CAAC;AACnD,SAAA;AACD,QAAA;AACE,YAAA,GAAG,EAAE,MAAM;AACX,YAAA,KAAK,EA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O,CAAC;AAC3B,gBAAA,IAAI,EAAE,EAAE;AACR,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,EAAE,EAAE,OAAO;AACX,wBAAA,GAAG,EAAE,OAAO;wBACZ,GAAG,EAAE,CAAC,OAAO;AACb,wBAAA,KAAK,EAAE,YAAY;AACpB,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA;AACD,QAAA;AACE,YAAA,IAAI,EAAE,wBAAwB;AAC9B,YAAA,WAAW,EACT,+EAA+E;AACjF,YAAA,MAAM,EAAE;AACN,gBAAA,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC;AACxB,gBAAA,IAAI,EAAE,EAAE;AACR,gBAAA,QAAQ,EAAE,IAAI;AACd,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,EAAE,EAAE,MAAM;AACV,wBAAA,GAAG,EAAE,MAAM;wBACX,GAAG,EAAE,CAAC,KAAK;AACX,wBAAA,KAAK,EAAE,gBAAgB;AACvB,wBAAA,IAAI,EAAE;AACJ,4BAAA,IAAI,EAAE,gBAAgB;AACtB,4BAAA,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;AACjC,yBAAA;AACF,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,QAAQ,EAAE;AACR,QAAA,UAAU,EAAE,EAAE;AACd,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,SAAS,EAAE,EAAE;AACb,QAAA,KAAK,EAAE,EAAE;AACV,KAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"xsmusices-ui-xs-map.xsstory-B0huSX4Q.mjs","sources":["../../../projects/xs-ui/src/lib/components/ui/map/xs-map.xsstory.ts"],"sourcesContent":["import { StoryMeta } from '../../../story.types';\nimport { XSMapComponent } from './xs-map.component';\nimport { XSMapInfoBlockComponent } from './info-block/xs-map-info-block.component';\n\nexport const story: StoryMeta = {\n id: 'map',\n name: 'Map',\n type: 'component',\n subtype: 'UI',\n status: 'active',\n usage: ['admin', 'app', 'monitor'],\n updated: '2026-02-17T11:00:00.000Z',\n created: '2026-01-15T08:15:50.647Z',\n description:\n 'Componente de mapa basado en Leaflet con soporte para Google Maps tiles, clusters de marcadores y soporte para modo oscuro.\\n\\nMultilenguaje: Sí — este componente dispone de traducciones por componente para textos del Info Block (ver carpeta i18n).',\n component: XSMapComponent,\n selector: 'xs-map',\n inputs: [\n {\n key: 'center',\n label: 'Centro (Lat, Lng)',\n type: 'json',\n default: [40.417244274063485, -3.7021285218467663],\n },\n {\n key: 'zoom',\n label: 'Zoom',\n type: 'number',\n default: 13,\n },\n {\n key: 'items',\n label: 'Marcadores',\n type: 'json',\n default: [\n {\n id: '1',\n lat: 40.417244274063485,\n lng: -3.7021285218467663,\n title: 'Puerta del Sol',\n image: 'https://via.placeholder.com/150',\n data: { type: 'landmark' },\n },\n ],\n },\n {\n key: 'draggable',\n label: 'Marcadores Arrastrables',\n type: 'boolean',\n default: false,\n },\n {\n key: 'isDarkMode',\n label: 'Modo Oscuro',\n type: 'boolean',\n default: true,\n },\n {\n key: 'style',\n label: 'Estilo (CSS)',\n type: 'text',\n default: 'height: 400px;',\n },\n {\n key: 'isSingle',\n label: 'Modo Single (Perfiles)',\n type: 'boolean',\n default: false,\n },\n {\n key: 'tileUrl',\n label: 'Tiles personalizados (URL Leaflet)',\n type: 'text',\n default: '',\n },\n ],\n examples: [\n {\n name: 'Madrid Centro',\n description:\n 'Vista básica con un marcador en la Puerta del Sol. Usa tiles de OpenStreetMap (sin clave) porque el proveedor por defecto (CARTO dark) exige API key.',\n inputs: {\n center: [40.41701, -3.70344],\n zoom: 16,\n tileUrl:\n 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',\n items: [\n {\n id: 'sol',\n lat: 40.41701,\n lng: -3.70344,\n title: 'Puerta del Sol',\n image:\n 'https://dummyimage.com/100x100/18181b/ffffff&text=SOL',\n },\n ],\n },\n },\n {\n name: 'Clustering de Discotecas',\n description:\n 'Muchos marcadores en una misma zona que se agrupan automáticamente.',\n inputs: {\n center: [40.41, -3.7],\n zoom: 12,\n items: [\n {\n id: '1',\n lat: 40.41,\n lng: -3.7,\n title: 'Club 1',\n image:\n 'https://dummyimage.com/100x100/18181b/ffffff&text=C1',\n },\n { id: '2', lat: 40.412, lng: -3.702, title: 'Club 2' },\n { id: '3', lat: 40.415, lng: -3.701, title: 'Club 3' },\n { id: '4', lat: 40.408, lng: -3.698, title: 'Club 4' },\n { id: '5', lat: 40.418, lng: -3.705, title: 'Club 5' },\n { id: '6', lat: 40.411, lng: -3.708, title: 'Club 6' },\n { id: '7', lat: 40.414, lng: -3.703, title: 'Club 7' },\n { id: '8', lat: 40.405, lng: -3.695, title: 'Club 8' },\n { id: '9', lat: 40.42, lng: -3.71, title: 'Club 9' },\n {\n id: '10',\n lat: 40.413,\n lng: -3.697,\n title: 'Club 10',\n },\n ],\n },\n },\n {\n name: 'Localizador Draggable',\n description:\n 'Útil para formularios donde el usuario puede mover el pin para precisar una ubicación.',\n inputs: {\n center: [41.3851, 2.1734],\n zoom: 14,\n draggable: true,\n items: [\n {\n id: 'bcn',\n lat: 41.3851,\n lng: 2.1734,\n title: 'Barcelona (Mueveme)',\n },\n ],\n },\n },\n {\n name: 'Interactivo con Info Block',\n description:\n 'Mapa que utiliza el contenido proyectado para mostrar el XSMapInfoBlockComponent.',\n inputs: {\n center: [40.416, -3.703],\n zoom: 15,\n items: [\n {\n id: 'info',\n lat: 40.416,\n lng: -3.703,\n title: 'Teatro Kapital',\n data: {\n name: 'Teatro Kapital',\n site: { name: 'Teatro Kapital' },\n address: {\n street: 'Calle de Atocha, 125',\n town: 'Madrid',\n country: { name: 'España', code: 'es' },\n },\n eventsFuture: 3,\n },\n },\n ],\n projectedInputs: {\n item: null, // Se llenará desde el marcador seleccionado\n type: 'site',\n },\n },\n projectedComponent: XSMapInfoBlockComponent,\n template: `\n <xs-map [center]=\"[40.416, -3.703]\" [zoom]=\"15\" [items]=\"[...]\">\n <xs-map-info-block [item]=\"...\" type=\"site\">\n </xs-map-info-block>\n </xs-map>\n `,\n },\n {\n name: 'Clusters en múltiples regiones',\n description:\n 'Visualización de múltiples focos de marcadores que se agrupan por cercanía.',\n inputs: {\n center: [40.4167, -3.70325],\n zoom: 6,\n items: [\n { id: 'm1', lat: 40.41, lng: -3.7, title: 'Madrid 1' },\n {\n id: 'm2',\n lat: 40.42,\n lng: -3.71,\n title: 'Madrid 2',\n },\n {\n id: 'm3',\n lat: 40.415,\n lng: -3.69,\n title: 'Madrid 3',\n },\n { id: 'b1', lat: 41.38, lng: 2.17, title: 'BCN 1' },\n { id: 'b2', lat: 41.39, lng: 2.18, title: 'BCN 2' },\n { id: 'b3', lat: 41.4, lng: 2.16, title: 'BCN 3' },\n {\n id: 'v1',\n lat: 39.46,\n lng: -0.37,\n title: 'Valencia 1',\n },\n {\n id: 'v2',\n lat: 39.47,\n lng: -0.38,\n title: 'Valencia 2',\n },\n {\n id: 's1',\n lat: 37.38,\n lng: -5.98,\n title: 'Sevilla 1',\n },\n ],\n },\n },\n {\n name: 'Modo Claro (Fuerza Light Map)',\n description:\n 'Ejemplo de mapa con fondo claro forzado mediante el input isDarkMode.',\n inputs: {\n center: [40.4167, -3.70325],\n zoom: 13,\n isDarkMode: false,\n items: [\n {\n id: 'light',\n lat: 40.4167,\n lng: -3.70325,\n title: 'Modo Claro',\n },\n ],\n },\n },\n {\n name: 'Modo Single (Perfiles)',\n description:\n 'Desactiva pop-ups e interacciones para mapas en perfiles de artistas/locales.',\n inputs: {\n center: [40.416, -3.703],\n zoom: 16,\n isSingle: true,\n items: [\n {\n id: 'info',\n lat: 40.416,\n lng: -3.703,\n title: 'Teatro Kapital',\n data: {\n name: 'Teatro Kapital',\n site: { name: 'Teatro Kapital' },\n },\n },\n ],\n },\n },\n ],\n multilan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Q,EAAE,IAAI;AACd,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,EAAE,EAAE,MAAM;AACV,wBAAA,GAAG,EAAE,MAAM;wBACX,GAAG,EAAE,CAAC,KAAK;AACX,wBAAA,KAAK,EAAE,gBAAgB;AACvB,wBAAA,IAAI,EAAE;AACJ,4BAAA,IAAI,EAAE,gBAAgB;AACtB,4BAAA,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;AACjC,yBAAA;AACF,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,QAAQ,EAAE;AACR,QAAA,UAAU,EAAE,EAAE;AACd,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,SAAS,EAAE,EAAE;AACb,QAAA,KAAK,EAAE,EAAE;AACV,KAAA;;;;;"}
|
|
@@ -7104,7 +7104,12 @@ var UPLOAD_IMAGE$1 = {
|
|
|
7104
7104
|
HINT: "JPG, PNG o GIF. Haz clic aquí para elegir.",
|
|
7105
7105
|
SELECT_BUTTON: "Seleccionar",
|
|
7106
7106
|
CHANGE_BUTTON: "Cambiar",
|
|
7107
|
-
REMOVE_BUTTON: "Borrar"
|
|
7107
|
+
REMOVE_BUTTON: "Borrar",
|
|
7108
|
+
MODE_FILE: "Archivo",
|
|
7109
|
+
MODE_URL: "URL",
|
|
7110
|
+
URL_PLACEHOLDER: "Pega la URL de la imagen (https://…)",
|
|
7111
|
+
URL_APPLY: "Aplicar",
|
|
7112
|
+
URL_INVALID: "La URL no es válida. Debe empezar por http:// o https://"
|
|
7108
7113
|
};
|
|
7109
7114
|
var es$n = {
|
|
7110
7115
|
UPLOAD_IMAGE: UPLOAD_IMAGE$1
|
|
@@ -7115,7 +7120,12 @@ var UPLOAD_IMAGE = {
|
|
|
7115
7120
|
HINT: "JPG, PNG or GIF. Click here to choose.",
|
|
7116
7121
|
SELECT_BUTTON: "Select",
|
|
7117
7122
|
CHANGE_BUTTON: "Change",
|
|
7118
|
-
REMOVE_BUTTON: "Delete"
|
|
7123
|
+
REMOVE_BUTTON: "Delete",
|
|
7124
|
+
MODE_FILE: "File",
|
|
7125
|
+
MODE_URL: "URL",
|
|
7126
|
+
URL_PLACEHOLDER: "Paste the image URL (https://…)",
|
|
7127
|
+
URL_APPLY: "Apply",
|
|
7128
|
+
URL_INVALID: "Invalid URL. It must start with http:// or https://"
|
|
7119
7129
|
};
|
|
7120
7130
|
var en$n = {
|
|
7121
7131
|
UPLOAD_IMAGE: UPLOAD_IMAGE
|
|
@@ -7125,6 +7135,9 @@ class XSFormlyUploadImageComponent extends XSFormlyBaseComponent {
|
|
|
7125
7135
|
fileInput = viewChild('fileInput', ...(ngDevMode ? [{ debugName: "fileInput" }] : []));
|
|
7126
7136
|
previewUrl;
|
|
7127
7137
|
isDragging = false;
|
|
7138
|
+
mode = 'file';
|
|
7139
|
+
urlInput = '';
|
|
7140
|
+
urlError = '';
|
|
7128
7141
|
valueChangesSub = new Subscription();
|
|
7129
7142
|
translateService = inject(XSTranslateService);
|
|
7130
7143
|
changeDetectorRef = inject(ChangeDetectorRef);
|
|
@@ -7148,6 +7161,21 @@ class XSFormlyUploadImageComponent extends XSFormlyBaseComponent {
|
|
|
7148
7161
|
get removeButtonLabel() {
|
|
7149
7162
|
return this.xsTranslateService.translate('UPLOAD_IMAGE.REMOVE_BUTTON');
|
|
7150
7163
|
}
|
|
7164
|
+
get modeFileLabel() {
|
|
7165
|
+
return this.xsTranslateService.translate('UPLOAD_IMAGE.MODE_FILE');
|
|
7166
|
+
}
|
|
7167
|
+
get modeUrlLabel() {
|
|
7168
|
+
return this.xsTranslateService.translate('UPLOAD_IMAGE.MODE_URL');
|
|
7169
|
+
}
|
|
7170
|
+
get urlPlaceholder() {
|
|
7171
|
+
return this.xsTranslateService.translate('UPLOAD_IMAGE.URL_PLACEHOLDER');
|
|
7172
|
+
}
|
|
7173
|
+
get urlApplyLabel() {
|
|
7174
|
+
return this.xsTranslateService.translate('UPLOAD_IMAGE.URL_APPLY');
|
|
7175
|
+
}
|
|
7176
|
+
get urlInvalidMessage() {
|
|
7177
|
+
return this.xsTranslateService.translate('UPLOAD_IMAGE.URL_INVALID');
|
|
7178
|
+
}
|
|
7151
7179
|
get isFieldDisabled() {
|
|
7152
7180
|
return !!this.props['disabled'] || !!this.control?.disabled;
|
|
7153
7181
|
}
|
|
@@ -7156,6 +7184,7 @@ class XSFormlyUploadImageComponent extends XSFormlyBaseComponent {
|
|
|
7156
7184
|
const initial = this.control.value;
|
|
7157
7185
|
if (initial) {
|
|
7158
7186
|
this.syncPreview(initial);
|
|
7187
|
+
this.syncMode(initial);
|
|
7159
7188
|
}
|
|
7160
7189
|
else if (this.props?.['currentImageUrl']) {
|
|
7161
7190
|
this.previewUrl = this.props['currentImageUrl'];
|
|
@@ -7164,6 +7193,7 @@ class XSFormlyUploadImageComponent extends XSFormlyBaseComponent {
|
|
|
7164
7193
|
if (value instanceof File ||
|
|
7165
7194
|
(typeof value === 'string' && value)) {
|
|
7166
7195
|
this.syncPreview(value);
|
|
7196
|
+
this.syncMode(value);
|
|
7167
7197
|
}
|
|
7168
7198
|
else if (!value) {
|
|
7169
7199
|
this.revokeOldUrl();
|
|
@@ -7221,6 +7251,48 @@ class XSFormlyUploadImageComponent extends XSFormlyBaseComponent {
|
|
|
7221
7251
|
this.control.markAsTouched();
|
|
7222
7252
|
this.control.markAsDirty();
|
|
7223
7253
|
}
|
|
7254
|
+
isHttpUrl(value) {
|
|
7255
|
+
return /^https?:\/\/.+/i.test(value.trim());
|
|
7256
|
+
}
|
|
7257
|
+
syncMode(value) {
|
|
7258
|
+
if (typeof value === 'string' &&
|
|
7259
|
+
this.isHttpUrl(value) &&
|
|
7260
|
+
this.mode !== 'url') {
|
|
7261
|
+
this.mode = 'url';
|
|
7262
|
+
this.urlInput = value;
|
|
7263
|
+
}
|
|
7264
|
+
}
|
|
7265
|
+
setMode(mode) {
|
|
7266
|
+
if (this.isFieldDisabled)
|
|
7267
|
+
return;
|
|
7268
|
+
this.mode = mode;
|
|
7269
|
+
if (mode === 'url') {
|
|
7270
|
+
const current = this.control.value;
|
|
7271
|
+
if (typeof current === 'string' && current) {
|
|
7272
|
+
this.urlInput = current;
|
|
7273
|
+
}
|
|
7274
|
+
this.urlError = '';
|
|
7275
|
+
}
|
|
7276
|
+
this.changeDetectorRef.markForCheck();
|
|
7277
|
+
}
|
|
7278
|
+
onUrlInput(event) {
|
|
7279
|
+
const input = event.target;
|
|
7280
|
+
this.urlInput = input.value;
|
|
7281
|
+
}
|
|
7282
|
+
applyUrl() {
|
|
7283
|
+
if (this.isFieldDisabled)
|
|
7284
|
+
return;
|
|
7285
|
+
const url = this.urlInput.trim();
|
|
7286
|
+
if (!this.isHttpUrl(url)) {
|
|
7287
|
+
this.urlError = this.urlInvalidMessage;
|
|
7288
|
+
this.changeDetectorRef.markForCheck();
|
|
7289
|
+
return;
|
|
7290
|
+
}
|
|
7291
|
+
this.urlError = '';
|
|
7292
|
+
this.control.setValue(url);
|
|
7293
|
+
this.control.markAsTouched();
|
|
7294
|
+
this.control.markAsDirty();
|
|
7295
|
+
}
|
|
7224
7296
|
clearFile(event) {
|
|
7225
7297
|
event.preventDefault();
|
|
7226
7298
|
event.stopPropagation();
|
|
@@ -7228,9 +7300,13 @@ class XSFormlyUploadImageComponent extends XSFormlyBaseComponent {
|
|
|
7228
7300
|
return;
|
|
7229
7301
|
this.revokeOldUrl();
|
|
7230
7302
|
this.previewUrl = undefined;
|
|
7303
|
+
this.urlInput = '';
|
|
7304
|
+
this.urlError = '';
|
|
7231
7305
|
this.control.setValue(null);
|
|
7232
7306
|
this.control.markAsTouched();
|
|
7233
|
-
this.fileInput()
|
|
7307
|
+
const fileEl = this.fileInput()?.nativeElement;
|
|
7308
|
+
if (fileEl)
|
|
7309
|
+
fileEl.value = '';
|
|
7234
7310
|
}
|
|
7235
7311
|
revokeOldUrl() {
|
|
7236
7312
|
if (this.previewUrl && this.previewUrl.startsWith('blob:')) {
|
|
@@ -7243,7 +7319,7 @@ class XSFormlyUploadImageComponent extends XSFormlyBaseComponent {
|
|
|
7243
7319
|
this.revokeOldUrl();
|
|
7244
7320
|
}
|
|
7245
7321
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSFormlyUploadImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7246
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSFormlyUploadImageComponent, isStandalone: true, selector: "xs-formly-upload-image", viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"xs-uploader-container flex flex-col mb-4\"\n id=\"xs-upload-image-root-{{ id }}\"\n>\n <xs-formly-label\n [for]=\"'xs-upload-image-input-' + id\"\n [label]=\"translateLabel(props.label)\"\n [required]=\"props.required\"\n [infoText]=\"infoText\"\n [elementId]=\"'xs-upload-image-label-' + id\"\n />\n\n <div\n class=\"mt-2 relative h-52 w-full overflow-hidden rounded-xl bg-zinc-900/50 transition-all duration-300 hover:border-zinc-600\"\n [class.border-zinc-400]=\"isDragging\"\n id=\"xs-upload-image-dropzone-{{ id }}\"\n >\n <input\n #fileInput\n id=\"xs-upload-image-input-{{ id }}\"\n type=\"file\"\n accept=\"image/*\"\n (change)=\"onFileChange($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave) = \"isDragging = false\"\n (drop)=\"onDrop($event)\"\n [disabled]=\"isFieldDisabled\"\n [attr.aria-describedby]=\"errorMessage ? 'xs-upload-image-error-message-' + id : null\"\n class=\"absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0\"\n />\n\n <div\n class=\"absolute inset-0 z-20 pointer-events-none flex h-full w-full items-center justify-center\"\n id=\"xs-upload-image-preview-container-{{ id }}\"\n >\n @if (previewUrl) {\n <div\n class=\"relative h-full w-full pointer-events-auto\"\n id=\"xs-upload-image-preview-wrapper-{{ id }}\"\n >\n <xs-image\n [src]=\"previewUrl\"\n [customClass]=\"'h-full w-full object-cover transition-all duration-500 group-hover:scale-105'\"\n id=\"xs-upload-image-preview-image-{{ id }}\"\n ></xs-image>\n\n <div\n class=\"absolute inset-0 flex items-center justify-center gap-3 bg-black/60 opacity-0 backdrop-blur-[2px] transition-opacity duration-300 hover:opacity-100 focus-within:opacity-100\"\n >\n <button\n type=\"button\"\n (click)=\"openFilePicker()\"\n [disabled]=\"isFieldDisabled\"\n class=\"z-30 flex h-10 items-center px-4 rounded-full bg-white text-black text-xs font-bold shadow-2xl transition-all hover:scale-105 active:scale-95 pointer-events-auto\"\n id=\"xs-upload-image-change-button-{{ id }}\"\n >\n {{ changeButtonLabel }}\n </button>\n <button\n type=\"button\"\n (click)=\"clearFile($event)\"\n [disabled]=\"isFieldDisabled\"\n [attr.aria-label]=\"removeButtonLabel\"\n class=\"z-30 flex h-10 w-10 items-center justify-center rounded-full bg-red-600 text-white shadow-2xl transition-all hover:bg-red-500 hover:scale-110 active:scale-95 pointer-events-auto\"\n id=\"xs-upload-image-clear-button-{{ id }}\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n </div>\n </div>\n } @else {\n <div\n class=\"flex flex-col items-center gap-4\"\n id=\"xs-upload-image-empty-state-{{ id }}\"\n >\n <div\n class=\"flex h-14 w-14 items-center justify-center rounded-2xl bg-zinc-900 text-zinc-600 shadow-[inset_0_1px_1px_rgba(255,255,255,0.05)] transition-colors group-hover:text-zinc-400\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect\n width=\"18\"\n height=\"18\"\n x=\"3\"\n y=\"3\"\n rx=\"2\"\n ry=\"2\"\n />\n <circle cx=\"9\" cy=\"9\" r=\"2\" />\n <path\n d=\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\"\n />\n </svg>\n </div>\n <div class=\"text-center\">\n <p\n class=\"text-[11px] font-bold text-zinc-300 uppercase tracking-tight\"\n id=\"xs-upload-image-select-title-{{ id }}\"\n >\n {{ selectTitle }}\n </p>\n <p\n class=\"text-[9px] text-zinc-600 uppercase tracking-widest mt-1\"\n id=\"xs-upload-image-hint-text-{{ id }}\"\n >\n {{ hintText }}\n </p>\n </div>\n </div>\n }\n </div>\n </div>\n\n @if (errorMessage) {\n <div\n class=\"flex items-center gap-2 px-1 animate-in\"\n id=\"xs-upload-image-error-wrapper-{{ id }}\"\n >\n <span\n class=\"h-1 w-1 rounded-full bg-red-500 shadow-[0_0_8px_#ef4444]\"\n ></span>\n <p\n class=\"text-[9px] font-black uppercase text-red-500 tracking-tighter\"\n id=\"xs-upload-image-error-message-{{ id }}\"\n >\n {{ errorMessage }}\n </p>\n </div>\n }\n</div>\n", styles: [":host{display:block}.animate-in{animation:fadeIn .25s ease-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: XSImageComponent, selector: "xs-image", inputs: ["config", "viewTransitionName", "src", "alt", "width", "height", "size", "rounded", "objectFit", "clickable", "item", "typeItem", "imageType", "fallbackSrc", "loading", "priority", "customClass", "generateAvatar"], outputs: ["onClick", "onLoad", "onError"] }, { kind: "component", type: XSFormlyLabelComponent, selector: "xs-formly-label", inputs: ["for", "label", "required", "infoText", "asHeading", "elementId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7322
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSFormlyUploadImageComponent, isStandalone: true, selector: "xs-formly-upload-image", viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"xs-uploader-container flex flex-col mb-4\"\n id=\"xs-upload-image-root-{{ id }}\"\n>\n <xs-formly-label\n [for]=\"'xs-upload-image-input-' + id\"\n [label]=\"translateLabel(props.label)\"\n [required]=\"props.required\"\n [infoText]=\"infoText\"\n [elementId]=\"'xs-upload-image-label-' + id\"\n />\n\n <div\n class=\"mt-2 flex gap-2\"\n id=\"xs-upload-image-mode-toggle-{{ id }}\"\n >\n <button\n type=\"button\"\n (click)=\"setMode('file')\"\n [disabled]=\"isFieldDisabled\"\n [class.bg-white]=\"mode === 'file'\"\n [class.text-black]=\"mode === 'file'\"\n [class.bg-zinc-900]=\"mode !== 'file'\"\n [class.text-zinc-400]=\"mode !== 'file'\"\n class=\"rounded-full px-4 py-1 text-[11px] font-bold uppercase tracking-tight transition-all hover:scale-105 active:scale-95 disabled:cursor-not-allowed disabled:opacity-50\"\n id=\"xs-upload-image-mode-file-{{ id }}\"\n >\n {{ modeFileLabel }}\n </button>\n <button\n type=\"button\"\n (click)=\"setMode('url')\"\n [disabled]=\"isFieldDisabled\"\n [class.bg-white]=\"mode === 'url'\"\n [class.text-black]=\"mode === 'url'\"\n [class.bg-zinc-900]=\"mode !== 'url'\"\n [class.text-zinc-400]=\"mode !== 'url'\"\n class=\"rounded-full px-4 py-1 text-[11px] font-bold uppercase tracking-tight transition-all hover:scale-105 active:scale-95 disabled:cursor-not-allowed disabled:opacity-50\"\n id=\"xs-upload-image-mode-url-{{ id }}\"\n >\n {{ modeUrlLabel }}\n </button>\n </div>\n\n @if (mode === 'file') {\n <div\n class=\"mt-2 relative h-52 w-full overflow-hidden rounded-xl bg-zinc-900/50 transition-all duration-300 hover:border-zinc-600\"\n [class.border-zinc-400]=\"isDragging\"\n id=\"xs-upload-image-dropzone-{{ id }}\"\n >\n <input\n #fileInput\n id=\"xs-upload-image-input-{{ id }}\"\n type=\"file\"\n accept=\"image/*\"\n (change)=\"onFileChange($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"isDragging = false\"\n (drop)=\"onDrop($event)\"\n [disabled]=\"isFieldDisabled\"\n [attr.aria-describedby]=\"\n errorMessage\n ? 'xs-upload-image-error-message-' + id\n : null\n \"\n class=\"absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0\"\n />\n\n <div\n class=\"absolute inset-0 z-20 pointer-events-none flex h-full w-full items-center justify-center\"\n id=\"xs-upload-image-preview-container-{{ id }}\"\n >\n @if (previewUrl) {\n <div\n class=\"relative h-full w-full pointer-events-auto\"\n id=\"xs-upload-image-preview-wrapper-{{ id }}\"\n >\n <xs-image\n [src]=\"previewUrl\"\n [customClass]=\"'h-full w-full object-cover transition-all duration-500 group-hover:scale-105'\"\n id=\"xs-upload-image-preview-image-{{ id }}\"\n ></xs-image>\n\n <div\n class=\"absolute inset-0 flex items-center justify-center gap-3 bg-black/60 opacity-0 backdrop-blur-[2px] transition-opacity duration-300 hover:opacity-100 focus-within:opacity-100\"\n >\n <button\n type=\"button\"\n (click)=\"openFilePicker()\"\n [disabled]=\"isFieldDisabled\"\n class=\"z-30 flex h-10 items-center px-4 rounded-full bg-white text-black text-xs font-bold shadow-2xl transition-all hover:scale-105 active:scale-95 pointer-events-auto\"\n id=\"xs-upload-image-change-button-{{ id }}\"\n >\n {{ changeButtonLabel }}\n </button>\n <button\n type=\"button\"\n (click)=\"clearFile($event)\"\n [disabled]=\"isFieldDisabled\"\n [attr.aria-label]=\"removeButtonLabel\"\n class=\"z-30 flex h-10 w-10 items-center justify-center rounded-full bg-red-600 text-white shadow-2xl transition-all hover:bg-red-500 hover:scale-110 active:scale-95 pointer-events-auto\"\n id=\"xs-upload-image-clear-button-{{ id }}\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n </div>\n </div>\n } @else {\n <div\n class=\"flex flex-col items-center gap-4\"\n id=\"xs-upload-image-empty-state-{{ id }}\"\n >\n <div\n class=\"flex h-14 w-14 items-center justify-center rounded-2xl bg-zinc-900 text-zinc-600 shadow-[inset_0_1px_1px_rgba(255,255,255,0.05)] transition-colors group-hover:text-zinc-400\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect\n width=\"18\"\n height=\"18\"\n x=\"3\"\n y=\"3\"\n rx=\"2\"\n ry=\"2\"\n />\n <circle cx=\"9\" cy=\"9\" r=\"2\" />\n <path\n d=\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\"\n />\n </svg>\n </div>\n <div class=\"text-center\">\n <p\n class=\"text-[11px] font-bold text-zinc-300 uppercase tracking-tight\"\n id=\"xs-upload-image-select-title-{{ id }}\"\n >\n {{ selectTitle }}\n </p>\n <p\n class=\"text-[9px] text-zinc-600 uppercase tracking-widest mt-1\"\n id=\"xs-upload-image-hint-text-{{ id }}\"\n >\n {{ hintText }}\n </p>\n </div>\n </div>\n }\n </div>\n </div>\n } @else {\n <div\n class=\"mt-2 flex gap-2\"\n id=\"xs-upload-image-url-row-{{ id }}\"\n >\n <input\n id=\"xs-upload-image-url-input-{{ id }}\"\n type=\"url\"\n [value]=\"urlInput\"\n (input)=\"onUrlInput($event)\"\n (keydown.enter)=\"applyUrl()\"\n [placeholder]=\"urlPlaceholder\"\n [disabled]=\"isFieldDisabled\"\n [attr.aria-describedby]=\"\n urlError ? 'xs-upload-image-url-error-' + id : null\n \"\n class=\"w-full rounded-xl border border-zinc-800 bg-zinc-900/50 px-3 py-2 text-sm text-zinc-200 outline-none placeholder:text-zinc-600 focus:border-zinc-600 disabled:cursor-not-allowed disabled:opacity-50\"\n />\n <button\n type=\"button\"\n (click)=\"applyUrl()\"\n [disabled]=\"isFieldDisabled\"\n class=\"shrink-0 rounded-full bg-white px-4 py-2 text-[11px] font-bold uppercase tracking-tight text-black transition-all hover:scale-105 active:scale-95 disabled:cursor-not-allowed disabled:opacity-50\"\n id=\"xs-upload-image-url-apply-{{ id }}\"\n >\n {{ urlApplyLabel }}\n </button>\n </div>\n\n @if (urlError) {\n <p\n class=\"mt-1 px-1 text-[9px] font-black uppercase text-red-500 tracking-tighter\"\n id=\"xs-upload-image-url-error-{{ id }}\"\n >\n {{ urlError }}\n </p>\n }\n\n @if (previewUrl) {\n <div\n class=\"mt-2 relative h-52 w-full overflow-hidden rounded-xl bg-zinc-900/50\"\n id=\"xs-upload-image-url-preview-{{ id }}\"\n >\n <xs-image\n [src]=\"previewUrl\"\n [customClass]=\"'h-full w-full object-cover'\"\n id=\"xs-upload-image-url-preview-image-{{ id }}\"\n ></xs-image>\n\n <div\n class=\"absolute inset-0 flex items-center justify-center gap-3 bg-black/60 opacity-0 backdrop-blur-[2px] transition-opacity duration-300 hover:opacity-100 focus-within:opacity-100\"\n >\n <button\n type=\"button\"\n (click)=\"clearFile($event)\"\n [disabled]=\"isFieldDisabled\"\n [attr.aria-label]=\"removeButtonLabel\"\n class=\"z-30 flex h-10 items-center px-4 rounded-full bg-red-600 text-white text-xs font-bold shadow-2xl transition-all hover:bg-red-500 hover:scale-110 active:scale-95 pointer-events-auto\"\n id=\"xs-upload-image-url-clear-button-{{ id }}\"\n >\n {{ removeButtonLabel }}\n </button>\n </div>\n </div>\n }\n }\n\n @if (errorMessage) {\n <div\n class=\"flex items-center gap-2 px-1 animate-in\"\n id=\"xs-upload-image-error-wrapper-{{ id }}\"\n >\n <span\n class=\"h-1 w-1 rounded-full bg-red-500 shadow-[0_0_8px_#ef4444]\"\n ></span>\n <p\n class=\"text-[9px] font-black uppercase text-red-500 tracking-tighter\"\n id=\"xs-upload-image-error-message-{{ id }}\"\n >\n {{ errorMessage }}\n </p>\n </div>\n }\n</div>\n", styles: [":host{display:block}.animate-in{animation:fadeIn .25s ease-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: XSImageComponent, selector: "xs-image", inputs: ["config", "viewTransitionName", "src", "alt", "width", "height", "size", "rounded", "objectFit", "clickable", "item", "typeItem", "imageType", "fallbackSrc", "loading", "priority", "customClass", "generateAvatar"], outputs: ["onClick", "onLoad", "onError"] }, { kind: "component", type: XSFormlyLabelComponent, selector: "xs-formly-label", inputs: ["for", "label", "required", "infoText", "asHeading", "elementId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7247
7323
|
}
|
|
7248
7324
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSFormlyUploadImageComponent, decorators: [{
|
|
7249
7325
|
type: Component,
|
|
@@ -7252,7 +7328,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
7252
7328
|
ReactiveFormsModule,
|
|
7253
7329
|
XSImageComponent,
|
|
7254
7330
|
XSFormlyLabelComponent,
|
|
7255
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"xs-uploader-container flex flex-col mb-4\"\n id=\"xs-upload-image-root-{{ id }}\"\n>\n <xs-formly-label\n [for]=\"'xs-upload-image-input-' + id\"\n [label]=\"translateLabel(props.label)\"\n [required]=\"props.required\"\n [infoText]=\"infoText\"\n [elementId]=\"'xs-upload-image-label-' + id\"\n />\n\n <div\n class=\"mt-2 relative h-52 w-full overflow-hidden rounded-xl bg-zinc-900/50 transition-all duration-300 hover:border-zinc-600\"\n
|
|
7331
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"xs-uploader-container flex flex-col mb-4\"\n id=\"xs-upload-image-root-{{ id }}\"\n>\n <xs-formly-label\n [for]=\"'xs-upload-image-input-' + id\"\n [label]=\"translateLabel(props.label)\"\n [required]=\"props.required\"\n [infoText]=\"infoText\"\n [elementId]=\"'xs-upload-image-label-' + id\"\n />\n\n <div\n class=\"mt-2 flex gap-2\"\n id=\"xs-upload-image-mode-toggle-{{ id }}\"\n >\n <button\n type=\"button\"\n (click)=\"setMode('file')\"\n [disabled]=\"isFieldDisabled\"\n [class.bg-white]=\"mode === 'file'\"\n [class.text-black]=\"mode === 'file'\"\n [class.bg-zinc-900]=\"mode !== 'file'\"\n [class.text-zinc-400]=\"mode !== 'file'\"\n class=\"rounded-full px-4 py-1 text-[11px] font-bold uppercase tracking-tight transition-all hover:scale-105 active:scale-95 disabled:cursor-not-allowed disabled:opacity-50\"\n id=\"xs-upload-image-mode-file-{{ id }}\"\n >\n {{ modeFileLabel }}\n </button>\n <button\n type=\"button\"\n (click)=\"setMode('url')\"\n [disabled]=\"isFieldDisabled\"\n [class.bg-white]=\"mode === 'url'\"\n [class.text-black]=\"mode === 'url'\"\n [class.bg-zinc-900]=\"mode !== 'url'\"\n [class.text-zinc-400]=\"mode !== 'url'\"\n class=\"rounded-full px-4 py-1 text-[11px] font-bold uppercase tracking-tight transition-all hover:scale-105 active:scale-95 disabled:cursor-not-allowed disabled:opacity-50\"\n id=\"xs-upload-image-mode-url-{{ id }}\"\n >\n {{ modeUrlLabel }}\n </button>\n </div>\n\n @if (mode === 'file') {\n <div\n class=\"mt-2 relative h-52 w-full overflow-hidden rounded-xl bg-zinc-900/50 transition-all duration-300 hover:border-zinc-600\"\n [class.border-zinc-400]=\"isDragging\"\n id=\"xs-upload-image-dropzone-{{ id }}\"\n >\n <input\n #fileInput\n id=\"xs-upload-image-input-{{ id }}\"\n type=\"file\"\n accept=\"image/*\"\n (change)=\"onFileChange($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"isDragging = false\"\n (drop)=\"onDrop($event)\"\n [disabled]=\"isFieldDisabled\"\n [attr.aria-describedby]=\"\n errorMessage\n ? 'xs-upload-image-error-message-' + id\n : null\n \"\n class=\"absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0\"\n />\n\n <div\n class=\"absolute inset-0 z-20 pointer-events-none flex h-full w-full items-center justify-center\"\n id=\"xs-upload-image-preview-container-{{ id }}\"\n >\n @if (previewUrl) {\n <div\n class=\"relative h-full w-full pointer-events-auto\"\n id=\"xs-upload-image-preview-wrapper-{{ id }}\"\n >\n <xs-image\n [src]=\"previewUrl\"\n [customClass]=\"'h-full w-full object-cover transition-all duration-500 group-hover:scale-105'\"\n id=\"xs-upload-image-preview-image-{{ id }}\"\n ></xs-image>\n\n <div\n class=\"absolute inset-0 flex items-center justify-center gap-3 bg-black/60 opacity-0 backdrop-blur-[2px] transition-opacity duration-300 hover:opacity-100 focus-within:opacity-100\"\n >\n <button\n type=\"button\"\n (click)=\"openFilePicker()\"\n [disabled]=\"isFieldDisabled\"\n class=\"z-30 flex h-10 items-center px-4 rounded-full bg-white text-black text-xs font-bold shadow-2xl transition-all hover:scale-105 active:scale-95 pointer-events-auto\"\n id=\"xs-upload-image-change-button-{{ id }}\"\n >\n {{ changeButtonLabel }}\n </button>\n <button\n type=\"button\"\n (click)=\"clearFile($event)\"\n [disabled]=\"isFieldDisabled\"\n [attr.aria-label]=\"removeButtonLabel\"\n class=\"z-30 flex h-10 w-10 items-center justify-center rounded-full bg-red-600 text-white shadow-2xl transition-all hover:bg-red-500 hover:scale-110 active:scale-95 pointer-events-auto\"\n id=\"xs-upload-image-clear-button-{{ id }}\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n </div>\n </div>\n } @else {\n <div\n class=\"flex flex-col items-center gap-4\"\n id=\"xs-upload-image-empty-state-{{ id }}\"\n >\n <div\n class=\"flex h-14 w-14 items-center justify-center rounded-2xl bg-zinc-900 text-zinc-600 shadow-[inset_0_1px_1px_rgba(255,255,255,0.05)] transition-colors group-hover:text-zinc-400\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect\n width=\"18\"\n height=\"18\"\n x=\"3\"\n y=\"3\"\n rx=\"2\"\n ry=\"2\"\n />\n <circle cx=\"9\" cy=\"9\" r=\"2\" />\n <path\n d=\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\"\n />\n </svg>\n </div>\n <div class=\"text-center\">\n <p\n class=\"text-[11px] font-bold text-zinc-300 uppercase tracking-tight\"\n id=\"xs-upload-image-select-title-{{ id }}\"\n >\n {{ selectTitle }}\n </p>\n <p\n class=\"text-[9px] text-zinc-600 uppercase tracking-widest mt-1\"\n id=\"xs-upload-image-hint-text-{{ id }}\"\n >\n {{ hintText }}\n </p>\n </div>\n </div>\n }\n </div>\n </div>\n } @else {\n <div\n class=\"mt-2 flex gap-2\"\n id=\"xs-upload-image-url-row-{{ id }}\"\n >\n <input\n id=\"xs-upload-image-url-input-{{ id }}\"\n type=\"url\"\n [value]=\"urlInput\"\n (input)=\"onUrlInput($event)\"\n (keydown.enter)=\"applyUrl()\"\n [placeholder]=\"urlPlaceholder\"\n [disabled]=\"isFieldDisabled\"\n [attr.aria-describedby]=\"\n urlError ? 'xs-upload-image-url-error-' + id : null\n \"\n class=\"w-full rounded-xl border border-zinc-800 bg-zinc-900/50 px-3 py-2 text-sm text-zinc-200 outline-none placeholder:text-zinc-600 focus:border-zinc-600 disabled:cursor-not-allowed disabled:opacity-50\"\n />\n <button\n type=\"button\"\n (click)=\"applyUrl()\"\n [disabled]=\"isFieldDisabled\"\n class=\"shrink-0 rounded-full bg-white px-4 py-2 text-[11px] font-bold uppercase tracking-tight text-black transition-all hover:scale-105 active:scale-95 disabled:cursor-not-allowed disabled:opacity-50\"\n id=\"xs-upload-image-url-apply-{{ id }}\"\n >\n {{ urlApplyLabel }}\n </button>\n </div>\n\n @if (urlError) {\n <p\n class=\"mt-1 px-1 text-[9px] font-black uppercase text-red-500 tracking-tighter\"\n id=\"xs-upload-image-url-error-{{ id }}\"\n >\n {{ urlError }}\n </p>\n }\n\n @if (previewUrl) {\n <div\n class=\"mt-2 relative h-52 w-full overflow-hidden rounded-xl bg-zinc-900/50\"\n id=\"xs-upload-image-url-preview-{{ id }}\"\n >\n <xs-image\n [src]=\"previewUrl\"\n [customClass]=\"'h-full w-full object-cover'\"\n id=\"xs-upload-image-url-preview-image-{{ id }}\"\n ></xs-image>\n\n <div\n class=\"absolute inset-0 flex items-center justify-center gap-3 bg-black/60 opacity-0 backdrop-blur-[2px] transition-opacity duration-300 hover:opacity-100 focus-within:opacity-100\"\n >\n <button\n type=\"button\"\n (click)=\"clearFile($event)\"\n [disabled]=\"isFieldDisabled\"\n [attr.aria-label]=\"removeButtonLabel\"\n class=\"z-30 flex h-10 items-center px-4 rounded-full bg-red-600 text-white text-xs font-bold shadow-2xl transition-all hover:bg-red-500 hover:scale-110 active:scale-95 pointer-events-auto\"\n id=\"xs-upload-image-url-clear-button-{{ id }}\"\n >\n {{ removeButtonLabel }}\n </button>\n </div>\n </div>\n }\n }\n\n @if (errorMessage) {\n <div\n class=\"flex items-center gap-2 px-1 animate-in\"\n id=\"xs-upload-image-error-wrapper-{{ id }}\"\n >\n <span\n class=\"h-1 w-1 rounded-full bg-red-500 shadow-[0_0_8px_#ef4444]\"\n ></span>\n <p\n class=\"text-[9px] font-black uppercase text-red-500 tracking-tighter\"\n id=\"xs-upload-image-error-message-{{ id }}\"\n >\n {{ errorMessage }}\n </p>\n </div>\n }\n</div>\n", styles: [":host{display:block}.animate-in{animation:fadeIn .25s ease-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
7256
7332
|
}], ctorParameters: () => [], propDecorators: { fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }] } });
|
|
7257
7333
|
|
|
7258
7334
|
class XSFormlyJsonComponent extends XSFormlyBaseComponent {
|
|
@@ -8638,7 +8714,9 @@ class XSModalImageSearchComponent {
|
|
|
8638
8714
|
}
|
|
8639
8715
|
constructor() {
|
|
8640
8716
|
if (this.translateService?.currentLang$) {
|
|
8641
|
-
this.translateService.currentLang
|
|
8717
|
+
this.translateService.currentLang$
|
|
8718
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
8719
|
+
.subscribe(() => {
|
|
8642
8720
|
this.langVersion.update((v) => v + 1);
|
|
8643
8721
|
});
|
|
8644
8722
|
}
|
|
@@ -13842,7 +13920,9 @@ class XSImportMediaHeaderComponent {
|
|
|
13842
13920
|
}
|
|
13843
13921
|
constructor() {
|
|
13844
13922
|
if (this.translateService?.currentLang$) {
|
|
13845
|
-
this.translateService.currentLang
|
|
13923
|
+
this.translateService.currentLang$
|
|
13924
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
13925
|
+
.subscribe(() => {
|
|
13846
13926
|
this.langVersion.update((v) => v + 1);
|
|
13847
13927
|
});
|
|
13848
13928
|
}
|
|
@@ -13865,7 +13945,9 @@ class XSImportMediaFlowComponent {
|
|
|
13865
13945
|
langVersion = signal(0, ...(ngDevMode ? [{ debugName: "langVersion" }] : []));
|
|
13866
13946
|
constructor() {
|
|
13867
13947
|
if (this.translateService?.currentLang$) {
|
|
13868
|
-
this.translateService.currentLang
|
|
13948
|
+
this.translateService.currentLang$
|
|
13949
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
13950
|
+
.subscribe(() => {
|
|
13869
13951
|
this.langVersion.update((v) => v + 1);
|
|
13870
13952
|
});
|
|
13871
13953
|
}
|
|
@@ -14282,7 +14364,9 @@ class XSChatListComponent {
|
|
|
14282
14364
|
}
|
|
14283
14365
|
constructor() {
|
|
14284
14366
|
if (this.translateService?.currentLang$) {
|
|
14285
|
-
this.translateService.currentLang
|
|
14367
|
+
this.translateService.currentLang$
|
|
14368
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
14369
|
+
.subscribe(() => {
|
|
14286
14370
|
this.langVersion.update((v) => v + 1);
|
|
14287
14371
|
});
|
|
14288
14372
|
}
|
|
@@ -14533,7 +14617,9 @@ class XSChatTextareaComponent {
|
|
|
14533
14617
|
}
|
|
14534
14618
|
constructor() {
|
|
14535
14619
|
if (this.translateService?.currentLang$) {
|
|
14536
|
-
this.translateService.currentLang
|
|
14620
|
+
this.translateService.currentLang$
|
|
14621
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
14622
|
+
.subscribe(() => {
|
|
14537
14623
|
this.langVersion.update((v) => v + 1);
|
|
14538
14624
|
});
|
|
14539
14625
|
}
|
|
@@ -15176,7 +15262,9 @@ class XSChatFloatingPanelComponent {
|
|
|
15176
15262
|
}
|
|
15177
15263
|
constructor() {
|
|
15178
15264
|
if (this.translateService?.currentLang$) {
|
|
15179
|
-
this.translateService.currentLang
|
|
15265
|
+
this.translateService.currentLang$
|
|
15266
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
15267
|
+
.subscribe(() => {
|
|
15180
15268
|
this.langVersion.update((v) => v + 1);
|
|
15181
15269
|
});
|
|
15182
15270
|
}
|
|
@@ -15795,7 +15883,9 @@ class XSNavbarComponent {
|
|
|
15795
15883
|
'function') {
|
|
15796
15884
|
this.translateService.registerTranslations({ es: es$6, en: en$6 });
|
|
15797
15885
|
}
|
|
15798
|
-
this.translateService.currentLang
|
|
15886
|
+
this.translateService.currentLang$
|
|
15887
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
15888
|
+
.subscribe((lang) => this.langSignal.set(lang));
|
|
15799
15889
|
}
|
|
15800
15890
|
t(key) {
|
|
15801
15891
|
this.langSignal();
|
|
@@ -21223,7 +21313,9 @@ class XSProfileCommentsComponent {
|
|
|
21223
21313
|
this.translateService.registerTranslations({ es, en });
|
|
21224
21314
|
}
|
|
21225
21315
|
this.loadTexts();
|
|
21226
|
-
this.translateService.currentLang
|
|
21316
|
+
this.translateService.currentLang$
|
|
21317
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
21318
|
+
.subscribe(() => this.loadTexts());
|
|
21227
21319
|
}
|
|
21228
21320
|
loadTexts() {
|
|
21229
21321
|
this.i18nTexts.set(this.translateService.getLanguage() === 'es' ? es : en);
|
|
@@ -21648,11 +21740,11 @@ class XSProfileTopsComponent {
|
|
|
21648
21740
|
return { path, queryParams };
|
|
21649
21741
|
}
|
|
21650
21742
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSProfileTopsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21651
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSProfileTopsComponent, isStandalone: true, selector: "xs-profile-tops", inputs: { itemType: { classPropertyName: "itemType", publicName: "itemType", isSignal: true, isRequired: true, transformFunction: null }, itemSubtype: { classPropertyName: "itemSubtype", publicName: "itemSubtype", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: true, transformFunction: null }, positions: { classPropertyName: "positions", publicName: "positions", isSignal: true, isRequired: true, transformFunction: null }, admin: { classPropertyName: "admin", publicName: "admin", isSignal: true, isRequired: false, transformFunction: null }, links: { classPropertyName: "links", publicName: "links", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rankingTab: "rankingTab", rankingClick: "rankingClick" }, host: { attributes: { "xs-profile-tops-host": "" } }, ngImport: i0, template: "@if (loading()) {\n <section class=\"rounded-xl bg-zinc-900/50 px-6 py-6 sm:px-8\" aria-hidden=\"true\">\n <div class=\"flex items-center gap-6\">\n <div class=\"h-20 w-28 rounded-lg bg-zinc-800 animate-pulse\"></div>\n <div class=\"hidden w-px self-stretch bg-white/5 sm:block\"></div>\n <div class=\"min-w-0 flex-1\">\n <div class=\"h-4 w-40 rounded bg-zinc-800 animate-pulse\"></div>\n <div class=\"mt-2 h-3 w-56 rounded bg-zinc-800 animate-pulse\"></div>\n <div class=\"mt-4 h-7 w-72 rounded-lg bg-zinc-800 animate-pulse\"></div>\n </div>\n </div>\n </section>\n} @else if (!hasAnyPosition()) {\n <section class=\"rounded-xl bg-zinc-900/50 px-6 py-6
|
|
21743
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSProfileTopsComponent, isStandalone: true, selector: "xs-profile-tops", inputs: { itemType: { classPropertyName: "itemType", publicName: "itemType", isSignal: true, isRequired: true, transformFunction: null }, itemSubtype: { classPropertyName: "itemSubtype", publicName: "itemSubtype", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: true, transformFunction: null }, positions: { classPropertyName: "positions", publicName: "positions", isSignal: true, isRequired: true, transformFunction: null }, admin: { classPropertyName: "admin", publicName: "admin", isSignal: true, isRequired: false, transformFunction: null }, links: { classPropertyName: "links", publicName: "links", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rankingTab: "rankingTab", rankingClick: "rankingClick" }, host: { attributes: { "xs-profile-tops-host": "" } }, ngImport: i0, template: "@if (loading()) {\n <section class=\"rounded-xl bg-zinc-900/50 px-6 py-6 sm:px-8\" aria-hidden=\"true\">\n <div class=\"flex items-center gap-6\">\n <div class=\"h-20 w-28 rounded-lg bg-zinc-800 animate-pulse\"></div>\n <div class=\"hidden w-px self-stretch bg-white/5 sm:block\"></div>\n <div class=\"min-w-0 flex-1\">\n <div class=\"h-4 w-40 rounded bg-zinc-800 animate-pulse\"></div>\n <div class=\"mt-2 h-3 w-56 rounded bg-zinc-800 animate-pulse\"></div>\n <div class=\"mt-4 h-7 w-72 rounded-lg bg-zinc-800 animate-pulse\"></div>\n </div>\n </div>\n </section>\n} @else if (!hasAnyPosition()) {\n <section class=\"rounded-xl bg-zinc-900/50 px-6 py-6 sm:py-7\" aria-label=\"Ranking\">\n <div class=\"flex items-center justify-between gap-4\">\n <p class=\"text-[11px] font-black uppercase tracking-[0.28em] text-zinc-600\">\n {{ title() }}\n </p>\n <a\n [routerLink]=\"rankingLink().path\"\n [queryParams]=\"rankingLink().queryParams\"\n class=\"shrink-0 text-[11px] uppercase tracking-[0.14em] text-zinc-600 hover:text-zinc-300 transition-colors cursor-pointer\"\n (click)=\"onRankingClick()\"\n >\n {{ texts().viewRanking ?? 'Ver ranking' }} \u2192\n </a>\n </div>\n <p class=\"mt-3 text-sm text-zinc-500\">{{ texts().noPositionYet ?? 'Sin posici\u00F3n todav\u00EDa' }}</p>\n </section>\n} @else {\n <section\n class=\"relative overflow-hidden rounded-xl bg-zinc-900/50 px-6 py-5 sm:px-8 sm:py-6\"\n aria-label=\"Ranking\"\n >\n <span\n class=\"absolute inset-y-0 left-0 w-[3px] bg-gradient-to-b {{ accentClass() }}\"\n aria-hidden=\"true\"\n ></span>\n\n <div class=\"flex items-center justify-between gap-4\">\n <p class=\"text-[11px] font-black uppercase tracking-[0.28em] text-zinc-500\">\n {{ title() }}\n </p>\n <a\n [routerLink]=\"rankingLink().path\"\n [queryParams]=\"rankingLink().queryParams\"\n class=\"shrink-0 text-[11px] uppercase tracking-[0.14em] text-zinc-500 hover:text-white transition-colors cursor-pointer\"\n (click)=\"onRankingClick()\"\n >\n {{ texts().viewRanking ?? 'Ver ranking' }} \u2192\n </a>\n </div>\n\n <div\n class=\"mt-4 flex flex-col items-start gap-y-3 sm:mt-4 sm:flex-row sm:flex-nowrap sm:items-start sm:gap-x-8\"\n >\n @if (currentPosition() !== null) {\n <p\n class=\"shrink-0 text-7xl sm:text-8xl font-black leading-none tracking-tighter text-white\"\n >\n <span class=\"text-zinc-600\">#</span>{{ formattedPosition() }}\n </p>\n <span class=\"hidden w-px self-stretch bg-white/10 sm:block\" aria-hidden=\"true\"></span>\n }\n <div class=\"w-full min-w-0 sm:w-auto sm:flex-1\">\n <p class=\"text-sm font-black uppercase tracking-[0.24em] text-zinc-100\">\n @if (scope() === 'global') {\n {{ topWorldLabel() }}\n } @else {\n Top {{ texts().country }}\n }\n </p>\n <p class=\"mt-1 text-[11px] uppercase tracking-[0.2em] text-zinc-500\">\n @if (period() === 'total') {\n Ranking {{ texts().total }}\n } @else if (period() === 'annual') {\n Ranking {{ texts().annual ?? 'Anual' }} \u00B7 {{ currentYear }}\n } @else {\n Ranking {{ texts().monthly ?? 'Mensual' }} \u00B7 {{ texts().currentMonth }}\n {{ currentYear }}\n }\n </p>\n\n @if (currentPosition() === null) {\n <p class=\"mt-1.5 text-xs text-zinc-400\">\n {{ texts().noPositionHere ?? 'Sin posici\u00F3n en este tramo' }}\n </p>\n }\n\n <div\n class=\"flex flex-wrap items-center\"\n [class]=\"currentPosition() === null ? 'mt-3 gap-1.5' : 'mt-4 gap-2'\"\n >\n <div class=\"inline-flex items-center gap-0.5 rounded-lg bg-black/50 p-1\" role=\"tablist\">\n <button\n type=\"button\"\n role=\"tab\"\n class=\"rounded-md px-2.5 py-1 text-[10px] font-bold uppercase tracking-[0.14em] transition-colors\"\n [class]=\"\n scope() === 'global'\n ? 'bg-white/10 text-white'\n : 'text-zinc-500 hover:text-zinc-200'\n \"\n (click)=\"setScope('global')\"\n >\n {{ topWorldLabel() }}\n </button>\n @if (hasCountry()) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"rounded-md px-2.5 py-1 text-[10px] font-bold uppercase tracking-[0.14em] transition-colors\"\n [class]=\"\n scope() === 'country'\n ? 'bg-white/10 text-white'\n : 'text-zinc-500 hover:text-zinc-200'\n \"\n (click)=\"setScope('country')\"\n >\n {{ texts().country }}\n </button>\n }\n </div>\n\n <div class=\"inline-flex items-center gap-0.5 rounded-lg bg-black/50 p-1\" role=\"tablist\">\n <button\n type=\"button\"\n role=\"tab\"\n class=\"rounded-md px-2.5 py-1 text-[10px] font-bold uppercase tracking-[0.14em] transition-colors\"\n [class]=\"\n period() === 'total'\n ? 'bg-white/10 text-white'\n : 'text-zinc-500 hover:text-zinc-200'\n \"\n (click)=\"setPeriod('total')\"\n >\n {{ texts().total }}\n </button>\n <button\n type=\"button\"\n role=\"tab\"\n class=\"rounded-md px-2.5 py-1 text-[10px] font-bold uppercase tracking-[0.14em] transition-colors\"\n [class]=\"\n period() === 'annual'\n ? 'bg-white/10 text-white'\n : 'text-zinc-500 hover:text-zinc-200'\n \"\n (click)=\"setPeriod('annual')\"\n >\n {{ texts().annual ?? 'Anual' }}\n </button>\n <button\n type=\"button\"\n role=\"tab\"\n class=\"rounded-md px-2.5 py-1 text-[10px] font-bold uppercase tracking-[0.14em] transition-colors\"\n [class]=\"\n period() === 'monthly'\n ? 'bg-white/10 text-white'\n : 'text-zinc-500 hover:text-zinc-200'\n \"\n (click)=\"setPeriod('monthly')\"\n >\n {{ texts().monthly ?? 'Mensual' }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </section>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
21652
21744
|
}
|
|
21653
21745
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSProfileTopsComponent, decorators: [{
|
|
21654
21746
|
type: Component,
|
|
21655
|
-
args: [{ selector: 'xs-profile-tops', host: { 'xs-profile-tops-host': '' }, imports: [CommonModule, RouterModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (loading()) {\n <section class=\"rounded-xl bg-zinc-900/50 px-6 py-6 sm:px-8\" aria-hidden=\"true\">\n <div class=\"flex items-center gap-6\">\n <div class=\"h-20 w-28 rounded-lg bg-zinc-800 animate-pulse\"></div>\n <div class=\"hidden w-px self-stretch bg-white/5 sm:block\"></div>\n <div class=\"min-w-0 flex-1\">\n <div class=\"h-4 w-40 rounded bg-zinc-800 animate-pulse\"></div>\n <div class=\"mt-2 h-3 w-56 rounded bg-zinc-800 animate-pulse\"></div>\n <div class=\"mt-4 h-7 w-72 rounded-lg bg-zinc-800 animate-pulse\"></div>\n </div>\n </div>\n </section>\n} @else if (!hasAnyPosition()) {\n <section class=\"rounded-xl bg-zinc-900/50 px-6 py-6
|
|
21747
|
+
args: [{ selector: 'xs-profile-tops', host: { 'xs-profile-tops-host': '' }, imports: [CommonModule, RouterModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (loading()) {\n <section class=\"rounded-xl bg-zinc-900/50 px-6 py-6 sm:px-8\" aria-hidden=\"true\">\n <div class=\"flex items-center gap-6\">\n <div class=\"h-20 w-28 rounded-lg bg-zinc-800 animate-pulse\"></div>\n <div class=\"hidden w-px self-stretch bg-white/5 sm:block\"></div>\n <div class=\"min-w-0 flex-1\">\n <div class=\"h-4 w-40 rounded bg-zinc-800 animate-pulse\"></div>\n <div class=\"mt-2 h-3 w-56 rounded bg-zinc-800 animate-pulse\"></div>\n <div class=\"mt-4 h-7 w-72 rounded-lg bg-zinc-800 animate-pulse\"></div>\n </div>\n </div>\n </section>\n} @else if (!hasAnyPosition()) {\n <section class=\"rounded-xl bg-zinc-900/50 px-6 py-6 sm:py-7\" aria-label=\"Ranking\">\n <div class=\"flex items-center justify-between gap-4\">\n <p class=\"text-[11px] font-black uppercase tracking-[0.28em] text-zinc-600\">\n {{ title() }}\n </p>\n <a\n [routerLink]=\"rankingLink().path\"\n [queryParams]=\"rankingLink().queryParams\"\n class=\"shrink-0 text-[11px] uppercase tracking-[0.14em] text-zinc-600 hover:text-zinc-300 transition-colors cursor-pointer\"\n (click)=\"onRankingClick()\"\n >\n {{ texts().viewRanking ?? 'Ver ranking' }} \u2192\n </a>\n </div>\n <p class=\"mt-3 text-sm text-zinc-500\">{{ texts().noPositionYet ?? 'Sin posici\u00F3n todav\u00EDa' }}</p>\n </section>\n} @else {\n <section\n class=\"relative overflow-hidden rounded-xl bg-zinc-900/50 px-6 py-5 sm:px-8 sm:py-6\"\n aria-label=\"Ranking\"\n >\n <span\n class=\"absolute inset-y-0 left-0 w-[3px] bg-gradient-to-b {{ accentClass() }}\"\n aria-hidden=\"true\"\n ></span>\n\n <div class=\"flex items-center justify-between gap-4\">\n <p class=\"text-[11px] font-black uppercase tracking-[0.28em] text-zinc-500\">\n {{ title() }}\n </p>\n <a\n [routerLink]=\"rankingLink().path\"\n [queryParams]=\"rankingLink().queryParams\"\n class=\"shrink-0 text-[11px] uppercase tracking-[0.14em] text-zinc-500 hover:text-white transition-colors cursor-pointer\"\n (click)=\"onRankingClick()\"\n >\n {{ texts().viewRanking ?? 'Ver ranking' }} \u2192\n </a>\n </div>\n\n <div\n class=\"mt-4 flex flex-col items-start gap-y-3 sm:mt-4 sm:flex-row sm:flex-nowrap sm:items-start sm:gap-x-8\"\n >\n @if (currentPosition() !== null) {\n <p\n class=\"shrink-0 text-7xl sm:text-8xl font-black leading-none tracking-tighter text-white\"\n >\n <span class=\"text-zinc-600\">#</span>{{ formattedPosition() }}\n </p>\n <span class=\"hidden w-px self-stretch bg-white/10 sm:block\" aria-hidden=\"true\"></span>\n }\n <div class=\"w-full min-w-0 sm:w-auto sm:flex-1\">\n <p class=\"text-sm font-black uppercase tracking-[0.24em] text-zinc-100\">\n @if (scope() === 'global') {\n {{ topWorldLabel() }}\n } @else {\n Top {{ texts().country }}\n }\n </p>\n <p class=\"mt-1 text-[11px] uppercase tracking-[0.2em] text-zinc-500\">\n @if (period() === 'total') {\n Ranking {{ texts().total }}\n } @else if (period() === 'annual') {\n Ranking {{ texts().annual ?? 'Anual' }} \u00B7 {{ currentYear }}\n } @else {\n Ranking {{ texts().monthly ?? 'Mensual' }} \u00B7 {{ texts().currentMonth }}\n {{ currentYear }}\n }\n </p>\n\n @if (currentPosition() === null) {\n <p class=\"mt-1.5 text-xs text-zinc-400\">\n {{ texts().noPositionHere ?? 'Sin posici\u00F3n en este tramo' }}\n </p>\n }\n\n <div\n class=\"flex flex-wrap items-center\"\n [class]=\"currentPosition() === null ? 'mt-3 gap-1.5' : 'mt-4 gap-2'\"\n >\n <div class=\"inline-flex items-center gap-0.5 rounded-lg bg-black/50 p-1\" role=\"tablist\">\n <button\n type=\"button\"\n role=\"tab\"\n class=\"rounded-md px-2.5 py-1 text-[10px] font-bold uppercase tracking-[0.14em] transition-colors\"\n [class]=\"\n scope() === 'global'\n ? 'bg-white/10 text-white'\n : 'text-zinc-500 hover:text-zinc-200'\n \"\n (click)=\"setScope('global')\"\n >\n {{ topWorldLabel() }}\n </button>\n @if (hasCountry()) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"rounded-md px-2.5 py-1 text-[10px] font-bold uppercase tracking-[0.14em] transition-colors\"\n [class]=\"\n scope() === 'country'\n ? 'bg-white/10 text-white'\n : 'text-zinc-500 hover:text-zinc-200'\n \"\n (click)=\"setScope('country')\"\n >\n {{ texts().country }}\n </button>\n }\n </div>\n\n <div class=\"inline-flex items-center gap-0.5 rounded-lg bg-black/50 p-1\" role=\"tablist\">\n <button\n type=\"button\"\n role=\"tab\"\n class=\"rounded-md px-2.5 py-1 text-[10px] font-bold uppercase tracking-[0.14em] transition-colors\"\n [class]=\"\n period() === 'total'\n ? 'bg-white/10 text-white'\n : 'text-zinc-500 hover:text-zinc-200'\n \"\n (click)=\"setPeriod('total')\"\n >\n {{ texts().total }}\n </button>\n <button\n type=\"button\"\n role=\"tab\"\n class=\"rounded-md px-2.5 py-1 text-[10px] font-bold uppercase tracking-[0.14em] transition-colors\"\n [class]=\"\n period() === 'annual'\n ? 'bg-white/10 text-white'\n : 'text-zinc-500 hover:text-zinc-200'\n \"\n (click)=\"setPeriod('annual')\"\n >\n {{ texts().annual ?? 'Anual' }}\n </button>\n <button\n type=\"button\"\n role=\"tab\"\n class=\"rounded-md px-2.5 py-1 text-[10px] font-bold uppercase tracking-[0.14em] transition-colors\"\n [class]=\"\n period() === 'monthly'\n ? 'bg-white/10 text-white'\n : 'text-zinc-500 hover:text-zinc-200'\n \"\n (click)=\"setPeriod('monthly')\"\n >\n {{ texts().monthly ?? 'Mensual' }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </section>\n}\n" }]
|
|
21656
21748
|
}], propDecorators: { itemType: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemType", required: true }] }], itemSubtype: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemSubtype", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: true }] }], positions: [{ type: i0.Input, args: [{ isSignal: true, alias: "positions", required: true }] }], admin: [{ type: i0.Input, args: [{ isSignal: true, alias: "admin", required: false }] }], links: [{ type: i0.Input, args: [{ isSignal: true, alias: "links", required: false }] }], rankingTab: [{ type: i0.Output, args: ["rankingTab"] }], rankingClick: [{ type: i0.Output, args: ["rankingClick"] }] } });
|
|
21657
21749
|
|
|
21658
21750
|
class XSStepperComponent {
|