@progress/kendo-vue-layout 3.7.2 → 3.7.3-dev.202211021441

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.
Files changed (35) hide show
  1. package/dist/cdn/js/kendo-vue-layout.js +1 -1
  2. package/dist/es/main.d.ts +2 -0
  3. package/dist/es/main.js +2 -0
  4. package/dist/es/package-metadata.js +1 -1
  5. package/dist/es/tilelayout/ResizeHandlers.d.ts +53 -0
  6. package/dist/es/tilelayout/ResizeHandlers.js +79 -0
  7. package/dist/es/tilelayout/Tile.d.ts +51 -0
  8. package/dist/es/tilelayout/Tile.js +353 -0
  9. package/dist/es/tilelayout/TileLayout.d.ts +108 -0
  10. package/dist/es/tilelayout/TileLayout.js +222 -0
  11. package/dist/es/tilelayout/interfaces/main.d.ts +135 -0
  12. package/dist/es/tilelayout/interfaces/main.js +1 -0
  13. package/dist/esm/main.d.ts +2 -0
  14. package/dist/esm/main.js +2 -0
  15. package/dist/esm/package-metadata.js +1 -1
  16. package/dist/esm/tilelayout/ResizeHandlers.d.ts +53 -0
  17. package/dist/esm/tilelayout/ResizeHandlers.js +79 -0
  18. package/dist/esm/tilelayout/Tile.d.ts +51 -0
  19. package/dist/esm/tilelayout/Tile.js +353 -0
  20. package/dist/esm/tilelayout/TileLayout.d.ts +108 -0
  21. package/dist/esm/tilelayout/TileLayout.js +222 -0
  22. package/dist/esm/tilelayout/interfaces/main.d.ts +135 -0
  23. package/dist/esm/tilelayout/interfaces/main.js +1 -0
  24. package/dist/npm/main.d.ts +2 -0
  25. package/dist/npm/main.js +2 -0
  26. package/dist/npm/package-metadata.js +1 -1
  27. package/dist/npm/tilelayout/ResizeHandlers.d.ts +53 -0
  28. package/dist/npm/tilelayout/ResizeHandlers.js +86 -0
  29. package/dist/npm/tilelayout/Tile.d.ts +51 -0
  30. package/dist/npm/tilelayout/Tile.js +361 -0
  31. package/dist/npm/tilelayout/TileLayout.d.ts +108 -0
  32. package/dist/npm/tilelayout/TileLayout.js +229 -0
  33. package/dist/npm/tilelayout/interfaces/main.d.ts +135 -0
  34. package/dist/npm/tilelayout/interfaces/main.js +2 -0
  35. package/package.json +11 -11
@@ -0,0 +1,135 @@
1
+ /**
2
+ * The interface for describing items that can be passed to the `items` property of the TileLayout component.
3
+ */
4
+ export interface TileLayoutItem {
5
+ /**
6
+ * The position which is used when the TileLayout is in uncontrolled mode
7
+ * ([see example]({% slug tiles_tilelayout %}#toc-position-and-dimensions)).
8
+ */
9
+ defaultPosition?: TilePosition;
10
+ /**
11
+ * Sets additional classes to the TileLayoutItem.
12
+ */
13
+ className?: string;
14
+ /**
15
+ * Sets additional CSS styles to the TileLayoutItem hint element.
16
+ */
17
+ hintStyle?: object;
18
+ /**
19
+ * Sets additional classes to the TileLayoutItem hint element.
20
+ */
21
+ hintClassName?: string;
22
+ /**
23
+ * Sets the title in the TileLayoutItem's header
24
+ * ([see example]({% slug tiles_tilelayout %})).
25
+ */
26
+ header?: any;
27
+ /**
28
+ * Sets the content in TileLayoutItem's body
29
+ * ([see example]({% slug tiles_tilelayout %})).
30
+ */
31
+ body?: any;
32
+ /**
33
+ * Overrides the default rendering of the TileLayoutItem
34
+ * ([see example]({% slug tiles_tilelayout %}#toc-custom-rendering)).
35
+ */
36
+ item?: any;
37
+ /**
38
+ * Specifies if the user is allowed to resize the TileLayoutItem and in which direction
39
+ * ([see example]({% slug tiles_tilelayout %}#toc-resizing)).
40
+ * If `resizable` is not specified, the resizing of the TileLayoutItem will be enabled for both directions.
41
+ */
42
+ resizable?: TileResizeMode | string | boolean;
43
+ /**
44
+ * Specifies if the user is allowed to reorder the TileLayoutItem by dragging and dropping it
45
+ * ([see example]({% slug tiles_tilelayout %}#toc-reordering)).
46
+ * If `reorderable` is not specified, the dragging functionality of the TileLayoutItem will be enabled.
47
+ */
48
+ reorderable?: boolean;
49
+ }
50
+ /**
51
+ * Specifies the position of each tile.
52
+ */
53
+ export interface TilePosition {
54
+ /**
55
+ * Defines the order index of the TileLayoutItem.
56
+ * If not set, items will receive a sequential order.
57
+ */
58
+ order?: number;
59
+ /**
60
+ * (Required) Defines on which column-line the TileLayoutItem will start.
61
+ * It is required in order reordering and resizing functionalities to work as expected as they rely on it.
62
+ */
63
+ col: number;
64
+ /**
65
+ * Specifies how many columns will the TileLayoutItem spans.
66
+ * Defaults to `1`.
67
+ */
68
+ colSpan?: number;
69
+ /**
70
+ * Defines on which row-line the TileLayoutItem will start.
71
+ */
72
+ row?: number;
73
+ /**
74
+ * Specifies how many rows will the TileLayoutItem spans.
75
+ * Defaults to `1`.
76
+ */
77
+ rowSpan?: number;
78
+ }
79
+ /**
80
+ * Specifies the strict position of each tile.
81
+ * Used in the [TileLayoutRepositionEvent]({% slug api_layout_tilelayoutrepositionevent %}).
82
+ */
83
+ export interface TileStrictPosition extends TilePosition {
84
+ /**
85
+ * Defines the order index of the TileLayoutItem.
86
+ * If not set, items will receive a sequential order.
87
+ */
88
+ order: number;
89
+ /**
90
+ * Specifies how many rows will the TileLayoutItem spans.
91
+ * Defaults to `1`.
92
+ */
93
+ rowSpan: number;
94
+ /**
95
+ * Specifies how many columns will the TileLayoutItem spans.
96
+ * Defaults to `1`.
97
+ */
98
+ colSpan: number;
99
+ }
100
+ /**
101
+ * Specifies if the user is allowed to resize the TileLayoutItem and in which direction
102
+ * ([see example]({% slug tiles_tilelayout %}#toc-resizing)).
103
+ * If `resizable` is not specified, the resizing of the TileLayoutItem will be enabled for both directions.
104
+ */
105
+ export declare type TileResizeMode = 'horizontal' | 'vertical' | boolean;
106
+ /**
107
+ * Specifies the gaps between the tiles.
108
+ */
109
+ export interface TileLayoutGap {
110
+ /**
111
+ * The rows gap between tiles.
112
+ * Defaults to `16px`.
113
+ */
114
+ rows?: number | string;
115
+ /**
116
+ * The columns gap between tiles.
117
+ * Defaults to `16px`.
118
+ */
119
+ columns?: number | string;
120
+ }
121
+ /**
122
+ * Controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the TileLayout.
123
+ * For further reference, check [grid-auto-flow CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow) article.
124
+ * Defaults to `column`.
125
+ */
126
+ export declare type TileLayoutAutoFlow = 'column' | 'row' | 'column dense' | 'row dense' | 'unset';
127
+ /**
128
+ * The arguments for the `onReposition` TileLayout event.
129
+ */
130
+ export interface TileLayoutRepositionEvent {
131
+ /**
132
+ * The new positions of the TileLayout tiles.
133
+ */
134
+ value: Array<TileStrictPosition>;
135
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -47,6 +47,8 @@ export * from './panelbar/interfaces/PanelBarProps';
47
47
  export * from './panelbar/interfaces/PanelBarItemProps';
48
48
  export * from './panelbar/interfaces/RenderPanelBarItem';
49
49
  export * from './panelbar/interfaces/PanelBarSelectEventArguments';
50
+ export * from './tilelayout/TileLayout';
51
+ export * from './tilelayout/interfaces/main';
50
52
  export * from './appbar/AppBar';
51
53
  export * from './appbar/interfaces/AppBarProps';
52
54
  export * from './appbar/AppBarSection';
package/dist/npm/main.js CHANGED
@@ -63,6 +63,8 @@ __exportStar(require("./panelbar/interfaces/PanelBarProps"), exports);
63
63
  __exportStar(require("./panelbar/interfaces/PanelBarItemProps"), exports);
64
64
  __exportStar(require("./panelbar/interfaces/RenderPanelBarItem"), exports);
65
65
  __exportStar(require("./panelbar/interfaces/PanelBarSelectEventArguments"), exports);
66
+ __exportStar(require("./tilelayout/TileLayout"), exports);
67
+ __exportStar(require("./tilelayout/interfaces/main"), exports);
66
68
  __exportStar(require("./appbar/AppBar"), exports);
67
69
  __exportStar(require("./appbar/interfaces/AppBarProps"), exports);
68
70
  __exportStar(require("./appbar/AppBarSection"), exports);
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-layout',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1667290002,
11
+ publishDate: 1667399417,
12
12
  version: '',
13
13
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
14
14
  };
@@ -0,0 +1,53 @@
1
+ declare type DefaultData<V> = object | ((this: V) => {});
2
+ declare type DefaultMethods<V> = {
3
+ [key: string]: (this: V, ...args: any[]) => any;
4
+ };
5
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
6
+ /**
7
+ * @hidden
8
+ */
9
+ export interface ResizeHandlersProps {
10
+ resizable: string | boolean;
11
+ onResize?: (e: any, args: {
12
+ end: boolean;
13
+ direction: any;
14
+ }) => void;
15
+ onPress?: (e: any) => void;
16
+ rtl: boolean;
17
+ }
18
+ /**
19
+ * @hidden
20
+ */
21
+ interface ResizeHandlersState {
22
+ }
23
+ /**
24
+ * @hidden
25
+ */
26
+ interface ResizeHandlersData {
27
+ }
28
+ /**
29
+ * @hidden
30
+ */
31
+ export interface ResizeHandlersMethods {
32
+ [key: string]: any;
33
+ }
34
+ /**
35
+ * @hidden
36
+ */
37
+ export interface ResizeHandlersComputed {
38
+ [key: string]: any;
39
+ }
40
+ /**
41
+ * @hidden
42
+ */
43
+ export interface ResizeHandlersAll extends ResizeHandlersMethods, ResizeHandlersState, ResizeHandlersData, ResizeHandlersComputed, Vue2type {
44
+ }
45
+ /**
46
+ * @hidden
47
+ */
48
+ declare const ResizeHandlersVue2: ComponentOptions<Vue2type, DefaultData<ResizeHandlersData>, DefaultMethods<ResizeHandlersAll>, ResizeHandlersComputed, RecordPropsDefinition<ResizeHandlersProps>>;
49
+ /**
50
+ * @hidden
51
+ */
52
+ declare const ResizeHandlers: DefineComponent<ResizeHandlersProps, any, ResizeHandlersData, ResizeHandlersComputed, ResizeHandlersMethods, {}, {}, {}, string, ResizeHandlersProps, ResizeHandlersProps, {}>;
53
+ export { ResizeHandlers, ResizeHandlersVue2 };
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ResizeHandlersVue2 = exports.ResizeHandlers = void 0;
7
+ // @ts-ignore
8
+ var Vue = require("vue");
9
+ var allVue = Vue;
10
+ var gh = allVue.h;
11
+ var isV3 = allVue.version && allVue.version[0] === '3';
12
+ /**
13
+ * @hidden
14
+ */
15
+ var ResizeHandlersVue2 = {
16
+ name: 'KendoResizeHandlers',
17
+ props: {
18
+ resizable: [String, Boolean],
19
+ rtl: Boolean
20
+ },
21
+ // @ts-ignore
22
+ setup: !isV3 ? undefined : function () {
23
+ var v3 = !!isV3;
24
+ return {
25
+ v3: v3
26
+ };
27
+ },
28
+ render: function render(createElement) {
29
+ var h = gh || createElement;
30
+ var _a = this.$props,
31
+ resizable = _a.resizable,
32
+ onPress = _a.onPress,
33
+ rtl = _a.rtl;
34
+ if (!resizable) {
35
+ return null;
36
+ }
37
+ // const Handle = (props: { onResize: any; style: {}; d: string; onPress: any }) => (
38
+ // // @ts-ignore
39
+ // <Draggable
40
+ // onPress={props.onPress}
41
+ // onDrag={(data: any) => { props.onResize(data.event, false, props.d); }}
42
+ // onRelease={(data: any) => { props.onResize(data.event, true, props.d); }}
43
+ // >
44
+ // <div className={'k-resize-handle k-cursor-' + props.d + '-resize'}
45
+ // style={{ bottom: 0, right: 0, ...props.style }} />
46
+ // </Draggable>
47
+ // );
48
+ return h("div")
49
+ // <React.Fragment>
50
+ // {resizable !== 'vertical' && (
51
+ // <Handle
52
+ // onPress={onPress}
53
+ // onResize={this.handleResize}
54
+ // d="ew"
55
+ // style={rtl ? { top: 0, width: 9, left: 0, right: '' } : { top: 0, width: 9, right: 0, left: '' }}
56
+ // />
57
+ // )}
58
+ // {resizable !== 'horizontal' && (
59
+ // <Handle onPress={onPress} onResize={this.handleResize} d="ns" style={{ left: 0, height: 9 }} />)}
60
+ // {(resizable === true) && (
61
+ // <Handle
62
+ // onPress={onPress}
63
+ // onResize={this.handleResize}
64
+ // d={rtl ? 'nesw' : 'nwse'}
65
+ // style={rtl ? { width: 9, height: 9, right: '', left: 0 } : { width: 9, height: 9, right: 0, left: '' }}
66
+ // />)}
67
+ // </React.Fragment>
68
+ ;
69
+ },
70
+
71
+ methods: {
72
+ handleResize: function handleResize(event, isEnd, direction) {
73
+ event.originalEvent.preventDefault();
74
+ this.$props.onResize(event, {
75
+ end: isEnd,
76
+ direction: direction
77
+ });
78
+ }
79
+ }
80
+ };
81
+ exports.ResizeHandlersVue2 = ResizeHandlersVue2;
82
+ /**
83
+ * @hidden
84
+ */
85
+ var ResizeHandlers = ResizeHandlersVue2;
86
+ exports.ResizeHandlers = ResizeHandlers;
@@ -0,0 +1,51 @@
1
+ declare type DefaultData<V> = object | ((this: V) => {});
2
+ declare type DefaultMethods<V> = {
3
+ [key: string]: (this: V, ...args: any[]) => any;
4
+ };
5
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
6
+ import { TileStrictPosition, TileLayoutItem } from './interfaces/main';
7
+ /**
8
+ * @hidden
9
+ */
10
+ export interface TileProps extends TileLayoutItem {
11
+ update?: (index: number, dRow: number, dCol: number, row: number, col: number) => void;
12
+ index: number;
13
+ defaultPosition: TileStrictPosition;
14
+ ignoreDrag?: (event: any) => boolean;
15
+ }
16
+ /**
17
+ * @hidden
18
+ */
19
+ interface TileState {
20
+ }
21
+ /**
22
+ * @hidden
23
+ */
24
+ interface TileData {
25
+ }
26
+ /**
27
+ * @hidden
28
+ */
29
+ export interface TileMethods {
30
+ [key: string]: any;
31
+ }
32
+ /**
33
+ * @hidden
34
+ */
35
+ export interface TileComputed {
36
+ [key: string]: any;
37
+ }
38
+ /**
39
+ * @hidden
40
+ */
41
+ export interface TileAll extends TileMethods, TileState, TileData, TileComputed, Vue2type {
42
+ }
43
+ /**
44
+ * @hidden
45
+ */
46
+ declare const TileVue2: ComponentOptions<Vue2type, DefaultData<TileData>, DefaultMethods<TileAll>, TileComputed, RecordPropsDefinition<TileProps>>;
47
+ /**
48
+ * @hidden
49
+ */
50
+ declare const Tile: DefineComponent<TileProps, any, TileData, TileComputed, TileMethods, {}, {}, {}, string, TileProps, TileProps, {}>;
51
+ export { Tile, TileVue2 };