@teamco/ischeduler-antd 2.0.1 → 2.0.10

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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +81 -0
  3. package/package.json +1 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ischeduler contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # @teamco/ischeduler-antd
2
+
3
+ iScheduler UI components for [React](https://reactjs.org) and [Ant Design](https://ant.design) v6.
4
+
5
+ Provides a complete scheduler form, a table list with CRUD actions, and a drawer-based creation flow — all driven by a headless core.
6
+
7
+ [![license](https://img.shields.io/npm/l/@teamco/ischeduler-antd.svg)](../../LICENSE)
8
+
9
+ ## Demo sandbox: [https://teamco.github.io/ischeduler/](https://teamco.github.io/ischeduler/?path=/story/ant-design-overview--overview-story)
10
+
11
+ <img width="1024" height="480" alt="Screenshot 2026-03-19 at 8 06 36" src="https://github.com/user-attachments/assets/38efdd68-fb5b-4c9c-9532-5848931605cf" />
12
+ <img width="1024" height="582" alt="Screenshot 2026-03-19 at 8 07 03" src="https://github.com/user-attachments/assets/ae0ede0f-a4ee-40a6-8c4a-fa34f0996bff" />
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install @teamco/ischeduler-core @teamco/ischeduler-antd
18
+ npm install react react-dom antd dayjs @ant-design/icons
19
+ ```
20
+
21
+ ## Quick Start (Form-based)
22
+
23
+ ```tsx
24
+ import { useState, useCallback } from 'react';
25
+ import { SchedulerProvider, ESchedulerPrefix, type IScheduler } from '@teamco/ischeduler-core';
26
+ import { SchedulersList } from '@teamco/ischeduler-antd';
27
+
28
+ function SchedulerPage() {
29
+ const [schedulers, setSchedulers] = useState({
30
+ [ESchedulerPrefix.SALE]: [] as IScheduler[],
31
+ [ESchedulerPrefix.DISCOUNT]: [] as IScheduler[],
32
+ [ESchedulerPrefix.TRIAL_DISCOUNT]: [] as IScheduler[],
33
+ });
34
+
35
+ const onCreate = useCallback(async (type: ESchedulerPrefix, scheduler: IScheduler) => {
36
+ const saved = await api.createScheduler(type, scheduler);
37
+ setSchedulers((prev) => ({ ...prev, [type]: [...prev[type], saved] }));
38
+ }, []);
39
+
40
+ const onUpdate = useCallback(async (type: ESchedulerPrefix, scheduler: IScheduler) => {
41
+ const updated = await api.updateScheduler(type, scheduler);
42
+ setSchedulers((prev) => ({
43
+ ...prev,
44
+ [type]: prev[type].map((s) => (s.id === updated.id ? updated : s)),
45
+ }));
46
+ }, []);
47
+
48
+ const onDelete = useCallback(async (type: ESchedulerPrefix, id: string) => {
49
+ await api.deleteScheduler(type, id);
50
+ setSchedulers((prev) => ({ ...prev, [type]: prev[type].filter((s) => s.id !== id) }));
51
+ }, []);
52
+
53
+ return (
54
+ <SchedulerProvider
55
+ schedulers={schedulers}
56
+ onCreate={onCreate}
57
+ onUpdate={onUpdate}
58
+ onDelete={onDelete}
59
+ permissions={{ canCreate: true, canUpdate: true, canDelete: true }}
60
+ >
61
+ <SchedulersList type={ESchedulerPrefix.SALE} />
62
+ <SchedulersList type={ESchedulerPrefix.DISCOUNT} currency="USD" />
63
+ <SchedulersList type={ESchedulerPrefix.TRIAL_DISCOUNT} />
64
+ </SchedulerProvider>
65
+ );
66
+ }
67
+ ```
68
+
69
+ ## Components
70
+
71
+ - **`Scheduler`** — Form for creating/editing a scheduler. Works with Ant Design `Form`.
72
+ - **`SchedulersList`** — Table with CRUD actions, column visibility toggle, and pagination.
73
+ - **`SchedulerDrawerButton`** — Button that opens a drawer with the `Scheduler` form.
74
+
75
+ ## Documentation
76
+
77
+ For architecture details, i18n customization, and more examples, visit the [main repository](https://github.com/teamco/ischeduler).
78
+
79
+ ## License
80
+
81
+ [MIT](../../LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamco/ischeduler-antd",
3
- "version": "2.0.1",
3
+ "version": "2.0.10",
4
4
  "description": "iScheduler UI components for React + Ant Design",
5
5
  "license": "MIT",
6
6
  "repository": {