@instructure/platform-widget-dashboard 10.9.0 → 10.11.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/dist/constants.d.ts +3 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/hooks/useWidgetDashboardContext.d.ts +9 -2
- package/dist/hooks/useWidgetDashboardContext.d.ts.map +1 -1
- package/dist/hooks/useWidgetLayout.d.ts +2 -2
- package/dist/hooks/useWidgetLayout.d.ts.map +1 -1
- package/dist/index.js +4756 -4724
- package/dist/types/env.d.ts +7 -5
- package/dist/types/env.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/constants.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DocumentNode } from 'graphql';
|
|
2
|
-
import { WidgetConfig } from './types';
|
|
2
|
+
import { DashboardExperience, WidgetConfig } from './types';
|
|
3
3
|
export declare const TAB_IDS: {
|
|
4
4
|
readonly DASHBOARD: "dashboard";
|
|
5
5
|
readonly COURSES: "courses";
|
|
@@ -30,6 +30,8 @@ export declare const EDUCATOR_CANVAS_ROLES: readonly ["teacher", "designer"];
|
|
|
30
30
|
export declare const LEFT_COLUMN = 1;
|
|
31
31
|
export declare const RIGHT_COLUMN = 2;
|
|
32
32
|
export declare const DEFAULT_WIDGET_CONFIG: WidgetConfig;
|
|
33
|
+
export declare const DEFAULT_EDUCATOR_WIDGET_CONFIG: WidgetConfig;
|
|
34
|
+
export declare const DEFAULT_WIDGET_CONFIG_BY_EXPERIENCE: Record<DashboardExperience, WidgetConfig>;
|
|
33
35
|
export declare const COURSE_GRADES_WIDGET: {
|
|
34
36
|
readonly MAX_GRID_ITEMS: 6;
|
|
35
37
|
readonly GRID_COLUMNS: 2;
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE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AkC,CAAA;AAClF,eAAO,MAAM,qBAAqB,qBAAqB,CAAA;AACvD,eAAO,MAAM,kBAAkB,kBAAkB,CAAA;AACjD,eAAO,MAAM,oBAAoB,oBAAoB,CAAA;AACrD,eAAO,MAAM,4BAA4B,2BAA2B,CAAA;AACpE,eAAO,MAAM,uBAAuB,sBAAsB,CAAA;AAE1D,eAAO,MAAM,6BAA6B,MAAM,CAAA;AAEhD,eAAO,MAAM,oBAAoB,KAAK,CAAA;AAGtC,eAAO,MAAM,kBAAkB,MAAM,CAAA;AAGrC,eAAO,MAAM,YAAY;;;CAGf,CAAA;AAGV,eAAO,MAAM,4BAA4B,EAAE,YAgB1C,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,YAY1C,CAAA;AAED,eAAO,MAAM,sCAAsC,EAAE,YASpD,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,YAU5C,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,YAS5C,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RceConfig } from '@instructure/platform-rce-adapter';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
import { AccountInfo, CurrentUser, DashboardFeatures, DashboardPreferences, ObservedUser, SharedCourseData, WidgetRegistry } from '../types';
|
|
3
|
+
import { AccountInfo, CurrentUser, DashboardExperience, DashboardFeatures, DashboardPreferences, ObservedUser, SharedCourseData, WidgetRegistry } from '../types';
|
|
4
4
|
export type { SharedCourseData };
|
|
5
|
-
export declare const WidgetDashboardProvider: ({ children, preferences, observedUsersList, canAddObservee, currentUser, observedUserId, currentUserRoles, sharedCourseData, dashboardFeatures, hubBaseUrl, accountName, accountDashboardUrl, accounts, customWidgets, renderCoursesTab, isDark: isDarkProp, widgetDashboardOverridable, addOakMountPoint, rcsConfig, onSaveWidgetConfig, }: {
|
|
5
|
+
export declare const WidgetDashboardProvider: ({ children, preferences, observedUsersList, canAddObservee, currentUser, observedUserId, currentUserRoles, sharedCourseData, dashboardFeatures, hubBaseUrl, accountName, accountDashboardUrl, accounts, customWidgets, renderCoursesTab, isDark: isDarkProp, widgetDashboardOverridable, dashboardExperience: dashboardExperienceProp, availableDashboardExperiences, addOakMountPoint, rcsConfig, onSaveWidgetConfig, onDashboardExperienceChange, }: {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
preferences?: DashboardPreferences;
|
|
8
8
|
observedUsersList?: ObservedUser[];
|
|
@@ -31,9 +31,12 @@ export declare const WidgetDashboardProvider: ({ children, preferences, observed
|
|
|
31
31
|
renderCoursesTab?: () => React.ReactNode;
|
|
32
32
|
isDark?: boolean;
|
|
33
33
|
widgetDashboardOverridable?: boolean;
|
|
34
|
+
dashboardExperience?: DashboardExperience;
|
|
35
|
+
availableDashboardExperiences?: DashboardExperience[];
|
|
34
36
|
addOakMountPoint?: boolean;
|
|
35
37
|
rcsConfig?: RceConfig;
|
|
36
38
|
onSaveWidgetConfig?: (widgetId: string, config: Record<string, unknown>) => Promise<void>;
|
|
39
|
+
onDashboardExperienceChange?: (experience: DashboardExperience) => void;
|
|
37
40
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
38
41
|
export declare function useWidgetDashboard(): {
|
|
39
42
|
preferences: DashboardPreferences;
|
|
@@ -44,6 +47,9 @@ export declare function useWidgetDashboard(): {
|
|
|
44
47
|
currentUserRoles: string[];
|
|
45
48
|
sharedCourseData: SharedCourseData[];
|
|
46
49
|
dashboardFeatures: DashboardFeatures;
|
|
50
|
+
dashboardExperience: DashboardExperience;
|
|
51
|
+
setDashboardExperience: (experience: DashboardExperience) => void;
|
|
52
|
+
canSwitchDashboardExperience: boolean;
|
|
47
53
|
hubBaseUrl?: string;
|
|
48
54
|
accounts: AccountInfo[];
|
|
49
55
|
customWidgets: WidgetRegistry;
|
|
@@ -91,6 +97,7 @@ export declare const widgetDashboardDefaultProps: {
|
|
|
91
97
|
customWidgets: WidgetRegistry;
|
|
92
98
|
isDark: boolean;
|
|
93
99
|
widgetDashboardOverridable: boolean;
|
|
100
|
+
availableDashboardExperiences: DashboardExperience[];
|
|
94
101
|
addOakMountPoint: boolean;
|
|
95
102
|
};
|
|
96
103
|
//# sourceMappingURL=useWidgetDashboardContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWidgetDashboardContext.d.ts","sourceRoot":"","sources":["../../src/hooks/useWidgetDashboardContext.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,KAAoE,MAAM,OAAO,CAAA;AACxF,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACf,MAAM,UAAU,CAAA;AAGjB,YAAY,EAAE,gBAAgB,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"useWidgetDashboardContext.d.ts","sourceRoot":"","sources":["../../src/hooks/useWidgetDashboardContext.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,KAAoE,MAAM,OAAO,CAAA;AACxF,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACf,MAAM,UAAU,CAAA;AAGjB,YAAY,EAAE,gBAAgB,EAAE,CAAA;AA+EhC,eAAO,MAAM,uBAAuB,GAAI,ubAwBrC;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,oBAAoB,CAAA;IAClC,iBAAiB,CAAC,EAAE,YAAY,EAAE,CAAA;IAClC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAChC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,gBAAgB,CAAC,EAAE,MAAM,E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AAC,MAAM,EAAE,OAAO,KAAK,IAAI;gCACR,OAAO;sBACjB,OAAO;IACzB;;;;;OAKG;gBACS,SAAS;kBACP,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;wBACjC,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI;uBAC5D,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI;0BACtC,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI;yBAC7C,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;EA4O1F;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;mBAiBjB,cAAc;;;mCAGE,mBAAmB,EAAE;;CAE3D,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { WidgetDashboardTranslations } from '../contexts/TranslationsContext';
|
|
3
|
-
import {
|
|
3
|
+
import { WidgetConfig } from '../types';
|
|
4
4
|
export type MoveAction = 'move-left' | 'move-right' | 'move-left-top' | 'move-right-top' | 'move-up' | 'move-down' | 'move-up-cross' | 'move-down-cross' | 'move-to-top' | 'move-to-bottom';
|
|
5
5
|
export declare const getMoveActionDescription: (action: MoveAction, translations: WidgetDashboardTranslations) => string;
|
|
6
6
|
interface WidgetLayoutContextType {
|
|
@@ -11,7 +11,7 @@ interface WidgetLayoutContextType {
|
|
|
11
11
|
addWidget: (type: string, displayName: string, col: number, row: number) => void;
|
|
12
12
|
resetConfig: () => void;
|
|
13
13
|
resetToDefault: () => void;
|
|
14
|
-
saveLayout: (
|
|
14
|
+
saveLayout: () => Promise<void>;
|
|
15
15
|
}
|
|
16
16
|
export declare const WidgetLayoutProvider: React.FC<{
|
|
17
17
|
children: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWidgetLayout.d.ts","sourceRoot":"","sources":["../../src/hooks/useWidgetLayout.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAsE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"useWidgetLayout.d.ts","sourceRoot":"","sources":["../../src/hooks/useWidgetLayout.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAsE,MAAM,OAAO,CAAA;AAO1F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAA;AAElF,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,UAAU,CAAA;AAIpD,MAAM,MAAM,UAAU,GAClB,WAAW,GACX,YAAY,GACZ,eAAe,GACf,gBAAgB,GAChB,SAAS,GACT,WAAW,GACX,eAAe,GACf,iBAAiB,GACjB,aAAa,GACb,gBAAgB,CAAA;AAEpB,eAAO,MAAM,wBAAwB,GACnC,QAAQ,UAAU,EAClB,cAAc,2BAA2B,KACxC,MAqBF,CAAA;AAED,UAAU,uBAAuB;IAC/B,MAAM,EAAE,YAAY,CAAA;IACpB,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,KAAK,IAAI,CAAA;IAC1D,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;IACtF,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7D,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAChF,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,cAAc,EAAE,MAAM,IAAI,CAAA;IAC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