@zeedhi/teknisa-components-common 1.97.4 → 1.97.6
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/coverage/clover.xml +820 -688
- package/coverage/coverage-final.json +47 -45
- package/coverage/lcov-report/index.html +23 -23
- package/coverage/lcov-report/tests/__helpers__/component-event-helper.ts.html +2 -2
- package/coverage/lcov-report/tests/__helpers__/flush-promises-helper.ts.html +2 -2
- package/coverage/lcov-report/tests/__helpers__/get-child-helper.ts.html +9 -9
- package/coverage/lcov-report/tests/__helpers__/index.html +1 -1
- package/coverage/lcov-report/tests/__helpers__/index.ts.html +1 -1
- package/coverage/lcov-report/tests/__helpers__/mock-created-helper.ts.html +1 -1
- package/coverage/lcov.info +1411 -1175
- package/dist/tek-components-common.esm.js +192 -10
- package/dist/tek-components-common.umd.js +192 -10
- package/package.json +2 -2
- package/tests/unit/components/tek-grid/grid.spec.ts +404 -2
- package/types/components/tek-ag-grid/default-icons.d.ts +53 -0
- package/types/components/tek-ag-grid/interfaces.d.ts +9 -0
- package/types/components/tek-ag-grid/tek-ag-grid.d.ts +35 -0
- package/types/components/tek-datasource/datasource.d.ts +94 -0
- package/types/components/tek-grid/default-icons.d.ts +53 -0
- package/types/components/tek-grid/filter-dynamic-values.d.ts +9 -0
- package/types/components/tek-grid/grid-controller.d.ts +19 -0
- package/types/components/tek-grid/grid.d.ts +45 -2
- package/types/components/tek-grid/grid_column.d.ts +14 -0
- package/types/components/tek-grid/grid_controller.d.ts +15 -0
- package/types/components/tek-grid/interfaces.d.ts +19 -0
- package/types/components/tek-grid/tek-grid.d.ts +35 -0
- package/types/components/tek-login/interfaces.d.ts +3 -0
- package/types/components/tek-login/login-children.d.ts +3 -0
- package/types/components/tek-login/login.d.ts +58 -0
- package/types/components/tek-login/login_children.d.ts +3 -0
- package/types/error/incomplete-groups-error.d.ts +8 -0
- package/types/utils/extract-properties.d.ts +7 -0
- package/types/utils/index.d.ts +1 -0
- package/coverage/lcov-report/components/crud/crud-add-button.ts.html +0 -250
- package/coverage/lcov-report/components/crud/crud-button.ts.html +0 -292
- package/coverage/lcov-report/components/crud/crud-cancel-button.ts.html +0 -259
- package/coverage/lcov-report/components/crud/crud-delete-button.ts.html +0 -322
- package/coverage/lcov-report/components/crud/crud-form.ts.html +0 -382
- package/coverage/lcov-report/components/crud/crud-save-button.ts.html +0 -253
- package/coverage/lcov-report/components/crud/index.html +0 -191
- package/coverage/lcov-report/components/index.html +0 -116
- package/coverage/lcov-report/components/index.ts.html +0 -394
- package/coverage/lcov-report/components/tek-breadcrumb-header/breadcrumb-header.ts.html +0 -172
- package/coverage/lcov-report/components/tek-breadcrumb-header/index.html +0 -116
- package/coverage/lcov-report/components/tek-card-title/card-title.ts.html +0 -175
- package/coverage/lcov-report/components/tek-card-title/index.html +0 -116
- package/coverage/lcov-report/components/tek-datasource/index.html +0 -146
- package/coverage/lcov-report/components/tek-datasource/interfaces.ts.html +0 -193
- package/coverage/lcov-report/components/tek-datasource/memory-datasource.ts.html +0 -1015
- package/coverage/lcov-report/components/tek-datasource/rest-datasource.ts.html +0 -751
- package/coverage/lcov-report/components/tek-drag-grid/index.html +0 -116
- package/coverage/lcov-report/components/tek-drag-grid/tek-drag-grid.ts.html +0 -409
- package/coverage/lcov-report/components/tek-grid/filter-helper.ts.html +0 -145
- package/coverage/lcov-report/components/tek-grid/grid-column.ts.html +0 -775
- package/coverage/lcov-report/components/tek-grid/grid-columns-button-controller.ts.html +0 -169
- package/coverage/lcov-report/components/tek-grid/grid-columns-button.ts.html +0 -190
- package/coverage/lcov-report/components/tek-grid/grid-filter-button.ts.html +0 -1282
- package/coverage/lcov-report/components/tek-grid/grid.ts.html +0 -3157
- package/coverage/lcov-report/components/tek-grid/index.html +0 -221
- package/coverage/lcov-report/components/tek-grid/interfaces.ts.html +0 -733
- package/coverage/lcov-report/components/tek-grid/layout-options.ts.html +0 -826
- package/coverage/lcov-report/components/tek-image/image.ts.html +0 -313
- package/coverage/lcov-report/components/tek-image/index.html +0 -116
- package/coverage/lcov-report/components/tek-iterable-carousel/index.html +0 -116
- package/coverage/lcov-report/components/tek-iterable-carousel/iterable-carousel.ts.html +0 -175
- package/coverage/lcov-report/components/tek-iterable-component-render/index.html +0 -116
- package/coverage/lcov-report/components/tek-iterable-component-render/iterable-component-render.ts.html +0 -118
- package/coverage/lcov-report/components/tek-loading/index.html +0 -116
- package/coverage/lcov-report/components/tek-loading/loading.ts.html +0 -196
- package/coverage/lcov-report/components/tek-notifications/index.html +0 -116
- package/coverage/lcov-report/components/tek-notifications/notifications.ts.html +0 -271
- package/coverage/lcov-report/components/tek-product-card/index.html +0 -116
- package/coverage/lcov-report/components/tek-product-card/product-card.ts.html +0 -391
- package/coverage/lcov-report/components/tek-tree-grid/index.html +0 -116
- package/coverage/lcov-report/components/tek-tree-grid/tree-grid.ts.html +0 -1255
- package/coverage/lcov-report/components/tek-user-info/TekUserInfoController.ts.html +0 -367
- package/coverage/lcov-report/components/tek-user-info/index.html +0 -146
- package/coverage/lcov-report/components/tek-user-info/tek-user-info-list.ts.html +0 -268
- package/coverage/lcov-report/components/tek-user-info/tek-user-info.ts.html +0 -1096
- package/coverage/lcov-report/error/delete-rows-error.ts.html +0 -118
- package/coverage/lcov-report/error/index.html +0 -116
- package/coverage/lcov-report/utils/grid-base/export-options/button-option.ts.html +0 -166
- package/coverage/lcov-report/utils/grid-base/export-options/index.html +0 -146
- package/coverage/lcov-report/utils/grid-base/export-options/index.ts.html +0 -94
- package/coverage/lcov-report/utils/grid-base/export-options/multi-option.ts.html +0 -355
- package/coverage/lcov-report/utils/grid-base/grid-base.ts.html +0 -1960
- package/coverage/lcov-report/utils/grid-base/grid-controller.ts.html +0 -457
- package/coverage/lcov-report/utils/grid-base/index.html +0 -131
- package/coverage/lcov-report/utils/index.html +0 -116
- package/coverage/lcov-report/utils/index.ts.html +0 -100
- package/coverage/lcov-report/utils/report-filter/index.html +0 -116
- package/coverage/lcov-report/utils/report-filter/report-filter.ts.html +0 -256
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TekGrid } from './grid';
|
|
2
|
+
export declare class TekGridController {
|
|
3
|
+
private grid;
|
|
4
|
+
constructor(grid: TekGrid);
|
|
5
|
+
get gridTitle(): string;
|
|
6
|
+
get showAddButton(): boolean;
|
|
7
|
+
get showDeleteButton(): boolean;
|
|
8
|
+
get showFilterButton(): boolean;
|
|
9
|
+
get showColumnsButton(): boolean;
|
|
10
|
+
get columnsButtonIgnore(): string[];
|
|
11
|
+
get showLayoutOptions(): boolean;
|
|
12
|
+
get showFirstDivider(): boolean;
|
|
13
|
+
get showActionsButton(): boolean;
|
|
14
|
+
get showExportButton(): boolean;
|
|
15
|
+
get showActionAndExportButton(): boolean;
|
|
16
|
+
get isEditing(): boolean;
|
|
17
|
+
get isNotEditing(): boolean;
|
|
18
|
+
get disableDeleteButton(): boolean;
|
|
19
|
+
}
|
|
@@ -2,7 +2,7 @@ import { GridEditable, IComponentRender } from '@zeedhi/common';
|
|
|
2
2
|
import { Datasource, IDictionary, IEventParam } from '@zeedhi/core';
|
|
3
3
|
import { ITekGridAtoms } from '../../utils';
|
|
4
4
|
import { TekGridColumn } from './grid-column';
|
|
5
|
-
import { IModalFilterProps, ITekGrid, ITekGridColumn, ITekGridEvents, ITekGridExportConfig } from './interfaces';
|
|
5
|
+
import { IGroupedData, IModalFilterProps, ITekGrid, ITekGridColumn, ITekGridEvents, ITekGridExportConfig } from './interfaces';
|
|
6
6
|
import { TekGridLayoutOptions } from './layout-options';
|
|
7
7
|
export declare class TekGrid extends GridEditable implements ITekGrid {
|
|
8
8
|
title: string;
|
|
@@ -64,7 +64,7 @@ export declare class TekGrid extends GridEditable implements ITekGrid {
|
|
|
64
64
|
groupColumnNames: string[];
|
|
65
65
|
summaryColumns: TekGridColumn[];
|
|
66
66
|
groupColumns: TekGridColumn[];
|
|
67
|
-
groupedData:
|
|
67
|
+
groupedData: IGroupedData[];
|
|
68
68
|
private toolbarSlotProps;
|
|
69
69
|
viewUpdateScrollData?: () => void;
|
|
70
70
|
private gridBase;
|
|
@@ -167,4 +167,47 @@ export declare class TekGrid extends GridEditable implements ITekGrid {
|
|
|
167
167
|
selectGroupClick(row: IDictionary<any>, isSelected: boolean, event: Event, element: HTMLElement): void;
|
|
168
168
|
getAtomInstance<T>(key: keyof ITekGridAtoms): T;
|
|
169
169
|
getFilterInputs(columnName?: string): import("@zeedhi/common").Input[];
|
|
170
|
+
/**
|
|
171
|
+
* Adds new row to the datasource data and pushes it to the editedRows
|
|
172
|
+
* @param row Row
|
|
173
|
+
* @param position whether the new Row will be inserted at the beginning or end of the data array
|
|
174
|
+
*/
|
|
175
|
+
addNewRow(row: IDictionary, position?: 'end' | 'start'): Promise<void>;
|
|
176
|
+
/**
|
|
177
|
+
* Takes a row and adds it to the selected group (datasource.currentRow)
|
|
178
|
+
* @param row the new row to be added
|
|
179
|
+
* @param position the position, at the beginning of the group or at the end
|
|
180
|
+
*/
|
|
181
|
+
addToSelection(row: IDictionary, position?: 'end' | 'start'): Promise<void>;
|
|
182
|
+
/**
|
|
183
|
+
* Adds a new row to the groupedData array
|
|
184
|
+
* @param row the new row to be added
|
|
185
|
+
* @param position the position, at the beginning of the group or at the end
|
|
186
|
+
*/
|
|
187
|
+
private addGroupedRow;
|
|
188
|
+
private findMissingGroups;
|
|
189
|
+
/**
|
|
190
|
+
* Finds the last group (most internal group) where a row should be inserted
|
|
191
|
+
* @param row to be inserted
|
|
192
|
+
* @returns the index and the group where the row should be inserted
|
|
193
|
+
*/
|
|
194
|
+
private findLastGroupingIndex;
|
|
195
|
+
/**
|
|
196
|
+
* Creates a group hierarchy for a new row, creating intermediate groups if needed
|
|
197
|
+
* @param row to be inserted
|
|
198
|
+
* @returns the index and the group where the row should be inserted
|
|
199
|
+
*/
|
|
200
|
+
private createGroupHierarchyForRow;
|
|
201
|
+
/**
|
|
202
|
+
* Adds a row to the children of a group
|
|
203
|
+
*/
|
|
204
|
+
private addRowToGroupChildren;
|
|
205
|
+
/**
|
|
206
|
+
* Checks if a row is a group header, adding typescript type-checking
|
|
207
|
+
*/
|
|
208
|
+
private isGroupHeader;
|
|
209
|
+
/**
|
|
210
|
+
* Checks if a row is the last grouping of the grid (the most internal grouping)
|
|
211
|
+
*/
|
|
212
|
+
private isLastGrouping;
|
|
170
213
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GridColumnEditable } from '@zeedhi/common';
|
|
2
|
+
import { ITekGridColumn } from './interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Base class for Grid column
|
|
5
|
+
*/
|
|
6
|
+
export declare class TekGridColumn extends GridColumnEditable implements ITekGridColumn {
|
|
7
|
+
filterProps: any;
|
|
8
|
+
filterable: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new TekGrid Column.
|
|
11
|
+
* @param props TekGrid column properties
|
|
12
|
+
*/
|
|
13
|
+
constructor(props: ITekGridColumn);
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TekGrid } from './grid';
|
|
2
|
+
export declare class TekGridController {
|
|
3
|
+
private grid;
|
|
4
|
+
constructor(grid: TekGrid);
|
|
5
|
+
get gridTitle(): string;
|
|
6
|
+
get showAddButton(): boolean;
|
|
7
|
+
get showDeleteButton(): boolean;
|
|
8
|
+
get showFilterButton(): boolean;
|
|
9
|
+
get showColumnsButton(): boolean;
|
|
10
|
+
get showFirstDivider(): boolean;
|
|
11
|
+
get showActionsButton(): boolean;
|
|
12
|
+
get isEditing(): boolean;
|
|
13
|
+
get isNotEditing(): boolean;
|
|
14
|
+
get disableDeleteButton(): boolean;
|
|
15
|
+
}
|
|
@@ -174,3 +174,22 @@ export interface IModalFilterProps extends IModal {
|
|
|
174
174
|
height?: string;
|
|
175
175
|
maxHeight?: string;
|
|
176
176
|
}
|
|
177
|
+
export interface ITekGridGroupFooter {
|
|
178
|
+
groupFooter: boolean;
|
|
179
|
+
groupIndex: number;
|
|
180
|
+
groupHeaders: ITekGridGroupHeader[];
|
|
181
|
+
groupLabel: string;
|
|
182
|
+
groupValue: any;
|
|
183
|
+
}
|
|
184
|
+
export declare type IGroupedData = (ITekGridGroupHeader & {
|
|
185
|
+
[key: string]: any;
|
|
186
|
+
}) | {
|
|
187
|
+
[key: string]: any;
|
|
188
|
+
groupFooter: boolean;
|
|
189
|
+
groupSummary: boolean;
|
|
190
|
+
} | (ITekGridGroupFooter & {
|
|
191
|
+
[key: string]: any;
|
|
192
|
+
}) | {
|
|
193
|
+
[key: string]: any;
|
|
194
|
+
groupHeaders: ITekGridGroupHeader[];
|
|
195
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Iterable } from '@zeedhi/common';
|
|
2
|
+
import { IDictionary } from '@zeedhi/core';
|
|
3
|
+
import { ITekGrid } from './interfaces';
|
|
4
|
+
/** Grid Component */
|
|
5
|
+
export declare class TekGrid extends Iterable implements ITekGrid {
|
|
6
|
+
cssClass: string;
|
|
7
|
+
dense: boolean;
|
|
8
|
+
frameworkComponents: IDictionary;
|
|
9
|
+
gridOptions: IDictionary;
|
|
10
|
+
height: string | number;
|
|
11
|
+
icons: IDictionary<string>;
|
|
12
|
+
gridComponent: any;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new Grid.
|
|
15
|
+
* @param props Grid properties
|
|
16
|
+
*/
|
|
17
|
+
constructor(props: ITekGrid);
|
|
18
|
+
private createOptionsAccessors;
|
|
19
|
+
private setAccessor;
|
|
20
|
+
/**
|
|
21
|
+
* Reload dataset
|
|
22
|
+
*/
|
|
23
|
+
reload(): Promise<any>;
|
|
24
|
+
/**
|
|
25
|
+
* Compares two dates
|
|
26
|
+
* @param date1
|
|
27
|
+
* @param date2
|
|
28
|
+
* @param format
|
|
29
|
+
* @returns -1 if date1 after date2
|
|
30
|
+
* @returns 0 if date1 equal date2
|
|
31
|
+
* @returns 1 if date1 before date2
|
|
32
|
+
*/
|
|
33
|
+
dateComparator(date1: string | Date, date2: string | Date, format?: string): 1 | -1 | 0;
|
|
34
|
+
private getDateAsString;
|
|
35
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Button, Checkbox, IComponentRender, Login, Select, Text } from '@zeedhi/common';
|
|
2
|
+
import { IEventParam } from '@zeedhi/core';
|
|
3
|
+
import { ITekLogin } from './interfaces';
|
|
4
|
+
export declare class TekLogin extends Login implements ITekLogin {
|
|
5
|
+
cardWidth: string | number;
|
|
6
|
+
layout: string;
|
|
7
|
+
children: IComponentRender[];
|
|
8
|
+
constructor(props: ITekLogin);
|
|
9
|
+
private testLicenseKeyMap;
|
|
10
|
+
private attempts;
|
|
11
|
+
private confirmSessionChange;
|
|
12
|
+
private user;
|
|
13
|
+
private password;
|
|
14
|
+
private hash;
|
|
15
|
+
private userData;
|
|
16
|
+
private privacyModal?;
|
|
17
|
+
onMounted(element: HTMLElement): void;
|
|
18
|
+
onBeforeDestroy(): void;
|
|
19
|
+
privacyClick({ component }: IEventParam<Text>): void;
|
|
20
|
+
private findPrivacyPolicyByAuthentication;
|
|
21
|
+
private openModalPrivacyPolicy;
|
|
22
|
+
loginEmailPrivacyPolicyCancel(): void;
|
|
23
|
+
loginEmailPrivacyPolicyConfirm({ component }: IEventParam<Button>): void;
|
|
24
|
+
forgetClick(): void;
|
|
25
|
+
loginForgetPasswordConfirm({ component }: IEventParam<Button>): void;
|
|
26
|
+
loginForgetPasswordCancel(): void;
|
|
27
|
+
private requestNewPassword;
|
|
28
|
+
private setCurrentLanguage;
|
|
29
|
+
private getLanguageNewFormat;
|
|
30
|
+
private getLanguageOldFormat;
|
|
31
|
+
private updateLanguages;
|
|
32
|
+
private getDataSource;
|
|
33
|
+
private setDataSource;
|
|
34
|
+
private getProductLanguages;
|
|
35
|
+
changeLanguage({ component }: IEventParam<Select>): void;
|
|
36
|
+
changeKeepConnected({ component }: IEventParam<Checkbox>): void;
|
|
37
|
+
private generateKey;
|
|
38
|
+
loginClick({ component }: IEventParam<Button>): void;
|
|
39
|
+
private doLogin;
|
|
40
|
+
private checkLoginResponse;
|
|
41
|
+
private checkErrorResponse;
|
|
42
|
+
private expiredPasswordValidation;
|
|
43
|
+
private showDialogExpiredPassword;
|
|
44
|
+
private openExpiredPasswordWidget;
|
|
45
|
+
private showMessage;
|
|
46
|
+
loginExpiredPasswordConfirm({ component }: IEventParam<Button>): void;
|
|
47
|
+
loginExpiredPasswordCancel(): void;
|
|
48
|
+
private showForm;
|
|
49
|
+
private updatePassword;
|
|
50
|
+
private validateRcUrl;
|
|
51
|
+
private redirectAfterLogin;
|
|
52
|
+
private isJson;
|
|
53
|
+
private defaultError;
|
|
54
|
+
private showInvalidPasswordMaskMessage;
|
|
55
|
+
private setLogAccess;
|
|
56
|
+
private redirectToProduct;
|
|
57
|
+
private testLicenseConnection;
|
|
58
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IDictionary } from '@zeedhi/core';
|
|
2
|
+
/**
|
|
3
|
+
* Thrown when a row has incomplete group information.
|
|
4
|
+
* Provides details about the missing groups and the problematic row.
|
|
5
|
+
*/
|
|
6
|
+
export declare class IncompleteGroupsError extends Error {
|
|
7
|
+
constructor(row: IDictionary, missingGroups: string[]);
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts properties from an object based on a list of properties
|
|
3
|
+
* @param obj object whose properties will be extracted
|
|
4
|
+
* @param props array of strings with the properties to be extracted
|
|
5
|
+
* @returns object containing the extracted properties
|
|
6
|
+
*/
|
|
7
|
+
export declare const extractProperties: (obj: any, props: string[]) => any;
|
package/types/utils/index.d.ts
CHANGED
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for components/crud/crud-add-button.ts</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="../../prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="../../base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(../../sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="../../index.html">All files</a> / <a href="index.html">components/crud</a> crud-add-button.ts</h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">20% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>3/15</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">0% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/14</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">0% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/2</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">20% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>3/15</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
</div>
|
|
64
|
-
<div class='status-line low'></div>
|
|
65
|
-
<pre><table class="coverage">
|
|
66
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
-
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
-
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
-
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
-
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
-
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
-
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
-
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
-
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
-
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
-
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
-
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
-
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
-
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
-
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
-
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
-
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
-
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
-
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
-
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
-
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
-
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
-
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
-
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
-
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
-
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
-
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
-
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
-
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
-
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
-
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
|
-
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
|
-
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
-
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
|
-
<a name='L35'></a><a href='#L35'>35</a>
|
|
101
|
-
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
|
-
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
|
-
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
|
-
<a name='L39'></a><a href='#L39'>39</a>
|
|
105
|
-
<a name='L40'></a><a href='#L40'>40</a>
|
|
106
|
-
<a name='L41'></a><a href='#L41'>41</a>
|
|
107
|
-
<a name='L42'></a><a href='#L42'>42</a>
|
|
108
|
-
<a name='L43'></a><a href='#L43'>43</a>
|
|
109
|
-
<a name='L44'></a><a href='#L44'>44</a>
|
|
110
|
-
<a name='L45'></a><a href='#L45'>45</a>
|
|
111
|
-
<a name='L46'></a><a href='#L46'>46</a>
|
|
112
|
-
<a name='L47'></a><a href='#L47'>47</a>
|
|
113
|
-
<a name='L48'></a><a href='#L48'>48</a>
|
|
114
|
-
<a name='L49'></a><a href='#L49'>49</a>
|
|
115
|
-
<a name='L50'></a><a href='#L50'>50</a>
|
|
116
|
-
<a name='L51'></a><a href='#L51'>51</a>
|
|
117
|
-
<a name='L52'></a><a href='#L52'>52</a>
|
|
118
|
-
<a name='L53'></a><a href='#L53'>53</a>
|
|
119
|
-
<a name='L54'></a><a href='#L54'>54</a>
|
|
120
|
-
<a name='L55'></a><a href='#L55'>55</a>
|
|
121
|
-
<a name='L56'></a><a href='#L56'>56</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
122
|
-
<span class="cline-any cline-neutral"> </span>
|
|
123
|
-
<span class="cline-any cline-yes">1x</span>
|
|
124
|
-
<span class="cline-any cline-neutral"> </span>
|
|
125
|
-
<span class="cline-any cline-neutral"> </span>
|
|
126
|
-
<span class="cline-any cline-neutral"> </span>
|
|
127
|
-
<span class="cline-any cline-neutral"> </span>
|
|
128
|
-
<span class="cline-any cline-yes">1x</span>
|
|
129
|
-
<span class="cline-any cline-neutral"> </span>
|
|
130
|
-
<span class="cline-any cline-neutral"> </span>
|
|
131
|
-
<span class="cline-any cline-neutral"> </span>
|
|
132
|
-
<span class="cline-any cline-no"> </span>
|
|
133
|
-
<span class="cline-any cline-neutral"> </span>
|
|
134
|
-
<span class="cline-any cline-neutral"> </span>
|
|
135
|
-
<span class="cline-any cline-neutral"> </span>
|
|
136
|
-
<span class="cline-any cline-neutral"> </span>
|
|
137
|
-
<span class="cline-any cline-no"> </span>
|
|
138
|
-
<span class="cline-any cline-neutral"> </span>
|
|
139
|
-
<span class="cline-any cline-neutral"> </span>
|
|
140
|
-
<span class="cline-any cline-neutral"> </span>
|
|
141
|
-
<span class="cline-any cline-neutral"> </span>
|
|
142
|
-
<span class="cline-any cline-no"> </span>
|
|
143
|
-
<span class="cline-any cline-neutral"> </span>
|
|
144
|
-
<span class="cline-any cline-neutral"> </span>
|
|
145
|
-
<span class="cline-any cline-neutral"> </span>
|
|
146
|
-
<span class="cline-any cline-neutral"> </span>
|
|
147
|
-
<span class="cline-any cline-no"> </span>
|
|
148
|
-
<span class="cline-any cline-neutral"> </span>
|
|
149
|
-
<span class="cline-any cline-neutral"> </span>
|
|
150
|
-
<span class="cline-any cline-neutral"> </span>
|
|
151
|
-
<span class="cline-any cline-neutral"> </span>
|
|
152
|
-
<span class="cline-any cline-no"> </span>
|
|
153
|
-
<span class="cline-any cline-neutral"> </span>
|
|
154
|
-
<span class="cline-any cline-neutral"> </span>
|
|
155
|
-
<span class="cline-any cline-neutral"> </span>
|
|
156
|
-
<span class="cline-any cline-neutral"> </span>
|
|
157
|
-
<span class="cline-any cline-neutral"> </span>
|
|
158
|
-
<span class="cline-any cline-neutral"> </span>
|
|
159
|
-
<span class="cline-any cline-no"> </span>
|
|
160
|
-
<span class="cline-any cline-no"> </span>
|
|
161
|
-
<span class="cline-any cline-no"> </span>
|
|
162
|
-
<span class="cline-any cline-no"> </span>
|
|
163
|
-
<span class="cline-any cline-no"> </span>
|
|
164
|
-
<span class="cline-any cline-no"> </span>
|
|
165
|
-
<span class="cline-any cline-neutral"> </span>
|
|
166
|
-
<span class="cline-any cline-neutral"> </span>
|
|
167
|
-
<span class="cline-any cline-neutral"> </span>
|
|
168
|
-
<span class="cline-any cline-neutral"> </span>
|
|
169
|
-
<span class="cline-any cline-neutral"> </span>
|
|
170
|
-
<span class="cline-any cline-neutral"> </span>
|
|
171
|
-
<span class="cline-any cline-neutral"> </span>
|
|
172
|
-
<span class="cline-any cline-neutral"> </span>
|
|
173
|
-
<span class="cline-any cline-no"> </span>
|
|
174
|
-
<span class="cline-any cline-neutral"> </span>
|
|
175
|
-
<span class="cline-any cline-neutral"> </span>
|
|
176
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { I18n } from '@zeedhi/core';
|
|
177
|
-
import { ICrudAddButton } from './interfaces';
|
|
178
|
-
import { CrudButton } from './crud-button';
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Button to be used on Crud Forms
|
|
182
|
-
*/
|
|
183
|
-
export class CrudAddButton extends CrudButton implements ICrudAddButton {
|
|
184
|
-
/**
|
|
185
|
-
* Button tooltip
|
|
186
|
-
*/
|
|
187
|
-
private <span class="cstat-no" title="statement not covered" >defaultTooltip: string = 'ADD';</span>
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Button flat
|
|
191
|
-
*/
|
|
192
|
-
private <span class="cstat-no" title="statement not covered" >defaultFlat: boolean = true;</span>
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Button icon
|
|
196
|
-
*/
|
|
197
|
-
private <span class="cstat-no" title="statement not covered" >defaultIcon: boolean = true;</span>
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Button icon name
|
|
201
|
-
*/
|
|
202
|
-
private <span class="cstat-no" title="statement not covered" >defaultIconName: string = 'plus';</span>
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Button icon color
|
|
206
|
-
*/
|
|
207
|
-
private <span class="cstat-no" title="statement not covered" >defaultColor: string = '#666';</span>
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Create new Crud Add Button
|
|
211
|
-
* @param props component properties
|
|
212
|
-
*/
|
|
213
|
-
<span class="fstat-no" title="function not covered" > public constructor(p</span>rops: ICrudAddButton) {
|
|
214
|
-
<span class="cstat-no" title="statement not covered" > super({ ...props, clickShortcutKey: props.clickShortcutKey || 'f2' });</span>
|
|
215
|
-
<span class="cstat-no" title="statement not covered" > this.flat = props.flat !== undefined ? this.flat : this.defaultFlat;</span>
|
|
216
|
-
<span class="cstat-no" title="statement not covered" > this.icon = props.icon !== undefined ? this.icon : this.defaultIcon;</span>
|
|
217
|
-
<span class="cstat-no" title="statement not covered" > this.iconName = props.iconName !== undefined ? this.iconName : this.defaultIconName;</span>
|
|
218
|
-
<span class="cstat-no" title="statement not covered" > this.color = props.color !== undefined ? this.color : this.defaultColor;</span>
|
|
219
|
-
<span class="cstat-no" title="statement not covered" > this.tooltip.label = this.tooltip.label || `${I18n.translate(this.defaultTooltip)} (${props.clickShortcutKey || 'f2'})`;</span>
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Triggered when the component is clicked.
|
|
224
|
-
* @param event DOM event
|
|
225
|
-
* @param element Element clicked
|
|
226
|
-
*/
|
|
227
|
-
public <span class="fstat-no" title="function not covered" >click(</span>event: Event, element: HTMLElement) {
|
|
228
|
-
<span class="cstat-no" title="statement not covered" > super.click(event, element);</span>
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
</pre></td></tr></table></pre>
|
|
232
|
-
|
|
233
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
234
|
-
</div><!-- /wrapper -->
|
|
235
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
236
|
-
Code coverage generated by
|
|
237
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
238
|
-
at 2024-03-26T15:07:17.178Z
|
|
239
|
-
</div>
|
|
240
|
-
<script src="../../prettify.js"></script>
|
|
241
|
-
<script>
|
|
242
|
-
window.onload = function () {
|
|
243
|
-
prettyPrint();
|
|
244
|
-
};
|
|
245
|
-
</script>
|
|
246
|
-
<script src="../../sorter.js"></script>
|
|
247
|
-
<script src="../../block-navigation.js"></script>
|
|
248
|
-
</body>
|
|
249
|
-
</html>
|
|
250
|
-
|