@progress/kendo-angular-navigation 2.0.2 → 2.1.0-dev.202210170736
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 +92 -0
- package/actionsheet/item.component.d.ts +19 -0
- package/actionsheet/list.component.d.ts +27 -0
- package/actionsheet/models/actionsheet-item.interface.d.ts +57 -0
- package/actionsheet/models/group.d.ts +5 -0
- package/actionsheet/models/index.d.ts +9 -0
- package/actionsheet/models/item-click.event.d.ts +18 -0
- package/actionsheet/templates/item-template.directive.d.ts +17 -0
- package/actionsheet/templates/title-template.directive.d.ts +17 -0
- package/actionsheet.module.d.ts +48 -0
- package/bundles/kendo-angular-navigation.umd.js +1 -1
- package/common/util.d.ts +16 -0
- package/esm2015/actionsheet/actionsheet.component.js +290 -0
- package/esm2015/actionsheet/item.component.js +108 -0
- package/esm2015/actionsheet/list.component.js +91 -0
- package/esm2015/actionsheet/models/actionsheet-item.interface.js +5 -0
- package/esm2015/actionsheet/models/group.js +5 -0
- package/esm2015/actionsheet/models/index.js +7 -0
- package/esm2015/actionsheet/models/item-click.event.js +9 -0
- package/esm2015/actionsheet/templates/item-template.directive.js +26 -0
- package/esm2015/actionsheet/templates/title-template.directive.js +26 -0
- package/esm2015/actionsheet.module.js +72 -0
- package/esm2015/common/util.js +63 -0
- package/esm2015/main.js +6 -0
- package/esm2015/navigation.module.js +7 -3
- package/esm2015/package-metadata.js +1 -1
- package/fesm2015/kendo-angular-navigation.js +656 -23
- package/main.d.ts +5 -0
- package/navigation.module.d.ts +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,72 @@
|
|
|
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 { NgModule } from '@angular/core';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import { ActionSheetComponent } from './actionsheet/actionsheet.component';
|
|
8
|
+
import { ActionSheetTitleTemplateDirective, ActionSheetItemTemplateDirective } from './actionsheet/models';
|
|
9
|
+
import { ActionSheetItemComponent } from './actionsheet/item.component';
|
|
10
|
+
import { ActionSheetListComponent } from './actionsheet/list.component';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
const templateDirectives = [
|
|
13
|
+
ActionSheetTitleTemplateDirective,
|
|
14
|
+
ActionSheetItemTemplateDirective
|
|
15
|
+
];
|
|
16
|
+
const exportedModules = [
|
|
17
|
+
ActionSheetComponent,
|
|
18
|
+
...templateDirectives
|
|
19
|
+
];
|
|
20
|
+
const declarations = [
|
|
21
|
+
ActionSheetItemComponent,
|
|
22
|
+
ActionSheetListComponent,
|
|
23
|
+
...exportedModules
|
|
24
|
+
];
|
|
25
|
+
/**
|
|
26
|
+
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
27
|
+
* definition for the ActionSheet component.
|
|
28
|
+
*
|
|
29
|
+
* * @example
|
|
30
|
+
*
|
|
31
|
+
* ```ts-no-run
|
|
32
|
+
* // Import the ActionSheet module
|
|
33
|
+
* import { ActionSheetModule } from '@progress/kendo-angular-navigation';
|
|
34
|
+
*
|
|
35
|
+
* // The browser platform with a compiler
|
|
36
|
+
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
37
|
+
* import { BrowserModule } from '@angular/platform-browser';
|
|
38
|
+
*
|
|
39
|
+
* import { NgModule } from '@angular/core';
|
|
40
|
+
*
|
|
41
|
+
* // Import the app component
|
|
42
|
+
* import { AppComponent } from './app.component';
|
|
43
|
+
*
|
|
44
|
+
* // Define the app module
|
|
45
|
+
* _@NgModule({
|
|
46
|
+
* declarations: [AppComponent], // declare app component
|
|
47
|
+
* imports: [BrowserModule, ActionSheetModule], // import ActionSheet module
|
|
48
|
+
* bootstrap: [AppComponent]
|
|
49
|
+
* })
|
|
50
|
+
* export class AppModule {}
|
|
51
|
+
*
|
|
52
|
+
* // Compile and launch the module
|
|
53
|
+
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
54
|
+
*
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export class ActionSheetModule {
|
|
58
|
+
}
|
|
59
|
+
ActionSheetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
60
|
+
ActionSheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetModule, declarations: [ActionSheetItemComponent,
|
|
61
|
+
ActionSheetListComponent, ActionSheetComponent, ActionSheetTitleTemplateDirective,
|
|
62
|
+
ActionSheetItemTemplateDirective], imports: [CommonModule], exports: [ActionSheetComponent, ActionSheetTitleTemplateDirective,
|
|
63
|
+
ActionSheetItemTemplateDirective] });
|
|
64
|
+
ActionSheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetModule, imports: [[CommonModule]] });
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionSheetModule, decorators: [{
|
|
66
|
+
type: NgModule,
|
|
67
|
+
args: [{
|
|
68
|
+
declarations: [declarations],
|
|
69
|
+
exports: [exportedModules],
|
|
70
|
+
imports: [CommonModule]
|
|
71
|
+
}]
|
|
72
|
+
}] });
|
package/esm2015/common/util.js
CHANGED
|
@@ -2,6 +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, isDocumentAvailable } from "@progress/kendo-angular-common";
|
|
5
6
|
/**
|
|
6
7
|
* @hidden
|
|
7
8
|
*/
|
|
@@ -15,3 +16,65 @@ export const outerWidth = (element) => {
|
|
|
15
16
|
width += (parseFloat(style.marginLeft) || 0) + (parseFloat(style.marginRight) || 0);
|
|
16
17
|
return width;
|
|
17
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
export const getFirstAndLastFocusable = (parent) => {
|
|
23
|
+
const all = getAllFocusableChildren(parent);
|
|
24
|
+
const firstFocusable = all.length > 0 ? all[0] : parent;
|
|
25
|
+
const lastFocusable = all.length > 0 ? all[all.length - 1] : parent;
|
|
26
|
+
return [firstFocusable, lastFocusable];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* @hidden
|
|
30
|
+
*/
|
|
31
|
+
const getAllFocusableChildren = (parent) => {
|
|
32
|
+
return parent.querySelectorAll(focusableSelector);
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* @hidden
|
|
36
|
+
*/
|
|
37
|
+
const focusableSelector = [
|
|
38
|
+
'a[href]',
|
|
39
|
+
'area[href]',
|
|
40
|
+
'input:not([disabled])',
|
|
41
|
+
'select:not([disabled])',
|
|
42
|
+
'textarea:not([disabled])',
|
|
43
|
+
'button:not([disabled])',
|
|
44
|
+
'iframe',
|
|
45
|
+
'object',
|
|
46
|
+
'embed',
|
|
47
|
+
'*[tabindex]',
|
|
48
|
+
'*[contenteditable]'
|
|
49
|
+
].join(',');
|
|
50
|
+
/**
|
|
51
|
+
* @hidden
|
|
52
|
+
*/
|
|
53
|
+
let idx = 0;
|
|
54
|
+
/**
|
|
55
|
+
* @hidden
|
|
56
|
+
*/
|
|
57
|
+
export const hexColorRegex = /^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/;
|
|
58
|
+
/**
|
|
59
|
+
* @hidden
|
|
60
|
+
*/
|
|
61
|
+
export const getId = (prefix) => {
|
|
62
|
+
return `${prefix}${++idx}`;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* @hidden
|
|
66
|
+
*/
|
|
67
|
+
export const getActionSheetItemIndex = (target) => {
|
|
68
|
+
if (!isDocumentAvailable()) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
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
|
+
};
|
package/esm2015/main.js
CHANGED
|
@@ -19,3 +19,9 @@ export { BottomNavigationSelectEvent } from './bottomnavigation/events/select-ev
|
|
|
19
19
|
export { BottomNavigationModule } from './bottomnavigation.module';
|
|
20
20
|
export { BreadCrumbItemComponent } from './breadcrumb/breadcrumb-item.component';
|
|
21
21
|
export { BreadCrumbListComponent } from './breadcrumb/list.component';
|
|
22
|
+
//ActionSheet exports
|
|
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';
|
|
27
|
+
export { ActionSheetModule } from './actionsheet.module';
|
|
@@ -6,6 +6,7 @@ import { NgModule } from '@angular/core';
|
|
|
6
6
|
import { AppBarModule } from './appbar.module';
|
|
7
7
|
import { BreadCrumbModule } from './breadcrumb.module';
|
|
8
8
|
import { BottomNavigationModule } from './bottomnavigation.module';
|
|
9
|
+
import { ActionSheetModule } from './actionsheet.module';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
/**
|
|
11
12
|
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
@@ -43,17 +44,20 @@ export class NavigationModule {
|
|
|
43
44
|
NavigationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
44
45
|
NavigationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationModule, exports: [AppBarModule,
|
|
45
46
|
BreadCrumbModule,
|
|
46
|
-
BottomNavigationModule
|
|
47
|
+
BottomNavigationModule,
|
|
48
|
+
ActionSheetModule] });
|
|
47
49
|
NavigationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationModule, imports: [AppBarModule,
|
|
48
50
|
BreadCrumbModule,
|
|
49
|
-
BottomNavigationModule
|
|
51
|
+
BottomNavigationModule,
|
|
52
|
+
ActionSheetModule] });
|
|
50
53
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationModule, decorators: [{
|
|
51
54
|
type: NgModule,
|
|
52
55
|
args: [{
|
|
53
56
|
exports: [
|
|
54
57
|
AppBarModule,
|
|
55
58
|
BreadCrumbModule,
|
|
56
|
-
BottomNavigationModule
|
|
59
|
+
BottomNavigationModule,
|
|
60
|
+
ActionSheetModule
|
|
57
61
|
]
|
|
58
62
|
}]
|
|
59
63
|
}] });
|
|
@@ -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: 1665992185,
|
|
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
|
};
|