react-timelane 0.0.6 → 1.0.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.
Files changed (101) hide show
  1. package/package.json +6 -3
  2. package/.storybook/main.ts +0 -11
  3. package/.storybook/package.json +0 -3
  4. package/.storybook/preview.ts +0 -14
  5. package/eslint.config.js +0 -28
  6. package/index.html +0 -13
  7. package/storybook-static/addon-visual-tests-assets/visual-test-illustration.mp4 +0 -0
  8. package/storybook-static/assets/Color-AVL7NMMY-B90CyoR2.js +0 -1
  9. package/storybook-static/assets/DocsRenderer-PQXLIZUC-Bq83urOe.js +0 -2
  10. package/storybook-static/assets/FullExamplePage-DfmTY2HY.css +0 -1
  11. package/storybook-static/assets/FullExamplePage.stories-2F7rFo1o.js +0 -18
  12. package/storybook-static/assets/Timelane-Dz9QoO0k.css +0 -1
  13. package/storybook-static/assets/Timelane-S9mAxniK.js +0 -177
  14. package/storybook-static/assets/Timelane.stories-eJTFFqOc.js +0 -15
  15. package/storybook-static/assets/TimelaneLane.stories-D-gkVkkl.js +0 -37
  16. package/storybook-static/assets/TimelaneSettingsProvider.stories-Ca_yRNCX.js +0 -28
  17. package/storybook-static/assets/blocks-Cs-T3qmo.js +0 -658
  18. package/storybook-static/assets/iframe-CoOaxin5.js +0 -1124
  19. package/storybook-static/assets/index-BFqcmZp8.js +0 -9
  20. package/storybook-static/assets/index-CKqcs_aQ.js +0 -9
  21. package/storybook-static/assets/index-Dn1Kba0m.js +0 -1
  22. package/storybook-static/assets/react-18-CSTqcdyU.js +0 -25
  23. package/storybook-static/components/Timelane/Timelane.d.ts +0 -38
  24. package/storybook-static/components/Timelane/Timelane.stories.d.ts +0 -19
  25. package/storybook-static/components/TimelaneAllocation/TimelaneAllocation.d.ts +0 -10
  26. package/storybook-static/components/TimelaneAside/TimelaneAside.d.ts +0 -12
  27. package/storybook-static/components/TimelaneBackground/TimelaneBackground.d.ts +0 -4
  28. package/storybook-static/components/TimelaneBody/TimelaneBody.d.ts +0 -5
  29. package/storybook-static/components/TimelaneBody/TimelaneBodyInner.d.ts +0 -16
  30. package/storybook-static/components/TimelaneBody/TimelaneSelectionLayer.d.ts +0 -6
  31. package/storybook-static/components/TimelaneHeader/DaysHeader.d.ts +0 -14
  32. package/storybook-static/components/TimelaneHeader/MonthsHeader.d.ts +0 -14
  33. package/storybook-static/components/TimelaneHeader/TimelaneHeader.d.ts +0 -23
  34. package/storybook-static/components/TimelaneHeader/WeeksHeader.d.ts +0 -14
  35. package/storybook-static/components/TimelaneHeader/index.d.ts +0 -5
  36. package/storybook-static/components/TimelaneHeader/renderingUtils.d.ts +0 -4
  37. package/storybook-static/components/TimelaneItem/DragResizeComponent.d.ts +0 -20
  38. package/storybook-static/components/TimelaneItem/TimelaneItem.d.ts +0 -14
  39. package/storybook-static/components/TimelaneLane/AvailableSpaceIndicator.d.ts +0 -21
  40. package/storybook-static/components/TimelaneLane/DropPreview.d.ts +0 -9
  41. package/storybook-static/components/TimelaneLane/DropTarget.d.ts +0 -11
  42. package/storybook-static/components/TimelaneLane/OverlapIndicator.d.ts +0 -6
  43. package/storybook-static/components/TimelaneLane/TimelaneLane.d.ts +0 -15
  44. package/storybook-static/components/TimelaneLane/TimelaneLane.stories.d.ts +0 -9
  45. package/storybook-static/components/TimelaneLayout/TimelaneLayout.d.ts +0 -23
  46. package/storybook-static/components/TimelaneSettingsProvider/TimelaneSettingsContext.d.ts +0 -7
  47. package/storybook-static/components/TimelaneSettingsProvider/TimelaneSettingsProvider.d.ts +0 -11
  48. package/storybook-static/components/TimelaneSettingsProvider/TimelaneSettingsProvider.stories.d.ts +0 -9
  49. package/storybook-static/components/utils.d.ts +0 -27
  50. package/storybook-static/favicon.svg +0 -1
  51. package/storybook-static/hooks/useScroll.d.ts +0 -10
  52. package/storybook-static/hooks/useTimelaneContext.d.ts +0 -1
  53. package/storybook-static/iframe.html +0 -685
  54. package/storybook-static/index.d.ts +0 -12
  55. package/storybook-static/index.html +0 -152
  56. package/storybook-static/index.json +0 -1
  57. package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
  58. package/storybook-static/nunito-sans-bold.woff2 +0 -0
  59. package/storybook-static/nunito-sans-italic.woff2 +0 -0
  60. package/storybook-static/nunito-sans-regular.woff2 +0 -0
  61. package/storybook-static/project.json +0 -1
  62. package/storybook-static/sb-addons/chromatic-com-storybook-1/manager-bundle.js +0 -356
  63. package/storybook-static/sb-addons/chromatic-com-storybook-1/manager-bundle.js.LEGAL.txt +0 -40
  64. package/storybook-static/sb-addons/docs-2/manager-bundle.js +0 -151
  65. package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -188
  66. package/storybook-static/sb-common-assets/favicon.svg +0 -1
  67. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  68. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  69. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  70. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  71. package/storybook-static/sb-manager/globals-module-info.js +0 -797
  72. package/storybook-static/sb-manager/globals-runtime.js +0 -72136
  73. package/storybook-static/sb-manager/globals.js +0 -34
  74. package/storybook-static/sb-manager/runtime.js +0 -13002
  75. package/storybook-static/stories/FullExamplePage/FullExamplePage.d.ts +0 -4
  76. package/storybook-static/stories/FullExamplePage/FullExamplePage.stories.d.ts +0 -19
  77. package/storybook-static/stories/FullExamplePage/MyTimelane.d.ts +0 -20
  78. package/storybook-static/stories/constants.d.ts +0 -7
  79. package/storybook-static/stories/hooks/useLocalStorage.d.ts +0 -2
  80. package/storybook-static/stories/models/Allocation.d.ts +0 -11
  81. package/storybook-static/stories/models/AllocationId.d.ts +0 -1
  82. package/storybook-static/stories/models/Resource.d.ts +0 -7
  83. package/storybook-static/stories/models/ResourceId.d.ts +0 -1
  84. package/storybook-static/types/AvailableSpace.d.ts +0 -6
  85. package/storybook-static/types/DateBounds.d.ts +0 -4
  86. package/storybook-static/types/Dimensions.d.ts +0 -4
  87. package/storybook-static/types/EnableResizing.d.ts +0 -6
  88. package/storybook-static/types/GrabInfo.d.ts +0 -5
  89. package/storybook-static/types/Grid.d.ts +0 -6
  90. package/storybook-static/types/Item.d.ts +0 -12
  91. package/storybook-static/types/ItemId.d.ts +0 -1
  92. package/storybook-static/types/Lane.d.ts +0 -5
  93. package/storybook-static/types/LaneId.d.ts +0 -1
  94. package/storybook-static/types/OffsetBounds.d.ts +0 -4
  95. package/storybook-static/types/Pixels.d.ts +0 -4
  96. package/storybook-static/types/Position.d.ts +0 -4
  97. package/storybook-static/types/Rectangle.d.ts +0 -6
  98. package/storybook-static/types/TimeRange.d.ts +0 -4
  99. package/storybook-static/types/TimelaneSettings.d.ts +0 -14
  100. package/storybook-static/types/index.d.ts +0 -16
  101. package/vite.config.ts +0 -32
@@ -1,4 +0,0 @@
1
- import { TimelaneProps } from '../../components/Timelane/Timelane';
2
- export interface FullExamplePageProps extends TimelaneProps {
3
- }
4
- export declare function FullExamplePage(settings: FullExamplePageProps): import("react/jsx-runtime").JSX.Element;
@@ -1,19 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- import { FullExamplePage } from './FullExamplePage';
3
- declare const meta: {
4
- title: string;
5
- component: typeof FullExamplePage;
6
- parameters: {
7
- layout: string;
8
- };
9
- argTypes: {
10
- showDays: {
11
- control: {
12
- type: "boolean";
13
- };
14
- };
15
- };
16
- };
17
- export default meta;
18
- type Story = StoryObj<typeof meta>;
19
- export declare const Example: Story;
@@ -1,20 +0,0 @@
1
- import { MouseEvent } from '../../../node_modules/react';
2
- import { default as Allocation } from '../models/Allocation';
3
- import { default as Resource } from '../models/Resource';
4
- import { TimelaneProps } from '../../components/Timelane/Timelane';
5
- interface MyTimelaneProps {
6
- resources: Resource[];
7
- allocations: Allocation[];
8
- focusedDay?: Date | null;
9
- timelaneParameters: TimelaneProps;
10
- setFocusedResource?: (resource: Resource | null) => void;
11
- setFocusedDay?: (day: Date | null) => void;
12
- onAllocationCreate?: (allocation: Allocation) => void;
13
- onAllocationUpdate?: (allocation: Allocation) => void;
14
- onAllocationDelete?: (allocation: Allocation) => void;
15
- onAllocationClick?: (allocation: Allocation, e: MouseEvent | null) => void;
16
- onAllocationContextMenu?: (allocation: Allocation, e: MouseEvent) => void;
17
- onAreaClick?: (area: Resource, e: MouseEvent) => void;
18
- }
19
- export declare function MyTimelane({ resources, allocations, focusedDay, timelaneParameters, setFocusedDay, onAllocationCreate, onAllocationUpdate, }: MyTimelaneProps): import("react/jsx-runtime").JSX.Element;
20
- export {};
@@ -1,7 +0,0 @@
1
- import { default as Allocation } from './models/Allocation';
2
- import { default as Resource } from './models/Resource';
3
- export declare const DEFAULT_ALLOCATION_COLOR = "#A7C7E7";
4
- export declare const DEFAULT_ALLOCATION_DESCRIPTION = "empty description";
5
- export declare const DEFAULT_ALLOCATION_NAME = "New Allocation";
6
- export declare const DEFAULT_RESOURCES: Resource[];
7
- export declare const DEFAULT_ALLOCATIONS: Allocation[];
@@ -1,2 +0,0 @@
1
- import { Dispatch, SetStateAction } from '../../../node_modules/react';
2
- export default function useLocalStorage<T>(key: string, defaultValue: T): [T, Dispatch<SetStateAction<T>>];
@@ -1,11 +0,0 @@
1
- export default interface Allocation {
2
- id: number;
3
- resourceId: number;
4
- name: string;
5
- description: string;
6
- start: Date;
7
- end: Date;
8
- size: number;
9
- offset: number;
10
- color: string;
11
- }
@@ -1 +0,0 @@
1
- export type AllocationId = number;
@@ -1,7 +0,0 @@
1
- import { ResourceId } from './ResourceId';
2
- export default interface Resource {
3
- id: ResourceId;
4
- name: string;
5
- description: string;
6
- capacity: number;
7
- }
@@ -1 +0,0 @@
1
- export type ResourceId = number;
@@ -1,6 +0,0 @@
1
- export interface AvailableSpace {
2
- start: Date;
3
- end: Date;
4
- minOffset: number;
5
- maxOffset: number;
6
- }
@@ -1,4 +0,0 @@
1
- export interface DateBounds {
2
- lower: Date;
3
- upper: Date;
4
- }
@@ -1,4 +0,0 @@
1
- export interface Dimensions {
2
- width: number;
3
- height: number;
4
- }
@@ -1,6 +0,0 @@
1
- export interface EnableResizing {
2
- top?: boolean;
3
- left?: boolean;
4
- bottom?: boolean;
5
- right?: boolean;
6
- }
@@ -1,5 +0,0 @@
1
- import { Position } from './Position';
2
- export interface GrabInfo {
3
- absolute: Position;
4
- relative: Position;
5
- }
@@ -1,6 +0,0 @@
1
- export interface Grid {
2
- x?: number;
3
- y?: number;
4
- offsetX?: number;
5
- offsetY?: number;
6
- }
@@ -1,12 +0,0 @@
1
- import { ItemId } from './ItemId';
2
- import { LaneId } from './LaneId';
3
- export type Item<T = void> = {
4
- id: ItemId;
5
- laneId: LaneId;
6
- start: Date;
7
- end: Date;
8
- size: number;
9
- offset: number;
10
- payload: T;
11
- };
12
- export declare function isItem(a: object): a is Item;
@@ -1 +0,0 @@
1
- export type ItemId = number;
@@ -1,5 +0,0 @@
1
- import { LaneId } from './LaneId';
2
- export interface Lane {
3
- id: LaneId;
4
- capacity: number;
5
- }
@@ -1 +0,0 @@
1
- export type LaneId = number;
@@ -1,4 +0,0 @@
1
- export interface OffsetBounds {
2
- lower: number;
3
- upper: number;
4
- }
@@ -1,4 +0,0 @@
1
- export interface Pixels {
2
- pixelsPerDay: number;
3
- pixelsPerLane: number;
4
- }
@@ -1,4 +0,0 @@
1
- export interface Position {
2
- x: number;
3
- y: number;
4
- }
@@ -1,6 +0,0 @@
1
- export interface Rectangle {
2
- x: number;
3
- y: number;
4
- width: number;
5
- height: number;
6
- }
@@ -1,4 +0,0 @@
1
- export interface TimeRange {
2
- start: Date;
3
- end: Date;
4
- }
@@ -1,14 +0,0 @@
1
- import { EnableResizing } from './EnableResizing';
2
- export interface TimelaneSettings {
3
- start: Date;
4
- end: Date;
5
- pixelsPerDay: number;
6
- pixelsPerLane: number;
7
- showMonths: boolean;
8
- showWeeks: boolean;
9
- showDays: boolean;
10
- allowOverlaps: boolean;
11
- focusedDate: Date | null;
12
- enableItemResizing: boolean | EnableResizing;
13
- enableItemDragging: boolean;
14
- }
@@ -1,16 +0,0 @@
1
- export { type TimeRange } from './TimeRange';
2
- export { type Pixels } from './Pixels';
3
- export { type Rectangle } from './Rectangle';
4
- export { type Position } from './Position';
5
- export { type Grid } from './Grid';
6
- export { type ItemId } from './ItemId';
7
- export { type AvailableSpace } from './AvailableSpace';
8
- export { type Item, isItem } from './Item';
9
- export { type Dimensions } from './Dimensions';
10
- export { type GrabInfo } from './GrabInfo';
11
- export { type LaneId } from './LaneId';
12
- export { type Lane } from './Lane';
13
- export { type DateBounds } from './DateBounds';
14
- export { type OffsetBounds } from './OffsetBounds';
15
- export { type TimelaneSettings } from './TimelaneSettings';
16
- export { type EnableResizing } from './EnableResizing';
package/vite.config.ts DELETED
@@ -1,32 +0,0 @@
1
- import { defineConfig } from "vite";
2
- import { resolve } from "path";
3
- import react from "@vitejs/plugin-react";
4
- import dts from "vite-plugin-dts";
5
- // import vitePluginSass from "vite-plugin-sass";
6
-
7
- // https://vite.dev/config/
8
- export default defineConfig({
9
- plugins: [
10
- react(),
11
- // vitePluginSass(),
12
- dts({ include: ["src"], exclude: ["docs", ".github"] }),
13
- ],
14
- build: {
15
- lib: {
16
- entry: resolve(__dirname, "src/index.ts"),
17
- formats: ["es"],
18
- },
19
- rollupOptions: {
20
- external: ["react", "react/jsx-runtime"],
21
- },
22
- },
23
- // css: {
24
- // preprocessorOptions: {
25
- // scss: {
26
- // additionalData: `
27
- // @import "TimelaneV3/layout/layout.scss";
28
- // `,
29
- // },
30
- // },
31
- // },
32
- });