igniteui-angular 17.1.0-beta.3 → 17.1.0

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.
Files changed (77) hide show
  1. package/esm2022/lib/avatar/avatar.component.mjs +3 -3
  2. package/esm2022/lib/badge/badge.component.mjs +2 -2
  3. package/esm2022/lib/banner/banner.component.mjs +1 -1
  4. package/esm2022/lib/calendar/calendar-base.mjs +3 -3
  5. package/esm2022/lib/calendar/calendar.component.mjs +22 -22
  6. package/esm2022/lib/calendar/calendar.mjs +9 -23
  7. package/esm2022/lib/calendar/days-view/daysview-navigation.service.mjs +2 -3
  8. package/esm2022/lib/calendar/month-picker/month-picker.component.mjs +3 -3
  9. package/esm2022/lib/calendar/years-view/years-view.component.mjs +3 -2
  10. package/esm2022/lib/card/card.component.mjs +3 -3
  11. package/esm2022/lib/carousel/carousel-base.mjs +2 -7
  12. package/esm2022/lib/carousel/carousel.component.mjs +5 -8
  13. package/esm2022/lib/carousel/enums.mjs +11 -0
  14. package/esm2022/lib/carousel/public_api.mjs +3 -2
  15. package/esm2022/lib/carousel/slide.component.mjs +1 -1
  16. package/esm2022/lib/checkbox/checkbox.component.mjs +2 -2
  17. package/esm2022/lib/chips/chip.component.mjs +2 -2
  18. package/esm2022/lib/combo/combo.common.mjs +7 -15
  19. package/esm2022/lib/core/selection.mjs +8 -1
  20. package/esm2022/lib/core/touch-annotations.mjs +5 -0
  21. package/esm2022/lib/core/touch.mjs +14 -9
  22. package/esm2022/lib/data-operations/data-util.mjs +2 -2
  23. package/esm2022/lib/date-common/types.mjs +3 -3
  24. package/esm2022/lib/directives/button/button-base.mjs +2 -2
  25. package/esm2022/lib/directives/button/button.directive.mjs +2 -2
  26. package/esm2022/lib/directives/divider/divider.directive.mjs +2 -2
  27. package/esm2022/lib/directives/mask/mask.directive.mjs +1 -1
  28. package/esm2022/lib/directives/text-highlight/text-highlight.service.mjs +7 -1
  29. package/esm2022/lib/drop-down/drop-down.common.mjs +3 -3
  30. package/esm2022/lib/drop-down/drop-down.component.mjs +3 -3
  31. package/esm2022/lib/expansion-panel/expansion-panel-header.component.mjs +2 -2
  32. package/esm2022/lib/expansion-panel/expansion-panel.common.mjs +2 -2
  33. package/esm2022/lib/grids/cell.component.mjs +1 -1
  34. package/esm2022/lib/grids/columns/column.component.mjs +2 -2
  35. package/esm2022/lib/grids/common/grid.interface.mjs +1 -1
  36. package/esm2022/lib/grids/grid-base.directive.mjs +3 -2
  37. package/esm2022/lib/grids/hierarchical-grid/row-island.component.mjs +40 -11
  38. package/esm2022/lib/grids/state.directive.mjs +5 -2
  39. package/esm2022/lib/input-group/input-group.component.mjs +2 -2
  40. package/esm2022/lib/input-group/inputGroupType.mjs +3 -3
  41. package/esm2022/lib/navigation-drawer/navigation-drawer.component.mjs +1 -1
  42. package/esm2022/lib/progressbar/progressbar.component.mjs +3 -3
  43. package/esm2022/lib/select/select.component.mjs +1 -9
  44. package/esm2022/lib/services/direction/directionality.mjs +2 -2
  45. package/esm2022/lib/splitter/splitter.component.mjs +3 -3
  46. package/esm2022/lib/stepper/step/step.component.mjs +3 -2
  47. package/esm2022/lib/stepper/stepper.common.mjs +3 -3
  48. package/esm2022/lib/stepper/stepper.component.mjs +1 -1
  49. package/esm2022/lib/tabs/tabs/tabs.component.mjs +11 -18
  50. package/esm2022/lib/time-picker/time-picker.directives.mjs +2 -2
  51. package/esm2022/lib/tree/common.mjs +4 -4
  52. package/fesm2022/igniteui-angular.mjs +305 -290
  53. package/fesm2022/igniteui-angular.mjs.map +1 -1
  54. package/lib/calendar/calendar.d.ts +1 -1
  55. package/lib/calendar/years-view/years-view.component.d.ts +1 -1
  56. package/lib/carousel/carousel-base.d.ts +1 -6
  57. package/lib/carousel/carousel.component.d.ts +3 -7
  58. package/lib/carousel/enums.d.ts +11 -0
  59. package/lib/carousel/public_api.d.ts +2 -1
  60. package/lib/combo/combo.common.d.ts +1 -1
  61. package/lib/core/selection.d.ts +5 -0
  62. package/lib/core/touch-annotations.d.ts +59 -0
  63. package/lib/core/touch.d.ts +2 -1
  64. package/lib/directives/text-highlight/text-highlight.service.d.ts +4 -0
  65. package/lib/grids/common/grid.interface.d.ts +3 -0
  66. package/lib/grids/hierarchical-grid/row-island.component.d.ts +25 -5
  67. package/lib/grids/state.directive.d.ts +3 -0
  68. package/lib/select/select.component.d.ts +0 -4
  69. package/lib/splitter/splitter.component.d.ts +1 -1
  70. package/lib/stepper/stepper.common.d.ts +2 -1
  71. package/lib/stepper/stepper.component.d.ts +2 -1
  72. package/package.json +14 -5
  73. package/schematics/interfaces/options.d.ts +1 -0
  74. package/schematics/ng-add/index.spec.js +36 -11
  75. package/schematics/ng-add/schema.json +6 -0
  76. package/schematics/tsconfig.tsbuildinfo +1 -1
  77. package/schematics/utils/dependency-handler.js +12 -7
@@ -8,7 +8,7 @@ export declare const CalendarSelection: {
8
8
  RANGE: "range";
9
9
  };
10
10
  export type CalendarSelection = (typeof CalendarSelection)[keyof typeof CalendarSelection];
11
- export declare enum ScrollMonth {
11
+ export declare const enum ScrollMonth {
12
12
  PREV = "prev",
13
13
  NEXT = "next",
14
14
  NONE = "none"
@@ -6,7 +6,7 @@ import * as i0 from "@angular/core";
6
6
  export declare class CalendarHammerConfig extends HammerGestureConfig {
7
7
  overrides: {
8
8
  pan: {
9
- direction: 24;
9
+ direction: number;
10
10
  threshold: number;
11
11
  };
12
12
  };
@@ -1,17 +1,12 @@
1
1
  import { AnimationReferenceMetadata } from '@angular/animations';
2
2
  import { ChangeDetectorRef, EventEmitter } from '@angular/core';
3
3
  import { AnimationPlayer, AnimationService } from '../services/animation/animation';
4
+ import { HorizontalAnimationType } from './enums';
4
5
  export declare enum Direction {
5
6
  NONE = 0,
6
7
  NEXT = 1,
7
8
  PREV = 2
8
9
  }
9
- export declare const HorizontalAnimationType: {
10
- none: "none";
11
- slide: "slide";
12
- fade: "fade";
13
- };
14
- export type HorizontalAnimationType = (typeof HorizontalAnimationType)[keyof typeof HorizontalAnimationType];
15
10
  export interface CarouselAnimationSettings {
16
11
  enterAnimation: AnimationReferenceMetadata;
17
12
  leaveAnimation: AnimationReferenceMetadata;
@@ -3,18 +3,14 @@ import { HammerGestureConfig } from '@angular/platform-browser';
3
3
  import { ICarouselResourceStrings } from '../core/i18n/carousel-resources';
4
4
  import { IBaseEventArgs, PlatformUtil } from '../core/utils';
5
5
  import { AnimationService } from '../services/animation/animation';
6
- import { Direction, HorizontalAnimationType, IgxCarouselComponentBase } from './carousel-base';
6
+ import { Direction, IgxCarouselComponentBase } from './carousel-base';
7
7
  import { IgxSlideComponent } from './slide.component';
8
+ import { CarouselIndicatorsOrientation, HorizontalAnimationType } from './enums';
8
9
  import * as i0 from "@angular/core";
9
- export declare const CarouselIndicatorsOrientation: {
10
- bottom: "bottom";
11
- top: "top";
12
- };
13
- export type CarouselIndicatorsOrientation = (typeof CarouselIndicatorsOrientation)[keyof typeof CarouselIndicatorsOrientation];
14
10
  export declare class CarouselHammerConfig extends HammerGestureConfig {
15
11
  overrides: {
16
12
  pan: {
17
- direction: 6;
13
+ direction: number;
18
14
  };
19
15
  };
20
16
  static ɵfac: i0.ɵɵFactoryDeclaration<CarouselHammerConfig, never>;
@@ -0,0 +1,11 @@
1
+ export declare const HorizontalAnimationType: {
2
+ none: "none";
3
+ slide: "slide";
4
+ fade: "fade";
5
+ };
6
+ export type HorizontalAnimationType = (typeof HorizontalAnimationType)[keyof typeof HorizontalAnimationType];
7
+ export declare const CarouselIndicatorsOrientation: {
8
+ bottom: "bottom";
9
+ top: "top";
10
+ };
11
+ export type CarouselIndicatorsOrientation = (typeof CarouselIndicatorsOrientation)[keyof typeof CarouselIndicatorsOrientation];
@@ -1,8 +1,9 @@
1
1
  import { IgxCarouselComponent } from './carousel.component';
2
2
  import { IgxCarouselIndicatorDirective, IgxCarouselNextButtonDirective, IgxCarouselPrevButtonDirective } from './carousel.directives';
3
3
  import { IgxSlideComponent } from './slide.component';
4
- export { Direction, HorizontalAnimationType, CarouselAnimationSettings } from './carousel-base';
4
+ export { Direction, CarouselAnimationSettings } from './carousel-base';
5
5
  export * from './carousel.component';
6
6
  export * from './slide.component';
7
7
  export * from './carousel.directives';
8
+ export { CarouselIndicatorsOrientation, HorizontalAnimationType } from './enums';
8
9
  export declare const IGX_CAROUSEL_DIRECTIVES: readonly [typeof IgxCarouselComponent, typeof IgxSlideComponent, typeof IgxCarouselIndicatorDirective, typeof IgxCarouselNextButtonDirective, typeof IgxCarouselPrevButtonDirective];
@@ -46,7 +46,7 @@ export interface IgxComboBase {
46
46
  setActiveDescendant(): void;
47
47
  }
48
48
  /** @hidden @internal */
49
- export declare enum DataTypes {
49
+ export declare const enum DataTypes {
50
50
  EMPTY = "empty",
51
51
  PRIMITIVE = "primitive",
52
52
  COMPLEX = "complex",
@@ -25,6 +25,11 @@ export declare class IgxSelectionAPIService {
25
25
  * @param componentID ID of the component.
26
26
  */
27
27
  clear(componentID: string): void;
28
+ /**
29
+ * Removes selection for a component.
30
+ * @param componentID
31
+ */
32
+ delete(componentID: string): void;
28
33
  /**
29
34
  * Get current component selection length.
30
35
  *
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Stripped-down HammerJS annotations.
3
+ */
4
+ /**
5
+ * @hidden
6
+ * @internal
7
+ */
8
+ export interface HammerInput {
9
+ preventDefault: () => void;
10
+ deltaX: number;
11
+ deltaY: number;
12
+ center: {
13
+ x: number;
14
+ y: number;
15
+ };
16
+ pointerType: string;
17
+ distance: number;
18
+ }
19
+ /**
20
+ * @hidden
21
+ * @internal
22
+ */
23
+ export interface HammerStatic {
24
+ new (element: HTMLElement | SVGElement, options?: any): HammerManager;
25
+ Pan: Recognizer;
26
+ Swipe: Recognizer;
27
+ Tap: Recognizer;
28
+ TouchInput: HammerInput;
29
+ DIRECTION_HORIZONTAL: number;
30
+ DIRECTION_VERTICAL: number;
31
+ }
32
+ /**
33
+ * @hidden
34
+ * @internal
35
+ */
36
+ export interface Recognizer {
37
+ }
38
+ /**
39
+ * @hidden
40
+ * @internal
41
+ */
42
+ export interface HammerManager {
43
+ set(options: any): HammerManager;
44
+ off(events: string, handler?: (event: HammerInput) => void): void;
45
+ on(events: string, handler: (event: HammerInput) => void): void;
46
+ destroy(): void;
47
+ get(event: string): HammerManager;
48
+ }
49
+ /**
50
+ * @hidden
51
+ * @internal
52
+ */
53
+ export interface HammerOptions {
54
+ cssProps?: {
55
+ [key: string]: string;
56
+ };
57
+ recognizers?: any[];
58
+ inputClass?: HammerInput;
59
+ }
@@ -1,6 +1,6 @@
1
- /// <reference types="hammerjs" />
2
1
  import { NgZone } from '@angular/core';
3
2
  import { PlatformUtil } from './utils';
3
+ import { HammerManager, HammerOptions, HammerStatic } from './touch-annotations';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
6
  * Touch gestures manager based on Hammer.js
@@ -12,6 +12,7 @@ export declare class HammerGesturesManager {
12
12
  private _zone;
13
13
  private doc;
14
14
  private platformUtil;
15
+ static Hammer: HammerStatic;
15
16
  /**
16
17
  * Event option defaults for each recognizer, see http://hammerjs.github.io/api/ for API listing.
17
18
  */
@@ -14,6 +14,10 @@ export declare class IgxTextHighlightService {
14
14
  * Clears any existing highlight.
15
15
  */
16
16
  clearActiveHighlight(groupName: any): void;
17
+ /**
18
+ * Destroys a highlight group.
19
+ */
20
+ destroyGroup(groupName: string): void;
17
21
  static ɵfac: i0.ɵɵFactoryDeclaration<IgxTextHighlightService, never>;
18
22
  static ɵprov: i0.ɵɵInjectableDeclaration<IgxTextHighlightService>;
19
23
  }
@@ -1296,6 +1296,9 @@ export interface IgxHeadSelectorTemplateContext {
1296
1296
  export interface IgxSummaryTemplateContext {
1297
1297
  $implicit: IgxSummaryResult[];
1298
1298
  }
1299
+ export interface IgxGridPaginatorTemplateContext {
1300
+ $implicit: GridType;
1301
+ }
1299
1302
  /**
1300
1303
  * An interface describing settings for row/column pinning position.
1301
1304
  */
@@ -11,7 +11,7 @@ import { IgxColumnComponent } from '../columns/column.component';
11
11
  import { IgxRowIslandAPIService } from './row-island-api.service';
12
12
  import { PlatformUtil } from '../../core/utils';
13
13
  import { IgxColumnResizingService } from '../resizing/resizing.service';
14
- import { GridType } from '../common/grid.interface';
14
+ import { GridType, IgxGridPaginatorTemplateContext } from '../common/grid.interface';
15
15
  import { IgxGridToolbarTemplateContext } from '../toolbar/common';
16
16
  import { IgxActionStripToken } from '../../action-strip/token';
17
17
  import { IgxFlatTransactionFactory } from '../../services/transaction/transaction-factory.service';
@@ -42,10 +42,28 @@ export declare class IgxRowIslandComponent extends IgxHierarchicalGridBaseDirect
42
42
  * @hidden
43
43
  */
44
44
  childColumns: QueryList<IgxColumnComponent>;
45
- islandToolbarTemplate: TemplateRef<IgxGridToolbarTemplateContext>;
46
- islandPaginatorTemplate: TemplateRef<any>;
45
+ /**
46
+ * @hidden
47
+ * @internal
48
+ */
49
+ protected toolbarDirectiveTemplate: TemplateRef<IgxGridToolbarTemplateContext>;
50
+ /**
51
+ * @hidden
52
+ * @internal
53
+ */
54
+ protected paginatorDirectiveTemplate: TemplateRef<any>;
55
+ /**
56
+ * Sets/Gets the toolbar template for each child grid created from this row island.
57
+ */
58
+ get toolbarTemplate(): TemplateRef<IgxGridToolbarTemplateContext>;
59
+ set toolbarTemplate(template: TemplateRef<IgxGridToolbarTemplateContext>);
60
+ /**
61
+ * Sets/Gets the paginator template for each child grid created from this row island.
62
+ */
63
+ get paginatorTemplate(): TemplateRef<IgxGridPaginatorTemplateContext>;
64
+ set paginatorTemplate(template: TemplateRef<IgxGridPaginatorTemplateContext>);
47
65
  /** @hidden @internal **/
48
- actionStrips: QueryList<IgxActionStripToken>;
66
+ protected actionStrips: QueryList<IgxActionStripToken>;
49
67
  /**
50
68
  * @hidden
51
69
  */
@@ -89,6 +107,8 @@ export declare class IgxRowIslandComponent extends IgxHierarchicalGridBaseDirect
89
107
  private ri_columnListDiffer;
90
108
  private layout_id;
91
109
  private isInit;
110
+ private _toolbarTemplate;
111
+ private _paginatorTemplate;
92
112
  /**
93
113
  * Sets if all immediate children of the grids for this `IgxRowIslandComponent` should be expanded/collapsed.
94
114
  * ```html
@@ -157,6 +177,6 @@ export declare class IgxRowIslandComponent extends IgxHierarchicalGridBaseDirect
157
177
  protected updateChildren(): void;
158
178
  private cleanGridState;
159
179
  static ɵfac: i0.ɵɵFactoryDeclaration<IgxRowIslandComponent, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, null, null, null]>;
160
- static ɵcmp: i0.ɵɵComponentDeclaration<IgxRowIslandComponent, "igx-row-island", never, { "key": { "alias": "key"; "required": false; }; "expandChildren": { "alias": "expandChildren"; "required": false; }; }, { "layoutChange": "layoutChange"; "gridCreated": "gridCreated"; "gridInitialized": "gridInitialized"; }, ["islandToolbarTemplate", "islandPaginatorTemplate", "children", "childColumns", "actionStrips"], never, true, never>;
180
+ static ɵcmp: i0.ɵɵComponentDeclaration<IgxRowIslandComponent, "igx-row-island", never, { "key": { "alias": "key"; "required": false; }; "toolbarTemplate": { "alias": "toolbarTemplate"; "required": false; }; "paginatorTemplate": { "alias": "paginatorTemplate"; "required": false; }; "expandChildren": { "alias": "expandChildren"; "required": false; }; }, { "layoutChange": "layoutChange"; "gridCreated": "gridCreated"; "gridInitialized": "gridInitialized"; }, ["toolbarDirectiveTemplate", "paginatorDirectiveTemplate", "children", "childColumns", "actionStrips"], never, true, never>;
161
181
  static ngAcceptInputType_expandChildren: unknown;
162
182
  }
@@ -72,6 +72,9 @@ export interface IColumnState {
72
72
  parent: any;
73
73
  disableHiding: boolean;
74
74
  disablePinning: boolean;
75
+ collapsible?: boolean;
76
+ expanded?: boolean;
77
+ visibleWhenCollapsed?: boolean;
75
78
  }
76
79
  export type GridFeatures = keyof IGridStateOptions;
77
80
  export declare class IgxGridStateDirective {
@@ -277,10 +277,6 @@ export declare class IgxSelectComponent extends IgxDropDownComponent implements
277
277
  ngAfterViewInit(): void;
278
278
  /** @hidden @internal */
279
279
  ngAfterContentChecked(): void;
280
- /**
281
- * @hidden @internal
282
- */
283
- ngOnDestroy(): void;
284
280
  /**
285
281
  * @hidden @internal
286
282
  * Prevent input blur - closing the items container on Header/Footer Template click.
@@ -182,7 +182,6 @@ export declare class IgxSplitterComponent implements AfterContentInit {
182
182
  static ɵfac: i0.ɵɵFactoryDeclaration<IgxSplitterComponent, never>;
183
183
  static ɵcmp: i0.ɵɵComponentDeclaration<IgxSplitterComponent, "igx-splitter", never, { "type": { "alias": "type"; "required": false; }; }, { "resizeStart": "resizeStart"; "resizing": "resizing"; "resizeEnd": "resizeEnd"; }, ["panes"], ["igx-splitter-pane"], true, never>;
184
184
  }
185
- export declare const SPLITTER_INTERACTION_KEYS: Set<string>;
186
185
  /**
187
186
  * @hidden @internal
188
187
  * Represents the draggable bar that visually separates panes and allows for changing their sizes.
@@ -238,6 +237,7 @@ export declare class IgxSplitBarComponent {
238
237
  * A temporary holder for the pointer coordinates.
239
238
  */
240
239
  private startPoint;
240
+ private interactionKeys;
241
241
  /**
242
242
  * @hidden @internal
243
243
  */
@@ -3,8 +3,9 @@ import { IBaseCancelableBrowserEventArgs, IBaseEventArgs } from '../core/utils';
3
3
  import { IgxStepperComponent } from './stepper.component';
4
4
  import { IgxStepComponent } from './step/step.component';
5
5
  import { IgxStepActiveIndicatorDirective, IgxStepCompletedIndicatorDirective, IgxStepContentDirective, IgxStepIndicatorDirective, IgxStepInvalidIndicatorDirective } from './stepper.directive';
6
- import { Direction, HorizontalAnimationType, IgxCarouselComponentBase } from '../carousel/carousel-base';
6
+ import { Direction, IgxCarouselComponentBase } from '../carousel/carousel-base';
7
7
  import { ToggleAnimationPlayer, ToggleAnimationSettings } from '../expansion-panel/toggle-animation-component';
8
+ import { HorizontalAnimationType } from '../carousel/enums';
8
9
  export interface IgxStepper extends IgxCarouselComponentBase {
9
10
  steps: IgxStepComponent[];
10
11
  /** @hidden @internal */
@@ -1,11 +1,12 @@
1
1
  import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
2
- import { HorizontalAnimationType, IgxCarouselComponentBase } from '../carousel/carousel-base';
2
+ import { IgxCarouselComponentBase } from '../carousel/carousel-base';
3
3
  import { ToggleAnimationSettings } from '../expansion-panel/toggle-animation-component';
4
4
  import { AnimationService } from '../services/animation/animation';
5
5
  import { IgxStepComponent } from './step/step.component';
6
6
  import { IgxStepper, IgxStepperOrientation, IgxStepperTitlePosition, IgxStepType, IStepChangedEventArgs, IStepChangingEventArgs, VerticalAnimationType } from './stepper.common';
7
7
  import { IgxStepActiveIndicatorDirective, IgxStepCompletedIndicatorDirective, IgxStepInvalidIndicatorDirective } from './stepper.directive';
8
8
  import { IgxStepperService } from './stepper.service';
9
+ import { HorizontalAnimationType } from '../carousel/enums';
9
10
  import * as i0 from "@angular/core";
10
11
  /**
11
12
  * IgxStepper provides a wizard-like workflow by dividing content into logical steps.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "igniteui-angular",
3
- "version": "17.1.0-beta.3",
3
+ "version": "17.1.0",
4
4
  "description": "Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps",
5
5
  "author": "Infragistics",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -69,8 +69,6 @@
69
69
  "tree"
70
70
  ],
71
71
  "dependencies": {
72
- "@types/hammerjs": "^2.0.40",
73
- "hammerjs": "^2.0.8",
74
72
  "fflate": "^0.8.1",
75
73
  "tslib": "^2.3.0",
76
74
  "igniteui-trial-watermark": "^3.0.2",
@@ -83,15 +81,26 @@
83
81
  "@angular/common": "17",
84
82
  "@angular/core": "17",
85
83
  "@angular/animations": "17",
86
- "@angular/forms": "17"
84
+ "@angular/forms": "17",
85
+ "hammerjs": "^2.0.8",
86
+ "@types/hammerjs": "^2.0.40"
87
+ },
88
+ "peerDependenciesMeta": {
89
+ "hammerjs": {
90
+ "optional": true
91
+ },
92
+ "@types/hammerjs": {
93
+ "optional": true
94
+ }
87
95
  },
88
96
  "igxDevDependencies": {
89
- "@igniteui/angular-schematics": "~17.1.1316-rc.0"
97
+ "@igniteui/angular-schematics": "~17.1.1316"
90
98
  },
91
99
  "ng-update": {
92
100
  "migrations": "./migrations/migration-collection.json",
93
101
  "packageGroup": [
94
102
  "igniteui-angular",
103
+ "igniteui-angular-extras",
95
104
  "igniteui-angular-i18n"
96
105
  ]
97
106
  },
@@ -2,4 +2,5 @@ export interface Options {
2
2
  [key: string]: any;
3
3
  polyfills: boolean;
4
4
  resetCss: boolean;
5
+ addHammer: boolean;
5
6
  }
@@ -76,7 +76,7 @@ describe('ng-add schematics', () => {
76
76
  it('should add packages to package.json dependencies', () => __awaiter(void 0, void 0, void 0, function* () {
77
77
  const expectedDeps = dependency_handler_1.DEPENDENCIES_MAP.filter(dep => dep.target === dependency_handler_1.PackageTarget.REGULAR).map(dep => dep.name);
78
78
  const expectedDevDeps = dependency_handler_1.DEPENDENCIES_MAP.filter(dep => dep.target === dependency_handler_1.PackageTarget.DEV).map(dep => dep.name);
79
- yield runner.runSchematic('ng-add', { normalizeCss: false }, tree);
79
+ yield runner.runSchematic('ng-add', { normalizeCss: false, addHammer: true }, tree);
80
80
  const pkgJsonData = JSON.parse(tree.readContent('/package.json'));
81
81
  expect(pkgJsonData.dependencies).toBeTruthy();
82
82
  expect(pkgJsonData.devDependencies).toBeTruthy();
@@ -94,33 +94,52 @@ describe('ng-add schematics', () => {
94
94
  yield runner.runSchematic('ng-add', { normalizeCss: false }, tree);
95
95
  const pkgJsonData = JSON.parse(tree.readContent('/package.json'));
96
96
  expect(pkgJsonData.dependencies['fflate']).toBeTruthy();
97
+ // hammer is optional now.
98
+ expect(pkgJsonData.dependencies['hammerjs']).toBeFalsy();
99
+ }));
100
+ it('should add hammerjs dependency to package.json dependencies if addHammer prompt is set.', () => __awaiter(void 0, void 0, void 0, function* () {
101
+ yield runner.runSchematic('ng-add', { normalizeCss: false, addHammer: true }, tree);
102
+ const pkgJsonData = JSON.parse(tree.readContent('/package.json'));
103
+ expect(pkgJsonData.dependencies['fflate']).toBeTruthy();
97
104
  expect(pkgJsonData.dependencies['hammerjs']).toBeTruthy();
98
105
  }));
99
106
  it('should NOT add hammer.js to the main.ts file', () => __awaiter(void 0, void 0, void 0, function* () {
100
- yield runner.runSchematic('ng-add', { normalizeCss: false }, tree);
107
+ yield runner.runSchematic('ng-add', { normalizeCss: false, addHammer: true }, tree);
101
108
  const mainTs = tree.read(`${sourceRoot}/main.ts`).toString();
102
109
  expect(mainTs).not.toContain('import \'hammerjs\';');
103
110
  }));
104
111
  it('should NOT add hammer.js to the test.ts file', () => __awaiter(void 0, void 0, void 0, function* () {
105
- yield runner.runSchematic('ng-add', { normalizeCss: false }, tree);
112
+ yield runner.runSchematic('ng-add', { normalizeCss: false, addHammer: true }, tree);
106
113
  const testTs = tree.read(`${sourceRoot}/test.ts`).toString();
107
114
  expect(testTs).not.toContain('import \'hammerjs\';');
108
115
  }));
109
- it('should add hammer.js in angular.json build options under scripts', () => __awaiter(void 0, void 0, void 0, function* () {
116
+ // Hammer is optional now.
117
+ it('should not add hammer.js in angular.json build options under scripts', () => __awaiter(void 0, void 0, void 0, function* () {
110
118
  yield runner.runSchematic('ng-add', { normalizeCss: false }, tree);
111
119
  const ngJsonConfigResult = JSON.parse(tree.read('/angular.json').toString());
120
+ expect(ngJsonConfigResult.projects.testProj.architect.build.options.scripts).not.toContain('./node_modules/hammerjs/hammer.min.js');
121
+ }));
122
+ it('should add hammer.js in angular.json build options under scripts if addHammer prompt is set.', () => __awaiter(void 0, void 0, void 0, function* () {
123
+ yield runner.runSchematic('ng-add', { normalizeCss: false, addHammer: true }, tree);
124
+ const ngJsonConfigResult = JSON.parse(tree.read('/angular.json').toString());
112
125
  expect(ngJsonConfigResult.projects.testProj.architect.build.options.scripts).toContain('./node_modules/hammerjs/hammer.min.js');
113
126
  }));
114
- it('should add hammer.js in angular.json test options under scripts', () => __awaiter(void 0, void 0, void 0, function* () {
127
+ // Hammer is optional now.
128
+ it('should not add hammer.js in angular.json test options under scripts', () => __awaiter(void 0, void 0, void 0, function* () {
115
129
  yield runner.runSchematic('ng-add', { normalizeCss: false }, tree);
116
130
  const ngJsonConfigResult = JSON.parse(tree.read('/angular.json').toString());
131
+ expect(ngJsonConfigResult.projects.testProj.architect.test.options.scripts).not.toContain('./node_modules/hammerjs/hammer.min.js');
132
+ }));
133
+ it('should add hammer.js in angular.json test options under scripts if addHammer prompt is set.', () => __awaiter(void 0, void 0, void 0, function* () {
134
+ yield runner.runSchematic('ng-add', { normalizeCss: false, addHammer: true }, tree);
135
+ const ngJsonConfigResult = JSON.parse(tree.read('/angular.json').toString());
117
136
  expect(ngJsonConfigResult.projects.testProj.architect.test.options.scripts).toContain('./node_modules/hammerjs/hammer.min.js');
118
137
  }));
119
138
  it('should NOT duplicate hammer.js if it exists in angular.json build options', () => __awaiter(void 0, void 0, void 0, function* () {
120
139
  const ngJsonConfig1 = JSON.parse(tree.read('/angular.json').toString());
121
140
  ngJsonConfig1.projects.testProj.architect.build.options.scripts.push('./node_modules/hammerjs/hammer.min.js');
122
141
  tree.overwrite('/angular.json', JSON.stringify(ngJsonConfig1));
123
- yield runner.runSchematic('ng-add', { normalizeCss: false }, tree);
142
+ yield runner.runSchematic('ng-add', { normalizeCss: false, addHammer: true }, tree);
124
143
  const ngJsonConfigResult = JSON.parse(tree.read('/angular.json').toString());
125
144
  expect(ngJsonConfigResult.projects.testProj.architect.build.options.scripts.length).toBe(1);
126
145
  expect(ngJsonConfigResult.projects.testProj.architect.build.options.scripts).toMatch('./node_modules/hammerjs/hammer.min.js');
@@ -129,7 +148,7 @@ describe('ng-add schematics', () => {
129
148
  const ngJsonConfig1 = JSON.parse(tree.read('/angular.json').toString());
130
149
  ngJsonConfig1.projects.testProj.architect.test.options.scripts.push('./node_modules/hammerjs/hammer.min.js');
131
150
  tree.overwrite('/angular.json', JSON.stringify(ngJsonConfig1));
132
- yield runner.runSchematic('ng-add', { normalizeCss: false }, tree);
151
+ yield runner.runSchematic('ng-add', { normalizeCss: false, addHammer: true }, tree);
133
152
  const ngJsonConfigResult = JSON.parse(tree.read('/angular.json').toString());
134
153
  expect(ngJsonConfigResult.projects.testProj.architect.test.options.scripts.length).toBe(1);
135
154
  expect(ngJsonConfigResult.projects.testProj.architect.test.options.scripts).toMatch('./node_modules/hammerjs/hammer.min.js');
@@ -138,7 +157,7 @@ describe('ng-add schematics', () => {
138
157
  const ngJsonConfig1 = JSON.parse(tree.read('/angular.json').toString());
139
158
  ngJsonConfig1.projects.testProj.architect.build.options.scripts.push('./node_modules/hammerjs/hammer.min.js');
140
159
  tree.overwrite('/angular.json', JSON.stringify(ngJsonConfig1));
141
- yield runner.runSchematic('ng-add', { normalizeCss: false }, tree);
160
+ yield runner.runSchematic('ng-add', { normalizeCss: false, addHammer: true }, tree);
142
161
  const newContent = tree.read(`${sourceRoot}/main.ts`).toString();
143
162
  expect(newContent).toMatch('// test comment');
144
163
  }));
@@ -146,20 +165,26 @@ describe('ng-add schematics', () => {
146
165
  const ngJsonConfig1 = JSON.parse(tree.read('/angular.json').toString());
147
166
  ngJsonConfig1.projects.testProj.architect.test.options.scripts.push('./node_modules/hammerjs/hammer.min.js');
148
167
  tree.overwrite('/angular.json', JSON.stringify(ngJsonConfig1));
149
- yield runner.runSchematic('ng-add', { normalizeCss: false }, tree);
168
+ yield runner.runSchematic('ng-add', { normalizeCss: false, addHammer: true }, tree);
150
169
  const newContent = tree.read(`${sourceRoot}/test.ts`).toString();
151
170
  expect(newContent).toMatch('// test comment');
152
171
  }));
153
- it('should add hammer.js to package.json dependencies', () => __awaiter(void 0, void 0, void 0, function* () {
172
+ // Hammer is optional now.
173
+ it('should not add hammer.js to package.json dependencies', () => __awaiter(void 0, void 0, void 0, function* () {
154
174
  yield runner.runSchematic('ng-add', { normalizeCss: false }, tree);
155
175
  const pkgJsonData = JSON.parse(tree.readContent('/package.json'));
176
+ expect(pkgJsonData.dependencies['hammerjs']).toBeFalsy();
177
+ }));
178
+ it('should add hammer.js to package.json dependencies if addHammer prompt is set.', () => __awaiter(void 0, void 0, void 0, function* () {
179
+ yield runner.runSchematic('ng-add', { normalizeCss: false, addHammer: true }, tree);
180
+ const pkgJsonData = JSON.parse(tree.readContent('/package.json'));
156
181
  expect(pkgJsonData.dependencies['hammerjs']).toBeTruthy();
157
182
  }));
158
183
  it('should NOT add hammer.js to angular.json if it exists in main.ts options', () => __awaiter(void 0, void 0, void 0, function* () {
159
184
  const mainTsPath = `${sourceRoot}/main.ts`;
160
185
  const content = tree.read(mainTsPath).toString();
161
186
  tree.overwrite(mainTsPath, 'import \'hammerjs\';\n' + content);
162
- yield runner.runSchematic('ng-add', { normalizeCss: false }, tree);
187
+ yield runner.runSchematic('ng-add', { normalizeCss: false, addHammer: true }, tree);
163
188
  const ngJsonConfigResult = JSON.parse(tree.read('/angular.json').toString());
164
189
  expect(ngJsonConfigResult.projects.testProj.architect.build.options.scripts.length).toBe(0);
165
190
  expect(ngJsonConfigResult.projects.testProj.architect.build.options.scripts).not.toContain('./node_modules/hammerjs/hammer.min.js');
@@ -9,6 +9,12 @@
9
9
  "description": "Add reset CSS lib",
10
10
  "default": true,
11
11
  "x-prompt": "Add CSS library to reset HTML element styles across browsers?"
12
+ },
13
+ "addHammer": {
14
+ "type": "boolean",
15
+ "description": "Add HammerJS",
16
+ "default": false,
17
+ "x-prompt": "Add HammerJS setup for touch-specific interactions support?"
12
18
  }
13
19
  },
14
20
  "required": []