@clickview/lite 0.0.11-dev.0 → 0.0.11

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 (61) hide show
  1. package/dist/apps/default/LiteDefaultApplication.d.ts +0 -1
  2. package/dist/apps/search/components/filter-actions/FilterActions.d.ts +0 -2
  3. package/dist/apps/search/components/filter-types/checkbox-filter/CheckboxFilter.d.ts +0 -2
  4. package/dist/apps/search/components/filter-types/index.d.ts +1 -3
  5. package/dist/apps/search/components/search-filters/PartialSearchFilters.d.ts +1 -6
  6. package/dist/apps/search/components/search-filters/SearchFilters.d.ts +1 -5
  7. package/dist/apps/search/flight-requests/SearchRequests.d.ts +1 -1
  8. package/dist/apps/search/interfaces/SearchFilter.d.ts +5 -7
  9. package/dist/apps/search/reducers/FilterReducer.d.ts +10 -14
  10. package/dist/apps/search/utils/FilterHelper.d.ts +6 -38
  11. package/dist/bundle.js +1 -1
  12. package/dist/en.json +1 -1
  13. package/dist/index.d.ts +0 -16
  14. package/dist/lite-app.css +1 -5
  15. package/dist/shared/constants/LiteActions.d.ts +0 -8
  16. package/dist/shared/constants/LiteRadioChannels.d.ts +0 -1
  17. package/dist/shared/flight-requests/VideoRequests.d.ts +0 -7
  18. package/dist/shared/hooks/index.d.ts +0 -1
  19. package/package.json +7 -7
  20. package/typings/utils/imports.d.ts +1 -6
  21. package/dist/apps/default/views/mock-testing/MockRequests.d.ts +0 -12
  22. package/dist/apps/default/views/mock-testing/MockView.d.ts +0 -2
  23. package/dist/apps/search/components/filter-types/dropdown-filter/DropdownFilter.d.ts +0 -7
  24. package/dist/apps/search/components/filter-types/radio-filter/year-level/YearLevelRadioFilter.d.ts +0 -7
  25. package/dist/apps/search/components/scoped-search-bar/ScopedSearchBar.d.ts +0 -18
  26. package/dist/apps/search/components/scoped-search-bar/partial-loading/PartialScopedSearchBar.d.ts +0 -2
  27. package/dist/apps/user-manager/LiteUserManagerApplication.d.ts +0 -16
  28. package/dist/apps/user-manager/components/edit-student-details/EditStudentDetails.d.ts +0 -10
  29. package/dist/apps/user-manager/components/edit-teacher-details/EditTeacherDetails.d.ts +0 -10
  30. package/dist/apps/user-manager/components/index.d.ts +0 -4
  31. package/dist/apps/user-manager/components/manage-users-list/ManageUsersList.d.ts +0 -8
  32. package/dist/apps/user-manager/components/manage-users-list/partial-loading/PartialManageUsersList.d.ts +0 -2
  33. package/dist/apps/user-manager/components/manage-users-list/students/ManageStudentItem.d.ts +0 -9
  34. package/dist/apps/user-manager/components/manage-users-list/teachers/ManageTeacherItem.d.ts +0 -9
  35. package/dist/apps/user-manager/components/user-details-form/UserDetailsForm.d.ts +0 -11
  36. package/dist/apps/user-manager/components/year-level-select/YearLevelSelect.d.ts +0 -9
  37. package/dist/apps/user-manager/enums/index.d.ts +0 -1
  38. package/dist/apps/user-manager/enums/mocks/MockUserType.d.ts +0 -4
  39. package/dist/apps/user-manager/flight-requests/ClassroomRequests.d.ts +0 -4
  40. package/dist/apps/user-manager/flight-requests/SchoolUserRequests.d.ts +0 -21
  41. package/dist/apps/user-manager/flight-requests/YearLevelRequests.d.ts +0 -4
  42. package/dist/apps/user-manager/interfaces/EditUserRequest.d.ts +0 -8
  43. package/dist/apps/user-manager/interfaces/index.d.ts +0 -6
  44. package/dist/apps/user-manager/interfaces/mocks/MockClassroom.d.ts +0 -3
  45. package/dist/apps/user-manager/interfaces/mocks/MockStudent.d.ts +0 -7
  46. package/dist/apps/user-manager/interfaces/mocks/MockTeacher.d.ts +0 -5
  47. package/dist/apps/user-manager/interfaces/mocks/MockUserRole.d.ts +0 -3
  48. package/dist/apps/user-manager/interfaces/mocks/MockYearLevel.d.ts +0 -3
  49. package/dist/apps/user-manager/validation/index.d.ts +0 -1
  50. package/dist/apps/user-manager/validation/user-validation/UserValidationSchema.d.ts +0 -14
  51. package/dist/apps/user-manager/views/create-student/CreateStudentView.d.ts +0 -6
  52. package/dist/apps/user-manager/views/create-teacher/CreateTeacherView.d.ts +0 -6
  53. package/dist/apps/user-manager/views/edit-student/EditStudentView.d.ts +0 -7
  54. package/dist/apps/user-manager/views/edit-teacher/EditTeacherView.d.ts +0 -7
  55. package/dist/apps/user-manager/views/remove-user/RemoveUserView.d.ts +0 -8
  56. package/dist/apps/user-manager/views/school-student-manager/SchoolStudentManagerView.d.ts +0 -7
  57. package/dist/apps/user-manager/views/school-student-manager/empty-state/SchoolStudentManagerEmptyState.d.ts +0 -2
  58. package/dist/apps/user-manager/views/school-teacher-manager/SchoolTeacherManagerView.d.ts +0 -11
  59. package/dist/apps/user-manager/views/school-teacher-manager/empty-state/SchoolTeacherManagerEmptyState.d.ts +0 -2
  60. package/dist/shared/hooks/useBulkCheckboxManager.d.ts +0 -17
  61. package/dist/shared/hooks/useVideoMixin.d.ts +0 -2
@@ -20,7 +20,6 @@ export declare class DefaultApplication extends ReactApplication {
20
20
  editUpload(uploadId: string): void;
21
21
  series(id: string, params: HashObject): void;
22
22
  favoriteVideos(params: HashObject): void;
23
- mock(): void;
24
23
  catchAllRoutes(): void;
25
24
  notFound(): void;
26
25
  error(): void;
@@ -1,13 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import { FilterPayloadType } from 'apps/search/reducers';
3
3
  interface FilterActionsProps extends FilterPayloadType {
4
- className?: string;
5
4
  }
6
5
  export declare function FilterActions(props: FilterActionsProps): JSX.Element;
7
6
  export declare namespace FilterActions {
8
7
  var defaultProps: {
9
8
  active: boolean;
10
- className: string;
11
9
  };
12
10
  }
13
11
  export {};
@@ -1,7 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { SearchFilter } from 'apps/search/interfaces';
3
2
  interface CheckboxFilterProps {
4
- filter: SearchFilter;
5
3
  }
6
4
  export declare function CheckboxFilter(props: CheckboxFilterProps): JSX.Element;
7
5
  export {};
@@ -1,6 +1,4 @@
1
1
  export * from './checkbox-filter/CheckboxFilter';
2
2
  export * from './more-filters/MoreFilters';
3
- export * from './switch-filter/SwitchFilter';
4
- export * from './dropdown-filter/DropdownFilter';
5
3
  export * from './radio-filter/RadioFilter';
6
- export * from './radio-filter/year-level/YearLevelRadioFilter';
4
+ export * from './switch-filter/SwitchFilter';
@@ -1,7 +1,2 @@
1
1
  /// <reference types="react" />
2
- interface PartialSearchFiltersProps {
3
- count?: number;
4
- hideHeading?: boolean;
5
- }
6
- export declare function PartialSearchFilters({ count, hideHeading }: PartialSearchFiltersProps): JSX.Element;
7
- export {};
2
+ export declare function PartialSearchFilters(): JSX.Element;
@@ -1,11 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { HashObject } from '@clickview/common';
3
- import { SearchFilter, MoreFilters } from 'apps/search/interfaces';
4
3
  interface SearchFiltersProps {
5
4
  queryParams: HashObject;
6
- mainFilters: SearchFilter[];
7
- moreFilters?: MoreFilters;
8
- hideHeading?: boolean;
9
5
  }
10
- export declare function SearchFilters(props: SearchFiltersProps): JSX.Element;
6
+ export declare function SearchFilters({ queryParams }: SearchFiltersProps): JSX.Element;
11
7
  export {};
@@ -1,4 +1,4 @@
1
1
  import { Flight } from '@clickview/common';
2
2
  export declare const SearchRequests: {
3
- search(query: string): Flight.SimulatedRequest;
3
+ search(query: string): Flight.Request;
4
4
  };
@@ -1,19 +1,17 @@
1
- /// <reference types="react" />
2
- export declare type FilterIds = 'sortName' | 'yearLevel' | 'objectType' | 'ratings' | 'interactives' | 'clips' | 'classroom' | 'moreFilters';
3
- export declare type FilterType = 'radio' | 'checkbox' | 'switch' | 'more-filters' | 'rating' | 'dropdown';
1
+ export declare type FilterNames = 'yearLevels' | 'type' | 'ratings' | 'interactives' | 'clips' | 'moreFilters';
2
+ export declare type FilterType = 'radio' | 'checkbox' | 'switch' | 'more-filters' | 'rating';
4
3
  export interface SearchFilter {
5
- id: FilterIds;
6
- name: string;
4
+ name: FilterNames;
5
+ label: string;
7
6
  type: FilterType;
8
7
  description?: string;
9
8
  options?: FilterOption[];
10
- customComponent?: (props?: any) => JSX.Element;
11
9
  }
12
10
  export interface MoreFilters extends SearchFilter {
13
11
  filters: SearchFilter[];
14
12
  }
15
13
  export interface FilterOption {
16
- id: string;
17
14
  name: string;
15
+ label: string;
18
16
  default?: boolean;
19
17
  }
@@ -1,32 +1,28 @@
1
1
  /// <reference types="react" />
2
2
  import { ReducerActions } from '@clickview/common';
3
- import { SearchFilter, FilterIds, FilterOption } from 'apps/search/interfaces';
3
+ import { SearchFilter, FilterNames, FilterOption } from 'apps/search/interfaces';
4
4
  export declare type FilterState = {
5
- active: boolean;
6
- selection?: FilterOption[];
7
- };
8
- declare type FilterStateHashFilters = {
9
- [key in FilterIds]: FilterState;
10
- };
11
- export declare type FilterStateHash = FilterStateHashFilters & {
12
- bulkReset?: boolean;
5
+ [key in FilterNames]: {
6
+ active: boolean;
7
+ selection?: FilterOption;
8
+ };
13
9
  };
14
- export declare type FilterActionType = 'apply' | 'reset' | 'bulk-reset' | 'trigger-reset';
10
+ export declare type FilterActionType = 'apply' | 'reset' | 'bulk-reset';
15
11
  export interface FilterPayloadType {
16
12
  filter: SearchFilter;
17
13
  active: boolean;
18
- selection?: FilterOption[];
14
+ selection?: FilterOption;
19
15
  }
20
16
  /**
21
17
  * Context
22
18
  */
23
19
  interface FilterContextType {
24
- state: FilterStateHash;
20
+ state: FilterState;
25
21
  dispatch: React.Dispatch<ReducerActions<FilterActionType>>;
26
22
  }
27
23
  export declare const FilterContext: import("react").Context<FilterContextType>;
28
24
  /**
29
- * Reducer - root level keys should match the filter object's corresponding "id" field
25
+ * Reducer - root level keys should match the filter object's corresponding "name" field
30
26
  */
31
- export declare function FilterReducer(state: FilterStateHash, action: ReducerActions<FilterActionType, FilterPayloadType>): FilterStateHash;
27
+ export declare function FilterReducer(state: FilterState, action: ReducerActions<FilterActionType, FilterPayloadType>): FilterState;
32
28
  export {};
@@ -1,46 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import { HashObject } from '@clickview/common';
3
3
  import { SearchFilter, MoreFilters, FilterType, FilterProps, FilterOption } from 'apps/search/interfaces';
4
- import { FilterStateHash, FilterPayloadType, FilterState } from 'apps/search/reducers';
5
- import { MockYearLevel, MockClassroom } from 'apps/user-manager/interfaces';
6
- interface WithStatementObject {
7
- sortKey?: string;
8
- sortValue?: string;
9
- assocs?: string[];
10
- }
11
- declare type FiltersDictionary = {
12
- [key: string]: (options?: any) => SearchFilter;
13
- };
14
- export declare const Filters: FiltersDictionary;
4
+ import { FilterState, FilterPayloadType } from 'apps/search/reducers';
15
5
  export declare const FilterHelper: {
6
+ getMainFilters(): SearchFilter[];
16
7
  getMoreFilters(): MoreFilters;
17
8
  mapTypeToComponent(type: FilterType): (props: FilterProps) => JSX.Element;
18
- deriveInitialStateFromQuery(queryParams?: HashObject<any>, mainFilters?: SearchFilter[], moreFilters?: MoreFilters): FilterStateHash;
19
- hasActiveFilters(queryParams: HashObject<any>): boolean;
20
- getLabel(filter: SearchFilter, filterState: FilterState): string;
9
+ deriveInitialStateFromQuery(queryParams?: HashObject<any>, mainFilters?: SearchFilter[], moreFilters?: MoreFilters): FilterState;
21
10
  buildQueryParams(queryParams: HashObject<any>, state: FilterPayloadType): HashObject<any>;
22
- /**
23
- * This returns an object of all of the query params our search requests will pass to the backend endpoint.
24
- * This usually consists of:
25
- * q = the query string e.g. 'shakespeare'
26
- * filter = the filter string e.g. '{interactives:true,classroom:classroom-2-a,classroom:classroom-2-b}'
27
- * query = the with statement e.g. '{orderbydesc:name}series,season,interactives,resources,subtitles'
28
- */
29
- getBackendQueryParams(queryParams: HashObject<any>): HashObject<any>;
30
- /**
31
- * This functions purpose is to convert a with statement string into an object that is easy to use
32
- * in mock backends for sorting/filtering mock data. It doesn't need to be efficient, as it should
33
- * never ever be used in production
34
- */
35
- convertWithStatementToObject(withStatement: string): WithStatementObject;
36
- revertFilterString(filterString: string): HashObject<any>;
37
- /**
38
- * Helpers below this comment return hard coded filter options for a particular filter.
39
- * If you are adding a new filter with hard coded options, add a new function here.
40
- */
41
- getObjectTypeOptions(): FilterOption[];
42
- getNameSortOptions(): FilterOption[];
43
- getYearLevelOptions(yearLevels: MockYearLevel[]): FilterOption[];
44
- getClassroomOptions(classrooms: MockClassroom[]): FilterOption[];
11
+ hasActiveFilters(queryParams: HashObject<any>): boolean;
12
+ getTypeOptions(): FilterOption[];
13
+ getRadioParamValue(selection: FilterOption): string;
45
14
  };
46
- export {};