andoncloud-dashboard-toolkit 1.5.34 → 1.5.36
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/dist/components/DashboardFilters/types.d.ts +1 -1
- package/dist/components/DashboardFilters/useDashboardFilters.d.ts +13 -0
- package/dist/components/WidgetCard/ErrorBoundary.d.ts +6 -0
- package/dist/components/WidgetCard/errorBoundaryStyles.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/graphql-ws.d.ts +1 -1
- package/dist/helpers/periods.d.ts +1 -0
- package/dist/helpers/shifts.d.ts +1 -0
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/locales/index.d.ts +118 -78
- package/dist/utils/actioncable-client.d.ts +4 -1
- package/dist/utils/graphql-ws-client.d.ts +14 -1
- package/dist/version.d.ts +1 -1
- package/package.json +17 -16
- package/dist/cypress/support/component.d.ts +0 -9
- package/dist/cypress.config.d.ts +0 -2
- package/dist/src/components/ConfirmTooltip/index.d.ts +0 -13
- package/dist/src/components/ConfirmTooltip/styles.d.ts +0 -3
- package/dist/src/components/DashboardFilters/AccessDeniedModal/index.d.ts +0 -14
- package/dist/src/components/DashboardFilters/AccessDeniedModal/styles.d.ts +0 -3
- package/dist/src/components/DashboardFilters/DateRangePicker/index.d.ts +0 -18
- package/dist/src/components/DashboardFilters/DateRangePicker/styles.d.ts +0 -3
- package/dist/src/components/DashboardFilters/DayTypeSelector/DayTypeSelector.cy.d.ts +0 -1
- package/dist/src/components/DashboardFilters/DayTypeSelector/index.d.ts +0 -8
- package/dist/src/components/DashboardFilters/DayTypeSelector/styles.d.ts +0 -3
- package/dist/src/components/DashboardFilters/PeriodList/PeriodList.cy.d.ts +0 -1
- package/dist/src/components/DashboardFilters/PeriodList/index.d.ts +0 -13
- package/dist/src/components/DashboardFilters/PeriodList/styles.d.ts +0 -3
- package/dist/src/components/DashboardFilters/ShiftSelector/ShiftSelector.cy.d.ts +0 -1
- package/dist/src/components/DashboardFilters/ShiftSelector/index.d.ts +0 -9
- package/dist/src/components/DashboardFilters/ShiftSelector/styles.d.ts +0 -3
- package/dist/src/components/DashboardFilters/index.d.ts +0 -4
- package/dist/src/components/DashboardFilters/periods.cy.d.ts +0 -1
- package/dist/src/components/DashboardFilters/styles.d.ts +0 -3
- package/dist/src/components/DashboardFilters/types.d.ts +0 -36
- package/dist/src/components/MetricCard/index.d.ts +0 -14
- package/dist/src/components/MetricCard/styles.d.ts +0 -15
- package/dist/src/components/SortableSelect/index.d.ts +0 -14
- package/dist/src/components/WidgetCard/index.d.ts +0 -7
- package/dist/src/components/WidgetCard/styles.d.ts +0 -3
- package/dist/src/components/index.d.ts +0 -6
- package/dist/src/graphql-request.d.ts +0 -7856
- package/dist/src/graphql-ws.d.ts +0 -2
- package/dist/src/helpers/periods.d.ts +0 -8
- package/dist/src/helpers/sdk.d.ts +0 -74
- package/dist/src/helpers/shifts.cy.d.ts +0 -1
- package/dist/src/helpers/shifts.d.ts +0 -11
- package/dist/src/helpers/time.cy.d.ts +0 -1
- package/dist/src/helpers/time.d.ts +0 -2
- package/dist/src/hooks/useGqlClients.d.ts +0 -8
- package/dist/src/index.d.ts +0 -11
- package/dist/src/locales/index.d.ts +0 -95
- package/dist/src/operations/generated/index.d.ts +0 -3
- package/dist/src/operations/generated/mutations/index.d.ts +0 -29
- package/dist/src/operations/generated/queries/index.d.ts +0 -33
- package/dist/src/operations/generated/subscriptions/index.d.ts +0 -1
- package/dist/src/types.d.ts +0 -51
- package/dist/src/utils/actioncable-client.d.ts +0 -14
- package/dist/src/utils/graphql-ws-client.d.ts +0 -7
- package/dist/src/version.d.ts +0 -1
- /package/dist/{src/components → components}/DashboardFilters/DashboardFilters.cy.d.ts +0 -0
- /package/dist/{src/components → components}/DashboardFilters/constants.d.ts +0 -0
- /package/dist/{src/components/ConfirmTooltip/ConfirmTooltip.cy.d.ts → components/WidgetCard/ErrorBoundary.cy.d.ts} +0 -0
- /package/dist/{src/components/DashboardFilters/AccessDeniedModal/AccessDeniedModal.cy.d.ts → utils/actioncable-client.cy.d.ts} +0 -0
- /package/dist/{src/components/DashboardFilters/DateRangePicker/DateRangePicker.cy.d.ts → utils/graphql-ws-client.cy.d.ts} +0 -0
package/dist/locales/index.d.ts
CHANGED
|
@@ -4,45 +4,65 @@ declare const resources: {
|
|
|
4
4
|
"Are you sure you want to delete this widget?": string;
|
|
5
5
|
Cancel: string;
|
|
6
6
|
Delete: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
7
|
+
widgetCard: {
|
|
8
|
+
error: string;
|
|
9
|
+
retry: string;
|
|
10
|
+
};
|
|
11
|
+
dashboardFilters: {
|
|
12
|
+
dayType: {
|
|
13
|
+
label: string;
|
|
14
|
+
calendar: string;
|
|
15
|
+
production: string;
|
|
16
|
+
};
|
|
17
|
+
shifts: {
|
|
18
|
+
label: string;
|
|
19
|
+
allShifts: string;
|
|
20
|
+
};
|
|
21
|
+
dateRange: {
|
|
22
|
+
label: string;
|
|
23
|
+
from: string;
|
|
24
|
+
to: string;
|
|
25
|
+
};
|
|
26
|
+
search: {
|
|
27
|
+
placeholder: string;
|
|
28
|
+
noResults: string;
|
|
29
|
+
};
|
|
30
|
+
premium: {
|
|
31
|
+
indicator: string;
|
|
32
|
+
};
|
|
33
|
+
periods: {
|
|
34
|
+
currentShift: string;
|
|
35
|
+
lastShift: string;
|
|
36
|
+
today: string;
|
|
37
|
+
yesterday: string;
|
|
38
|
+
last7Days: string;
|
|
39
|
+
last14Days: string;
|
|
40
|
+
last30Days: string;
|
|
41
|
+
last90Days: string;
|
|
42
|
+
last180Days: string;
|
|
43
|
+
last365Days: string;
|
|
44
|
+
currentWeek: string;
|
|
45
|
+
currentMonth: string;
|
|
46
|
+
currentQuarter: string;
|
|
47
|
+
currentYear: string;
|
|
48
|
+
previousWeek: string;
|
|
49
|
+
previousMonth: string;
|
|
50
|
+
previousQuarter: string;
|
|
51
|
+
previousYear: string;
|
|
52
|
+
last2Weeks: string;
|
|
53
|
+
last4Weeks: string;
|
|
54
|
+
last8Weeks: string;
|
|
55
|
+
last12Weeks: string;
|
|
56
|
+
last3Months: string;
|
|
57
|
+
last6Months: string;
|
|
58
|
+
last12Months: string;
|
|
59
|
+
week: string;
|
|
60
|
+
};
|
|
61
|
+
accessDenied: {
|
|
62
|
+
title: string;
|
|
63
|
+
close: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
46
66
|
};
|
|
47
67
|
};
|
|
48
68
|
pl: {
|
|
@@ -50,45 +70,65 @@ declare const resources: {
|
|
|
50
70
|
"Are you sure you want to delete this widget?": string;
|
|
51
71
|
Cancel: string;
|
|
52
72
|
Delete: string;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
73
|
+
widgetCard: {
|
|
74
|
+
error: string;
|
|
75
|
+
retry: string;
|
|
76
|
+
};
|
|
77
|
+
dashboardFilters: {
|
|
78
|
+
dayType: {
|
|
79
|
+
label: string;
|
|
80
|
+
calendar: string;
|
|
81
|
+
production: string;
|
|
82
|
+
};
|
|
83
|
+
shifts: {
|
|
84
|
+
label: string;
|
|
85
|
+
allShifts: string;
|
|
86
|
+
};
|
|
87
|
+
dateRange: {
|
|
88
|
+
label: string;
|
|
89
|
+
from: string;
|
|
90
|
+
to: string;
|
|
91
|
+
};
|
|
92
|
+
search: {
|
|
93
|
+
placeholder: string;
|
|
94
|
+
noResults: string;
|
|
95
|
+
};
|
|
96
|
+
premium: {
|
|
97
|
+
indicator: string;
|
|
98
|
+
};
|
|
99
|
+
periods: {
|
|
100
|
+
currentShift: string;
|
|
101
|
+
lastShift: string;
|
|
102
|
+
today: string;
|
|
103
|
+
yesterday: string;
|
|
104
|
+
last7Days: string;
|
|
105
|
+
last14Days: string;
|
|
106
|
+
last30Days: string;
|
|
107
|
+
last90Days: string;
|
|
108
|
+
last180Days: string;
|
|
109
|
+
last365Days: string;
|
|
110
|
+
currentWeek: string;
|
|
111
|
+
currentMonth: string;
|
|
112
|
+
currentQuarter: string;
|
|
113
|
+
currentYear: string;
|
|
114
|
+
previousWeek: string;
|
|
115
|
+
previousMonth: string;
|
|
116
|
+
previousQuarter: string;
|
|
117
|
+
previousYear: string;
|
|
118
|
+
last2Weeks: string;
|
|
119
|
+
last4Weeks: string;
|
|
120
|
+
last8Weeks: string;
|
|
121
|
+
last12Weeks: string;
|
|
122
|
+
last3Months: string;
|
|
123
|
+
last6Months: string;
|
|
124
|
+
last12Months: string;
|
|
125
|
+
week: string;
|
|
126
|
+
};
|
|
127
|
+
accessDenied: {
|
|
128
|
+
title: string;
|
|
129
|
+
close: string;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
92
132
|
};
|
|
93
133
|
};
|
|
94
134
|
};
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { ExecutionResult } from 'graphql/execution/execute';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { OperationOptions } from 'subscriptions-transport-ws';
|
|
4
|
+
type DisconnectCallback = () => void;
|
|
4
5
|
declare class ActionCableClient {
|
|
5
6
|
private wsURL;
|
|
6
7
|
private cable;
|
|
7
8
|
private subscriptions;
|
|
8
|
-
|
|
9
|
+
private onDisconnect?;
|
|
10
|
+
constructor(url: string, onDisconnect?: DisconnectCallback);
|
|
9
11
|
private addSubscription;
|
|
10
12
|
connect(token: string, lang: string): void;
|
|
13
|
+
disconnect(): void;
|
|
11
14
|
request(request: OperationOptions): Observable<ExecutionResult>;
|
|
12
15
|
hasSubscription(id: string): boolean;
|
|
13
16
|
}
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import { OperationOptions } from 'subscriptions-transport-ws';
|
|
2
|
+
interface SubscriptionEntry<T = unknown> {
|
|
3
|
+
query: OperationOptions['query'];
|
|
4
|
+
variables?: OperationOptions['variables'];
|
|
5
|
+
onData?: (item: T) => void;
|
|
6
|
+
onError: (error: Error) => void;
|
|
7
|
+
}
|
|
2
8
|
declare class GraphqlWsClient {
|
|
3
9
|
private actionCableClient;
|
|
4
|
-
|
|
10
|
+
private registry;
|
|
11
|
+
private activeRxSubscriptions;
|
|
12
|
+
constructor(url: string, token: string, lang: string, onDisconnect?: () => void);
|
|
5
13
|
subscribe<T = unknown>(query: OperationOptions['query'], variables?: OperationOptions['variables'], onData?: (item: T) => void, onError?: (error: Error) => void): () => void;
|
|
14
|
+
disconnect(): void;
|
|
15
|
+
getActiveSubscriptions(): Map<string, SubscriptionEntry>;
|
|
16
|
+
resubscribe(): void;
|
|
17
|
+
private subscribeToActionCable;
|
|
6
18
|
}
|
|
7
19
|
export default GraphqlWsClient;
|
|
20
|
+
export type { SubscriptionEntry };
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIBRARY_VERSION = "1.5.
|
|
1
|
+
export declare const LIBRARY_VERSION = "1.5.36";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "andoncloud-dashboard-toolkit",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.36",
|
|
4
4
|
"description": "Made with create-react-library",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "library-scripts build --external actioncable,andoncloud-sdk",
|
|
21
21
|
"build:watch": "library-scripts build-watch --external actioncable,andoncloud-sdk",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"prepare": "run-s build",
|
|
22
|
+
"generate": "run-s generate-operations generate-sdk prettier",
|
|
23
|
+
"generate-operations": "gqlg --schemaFilePath ./graphql-schema/schema.graphql --destDirPath ./src/operations/generated",
|
|
24
|
+
"generate-sdk": "graphql-codegen",
|
|
26
25
|
"lint": "eslint --ext .ts,.tsx --quiet --fix .",
|
|
27
26
|
"lint:ci": "eslint --ext .ts,.tsx --quiet .",
|
|
27
|
+
"prepare": "run-s build",
|
|
28
28
|
"prettier": "prettier --write .",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
29
|
+
"start": "run-p build:watch start:preview",
|
|
30
|
+
"start:preview": "cd preview && npm run start",
|
|
31
|
+
"test": "cypress run --component",
|
|
32
32
|
"update": "ncu -u --reject eslint,rxjs,graphql,graphql-request && npm install --ignore-scripts && cd preview && ncu -u && npm install",
|
|
33
33
|
"version:bump": "npm version --no-git-tag-version patch"
|
|
34
34
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@emotion/react": "^11.14.0",
|
|
48
48
|
"@emotion/styled": "^11.14.1",
|
|
49
|
-
"@graphql-codegen/cli": "^6.1
|
|
49
|
+
"@graphql-codegen/cli": "^6.2.1",
|
|
50
50
|
"@graphql-codegen/introspection": "5.0.1",
|
|
51
51
|
"@graphql-codegen/typescript": "^5.0.9",
|
|
52
52
|
"@graphql-codegen/typescript-document-nodes": "5.0.9",
|
|
@@ -60,23 +60,23 @@
|
|
|
60
60
|
"@parcel/watcher": "^2.5.6",
|
|
61
61
|
"@types/actioncable": "^5.2.11",
|
|
62
62
|
"@types/lodash.isempty": "^4.4.9",
|
|
63
|
-
"@types/node": "^25.
|
|
63
|
+
"@types/node": "^25.5.0",
|
|
64
64
|
"@types/react": "^19.2.14",
|
|
65
65
|
"@types/react-dom": "^19.2.3",
|
|
66
66
|
"@types/react-text-truncate": "^0.19.0",
|
|
67
67
|
"actioncable": "^5.2.8",
|
|
68
|
-
"andoncloud-library-scripts": "^1.0.
|
|
69
|
-
"andoncloud-sdk": "^1.7.
|
|
68
|
+
"andoncloud-library-scripts": "^1.0.20",
|
|
69
|
+
"andoncloud-sdk": "^1.7.19",
|
|
70
70
|
"copyfiles": "^2.4.1",
|
|
71
71
|
"cross-env": "^10.1.0",
|
|
72
|
-
"cypress": "^15.
|
|
72
|
+
"cypress": "^15.12.0",
|
|
73
73
|
"eslint": "^8.57.1",
|
|
74
74
|
"eslint-config-andoncloud": "^1.0.0",
|
|
75
75
|
"eslint-plugin-prettier": "^5.5.5",
|
|
76
76
|
"gh-pages": "^6.3.0",
|
|
77
77
|
"gql-generator": "^2.0.0",
|
|
78
78
|
"graphql-request": "^4.3.0",
|
|
79
|
-
"i18next": "^25.8.
|
|
79
|
+
"i18next": "^25.8.18",
|
|
80
80
|
"microbundle-crl": "^0.13.11",
|
|
81
81
|
"mobx": "^6.15.0",
|
|
82
82
|
"mobx-react-lite": "^4.1.1",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"prettier": "^3.8.1",
|
|
86
86
|
"react": "^19.2.4",
|
|
87
87
|
"react-dom": "^19.2.4",
|
|
88
|
-
"react-i18next": "^16.5.
|
|
88
|
+
"react-i18next": "^16.5.8",
|
|
89
89
|
"react-router-dom": "^7.13.1",
|
|
90
90
|
"react-scripts": "^5.0.1",
|
|
91
91
|
"typescript": "^5.9.3",
|
|
@@ -99,11 +99,12 @@
|
|
|
99
99
|
"@dnd-kit/sortable": "^10.0.0",
|
|
100
100
|
"@dnd-kit/utilities": "^3.2.2",
|
|
101
101
|
"array-move": "^4.0.0",
|
|
102
|
-
"dayjs": "^1.11.
|
|
102
|
+
"dayjs": "^1.11.20",
|
|
103
103
|
"graphql": "^15.8.0",
|
|
104
104
|
"graphql-tag": "^2.12.6",
|
|
105
105
|
"lodash.isempty": "^4.4.0",
|
|
106
106
|
"merge-sx": "^3.4.0",
|
|
107
|
+
"react-error-boundary": "^6.1.1",
|
|
107
108
|
"react-select": "^5.10.2",
|
|
108
109
|
"react-text-truncate": "^0.19.0",
|
|
109
110
|
"rxjs": "^6.6.7",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { mount } from 'cypress/react';
|
|
2
|
-
declare global {
|
|
3
|
-
namespace Cypress {
|
|
4
|
-
interface Chainable {
|
|
5
|
-
mount: typeof mount;
|
|
6
|
-
getByTestId(selector: string, options?: Partial<Cypress.Loggable & Cypress.Timeoutable & Cypress.Withinable & Cypress.Shadow>): Cypress.Chainable<JQuery<HTMLElement>>;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
}
|
package/dist/cypress.config.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TooltipProps } from '@mui/material';
|
|
3
|
-
interface ConfirmTooltipProps extends Omit<TooltipProps, 'title'> {
|
|
4
|
-
confirmMessage: string;
|
|
5
|
-
confirmButtonText: string;
|
|
6
|
-
cancelButtonText: string;
|
|
7
|
-
onCancel: () => void;
|
|
8
|
-
onConfirm: () => void;
|
|
9
|
-
confirmButtonTestId?: string;
|
|
10
|
-
cancelButtonTestId?: string;
|
|
11
|
-
}
|
|
12
|
-
declare const ConfirmTooltip: React.FC<ConfirmTooltipProps>;
|
|
13
|
-
export default ConfirmTooltip;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AccessButton, AccessState, CooldownInfo, FeatureRequestPayload } from 'andoncloud-sdk';
|
|
3
|
-
export type AccessDeniedModalProps = {
|
|
4
|
-
open: boolean;
|
|
5
|
-
onClose: () => void;
|
|
6
|
-
accessState: AccessState;
|
|
7
|
-
buttons: AccessButton[];
|
|
8
|
-
daysSinceExpiry: number | null;
|
|
9
|
-
cooldownInfo: CooldownInfo;
|
|
10
|
-
workplaceId?: string;
|
|
11
|
-
onFeatureRequest?: (payload: FeatureRequestPayload) => Promise<boolean>;
|
|
12
|
-
};
|
|
13
|
-
declare const AccessDeniedModal: React.FC<AccessDeniedModalProps>;
|
|
14
|
-
export default AccessDeniedModal;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import 'dayjs/locale/pl';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { DayType, Shift } from '../../../graphql-request';
|
|
4
|
-
import type { DateRange, PeriodDefinition, PeriodId } from '../types';
|
|
5
|
-
export type DateRangePickerProps = {
|
|
6
|
-
dateRange: DateRange;
|
|
7
|
-
dayType: DayType;
|
|
8
|
-
shifts: Shift[];
|
|
9
|
-
selectedShiftIds: string[];
|
|
10
|
-
hasAccess: boolean;
|
|
11
|
-
selectedPeriodId?: PeriodId;
|
|
12
|
-
onDayTypeChange: (dayType: DayType) => void;
|
|
13
|
-
onDateRangeChange: (dateRange: DateRange) => void;
|
|
14
|
-
onPeriodSelect: (period: PeriodDefinition, dateRange: DateRange) => void;
|
|
15
|
-
onAccessDenied: () => void;
|
|
16
|
-
};
|
|
17
|
-
declare const DateRangePicker: React.FC<DateRangePickerProps>;
|
|
18
|
-
export default DateRangePicker;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DayType } from '../../../graphql-request';
|
|
3
|
-
export type DayTypeSelectorProps = {
|
|
4
|
-
value: DayType;
|
|
5
|
-
onChange: (value: DayType) => void;
|
|
6
|
-
};
|
|
7
|
-
declare const DayTypeSelector: React.FC<DayTypeSelectorProps>;
|
|
8
|
-
export default DayTypeSelector;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DayType, Shift } from '../../../graphql-request';
|
|
3
|
-
import type { DateRange, PeriodDefinition, PeriodId } from '../types';
|
|
4
|
-
export type PeriodListProps = {
|
|
5
|
-
dayType: DayType;
|
|
6
|
-
shifts: Shift[];
|
|
7
|
-
selectedShiftIds: string[];
|
|
8
|
-
selectedPeriodId?: PeriodId;
|
|
9
|
-
hasAccess: boolean;
|
|
10
|
-
onPeriodSelect: (period: PeriodDefinition, dateRange: DateRange) => void;
|
|
11
|
-
};
|
|
12
|
-
declare const PeriodList: React.FC<PeriodListProps>;
|
|
13
|
-
export default PeriodList;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Shift } from '../../../graphql-request';
|
|
3
|
-
export type ShiftSelectorProps = {
|
|
4
|
-
shifts: Shift[];
|
|
5
|
-
selectedShiftIds: string[];
|
|
6
|
-
onChange: (shiftIds: string[]) => void;
|
|
7
|
-
};
|
|
8
|
-
declare const ShiftSelector: React.FC<ShiftSelectorProps>;
|
|
9
|
-
export default ShiftSelector;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { FeatureRequestPayload } from 'andoncloud-sdk';
|
|
2
|
-
import type { DayType, Shift } from '../../graphql-request';
|
|
3
|
-
export type DateRange = {
|
|
4
|
-
from: string;
|
|
5
|
-
to: string;
|
|
6
|
-
};
|
|
7
|
-
export type CalendarPeriodId = 'today' | 'yesterday' | 'last_7_days' | 'last_14_days' | 'last_30_days' | 'last_90_days' | 'last_180_days' | 'last_365_days' | 'current_week' | 'current_month' | 'current_quarter' | 'current_year' | 'previous_week' | 'previous_month' | 'previous_quarter' | 'previous_year' | 'last_2_weeks' | 'last_4_weeks' | 'last_8_weeks' | 'last_12_weeks' | 'last_3_months' | 'last_6_months' | 'last_12_months';
|
|
8
|
-
export type ShiftPeriodId = 'current_shift' | 'last_shift';
|
|
9
|
-
export type WeekPeriodId = `week_${number}`;
|
|
10
|
-
export type PeriodId = CalendarPeriodId | ShiftPeriodId | WeekPeriodId;
|
|
11
|
-
export type FilterValues = {
|
|
12
|
-
dayType: DayType;
|
|
13
|
-
dateRange: DateRange;
|
|
14
|
-
shiftIds: string[];
|
|
15
|
-
selectedPeriodId?: PeriodId;
|
|
16
|
-
};
|
|
17
|
-
export type DashboardFiltersProps = {
|
|
18
|
-
initialValues?: FilterValues;
|
|
19
|
-
onChange: (values: FilterValues) => void;
|
|
20
|
-
shifts: Shift[];
|
|
21
|
-
onFeatureRequest?: (payload: FeatureRequestPayload) => Promise<boolean>;
|
|
22
|
-
};
|
|
23
|
-
export type PeriodCategory = 'shift_based' | 'rolling' | 'relative_days' | 'previous' | 'current' | 'calendar_weeks' | 'fiscal' | 'weeks';
|
|
24
|
-
export type CalculateContext = {
|
|
25
|
-
dayType: DayType;
|
|
26
|
-
shifts: Shift[];
|
|
27
|
-
selectedShiftIds: string[];
|
|
28
|
-
};
|
|
29
|
-
export type PeriodDefinition = {
|
|
30
|
-
id: PeriodId;
|
|
31
|
-
labelKey: string;
|
|
32
|
-
labelParams?: Record<string, string | number>;
|
|
33
|
-
needAccess: boolean;
|
|
34
|
-
category: PeriodCategory;
|
|
35
|
-
calculate: (ctx: CalculateContext) => DateRange;
|
|
36
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CardProps } from '@mui/material';
|
|
3
|
-
import { MetricValue } from '@/graphql-request';
|
|
4
|
-
interface MetricCardProps extends CardProps {
|
|
5
|
-
title: string;
|
|
6
|
-
metricLabel: React.ReactNode;
|
|
7
|
-
metricValue?: MetricValue;
|
|
8
|
-
progressValue?: MetricValue;
|
|
9
|
-
extraValue?: React.ReactNode;
|
|
10
|
-
animateBackgroundColor?: boolean;
|
|
11
|
-
rounded?: boolean;
|
|
12
|
-
}
|
|
13
|
-
declare const MetricCard: React.FC<MetricCardProps>;
|
|
14
|
-
export default MetricCard;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SxProps, Theme } from '@mui/system';
|
|
2
|
-
interface StylesProps {
|
|
3
|
-
card: {
|
|
4
|
-
rounded?: boolean;
|
|
5
|
-
};
|
|
6
|
-
cardOverlay: {
|
|
7
|
-
background: string;
|
|
8
|
-
};
|
|
9
|
-
showBgPattern: boolean;
|
|
10
|
-
backgroundColor: string;
|
|
11
|
-
animateBackgroundColor?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare const hexToRgba: (hex: string, alpha?: number) => string;
|
|
14
|
-
declare const makeStyles: (props: StylesProps) => Record<string, SxProps<Theme>>;
|
|
15
|
-
export default makeStyles;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { OnChangeValue, Options } from 'react-select';
|
|
3
|
-
export interface Option {
|
|
4
|
-
label: string;
|
|
5
|
-
value: string;
|
|
6
|
-
}
|
|
7
|
-
interface SortableSelectProps {
|
|
8
|
-
placeholder: string;
|
|
9
|
-
options: Options<Option>;
|
|
10
|
-
selected: Array<Option['value']>;
|
|
11
|
-
onChange: (selected: OnChangeValue<Option['value'], true>) => void;
|
|
12
|
-
}
|
|
13
|
-
declare const SortableSelect: React.FC<SortableSelectProps>;
|
|
14
|
-
export default SortableSelect;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { WidgetCardProps as BaseWidgetCardProps } from '@/types';
|
|
3
|
-
type WidgetCardProps = Omit<BaseWidgetCardProps, 'ref'> & {
|
|
4
|
-
ref?: React.LegacyRef<HTMLDivElement>;
|
|
5
|
-
};
|
|
6
|
-
declare const WidgetCard: React.FC<WidgetCardProps>;
|
|
7
|
-
export default WidgetCard;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as ConfirmTooltip } from './ConfirmTooltip';
|
|
2
|
-
export { default as DashboardFilters } from './DashboardFilters';
|
|
3
|
-
export { default as MetricCard } from './MetricCard';
|
|
4
|
-
export { default as SortableSelect } from './SortableSelect';
|
|
5
|
-
export { default as WidgetCard } from './WidgetCard';
|
|
6
|
-
export type { DateRange, FilterValues, DashboardFiltersProps, PeriodDefinition, PeriodCategory, PeriodId, CalendarPeriodId, ShiftPeriodId, WeekPeriodId, CalculateContext, } from './DashboardFilters/types';
|