@progress/kendo-angular-navigation 2.1.0-dev.202210190753 → 2.1.0-dev.202210241311
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/actionsheet/actionsheet.component.d.ts +11 -3
- package/actionsheet/list.component.d.ts +1 -0
- package/actionsheet/models/index.d.ts +3 -1
- package/actionsheet/templates/{title-template.directive.d.ts → content-template.directive.d.ts} +5 -5
- package/actionsheet/templates/footer-template.directive.d.ts +17 -0
- package/actionsheet/templates/header-template.directive.d.ts +17 -0
- package/actionsheet.module.d.ts +5 -3
- package/bundles/kendo-angular-navigation.umd.js +1 -1
- package/common/util.d.ts +5 -1
- package/esm2015/actionsheet/actionsheet.component.js +78 -52
- package/esm2015/actionsheet/list.component.js +10 -18
- package/esm2015/actionsheet/models/index.js +3 -1
- package/esm2015/actionsheet/templates/content-template.directive.js +26 -0
- package/esm2015/actionsheet/templates/footer-template.directive.js +26 -0
- package/esm2015/actionsheet/templates/header-template.directive.js +26 -0
- package/esm2015/actionsheet.module.js +12 -6
- package/esm2015/common/util.js +12 -13
- package/esm2015/main.js +1 -3
- package/esm2015/package-metadata.js +1 -1
- package/fesm2015/kendo-angular-navigation.js +160 -95
- package/main.d.ts +1 -3
- package/package.json +1 -1
- package/esm2015/actionsheet/templates/title-template.directive.js +0 -26
|
@@ -6,9 +6,9 @@ import { Component, ContentChild, EventEmitter, HostBinding, Input, Output } fro
|
|
|
6
6
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
7
7
|
import { packageMetadata } from '../package-metadata';
|
|
8
8
|
import { Subscription } from 'rxjs';
|
|
9
|
-
import {
|
|
9
|
+
import { ActionSheetHeaderTemplateDirective, ActionSheetItemTemplateDirective, ActionSheetContentTemplateDirective, ActionSheetFooterTemplateDirective } from './models';
|
|
10
10
|
import { Keys } from '@progress/kendo-angular-common';
|
|
11
|
-
import { getId, getActionSheetItemIndex, getFirstAndLastFocusable } from '../common/util';
|
|
11
|
+
import { getId, getActionSheetItemIndex, getFirstAndLastFocusable, ACTIONSHEET_ITEM_INDEX_ATTRIBUTE } from '../common/util';
|
|
12
12
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
14
14
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
@@ -141,7 +141,7 @@ export class ActionSheetComponent {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
triggerItemClick(target, event) {
|
|
144
|
-
const itemIndex = getActionSheetItemIndex(target);
|
|
144
|
+
const itemIndex = getActionSheetItemIndex(target, ACTIONSHEET_ITEM_INDEX_ATTRIBUTE, this.element.nativeElement);
|
|
145
145
|
const item = this.items[itemIndex];
|
|
146
146
|
if (!item || item.disabled) {
|
|
147
147
|
return;
|
|
@@ -156,7 +156,7 @@ ActionSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
156
156
|
provide: L10N_PREFIX,
|
|
157
157
|
useValue: 'kendo.actionsheet.component'
|
|
158
158
|
}
|
|
159
|
-
], queries: [{ propertyName: "
|
|
159
|
+
], queries: [{ propertyName: "headerTemplate", first: true, predicate: ActionSheetHeaderTemplateDirective, descendants: true }, { propertyName: "contentTemplate", first: true, predicate: ActionSheetContentTemplateDirective, descendants: true }, { propertyName: "itemTemplate", first: true, predicate: ActionSheetItemTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: ActionSheetFooterTemplateDirective, descendants: true }], exportAs: ["kendoActionSheet"], ngImport: i0, template: `
|
|
160
160
|
<div class="k-overlay" (click)="onOverlayClick()"></div>
|
|
161
161
|
<div class="k-animation-container">
|
|
162
162
|
<div class="k-child-animation-container" style="bottom: 0px; width: 100%;">
|
|
@@ -166,11 +166,11 @@ ActionSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
166
166
|
aria-modal="true"
|
|
167
167
|
[attr.aria-labelledby]="titleId">
|
|
168
168
|
|
|
169
|
-
<div *ngIf="title ||
|
|
169
|
+
<div *ngIf="title || headerTemplate" class="k-actionsheet-titlebar">
|
|
170
170
|
<div class="k-actionsheet-titlebar-group k-hbox">
|
|
171
171
|
<div class="k-actionsheet-title" [id]="titleId">
|
|
172
|
-
<ng-template *ngIf="
|
|
173
|
-
[ngTemplateOutlet]="
|
|
172
|
+
<ng-template *ngIf="headerTemplate; else defaultTemplate"
|
|
173
|
+
[ngTemplateOutlet]="headerTemplate?.templateRef">
|
|
174
174
|
</ng-template>
|
|
175
175
|
<ng-template #defaultTemplate>
|
|
176
176
|
<div *ngIf="title" class="k-text-center">{{title}}</div>
|
|
@@ -180,26 +180,36 @@ ActionSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
180
180
|
</div>
|
|
181
181
|
</div>
|
|
182
182
|
|
|
183
|
-
<div *ngIf="
|
|
184
|
-
<
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
183
|
+
<div *ngIf="items || contentTemplate" class="k-actionsheet-content">
|
|
184
|
+
<ng-template *ngIf="contentTemplate; else defaultContentTemplate"
|
|
185
|
+
[ngTemplateOutlet]="contentTemplate?.templateRef">
|
|
186
|
+
</ng-template>
|
|
187
|
+
<ng-template #defaultContentTemplate>
|
|
188
|
+
<div *ngIf="topGroupItems" kendoActionSheetList
|
|
189
|
+
class="k-list-ul"
|
|
190
|
+
role="group"
|
|
191
|
+
[groupItems]="topGroupItems"
|
|
192
|
+
[allItems]="items"
|
|
193
|
+
[itemTemplate]="itemTemplate?.templateRef"
|
|
194
|
+
(itemClick)="onItemClick($event)">
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
<hr *ngIf="shouldRenderSeparator" class="k-hr"/>
|
|
198
|
+
|
|
199
|
+
<div *ngIf="bottomGroupItems" kendoActionSheetList
|
|
200
|
+
class="k-list-ul"
|
|
201
|
+
role="group"
|
|
202
|
+
[groupItems]="bottomGroupItems"
|
|
203
|
+
[allItems]="items"
|
|
204
|
+
[itemTemplate]="itemTemplate?.templateRef"
|
|
205
|
+
(itemClick)="onItemClick($event)">
|
|
206
|
+
</div>
|
|
207
|
+
</ng-template>
|
|
208
|
+
</div>
|
|
209
|
+
<div *ngIf="footerTemplate" class="k-actionsheet-footer">
|
|
210
|
+
<ng-template
|
|
211
|
+
[ngTemplateOutlet]="footerTemplate?.templateRef">
|
|
212
|
+
</ng-template>
|
|
203
213
|
</div>
|
|
204
214
|
</div>
|
|
205
215
|
</div>
|
|
@@ -220,11 +230,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
220
230
|
aria-modal="true"
|
|
221
231
|
[attr.aria-labelledby]="titleId">
|
|
222
232
|
|
|
223
|
-
<div *ngIf="title ||
|
|
233
|
+
<div *ngIf="title || headerTemplate" class="k-actionsheet-titlebar">
|
|
224
234
|
<div class="k-actionsheet-titlebar-group k-hbox">
|
|
225
235
|
<div class="k-actionsheet-title" [id]="titleId">
|
|
226
|
-
<ng-template *ngIf="
|
|
227
|
-
[ngTemplateOutlet]="
|
|
236
|
+
<ng-template *ngIf="headerTemplate; else defaultTemplate"
|
|
237
|
+
[ngTemplateOutlet]="headerTemplate?.templateRef">
|
|
228
238
|
</ng-template>
|
|
229
239
|
<ng-template #defaultTemplate>
|
|
230
240
|
<div *ngIf="title" class="k-text-center">{{title}}</div>
|
|
@@ -234,26 +244,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
234
244
|
</div>
|
|
235
245
|
</div>
|
|
236
246
|
|
|
237
|
-
<div *ngIf="
|
|
238
|
-
<
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
247
|
+
<div *ngIf="items || contentTemplate" class="k-actionsheet-content">
|
|
248
|
+
<ng-template *ngIf="contentTemplate; else defaultContentTemplate"
|
|
249
|
+
[ngTemplateOutlet]="contentTemplate?.templateRef">
|
|
250
|
+
</ng-template>
|
|
251
|
+
<ng-template #defaultContentTemplate>
|
|
252
|
+
<div *ngIf="topGroupItems" kendoActionSheetList
|
|
253
|
+
class="k-list-ul"
|
|
254
|
+
role="group"
|
|
255
|
+
[groupItems]="topGroupItems"
|
|
256
|
+
[allItems]="items"
|
|
257
|
+
[itemTemplate]="itemTemplate?.templateRef"
|
|
258
|
+
(itemClick)="onItemClick($event)">
|
|
259
|
+
</div>
|
|
260
|
+
|
|
261
|
+
<hr *ngIf="shouldRenderSeparator" class="k-hr"/>
|
|
262
|
+
|
|
263
|
+
<div *ngIf="bottomGroupItems" kendoActionSheetList
|
|
264
|
+
class="k-list-ul"
|
|
265
|
+
role="group"
|
|
266
|
+
[groupItems]="bottomGroupItems"
|
|
267
|
+
[allItems]="items"
|
|
268
|
+
[itemTemplate]="itemTemplate?.templateRef"
|
|
269
|
+
(itemClick)="onItemClick($event)">
|
|
270
|
+
</div>
|
|
271
|
+
</ng-template>
|
|
272
|
+
</div>
|
|
273
|
+
<div *ngIf="footerTemplate" class="k-actionsheet-footer">
|
|
274
|
+
<ng-template
|
|
275
|
+
[ngTemplateOutlet]="footerTemplate?.templateRef">
|
|
276
|
+
</ng-template>
|
|
257
277
|
</div>
|
|
258
278
|
</div>
|
|
259
279
|
</div>
|
|
@@ -283,10 +303,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
283
303
|
type: Output
|
|
284
304
|
}], overlayClick: [{
|
|
285
305
|
type: Output
|
|
286
|
-
}],
|
|
306
|
+
}], headerTemplate: [{
|
|
307
|
+
type: ContentChild,
|
|
308
|
+
args: [ActionSheetHeaderTemplateDirective]
|
|
309
|
+
}], contentTemplate: [{
|
|
287
310
|
type: ContentChild,
|
|
288
|
-
args: [
|
|
311
|
+
args: [ActionSheetContentTemplateDirective]
|
|
289
312
|
}], itemTemplate: [{
|
|
290
313
|
type: ContentChild,
|
|
291
314
|
args: [ActionSheetItemTemplateDirective]
|
|
315
|
+
}], footerTemplate: [{
|
|
316
|
+
type: ContentChild,
|
|
317
|
+
args: [ActionSheetFooterTemplateDirective]
|
|
292
318
|
}] } });
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Component, Input, Output, EventEmitter } from "@angular/core";
|
|
6
6
|
import { Subscription } from "rxjs";
|
|
7
|
-
import { getActionSheetItemIndex } from "../common/util";
|
|
7
|
+
import { getActionSheetItemIndex, ACTIONSHEET_ITEM_INDEX_ATTRIBUTE } from "../common/util";
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
import * as i1 from "./item.component";
|
|
10
10
|
import * as i2 from "@angular/common";
|
|
@@ -37,7 +37,7 @@ export class ActionSheetListComponent {
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
clickHandler(e) {
|
|
40
|
-
const itemIndex = getActionSheetItemIndex(e.target);
|
|
40
|
+
const itemIndex = getActionSheetItemIndex(e.target, ACTIONSHEET_ITEM_INDEX_ATTRIBUTE, this.element.nativeElement);
|
|
41
41
|
const item = this.allItems[itemIndex];
|
|
42
42
|
if (!item) {
|
|
43
43
|
return;
|
|
@@ -50,38 +50,30 @@ export class ActionSheetListComponent {
|
|
|
50
50
|
this.itemClick.emit({ item, originalEvent: e });
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
+
setAttrIndex(item) {
|
|
54
|
+
return this.allItems.indexOf(item);
|
|
55
|
+
}
|
|
53
56
|
}
|
|
54
57
|
ActionSheetListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetListComponent, deps: [{ token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
55
|
-
ActionSheetListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ActionSheetListComponent, selector: "[kendoActionSheetList]", inputs: { groupItems: "groupItems", allItems: "allItems", itemTemplate: "itemTemplate" }, outputs: { itemClick: "itemClick" }, ngImport: i0, template:
|
|
56
|
-
<li *ngFor="let item of groupItems" kendoActionSheetItem
|
|
57
|
-
tabindex="0"
|
|
58
|
-
role="option"
|
|
59
|
-
[attr.aria-disabled]="item.disabled"
|
|
60
|
-
[class.k-actionsheet-item]="true"
|
|
61
|
-
[class.k-disabled]="item.disabled"
|
|
62
|
-
[ngClass]="item.cssClass"
|
|
63
|
-
[ngStyle]="item.cssStyle"
|
|
64
|
-
[itemTemplate]="itemTemplate"
|
|
65
|
-
[item]="item">
|
|
66
|
-
</li>
|
|
67
|
-
`, isInline: true, components: [{ type: i1.ActionSheetItemComponent, selector: "[kendoActionSheetItem]", inputs: ["itemTemplate", "item"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
58
|
+
ActionSheetListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ActionSheetListComponent, selector: "[kendoActionSheetList]", inputs: { groupItems: "groupItems", allItems: "allItems", itemTemplate: "itemTemplate" }, outputs: { itemClick: "itemClick" }, ngImport: i0, template: "\n <span *ngFor=\"let item of groupItems\" kendoActionSheetItem\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-disabled]=\"item.disabled\"\n [class.k-actionsheet-item]=\"true\"\n [attr.kendo-actionsheet-item-index]=\"setAttrIndex(item)\"\n [class.k-disabled]=\"item.disabled\"\n [ngClass]=\"item.cssClass\"\n [ngStyle]=\"item.cssStyle\"\n [itemTemplate]=\"itemTemplate\"\n [item]=\"item\">\n </span>\n ", isInline: true, components: [{ type: i1.ActionSheetItemComponent, selector: "[kendoActionSheetItem]", inputs: ["itemTemplate", "item"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
68
59
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetListComponent, decorators: [{
|
|
69
60
|
type: Component,
|
|
70
61
|
args: [{
|
|
71
62
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
72
63
|
selector: '[kendoActionSheetList]',
|
|
73
64
|
template: `
|
|
74
|
-
<
|
|
65
|
+
<span *ngFor="let item of groupItems" kendoActionSheetItem
|
|
75
66
|
tabindex="0"
|
|
76
|
-
role="
|
|
67
|
+
role="button"
|
|
77
68
|
[attr.aria-disabled]="item.disabled"
|
|
78
69
|
[class.k-actionsheet-item]="true"
|
|
70
|
+
[attr.${ACTIONSHEET_ITEM_INDEX_ATTRIBUTE}]="setAttrIndex(item)"
|
|
79
71
|
[class.k-disabled]="item.disabled"
|
|
80
72
|
[ngClass]="item.cssClass"
|
|
81
73
|
[ngStyle]="item.cssStyle"
|
|
82
74
|
[itemTemplate]="itemTemplate"
|
|
83
75
|
[item]="item">
|
|
84
|
-
</
|
|
76
|
+
</span>
|
|
85
77
|
`
|
|
86
78
|
}]
|
|
87
79
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ElementRef }]; }, propDecorators: { groupItems: [{
|
|
@@ -3,5 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
export { ActionSheetItemClickEvent } from './item-click.event';
|
|
6
|
-
export {
|
|
6
|
+
export { ActionSheetHeaderTemplateDirective } from '../templates/header-template.directive';
|
|
7
7
|
export { ActionSheetItemTemplateDirective } from '../templates/item-template.directive';
|
|
8
|
+
export { ActionSheetContentTemplateDirective } from '../templates/content-template.directive';
|
|
9
|
+
export { ActionSheetFooterTemplateDirective } from '../templates/footer-template.directive';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive, Optional } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Represents a template that defines the items list content of the ActionSheet.
|
|
9
|
+
* To define the template, nest an `<ng-template>` tag
|
|
10
|
+
* with the `kendoActionSheetContentTemplate` directive inside the `<kendo-actionsheet>` tag.
|
|
11
|
+
*/
|
|
12
|
+
export class ActionSheetContentTemplateDirective {
|
|
13
|
+
constructor(templateRef) {
|
|
14
|
+
this.templateRef = templateRef;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
ActionSheetContentTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetContentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
18
|
+
ActionSheetContentTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ActionSheetContentTemplateDirective, selector: "[kendoActionSheetContentTemplate]", ngImport: i0 });
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetContentTemplateDirective, decorators: [{
|
|
20
|
+
type: Directive,
|
|
21
|
+
args: [{
|
|
22
|
+
selector: '[kendoActionSheetContentTemplate]'
|
|
23
|
+
}]
|
|
24
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
25
|
+
type: Optional
|
|
26
|
+
}] }]; } });
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive, Optional } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Represents a template that defines the footer of the ActionSheet.
|
|
9
|
+
* To define the template, nest an `<ng-template>` tag
|
|
10
|
+
* with the `kendoActionSheetFooterTemplate` directive inside the `<kendo-actionsheet>` tag.
|
|
11
|
+
*/
|
|
12
|
+
export class ActionSheetFooterTemplateDirective {
|
|
13
|
+
constructor(templateRef) {
|
|
14
|
+
this.templateRef = templateRef;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
ActionSheetFooterTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetFooterTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
18
|
+
ActionSheetFooterTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ActionSheetFooterTemplateDirective, selector: "[kendoActionSheetFooterTemplate]", ngImport: i0 });
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetFooterTemplateDirective, decorators: [{
|
|
20
|
+
type: Directive,
|
|
21
|
+
args: [{
|
|
22
|
+
selector: '[kendoActionSheetFooterTemplate]'
|
|
23
|
+
}]
|
|
24
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
25
|
+
type: Optional
|
|
26
|
+
}] }]; } });
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive, Optional } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Represents a template that defines the header content of the ActionSheet. Utilizing the template overrides both the `title` and `subtitle` of the ActionSheet.
|
|
9
|
+
* To define the template, nest an `<ng-template>` tag
|
|
10
|
+
* with the `kendoActionSheetHeaderTemplate` directive inside the `<kendo-actionsheet>` tag.
|
|
11
|
+
*/
|
|
12
|
+
export class ActionSheetHeaderTemplateDirective {
|
|
13
|
+
constructor(templateRef) {
|
|
14
|
+
this.templateRef = templateRef;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
ActionSheetHeaderTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetHeaderTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
18
|
+
ActionSheetHeaderTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ActionSheetHeaderTemplateDirective, selector: "[kendoActionSheetHeaderTemplate]", ngImport: i0 });
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetHeaderTemplateDirective, decorators: [{
|
|
20
|
+
type: Directive,
|
|
21
|
+
args: [{
|
|
22
|
+
selector: '[kendoActionSheetHeaderTemplate]'
|
|
23
|
+
}]
|
|
24
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
25
|
+
type: Optional
|
|
26
|
+
}] }]; } });
|
|
@@ -5,13 +5,15 @@
|
|
|
5
5
|
import { NgModule } from '@angular/core';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
7
|
import { ActionSheetComponent } from './actionsheet/actionsheet.component';
|
|
8
|
-
import {
|
|
8
|
+
import { ActionSheetHeaderTemplateDirective, ActionSheetItemTemplateDirective, ActionSheetContentTemplateDirective, ActionSheetFooterTemplateDirective } from './actionsheet/models';
|
|
9
9
|
import { ActionSheetItemComponent } from './actionsheet/item.component';
|
|
10
10
|
import { ActionSheetListComponent } from './actionsheet/list.component';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
12
|
const templateDirectives = [
|
|
13
|
-
|
|
14
|
-
ActionSheetItemTemplateDirective
|
|
13
|
+
ActionSheetHeaderTemplateDirective,
|
|
14
|
+
ActionSheetItemTemplateDirective,
|
|
15
|
+
ActionSheetContentTemplateDirective,
|
|
16
|
+
ActionSheetFooterTemplateDirective
|
|
15
17
|
];
|
|
16
18
|
const exportedModules = [
|
|
17
19
|
ActionSheetComponent,
|
|
@@ -58,9 +60,13 @@ export class ActionSheetModule {
|
|
|
58
60
|
}
|
|
59
61
|
ActionSheetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
60
62
|
ActionSheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetModule, declarations: [ActionSheetItemComponent,
|
|
61
|
-
ActionSheetListComponent, ActionSheetComponent,
|
|
62
|
-
ActionSheetItemTemplateDirective
|
|
63
|
-
|
|
63
|
+
ActionSheetListComponent, ActionSheetComponent, ActionSheetHeaderTemplateDirective,
|
|
64
|
+
ActionSheetItemTemplateDirective,
|
|
65
|
+
ActionSheetContentTemplateDirective,
|
|
66
|
+
ActionSheetFooterTemplateDirective], imports: [CommonModule], exports: [ActionSheetComponent, ActionSheetHeaderTemplateDirective,
|
|
67
|
+
ActionSheetItemTemplateDirective,
|
|
68
|
+
ActionSheetContentTemplateDirective,
|
|
69
|
+
ActionSheetFooterTemplateDirective] });
|
|
64
70
|
ActionSheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetModule, imports: [[CommonModule]] });
|
|
65
71
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetModule, decorators: [{
|
|
66
72
|
type: NgModule,
|
package/esm2015/common/util.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { closestInScope
|
|
5
|
+
import { closestInScope } from "@progress/kendo-angular-common";
|
|
6
6
|
/**
|
|
7
7
|
* @hidden
|
|
8
8
|
*/
|
|
@@ -64,17 +64,16 @@ export const getId = (prefix) => {
|
|
|
64
64
|
/**
|
|
65
65
|
* @hidden
|
|
66
66
|
*/
|
|
67
|
-
export const
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
export const ACTIONSHEET_ITEM_INDEX_ATTRIBUTE = 'kendo-actionsheet-item-index';
|
|
68
|
+
/**
|
|
69
|
+
* @hidden
|
|
70
|
+
*/
|
|
71
|
+
export const getActionSheetItemIndex = (target, targetAttr, scope) => {
|
|
72
|
+
const item = closestItem(target, targetAttr, scope);
|
|
73
|
+
if (item) {
|
|
74
|
+
return itemIndex(item, targetAttr);
|
|
70
75
|
}
|
|
71
|
-
const allItemElements = document.querySelectorAll('.k-actionsheet-action');
|
|
72
|
-
const closestItem = closestInScope(target, el => { var _a; return (_a = el.classList) === null || _a === void 0 ? void 0 : _a.contains('k-actionsheet-action'); }, this);
|
|
73
|
-
let idx = null;
|
|
74
|
-
allItemElements.forEach((i, index) => {
|
|
75
|
-
if (i === closestItem) {
|
|
76
|
-
idx = index;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
return idx;
|
|
80
76
|
};
|
|
77
|
+
const itemIndex = (item, indexAttr) => +item.getAttribute(indexAttr);
|
|
78
|
+
const hasItemIndex = (item, indexAttr) => isPresent(item.getAttribute(indexAttr));
|
|
79
|
+
const closestItem = (target, targetAttr, scope) => closestInScope(target, el => hasItemIndex(el, targetAttr), scope);
|
package/esm2015/main.js
CHANGED
|
@@ -21,7 +21,5 @@ export { BreadCrumbItemComponent } from './breadcrumb/breadcrumb-item.component'
|
|
|
21
21
|
export { BreadCrumbListComponent } from './breadcrumb/list.component';
|
|
22
22
|
//ActionSheet exports
|
|
23
23
|
export { ActionSheetComponent } from './actionsheet/actionsheet.component';
|
|
24
|
-
export { ActionSheetItemClickEvent } from './actionsheet/models';
|
|
25
|
-
export { ActionSheetTitleTemplateDirective } from './actionsheet/templates/title-template.directive';
|
|
26
|
-
export { ActionSheetItemTemplateDirective } from './actionsheet/templates/item-template.directive';
|
|
24
|
+
export { ActionSheetItemClickEvent, ActionSheetHeaderTemplateDirective, ActionSheetItemTemplateDirective, ActionSheetContentTemplateDirective, ActionSheetFooterTemplateDirective } from './actionsheet/models';
|
|
27
25
|
export { ActionSheetModule } from './actionsheet.module';
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-navigation',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1666617075,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|