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.
- package/README.md +17 -0
- package/dist/assets/.gitkeep +0 -0
- package/dist/components/AssignmentBoard/DropZone/index.d.ts +8 -0
- package/dist/components/AssignmentBoard/DropZone/styles.d.ts +2 -0
- package/dist/components/AssignmentBoard/OperatorCard/index.d.ts +12 -0
- package/dist/components/AssignmentBoard/OperatorCard/styles.d.ts +6 -0
- package/dist/components/AssignmentBoard/PoolColumn/index.d.ts +7 -0
- package/dist/components/AssignmentBoard/PoolColumn/styles.d.ts +3 -0
- package/dist/components/AssignmentBoard/WorkplaceColumn/index.d.ts +7 -0
- package/dist/components/AssignmentBoard/WorkplaceColumn/styles.d.ts +5 -0
- package/dist/components/AssignmentBoard/helpers.d.ts +3 -0
- package/dist/components/AssignmentBoard/index.d.ts +12 -0
- package/dist/components/AssignmentBoard/styles.d.ts +13 -0
- package/dist/components/Navigation/index.d.ts +8 -0
- package/dist/components/Navigation/styles.d.ts +3 -0
- package/dist/components/SettingsFormContent/index.d.ts +5 -0
- package/dist/components/SettingsFormContent/styles.d.ts +3 -0
- package/dist/components/Widget/index.d.ts +5 -0
- package/dist/components/Widget/utils.d.ts +15 -0
- package/dist/components/WidgetView/index.d.ts +4 -0
- package/dist/components/WidgetView/styles.d.ts +3 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/locales/index.d.ts +35 -0
- package/dist/stories/Widget.stories.d.ts +5 -0
- package/dist/types.d.ts +28 -0
- package/dist/utils/state.d.ts +4 -0
- package/dist/version.d.ts +1 -0
- package/package.json +74 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare const resources: {
|
|
2
|
+
en: {
|
|
3
|
+
translation: {
|
|
4
|
+
Loading: string;
|
|
5
|
+
"Choose workplace": string;
|
|
6
|
+
Cancel: string;
|
|
7
|
+
Save: string;
|
|
8
|
+
Settings: string;
|
|
9
|
+
noShiftsAvailable: string;
|
|
10
|
+
unassignedPool: string;
|
|
11
|
+
department: string;
|
|
12
|
+
allDepartments: string;
|
|
13
|
+
refreshInterval: string;
|
|
14
|
+
filters: string;
|
|
15
|
+
advanced: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
pl: {
|
|
19
|
+
translation: {
|
|
20
|
+
Loading: string;
|
|
21
|
+
"Choose workplace": string;
|
|
22
|
+
Cancel: string;
|
|
23
|
+
Save: string;
|
|
24
|
+
Settings: string;
|
|
25
|
+
noShiftsAvailable: string;
|
|
26
|
+
unassignedPool: string;
|
|
27
|
+
department: string;
|
|
28
|
+
allDepartments: string;
|
|
29
|
+
refreshInterval: string;
|
|
30
|
+
filters: string;
|
|
31
|
+
advanced: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default resources;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { BaseWidgetData, BaseWidgetSettings, Department, ListWorkplaceAssignments_AssignmentSummary, ListWorkplaceAssignments_UnassignedOperator, ListWorkplaceAssignments_WorkplaceWithAssignment, Shift } from 'andoncloud-dashboard-toolkit';
|
|
2
|
+
import { BaseWidgetViewProps } from 'andoncloud-widget-base';
|
|
3
|
+
export interface OperatorUser {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
interface WidgetViewData {
|
|
8
|
+
workplaces: ListWorkplaceAssignments_WorkplaceWithAssignment[];
|
|
9
|
+
unassignedOperators: ListWorkplaceAssignments_UnassignedOperator[];
|
|
10
|
+
summary: ListWorkplaceAssignments_AssignmentSummary;
|
|
11
|
+
shifts: Shift[];
|
|
12
|
+
}
|
|
13
|
+
interface WidgetSettingsData {
|
|
14
|
+
departments: Department[];
|
|
15
|
+
}
|
|
16
|
+
export interface WidgetData extends BaseWidgetData, WidgetViewData, WidgetSettingsData {
|
|
17
|
+
}
|
|
18
|
+
export interface WidgetSettings extends BaseWidgetSettings {
|
|
19
|
+
departmentId?: string;
|
|
20
|
+
refreshInterval: 15 | 30 | 60;
|
|
21
|
+
}
|
|
22
|
+
export interface ViewState {
|
|
23
|
+
date: string;
|
|
24
|
+
shift: Shift;
|
|
25
|
+
}
|
|
26
|
+
export interface WidgetViewProps extends BaseWidgetViewProps<WidgetData, WidgetSettings> {
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Shift } from 'andoncloud-dashboard-toolkit';
|
|
2
|
+
import { ViewState } from '@/types';
|
|
3
|
+
export declare const getInitialState: (shifts: Shift[]) => ViewState | null;
|
|
4
|
+
export declare const navigateState: (currentState: ViewState, shifts: Shift[], direction: "prev" | "next") => ViewState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LIBRARY_VERSION = "1.0.0";
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "andoncloud-station-assignment-widget",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Made with create-andoncloud-widget",
|
|
5
|
+
"author": "Adrian Olszewski",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"module": "dist/index.js",
|
|
9
|
+
"source": "src/index.tsx",
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=14"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "library-scripts build --type widget",
|
|
15
|
+
"build:watch": "library-scripts build-watch --type widget",
|
|
16
|
+
"start:preview": "cd preview && npm run start",
|
|
17
|
+
"start": "run-p build:watch start:preview",
|
|
18
|
+
"lint": "eslint --ext .ts,.tsx --quiet --fix .",
|
|
19
|
+
"lint:ci": "eslint --ext .ts,.tsx --quiet .",
|
|
20
|
+
"i18n:extract": "i18next src/components/**/*.tsx [-oc]",
|
|
21
|
+
"prepare": "run-s build",
|
|
22
|
+
"update": "ncu --reject graphql-request -u && npm install --ignore-scripts && cd preview && ncu -u && npm install",
|
|
23
|
+
"version:bump": "npm version --no-git-tag-version patch"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"@mui/icons-material": "^5.0.0",
|
|
27
|
+
"@mui/lab": "^5.0.0",
|
|
28
|
+
"@mui/material": "^5.0.0",
|
|
29
|
+
"@mui/x-date-pickers": "^5.0.0",
|
|
30
|
+
"actioncable": "^5.0.0",
|
|
31
|
+
"andoncloud-dashboard-toolkit": "^1.0.0",
|
|
32
|
+
"andoncloud-sdk": "^1.0.0",
|
|
33
|
+
"andoncloud-widget-base": "^1.0.0",
|
|
34
|
+
"graphql-request": "^6.0.0",
|
|
35
|
+
"i18next": "^22.0.0",
|
|
36
|
+
"react": "^18.0.0",
|
|
37
|
+
"react-i18next": "^12.0.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
41
|
+
"@emotion/react": "^11.14.0",
|
|
42
|
+
"@emotion/styled": "^11.14.1",
|
|
43
|
+
"@mui/icons-material": "^7.3.7",
|
|
44
|
+
"@mui/lab": "^7.0.1-beta.21",
|
|
45
|
+
"@mui/material": "^7.3.7",
|
|
46
|
+
"@types/react": "^19.2.8",
|
|
47
|
+
"actioncable": "^5.2.8",
|
|
48
|
+
"andoncloud-dashboard-toolkit": "^1.5.2",
|
|
49
|
+
"andoncloud-library-scripts": "^1.0.12",
|
|
50
|
+
"andoncloud-sdk": "^1.7.2",
|
|
51
|
+
"andoncloud-widget-base": "^1.2.8",
|
|
52
|
+
"eslint-config-andoncloud": "^1.0.0",
|
|
53
|
+
"graphql-request": "^6.1.0",
|
|
54
|
+
"i18next": "^25.7.4",
|
|
55
|
+
"mobx": "^6.15.0",
|
|
56
|
+
"mobx-react-lite": "^4.1.1",
|
|
57
|
+
"npm-check-updates": "^19.3.1",
|
|
58
|
+
"npm-run-all": "^4.1.5",
|
|
59
|
+
"postcss": "^8.5.6",
|
|
60
|
+
"react": "^19.2.3",
|
|
61
|
+
"react-dom": "^19.2.3",
|
|
62
|
+
"react-i18next": "^16.5.2",
|
|
63
|
+
"react-router-dom": "^7.12.0",
|
|
64
|
+
"react-scripts": "^5.0.1",
|
|
65
|
+
"typescript": "^5.9.3"
|
|
66
|
+
},
|
|
67
|
+
"files": [
|
|
68
|
+
"dist"
|
|
69
|
+
],
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"@hello-pangea/dnd": "^18.0.1",
|
|
72
|
+
"yup": "^1.7.1"
|
|
73
|
+
}
|
|
74
|
+
}
|