@breadstone/mosaik-elements-angular 0.0.94 → 0.0.95
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.
- package/CHANGELOG.md +7 -0
- package/fesm2022/mosaik-elements-angular.mjs +36 -13
- package/fesm2022/mosaik-elements-angular.mjs.map +1 -1
- package/index.d.ts +12 -4
- package/index.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## 0.0.95 (2025-08-09)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- refactor animation properties in AnimateDirective and Animation to improve type safety ([c59fd6dd7f](https://github.com/RueDeRennes/mosaik/commit/c59fd6dd7f))
|
|
6
|
+
- update import path for FileCache and increment release version to 0.0.94 ([54601adcea](https://github.com/RueDeRennes/mosaik/commit/54601adcea))
|
|
7
|
+
|
|
1
8
|
## 0.0.94 (2025-08-09)
|
|
2
9
|
|
|
3
10
|
### 🩹 Fixes
|
|
@@ -56858,6 +56858,7 @@ class AnimateDirective {
|
|
|
56858
56858
|
_animationPlayer;
|
|
56859
56859
|
_renderer;
|
|
56860
56860
|
_wasTriggered;
|
|
56861
|
+
_animate;
|
|
56861
56862
|
_options;
|
|
56862
56863
|
// #endregion
|
|
56863
56864
|
// #region Ctor
|
|
@@ -56872,10 +56873,22 @@ class AnimateDirective {
|
|
|
56872
56873
|
this._animationPlayer = inject(AnimationPlayer2);
|
|
56873
56874
|
this._renderer = inject(Renderer2);
|
|
56874
56875
|
this._wasTriggered = false;
|
|
56876
|
+
this._animate = undefined;
|
|
56875
56877
|
this._options = undefined;
|
|
56876
56878
|
}
|
|
56877
56879
|
// #endregion
|
|
56878
56880
|
// #region Properties
|
|
56881
|
+
/**
|
|
56882
|
+
* Gets or sets the `options` property.
|
|
56883
|
+
*
|
|
56884
|
+
* @public
|
|
56885
|
+
*/
|
|
56886
|
+
get animate() {
|
|
56887
|
+
return this._animate;
|
|
56888
|
+
}
|
|
56889
|
+
set animate(value) {
|
|
56890
|
+
this._animate = value;
|
|
56891
|
+
}
|
|
56879
56892
|
/**
|
|
56880
56893
|
* Gets or sets the `options` property.
|
|
56881
56894
|
*
|
|
@@ -56904,36 +56917,40 @@ class AnimateDirective {
|
|
|
56904
56917
|
}
|
|
56905
56918
|
let hasName = false;
|
|
56906
56919
|
let name = undefined;
|
|
56907
|
-
if (typeof this.
|
|
56920
|
+
if (typeof this._animate === 'string') {
|
|
56908
56921
|
hasName = true;
|
|
56909
|
-
name = this.
|
|
56922
|
+
name = this._animate;
|
|
56910
56923
|
}
|
|
56911
|
-
else if (this.
|
|
56924
|
+
else if (this._animate && 'name' in this._animate && this._animate.name) {
|
|
56912
56925
|
hasName = true;
|
|
56913
|
-
name = this.
|
|
56926
|
+
name = this._animate.name;
|
|
56914
56927
|
}
|
|
56915
56928
|
if (hasName && name) {
|
|
56916
|
-
this.
|
|
56917
|
-
if (!this.
|
|
56929
|
+
this._animate = this._animationRegistry.animations[name];
|
|
56930
|
+
if (!this._animate) {
|
|
56918
56931
|
console.warn(`[AnimateDirective]: The animation with "${name}" was not found.`);
|
|
56919
56932
|
return;
|
|
56920
56933
|
}
|
|
56921
56934
|
}
|
|
56935
|
+
this._animate.options = {
|
|
56936
|
+
...this._animate.options,
|
|
56937
|
+
...this._options
|
|
56938
|
+
};
|
|
56922
56939
|
this._wasTriggered = true;
|
|
56923
56940
|
const from = {
|
|
56924
|
-
...this.
|
|
56925
|
-
...this.
|
|
56941
|
+
...this._animate.from,
|
|
56942
|
+
...this._animate.initial
|
|
56926
56943
|
};
|
|
56927
56944
|
for (const [k, v] of Object.entries(from)) {
|
|
56928
56945
|
if (k in this._element.nativeElement.style) {
|
|
56929
56946
|
this._renderer.setStyle(this._element.nativeElement, k, v);
|
|
56930
56947
|
}
|
|
56931
56948
|
}
|
|
56932
|
-
if (this.
|
|
56933
|
-
this.
|
|
56949
|
+
if (this._animate && 'trigger' in this._animate) {
|
|
56950
|
+
this._animate.trigger(() => this.play(this._animate));
|
|
56934
56951
|
}
|
|
56935
56952
|
else {
|
|
56936
|
-
this.play(this.
|
|
56953
|
+
this.play(this._animate);
|
|
56937
56954
|
}
|
|
56938
56955
|
}
|
|
56939
56956
|
/**
|
|
@@ -56953,7 +56970,7 @@ class AnimateDirective {
|
|
|
56953
56970
|
});
|
|
56954
56971
|
}
|
|
56955
56972
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AnimateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
56956
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.6", type: AnimateDirective, isStandalone: true, selector: "[mosaikAnimate]", inputs: {
|
|
56973
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.6", type: AnimateDirective, isStandalone: true, selector: "[mosaikAnimate]", inputs: { animate: ["mosaikAnimate", "animate"], options: ["mosaikAnimateOptions", "options"] }, ngImport: i0 });
|
|
56957
56974
|
}
|
|
56958
56975
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AnimateDirective, decorators: [{
|
|
56959
56976
|
type: Directive,
|
|
@@ -56961,12 +56978,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
56961
56978
|
selector: '[mosaikAnimate]',
|
|
56962
56979
|
standalone: true
|
|
56963
56980
|
}]
|
|
56964
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
56981
|
+
}], ctorParameters: () => [], propDecorators: { animate: [{
|
|
56965
56982
|
type: Input,
|
|
56966
56983
|
args: [{
|
|
56967
56984
|
alias: 'mosaikAnimate',
|
|
56968
56985
|
required: true
|
|
56969
56986
|
}]
|
|
56987
|
+
}], options: [{
|
|
56988
|
+
type: Input,
|
|
56989
|
+
args: [{
|
|
56990
|
+
alias: 'mosaikAnimateOptions',
|
|
56991
|
+
required: false
|
|
56992
|
+
}]
|
|
56970
56993
|
}] } });
|
|
56971
56994
|
|
|
56972
56995
|
// #region Imports
|