@libs-ui/components-skeleton 0.2.304 → 0.2.306-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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libs-ui-components-skeleton.mjs","sources":["../../../../../libs-ui/components/skeleton/src/skeleton.component.ts","../../../../../libs-ui/components/skeleton/src/skeleton.component.html","../../../../../libs-ui/components/skeleton/src/libs-ui-components-skeleton.ts"],"sourcesContent":["import { NgTemplateOutlet } from \"@angular/common\";\nimport { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, input, signal, viewChild } from \"@angular/core\";\nimport { ISkeletonConfig } from \"./interfaces/skeleton-item.interface\";\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'libs_ui-components-skeleton',\n templateUrl: 'skeleton.component.html',\n styleUrls: ['./skeleton.component.scss'],\n standalone: true,\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class LibsUiComponentsSkeletonComponent implements AfterViewInit {\n protected configRender = signal<ISkeletonConfig>({})\n\n readonly config = input<ISkeletonConfig, ISkeletonConfig | undefined>({}, { transform: value => value || {} });\n\n readonly skeletonRef = viewChild.required<ElementRef>('skeletonRef');\n\n ngAfterViewInit(): void {\n setTimeout(() => {\n this.configRender.update(config => {\n config = this.config();\n let offsetHeight = this.skeletonRef().nativeElement.offsetHeight;\n if (!config.rows?.length) {\n config.rows = [{ item: {} }];\n }\n if (!config.heightContainer) {\n config.heightContainer = offsetHeight - (config.styleMarginBottom || 0);\n }\n if (config.repeat) {\n offsetHeight = offsetHeight || config.heightContainer || config.styleMarginBottom || 0;\n config.heightContainer = (offsetHeight / config.repeat) - (config.styleMarginBottom || 0);\n }\n config.repeat = Math.ceil((offsetHeight / ((config.heightContainer || 0) + (config.styleMarginBottom || 0))));\n\n return { ...config };\n });\n });\n }\n}","<div #skeletonRef\n class=\"w-full h-full\">\n @if (configRender(); as config) {\n @for (configRepeat of [].constructor(config.repeat || 1);track $index;let lastItem = $last) {\n <div [style.marginBottom.px]=\"(config.styleMarginBottom && !lastItem) ? config.styleMarginBottom:0\"\n [style.height]=\"config.heightContainer ? (config.heightContainer+'px') : '100%'\"\n [class]=\"(config.classRows || '')+' flex flex-col'\">\n @for (row of config.rows;track $index;) {\n @for (rowRepeat of [].constructor(row.repeat || 1);track $index;let firstRow = $first;let lastRow = $last) {\n <div\n [class]=\"((lastRow || (firstRow && lastRow) ? row.classRowLast : row.classRow) || '')+ ' flex flex-col w-full h-full'\">\n @if (row.item) {\n <ng-container *ngTemplateOutlet=\"templateSkeleton; context: { config :row.item }\" />\n }\n <div [class]=\"((lastRow || firstRow && lastRow ? row.classColsLast : row.classCols) || '')+'flex w-full'\">\n @for (col of row.cols;track $index;) {\n @for (colRepeat of [].constructor(col.repeat || 1);track $index;let firstCol = $first;let lastCol = $last) {\n <div\n [class]=\"((lastCol || firstCol && lastCol ? col.classColLast : col.classCol) || '')+ ' flex w-full'\">\n @if (col.item) {\n <ng-container *ngTemplateOutlet=\"templateSkeleton; context: { config :col.item }\" />\n }\n </div>\n }\n }\n </div>\n </div>\n }}\n </div>\n }\n }\n</div>\n\n<ng-template #templateSkeleton\n let-config=\"config\">\n <div [class]=\"config?.classInclude || 'w-full h-full' \">\n @for (_ of [].constructor(config.repeat || 1);track $index; let last = $last) {\n <div class=\"w-full h-full skeleton rounded-[8px] {{ config?.classIncludeItem || '' }}\"\n [class.mb-[16px]]=\"config?.styleDefault && !last\">\n </div>\n }\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAaa,iCAAiC,CAAA;AAClC,IAAA,YAAY,GAAG,MAAM,CAAkB,EAAE,CAAC;AAE3C,IAAA,MAAM,GAAG,KAAK,CAA+C,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,IAAI,KAAK,IAAI,EAAE,EAAE,CAAC;AAErG,IAAA,WAAW,GAAG,SAAS,CAAC,QAAQ,CAAa,aAAa,CAAC;IAEpE,eAAe,GAAA;QACb,UAAU,CAAC,MAAK;AACd,YAAA,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,IAAG;AAChC,gBAAA,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;gBACtB,IAAI,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,YAAY;AAChE,gBAAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE;oBACxB,MAAM,CAAC,IAAI,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC
|
|
1
|
+
{"version":3,"file":"libs-ui-components-skeleton.mjs","sources":["../../../../../libs-ui/components/skeleton/src/skeleton.component.ts","../../../../../libs-ui/components/skeleton/src/skeleton.component.html","../../../../../libs-ui/components/skeleton/src/libs-ui-components-skeleton.ts"],"sourcesContent":["import { NgTemplateOutlet } from \"@angular/common\";\nimport { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, input, signal, viewChild } from \"@angular/core\";\nimport { ISkeletonConfig } from \"./interfaces/skeleton-item.interface\";\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'libs_ui-components-skeleton',\n templateUrl: 'skeleton.component.html',\n styleUrls: ['./skeleton.component.scss'],\n standalone: true,\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class LibsUiComponentsSkeletonComponent implements AfterViewInit {\n protected configRender = signal<ISkeletonConfig>({})\n\n readonly config = input<ISkeletonConfig, ISkeletonConfig | undefined>({}, { transform: value => value || {} });\n\n readonly skeletonRef = viewChild.required<ElementRef>('skeletonRef');\n\n ngAfterViewInit(): void {\n setTimeout(() => {\n this.configRender.update(config => {\n config = this.config();\n let offsetHeight = this.skeletonRef().nativeElement.offsetHeight;\n if (!config.rows?.length) {\n config.rows = [{ item: {} }];\n }\n if (!config.heightContainer) {\n config.heightContainer = offsetHeight - (config.styleMarginBottom || 0);\n }\n if (config.repeat) {\n offsetHeight = offsetHeight || config.heightContainer || config.styleMarginBottom || 0;\n config.heightContainer = (offsetHeight / config.repeat) - (config.styleMarginBottom || 0);\n }\n config.repeat = Math.ceil((offsetHeight / ((config.heightContainer || 0) + (config.styleMarginBottom || 0))));\n\n return { ...config };\n });\n });\n }\n}","<div #skeletonRef\n class=\"w-full h-full\">\n @if (configRender(); as config) {\n @for (configRepeat of [].constructor(config.repeat || 1);track $index;let lastItem = $last) {\n <div [style.marginBottom.px]=\"(config.styleMarginBottom && !lastItem) ? config.styleMarginBottom:0\"\n [style.height]=\"config.heightContainer ? (config.heightContainer+'px') : '100%'\"\n [class]=\"(config.classRows || '')+' flex flex-col'\">\n @for (row of config.rows;track $index;) {\n @for (rowRepeat of [].constructor(row.repeat || 1);track $index;let firstRow = $first;let lastRow = $last) {\n <div\n [class]=\"((lastRow || (firstRow && lastRow) ? row.classRowLast : row.classRow) || '')+ ' flex flex-col w-full h-full'\">\n @if (row.item) {\n <ng-container *ngTemplateOutlet=\"templateSkeleton; context: { config :row.item }\" />\n }\n <div [class]=\"((lastRow || firstRow && lastRow ? row.classColsLast : row.classCols) || '')+'flex w-full'\">\n @for (col of row.cols;track $index;) {\n @for (colRepeat of [].constructor(col.repeat || 1);track $index;let firstCol = $first;let lastCol = $last) {\n <div\n [class]=\"((lastCol || firstCol && lastCol ? col.classColLast : col.classCol) || '')+ ' flex w-full'\">\n @if (col.item) {\n <ng-container *ngTemplateOutlet=\"templateSkeleton; context: { config :col.item }\" />\n }\n </div>\n }\n }\n </div>\n </div>\n }}\n </div>\n }\n }\n</div>\n\n<ng-template #templateSkeleton\n let-config=\"config\">\n <div [class]=\"config?.classInclude || 'w-full h-full' \">\n @for (_ of [].constructor(config.repeat || 1);track $index; let last = $last) {\n <div class=\"w-full h-full skeleton rounded-[8px] {{ config?.classIncludeItem || '' }}\"\n [class.mb-[16px]]=\"config?.styleDefault && !last\">\n </div>\n }\n </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