andoncloud-station-assignment-widget 1.0.0

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 (30) hide show
  1. package/README.md +17 -0
  2. package/dist/assets/.gitkeep +0 -0
  3. package/dist/components/AssignmentBoard/DropZone/index.d.ts +8 -0
  4. package/dist/components/AssignmentBoard/DropZone/styles.d.ts +2 -0
  5. package/dist/components/AssignmentBoard/OperatorCard/index.d.ts +12 -0
  6. package/dist/components/AssignmentBoard/OperatorCard/styles.d.ts +6 -0
  7. package/dist/components/AssignmentBoard/PoolColumn/index.d.ts +7 -0
  8. package/dist/components/AssignmentBoard/PoolColumn/styles.d.ts +3 -0
  9. package/dist/components/AssignmentBoard/WorkplaceColumn/index.d.ts +7 -0
  10. package/dist/components/AssignmentBoard/WorkplaceColumn/styles.d.ts +5 -0
  11. package/dist/components/AssignmentBoard/helpers.d.ts +3 -0
  12. package/dist/components/AssignmentBoard/index.d.ts +12 -0
  13. package/dist/components/AssignmentBoard/styles.d.ts +13 -0
  14. package/dist/components/Navigation/index.d.ts +8 -0
  15. package/dist/components/Navigation/styles.d.ts +3 -0
  16. package/dist/components/SettingsFormContent/index.d.ts +5 -0
  17. package/dist/components/SettingsFormContent/styles.d.ts +3 -0
  18. package/dist/components/Widget/index.d.ts +5 -0
  19. package/dist/components/Widget/utils.d.ts +15 -0
  20. package/dist/components/WidgetView/index.d.ts +4 -0
  21. package/dist/components/WidgetView/styles.d.ts +3 -0
  22. package/dist/index.d.ts +5 -0
  23. package/dist/index.js +8 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/locales/index.d.ts +35 -0
  26. package/dist/stories/Widget.stories.d.ts +5 -0
  27. package/dist/types.d.ts +28 -0
  28. package/dist/utils/state.d.ts +4 -0
  29. package/dist/version.d.ts +1 -0
  30. package/package.json +74 -0
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # andoncloud-station-assignment-widget
2
+
3
+ > Made with create-andoncloud-widget
4
+
5
+ [![NPM](https://img.shields.io/npm/v/station-assignment-widget.svg)](https://www.npmjs.com/package/station-assignment-widget) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install --save andoncloud-station-assignment-widget
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```tsx
16
+ import { Widget, permissions } from 'andoncloud-station-assignment-widget';
17
+ ```
File without changes
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { DroppableProvided } from '@hello-pangea/dnd';
3
+ interface DropZoneProps {
4
+ droppableId: string;
5
+ children: (provided: DroppableProvided) => React.ReactNode;
6
+ }
7
+ declare const DropZone: React.FC<DropZoneProps>;
8
+ export default DropZone;
@@ -0,0 +1,2 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ export declare const makeDropZoneStyles: (isDraggingOver: boolean) => SxProps<Theme>;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { PresenceStatusEnum } from 'andoncloud-dashboard-toolkit';
3
+ import { OperatorUser } from '@/types';
4
+ interface OperatorCardProps {
5
+ user: OperatorUser;
6
+ index: number;
7
+ draggableId: string;
8
+ showPresence?: boolean;
9
+ presenceStatus?: PresenceStatusEnum;
10
+ }
11
+ declare const OperatorCard: React.FC<OperatorCardProps>;
12
+ export default OperatorCard;
@@ -0,0 +1,6 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import { PresenceStatusEnum } from 'andoncloud-dashboard-toolkit';
3
+ export declare const makeCardStyles: (isDragging: boolean) => SxProps<Theme>;
4
+ export declare const makePresenceDotStyles: (status: PresenceStatusEnum) => SxProps<Theme>;
5
+ declare const styles: Record<string, SxProps<Theme>>;
6
+ export default styles;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { OperatorUser } from '@/types';
3
+ interface PoolColumnProps {
4
+ operators: OperatorUser[];
5
+ }
6
+ declare const PoolColumn: React.FC<PoolColumnProps>;
7
+ export default PoolColumn;
@@ -0,0 +1,3 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ declare const styles: Record<string, SxProps<Theme>>;
3
+ export default styles;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { ListWorkplaceAssignments_WorkplaceWithAssignment } from 'andoncloud-dashboard-toolkit';
3
+ interface WorkplaceColumnProps {
4
+ assignment: ListWorkplaceAssignments_WorkplaceWithAssignment;
5
+ }
6
+ declare const WorkplaceColumn: React.FC<WorkplaceColumnProps>;
7
+ export default WorkplaceColumn;
@@ -0,0 +1,5 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ export declare const makeRootStyles: (isOvercapacity: boolean) => SxProps<Theme>;
3
+ declare const styles: Record<string, SxProps<Theme>>;
4
+ export declare const makeStatusBadgeStyles: (status: "missing" | "overcapacity" | "ok") => SxProps<Theme>;
5
+ export default styles;
@@ -0,0 +1,3 @@
1
+ import { DropResult } from '@hello-pangea/dnd';
2
+ import { WidgetData } from '@/types';
3
+ export declare const getUpdatedData: (data: WidgetData, result: DropResult) => Pick<WidgetData, "workplaces" | "unassignedOperators"> | null;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { GqlClients } from 'andoncloud-dashboard-toolkit';
3
+ import { ViewState, WidgetData } from '@/types';
4
+ interface AssignmentBoardProps {
5
+ data: WidgetData;
6
+ viewState: ViewState;
7
+ gqlClients: GqlClients;
8
+ updateData: (data: Partial<WidgetData>) => void;
9
+ onMutationComplete: () => void;
10
+ }
11
+ declare const AssignmentBoard: React.FC<AssignmentBoardProps>;
12
+ export default AssignmentBoard;
@@ -0,0 +1,13 @@
1
+ import { Theme } from '@mui/material';
2
+ declare const styles: {
3
+ grid: (theme: Theme) => {
4
+ display: string;
5
+ flexDirection: string;
6
+ flexWrap: string;
7
+ alignContent: string;
8
+ gap: string;
9
+ height: string;
10
+ overflowX: string;
11
+ };
12
+ };
13
+ export default styles;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ViewState } from '@/types';
3
+ interface NavigationProps {
4
+ viewState: ViewState;
5
+ onNavigate: (direction: 'prev' | 'next') => void;
6
+ }
7
+ declare const Navigation: React.FC<NavigationProps>;
8
+ export default Navigation;
@@ -0,0 +1,3 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ declare const styles: Record<string, SxProps<Theme>>;
3
+ export default styles;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { SettingsFormContentProps } from 'andoncloud-widget-base';
3
+ import { WidgetData, WidgetSettings } from '@/types';
4
+ declare const SettingsFormContent: React.FC<SettingsFormContentProps<WidgetData, WidgetSettings>>;
5
+ export default SettingsFormContent;
@@ -0,0 +1,3 @@
1
+ import { SxProps, Theme } from '@mui/material/styles';
2
+ declare const styles: Record<string, SxProps<Theme>>;
3
+ export default styles;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { WidgetProps } from 'andoncloud-dashboard-toolkit';
3
+ import { WidgetData, WidgetSettings } from '@/types';
4
+ declare const Widget: React.FC<WidgetProps<WidgetData, WidgetSettings>>;
5
+ export default Widget;
@@ -0,0 +1,15 @@
1
+ import { TFunction } from 'i18next';
2
+ import * as yup from 'yup';
3
+ export declare const getSettingsFormProps: (t: TFunction) => {
4
+ initialValues: {
5
+ departmentId: undefined;
6
+ refreshInterval: number;
7
+ };
8
+ validationSchema: yup.ObjectSchema<{
9
+ departmentId: string | undefined;
10
+ refreshInterval: number;
11
+ }, yup.AnyObject, {
12
+ departmentId: undefined;
13
+ refreshInterval: undefined;
14
+ }, "">;
15
+ };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { WidgetViewProps } from '@/types';
3
+ declare const WidgetView: React.FC<WidgetViewProps>;
4
+ export default WidgetView;
@@ -0,0 +1,3 @@
1
+ import { SxProps, Theme } from '@mui/material/styles';
2
+ declare const styles: Record<string, SxProps<Theme>>;
3
+ export default styles;
@@ -0,0 +1,5 @@
1
+ export { default as Widget } from './components/Widget';
2
+ export declare const getDisplayName: (lang: "en" | "pl") => "Operator assignment" | "Przypisanie operatorów" | "station-assignment-widget";
3
+ export declare const requiredFeatures: string[];
4
+ export declare const extraPermissions: string[];
5
+ export { LIBRARY_VERSION as version } from './version';