@forcecalendar/core 0.3.0 → 0.3.1

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.
@@ -142,6 +142,14 @@ export class Calendar {
142
142
  });
143
143
  }
144
144
 
145
+ /**
146
+ * Alias for goToDate (compat)
147
+ * @param {Date} date - The date to navigate to
148
+ */
149
+ setDate(date) {
150
+ this.goToDate(date);
151
+ }
152
+
145
153
  /**
146
154
  * Get the current date
147
155
  * @returns {Date}
@@ -199,6 +207,15 @@ export class Calendar {
199
207
  return removed;
200
208
  }
201
209
 
210
+ /**
211
+ * Alias for removeEvent (compat)
212
+ * @param {string} eventId - The event ID
213
+ * @returns {boolean} True if removed
214
+ */
215
+ deleteEvent(eventId) {
216
+ return this.removeEvent(eventId);
217
+ }
218
+
202
219
  /**
203
220
  * Get an event by ID
204
221
  * @param {string} eventId - The event ID
@@ -281,6 +298,26 @@ export class Calendar {
281
298
  return this.config.timeZone;
282
299
  }
283
300
 
301
+ /**
302
+ * Set the calendar locale
303
+ * @param {string} locale - Locale identifier (e.g. 'en-US')
304
+ */
305
+ setLocale(locale) {
306
+ this.config.locale = locale;
307
+ this.state.setState({ locale });
308
+ this._emit('localeChange', { locale });
309
+ }
310
+
311
+ /**
312
+ * Set the week start day
313
+ * @param {number} weekStartsOn - 0 = Sunday, 1 = Monday, etc.
314
+ */
315
+ setWeekStartsOn(weekStartsOn) {
316
+ this.config.weekStartsOn = weekStartsOn;
317
+ this.state.setState({ weekStartsOn });
318
+ this._emit('weekStartsOnChange', { weekStartsOn });
319
+ }
320
+
284
321
  /**
285
322
  * Convert a date from one timezone to another
286
323
  * @param {Date} date - Date to convert
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forcecalendar/core",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "A modern, lightweight, framework-agnostic calendar engine optimized for Salesforce",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "repository": {
26
26
  "type": "git",
27
- "url": "git+https://github.com/ForceCalendar/force-calendar-core.git"
27
+ "url": "git+https://github.com/forceCalendar/core.git"
28
28
  },
29
29
  "keywords": [
30
30
  "calendar",
@@ -40,9 +40,9 @@
40
40
  "author": "",
41
41
  "license": "MIT",
42
42
  "bugs": {
43
- "url": "https://github.com/ForceCalendar/force-calendar-core/issues"
43
+ "url": "https://github.com/forceCalendar/core/issues"
44
44
  },
45
- "homepage": "https://github.com/ForceCalendar/force-calendar-core#readme",
45
+ "homepage": "https://github.com/forceCalendar/core#readme",
46
46
  "devDependencies": {
47
47
  "@babel/core": "^7.23.0",
48
48
  "@babel/preset-env": "^7.23.0",