@syncfusion/ej2-layouts 29.1.39 → 30.1.37

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.
@@ -0,0 +1,3 @@
1
+ /** Timeline export modules */
2
+ export * from './timeline';
3
+ export * from './timeline-model';
@@ -0,0 +1,3 @@
1
+ /** Timeline export modules */
2
+ export * from './timeline';
3
+ export * from './timeline-model';
@@ -0,0 +1,140 @@
1
+ import { Component, INotifyPropertyChanged, ChildProperty, Collection, BaseEventArgs, Event, EmitType, NotifyPropertyChanges, Property, getUniqueID, attributes, select, compile, remove, removeClass, append, isNullOrUndefined } from '@syncfusion/ej2-base';
2
+ import {TimelineOrientation,TimelineAlign,TimelineRenderingEventArgs} from "./timeline";
3
+ import {ComponentModel} from '@syncfusion/ej2-base';
4
+
5
+ /**
6
+ * Interface for a class TimelineItem
7
+ */
8
+ export interface TimelineItemModel {
9
+
10
+ /**
11
+ * Defines one or more CSS classes to include an icon or image in the Timeline item.
12
+ *
13
+ * @default ''
14
+ */
15
+ dotCss?: string;
16
+
17
+ /**
18
+ * Defines the text content or template for the Timeline item. The current itemIndex passed as context to build the content.
19
+ *
20
+ * @default ''
21
+ * @angularType string | object
22
+ * @reactType string | function | JSX.Element
23
+ * @vueType string | function
24
+ * @aspType string
25
+ */
26
+ content?: string | Function;
27
+
28
+ /**
29
+ * Defines the additional text content or template to be displayed opposite side of the item. The current itemIndex passed as context to build the content.
30
+ *
31
+ * @default ''
32
+ * @angularType string | object
33
+ * @reactType string | function | JSX.Element
34
+ * @vueType string | function
35
+ * @aspType string
36
+ */
37
+ oppositeContent?: string | Function;
38
+
39
+ /**
40
+ * Defines whether to enable or disable the timeline item.
41
+ *
42
+ * @default false
43
+ */
44
+ disabled?: boolean;
45
+
46
+ /**
47
+ * Defines the CSS class to customize the Timeline item appearance.
48
+ *
49
+ * @default ''
50
+ */
51
+ cssClass?: string;
52
+
53
+ }
54
+
55
+ /**
56
+ * Interface for a class Timeline
57
+ */
58
+ export interface TimelineModel extends ComponentModel{
59
+
60
+ /**
61
+ * Defines the orientation type of the Timeline.
62
+ *
63
+ * The possible values are:
64
+ * * Horizontal
65
+ * * vertical
66
+ *
67
+ * {% codeBlock src='timeline/orientation/index.md' %}{% endcodeBlock %}
68
+ *
69
+ * @isenumeration true
70
+ * @default TimelineOrientation.Vertical
71
+ * @asptype TimelineOrientation
72
+ */
73
+ orientation?: string | TimelineOrientation;
74
+
75
+ /**
76
+ * Defines the alignment of item content within the Timeline.
77
+ *
78
+ * The possible values are:
79
+ * * Before
80
+ * * After
81
+ * * Alternate
82
+ * * AlternateReverse
83
+ *
84
+ * {% codeBlock src='timeline/align/index.md' %}{% endcodeBlock %}
85
+ *
86
+ * @isenumeration true
87
+ * @default TimelineAlign.After
88
+ * @asptype TimelineAlign
89
+ */
90
+ align?: string | TimelineAlign;
91
+
92
+ /**
93
+ * Defines the list of items.
94
+ *
95
+ * @default []
96
+ */
97
+ items?: TimelineItemModel[];
98
+
99
+ /**
100
+ * Defines the CSS class to customize the Timeline appearance.
101
+ *
102
+ * @default ''
103
+ */
104
+ cssClass?: string;
105
+
106
+ /**
107
+ * Defines whether to show the timeline items in reverse order or not.
108
+ *
109
+ * @default false
110
+ */
111
+ reverse?: boolean;
112
+
113
+ /**
114
+ * Defines the template content for each timeline item. The template context will contain the item model.
115
+ *
116
+ * {% codeBlock src='timeline/template/index.md' %}{% endcodeBlock %}
117
+ *
118
+ * @default ''
119
+ * @angularType string | object
120
+ * @reactType string | function | JSX.Element
121
+ * @vueType string | function
122
+ * @aspType string
123
+ */
124
+ template?: string | Function;
125
+
126
+ /**
127
+ * Event callback that is raised after rendering the timeline.
128
+ *
129
+ * @event created
130
+ */
131
+ created?: EmitType<Event>;
132
+
133
+ /**
134
+ * Event triggers before rendering each item.
135
+ *
136
+ * @event beforeItemRender
137
+ */
138
+ beforeItemRender?: EmitType<TimelineRenderingEventArgs>;
139
+
140
+ }
@@ -0,0 +1,239 @@
1
+ import { Component, INotifyPropertyChanged, ChildProperty, BaseEventArgs, EmitType } from '@syncfusion/ej2-base';
2
+ import { TimelineModel, TimelineItemModel } from '../timeline';
3
+ /**
4
+ * Defines the orientation type of the Timeline.
5
+ */
6
+ export declare enum TimelineOrientation {
7
+ /**
8
+ * Items are displayed horizontally.
9
+ */
10
+ Horizontal = "Horizontal",
11
+ /**
12
+ * Items are displayed vertically.
13
+ */
14
+ Vertical = "Vertical"
15
+ }
16
+ /**
17
+ * Specifies the alignment of item content within the Timeline.
18
+ */
19
+ export declare enum TimelineAlign {
20
+ /**
21
+ * Aligns item content to the top and opposite content to the bottom when the Timeline is in a horizontal orientation, or the content to the left and opposite content to the right when the Timeline is in a vertical orientation.
22
+ */
23
+ Before = "Before",
24
+ /**
25
+ * Aligns item content to the bottom and opposite content to the top when the Timeline is in a horizontal orientation, or the content to the right and opposite content to the left when the Timeline is in a vertical orientation.
26
+ */
27
+ After = "After",
28
+ /**
29
+ * Aligns item content alternatively, regardless of the Timeline's orientation.
30
+ */
31
+ Alternate = "Alternate",
32
+ /**
33
+ * Aligns item content in alternate reverse, regardless of the Timeline's orientation.
34
+ */
35
+ AlternateReverse = "AlternateReverse"
36
+ }
37
+ /**
38
+ * Specifies the items of the Timeline.
39
+ */
40
+ export declare class TimelineItem extends ChildProperty<TimelineItem> {
41
+ /**
42
+ * Defines one or more CSS classes to include an icon or image in the Timeline item.
43
+ *
44
+ * @default ''
45
+ */
46
+ dotCss: string;
47
+ /**
48
+ * Defines the text content or template for the Timeline item. The current itemIndex passed as context to build the content.
49
+ *
50
+ * @default ''
51
+ * @angularType string | object
52
+ * @reactType string | function | JSX.Element
53
+ * @vueType string | function
54
+ * @aspType string
55
+ */
56
+ content: string | Function;
57
+ /**
58
+ * Defines the additional text content or template to be displayed opposite side of the item. The current itemIndex passed as context to build the content.
59
+ *
60
+ * @default ''
61
+ * @angularType string | object
62
+ * @reactType string | function | JSX.Element
63
+ * @vueType string | function
64
+ * @aspType string
65
+ */
66
+ oppositeContent: string | Function;
67
+ /**
68
+ * Defines whether to enable or disable the timeline item.
69
+ *
70
+ * @default false
71
+ */
72
+ disabled: boolean;
73
+ /**
74
+ * Defines the CSS class to customize the Timeline item appearance.
75
+ *
76
+ * @default ''
77
+ */
78
+ cssClass: string;
79
+ }
80
+ /**
81
+ * Provides information about beforeItemRender event callback.
82
+ */
83
+ export interface TimelineRenderingEventArgs extends BaseEventArgs {
84
+ /**
85
+ * Provides the timeline element.
86
+ */
87
+ element: HTMLElement;
88
+ /**
89
+ * Provides the index of the current item.
90
+ */
91
+ index: number;
92
+ }
93
+ /**
94
+ * The Timeline component presents a series of events or activities in chronological order, allowing users to track the progression of time.
95
+ *
96
+ * ```html
97
+ * <div id="timeline"></div>
98
+ * ```
99
+ * ```typescript
100
+ * <script>
101
+ * let timelineObj: Timeline = new Timeline({items : [{}, {}, {}, {}, {}]});
102
+ * timelineObj.appendTo('#timeline');
103
+ * </script>
104
+ * ```
105
+ */
106
+ export declare class Timeline extends Component<HTMLElement> implements INotifyPropertyChanged {
107
+ /**
108
+ * Defines the orientation type of the Timeline.
109
+ *
110
+ * The possible values are:
111
+ * * Horizontal
112
+ * * vertical
113
+ *
114
+ * {% codeBlock src='timeline/orientation/index.md' %}{% endcodeBlock %}
115
+ *
116
+ * @isenumeration true
117
+ * @default TimelineOrientation.Vertical
118
+ * @asptype TimelineOrientation
119
+ */
120
+ orientation: string | TimelineOrientation;
121
+ /**
122
+ * Defines the alignment of item content within the Timeline.
123
+ *
124
+ * The possible values are:
125
+ * * Before
126
+ * * After
127
+ * * Alternate
128
+ * * AlternateReverse
129
+ *
130
+ * {% codeBlock src='timeline/align/index.md' %}{% endcodeBlock %}
131
+ *
132
+ * @isenumeration true
133
+ * @default TimelineAlign.After
134
+ * @asptype TimelineAlign
135
+ */
136
+ align: string | TimelineAlign;
137
+ /**
138
+ * Defines the list of items.
139
+ *
140
+ * @default []
141
+ */
142
+ items: TimelineItemModel[];
143
+ /**
144
+ * Defines the CSS class to customize the Timeline appearance.
145
+ *
146
+ * @default ''
147
+ */
148
+ cssClass: string;
149
+ /**
150
+ * Defines whether to show the timeline items in reverse order or not.
151
+ *
152
+ * @default false
153
+ */
154
+ reverse: boolean;
155
+ /**
156
+ * Defines the template content for each timeline item. The template context will contain the item model.
157
+ *
158
+ * {% codeBlock src='timeline/template/index.md' %}{% endcodeBlock %}
159
+ *
160
+ * @default ''
161
+ * @angularType string | object
162
+ * @reactType string | function | JSX.Element
163
+ * @vueType string | function
164
+ * @aspType string
165
+ */
166
+ template: string | Function;
167
+ /**
168
+ * Event callback that is raised after rendering the timeline.
169
+ *
170
+ * @event created
171
+ */
172
+ created: EmitType<Event>;
173
+ /**
174
+ * Event triggers before rendering each item.
175
+ *
176
+ * @event beforeItemRender
177
+ */
178
+ beforeItemRender: EmitType<TimelineRenderingEventArgs>;
179
+ private timelineListEle;
180
+ private templateFunction;
181
+ /**
182
+ * * Constructor for creating the Timeline component.
183
+ *
184
+ * @param {TimelineModel} options - Specifies the Timeline model.
185
+ * @param {string | HTMLElement} element - Specifies the element to render as component.
186
+ * @private
187
+ */
188
+ constructor(options?: TimelineModel, element?: string | HTMLElement);
189
+ protected preRender(): void;
190
+ /**
191
+ * To get component name.
192
+ *
193
+ * @returns {string} - It returns the current module name.
194
+ * @private
195
+ */
196
+ getModuleName(): string;
197
+ /**
198
+ * This method is abstract member of the Component<HTMLElement>.
199
+ *
200
+ * @private
201
+ * @returns {string} - It returns the persisted data.
202
+ */
203
+ protected getPersistData(): string;
204
+ protected render(): void;
205
+ protected updateOrientation(): void;
206
+ protected updateCssClass(addCss: string, removeCss?: string): void;
207
+ protected updateRtl(): void;
208
+ protected updateAlign(): void;
209
+ protected updateReverse(): void;
210
+ private renderItems;
211
+ private haveOneSidecontent;
212
+ private updateItemContent;
213
+ private updateTemplateFunction;
214
+ private renderItemContent;
215
+ private removeItemContent;
216
+ /**
217
+ * Gets template content based on the template property value.
218
+ *
219
+ * @param {string | Function} template - Template property value.
220
+ * @param {boolean} notCompile - Compile property value.
221
+ * @returns {Function} - Return template function.
222
+ * @hidden
223
+ */
224
+ private getTemplateFunction;
225
+ private removeItemElements;
226
+ private updateElementClassArray;
227
+ private updateContent;
228
+ destroy(): void;
229
+ private updateItems;
230
+ /**
231
+ * Called internally if any of the property value changed.
232
+ *
233
+ * @param {TimelineModel} newProp - Specifies new properties
234
+ * @param {TimelineModel} oldProp - Specifies old properties
235
+ * @returns {void}
236
+ * @private
237
+ */
238
+ onPropertyChanged(newProp: TimelineModel, oldProp?: TimelineModel): void;
239
+ }