diff --git a/apps/demo/src/app/core/image-gallery/components/image-gallery.component.html b/apps/demo/src/app/core/image-gallery/components/image-gallery.component.html index bbf2e8aea7..9fbde695d3 100644 --- a/apps/demo/src/app/core/image-gallery/components/image-gallery.component.html +++ b/apps/demo/src/app/core/image-gallery/components/image-gallery.component.html @@ -1,12 +1,9 @@ - - - + - - {{image.label}} - - - + alt="{{image.label}}" + src="{{image.url}}" + width="594" + height="737"> + + diff --git a/apps/demo/src/app/core/image-gallery/components/image-gallery.component.spec.ts b/apps/demo/src/app/core/image-gallery/components/image-gallery.component.spec.ts index 0259500321..9ed74f9573 100644 --- a/apps/demo/src/app/core/image-gallery/components/image-gallery.component.spec.ts +++ b/apps/demo/src/app/core/image-gallery/components/image-gallery.component.spec.ts @@ -9,14 +9,10 @@ import { provideMockStore, MockStore, } from '@ngrx/store/testing'; -import { cold } from 'jasmine-marbles'; -import { DaffImageGalleryModule } from '@daffodil/design'; +import { DaffMediaGalleryModule } from '@daffodil/design/media-gallery'; import { ImageGalleryComponent } from './image-gallery.component'; -import { SetSelectedImageState } from '../actions/image-gallery.actions'; -import * as fromDemoImageGallery from '../reducers'; - const stubImages = [ { url: '/assets/mh01-black_main.jpg', label: 'testlabel' }, @@ -32,14 +28,13 @@ describe('ImageGalleryComponent', () => { let wrapper: WrapperComponent; let fixture: ComponentFixture; let imageGalleryContainer: ImageGalleryComponent; - const activeImageIndex = 0; let daffGalleryImages; let store: MockStore; beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ - DaffImageGalleryModule, + DaffMediaGalleryModule, ], declarations: [ WrapperComponent, @@ -57,12 +52,11 @@ describe('ImageGalleryComponent', () => { wrapper = fixture.componentInstance; store = TestBed.inject(MockStore); - store.overrideSelector(fromDemoImageGallery.selectSelectedImage, stubImages[activeImageIndex].url); fixture.detectChanges(); imageGalleryContainer = fixture.debugElement.query(By.css('demo-image-gallery-container')).componentInstance; - daffGalleryImages = fixture.debugElement.queryAll(By.css('daff-gallery-image')); + daffGalleryImages = fixture.debugElement.queryAll(By.css('daff-media-gallery')); }); afterAll(() => store.resetSelectors()); @@ -74,64 +68,4 @@ describe('ImageGalleryComponent', () => { it('should be able to take images as input', () => { expect(imageGalleryContainer.images).toEqual(stubImages); }); - - it('should render a daff-gallery-image for every image in images', () => { - expect(daffGalleryImages.length).toEqual(stubImages.length); - }); - - describe('on daff-gallery-image', () => { - describe('when daff-gallery-image is the selectedImage', () => { - it('should set selected to true', () => { - expect(daffGalleryImages[activeImageIndex].componentInstance.selected).toBeTruthy(); - }); - }); - - describe('when daff-gallery-image is not the selectedImage', () => { - it('should set selected to false', () => { - expect(daffGalleryImages[1].componentInstance.selected).toBeFalsy(); - }); - }); - }); - - describe('when img is clicked', () => { - - it('should call select with image.url', () => { - spyOn(imageGalleryContainer, 'select'); - daffGalleryImages[activeImageIndex].query(By.css('img')).nativeElement.click(); - - expect(imageGalleryContainer.select).toHaveBeenCalledWith(imageGalleryContainer.images[activeImageIndex].url); - }); - }); - - describe('ngOnInit', () => { - - beforeEach(() => { - spyOn(imageGalleryContainer, 'select'); - imageGalleryContainer.ngOnInit(); - }); - - it('should call select with the first image', () => { - expect(imageGalleryContainer.select).toHaveBeenCalledWith(imageGalleryContainer.images[0].url); - }); - - it('should initialize selectedImage$', () => { - const expected = cold('a', { a: imageGalleryContainer.images[0].url }); - expect(imageGalleryContainer.selectedImage$).toBeObservable(expected); - - }); - }); - - describe('select', () => { - - beforeEach(() => { - spyOn(store, 'dispatch'); - }); - - it('should call store.dispatch', () => { - const stubSelectedImage = stubImages[1].url; - imageGalleryContainer.select(stubSelectedImage); - - expect(store.dispatch).toHaveBeenCalledWith(new SetSelectedImageState(stubSelectedImage)); - }); - }); }); diff --git a/apps/demo/src/app/core/image-gallery/components/image-gallery.component.ts b/apps/demo/src/app/core/image-gallery/components/image-gallery.component.ts index d9ef4d607a..2b1ffe1a63 100644 --- a/apps/demo/src/app/core/image-gallery/components/image-gallery.component.ts +++ b/apps/demo/src/app/core/image-gallery/components/image-gallery.component.ts @@ -10,6 +10,8 @@ import { } from '@ngrx/store'; import { Observable } from 'rxjs'; +import { daffThumbnailCompatToken } from '@daffodil/design/media-gallery'; + import { SetSelectedImageState } from '../actions/image-gallery.actions'; import * as fromDemoImageGallery from '../reducers/index'; @@ -17,11 +19,16 @@ import * as fromDemoImageGallery from '../reducers/index'; selector: 'demo-image-gallery-container', templateUrl: './image-gallery.component.html', encapsulation: ViewEncapsulation.None, + providers: [ + { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + provide: daffThumbnailCompatToken, useFactory: () => ImageGalleryComponent, + }, + ], }) export class ImageGalleryComponent implements OnInit { @Input() images; - selectedImage$: Observable; constructor( private store: Store, @@ -29,7 +36,6 @@ export class ImageGalleryComponent implements OnInit { ngOnInit() { this.select(this.images[0].url); - this.selectedImage$ = this.store.pipe(select(fromDemoImageGallery.selectSelectedImage)); } select(image: string) { diff --git a/apps/demo/src/app/core/image-gallery/image-gallery.module.ts b/apps/demo/src/app/core/image-gallery/image-gallery.module.ts index e0cfa98649..be006dd3b5 100644 --- a/apps/demo/src/app/core/image-gallery/image-gallery.module.ts +++ b/apps/demo/src/app/core/image-gallery/image-gallery.module.ts @@ -1,7 +1,8 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { DaffImageGalleryModule } from '@daffodil/design'; +import { DaffImageModule } from '@daffodil/design/image'; +import { DaffMediaGalleryModule } from '@daffodil/design/media-gallery'; import { ImageGalleryComponent } from './components/image-gallery.component'; import { DemoImageGalleryStateModule } from './image-gallery.state.module'; @@ -10,7 +11,8 @@ import { DemoImageGalleryStateModule } from './image-gallery.state.module'; imports: [ CommonModule, DemoImageGalleryStateModule, - DaffImageGalleryModule, + DaffMediaGalleryModule, + DaffImageModule, ], declarations: [ ImageGalleryComponent, diff --git a/apps/design-land/src/app/app-routing.module.ts b/apps/design-land/src/app/app-routing.module.ts index a0f25cb9a5..ceb9a957ca 100644 --- a/apps/design-land/src/app/app-routing.module.ts +++ b/apps/design-land/src/app/app-routing.module.ts @@ -26,7 +26,6 @@ export const appRoutes: Routes = [ { path: 'list', loadChildren: () => import('./list/list.module').then(m => m.DesignLandListModule) }, { path: 'loading-icon', loadChildren: () => import('./loading-icon/loading-icon.module').then(m => m.DesignLandLoadingIconModule) }, { path: 'image', loadChildren: () => import('./image/image.module').then(m => m.DesignLandImageModule) }, - { path: 'image-gallery', loadChildren: () => import('./image-gallery/image-gallery.module').then(m => m.DesignLandImageGalleryModule) }, { path: 'input', loadChildren: () => import('./input/input.module').then(m => m.DesignLandInputModule) }, { path: 'navbar', loadChildren: () => import('./navbar/navbar.module').then(m => m.DesignLandNavbarModule) }, { path: 'media-gallery', loadChildren: () => import('./media-gallery/media-gallery.module').then(m => m.DesignLandMediaGalleryModule) }, diff --git a/apps/design-land/src/app/image-gallery/image-gallery-routing-module.ts b/apps/design-land/src/app/image-gallery/image-gallery-routing-module.ts deleted file mode 100644 index 19fa4c8af8..0000000000 --- a/apps/design-land/src/app/image-gallery/image-gallery-routing-module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgModule } from '@angular/core'; -import { - Routes, - RouterModule, -} from '@angular/router'; - -import { DesignLandImageGalleryComponent } from './image-gallery.component'; - -export const imagegalleryRoutes: Routes = [ - { path: '', component: DesignLandImageGalleryComponent }, -]; - -@NgModule({ - imports: [ - RouterModule.forChild(imagegalleryRoutes), - ], - exports: [ - RouterModule, - ], -}) -export class DesignLandImageGalleryRoutingModule {} diff --git a/apps/design-land/src/app/image-gallery/image-gallery.component.html b/apps/design-land/src/app/image-gallery/image-gallery.component.html deleted file mode 100644 index 1bb5fdd6c9..0000000000 --- a/apps/design-land/src/app/image-gallery/image-gallery.component.html +++ /dev/null @@ -1,9 +0,0 @@ -

Daff Image Gallery

-

The Image Gallery component is deprecated

- - - - {{image.label}} - - {{selectedImage.label}} - \ No newline at end of file diff --git a/apps/design-land/src/app/image-gallery/image-gallery.component.scss b/apps/design-land/src/app/image-gallery/image-gallery.component.scss deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/apps/design-land/src/app/image-gallery/image-gallery.component.spec.ts b/apps/design-land/src/app/image-gallery/image-gallery.component.spec.ts deleted file mode 100644 index 3d7393d6f1..0000000000 --- a/apps/design-land/src/app/image-gallery/image-gallery.component.spec.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - waitForAsync, - ComponentFixture, - TestBed, -} from '@angular/core/testing'; - -import { DesignLandImageGalleryComponent } from './image-gallery.component'; - -describe('DesignLandImageGalleryComponent', () => { - let component: DesignLandImageGalleryComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ DesignLandImageGalleryComponent ], - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(DesignLandImageGalleryComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/apps/design-land/src/app/image-gallery/image-gallery.component.ts b/apps/design-land/src/app/image-gallery/image-gallery.component.ts deleted file mode 100644 index aea8631d6c..0000000000 --- a/apps/design-land/src/app/image-gallery/image-gallery.component.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { - Component, - OnInit, -} from '@angular/core'; - -@Component({ - selector: 'design-land-image-gallery', - templateUrl: './image-gallery.component.html', - styleUrls: ['./image-gallery.component.scss'], -}) -export class DesignLandImageGalleryComponent implements OnInit { - - selectedImage = { url: '', label: '' }; - - images = [ - { - url: 'https://cdn.pixabay.com/photo/2018/04/25/14/34/daffodil-3349706_960_720.jpg', - label: 'daffodil1', - - }, - { - url: 'https://cdn.pixabay.com/photo/2019/04/03/17/18/daffodil-4100845_960_720.jpg', - label: 'daffodil2', - - }, - { - url: 'https://cdn.pixabay.com/photo/2011/04/13/01/46/daffodils-6454__340.jpg', - label: 'daffodil3', - }, - { - url: 'https://cdn.pixabay.com/photo/2013/03/11/19/41/diary-92652__340.jpg', - label: 'daffodil4', - }, - { - url: 'https://images.dog.ceo/breeds/husky/n02110185_632.jpg', - label: 'husky', - }, - { - url: 'https://cdn.pixabay.com/photo/2019/04/12/02/42/daffodil-4121255__340.jpg', - label: 'daffodil5', - }, - { - url: 'https://cdn.pixabay.com/photo/2017/02/23/21/51/daffodils-2093307__340.jpg', - label: 'daffodil6', - }, - { - url: 'https://images.dog.ceo/breeds/husky/n02110185_10898.jpg', - label: 'husky', - }, - { - url: 'https://cdn.pixabay.com/photo/2016/02/23/20/19/osterglocken-1218446__340.jpg', - label: 'daffodil7', - }, - ]; - - constructor() { } - - ngOnInit() { - this.selectedImage = this.images[Math.floor(Math.random() * this.images.length)]; - } -} diff --git a/apps/design-land/src/app/image-gallery/image-gallery.module.ts b/apps/design-land/src/app/image-gallery/image-gallery.module.ts deleted file mode 100644 index 2863e7999b..0000000000 --- a/apps/design-land/src/app/image-gallery/image-gallery.module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; - -import { DaffImageGalleryModule } from '@daffodil/design'; - -import { DesignLandImageGalleryRoutingModule } from './image-gallery-routing-module'; -import { DesignLandImageGalleryComponent } from './image-gallery.component'; - - -@NgModule({ - declarations: [ - DesignLandImageGalleryComponent, - ], - imports: [ - CommonModule, - DesignLandImageGalleryRoutingModule, - - DaffImageGalleryModule, - - ], -}) -export class DesignLandImageGalleryModule { } diff --git a/apps/design-land/src/assets/nav.json b/apps/design-land/src/assets/nav.json index 98ff9b5970..f5967f1080 100644 --- a/apps/design-land/src/assets/nav.json +++ b/apps/design-land/src/assets/nav.json @@ -166,13 +166,6 @@ "items": [], "data": {} }, - { - "title": "Image Gallery", - "url": "image-gallery", - "id": "image-gallery", - "items": [], - "data": {} - }, { "title": "Link Set", "url": "link-set", diff --git a/libs/design/README.md b/libs/design/README.md index 6e42fbfdfa..8572bae27e 100644 --- a/libs/design/README.md +++ b/libs/design/README.md @@ -46,7 +46,6 @@ Refer to the [Upgrade Guide](./guides/upgrading.md). * [Callout](./src/molecules/callout/README.md) * [Card](./src/molecules/card/README.md) * [Hero](./src/molecules/hero/README.md) -* [Image Gallery](./src/molecules/image-gallery/README.md) * [Image List](./src/molecules/image-list/README.md) * [Link Set](./src/molecules/link-set/README.md) * [List](./src/molecules/list/README.md) diff --git a/libs/design/src/molecules/image-gallery/README.md b/libs/design/src/molecules/image-gallery/README.md deleted file mode 100644 index 9fb26d6784..0000000000 --- a/libs/design/src/molecules/image-gallery/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# Daff Image Gallery Component -The Image Gallery component is deprecated. - -The daff image gallery component wraps img elements to display them in a gallery. It takes a list of imgs and an active image, and the selected image is controlled by the user. The position of the list of images changes depending on screen size. - -Images need to be wrapped in daff-gallery-image components, so the images can be properly wrapped and sized. The active image should be the same as the selected image, and it needs to have the attribute `daff-active-image`. - -## Daff Gallery Image Inputs - -### select - -``` -- boolean added for the selected image -``` - -## Usage - -``` - - - - - {{image.label}} - - - -``` diff --git a/libs/design/src/molecules/image-gallery/gallery-image/gallery-image.component.html b/libs/design/src/molecules/image-gallery/gallery-image/gallery-image.component.html deleted file mode 100644 index 047301a0b1..0000000000 --- a/libs/design/src/molecules/image-gallery/gallery-image/gallery-image.component.html +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/libs/design/src/molecules/image-gallery/gallery-image/gallery-image.component.spec.ts b/libs/design/src/molecules/image-gallery/gallery-image/gallery-image.component.spec.ts deleted file mode 100644 index cde272649f..0000000000 --- a/libs/design/src/molecules/image-gallery/gallery-image/gallery-image.component.spec.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Component } from '@angular/core'; -import { - waitForAsync, - ComponentFixture, - TestBed, -} from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; - -import { DaffGalleryImageComponent } from './gallery-image.component'; - -@Component({ template: '
' }) -class WrapperComponent { - selectedValue = true; -} - -describe('DaffGalleryImageComponent', () => { - let wrapper: WrapperComponent; - let fixture: ComponentFixture; - let hostElement; - let component: DaffGalleryImageComponent; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ - WrapperComponent, - DaffGalleryImageComponent, - ], - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(WrapperComponent); - wrapper = fixture.componentInstance; - - hostElement = fixture.debugElement.query(By.css('.host-component')); - component = fixture.debugElement.query(By.css('daff-gallery-image')).componentInstance; - - fixture.detectChanges(); - }); - - it('should create', () => { - expect(wrapper).toBeTruthy(); - }); - - it('should add an daff-image-gallery__daff-gallery-image class to host element', () => { - expect(hostElement.nativeElement.classList.contains('daff-image-gallery__daff-gallery-image')).toBeTruthy(); - }); - - it('should transclude', () => { - expect(hostElement.query(By.css('.inner-element'))).not.toBeNull(); - }); - - it('should be able to take selected as input', () => { - expect(component.selected).toEqual(true); - }); - - describe('when selected is true', () => { - - it('should add the daff-image-gallery__daff-gallery-image--selected class to host element', () => { - wrapper.selectedValue = true; - fixture.detectChanges(); - - expect(hostElement.nativeElement.classList.contains('daff-image-gallery__daff-gallery-image--selected')).toBeTruthy(); - }); - }); - - describe('when selected is false', () => { - - it('should not add the daff-image-gallery__daff-gallery-image--selected class to host element', () => { - wrapper.selectedValue = false; - fixture.detectChanges(); - - expect(hostElement.nativeElement.classList.contains('daff-image-gallery__daff-gallery-image--selected')).toBeFalsy(); - }); - }); -}); diff --git a/libs/design/src/molecules/image-gallery/gallery-image/gallery-image.component.ts b/libs/design/src/molecules/image-gallery/gallery-image/gallery-image.component.ts deleted file mode 100644 index f9c0e74345..0000000000 --- a/libs/design/src/molecules/image-gallery/gallery-image/gallery-image.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - Component, - Input, - HostBinding, - ChangeDetectionStrategy, -} from '@angular/core'; - -/** - * @deprecated See {@link DaffThumbnailDirective} - */ -@Component({ - selector: 'daff-gallery-image', - templateUrl: './gallery-image.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class DaffGalleryImageComponent { - @HostBinding('class.daff-image-gallery__daff-gallery-image--selected') @Input() selected: boolean; - @HostBinding('class.daff-image-gallery__daff-gallery-image') class = true; -} diff --git a/libs/design/src/molecules/image-gallery/image-gallery.module.ts b/libs/design/src/molecules/image-gallery/image-gallery.module.ts deleted file mode 100644 index 8ce46bfaa4..0000000000 --- a/libs/design/src/molecules/image-gallery/image-gallery.module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; - -import { DaffGalleryImageComponent } from './gallery-image/gallery-image.component'; -import { DaffImageGalleryComponent } from './image-gallery/image-gallery.component'; -import { DaffImageListModule } from '../image-list/public_api'; - -@NgModule({ - imports: [ - CommonModule, - DaffImageListModule, - ], - declarations: [ - DaffImageGalleryComponent, - DaffGalleryImageComponent, - ], - exports: [ - DaffImageGalleryComponent, - DaffGalleryImageComponent, - ], -}) -export class DaffImageGalleryModule { } diff --git a/libs/design/src/molecules/image-gallery/image-gallery/image-gallery.component.html b/libs/design/src/molecules/image-gallery/image-gallery/image-gallery.component.html deleted file mode 100644 index 4c56d41871..0000000000 --- a/libs/design/src/molecules/image-gallery/image-gallery/image-gallery.component.html +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/libs/design/src/molecules/image-gallery/image-gallery/image-gallery.component.scss b/libs/design/src/molecules/image-gallery/image-gallery/image-gallery.component.scss deleted file mode 100644 index 2f3fb49fc3..0000000000 --- a/libs/design/src/molecules/image-gallery/image-gallery/image-gallery.component.scss +++ /dev/null @@ -1,47 +0,0 @@ -@use '../../../../scss/layout'; - -.daff-image-gallery { - display: grid; - flex-direction: column; - grid-template-areas: 'active-image' 'image-list'; - max-height: 100%; - - @include layout.breakpoint(big-tablet) { - grid-template-areas: 'image-list active-image'; - max-height: min-content; - } - - &__active-image { - grid-area: active-image; - - img { - display: block; - max-width: 100%; - } - } - - &__image-list { - grid-area: image-list; - margin: 5px 0 0; - max-height: 100%; - - @include layout.breakpoint(big-tablet) { - margin: 0 25px 0 0; - max-height: -webkit-fill-available; - } - } - - &__daff-gallery-image { - img { - display: block; - opacity: 0.6; - width: 90px; - } - - &--selected { - img { - opacity: 1; - } - } - } -} diff --git a/libs/design/src/molecules/image-gallery/image-gallery/image-gallery.component.spec.ts b/libs/design/src/molecules/image-gallery/image-gallery/image-gallery.component.spec.ts deleted file mode 100644 index 384702585b..0000000000 --- a/libs/design/src/molecules/image-gallery/image-gallery/image-gallery.component.spec.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Component } from '@angular/core'; -import { - waitForAsync, - ComponentFixture, - TestBed, -} from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; - -import { DaffImageGalleryComponent } from './image-gallery.component'; -import { DaffImageListComponent } from '../../image-list/public_api'; -import { DaffGalleryImageComponent } from '../gallery-image/gallery-image.component'; - -@Component({ template: - ` -
- -
` }) -class WrapperComponent {} - -describe('DaffImageGalleryComponent', () => { - let wrapper: WrapperComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ - WrapperComponent, - DaffImageListComponent, - DaffImageGalleryComponent, - DaffGalleryImageComponent, - ], - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(WrapperComponent); - wrapper = fixture.componentInstance; - - fixture.detectChanges(); - }); - - it('should create', () => { - expect(wrapper).toBeTruthy(); - }); - - it('should render [daff-active-image] inside .daff-image-gallery__active-image', () => { - const activeImageElement = fixture.debugElement.query(By.css('.daff-image-gallery__active-image')); - - expect(activeImageElement.query(By.css('.test-active-image'))).not.toBeNull(); - }); - - it('should render daff-gallery-image inside .daff-image-gallery__image-list', () => { - const imageListElement = fixture.debugElement.query(By.css('.daff-image-gallery__image-list')); - - expect(imageListElement.query(By.css('.test-gallery-image'))).not.toBeNull(); - }); -}); diff --git a/libs/design/src/molecules/image-gallery/image-gallery/image-gallery.component.ts b/libs/design/src/molecules/image-gallery/image-gallery/image-gallery.component.ts deleted file mode 100644 index 4bfd6ace09..0000000000 --- a/libs/design/src/molecules/image-gallery/image-gallery/image-gallery.component.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { - ChangeDetectionStrategy, - Component, - ViewEncapsulation, -} from '@angular/core'; - -/** - * @deprecated See {@link DaffMediaGalleryComponent} - */ -@Component({ - selector: 'daff-image-gallery', - templateUrl: './image-gallery.component.html', - styleUrls: ['./image-gallery.component.scss'], - encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class DaffImageGalleryComponent {} diff --git a/libs/design/src/molecules/image-gallery/public_api.ts b/libs/design/src/molecules/image-gallery/public_api.ts deleted file mode 100644 index a642241352..0000000000 --- a/libs/design/src/molecules/image-gallery/public_api.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './image-gallery/image-gallery.component'; -export * from './gallery-image/gallery-image.component'; -export { DaffImageGalleryModule } from './image-gallery.module'; diff --git a/libs/design/src/molecules/image-list/README.md b/libs/design/src/molecules/image-list/README.md deleted file mode 100644 index 667845b3c9..0000000000 --- a/libs/design/src/molecules/image-list/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Daff Image List Component - -The daff image list component wraps elements (usually imgs) to display them in a list. The position of the list of images is vertical when the screen size is larger than 1024px, and is horizontal when the smaller. - -## Usage - -``` - - label - label - label - label - -``` diff --git a/libs/design/src/molecules/image-list/image-list.component.scss b/libs/design/src/molecules/image-list/image-list.component.scss deleted file mode 100644 index 7c0d12e7f5..0000000000 --- a/libs/design/src/molecules/image-list/image-list.component.scss +++ /dev/null @@ -1,33 +0,0 @@ -// @use '../../../scss/interactions'; -// @use '../../../scss/layout'; -// @use '../../../scss/theming' as c; - -// .daff-image-list { -// overflow: scroll; -// white-space: nowrap; - -// > * { -// @include interactions.clickable; -// display: inline-block; -// margin: 0 5px 0 0; - -// @include layout.breakpoint(big-tablet) { -// display: block; -// margin: 0 0 5px; -// } - -// &:last-child { -// margin: 0; -// } -// } -// } - -// ::-webkit-scrollbar { -// height: 2px; -// width: 2px; -// } - -// ::-webkit-scrollbar-thumb { -// box-shadow: inset 0 0 3px c.daff-color(c.$daff-neutral, 40); -// -webkit-box-shadow: inset 0 0 3px c.daff-color(c.$daff-neutral, 40); -// } diff --git a/libs/design/src/molecules/image-list/image-list.component.spec.ts b/libs/design/src/molecules/image-list/image-list.component.spec.ts deleted file mode 100644 index a6b33fe0bf..0000000000 --- a/libs/design/src/molecules/image-list/image-list.component.spec.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { - Component, - DebugElement, -} from '@angular/core'; -import { - waitForAsync, - ComponentFixture, - TestBed, -} from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; - -import { DaffImageListComponent } from './image-list.component'; - -@Component ({ - template: ``, -}) - -class WrapperComponent {} - -describe('DaffImageListComponent', () => { - let fixture: ComponentFixture; - let de: DebugElement; - let wrapper: WrapperComponent; - let component: DaffImageListComponent; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ - DaffImageListComponent, - WrapperComponent, - ], - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(WrapperComponent); - wrapper = fixture.componentInstance; - de = fixture.debugElement.query(By.css('daff-image-list')); - component = de.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(wrapper).toBeTruthy(); - }); - - describe('', () => { - it('should add a class of "daff-image-list" to the host element', () => { - expect(de.classes).toEqual(jasmine.objectContaining({ - 'daff-image-list': true, - })); - }); - }); -}); diff --git a/libs/design/src/molecules/image-list/image-list.component.ts b/libs/design/src/molecules/image-list/image-list.component.ts deleted file mode 100644 index fd08ae2a42..0000000000 --- a/libs/design/src/molecules/image-list/image-list.component.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { - Component, - ViewEncapsulation, - HostBinding, - ChangeDetectionStrategy, -} from '@angular/core'; - -@Component({ - selector: 'daff-image-list', - template: '', - styleUrls: ['./image-list.component.scss'], - encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class DaffImageListComponent { - - /** - * @docs-private - */ - @HostBinding('class.daff-image-list') class = true; -} diff --git a/libs/design/src/molecules/image-list/image-list.module.ts b/libs/design/src/molecules/image-list/image-list.module.ts deleted file mode 100644 index 64e311e5a8..0000000000 --- a/libs/design/src/molecules/image-list/image-list.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; - -import { DaffImageListComponent } from './image-list.component'; - -@NgModule({ - imports: [ - CommonModule, - ], - declarations: [ - DaffImageListComponent, - ], - exports: [ - DaffImageListComponent, - ], -}) -export class DaffImageListModule { } diff --git a/libs/design/src/molecules/image-list/public_api.ts b/libs/design/src/molecules/image-list/public_api.ts deleted file mode 100644 index 6e0ee30909..0000000000 --- a/libs/design/src/molecules/image-list/public_api.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { DaffImageListModule } from './image-list.module'; -export * from './image-list.component'; diff --git a/libs/design/src/public_api.ts b/libs/design/src/public_api.ts index 5df88acc54..d33504aad9 100644 --- a/libs/design/src/public_api.ts +++ b/libs/design/src/public_api.ts @@ -14,8 +14,6 @@ export * from './atoms/form/radio/public_api'; export * from './atoms/form/form-label/public_api'; // Molecules -export * from './molecules/image-gallery/public_api'; -export * from './molecules/image-list/public_api'; export * from './molecules/qty-dropdown/public_api'; // Core