@zeedhi/vuetify 1.88.0 → 1.89.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/dist/zd-vuetify.esm.js +3285 -2900
- package/dist/zd-vuetify.umd.js +3343 -2955
- package/package.json +2 -2
- package/types/components/public.d.ts +3 -1
- package/types/components/zd-grid/ZdGrid.d.ts +1 -0
- package/types/components/zd-grid/ZdGridEditable.d.ts +2 -23
- package/types/components/zd-grid/subcomponents/cell/ZdGridCellContent.d.ts +1 -0
- package/types/components/zd-grid/subcomponents/cell/ZdGridCellEdit.d.ts +3 -6
- package/types/components/zd-grid/subcomponents/cell/ZdGridEditableCellContent.d.ts +51 -0
- package/types/components/zd-grid/subcomponents/cell/ZdGridRow.d.ts +12 -0
- package/types/components/zd-tree-grid/ZdTreeGridEditable.d.ts +2 -23
- package/types/index.d.ts +1 -0
- package/types/mixins/editable-mixin/EditableMixin.d.ts +76 -0
- package/types/mixins/index.d.ts +2 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@zeedhi/vuetify",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.89.0",
|
4
4
|
"description": "Zeedhi Components based on Vuetify",
|
5
5
|
"author": "Zeedhi <zeedhi@teknisa.com>",
|
6
6
|
"license": "ISC",
|
@@ -51,5 +51,5 @@
|
|
51
51
|
"@types/prismjs": "1.26.*",
|
52
52
|
"@types/sortablejs": "1.15.*"
|
53
53
|
},
|
54
|
-
"gitHead": "
|
54
|
+
"gitHead": "2e4c72ed58142dfed158a8a016d238ad79a61f6e"
|
55
55
|
}
|
@@ -35,6 +35,8 @@ import ZdGridAction from './zd-grid/subcomponents/cell/ZdGridAction';
|
|
35
35
|
import ZdGridCell from './zd-grid/subcomponents/cell/ZdGridCell';
|
36
36
|
import ZdGridCellContent from './zd-grid/subcomponents/cell/ZdGridCellContent';
|
37
37
|
import ZdGridCellEdit from './zd-grid/subcomponents/cell/ZdGridCellEdit';
|
38
|
+
import ZdGridEditableCellContent from './zd-grid/subcomponents/cell/ZdGridEditableCellContent';
|
39
|
+
import ZdGridRow from './zd-grid/subcomponents/cell/ZdGridRow';
|
38
40
|
import ZdTreeGridCellContent from './zd-tree-grid/cell/ZdTreeGridCellContent';
|
39
41
|
import ZdGridEditable from './zd-grid/ZdGridEditable';
|
40
42
|
import ZdHeader from './zd-header/ZdHeader';
|
@@ -89,4 +91,4 @@ import ZdTooltip from './zd-tooltip/ZdTooltip';
|
|
89
91
|
import ZdTree from './zd-tree/ZdTree';
|
90
92
|
import ZdTreeGrid from './zd-tree-grid/ZdTreeGrid';
|
91
93
|
import ZdTreeGridEditable from './zd-tree-grid/ZdTreeGridEditable';
|
92
|
-
export { ZdAlert, ZdApexChart, ZdBadge, ZdBreadcrumbs, ZdButton, ZdButtonGroup, ZdCard, ZdCarousel, ZdCheckbox, ZdCheckboxMultiple, ZdChip, ZdCodeEditor, ZdCol, ZdCollapseCard, ZdComponent, ZdComponentRender, ZdContainer, ZdCurrency, ZdDashboard, ZdDate, ZdDateRange, ZdDialog, ZdDivider, ZdDropdown, ZdFileInput, ZdFooter, ZdForm, ZdFrame, ZdFramePage, ZdGrid, ZdGridFooter, ZdGridEditable, ZdIterableNoData, ZdGridTop, ZdGridAction, ZdGridCell, ZdGridCellContent, ZdGridCellEdit, ZdTreeGridCellContent, ZdHeader, ZdImage, ZdIncrement, ZdInput, ZdIterable, ZdIterableComponentRender, ZdIterableColumnsButton, ZdIterablePagination, ZdIterablePageSize, ZdIterablePageInfo, ZdList, ZdListItem, ZdListGroup, ZdLoading, ZdLogin, ZdLoginButton, ZdMasterDetail, ZdMenu, ZdMenuLink, ZdMenuGroup, ZdMenuButton, ZdMenuSeparator, ZdModal, ZdModalCloseButton, ZdMonth, ZdNumber, ZdPassword, ZdProgress, ZdRadio, ZdRangeSlider, ZdRow, ZdSearch, ZdSelectableList, ZdSelect, ZdSelectTree, ZdSelectTreeMultiple, ZdSpeedDial, ZdSteppers, ZdSvgMap, ZdSwitch, ZdTable, ZdTabs, ZdTag, ZdText, ZdTextarea, ZdTextInput, ZdTime, ZdToggleable, ZdTooltip, ZdTree, ZdTreeGrid, ZdTreeGridEditable, };
|
94
|
+
export { ZdAlert, ZdApexChart, ZdBadge, ZdBreadcrumbs, ZdButton, ZdButtonGroup, ZdCard, ZdCarousel, ZdCheckbox, ZdCheckboxMultiple, ZdChip, ZdCodeEditor, ZdCol, ZdCollapseCard, ZdComponent, ZdComponentRender, ZdContainer, ZdCurrency, ZdDashboard, ZdDate, ZdDateRange, ZdDialog, ZdDivider, ZdDropdown, ZdFileInput, ZdFooter, ZdForm, ZdFrame, ZdFramePage, ZdGrid, ZdGridFooter, ZdGridEditable, ZdIterableNoData, ZdGridTop, ZdGridAction, ZdGridCell, ZdGridCellContent, ZdGridCellEdit, ZdGridEditableCellContent, ZdGridRow, ZdTreeGridCellContent, ZdHeader, ZdImage, ZdIncrement, ZdInput, ZdIterable, ZdIterableComponentRender, ZdIterableColumnsButton, ZdIterablePagination, ZdIterablePageSize, ZdIterablePageInfo, ZdList, ZdListItem, ZdListGroup, ZdLoading, ZdLogin, ZdLoginButton, ZdMasterDetail, ZdMenu, ZdMenuLink, ZdMenuGroup, ZdMenuButton, ZdMenuSeparator, ZdModal, ZdModalCloseButton, ZdMonth, ZdNumber, ZdPassword, ZdProgress, ZdRadio, ZdRangeSlider, ZdRow, ZdSearch, ZdSelectableList, ZdSelect, ZdSelectTree, ZdSelectTreeMultiple, ZdSpeedDial, ZdSteppers, ZdSvgMap, ZdSwitch, ZdTable, ZdTabs, ZdTag, ZdText, ZdTextarea, ZdTextInput, ZdTime, ZdToggleable, ZdTooltip, ZdTree, ZdTreeGrid, ZdTreeGridEditable, };
|
@@ -47,6 +47,7 @@ export default class ZdGrid extends ZdIterable {
|
|
47
47
|
fixedRight: IDictionary<string>;
|
48
48
|
mounted(): void;
|
49
49
|
private setViewGetWidth;
|
50
|
+
orderHeaders(headers: Column[]): Column[];
|
50
51
|
parseWidth(width?: string): number;
|
51
52
|
calcWidth(column: Column, width?: string): string;
|
52
53
|
setSpanWidth(column: Column): string;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { GridEditable,
|
1
|
+
import { GridEditable, Column } from '@zeedhi/common';
|
2
2
|
import { IDictionary } from '@zeedhi/core';
|
3
3
|
import ZdGrid from './ZdGrid';
|
4
4
|
export interface IColumnWidths {
|
@@ -14,36 +14,15 @@ export default class ZdGridEditable extends ZdGrid {
|
|
14
14
|
canEditRow: Function | string;
|
15
15
|
editNewRowsOnly: boolean | string;
|
16
16
|
editingNewRows: boolean | string;
|
17
|
+
singleEdit: boolean | string;
|
17
18
|
instance: GridEditable;
|
18
19
|
instanceType: typeof GridEditable;
|
19
|
-
inputToFocus: string;
|
20
20
|
isTrVisible: boolean;
|
21
|
-
getEditableComponent(column: IGridColumnEditable, row: IDictionary<any>, cellProps: IDictionary<any>): {
|
22
|
-
name: string;
|
23
|
-
parent: GridEditable;
|
24
|
-
align: "left" | "center" | "right" | undefined;
|
25
|
-
showLabel: boolean;
|
26
|
-
showHelper: boolean;
|
27
|
-
dense: boolean;
|
28
|
-
value: any;
|
29
|
-
events: any;
|
30
|
-
autofill: boolean;
|
31
|
-
allowDuplicate: boolean;
|
32
|
-
};
|
33
|
-
cellClick(row: IDictionary<any>, column: GridColumnEditable, event: Event, canEdit?: boolean): void;
|
34
|
-
callCellClick(row: IDictionary<any>, column: GridColumnEditable, event: Event, canEdit?: boolean): void;
|
35
21
|
private navigationKeyMapping;
|
36
|
-
private onMountedEvent;
|
37
22
|
getColWidth(col: Column): boolean;
|
38
23
|
protected registerOnVisible(): void;
|
39
24
|
mounted(): void;
|
40
25
|
beforeDestroy(): void;
|
41
|
-
private getTdNode;
|
42
|
-
private getArrayFromElementTag;
|
43
|
-
private getArrayFromTdElement;
|
44
|
-
private getArrayFromTrElement;
|
45
|
-
private findNextTd;
|
46
|
-
private navigate;
|
47
26
|
private navigateUp;
|
48
27
|
private navigateDown;
|
49
28
|
hasToggleIcon(column: Column, row: IDictionary<any>): boolean;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import Vue from 'vue';
|
2
|
-
import { Column } from '@zeedhi/common';
|
2
|
+
import { Column, IComponent } from '@zeedhi/common';
|
3
3
|
import { IDictionary } from '@zeedhi/core';
|
4
4
|
/**
|
5
5
|
* Grid cell Edit component
|
@@ -8,11 +8,8 @@ export default class ZdGridCellEdit extends Vue {
|
|
8
8
|
column?: Column;
|
9
9
|
rowStyle?: IDictionary<any>;
|
10
10
|
cellsApplied?: IDictionary<any>;
|
11
|
-
|
12
|
-
isValid?: boolean;
|
13
|
-
row?: IDictionary<any>;
|
11
|
+
row: IDictionary<any>;
|
14
12
|
rowKey?: string | number;
|
15
|
-
|
16
|
-
getWidthStyle?: Function;
|
13
|
+
component?: IComponent;
|
17
14
|
get cellProps(): {};
|
18
15
|
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import Vue from 'vue';
|
2
|
+
import { Column } from '@zeedhi/common';
|
3
|
+
import { IDictionary } from '@zeedhi/core';
|
4
|
+
/**
|
5
|
+
* Grid cell Edit component
|
6
|
+
*/
|
7
|
+
export default class ZdGridEditableCellContent extends Vue {
|
8
|
+
column: Column;
|
9
|
+
rowStyle?: IDictionary<any>;
|
10
|
+
cellsApplied?: IDictionary<any>;
|
11
|
+
row: IDictionary<any>;
|
12
|
+
rowKey: string | number;
|
13
|
+
getEditableComponent: Function;
|
14
|
+
getWidthStyle: Function;
|
15
|
+
hasToggleIcon: Function;
|
16
|
+
getVisibleValue: Function;
|
17
|
+
isEdited: Function;
|
18
|
+
isValid: Function;
|
19
|
+
register: Function;
|
20
|
+
isCellEditable: Function;
|
21
|
+
canEdit: boolean;
|
22
|
+
cssClass: (IDictionary<boolean> | string)[];
|
23
|
+
get cellProps(): {};
|
24
|
+
get editable(): any;
|
25
|
+
get tabindex(): 0 | -1;
|
26
|
+
component: any;
|
27
|
+
updateComponent(): void;
|
28
|
+
visibleValue: null;
|
29
|
+
getNewVisibleValue(): any;
|
30
|
+
updateVisibleValue(): void;
|
31
|
+
edited: boolean;
|
32
|
+
updateEdited(): void;
|
33
|
+
valid: boolean;
|
34
|
+
updateValid(): void;
|
35
|
+
get id(): string;
|
36
|
+
registerComponent(): void;
|
37
|
+
mounted(): void;
|
38
|
+
/**
|
39
|
+
* Forces the component to update
|
40
|
+
* this is needed to avoid reactivity to crosstab editedRows,
|
41
|
+
* which can cause unnecessary rerenders
|
42
|
+
*/
|
43
|
+
forceUpdate(): void;
|
44
|
+
rowChange(): void;
|
45
|
+
editing: boolean;
|
46
|
+
enterEdit(): void;
|
47
|
+
leaveEdit(): void;
|
48
|
+
click(event: Event): void;
|
49
|
+
focus(event: Event): void;
|
50
|
+
focusInput(): void;
|
51
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { IDictionary } from '@zeedhi/core';
|
2
|
+
import Vue from 'vue';
|
3
|
+
/**
|
4
|
+
* Grid row component
|
5
|
+
*/
|
6
|
+
export default class ZdGridRow extends Vue {
|
7
|
+
isActive: boolean;
|
8
|
+
row: IDictionary;
|
9
|
+
isCurrentRow: Function;
|
10
|
+
classes: IDictionary;
|
11
|
+
get isCurrent(): any;
|
12
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { TreeGridEditable,
|
1
|
+
import { TreeGridEditable, Column } from '@zeedhi/common';
|
2
2
|
import { IDictionary } from '@zeedhi/core';
|
3
3
|
import ZdTreeGrid from './ZdTreeGrid';
|
4
4
|
import { IColumnWidths } from '../zd-grid/ZdGridEditable';
|
@@ -9,36 +9,15 @@ export default class ZdTreeGridEditable extends ZdTreeGrid {
|
|
9
9
|
doubleClickEdit: boolean | string;
|
10
10
|
canEditRow: Function | string;
|
11
11
|
hasUsingCellText: boolean;
|
12
|
+
singleEdit: boolean | string;
|
12
13
|
instance: TreeGridEditable;
|
13
14
|
instanceType: typeof TreeGridEditable;
|
14
|
-
inputToFocus: string;
|
15
15
|
isTrVisible: boolean;
|
16
|
-
getEditableComponent(column: IGridColumnEditable, row: IDictionary<any>, cellProps: IDictionary<any>): {
|
17
|
-
name: string;
|
18
|
-
parent: TreeGridEditable;
|
19
|
-
align: "left" | "center" | "right" | undefined;
|
20
|
-
showLabel: boolean;
|
21
|
-
showHelper: boolean;
|
22
|
-
dense: boolean;
|
23
|
-
value: any;
|
24
|
-
events: any;
|
25
|
-
autofill: boolean;
|
26
|
-
allowDuplicate: boolean;
|
27
|
-
};
|
28
|
-
cellClick(row: IDictionary<any>, column: GridColumnEditable, event: Event, canEdit?: boolean): void;
|
29
|
-
callCellClick(row: IDictionary<any>, column: GridColumnEditable, event: Event, canEdit?: boolean): void;
|
30
16
|
private navigationKeyMapping;
|
31
|
-
private onMountedEvent;
|
32
17
|
getColWidth(col: Column): boolean;
|
33
18
|
private registerOnVisible;
|
34
19
|
mounted(): void;
|
35
20
|
beforeDestroy(): void;
|
36
|
-
private getTdNode;
|
37
|
-
private getArrayFromElementTag;
|
38
|
-
private getArrayFromTdElement;
|
39
|
-
private getArrayFromTrElement;
|
40
|
-
private findNextTd;
|
41
|
-
private navigate;
|
42
21
|
private navigateUp;
|
43
22
|
private navigateDown;
|
44
23
|
hasToggleIcon(column: Column, row: IDictionary<any>): boolean;
|
package/types/index.d.ts
CHANGED
@@ -10,6 +10,7 @@ declare const Zeedhi: {
|
|
10
10
|
export default Zeedhi;
|
11
11
|
export * from './components';
|
12
12
|
export * from './components/public';
|
13
|
+
export * from './mixins';
|
13
14
|
export * from './utils/colors';
|
14
15
|
export * from './utils/icons/icons';
|
15
16
|
export * from './utils/decorators';
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import Vue from 'vue';
|
2
|
+
import { GridColumnEditable, GridEditable, IGridColumnEditable } from '@zeedhi/common';
|
3
|
+
import { IDictionary } from '@zeedhi/core';
|
4
|
+
interface IUpdatableComponent {
|
5
|
+
forceUpdate: () => void;
|
6
|
+
enterEdit: () => void;
|
7
|
+
leaveEdit: () => void;
|
8
|
+
registerComponent: () => void;
|
9
|
+
focusInput: () => void;
|
10
|
+
}
|
11
|
+
export default class EditableMixin extends Vue {
|
12
|
+
instance: GridEditable;
|
13
|
+
rowKey: Function;
|
14
|
+
inputToFocus: IUpdatableComponent | null;
|
15
|
+
cellComponents: Map<string, IUpdatableComponent>;
|
16
|
+
/**
|
17
|
+
* Variable to store the ids of the cells to be forced update
|
18
|
+
*/
|
19
|
+
currentUpdatingIds: string[];
|
20
|
+
get editedRows(): IDictionary<any>[];
|
21
|
+
/**
|
22
|
+
* Watches editedRows and decides which cells should be forced update
|
23
|
+
* Normally only two will be updated each time: the cell that is entering edit mode
|
24
|
+
* and the cell that is leaving edit mode, but it is possible to have more
|
25
|
+
* updates, for example when calling `cancelEditedRows()`, all edited rows must be updated
|
26
|
+
*/
|
27
|
+
changeEditedRows(newEditedRows: IDictionary[]): void;
|
28
|
+
changeEditing(editing: boolean): void;
|
29
|
+
/**
|
30
|
+
* Registers a new component in `cellComponents`
|
31
|
+
* @param id component id
|
32
|
+
* @param component
|
33
|
+
*/
|
34
|
+
register(id: string, component: IUpdatableComponent): void;
|
35
|
+
editingComponent: IUpdatableComponent | null;
|
36
|
+
editingComponentId: string | null;
|
37
|
+
/**
|
38
|
+
* Makes
|
39
|
+
* a component enter edit mode, also making the previous editing component
|
40
|
+
* leave edit mode
|
41
|
+
*/
|
42
|
+
enterCompEdit(component: IUpdatableComponent, id: string): void;
|
43
|
+
leaveEdit(component: IUpdatableComponent | null): void;
|
44
|
+
enterEdit(component: IUpdatableComponent): void;
|
45
|
+
isCellEditable(row: IDictionary, column: GridColumnEditable, canEdit: boolean): boolean;
|
46
|
+
isEdited(column: IGridColumnEditable, row: IDictionary): boolean;
|
47
|
+
isValid(column: IGridColumnEditable, row: IDictionary): boolean;
|
48
|
+
getEditableComponent(column: IGridColumnEditable, row: IDictionary<any>, cellProps: IDictionary<any>): {
|
49
|
+
name: string;
|
50
|
+
parent: GridEditable;
|
51
|
+
align: "left" | "center" | "right" | undefined;
|
52
|
+
showLabel: boolean;
|
53
|
+
showHelper: boolean;
|
54
|
+
dense: boolean;
|
55
|
+
value: any;
|
56
|
+
events: any;
|
57
|
+
autofill: boolean;
|
58
|
+
allowDuplicate: boolean;
|
59
|
+
};
|
60
|
+
cellClick(row: IDictionary<any>, column: GridColumnEditable, event: Event, canEdit?: boolean, componentId?: string): void;
|
61
|
+
callCellClick(row: IDictionary<any>, column: GridColumnEditable, event: Event, canEdit: boolean, componentId: string): void;
|
62
|
+
cellFocus(component: IUpdatableComponent, id: string): void;
|
63
|
+
getVisibleValue(row: IDictionary, column: GridColumnEditable): any;
|
64
|
+
/**
|
65
|
+
* Focus an element or its first focusable children
|
66
|
+
* @param element element to be focused
|
67
|
+
*/
|
68
|
+
focusElement(element?: HTMLElement | null): void;
|
69
|
+
private getTdNode;
|
70
|
+
private getArrayFromElementTag;
|
71
|
+
private getArrayFromTdElement;
|
72
|
+
private getArrayFromTrElement;
|
73
|
+
private findNextTd;
|
74
|
+
navigate(up: boolean): void;
|
75
|
+
}
|
76
|
+
export {};
|