@isma91/react-scheduler 4.0.5 → 4.0.7

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 (79) hide show
  1. package/dist/package.json +6 -6
  2. package/package.json +9 -7
  3. package/.github/workflows/publish.yml +0 -29
  4. package/.github/workflows/tests.yml +0 -35
  5. package/.gitignore +0 -32
  6. package/.husky/pre-commit +0 -2
  7. package/.prettierignore +0 -1
  8. package/.prettierrc.json +0 -7
  9. package/.yarnrc.yml +0 -1
  10. package/eslint.config.js +0 -79
  11. package/index.html +0 -41
  12. package/isma91-react-scheduler-4.0.5.tgz +0 -0
  13. package/jest.config.ts +0 -194
  14. package/public/favicon.ico +0 -0
  15. package/public/logo192.png +0 -0
  16. package/public/logo512.png +0 -0
  17. package/public/manifest.json +0 -25
  18. package/public/robots.txt +0 -3
  19. package/scripts/post-pack.js +0 -34
  20. package/src/App.tsx +0 -25
  21. package/src/Page1.tsx +0 -67
  22. package/src/events.tsx +0 -227
  23. package/src/index.tsx +0 -21
  24. package/src/lib/SchedulerComponent.tsx +0 -78
  25. package/src/lib/__tests__/index.test.tsx +0 -24
  26. package/src/lib/components/common/Cell.tsx +0 -52
  27. package/src/lib/components/common/LocaleArrow.tsx +0 -38
  28. package/src/lib/components/common/ResourceHeader.tsx +0 -73
  29. package/src/lib/components/common/Tabs.tsx +0 -119
  30. package/src/lib/components/common/TodayTypo.tsx +0 -44
  31. package/src/lib/components/common/WithResources.tsx +0 -98
  32. package/src/lib/components/events/Actions.tsx +0 -65
  33. package/src/lib/components/events/AgendaEventsList.tsx +0 -126
  34. package/src/lib/components/events/CurrentTimeBar.tsx +0 -59
  35. package/src/lib/components/events/EmptyAgenda.tsx +0 -27
  36. package/src/lib/components/events/EventItem.tsx +0 -180
  37. package/src/lib/components/events/EventItemPopover.tsx +0 -179
  38. package/src/lib/components/events/MonthEvents.tsx +0 -141
  39. package/src/lib/components/events/TodayEvents.tsx +0 -99
  40. package/src/lib/components/hoc/DateProvider.tsx +0 -19
  41. package/src/lib/components/inputs/DatePicker.tsx +0 -95
  42. package/src/lib/components/inputs/Input.tsx +0 -113
  43. package/src/lib/components/inputs/SelectInput.tsx +0 -164
  44. package/src/lib/components/month/MonthTable.tsx +0 -207
  45. package/src/lib/components/nav/DayDateBtn.tsx +0 -77
  46. package/src/lib/components/nav/MonthDateBtn.tsx +0 -80
  47. package/src/lib/components/nav/Navigation.tsx +0 -201
  48. package/src/lib/components/nav/WeekDateBtn.tsx +0 -89
  49. package/src/lib/components/week/WeekTable.tsx +0 -229
  50. package/src/lib/helpers/constants.ts +0 -4
  51. package/src/lib/helpers/generals.tsx +0 -354
  52. package/src/lib/hooks/useArrowDisable.ts +0 -26
  53. package/src/lib/hooks/useCellAttributes.ts +0 -67
  54. package/src/lib/hooks/useDragAttributes.ts +0 -31
  55. package/src/lib/hooks/useEventPermissions.ts +0 -42
  56. package/src/lib/hooks/useStore.ts +0 -8
  57. package/src/lib/hooks/useSyncScroll.ts +0 -31
  58. package/src/lib/hooks/useWindowResize.ts +0 -37
  59. package/src/lib/index.tsx +0 -14
  60. package/src/lib/positionManger/context.ts +0 -14
  61. package/src/lib/positionManger/provider.tsx +0 -113
  62. package/src/lib/positionManger/usePosition.ts +0 -8
  63. package/src/lib/store/context.ts +0 -5
  64. package/src/lib/store/default.ts +0 -159
  65. package/src/lib/store/provider.tsx +0 -226
  66. package/src/lib/store/types.ts +0 -40
  67. package/src/lib/styles/styles.ts +0 -256
  68. package/src/lib/types.ts +0 -429
  69. package/src/lib/views/Day.tsx +0 -272
  70. package/src/lib/views/DayAgenda.tsx +0 -57
  71. package/src/lib/views/Editor.tsx +0 -258
  72. package/src/lib/views/Month.tsx +0 -82
  73. package/src/lib/views/MonthAgenda.tsx +0 -84
  74. package/src/lib/views/Week.tsx +0 -92
  75. package/src/lib/views/WeekAgenda.tsx +0 -81
  76. package/src/vite-env.d.ts +0 -3
  77. package/tsconfig.build.json +0 -5
  78. package/tsconfig.json +0 -27
  79. package/vite.config.js +0 -40
package/dist/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@isma91/react-scheduler",
3
- "version": "4.0.5",
3
+ "version": "4.0.7",
4
4
  "description": "React scheduler component based on Material-UI & date-fns",
5
5
  "files": [
6
- "*"
6
+ "dist"
7
7
  ],
8
8
  "type": "module",
9
+ "main": "dist/index.js",
10
+ "types": "dist/index.d.ts",
9
11
  "exports": {
10
- "./types": {
11
- "import": "./types.d.ts"
12
- },
13
12
  ".": {
14
- "import": "./index.js"
13
+ "import": "./dist/index.js",
14
+ "types": "./dist/index.d.ts"
15
15
  }
16
16
  },
17
17
  "repository": {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@isma91/react-scheduler",
3
- "version": "4.0.5",
3
+ "version": "4.0.7",
4
4
  "description": "React scheduler component based on Material-UI & date-fns",
5
5
  "files": [
6
- "*"
6
+ "dist"
7
7
  ],
8
8
  "type": "module",
9
9
  "scripts": {
@@ -20,14 +20,16 @@
20
20
  "pre:commit": "lint-staged",
21
21
  "test": "jest",
22
22
  "test:watch": "jest --watch",
23
- "test:ci": "jest --ci"
23
+ "test:ci": "jest --ci",
24
+ "check:dist": "node ./scripts/check-dist.mjs",
25
+ "prepublishOnly": "npm run build && npm run check:dist && npm pack --dry-run"
24
26
  },
27
+ "main": "dist/index.js",
28
+ "types": "dist/index.d.ts",
25
29
  "exports": {
26
- "./types": {
27
- "import": "./types.d.ts"
28
- },
29
30
  ".": {
30
- "import": "./index.js"
31
+ "import": "./dist/index.js",
32
+ "types": "./dist/index.d.ts"
31
33
  }
32
34
  },
33
35
  "lint-staged": {
@@ -1,29 +0,0 @@
1
- name: npm publish
2
- on:
3
- release:
4
- types: [created]
5
- jobs:
6
- publish:
7
- runs-on: ubuntu-latest
8
- steps:
9
- - name: Checkout
10
- uses: actions/checkout@v4
11
-
12
- - name: Setup Node
13
- uses: actions/setup-node@v4
14
- with:
15
- node-version: 20
16
- registry-url: https://registry.npmjs.org/
17
-
18
- - name: Install
19
- run: npm install
20
-
21
- - name: Pack
22
- run: npm run build
23
-
24
- - name: Publish
25
- run: |
26
- cd dist
27
- npm publish
28
- env:
29
- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
@@ -1,35 +0,0 @@
1
- name: Tests
2
- on:
3
- pull_request:
4
- branches: ["master"]
5
- jobs:
6
- Install:
7
- runs-on: ubuntu-latest
8
- strategy:
9
- matrix:
10
- node-version: [20.x, 22.x]
11
-
12
- steps:
13
- - name: Checkout
14
- uses: actions/checkout@v4
15
-
16
- - name: Create lock file
17
- run: touch package-lock.json
18
-
19
- - name: Use Node.js ${{ matrix.node-version }}
20
- uses: actions/setup-node@v4
21
- with:
22
- node-version: ${{ matrix.node-version }}
23
- cache: "npm"
24
-
25
- - name: Install
26
- run: npm install
27
-
28
- - name: Format
29
- run: npm run format:write
30
-
31
- - name: Lint
32
- run: npm run lint
33
-
34
- - name: Test
35
- run: npm run test:ci
package/.gitignore DELETED
@@ -1,32 +0,0 @@
1
- #
2
- dist
3
- .vscode
4
- examples
5
-
6
- #yarn
7
- .yarn
8
- yarn.lock
9
-
10
- # dependencies
11
- /node_modules
12
- package-lock.json
13
- /.pnp
14
- .pnp.js
15
-
16
- # testing
17
- /coverage
18
- *.tgz
19
-
20
- # production
21
- /build
22
-
23
- # misc
24
- .DS_Store
25
- .env.local
26
- .env.development.local
27
- .env.test.local
28
- .env.production.local
29
-
30
- npm-debug.log*
31
- yarn-debug.log*
32
- yarn-error.log*
package/.husky/pre-commit DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env sh
2
- npm run pre:commit
package/.prettierignore DELETED
@@ -1 +0,0 @@
1
- dist
package/.prettierrc.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "trailingComma": "es5",
3
- "tabWidth": 2,
4
- "singleQuote": false,
5
- "endOfLine": "lf",
6
- "printWidth": 100
7
- }
package/.yarnrc.yml DELETED
@@ -1 +0,0 @@
1
- nodeLinker: node-modules
package/eslint.config.js DELETED
@@ -1,79 +0,0 @@
1
- import react from "eslint-plugin-react";
2
- import tseslint, { configs as tseslintConfigs } from "typescript-eslint";
3
- import globals from "globals";
4
- import js from "@eslint/js";
5
- import * as reactHooks from "eslint-plugin-react-hooks";
6
- import reactRefresh from "eslint-plugin-react-refresh";
7
- import pluginImport from "eslint-plugin-import";
8
- import pluginJsxA11y from "eslint-plugin-jsx-a11y";
9
- import pluginPromise from "eslint-plugin-promise";
10
-
11
- export default tseslint.config(
12
- { ignores: ["jest.config.ts", "scripts", "dist", "vite.config.js"] },
13
- pluginJsxA11y.flatConfigs.recommended,
14
- pluginPromise.configs["flat/recommended"],
15
- pluginImport.flatConfigs.recommended,
16
- {
17
- extends: [js.configs.recommended, ...tseslintConfigs.recommended],
18
- plugins: {
19
- "react-hooks": reactHooks,
20
- "react-refresh": reactRefresh,
21
- react,
22
- },
23
- files: ["**/*.{ts,tsx}"],
24
- languageOptions: {
25
- globals: {
26
- ...globals.browser,
27
- React: "readonly",
28
- },
29
- ecmaVersion: "latest",
30
- sourceType: "module",
31
- },
32
-
33
- settings: {
34
- react: {
35
- version: "detect",
36
- },
37
- },
38
-
39
- rules: {
40
- ...reactHooks.configs.recommended.rules,
41
- "linebreak-style": ["error", "unix"],
42
-
43
- quotes: [
44
- "error",
45
- "double",
46
- {
47
- allowTemplateLiterals: true,
48
- },
49
- ],
50
-
51
- semi: ["error", "always"],
52
- "@typescript-eslint/no-non-null-assertion": 0,
53
- "no-useless-catch": 0,
54
- "@typescript-eslint/no-explicit-any": 0,
55
- "@typescript-eslint/no-non-null-asserted-optional-chain": 0,
56
- "no-case-declarations": 0,
57
- "@typescript-eslint/no-empty-interface": 0,
58
- "@typescript-eslint/no-empty-function": 0,
59
- "@typescript-eslint/no-empty-object-type": [
60
- "error",
61
- { allowInterfaces: "with-single-extends" },
62
- ],
63
- },
64
- },
65
- {
66
- // Checks importing of different files
67
- settings: {
68
- "import/parsers": {
69
- "@typescript-eslint/parser": [".ts", ".tsx"],
70
- },
71
- "import/resolver": {
72
- typescript: {
73
- alwaysTryTypes: true,
74
- project: "./",
75
- },
76
- },
77
- },
78
- }
79
- );
package/index.html DELETED
@@ -1,41 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en" dir="ltr">
3
- <head>
4
- <meta charset="utf-8" />
5
- <link rel="icon" href="/favicon.ico" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1" />
7
- <meta name="theme-color" content="#000000" />
8
- <meta name="description" content="Web site created using create-react-app" />
9
- <link rel="apple-touch-icon" href="/logo192.png" />
10
- <!--
11
- manifest.json provides metadata used when your web app is installed on a
12
- user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
13
- -->
14
- <link rel="manifest" href="/manifest.json" />
15
- <!--
16
- Notice the use of in the tags above.
17
- It will be replaced with the URL of the `public` folder during the build.
18
- Only files inside the `public` folder can be referenced from the HTML.
19
-
20
- Unlike "/favicon.ico" or "favicon.ico", "/favicon.ico" will
21
- work correctly both with client-side routing and a non-root public URL.
22
- Learn how to configure a non-root public URL by running `npm run build`.
23
- -->
24
- <title>React App</title>
25
- </head>
26
- <body>
27
- <noscript>You need to enable JavaScript to run this app.</noscript>
28
- <div id="root"></div>
29
- <!--
30
- This HTML file is a template.
31
- If you open it directly in the browser, you will see an empty page.
32
-
33
- You can add webfonts, meta tags, or analytics to this file.
34
- The build step will place the bundled scripts into the <body> tag.
35
-
36
- To begin the development, run `npm start` or `yarn start`.
37
- To create a production bundle, use `npm run build` or `yarn build`.
38
- -->
39
- <script type="module" src="/src/index.tsx"></script>
40
- </body>
41
- </html>
Binary file
package/jest.config.ts DELETED
@@ -1,194 +0,0 @@
1
- /*
2
- * For a detailed explanation regarding each configuration property and type check, visit:
3
- * https://jestjs.io/docs/configuration
4
- */
5
-
6
- export default {
7
- // All imported modules in your tests should be mocked automatically
8
- // automock: false,
9
-
10
- // Stop running tests after `n` failures
11
- // bail: 0,
12
-
13
- // The directory where Jest should store its cached dependency information
14
- // cacheDirectory: "/tmp/jest_rs",
15
-
16
- // Automatically clear mock calls, instances and results before every test
17
- // clearMocks: false,
18
-
19
- // Indicates whether the coverage information should be collected while executing the test
20
- // collectCoverage: false,
21
-
22
- // An array of glob patterns indicating a set of files for which coverage information should be collected
23
- // collectCoverageFrom: undefined,
24
-
25
- // The directory where Jest should output its coverage files
26
- // coverageDirectory: undefined,
27
-
28
- // An array of regexp pattern strings used to skip coverage collection
29
- // coveragePathIgnorePatterns: [
30
- // "/node_modules/"
31
- // ],
32
-
33
- // Indicates which provider should be used to instrument code for coverage
34
- // coverageProvider: "babel",
35
-
36
- // A list of reporter names that Jest uses when writing coverage reports
37
- // coverageReporters: [
38
- // "json",
39
- // "text",
40
- // "lcov",
41
- // "clover"
42
- // ],
43
-
44
- // An object that configures minimum threshold enforcement for coverage results
45
- // coverageThreshold: undefined,
46
-
47
- // A path to a custom dependency extractor
48
- // dependencyExtractor: undefined,
49
-
50
- // Make calling deprecated APIs throw helpful error messages
51
- // errorOnDeprecated: false,
52
-
53
- // Force coverage collection from ignored files using an array of glob patterns
54
- // forceCoverageMatch: [],
55
-
56
- // A path to a module which exports an async function that is triggered once before all test suites
57
- // globalSetup: undefined,
58
-
59
- // A path to a module which exports an async function that is triggered once after all test suites
60
- // globalTeardown: undefined,
61
-
62
- // A set of global variables that need to be available in all test environments
63
- // globals: {},
64
-
65
- // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
66
- // maxWorkers: "50%",
67
-
68
- // An array of directory names to be searched recursively up from the requiring module's location
69
- // moduleDirectories: [
70
- // "node_modules"
71
- // ],
72
-
73
- // An array of file extensions your modules use
74
- // moduleFileExtensions: [
75
- // "js",
76
- // "jsx",
77
- // "ts",
78
- // "tsx",
79
- // "json",
80
- // "node"
81
- // ],
82
-
83
- // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
84
- // moduleNameMapper: {},
85
-
86
- // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
87
- // modulePathIgnorePatterns: [],
88
-
89
- // Activates notifications for test results
90
- // notify: false,
91
-
92
- // An enum that specifies notification mode. Requires { notify: true }
93
- // notifyMode: "failure-change",
94
-
95
- // A preset that is used as a base for Jest's configuration
96
- // preset: undefined,
97
-
98
- // Run tests from one or more projects
99
- // projects: undefined,
100
-
101
- // Use this configuration option to add custom reporters to Jest
102
- // reporters: undefined,
103
-
104
- // Automatically reset mock state before every test
105
- // resetMocks: false,
106
-
107
- // Reset the module registry before running each individual test
108
- // resetModules: false,
109
-
110
- // A path to a custom resolver
111
- // resolver: undefined,
112
-
113
- // Automatically restore mock state and implementation before every test
114
- // restoreMocks: false,
115
-
116
- // The root directory that Jest should scan for tests and modules within
117
- // rootDir: undefined,
118
-
119
- // A list of paths to directories that Jest should use to search for files in
120
- roots: ["<rootDir>/src"],
121
-
122
- // Allows you to use a custom runner instead of Jest's default test runner
123
- // runner: "jest-runner",
124
-
125
- // The paths to modules that run some code to configure or set up the testing environment before each test
126
- // setupFiles: [],
127
-
128
- // A list of paths to modules that run some code to configure or set up the testing framework before each test
129
- // setupFilesAfterEnv: [],
130
-
131
- // The number of seconds after which a test is considered as slow and reported as such in the results.
132
- // slowTestThreshold: 5,
133
-
134
- // A list of paths to snapshot serializer modules Jest should use for snapshot testing
135
- // snapshotSerializers: [],
136
-
137
- // The test environment that will be used for testing
138
- testEnvironment: "jest-environment-jsdom",
139
-
140
- // Options that will be passed to the testEnvironment
141
- // testEnvironmentOptions: {},
142
-
143
- // Adds a location field to test results
144
- // testLocationInResults: false,
145
-
146
- // The glob patterns Jest uses to detect test files
147
- // testMatch: [
148
- // "**/__tests__/**/*.[jt]s?(x)",
149
- // "**/?(*.)+(spec|test).[tj]s?(x)"
150
- // ],
151
-
152
- // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
153
- // testPathIgnorePatterns: [
154
- // "/node_modules/"
155
- // ],
156
-
157
- // The regexp pattern or array of patterns that Jest uses to detect test files
158
- // testRegex: [],
159
-
160
- // This option allows the use of a custom results processor
161
- // testResultsProcessor: undefined,
162
-
163
- // This option allows use of a custom test runner
164
- // testRunner: "jest-circus/runner",
165
-
166
- // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
167
- // testURL: "http://localhost",
168
-
169
- // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
170
- // timers: "real",
171
-
172
- // A map from regular expressions to paths to transformers
173
- transform: {
174
- "^.+\\.(ts|js)x?$": "ts-jest",
175
- },
176
-
177
- // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
178
- // transformIgnorePatterns: [
179
- // "/node_modules/",
180
- // "\\.pnp\\.[^\\/]+$"
181
- // ],
182
-
183
- // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
184
- // unmockedModulePathPatterns: undefined,
185
-
186
- // Indicates whether each individual test should be reported during the run
187
- // verbose: undefined,
188
-
189
- // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
190
- // watchPathIgnorePatterns: [],
191
-
192
- // Whether to use watchman for file crawling
193
- // watchman: true,
194
- };
Binary file
Binary file
Binary file
@@ -1,25 +0,0 @@
1
- {
2
- "short_name": "React App",
3
- "name": "Create React App Sample",
4
- "icons": [
5
- {
6
- "src": "favicon.ico",
7
- "sizes": "64x64 32x32 24x24 16x16",
8
- "type": "image/x-icon"
9
- },
10
- {
11
- "src": "logo192.png",
12
- "type": "image/png",
13
- "sizes": "192x192"
14
- },
15
- {
16
- "src": "logo512.png",
17
- "type": "image/png",
18
- "sizes": "512x512"
19
- }
20
- ],
21
- "start_url": ".",
22
- "display": "standalone",
23
- "theme_color": "#000000",
24
- "background_color": "#ffffff"
25
- }
package/public/robots.txt DELETED
@@ -1,3 +0,0 @@
1
- # https://www.robotstxt.org/robotstxt.html
2
- User-agent: *
3
- Disallow:
@@ -1,34 +0,0 @@
1
- import fs from "node:fs";
2
- import path from "node:path";
3
-
4
- const init = async () => {
5
- try {
6
- const base = path.resolve("");
7
- const files = ["LICENSE", "README.md"];
8
- for (const file of files) {
9
- await fs.promises.copyFile(path.join(base, file), path.join(base, "dist", file));
10
- }
11
-
12
- // clean up package.json on the fly
13
- const pkg = await fs.promises.readFile(path.join(base, "package.json"), {
14
- encoding: "utf-8",
15
- });
16
- const obj = JSON.parse(pkg);
17
- delete obj.scripts;
18
- delete obj.devDependencies;
19
- delete obj["lint-staged"];
20
- obj.homepage = "https://github.com/aldabil21/react-scheduler#readme";
21
-
22
- await fs.promises.writeFile(
23
- path.join(base, "dist", "package.json"),
24
- JSON.stringify(obj, null, 2),
25
- {
26
- encoding: "utf-8",
27
- }
28
- );
29
- } catch (error) {
30
- throw error;
31
- }
32
- };
33
-
34
- init();
package/src/App.tsx DELETED
@@ -1,25 +0,0 @@
1
- import { Scheduler } from "./lib";
2
- import { EVENTS } from "./events";
3
- import { useRef } from "react";
4
- import { SchedulerRef } from "./lib/types";
5
- import { Link } from "react-router-dom";
6
-
7
- function App() {
8
- const calendarRef = useRef<SchedulerRef>(null);
9
-
10
- return (
11
- <>
12
- <div>
13
- <Link to="/1">Go to page 1</Link>
14
- </div>
15
-
16
- <Scheduler
17
- ref={calendarRef}
18
- events={EVENTS}
19
- // events={generateRandomEvents(200)}
20
- />
21
- </>
22
- );
23
- }
24
-
25
- export default App;
package/src/Page1.tsx DELETED
@@ -1,67 +0,0 @@
1
- import { Scheduler } from "./lib";
2
- import { EVENTS } from "./events";
3
- import { useCallback, useRef, useState } from "react";
4
- import { SchedulerRef } from "./lib/types";
5
- import { Link } from "react-router-dom";
6
- import { Button } from "@mui/material";
7
-
8
- function Page1() {
9
- const calendarRef = useRef<SchedulerRef>(null);
10
- const [loading, setLoading] = useState(false);
11
-
12
- const handleRefresh = () => {
13
- setLoading(true);
14
- setTimeout(() => {
15
- setLoading(false);
16
- }, 2000);
17
- };
18
-
19
- const customHeader = useCallback(
20
- () => <Button onClick={handleRefresh}>{loading ? "LOADING..." : "Refresh"}</Button>,
21
- [loading, handleRefresh]
22
- );
23
-
24
- return (
25
- <>
26
- <div style={{ height: "200vh" }}>
27
- <div>
28
- <Link to="/">Go to home</Link>
29
- <button onClick={() => setLoading((prev) => !prev)}>
30
- Toggle Loading ({loading ? "ON" : "OFF"})
31
- </button>
32
- </div>
33
-
34
- <div style={{ marginTop: "50px" }}>
35
- <Scheduler
36
- day={{
37
- startHour: 0,
38
- endHour: 24,
39
- step: 60,
40
- navigation: true,
41
- }}
42
- week={{
43
- weekDays: [0, 1, 2, 3, 4, 5, 6],
44
- weekStartOn: 1,
45
- startHour: 0,
46
- endHour: 24,
47
- step: 60,
48
- navigation: true,
49
- disableGoToDay: true,
50
- }}
51
- ref={calendarRef}
52
- events={EVENTS}
53
- loading={loading}
54
- customHeaderContent={customHeader}
55
- stickyNavigation={true}
56
- stickyNavigationOffset={64}
57
- currentTimeBarColor="#ff00c3ff"
58
- forceInlineMultiDay={true}
59
- // events={generateRandomEvents(200)}
60
- />
61
- </div>
62
- </div>
63
- </>
64
- );
65
- }
66
-
67
- export default Page1;