@lluc_llull/ui-lib 0.34.2 → 0.34.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,7 +3,7 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
import { Component, HostBinding, Inject, Input, Optional } from "@angular/core";
|
|
4
4
|
import * as simpleIcons from "simple-icons";
|
|
5
5
|
import * as i1$1 from "lucide-angular";
|
|
6
|
-
import { ArrowLeft, ArrowRight, Home, LUCIDE_ICONS, LucideAngularModule, LucideIconProvider, Moon, MoveRight, Sun } from "lucide-angular";
|
|
6
|
+
import { ArrowLeft, ArrowRight, ArrowUpRight, Home, LUCIDE_ICONS, LucideAngularModule, LucideIconProvider, Moon, MoveRight, Sun } from "lucide-angular";
|
|
7
7
|
import * as i1 from "@cloudinary/ng";
|
|
8
8
|
import { CloudinaryModule, lazyload, responsive } from "@cloudinary/ng";
|
|
9
9
|
import { CloudinaryImage } from "@cloudinary/url-gen";
|
|
@@ -59,6 +59,7 @@ var UiIconComponent = class UiIconComponent {
|
|
|
59
59
|
useValue: new LucideIconProvider({
|
|
60
60
|
ArrowLeft,
|
|
61
61
|
ArrowRight,
|
|
62
|
+
ArrowUpRight,
|
|
62
63
|
Home,
|
|
63
64
|
Moon,
|
|
64
65
|
MoveRight,
|
|
@@ -112,6 +113,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
112
113
|
useValue: new LucideIconProvider({
|
|
113
114
|
ArrowLeft,
|
|
114
115
|
ArrowRight,
|
|
116
|
+
ArrowUpRight,
|
|
115
117
|
Home,
|
|
116
118
|
Moon,
|
|
117
119
|
MoveRight,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lluc_llull-ui-lib-shared.mjs","names":["i1","qAuto"],"sources":["../../../projects/ui-lib/shared/ui-icon/ui-icon.component.ts","../../../projects/ui-lib/shared/ui-icon/ui-icon.component.html","../../../projects/ui-lib/shared/ui-icon/ui-icon.mock.ts","../../../projects/ui-lib/shared/ui-image/ui-image.component.ts","../../../projects/ui-lib/shared/ui-image/ui-image.component.html"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, Input, OnChanges } from '@angular/core';\nimport type { SimpleIcon } from 'simple-icons';\nimport * as simpleIcons from 'simple-icons';\nimport {\n ArrowLeft,\n ArrowRight,\n Home,\n LucideAngularModule,\n LucideIconProvider,\n LUCIDE_ICONS,\n Moon,\n MoveRight,\n Sun,\n} from 'lucide-angular';\n\n@Component({\n selector: 'ui-icon',\n standalone: true,\n imports: [\n CommonModule,\n LucideAngularModule,\n ],\n providers: [\n {\n provide: LUCIDE_ICONS,\n multi: true,\n useValue: new LucideIconProvider({ ArrowLeft, ArrowRight, Home, Moon, MoveRight, Sun }),\n },\n ],\n templateUrl: './ui-icon.component.html',\n styleUrls: ['./ui-icon.component.scss'],\n})\nexport class UiIconComponent implements OnChanges {\n @Input() name!: string;\n @Input() size = 24;\n @Input() color = 'currentColor';\n\n private icon?: SimpleIcon | null;\n\n ngOnChanges() {\n this.resolveBrandIcon();\n }\n\n get isBrandIcon(): boolean {\n return !!this.icon;\n }\n\n get brandIcon(): SimpleIcon | null {\n return this.icon ?? null;\n }\n\n private resolveBrandIcon(): void {\n if (!this.name) {\n this.icon = null;\n return;\n }\n\n const key =\n 'si' + this.name.replace(/[^a-z0-9]/gi, '').replace(/^\\w/, (c) => c.toUpperCase());\n\n this.icon = (simpleIcons as any)[key] ?? null;\n }\n}\n","@if (isBrandIcon) {\n <svg\n class=\"ui-icon ui-icon--brand\"\n [attr.width]=\"size\"\n [attr.height]=\"size\"\n [attr.fill]=\"color\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path [attr.d]=\"brandIcon?.path\"></path>\n </svg>\n} @else {\n <lucide-icon\n class=\"ui-icon ui-icon--lucide\"\n [name]=\"name\"\n [size]=\"size\"\n [color]=\"color\"\n ></lucide-icon>\n}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'ui-icon',\n standalone: true,\n template: '',\n})\nexport class MockUiIconComponent {\n @Input() name!: string;\n @Input() size = 24;\n @Input() color = 'currentColor';\n}","import { CommonModule } from '@angular/common';\nimport { Component, HostBinding, Inject, Input, OnChanges, OnInit, Optional } from '@angular/core';\nimport { CloudinaryModule, lazyload, responsive } from '@cloudinary/ng';\nimport { CloudinaryImage } from '@cloudinary/url-gen';\nimport { format, quality } from '@cloudinary/url-gen/actions/delivery';\nimport { limitFit } from '@cloudinary/url-gen/actions/resize';\nimport { auto } from '@cloudinary/url-gen/qualifiers/format';\nimport { auto as qAuto } from '@cloudinary/url-gen/qualifiers/quality';\nimport { CLOUDINARY_CLOUD_NAME } from '@lluc_llull/ui-lib/mapper';\n\n@Component({\n selector: 'ui-image',\n standalone: true,\n imports: [CommonModule, CloudinaryModule],\n templateUrl: './ui-image.component.html',\n styleUrl: './ui-image.component.scss',\n})\nexport class UiImageComponent implements OnChanges, OnInit {\n @Input({ required: true }) publicId!: string;\n @Input() cloudName?: string;\n @Input() transformations?: any;\n @Input() eager: boolean = false;\n @Input() width?: number | null;\n @Input() height?: number | null;\n\n img!: CloudinaryImage;\n plugins: any[] = [];\n\n constructor(@Optional() @Inject(CLOUDINARY_CLOUD_NAME) private globalCloudName?: string) {}\n\n ngOnInit(): void {\n this.initImage();\n }\n\n ngOnChanges(): void {\n this.initImage();\n }\n\n @HostBinding('style.--ui-image-ratio')\n get aspectRatioStyle(): string | null {\n if (this.width && this.height) {\n return `${this.width} / ${this.height}`;\n }\n return null;\n }\n\n private initImage(): void {\n const activeCloudName = this.cloudName || this.globalCloudName;\n\n if (this.publicId && activeCloudName) {\n this.img = new CloudinaryImage(this.publicId, { cloudName: activeCloudName })\n .delivery(format(auto()))\n .delivery(quality(qAuto()))\n .resize(limitFit().width(1920));\n\n this.plugins = [responsive({ steps: 200 })];\n\n if (!this.eager) {\n this.plugins.push(lazyload());\n }\n } else if (!activeCloudName) {\n console.warn(\n '[UiImageComponent]: No cloudName provided. Please provide it via @Input() or the CLOUDINARY_CLOUD_NAME InjectionToken.',\n );\n }\n }\n}\n","@if (img) {\n @if (eager) {\n <img [src]=\"img.toURL()\" fetchpriority=\"high\" loading=\"eager\" alt=\"\"\n [attr.width]=\"width ?? null\" [attr.height]=\"height ?? null\" />\n } @else {\n <advanced-image [cldImg]=\"img\" [plugins]=\"plugins\"></advanced-image>\n }\n}\n"],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"lluc_llull-ui-lib-shared.mjs","names":["i1","qAuto"],"sources":["../../../projects/ui-lib/shared/ui-icon/ui-icon.component.ts","../../../projects/ui-lib/shared/ui-icon/ui-icon.component.html","../../../projects/ui-lib/shared/ui-icon/ui-icon.mock.ts","../../../projects/ui-lib/shared/ui-image/ui-image.component.ts","../../../projects/ui-lib/shared/ui-image/ui-image.component.html"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, Input, OnChanges } from '@angular/core';\nimport type { SimpleIcon } from 'simple-icons';\nimport * as simpleIcons from 'simple-icons';\nimport {\n ArrowLeft,\n ArrowRight,\n ArrowUpRight,\n Home,\n LucideAngularModule,\n LucideIconProvider,\n LUCIDE_ICONS,\n Moon,\n MoveRight,\n Sun,\n} from 'lucide-angular';\n\n@Component({\n selector: 'ui-icon',\n standalone: true,\n imports: [\n CommonModule,\n LucideAngularModule,\n ],\n providers: [\n {\n provide: LUCIDE_ICONS,\n multi: true,\n useValue: new LucideIconProvider({ ArrowLeft, ArrowRight, ArrowUpRight, Home, Moon, MoveRight, Sun }),\n },\n ],\n templateUrl: './ui-icon.component.html',\n styleUrls: ['./ui-icon.component.scss'],\n})\nexport class UiIconComponent implements OnChanges {\n @Input() name!: string;\n @Input() size = 24;\n @Input() color = 'currentColor';\n\n private icon?: SimpleIcon | null;\n\n ngOnChanges() {\n this.resolveBrandIcon();\n }\n\n get isBrandIcon(): boolean {\n return !!this.icon;\n }\n\n get brandIcon(): SimpleIcon | null {\n return this.icon ?? null;\n }\n\n private resolveBrandIcon(): void {\n if (!this.name) {\n this.icon = null;\n return;\n }\n\n const key =\n 'si' + this.name.replace(/[^a-z0-9]/gi, '').replace(/^\\w/, (c) => c.toUpperCase());\n\n this.icon = (simpleIcons as any)[key] ?? null;\n }\n}\n","@if (isBrandIcon) {\n <svg\n class=\"ui-icon ui-icon--brand\"\n [attr.width]=\"size\"\n [attr.height]=\"size\"\n [attr.fill]=\"color\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path [attr.d]=\"brandIcon?.path\"></path>\n </svg>\n} @else {\n <lucide-icon\n class=\"ui-icon ui-icon--lucide\"\n [name]=\"name\"\n [size]=\"size\"\n [color]=\"color\"\n ></lucide-icon>\n}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'ui-icon',\n standalone: true,\n template: '',\n})\nexport class MockUiIconComponent {\n @Input() name!: string;\n @Input() size = 24;\n @Input() color = 'currentColor';\n}","import { CommonModule } from '@angular/common';\nimport { Component, HostBinding, Inject, Input, OnChanges, OnInit, Optional } from '@angular/core';\nimport { CloudinaryModule, lazyload, responsive } from '@cloudinary/ng';\nimport { CloudinaryImage } from '@cloudinary/url-gen';\nimport { format, quality } from '@cloudinary/url-gen/actions/delivery';\nimport { limitFit } from '@cloudinary/url-gen/actions/resize';\nimport { auto } from '@cloudinary/url-gen/qualifiers/format';\nimport { auto as qAuto } from '@cloudinary/url-gen/qualifiers/quality';\nimport { CLOUDINARY_CLOUD_NAME } from '@lluc_llull/ui-lib/mapper';\n\n@Component({\n selector: 'ui-image',\n standalone: true,\n imports: [CommonModule, CloudinaryModule],\n templateUrl: './ui-image.component.html',\n styleUrl: './ui-image.component.scss',\n})\nexport class UiImageComponent implements OnChanges, OnInit {\n @Input({ required: true }) publicId!: string;\n @Input() cloudName?: string;\n @Input() transformations?: any;\n @Input() eager: boolean = false;\n @Input() width?: number | null;\n @Input() height?: number | null;\n\n img!: CloudinaryImage;\n plugins: any[] = [];\n\n constructor(@Optional() @Inject(CLOUDINARY_CLOUD_NAME) private globalCloudName?: string) {}\n\n ngOnInit(): void {\n this.initImage();\n }\n\n ngOnChanges(): void {\n this.initImage();\n }\n\n @HostBinding('style.--ui-image-ratio')\n get aspectRatioStyle(): string | null {\n if (this.width && this.height) {\n return `${this.width} / ${this.height}`;\n }\n return null;\n }\n\n private initImage(): void {\n const activeCloudName = this.cloudName || this.globalCloudName;\n\n if (this.publicId && activeCloudName) {\n this.img = new CloudinaryImage(this.publicId, { cloudName: activeCloudName })\n .delivery(format(auto()))\n .delivery(quality(qAuto()))\n .resize(limitFit().width(1920));\n\n this.plugins = [responsive({ steps: 200 })];\n\n if (!this.eager) {\n this.plugins.push(lazyload());\n }\n } else if (!activeCloudName) {\n console.warn(\n '[UiImageComponent]: No cloudName provided. Please provide it via @Input() or the CLOUDINARY_CLOUD_NAME InjectionToken.',\n );\n }\n }\n}\n","@if (img) {\n @if (eager) {\n <img [src]=\"img.toURL()\" fetchpriority=\"high\" loading=\"eager\" alt=\"\"\n [attr.width]=\"width ?? null\" [attr.height]=\"height ?? null\" />\n } @else {\n <advanced-image [cldImg]=\"img\" [plugins]=\"plugins\"></advanced-image>\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAkCA,IAAa,kBAAb,MAAa,gBAAe;CACf;CACA,OAAO;CACP,QAAQ;CAET;CAER,cAAW;EACP,KAAK,iBAAgB;CACzB;CAEA,IAAI,cAAW;EACX,OAAO,CAAC,CAAC,KAAK;CAClB;CAEA,IAAI,YAAS;EACT,OAAO,KAAK,QAAQ;CACxB;CAEQ,mBAAgB;EACpB,IAAI,CAAC,KAAK,MAAM;GACZ,KAAK,OAAO;GACZ;EACJ;EAEA,MAAM,MACF,OAAO,KAAK,KAAK,QAAQ,eAAe,EAAE,CAAC,CAAC,QAAQ,QAAQ,MAAM,EAAE,YAAW,CAAE;EAErF,KAAK,OAAQ,YAAoB,QAAQ;CAC7C;CA7BS,OAAA,OAAA,GAAA,mBAAA;E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