@wizishop/angular-components 0.0.118 → 0.0.121

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 (35) hide show
  1. package/angular-components.scss +5094 -5094
  2. package/bundles/wizishop-angular-components.umd.js +272 -156
  3. package/bundles/wizishop-angular-components.umd.js.map +1 -1
  4. package/bundles/wizishop-angular-components.umd.min.js +2 -2
  5. package/bundles/wizishop-angular-components.umd.min.js.map +1 -1
  6. package/esm2015/lib/components/checkbox/checkbox.component.js +1 -1
  7. package/esm2015/lib/components/edit-in-place/edit-in-place.component.js +1 -1
  8. package/esm2015/lib/components/inputs/input-with-select/input-with-select.component.js +3 -3
  9. package/esm2015/lib/components/selects/select/select.component.js +1 -1
  10. package/esm2015/lib/components/table/directives/checkBoxRow.directive.js +21 -11
  11. package/esm2015/lib/components/table/shared/table-checkbox-id.service.js +18 -0
  12. package/esm2015/lib/components/table/table.component.js +36 -11
  13. package/esm2015/lib/components/text-area/text-area.component.js +2 -1
  14. package/esm2015/lib/components/tooltip/tooltip.component.js +1 -1
  15. package/esm2015/lib/services/multiple-selection.service.js +61 -0
  16. package/esm2015/lib/utils/html-container.class.js +30 -0
  17. package/esm2015/lib/utils/slection-item.interface.js +2 -0
  18. package/esm2015/public-api.js +2 -2
  19. package/esm2015/wizishop-angular-components.js +4 -2
  20. package/fesm2015/wizishop-angular-components.js +254 -147
  21. package/fesm2015/wizishop-angular-components.js.map +1 -1
  22. package/lib/components/inputs/input-with-select/input-with-select.component.d.ts +1 -1
  23. package/lib/components/table/directives/checkBoxRow.directive.d.ts +7 -1
  24. package/lib/components/table/shared/table-checkbox-id.service.d.ts +7 -0
  25. package/lib/components/table/table.component.d.ts +13 -4
  26. package/lib/services/multiple-selection.service.d.ts +14 -0
  27. package/lib/{models/html-container.model.d.ts → utils/html-container.class.d.ts} +0 -0
  28. package/lib/utils/slection-item.interface.d.ts +5 -0
  29. package/package.json +1 -1
  30. package/public-api.d.ts +1 -1
  31. package/wizishop-angular-components-0.0.121.tgz +0 -0
  32. package/wizishop-angular-components.d.ts +3 -1
  33. package/wizishop-angular-components.metadata.json +1 -1
  34. package/esm2015/lib/models/html-container.model.js +0 -30
  35. package/wizishop-angular-components-0.0.118.tgz +0 -0
@@ -12,7 +12,7 @@ export declare class InputWithSelectComponent implements OnInit {
12
12
  selectValueChange: EventEmitter<number>;
13
13
  constructor();
14
14
  ngOnInit(): void;
15
- onChangeValue(index: number): void;
15
+ onClickItem(index: number): void;
16
16
  onToggleSelect(): void;
17
17
  onCloseSelect(): void;
18
18
  onChangeInputValue(e: any): void;
@@ -1,4 +1,5 @@
1
1
  import { ComponentFactoryResolver, EventEmitter, Renderer2, ElementRef, ApplicationRef, Injector } from '@angular/core';
2
+ import { TableCheckboxIdService } from '../shared/table-checkbox-id.service';
2
3
  export declare class CheckBoxRow {
3
4
  private currentRow;
4
5
  private appRef;
@@ -6,6 +7,7 @@ export declare class CheckBoxRow {
6
7
  private document;
7
8
  private resolver;
8
9
  private injector;
10
+ private tableCheckboxIdService;
9
11
  checkBoxId: string | number;
10
12
  checkBoxName: string;
11
13
  set checkBoxValue(value: boolean);
@@ -14,12 +16,16 @@ export declare class CheckBoxRow {
14
16
  checkBoxValueChange: EventEmitter<boolean>;
15
17
  private checkboxComponentRef;
16
18
  private htmlContainer;
17
- constructor(currentRow: ElementRef, appRef: ApplicationRef, renderer: Renderer2, document: any, resolver: ComponentFactoryResolver, injector: Injector);
19
+ private checkBoxElement;
20
+ constructor(currentRow: ElementRef, appRef: ApplicationRef, renderer: Renderer2, document: any, resolver: ComponentFactoryResolver, injector: Injector, tableCheckboxIdService: TableCheckboxIdService);
18
21
  ngOnInit(): void;
19
22
  createCheckBoxComponent(): void;
20
23
  private handleChecboxInputs;
21
24
  private setCheckBoxValue;
22
25
  private handleCheckboxOutputs;
23
26
  private _toggleCheckbox;
27
+ getElement(): any;
28
+ isActive(): boolean;
29
+ setActive(isActive: boolean): void;
24
30
  ngOnDestroy(): void;
25
31
  }
@@ -0,0 +1,7 @@
1
+ export declare class TableCheckboxIdService {
2
+ static tableInstance: number;
3
+ currentTableInstance: number;
4
+ nbCheckboxInstances: number;
5
+ constructor();
6
+ getUniqueId(): string;
7
+ }
@@ -1,8 +1,16 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
1
+ import { EventEmitter, OnInit, QueryList } from '@angular/core';
2
2
  import { FiltersTableService } from './shared/filters-table.service';
3
3
  import { TableFilters } from './shared/table-filters.model';
4
+ import { CheckBoxRow } from './directives/checkBoxRow.directive';
5
+ import { MultiSelectionService } from '../../services/multiple-selection.service';
6
+ import { TableCheckboxIdService } from './shared/table-checkbox-id.service';
7
+ import { TableRow } from './directives/raw.directive';
4
8
  export declare class TableComponent implements OnInit {
5
9
  private filtersTableService;
10
+ private tableCheckboxIdService;
11
+ private multiSelectionService;
12
+ checkBoxRows: QueryList<CheckBoxRow>;
13
+ tableRows: QueryList<TableRow>;
6
14
  tableFilters: TableFilters;
7
15
  tableFiltersChange: EventEmitter<TableFilters>;
8
16
  tableRoutingName: string;
@@ -10,8 +18,8 @@ export declare class TableComponent implements OnInit {
10
18
  private _tableFiltersGroup;
11
19
  /** Pass to true to display checkbox in the header table */
12
20
  checkbox: boolean;
13
- /** Emit new header checboxValue */
14
21
  toggleAllCheckBox: EventEmitter<boolean>;
22
+ checkBoxSelectionChange: EventEmitter<number[]>;
15
23
  /** Pass to true to hide search input */
16
24
  disableSearch: boolean;
17
25
  /** Pass to true to hide the pagniator */
@@ -19,8 +27,9 @@ export declare class TableComponent implements OnInit {
19
27
  isLoading: boolean;
20
28
  headerCheckBoxId: string;
21
29
  private filterGroupChangeSub;
22
- constructor(filtersTableService: FiltersTableService);
30
+ constructor(filtersTableService: FiltersTableService, tableCheckboxIdService: TableCheckboxIdService, multiSelectionService: MultiSelectionService);
23
31
  ngOnInit(): void;
32
+ ngAfterViewInit(): void;
24
33
  onToggleAllCheckBox(event: any): void;
25
34
  searchChange(): void;
26
35
  pageChange(): void;
@@ -28,5 +37,5 @@ export declare class TableComponent implements OnInit {
28
37
  * Set tableFilters from routing data existing in the url
29
38
  * */
30
39
  private setTablesFilters;
31
- ngDestroy(): void;
40
+ ngOnDestroy(): void;
32
41
  }
@@ -0,0 +1,14 @@
1
+ import { QueryList } from "@angular/core";
2
+ import { SelectionItem } from "../utils/slection-item.interface";
3
+ export declare class MultiSelectionService {
4
+ private items;
5
+ private subscription;
6
+ private lastIndex;
7
+ private activeChanges;
8
+ activeChanges$: import("rxjs").Observable<number[]>;
9
+ constructor();
10
+ handle(items: QueryList<SelectionItem>, toggleSingleItem?: boolean): void;
11
+ private getListeners;
12
+ getActives(): SelectionItem[];
13
+ destroy(): void;
14
+ }
@@ -0,0 +1,5 @@
1
+ export interface SelectionItem {
2
+ getElement: () => Element;
3
+ isActive: () => boolean;
4
+ setActive: (isActive: boolean) => void;
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wizishop/angular-components",
3
- "version": "0.0.118",
3
+ "version": "0.0.121",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^11.2.12",
6
6
  "@angular/core": "^11.2.12",
package/public-api.d.ts CHANGED
@@ -54,7 +54,7 @@ export * from './lib/directives/abstract-debounce/abstract-debounce.directive';
54
54
  export * from './lib/directives/auto-hide/auto-hide.directive';
55
55
  export * from './lib/directives/zindex-toggle/zindex-toggle.directive';
56
56
  export * from './lib/directives/ng-var.directive';
57
- export * from './lib/models/html-container.model';
57
+ export * from './lib/utils/html-container.class';
58
58
  export * from './lib/components/selects/call-to-action.model';
59
59
  export * from './lib/components/table/shared/filters-table.service';
60
60
  export * from './lib/components/table/shared/table-filters.model';
@@ -2,7 +2,7 @@
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
4
  export * from './public-api';
5
- export { inOutX as ɵn } from './lib/animations/in-out/in-out-x.animation';
5
+ export { inOutX as ɵp } from './lib/animations/in-out/in-out-x.animation';
6
6
  export { inOutY as ɵm } from './lib/animations/in-out/in-out-y.animation';
7
7
  export { CheckboxModule as ɵl } from './lib/components/checkbox/checkbox.module';
8
8
  export { InputSearchModule as ɵg } from './lib/components/inputs/input-search/input-search.module';
@@ -13,6 +13,8 @@ export { PagniationArrayTotalPages as ɵc } from './lib/components/pagination/pi
13
13
  export { PagniationText as ɵe } from './lib/components/pagination/pipes/custom-text.pipe';
14
14
  export { PagniationIsLastPage as ɵd } from './lib/components/pagination/pipes/is-last-page.pipe';
15
15
  export { ProgressBarModule as ɵj } from './lib/components/progress-bar/progress-bar.module';
16
+ export { TableCheckboxIdService as ɵn } from './lib/components/table/shared/table-checkbox-id.service';
16
17
  export { TableModule as ɵf } from './lib/components/table/table.module';
17
18
  export { TooltipModule as ɵi } from './lib/components/tooltip/tooltip.module';
18
19
  export { DomService as ɵa } from './lib/services/dom.service';
20
+ export { MultiSelectionService as ɵo } from './lib/services/multiple-selection.service';