@skyux/lists 6.0.0 → 6.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.
- package/documentation.json +518 -251
- package/esm2020/lib/modules/repeater/repeater-item-roles.type.mjs +2 -0
- package/esm2020/lib/modules/repeater/repeater-item.component.mjs +118 -29
- package/esm2020/lib/modules/repeater/repeater-role.type.mjs +2 -0
- package/esm2020/lib/modules/repeater/repeater.component.mjs +66 -4
- package/esm2020/lib/modules/repeater/repeater.module.mjs +5 -1
- package/esm2020/lib/modules/repeater/repeater.service.mjs +8 -3
- package/fesm2015/skyux-lists.mjs +191 -32
- package/fesm2015/skyux-lists.mjs.map +1 -1
- package/fesm2020/skyux-lists.mjs +192 -32
- package/fesm2020/skyux-lists.mjs.map +1 -1
- package/lib/modules/repeater/repeater-item-roles.type.d.ts +5 -0
- package/lib/modules/repeater/repeater-item.component.d.ts +17 -2
- package/lib/modules/repeater/repeater-role.type.d.ts +1 -0
- package/lib/modules/repeater/repeater.component.d.ts +7 -2
- package/lib/modules/repeater/repeater.module.d.ts +6 -5
- package/lib/modules/repeater/repeater.service.d.ts +2 -0
- package/package.json +11 -10
|
@@ -2,7 +2,9 @@ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy,
|
|
|
2
2
|
import { SkyCheckboxChange } from '@skyux/forms';
|
|
3
3
|
import { SkyLibResourcesService } from '@skyux/i18n';
|
|
4
4
|
import { SkyInlineFormCloseArgs, SkyInlineFormConfig } from '@skyux/inline-form';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
5
6
|
import { SkyRepeaterAdapterService } from './repeater-adapter.service';
|
|
7
|
+
import { SkyRepeaterItemRolesType } from './repeater-item-roles.type';
|
|
6
8
|
import { SkyRepeaterService } from './repeater.service';
|
|
7
9
|
import * as i0 from "@angular/core";
|
|
8
10
|
/**
|
|
@@ -14,6 +16,17 @@ export declare class SkyRepeaterItemComponent implements OnDestroy, OnInit, Afte
|
|
|
14
16
|
private adapterService;
|
|
15
17
|
private elementRef;
|
|
16
18
|
private resourceService;
|
|
19
|
+
/**
|
|
20
|
+
* Make the first, non-disabled item tab-focusable.
|
|
21
|
+
* - Disabled items should not be focusable per [W3C](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_disabled_controls).
|
|
22
|
+
* - One item per list/grid/listbox should be tab focusable per [W3C](https://www.w3.org/TR/wai-aria-practices-1.1/#grid).
|
|
23
|
+
*/
|
|
24
|
+
get tabindex(): 0 | -1;
|
|
25
|
+
/**
|
|
26
|
+
* Whether to exclude an item when cycling through.
|
|
27
|
+
*/
|
|
28
|
+
set disabled(value: boolean);
|
|
29
|
+
get disabled(): boolean;
|
|
17
30
|
/**
|
|
18
31
|
* Specifies a human-readable name for the repeater item that is available for multiple purposes,
|
|
19
32
|
* such as accessibility and instrumentation. For example, the component uses the name to
|
|
@@ -88,6 +101,7 @@ export declare class SkyRepeaterItemComponent implements OnDestroy, OnInit, Afte
|
|
|
88
101
|
isActive: boolean;
|
|
89
102
|
set isCollapsible(value: boolean);
|
|
90
103
|
get isCollapsible(): boolean;
|
|
104
|
+
itemRole$: Observable<SkyRepeaterItemRolesType>;
|
|
91
105
|
keyboardReorderingEnabled: boolean;
|
|
92
106
|
reorderButtonLabel: string;
|
|
93
107
|
reorderState: string;
|
|
@@ -107,12 +121,14 @@ export declare class SkyRepeaterItemComponent implements OnDestroy, OnInit, Afte
|
|
|
107
121
|
private reorderStateDescription;
|
|
108
122
|
private reorderSteps;
|
|
109
123
|
private _isCollapsible;
|
|
124
|
+
private _isDisabled;
|
|
110
125
|
private _isExpanded;
|
|
111
126
|
private _isSelected;
|
|
112
127
|
constructor(repeaterService: SkyRepeaterService, changeDetector: ChangeDetectorRef, adapterService: SkyRepeaterAdapterService, elementRef: ElementRef, resourceService: SkyLibResourcesService);
|
|
113
128
|
ngOnInit(): void;
|
|
114
129
|
ngAfterViewInit(): void;
|
|
115
130
|
ngOnDestroy(): void;
|
|
131
|
+
onKeydown($event: KeyboardEvent): void;
|
|
116
132
|
headerClick(): void;
|
|
117
133
|
chevronDirectionChange(direction: string): void;
|
|
118
134
|
onRepeaterItemClick(event: MouseEvent): void;
|
|
@@ -122,7 +138,6 @@ export declare class SkyRepeaterItemComponent implements OnDestroy, OnInit, Afte
|
|
|
122
138
|
moveToTop(event: Event): void;
|
|
123
139
|
onReorderHandleKeyDown(event: KeyboardEvent): void;
|
|
124
140
|
onReorderHandleBlur(event: any): void;
|
|
125
|
-
onItemKeyDown(event: KeyboardEvent): void;
|
|
126
141
|
private slideForExpanded;
|
|
127
142
|
private keyboardReorderUp;
|
|
128
143
|
private keyboardReorderDown;
|
|
@@ -130,5 +145,5 @@ export declare class SkyRepeaterItemComponent implements OnDestroy, OnInit, Afte
|
|
|
130
145
|
private revertReorderSteps;
|
|
131
146
|
private updateExpandOnContentChange;
|
|
132
147
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyRepeaterItemComponent, never>;
|
|
133
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SkyRepeaterItemComponent, "sky-repeater-item", never, { "itemName": "itemName"; "inlineFormConfig": "inlineFormConfig"; "inlineFormTemplate": "inlineFormTemplate"; "isExpanded": "isExpanded"; "isSelected": "isSelected"; "reorderable": "reorderable"; "selectable": "selectable"; "showInlineForm": "showInlineForm"; "tag": "tag"; }, { "collapse": "collapse"; "expand": "expand"; "inlineFormClose": "inlineFormClose"; "isSelectedChange": "isSelectedChange"; }, ["contextMenu", "repeaterItemContentComponents"], ["sky-inline-delete", "sky-repeater-item-context-menu", "sky-repeater-item-title", "sky-repeater-item-content"]>;
|
|
148
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyRepeaterItemComponent, "sky-repeater-item", never, { "disabled": "disabled"; "itemName": "itemName"; "inlineFormConfig": "inlineFormConfig"; "inlineFormTemplate": "inlineFormTemplate"; "isExpanded": "isExpanded"; "isSelected": "isSelected"; "reorderable": "reorderable"; "selectable": "selectable"; "showInlineForm": "showInlineForm"; "tag": "tag"; }, { "collapse": "collapse"; "expand": "expand"; "inlineFormClose": "inlineFormClose"; "isSelectedChange": "isSelectedChange"; }, ["contextMenu", "repeaterItemContentComponents"], ["sky-inline-delete", "sky-repeater-item-context-menu", "sky-repeater-item-title", "sky-repeater-item-content"]>;
|
|
134
149
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type SkyRepeaterRoleType = 'list' | 'listbox' | 'grid';
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, QueryList, Renderer2, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { DragulaService } from 'ng2-dragula';
|
|
3
3
|
import { SkyRepeaterAdapterService } from './repeater-adapter.service';
|
|
4
4
|
import { SkyRepeaterItemComponent } from './repeater-item.component';
|
|
5
|
+
import { SkyRepeaterRoleType } from './repeater-role.type';
|
|
5
6
|
import { SkyRepeaterService } from './repeater.service';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
/**
|
|
8
9
|
* Creates a container to display repeater items.
|
|
9
10
|
*/
|
|
10
|
-
export declare class SkyRepeaterComponent implements AfterContentInit, OnChanges, OnDestroy {
|
|
11
|
+
export declare class SkyRepeaterComponent implements AfterContentInit, OnChanges, OnDestroy, OnInit {
|
|
11
12
|
private changeDetector;
|
|
12
13
|
private repeaterService;
|
|
13
14
|
private adapterService;
|
|
@@ -66,6 +67,7 @@ export declare class SkyRepeaterComponent implements AfterContentInit, OnChanges
|
|
|
66
67
|
orderChange: EventEmitter<any[]>;
|
|
67
68
|
items: QueryList<SkyRepeaterItemComponent>;
|
|
68
69
|
dragulaGroupName: string;
|
|
70
|
+
role: SkyRepeaterRoleType | undefined;
|
|
69
71
|
private dragulaUnsubscribe;
|
|
70
72
|
private ngUnsubscribe;
|
|
71
73
|
private _expandMode;
|
|
@@ -73,11 +75,14 @@ export declare class SkyRepeaterComponent implements AfterContentInit, OnChanges
|
|
|
73
75
|
ngAfterContentInit(): void;
|
|
74
76
|
ngOnChanges(changes: SimpleChanges): void;
|
|
75
77
|
ngOnDestroy(): void;
|
|
78
|
+
ngOnInit(): void;
|
|
79
|
+
onCdkObserveContent(): void;
|
|
76
80
|
private updateForExpandMode;
|
|
77
81
|
private initializeDragAndDrop;
|
|
78
82
|
private destroyDragAndDrop;
|
|
79
83
|
private emitTags;
|
|
80
84
|
private everyItemHasTag;
|
|
85
|
+
private updateRole;
|
|
81
86
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyRepeaterComponent, never>;
|
|
82
87
|
static ɵcmp: i0.ɵɵComponentDeclaration<SkyRepeaterComponent, "sky-repeater", never, { "activeIndex": "activeIndex"; "ariaLabel": "ariaLabel"; "reorderable": "reorderable"; "expandMode": "expandMode"; }, { "activeIndexChange": "activeIndexChange"; "orderChange": "orderChange"; }, ["items"], ["*"]>;
|
|
83
88
|
}
|
|
@@ -6,12 +6,13 @@ import * as i4 from "./repeater-item-context-menu.component";
|
|
|
6
6
|
import * as i5 from "./repeater-item-title.component";
|
|
7
7
|
import * as i6 from "@angular/common";
|
|
8
8
|
import * as i7 from "ng2-dragula";
|
|
9
|
-
import * as i8 from "@
|
|
10
|
-
import * as i9 from "@skyux/
|
|
11
|
-
import * as i10 from "@skyux/
|
|
12
|
-
import * as i11 from "
|
|
9
|
+
import * as i8 from "@angular/cdk/observers";
|
|
10
|
+
import * as i9 from "@skyux/indicators";
|
|
11
|
+
import * as i10 from "@skyux/forms";
|
|
12
|
+
import * as i11 from "@skyux/inline-form";
|
|
13
|
+
import * as i12 from "../shared/sky-lists-resources.module";
|
|
13
14
|
export declare class SkyRepeaterModule {
|
|
14
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyRepeaterModule, never>;
|
|
15
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyRepeaterModule, [typeof i1.SkyRepeaterComponent, typeof i2.SkyRepeaterItemComponent, typeof i3.SkyRepeaterItemContentComponent, typeof i4.SkyRepeaterItemContextMenuComponent, typeof i5.SkyRepeaterItemTitleComponent], [typeof i6.CommonModule, typeof i7.DragulaModule, typeof i8.
|
|
16
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyRepeaterModule, [typeof i1.SkyRepeaterComponent, typeof i2.SkyRepeaterItemComponent, typeof i3.SkyRepeaterItemContentComponent, typeof i4.SkyRepeaterItemContextMenuComponent, typeof i5.SkyRepeaterItemTitleComponent], [typeof i6.CommonModule, typeof i7.DragulaModule, typeof i8.ObserversModule, typeof i9.SkyChevronModule, typeof i10.SkyCheckboxModule, typeof i9.SkyIconModule, typeof i11.SkyInlineFormModule, typeof i12.SkyListsResourcesModule], [typeof i1.SkyRepeaterComponent, typeof i2.SkyRepeaterItemComponent, typeof i3.SkyRepeaterItemContentComponent, typeof i4.SkyRepeaterItemContextMenuComponent, typeof i5.SkyRepeaterItemTitleComponent]>;
|
|
16
17
|
static ɵinj: i0.ɵɵInjectorDeclaration<SkyRepeaterModule>;
|
|
17
18
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy } from '@angular/core';
|
|
2
2
|
import { BehaviorSubject } from 'rxjs';
|
|
3
|
+
import { SkyRepeaterItemRolesType } from './repeater-item-roles.type';
|
|
3
4
|
import { SkyRepeaterItemComponent } from './repeater-item.component';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/**
|
|
@@ -12,6 +13,7 @@ export declare class SkyRepeaterService implements OnDestroy {
|
|
|
12
13
|
expandMode: string;
|
|
13
14
|
itemCollapseStateChange: EventEmitter<SkyRepeaterItemComponent>;
|
|
14
15
|
items: SkyRepeaterItemComponent[];
|
|
16
|
+
readonly itemRole: BehaviorSubject<SkyRepeaterItemRolesType>;
|
|
15
17
|
orderChange: BehaviorSubject<void>;
|
|
16
18
|
repeaterGroupId: number;
|
|
17
19
|
ngOnDestroy(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/lists",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"author": "Blackbaud, Inc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blackbaud",
|
|
@@ -40,18 +40,19 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
+
"@angular/cdk": "^13.3.2",
|
|
43
44
|
"@angular/common": "^13.3.2",
|
|
44
45
|
"@angular/core": "^13.3.2",
|
|
45
46
|
"@angular/platform-browser": "^13.3.2",
|
|
46
|
-
"@skyux-sdk/testing": "6.
|
|
47
|
-
"@skyux/animations": "6.
|
|
48
|
-
"@skyux/core": "6.
|
|
49
|
-
"@skyux/forms": "6.
|
|
50
|
-
"@skyux/i18n": "6.
|
|
51
|
-
"@skyux/indicators": "6.
|
|
52
|
-
"@skyux/inline-form": "6.
|
|
53
|
-
"@skyux/popovers": "6.
|
|
54
|
-
"@skyux/theme": "6.
|
|
47
|
+
"@skyux-sdk/testing": "6.1.0",
|
|
48
|
+
"@skyux/animations": "6.1.0",
|
|
49
|
+
"@skyux/core": "6.1.0",
|
|
50
|
+
"@skyux/forms": "6.1.0",
|
|
51
|
+
"@skyux/i18n": "6.1.0",
|
|
52
|
+
"@skyux/indicators": "6.1.0",
|
|
53
|
+
"@skyux/inline-form": "6.1.0",
|
|
54
|
+
"@skyux/popovers": "6.1.0",
|
|
55
|
+
"@skyux/theme": "6.1.0"
|
|
55
56
|
},
|
|
56
57
|
"dependencies": {
|
|
57
58
|
"dragula": "3.7.3",
|