- fix(core): Fix universal error, closes #262 in fc6c3f7.
- fix(core): clean up state subject in
<gallery-image>
component in 7796b50.
- feat(core): Add
thumbLoadingIcon
andthumbLoadingError
to gallery config, in 3f8cdca and f2cae92. - refactor(core): refactor the if/else logic in gallery image template, in f7d6a22.
- feat(gallerize): Scan
imageSrc
andthumbSrc
attributes for image sources, in 4826d52. - enhance(core, lightbox, gallerize): Ability to lazy load the library.
- enhance(core, lightbox): Export
GALLERY_CONFIG
andLIGHTBOX_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?)
towithConfig(config)
, in 8446c1a. - refactor(lightbox): Remove
providedIn: 'root'
fromLightbox
service and provid it locally in its module, in 7ba8dd9.
- The function
forRoot()
has been removed fromGalleryModule
andLightboxModule
. - Use
GalleryModule.withConfig({ ... })
to set config that applies on a module and its children (same applies onLightboxModule
). - 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 onLightboxModule
withLIGHTBOX_CONFIG
).
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 { }
- 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 acceptsdeterminate
orindeterminate
, 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.
-
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 addloadingError
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
andariaDescribedBy
attributes to the lightbox configLightboxConfig
, 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 ofLocation
service, in 2262164.
- 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 fromGalleryModule
, in 46ef735 - refactor(core): Use
povidedIn: 'root'
for theGallery
service, in 86eeaa7 - fix(core, lightbox): Fix peer dependencies, in 236e540.
- refactor(core): Use
Map<string, GalleryRef>
for instances holder type instead of untyped object in ac08077. - refactor(core): Rename gallery
state$
andconfig$
tostate
andconfig
in 8de515b and 1e4fd06. - enhance(core): Improve instance destroyer, gallery delete its instance on component destroy in 65f3358.
- Gallery can now be destroyed using its instance
galleryRef.destroy()
. - In
Gallery
service the functiondestroy()
has been removed.
- 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
-
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'
});
- 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 forimageSize
option, in c7b3d39.
- 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.
- 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.
- 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';
- 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.
- Support Angular 6 and RxJS 6, closes #91.
- feat(core): Add helper functions to add different gallery items on
<gallery>
andGalleryRef
. - 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): Add
loadingStrategy
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
andthumbTemplate
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.
- 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.
- 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 withloaded
, which emits the image path after it loads. - refactor(core): Set an initial height of
500px
. - refactor(core): Replace
ImageItem
VideoItem
YoutubeItem
andIframeItem
constructor parameters with a single data parameter. - refactor(core, Lightbox): Set
aria-label
on all buttons. - refactor(Gallerize): Remove
forClass
input and replace it forselector
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.
- 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' });
- 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 withselector
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>
- 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
tothumb
.
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>
- feat(GalleryConfig): add
loadingIcon
to GalleryConfig that accepts inline image.
- 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.
- enhancement(Gallerize): Use
MutationObserver
instead ofngAfterContentChecked
to prevent infinite loop in default change detection strategy, closes #70.
- feat(GallerySlider): Rearrange slider on window resize, closes #67.
- fix(Swiping): Remove ngZone, closes #64.
- 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'
});
}
- Prevents native click event bubbling, closes #57
- fix double click on thumbnails and bullets, closes #45.
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
andbottom
. - feat(GalleryActions): Add gallery events
- feat(GalleryNav): Add
prevClass
andnextClass
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
toconfig.thumbnails.margin
- refactor(GalleryBullets): remove vertical positioning
right
andleft
- 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.
- General refactor
- fix(GalleryDirective) apply gallerize only once when content changes
- decode gallery nav icons and close button from base64 to decrease the size
- feat(LazyLoad) emit only last selected image.
- fix(GalleryImage) fade animation is working properly with image load.
- refactor(GalleryConfig)
- fix(GalleryModal) close button is hidden on mobile, closes #9
- fix umd bundle for systemjs, closes #10
- fix(gestures) remove navigation element on mobile which was blocking gestures events
- fix(gestures) enable/disable gestures using
config.gestures
- refactor(config) interfaces
- 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
- (feat) gestures support
- (refactor) gallery config
- Initial release