Skip to content

Latest commit

 

History

History
492 lines (345 loc) · 27.2 KB

CHANGELOG.md

File metadata and controls

492 lines (345 loc) · 27.2 KB

Changelog

4.0.3

  • fix(core): Fix universal error, closes #262 in fc6c3f7.
  • fix(core): clean up state subject in <gallery-image> component in 7796b50.

4.0.2-beta.0

  • feat(core): Add thumbLoadingIcon and thumbLoadingError to gallery config, in 3f8cdca and f2cae92.
  • refactor(core): refactor the if/else logic in gallery image template, in f7d6a22.

4.0.1

  • fix(core): Encapsulate the cache interceptor to gallery images only, closes #237 in 4616eec.

4.0.0

  • feat(gallerize): Scan imageSrc and thumbSrc attributes for image sources, in 4826d52.
  • enhance(core, lightbox, gallerize): Ability to lazy load the library.
  • enhance(core, lightbox): Export GALLERY_CONFIG and LIGHTBOX_CONFIG tokens, in 56c704f and 9cab04b.
  • fix(core, lightbox): Add Optional() on injected config in gallery and lightbox services, closes #234 in 31624f9.
  • refactor(core, lightbox): Rename forRoot(config?) to withConfig(config), in 8446c1a.
  • refactor(lightbox): Remove providedIn: 'root' from Lightbox service and provid it locally in its module, in 7ba8dd9.

Breaking Changes

  • The function forRoot() has been removed from GalleryModule and LightboxModule.
  • Use GalleryModule.withConfig({ ... }) to set config that applies on a module and its children (same applies on LightboxModule).
  • To set global config across the entire app while still lazy load the library, provide the GALLERY_CONFIG token with the config value in the root module (same applies on LightboxModule with LIGHTBOX_CONFIG).
Example: Lazy load the library

In this example, will set global config without importing the library in the main bundle

  • Provide GALLERY_CONFIG value in the root module
import { GALLERY_CONFIG } from '@ngx-gallery/core';

@NgModule({
  providers: [
    {
      provide: GALLERY_CONFIG, 
      useValue: {
        dots: true,
        imageSize: 'cover'
      }
    }
  ]
})
export class AppModule { }
  • Import GalleryModule in a feature module
import { GalleryModule } from '@ngx-gallery/core';

@NgModule({
  imports: [
    GalleryModule
  ]
})
export class FeatureModule { }

4.0.0-beta.1

  • feat(core): Add indeterminate option to the radial progress, in df682c4.
  • enhance(core): Enhance thumbnails loading styles, in f34f90a.
  • fix(core): Expose [dotSize], [dotsPosition] and [counterPosition] options as inputs, in 946a856.
  • fix(core): Add [loadingMode] option to gallery images which accepts determinate or indeterminate , in e8bdfb2.
  • regression(core): Fix undisplayed thumb image when a custom thumb template is used, in 34f2cc6.
  • enhance(gallerize): Run gallerize detector outside angular zone, makes opening the lightbox smoother, in 284925d and 98901b9.

4.0.0-beta.0

  • update(core, lightbox, gallerize): Update peer dependencies, closes #228 in bd8cdd3.

  • feat(core): Add dotsPosition option, closes #211 in 263d297.

  • feat(core): Add dotsSize option, in e2e58b6.

  • feat(core): Add counterPosition option, closes in ce7a8ad.

  • feat(core): Use HttpClient to load and cache images in [lazyImage] directive, in 15c3e88.

  • feat(core): Replace icon loader with a new radial progress component to report image loading progress while keeping the svg loading icon as an option, in a1028e8.

  • feat(core): Add default error template to <gallery-image> in case if loading failed and add loadingError option for custom error template, in cd258f5 and 9dbf6c4.

  • enhance(core): Enhance gallery dots styles, in de8d22b.

  • enhance(core): Allow gallery image to use unsafe URLs, closes #218 in da1ace1.

  • enhance(core): Use animationFrameScheduler for smoother sliding animation, in 38b0aa6.

  • fix(core): Fix vertical scroll when using the gallery on touch devices, closes #161 in a239c29. (kudos goes to @harm-less)

  • refactor(core): [lazyImage] directive => (loaded) event no longer emits on error.

  • feat(lightbox): Set the focus back on the previously focused element when the lightbox is closed, in 266eddb.

  • feat(lightbox): Add role, ariaLabel, ariaLabelledBy and ariaDescribedBy attributes to the lightbox config LightboxConfig, in a11d20d, 5b550e7.

  • enhance(lightbox): Import overlay default styles from @angular/cdk/overlay, in 54c5d88.

  • enhance(lightbox): Improve lightbox styles, in 4a52161.

  • enhance(lightbox): Update lightbox overlay animation, closes #224 in bec077f.

  • refactor(lightbox): Use disposeOnNavigation instead of Location service, in 2262164.

3.3.1

  • fix(core): Remove duplicate delete execution in the destroyer function, in ae541ca
  • fix(core): Check galleryRef exists before deleting, in a2b32e2
  • fix(core): Remove duplicate config set, in 834c001
  • fix(core): Remove unnecessary PortalModule import from GalleryModule, in 46ef735
  • refactor(core): Use povidedIn: 'root' for the Gallery service, in 86eeaa7
  • fix(core, lightbox): Fix peer dependencies, in 236e540.

3.3.0

  • refactor(core): Use Map<string, GalleryRef> for instances holder type instead of untyped object in ac08077.
  • refactor(core): Rename gallery state$ and config$ to state and config in 8de515b and 1e4fd06.
  • enhance(core): Improve instance destroyer, gallery delete its instance on component destroy in 65f3358.

Breaking Changes

  • Gallery can now be destroyed using its instance galleryRef.destroy().
  • In Gallery service the function destroy() has been removed.

3.2.0

  • feature(core): Do not require importing global styles, closes #197 in ea041a5.
  • feature(core): Set the video type attribute on videos items, closes #199 in 06b3601.
  • feature(lightbox): Add a lightbox directive, closes #200 in ad2255b.
  • fix(gallery): fix LazyImage error event, closes #205 in db231aa

Breaking changes

  • No need to manually import the styles anymore, they are imported internally with the components.

  • Adding a video item with multiple url sources

    Before:

galleryRef.addVideo({
  src: ['MP4_URL', 'OGG_URL'],
  thumb: '(OPTIONAL)VIDEO_THUMBNAIL_URL',
  poster: '(OPTIONAL)VIDEO_POSTER_URL'
});

After:

galleryRef.addVideo({
  src: [
    { url: 'MP4_URL', type: 'video/mp4' },
    { url: 'OGG_URL', type: 'video/ogg' }
  ],
  thumb: '(OPTIONAL)VIDEO_THUMBNAIL_URL',
  poster: '(OPTIONAL)VIDEO_POSTER_URL'
});

3.1.2

  • fix(Lightbox): Check if location is defined before subscribing, closes #189 in 169b813.

3.1.1

  • refactor(core): Convert imageSize attribute to an input + add it to gallery config, this makes it possible to use it in lightbox mode, closes #183 in 1fc70c4.
  • refactor(core): Make contain as the default value for imageSize option, in c7b3d39.

3.1.0

  • feat(core): Add auto-play option, in e7fc03f.
  • feat(core): Add support for error handling, closes #154 in 12f6e5e.
  • refactor(core): Remove opacity transition from gallery-item, in a5b227e.
  • refactor(core): Use imageSize as an attribute, in 96c5c07.
  • refactor(core): Rename (player) output to (playingChange), in e209493.
  • enhance(core): Use default cursor when thumbnails are disabled, in 3582e95.
  • fix(core): fix vertical sliding direction, in cba5d59.
  • fix(core): fix thumbClick Output, in a730116.

3.1.0-beta.0

Gallery

  • feat(core): Add thumbMode option on thumbnails' slider (free scroll thumbnails), closes #135 in 8c6c99d.
  • feat(core): Add slide show player option, closes #152 in a331f46.
  • enhance(core): Ability to Import gallery styles individually #144 in ebb6667.
  • enhance(core): Run HammerJS gestures outside angular zone 6fabf6c.
  • enhance(core): Put SCSS and CSS each in its own folder, close #153 in 9783fc3.
  • enhance(core): Check if loadingSvg is defined before embedding it, close #150 in 5286640.
  • fix(core): fix wrong (thumbClick) emitter.
  • fix(core): fix gallery slider width which is set to 0 at the beginning, closes #151 in c26a286.
  • refactor(core): Set loop option to true by default.
  • refactor(core): Remove fluid option from gallery config and use it as an attribute instead. fixed in ecf3f88.

Lightbox

  • feat(Lightbox): Close the lightbox when the location is changed, closes #108 in 1543374.

Breaking changes:

Gallery

  • Fluid option is now used as an attribute, not as an input.

Before:

<gallery [fluid]="true"></gallery>

After:

<gallery fluid></gallery>
  • Scss and css styles are put each in its own folder

Before:

@import '~@ngx-gallery/core/styles/gallery';

After:

@import '~@ngx-gallery/core/styles/scss/gallery';
// or for css
@import '~@ngx-gallery/core/styles/css/gallery';

3.0.2

  • refactor(Lightbox): fix the close button small size on iphone browser.
  • refactor(Lightbox): use <i> tag instead of <button> tag for the close button.
  • fix(core): Check if loadingIcon is defined in <gallery-image>, closes #133 and #132 in 24e6e26.

3.0.1

  • feat(core): Allow using custom gallery item with custom template, closes #125 in 7e4c302.

3.0.0

  • fix(Lightbox): Close the lightbox when the active route is changed #108 in d099abd.

3.0.0-beta.1

  • refactor(core): add the loop input to gallery component, closes #98 in 727a4ca.

3.0.0-beta.0

Features:

  • Support Angular 6 and RxJS 6, closes #91.
  • feat(core): Add helper functions to add different gallery items on <gallery> and GalleryRef.
  • feat(core): Add fluid option to gallery for full width size.
  • feat(core): Add navIcon option to gallery config to set a custom nav icon.
  • feat(core): AddloadingStrategy option to gallery which accepts one of the following: 'preload', 'lazy' or 'default', closes #87.
  • feat(core): Add itemClick output which emits when an item is clicked, closes #106.
  • feat(core): Support custom template inside the default item templates, add itemTemplate and thumbTemplate to gallery options.
  • feat(core): Multiple video sources support.
  • feat(core): Pause Video and Youtube items when active item changes.
  • feat(Gallerize): Add support to detect Gallery component.
  • feat(Gallerize): Add support to detect DOM background images.

Bug fixes:

  • fix(core): Skip re-setting the config from <gallery> input in lightbox mode, closes #104.
  • fix(core): Fix wrong thumbnail position when [thumbPosition] is changed.

Improvements:

  • refactor(core): Improve icon rendering, use svg element instead of background-image to render the nav icon in <gallery-nav>.
  • refactor(core): Add .g-active-item on current item and .g-active-thumb on current thumbnail.
  • refactor(core): Add .g-image-loaded class on <gallery-image> to indicates that the image has been loaded.
  • refactor(core): Replace loading output with loaded, which emits the image path after it loads.
  • refactor(core): Set an initial height of 500px.
  • refactor(core): Replace ImageItem VideoItem YoutubeItem and IframeItem constructor parameters with a single data parameter.
  • refactor(core, Lightbox): Set aria-label on all buttons.
  • refactor(Gallerize): Remove forClass input and replace it for selector input.
  • refactor(Gallerize): Remove CommonModule as it is not needed.
  • refactor(Styles): Add a prefix to all classes used in the plugin.
  • refactor(Styles): Add a transition for animate the opacity on current item and thumbnail.

Breaking changes:

Gallery

  • Before, To Create an image item, we used to pass the src and the thumbnail separate parameters.
const item: GalleryItem = new ImageItem('IMAGE_SRC', 'THUMB_SRC');
  • After, The parameters are replaced with a single data object.
const item: GalleryItem = new ImageItem({ src: 'IMAGE_SRC', thumb: 'THUMB_SRC' });

Gallerize

  • Before, Limiting auto-detection to a specific class used to be done as in the following code:
<div class="grid" gallerize forClass="my-img-class">
  <img class="my-img-class" src="{{item.src}}">
</div>
  • After, Now forClass input has been replaced with selector input.
<div class="grid" gallerize selector=".my-img-class">
  <img class="my-img-class" src="{{imgSource1}}">
  <div class="my-img-class" [style.background]="'url(' + imgSource2 + ')'">
</div>

2.1.1

  • refactor(Lightbox Style): Clean up.
  • fix(HammerJS): Don't throw an error if hammer is not defined, just fallback to default.
  • feat(VideoItem): add a 3rd parameter to VideoItem to set custom poster.
const viewItem = new VideoItem(video.src, video.thumb, video.poster);
  • refactor(core): rename thumbSrc to thumb.

Breaking Changes

This won't effect the usage, but you might need to update

GalleryItem data object has changed the name of the thumbnail source property from thumbSrc to thumb

This would only effect your app if you display the thumbnails list of your gallery items

Before

<div class="grid">
  <div  class="grid-item"
        *ngFor="let item of galleryItems$ | async; let i = index"
        (click)="lightbox.open(i)">
    <img class="grid-image" [src]="item.data.thumbSrc">
  </div>
</div>

After

<div class="grid">
  <div  class="grid-item"
        *ngFor="let item of galleryItems$ | async; let i = index"
        (click)="lightbox.open(i)">
    <img class="grid-image" [src]="item.data.thumb">
  </div>
</div>

2.0.4

  • feat(GalleryConfig): add loadingIcon to GalleryConfig that accepts inline image.

2.0.3

  • fix(Lightbox): Exit animation, closes #73.
  • fix(Lightbox): close button is clicking behind, closes #54.
  • refactor(Lightbox): Use the button tag instead of div for close button.

2.0.2

  • enhancement(Gallerize): Use MutationObserver instead of ngAfterContentChecked to prevent infinite loop in default change detection strategy, closes #70.

2.0.1

  • feat(GallerySlider): Rearrange slider on window resize, closes #67.

2.0.0

  • fix(Swiping): Remove ngZone, closes #64.

2.0.0-beta.4

  • feat(LightboxConfig): Adds fullscreen option to the lightbox, closes #43.

By default fullscreen is obtained on small screen (mobile) but now you can make it as default for all screens

GalleryModule.forRoot()
LightboxModule.forRoot({
  panelClass: 'fullscreen'
})
  • feat(Lightbox): Ability to define lightbox config using lightbox.open() method
openLightbox() {
  this.lightbox.open(0, 'lightbox', {
    panelClass: 'fullscreen'
  });
}

2.0.0-beta.3

  • Prevents native click event bubbling, closes #57

2.0.0-beta

Written from scratch

1.0.1

  • fix double click on thumbnails and bullets, closes #45.

1.0.0

Fixes:

  • fix(GalleryNav): Hide navigation on panning.
  • fix(GalleryPlayer): Wait until image is loaded before starting the timer.

Features:

  • feat(GalleryPlayer): Add progressbar color option.
  • feat(GalleryPlayer): Add progressbar thickness option.
  • feat(GalleryPlayer): Add position option top and bottom.
  • feat(GalleryActions): Add gallery events
  • feat(GalleryNav): Add prevClass and nextClass options to customize navigation icons
  • feat(classNames) Add className option to container, thumbnails, bullets

Performance Improvements:

  • refactor(GalleryThumbnail) improve performance

Breaking Changes:

  • refactor(GalleryConfig): rename config.thumbnails.space to config.thumbnails.margin
  • refactor(GalleryBullets): remove vertical positioning right and left

1.0.0-beta.8

  • fix(keyboard listener in lightbox) closes #24, #33.
  • refactor(Gallerize directive) Use MutationObserver instead of DOMSubtreeModified, closes #26.
  • fix(Universal support), closes #9.
  • fix Angular 5 warning, closes #21.
  • Improve gallery lightbox, closes #20.
  • Improve gallery lightbox slide animation, closes #8.
  • Use Angular CDK for the gallery lightbox.
  • refactor(GalleryConfig)
  • Remove image transition animation option because it was not implemented properly.

0.7.1

  • General refactor
  • fix(GalleryDirective) apply gallerize only once when content changes
  • decode gallery nav icons and close button from base64 to decrease the size

0.7.0

  • feat(LazyLoad) emit only last selected image.
  • fix(GalleryImage) fade animation is working properly with image load.
  • refactor(GalleryConfig)

0.6.3

  • fix(GalleryModal) close button is hidden on mobile, closes #9
  • fix umd bundle for systemjs, closes #10

0.6.2

  • fix(gestures) remove navigation element on mobile which was blocking gestures events
  • fix(gestures) enable/disable gestures using config.gestures
  • refactor(config) interfaces

0.6.0 beta

  • Add popup animation for gallery modal
  • Remove incorrect slide animation
  • Make gestures optional, closes #2
  • Remove thumbnail vertical position (right and left) positions, closes #3

0.5.2 beta

  • (feat) gestures support
  • (refactor) gallery config

0.5.0 beta

  • Initial release