@forcecalendar/interface 1.0.3 → 1.0.5
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/force-calendar-interface.esm.js +1474 -1474
- package/dist/force-calendar-interface.esm.js.map +1 -1
- package/dist/force-calendar-interface.umd.js +7 -7
- package/dist/force-calendar-interface.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/EventForm.js +2 -2
- package/src/components/ForceCalendar.js +13 -13
- package/README.md +0 -74
package/package.json
CHANGED
|
@@ -414,6 +414,6 @@ export class EventForm extends BaseComponent {
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
-
if (!customElements.get('
|
|
418
|
-
customElements.define('
|
|
417
|
+
if (!customElements.get('forcecal-event-form')) {
|
|
418
|
+
customElements.define('forcecal-event-form', EventForm);
|
|
419
419
|
}
|
|
@@ -17,14 +17,14 @@ import { DayView } from './views/DayView.js';
|
|
|
17
17
|
import { EventForm } from './EventForm.js'; // Import EventForm
|
|
18
18
|
|
|
19
19
|
// Register view components
|
|
20
|
-
if (!customElements.get('
|
|
21
|
-
customElements.define('
|
|
20
|
+
if (!customElements.get('forcecal-month')) {
|
|
21
|
+
customElements.define('forcecal-month', MonthView);
|
|
22
22
|
}
|
|
23
|
-
if (!customElements.get('
|
|
24
|
-
customElements.define('
|
|
23
|
+
if (!customElements.get('forcecal-week')) {
|
|
24
|
+
customElements.define('forcecal-week', WeekView);
|
|
25
25
|
}
|
|
26
|
-
if (!customElements.get('
|
|
27
|
-
customElements.define('
|
|
26
|
+
if (!customElements.get('forcecal-day')) {
|
|
27
|
+
customElements.define('forcecal-day', DayView);
|
|
28
28
|
}
|
|
29
29
|
// EventForm is self-registering in its file
|
|
30
30
|
|
|
@@ -273,9 +273,9 @@ export class ForceCalendar extends BaseComponent {
|
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
/* Ensure view components have proper dimensions */
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
276
|
+
forcecal-month,
|
|
277
|
+
forcecal-week,
|
|
278
|
+
forcecal-day {
|
|
279
279
|
display: block;
|
|
280
280
|
width: 100%;
|
|
281
281
|
height: 100%;
|
|
@@ -415,7 +415,7 @@ export class ForceCalendar extends BaseComponent {
|
|
|
415
415
|
`}
|
|
416
416
|
</div>
|
|
417
417
|
|
|
418
|
-
<
|
|
418
|
+
<forcecal-event-form id="event-modal"></forcecal-event-form>
|
|
419
419
|
</div>
|
|
420
420
|
`;
|
|
421
421
|
}
|
|
@@ -425,7 +425,7 @@ export class ForceCalendar extends BaseComponent {
|
|
|
425
425
|
return '<div>Loading view...</div>';
|
|
426
426
|
}
|
|
427
427
|
|
|
428
|
-
const tagName = `
|
|
428
|
+
const tagName = `forcecal-${this.currentView}`;
|
|
429
429
|
return `<${tagName} id="calendar-view"></${tagName}>`;
|
|
430
430
|
}
|
|
431
431
|
|
|
@@ -585,6 +585,6 @@ export class ForceCalendar extends BaseComponent {
|
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
// Register component
|
|
588
|
-
if (!customElements.get('
|
|
589
|
-
customElements.define('
|
|
588
|
+
if (!customElements.get('forcecal-main')) {
|
|
589
|
+
customElements.define('forcecal-main', ForceCalendar);
|
|
590
590
|
}
|
package/README.md
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# forceCalendar Interface
|
|
2
|
-
|
|
3
|
-
Enterprise-grade calendar UI components powered by [@forcecalendar/core](https://www.npmjs.com/package/@forcecalendar/core).
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
forceCalendar Interface provides production-ready calendar components built as Web Components, making them framework-agnostic and compatible with any JavaScript environment - including sandboxed environments like Salesforce Lightning Web Components.
|
|
8
|
-
|
|
9
|
-
## Features
|
|
10
|
-
|
|
11
|
-
- **Powered by NPM Package** - Uses @forcecalendar/core for all calendar logic
|
|
12
|
-
- **Multiple Views** - Month, Week, and Day views
|
|
13
|
-
- **Web Components** - Works with React, Vue, Angular, or vanilla JS
|
|
14
|
-
- **Enterprise Design** - Clean, professional, optimized for business use
|
|
15
|
-
- **High Performance** - Leverages spatial indexing for instant rendering
|
|
16
|
-
- **Salesforce Ready** - Works in LWC and other sandboxed environments
|
|
17
|
-
|
|
18
|
-
## Installation
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
npm install @forcecalendar/interface
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Quick Start
|
|
25
|
-
|
|
26
|
-
### HTML (via CDN)
|
|
27
|
-
```html
|
|
28
|
-
<!DOCTYPE html>
|
|
29
|
-
<html>
|
|
30
|
-
<head>
|
|
31
|
-
<script type="module">
|
|
32
|
-
import 'https://unpkg.com/@forcecalendar/interface@latest';
|
|
33
|
-
</script>
|
|
34
|
-
</head>
|
|
35
|
-
<body>
|
|
36
|
-
<force-calendar view="month"></force-calendar>
|
|
37
|
-
</body>
|
|
38
|
-
</html>
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### JavaScript (ES Modules)
|
|
42
|
-
```javascript
|
|
43
|
-
import '@forcecalendar/interface';
|
|
44
|
-
|
|
45
|
-
// The component auto-registers as a web component
|
|
46
|
-
const calendar = document.createElement('force-calendar');
|
|
47
|
-
calendar.setAttribute('view', 'month');
|
|
48
|
-
document.body.appendChild(calendar);
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### JavaScript (CommonJS/Node.js)
|
|
52
|
-
```javascript
|
|
53
|
-
require('@forcecalendar/interface');
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Demo
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
npm install
|
|
60
|
-
npm run build
|
|
61
|
-
npx http-server . -p 8080
|
|
62
|
-
# Open http://localhost:8080/demo.html
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Or for development:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
npm run dev
|
|
69
|
-
# Opens development server with hot reload
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## License
|
|
73
|
-
|
|
74
|
-
MIT
|