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.
Files changed (66) hide show
  1. package/dist/components/DashboardFilters/types.d.ts +1 -1
  2. package/dist/components/DashboardFilters/useDashboardFilters.d.ts +13 -0
  3. package/dist/components/WidgetCard/ErrorBoundary.d.ts +6 -0
  4. package/dist/components/WidgetCard/errorBoundaryStyles.d.ts +2 -0
  5. package/dist/components/index.d.ts +1 -0
  6. package/dist/graphql-ws.d.ts +1 -1
  7. package/dist/helpers/periods.d.ts +1 -0
  8. package/dist/helpers/shifts.d.ts +1 -0
  9. package/dist/index.js +11 -11
  10. package/dist/index.js.map +1 -1
  11. package/dist/locales/index.d.ts +118 -78
  12. package/dist/utils/actioncable-client.d.ts +4 -1
  13. package/dist/utils/graphql-ws-client.d.ts +14 -1
  14. package/dist/version.d.ts +1 -1
  15. package/package.json +17 -16
  16. package/dist/cypress/support/component.d.ts +0 -9
  17. package/dist/cypress.config.d.ts +0 -2
  18. package/dist/src/components/ConfirmTooltip/index.d.ts +0 -13
  19. package/dist/src/components/ConfirmTooltip/styles.d.ts +0 -3
  20. package/dist/src/components/DashboardFilters/AccessDeniedModal/index.d.ts +0 -14
  21. package/dist/src/components/DashboardFilters/AccessDeniedModal/styles.d.ts +0 -3
  22. package/dist/src/components/DashboardFilters/DateRangePicker/index.d.ts +0 -18
  23. package/dist/src/components/DashboardFilters/DateRangePicker/styles.d.ts +0 -3
  24. package/dist/src/components/DashboardFilters/DayTypeSelector/DayTypeSelector.cy.d.ts +0 -1
  25. package/dist/src/components/DashboardFilters/DayTypeSelector/index.d.ts +0 -8
  26. package/dist/src/components/DashboardFilters/DayTypeSelector/styles.d.ts +0 -3
  27. package/dist/src/components/DashboardFilters/PeriodList/PeriodList.cy.d.ts +0 -1
  28. package/dist/src/components/DashboardFilters/PeriodList/index.d.ts +0 -13
  29. package/dist/src/components/DashboardFilters/PeriodList/styles.d.ts +0 -3
  30. package/dist/src/components/DashboardFilters/ShiftSelector/ShiftSelector.cy.d.ts +0 -1
  31. package/dist/src/components/DashboardFilters/ShiftSelector/index.d.ts +0 -9
  32. package/dist/src/components/DashboardFilters/ShiftSelector/styles.d.ts +0 -3
  33. package/dist/src/components/DashboardFilters/index.d.ts +0 -4
  34. package/dist/src/components/DashboardFilters/periods.cy.d.ts +0 -1
  35. package/dist/src/components/DashboardFilters/styles.d.ts +0 -3
  36. package/dist/src/components/DashboardFilters/types.d.ts +0 -36
  37. package/dist/src/components/MetricCard/index.d.ts +0 -14
  38. package/dist/src/components/MetricCard/styles.d.ts +0 -15
  39. package/dist/src/components/SortableSelect/index.d.ts +0 -14
  40. package/dist/src/components/WidgetCard/index.d.ts +0 -7
  41. package/dist/src/components/WidgetCard/styles.d.ts +0 -3
  42. package/dist/src/components/index.d.ts +0 -6
  43. package/dist/src/graphql-request.d.ts +0 -7856
  44. package/dist/src/graphql-ws.d.ts +0 -2
  45. package/dist/src/helpers/periods.d.ts +0 -8
  46. package/dist/src/helpers/sdk.d.ts +0 -74
  47. package/dist/src/helpers/shifts.cy.d.ts +0 -1
  48. package/dist/src/helpers/shifts.d.ts +0 -11
  49. package/dist/src/helpers/time.cy.d.ts +0 -1
  50. package/dist/src/helpers/time.d.ts +0 -2
  51. package/dist/src/hooks/useGqlClients.d.ts +0 -8
  52. package/dist/src/index.d.ts +0 -11
  53. package/dist/src/locales/index.d.ts +0 -95
  54. package/dist/src/operations/generated/index.d.ts +0 -3
  55. package/dist/src/operations/generated/mutations/index.d.ts +0 -29
  56. package/dist/src/operations/generated/queries/index.d.ts +0 -33
  57. package/dist/src/operations/generated/subscriptions/index.d.ts +0 -1
  58. package/dist/src/types.d.ts +0 -51
  59. package/dist/src/utils/actioncable-client.d.ts +0 -14
  60. package/dist/src/utils/graphql-ws-client.d.ts +0 -7
  61. package/dist/src/version.d.ts +0 -1
  62. /package/dist/{src/components → components}/DashboardFilters/DashboardFilters.cy.d.ts +0 -0
  63. /package/dist/{src/components → components}/DashboardFilters/constants.d.ts +0 -0
  64. /package/dist/{src/components/ConfirmTooltip/ConfirmTooltip.cy.d.ts → components/WidgetCard/ErrorBoundary.cy.d.ts} +0 -0
  65. /package/dist/{src/components/DashboardFilters/AccessDeniedModal/AccessDeniedModal.cy.d.ts → utils/actioncable-client.cy.d.ts} +0 -0
  66. /package/dist/{src/components/DashboardFilters/DateRangePicker/DateRangePicker.cy.d.ts → utils/graphql-ws-client.cy.d.ts} +0 -0
@@ -10,9 +10,9 @@ export type WeekPeriodId = `week_${number}`;
10
10
  export type PeriodId = CalendarPeriodId | ShiftPeriodId | WeekPeriodId;
11
11
  export type FilterValues = {
12
12
  dayType: DayType;
13
+ selectedPeriodId?: PeriodId;
13
14
  dateRange: DateRange;
14
15
  shiftIds: string[];
15
- selectedPeriodId?: PeriodId;
16
16
  };
17
17
  export type DashboardFiltersProps = {
18
18
  initialValues?: FilterValues;
@@ -0,0 +1,13 @@
1
+ import type { DayType, Shift } from '../../graphql-request';
2
+ import type { DateRange, FilterValues, PeriodDefinition, PeriodId } from './types';
3
+ export type DashboardFiltersHandlers = {
4
+ handleDayTypeChange: (dayType: DayType) => void;
5
+ handleShiftChange: (shiftIds: string[]) => void;
6
+ handleDateRangeChange: (dateRange: DateRange) => void;
7
+ handlePeriodSelect: (period: PeriodDefinition, dateRange: DateRange) => void;
8
+ };
9
+ export declare const useDashboardFilters: (savedFilters: FilterValues | undefined, shifts: Shift[], onChange: (values: FilterValues) => void) => {
10
+ filterValues: FilterValues;
11
+ selectedPeriodId: PeriodId | undefined;
12
+ handlers: DashboardFiltersHandlers;
13
+ };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface WidgetErrorBoundaryProps {
3
+ children: React.ReactNode;
4
+ }
5
+ declare const WidgetErrorBoundary: React.FC<WidgetErrorBoundaryProps>;
6
+ export { WidgetErrorBoundary };
@@ -0,0 +1,2 @@
1
+ import { SxProps, Theme } from '@mui/material/styles';
2
+ export declare const container: SxProps<Theme>;
@@ -3,4 +3,5 @@ export { default as DashboardFilters } from './DashboardFilters';
3
3
  export { default as MetricCard } from './MetricCard';
4
4
  export { default as SortableSelect } from './SortableSelect';
5
5
  export { default as WidgetCard } from './WidgetCard';
6
+ export { WidgetErrorBoundary } from './WidgetCard/ErrorBoundary';
6
7
  export type { DateRange, FilterValues, DashboardFiltersProps, PeriodDefinition, PeriodCategory, PeriodId, CalendarPeriodId, ShiftPeriodId, WeekPeriodId, CalculateContext, } from './DashboardFilters/types';
@@ -1,2 +1,2 @@
1
1
  import GraphqlWsClient from './utils/graphql-ws-client';
2
- export declare const getGqlWsClient: (url: string, token: string, lang: string) => GraphqlWsClient;
2
+ export declare const getGqlWsClient: (url: string, token: string, lang: string, onDisconnect?: () => void) => GraphqlWsClient;
@@ -1,5 +1,6 @@
1
1
  import type { CalculateContext, PeriodDefinition, PeriodId } from '../components/DashboardFilters/types';
2
2
  import { Shift } from '../graphql-request';
3
+ export declare const resolveShiftIdForPeriod: (periodId: PeriodId, shifts: Shift[]) => string | null;
3
4
  export declare const periods: PeriodDefinition[];
4
5
  export declare const findPeriodById: (id: string) => PeriodDefinition | undefined;
5
6
  export declare const getTimeRangeLabel: (shifts: Shift[], selectedShiftIds: string[]) => string | null;
@@ -1,6 +1,7 @@
1
1
  import { Dayjs } from 'dayjs';
2
2
  import { Shift } from '../graphql-request';
3
3
  export interface NormalizedShift {
4
+ id: string;
4
5
  name: string;
5
6
  startedAt: Dayjs;
6
7
  finishedAt: Dayjs;