@zeedhi/zd-calendar-common 1.7.1 → 1.7.3

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.
@@ -8,6 +8,7 @@ class Calendar extends ComponentRender {
8
8
  this.categoryDays = 1;
9
9
  this.categoryHideDynamic = false;
10
10
  this.categoryShowAll = false;
11
+ this.contentHeight = 600;
11
12
  this.color = 'primary';
12
13
  this.dayFormat = null;
13
14
  this.eventCategory = 'category';
@@ -61,6 +62,7 @@ class Calendar extends ComponentRender {
61
62
  this.categoryHideDynamic = this.getInitValue('categoryHideDynamic', props.categoryHideDynamic, this.categoryHideDynamic);
62
63
  this.categoryShowAll = this.getInitValue('categoryShowAll', props.categoryShowAll, this.categoryShowAll);
63
64
  this.categoryText = this.getInitValue('categoryText', props.categoryText, this.categoryText);
65
+ this.contentHeight = this.getInitValue('contentHeight', props.contentHeight, this.contentHeight);
64
66
  this.color = this.getInitValue('color', props.color, this.color);
65
67
  this.dayFormat = this.getInitValue('dayFormat', props.dayFormat, this.dayFormat);
66
68
  this.end = this.getInitValue('end', props.end, this.end);
@@ -112,7 +114,8 @@ class Calendar extends ComponentRender {
112
114
  if (!this.value)
113
115
  this.goToToday();
114
116
  }
115
- goToToday() {
117
+ goToToday(element, event) {
118
+ this.callEvent('clickToday', { event, element, component: this });
116
119
  const fmt = FormatterParserProvider.getFormatter('ZdDateTime');
117
120
  if (this.now) {
118
121
  this.value = fmt(this.now, { dateTimeFormat: 'YYYY-MM-DD HH:mm:ss', displayFormat: 'YYYY-MM-DD' });
@@ -245,7 +248,7 @@ Messages.add({
245
248
  CALENDAR_CLOSE: 'Close',
246
249
  },
247
250
  },
248
- 'es-ES': {
251
+ 'es-CL': {
249
252
  translation: {
250
253
  CALENDAR_MONTH: 'Mes',
251
254
  CALENDAR_DAY: 'Día',
@@ -11,6 +11,7 @@
11
11
  this.categoryDays = 1;
12
12
  this.categoryHideDynamic = false;
13
13
  this.categoryShowAll = false;
14
+ this.contentHeight = 600;
14
15
  this.color = 'primary';
15
16
  this.dayFormat = null;
16
17
  this.eventCategory = 'category';
@@ -64,6 +65,7 @@
64
65
  this.categoryHideDynamic = this.getInitValue('categoryHideDynamic', props.categoryHideDynamic, this.categoryHideDynamic);
65
66
  this.categoryShowAll = this.getInitValue('categoryShowAll', props.categoryShowAll, this.categoryShowAll);
66
67
  this.categoryText = this.getInitValue('categoryText', props.categoryText, this.categoryText);
68
+ this.contentHeight = this.getInitValue('contentHeight', props.contentHeight, this.contentHeight);
67
69
  this.color = this.getInitValue('color', props.color, this.color);
68
70
  this.dayFormat = this.getInitValue('dayFormat', props.dayFormat, this.dayFormat);
69
71
  this.end = this.getInitValue('end', props.end, this.end);
@@ -115,7 +117,8 @@
115
117
  if (!this.value)
116
118
  this.goToToday();
117
119
  }
118
- goToToday() {
120
+ goToToday(element, event) {
121
+ this.callEvent('clickToday', { event, element, component: this });
119
122
  const fmt = core.FormatterParserProvider.getFormatter('ZdDateTime');
120
123
  if (this.now) {
121
124
  this.value = fmt(this.now, { dateTimeFormat: 'YYYY-MM-DD HH:mm:ss', displayFormat: 'YYYY-MM-DD' });
@@ -248,7 +251,7 @@
248
251
  CALENDAR_CLOSE: 'Close',
249
252
  },
250
253
  },
251
- 'es-ES': {
254
+ 'es-CL': {
252
255
  translation: {
253
256
  CALENDAR_MONTH: 'Mes',
254
257
  CALENDAR_DAY: 'Día',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeedhi/zd-calendar-common",
3
- "version": "1.7.1",
3
+ "version": "1.7.3",
4
4
  "description": "Powered by Zeedhi",
5
5
  "main": "dist/calendar-common.umd.js",
6
6
  "module": "dist/calendar-common.esm.js",
@@ -23,5 +23,5 @@
23
23
  "@zeedhi/common": "^1.57.0",
24
24
  "@zeedhi/core": "^1.57.0"
25
25
  },
26
- "gitHead": "62fc3dc159f0e936e6a4c1ded69880d28b537743"
26
+ "gitHead": "babf9128218e441b057767e218a90828a40b8cfb"
27
27
  }
@@ -1,14 +1,15 @@
1
1
  import { ComponentRender } from '@zeedhi/common';
2
2
  import { ICalendar, CalendarEvents, ICalendarEvents } from './interfaces';
3
3
  export declare class Calendar extends ComponentRender implements ICalendar {
4
- showHeader?: boolean;
5
4
  title?: string;
5
+ showHeader?: boolean;
6
6
  categories?: string | [];
7
7
  categoryDays?: number | string;
8
8
  categoryForInvalid?: string;
9
9
  categoryHideDynamic?: boolean | string;
10
10
  categoryShowAll?: boolean | string;
11
11
  categoryText?: string | Function;
12
+ contentHeight?: number | string;
12
13
  color?: string;
13
14
  dayFormat?: Function | null;
14
15
  end?: string | number | Date;
@@ -63,7 +64,7 @@ export declare class Calendar extends ComponentRender implements ICalendar {
63
64
  */
64
65
  events: ICalendarEvents;
65
66
  constructor(props: ICalendar);
66
- goToToday(): void;
67
+ goToToday(element?: any, event?: Event): void;
67
68
  beforeNext(element: any, event?: Event): void;
68
69
  /**
69
70
  * Event triggered when the current slide changes.
@@ -34,6 +34,7 @@ export interface ICalendarEvents<T = ICalendarEventParam | IEventParam<any>> ext
34
34
  clickInterval?: IEvent<T> | string;
35
35
  clickTime?: IEvent<T> | string;
36
36
  clickTimeCategory?: IEvent<T> | string;
37
+ clickToday?: IEvent<T> | string;
37
38
  moved?: IEvent<T> | string;
38
39
  }
39
40
  export declare type CalendarEvents = {
@@ -57,6 +58,7 @@ export interface ICalendar extends IComponentRender {
57
58
  categoryText?: string | Function;
58
59
  canEditEvent?: ((event: CalendarEvents) => boolean) | boolean;
59
60
  canDeleteEvent?: ((event: CalendarEvents) => boolean) | boolean;
61
+ contentHeight?: number | string;
60
62
  color?: string;
61
63
  dayFormat?: Function | null;
62
64
  end?: string | number | Date;