@angular/animations 14.0.0-next.1 → 14.0.0-next.2

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,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.0.0-next.1
2
+ * @license Angular v14.0.0-next.2
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -216,9 +216,9 @@ class NoopAnimationDriver {
216
216
  return new NoopAnimationPlayer(duration, delay);
217
217
  }
218
218
  }
219
- NoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.1", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
220
- NoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.1", ngImport: i0, type: NoopAnimationDriver });
221
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.1", ngImport: i0, type: NoopAnimationDriver, decorators: [{
219
+ NoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.2", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
220
+ NoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.2", ngImport: i0, type: NoopAnimationDriver });
221
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.2", ngImport: i0, type: NoopAnimationDriver, decorators: [{
222
222
  type: Injectable
223
223
  }] });
224
224
  /**
@@ -1230,6 +1230,8 @@ class AnimationTimelineBuilderVisitor {
1230
1230
  subInstructions = subInstructions || new ElementInstructionMap();
1231
1231
  const context = new AnimationTimelineContext(driver, rootElement, subInstructions, enterClassName, leaveClassName, errors, []);
1232
1232
  context.options = options;
1233
+ const delay = options.delay ? resolveTimingValue(options.delay) : 0;
1234
+ context.currentTimeline.delayNextStep(delay);
1233
1235
  context.currentTimeline.setStyles([startingStyles], null, context.errors, options);
1234
1236
  visitDslNode(this, ast, context);
1235
1237
  // this checks to see if an actual animation happened
@@ -1251,8 +1253,9 @@ class AnimationTimelineBuilderVisitor {
1251
1253
  lastRootTimeline.setStyles([finalStyles], null, context.errors, options);
1252
1254
  }
1253
1255
  }
1254
- return timelines.length ? timelines.map(timeline => timeline.buildKeyframes()) :
1255
- [createTimelineInstruction(rootElement, [], [], [], 0, 0, '', false)];
1256
+ return timelines.length ?
1257
+ timelines.map(timeline => timeline.buildKeyframes()) :
1258
+ [createTimelineInstruction(rootElement, [], [], [], 0, delay, '', false)];
1256
1259
  }
1257
1260
  visitTrigger(ast, context) {
1258
1261
  // these values are not visited in this AST
@@ -2040,6 +2043,7 @@ class AnimationTransitionFactory {
2040
2043
  return styler ? styler.buildStyles(params, errors) : new Map();
2041
2044
  }
2042
2045
  build(driver, element, currentState, nextState, enterClassName, leaveClassName, currentOptions, nextOptions, subInstructions, skipAstBuild) {
2046
+ var _a;
2043
2047
  const errors = [];
2044
2048
  const transitionAnimationParams = this.ast.options && this.ast.options.params || EMPTY_OBJECT;
2045
2049
  const currentAnimationParams = currentOptions && currentOptions.params || EMPTY_OBJECT;
@@ -2050,7 +2054,10 @@ class AnimationTransitionFactory {
2050
2054
  const preStyleMap = new Map();
2051
2055
  const postStyleMap = new Map();
2052
2056
  const isRemoval = nextState === 'void';
2053
- const animationOptions = { params: Object.assign(Object.assign({}, transitionAnimationParams), nextAnimationParams) };
2057
+ const animationOptions = {
2058
+ params: Object.assign(Object.assign({}, transitionAnimationParams), nextAnimationParams),
2059
+ delay: (_a = this.ast.options) === null || _a === void 0 ? void 0 : _a.delay,
2060
+ };
2054
2061
  const timelines = skipAstBuild ?
2055
2062
  [] :
2056
2063
  buildAnimationTimelines(driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles, nextStateStyles, animationOptions, subInstructions, errors);