@vocollege/app 0.0.56 → 0.0.59

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 (120) hide show
  1. package/dist/{types.d.ts → global.d.ts} +4 -0
  2. package/dist/{types.js → global.js} +0 -0
  3. package/dist/index.d.ts +3 -2
  4. package/dist/index.js +9 -3
  5. package/dist/interceptor.js +41 -12
  6. package/dist/modules/Services/I18n/I18n.js +1 -1
  7. package/dist/modules/Services/I18n/strings.json +716 -21
  8. package/dist/modules/Services/Vapor/Vapor.js +15 -7
  9. package/dist/modules/VoApi/GraphClient.d.ts +3 -2
  10. package/dist/modules/VoApi/GraphClient.js +57 -14
  11. package/dist/modules/VoApi/VoApi.d.ts +4 -1
  12. package/dist/modules/VoApi/VoApi.js +20 -2
  13. package/dist/modules/VoApi/graphql.d.ts +32 -0
  14. package/dist/modules/VoApi/graphql.js +57 -0
  15. package/dist/modules/VoApi/index.d.ts +1 -21
  16. package/dist/modules/VoApi/index.js +7 -31
  17. package/dist/modules/VoApi/mutations/acl.js +5 -5
  18. package/dist/modules/VoApi/mutations/applications.d.ts +3 -0
  19. package/dist/modules/VoApi/mutations/applications.js +12 -0
  20. package/dist/modules/VoApi/mutations/articles.js +3 -3
  21. package/dist/modules/VoApi/mutations/books.d.ts +3 -0
  22. package/dist/modules/VoApi/mutations/books.js +12 -0
  23. package/dist/modules/VoApi/mutations/cards.d.ts +3 -0
  24. package/dist/modules/VoApi/mutations/cards.js +12 -0
  25. package/dist/modules/VoApi/mutations/events.d.ts +3 -0
  26. package/dist/modules/VoApi/mutations/events.js +12 -0
  27. package/dist/modules/VoApi/mutations/navigation.js +3 -3
  28. package/dist/modules/VoApi/mutations/pages.js +3 -3
  29. package/dist/modules/VoApi/mutations/queues.js +3 -3
  30. package/dist/modules/VoApi/mutations/sections.d.ts +3 -0
  31. package/dist/modules/VoApi/mutations/sections.js +12 -0
  32. package/dist/modules/VoApi/mutations/settings.js +1 -1
  33. package/dist/modules/VoApi/mutations/users.js +3 -3
  34. package/dist/modules/VoApi/mutations/vodocs.js +9 -9
  35. package/dist/modules/VoApi/mutations/vogroups.d.ts +1 -0
  36. package/dist/modules/VoApi/mutations/vogroups.js +10 -9
  37. package/dist/modules/VoApi/queries/acl.js +4 -4
  38. package/dist/modules/VoApi/queries/applications.d.ts +2 -0
  39. package/dist/modules/VoApi/queries/applications.js +11 -0
  40. package/dist/modules/VoApi/queries/articles.js +2 -2
  41. package/dist/modules/VoApi/queries/books.d.ts +4 -0
  42. package/dist/modules/VoApi/queries/books.js +13 -0
  43. package/dist/modules/VoApi/queries/cards.d.ts +2 -0
  44. package/dist/modules/VoApi/queries/cards.js +11 -0
  45. package/dist/modules/VoApi/queries/events.d.ts +2 -0
  46. package/dist/modules/VoApi/queries/events.js +11 -0
  47. package/dist/modules/VoApi/queries/help.d.ts +1 -0
  48. package/dist/modules/VoApi/queries/help.js +11 -0
  49. package/dist/modules/VoApi/queries/navigation.js +4 -4
  50. package/dist/modules/VoApi/queries/pages.js +2 -2
  51. package/dist/modules/VoApi/queries/queues.js +2 -2
  52. package/dist/modules/VoApi/queries/search.d.ts +2 -0
  53. package/dist/modules/VoApi/queries/search.js +5 -3
  54. package/dist/modules/VoApi/queries/sections.d.ts +2 -0
  55. package/dist/modules/VoApi/queries/sections.js +11 -0
  56. package/dist/modules/VoApi/queries/settings.js +1 -1
  57. package/dist/modules/VoApi/queries/users.d.ts +1 -0
  58. package/dist/modules/VoApi/queries/users.js +5 -4
  59. package/dist/modules/VoApi/queries/vodocs.js +3 -3
  60. package/dist/modules/VoApi/queries/vogroups.d.ts +1 -0
  61. package/dist/modules/VoApi/queries/vogroups.js +9 -8
  62. package/dist/modules/VoApp.d.ts +1 -0
  63. package/dist/modules/VoApp.js +17 -0
  64. package/dist/modules/VoAuth.d.ts +2 -1
  65. package/dist/modules/VoAuth.js +126 -42
  66. package/dist/modules/VoBase.js +2 -2
  67. package/dist/modules/VoConfig.js +10 -0
  68. package/dist/modules/VoDocs/VoDocs.d.ts +1 -2
  69. package/dist/modules/VoDocs/VoDocs.js +12 -44
  70. package/dist/modules/VoGroups.d.ts +7 -0
  71. package/dist/modules/VoGroups.js +39 -0
  72. package/dist/modules/VoHelpers.d.ts +38 -1
  73. package/dist/modules/VoHelpers.js +348 -51
  74. package/dist/modules/VoRouter.js +10 -2
  75. package/dist/modules/{VoUtils.d.ts → VoUtils_REMOVE.d.ts} +1 -1
  76. package/dist/modules/{VoUtils.js → VoUtils_REMOVE.js} +16 -12
  77. package/package.json +17 -8
  78. package/src/global.ts +44 -0
  79. package/src/index.ts +3 -2
  80. package/src/interceptor.ts +39 -8
  81. package/src/modules/Services/I18n/strings.json +718 -22
  82. package/src/modules/Services/Vapor/Vapor.ts +14 -15
  83. package/src/modules/VoApi/GraphClient.ts +87 -24
  84. package/src/modules/VoApi/VoApi.ts +23 -3
  85. package/src/modules/VoApi/graphql.ts +47 -0
  86. package/src/modules/VoApi/index.ts +1 -37
  87. package/src/modules/VoApi/mutations/applications.ts +27 -0
  88. package/src/modules/VoApi/mutations/books.ts +27 -0
  89. package/src/modules/VoApi/mutations/cards.ts +27 -0
  90. package/src/modules/VoApi/mutations/events.ts +27 -0
  91. package/src/modules/VoApi/mutations/queues.ts +9 -1
  92. package/src/modules/VoApi/mutations/sections.ts +27 -0
  93. package/src/modules/VoApi/mutations/settings.ts +11 -3
  94. package/src/modules/VoApi/mutations/users.ts +19 -9
  95. package/src/modules/VoApi/mutations/vodocs.ts +4 -0
  96. package/src/modules/VoApi/mutations/vogroups.ts +21 -7
  97. package/src/modules/VoApi/queries/applications.ts +71 -0
  98. package/src/modules/VoApi/queries/articles.ts +26 -4
  99. package/src/modules/VoApi/queries/books.ts +101 -0
  100. package/src/modules/VoApi/queries/cards.ts +87 -0
  101. package/src/modules/VoApi/queries/events.ts +80 -0
  102. package/src/modules/VoApi/queries/help.ts +12 -0
  103. package/src/modules/VoApi/queries/navigation.ts +3 -4
  104. package/src/modules/VoApi/queries/pages.ts +29 -4
  105. package/src/modules/VoApi/queries/queues.ts +69 -4
  106. package/src/modules/VoApi/queries/search.ts +105 -4
  107. package/src/modules/VoApi/queries/sections.ts +63 -0
  108. package/src/modules/VoApi/queries/settings.ts +9 -3
  109. package/src/modules/VoApi/queries/users.ts +93 -8
  110. package/src/modules/VoApi/queries/vodocs.ts +8 -4
  111. package/src/modules/VoApi/queries/vogroups.ts +48 -2
  112. package/src/modules/VoApp.ts +25 -8
  113. package/src/modules/VoAuth.ts +136 -37
  114. package/src/modules/VoConfig.ts +13 -0
  115. package/src/modules/VoDocs/VoDocs.ts +31 -58
  116. package/src/modules/VoGroups.ts +33 -0
  117. package/src/modules/VoHelpers.ts +283 -43
  118. package/src/modules/VoRouter.ts +10 -3
  119. package/src/modules/{VoUtils.ts → VoUtils_REMOVE.ts} +17 -13
  120. package/src/types.ts +0 -38
@@ -1,8 +1,20 @@
1
- import { gql } from '@apollo/client';
1
+ import { gql } from "@apollo/client";
2
2
 
3
3
  export const SEARCH_CONTENT = gql`
4
- query SearchContent($search: String!, $types: String, $primaryField: String) {
5
- searchContent(search: $search, types: $types, primaryField: $primaryField) {
4
+ query SearchContent(
5
+ $search: String!
6
+ $types: [String]
7
+ $primaryField: String
8
+ $limit: Int
9
+ $entity: Boolean
10
+ ) {
11
+ searchContent(
12
+ search: $search
13
+ types: $types
14
+ primaryField: $primaryField
15
+ limit: $limit
16
+ entity: $entity
17
+ ) {
6
18
  id
7
19
  title
8
20
  type
@@ -14,4 +26,93 @@ export const SEARCH_CONTENT = gql`
14
26
  }
15
27
  }
16
28
  }
17
- `;
29
+ `;
30
+
31
+ export const SEARCH_USER = gql`
32
+ query SearchUser(
33
+ $search: String!
34
+ $roles: [String]
35
+ $limit: Int
36
+ $entity: Boolean
37
+ ) {
38
+ searchUser(search: $search, roles: $roles, limit: $limit, entity: $entity) {
39
+ id
40
+ name
41
+ email
42
+ firstname
43
+ lastname
44
+ type
45
+ }
46
+ }
47
+ `;
48
+
49
+ export const SEARCH_GROUP = gql`
50
+ query SearchGroup($categories: [String], $search: String!, $limit: Int) {
51
+ searchGroup(categories: $categories, search: $search, limit: $limit) {
52
+ id
53
+ name
54
+ title
55
+ category
56
+ certified
57
+ type
58
+ logo {
59
+ id
60
+ title
61
+ filename
62
+ filesize
63
+ filetype
64
+ url
65
+ }
66
+ logo2 {
67
+ id
68
+ title
69
+ filename
70
+ filesize
71
+ filetype
72
+ url
73
+ }
74
+ parentGroups {
75
+ id
76
+ name
77
+ title
78
+ logo {
79
+ id
80
+ title
81
+ filename
82
+ filesize
83
+ filetype
84
+ url
85
+ }
86
+ logo2 {
87
+ id
88
+ title
89
+ filename
90
+ filesize
91
+ filetype
92
+ url
93
+ }
94
+ parentGroups {
95
+ id
96
+ name
97
+ title
98
+ logo {
99
+ id
100
+ title
101
+ filename
102
+ filesize
103
+ filetype
104
+ url
105
+ }
106
+ logo2 {
107
+ id
108
+ title
109
+ filename
110
+ filesize
111
+ filetype
112
+ url
113
+ }
114
+ }
115
+ }
116
+ }
117
+ }
118
+ `;
@@ -0,0 +1,63 @@
1
+ import { gql } from "@apollo/client";
2
+
3
+ export const GET_SECTION = gql`
4
+ query Section($id: ID!) {
5
+ section(id: $id) {
6
+ id
7
+ title
8
+ body
9
+ status
10
+ author {
11
+ ... on User {
12
+ id
13
+ name
14
+ type
15
+ }
16
+ }
17
+ template
18
+ image_full
19
+ images {
20
+ id
21
+ title
22
+ filename
23
+ filesize
24
+ filetype
25
+ url
26
+ }
27
+ created_at
28
+ updated_at
29
+ }
30
+ }
31
+ `;
32
+
33
+ export const GET_SECTIONS = gql`
34
+ query Sections(
35
+ $search: String
36
+ $page: Int
37
+ $limit: Int
38
+ $orderBy: [GetSectionsOrderByClause]
39
+ ) {
40
+ sections(search: $search, page: $page, limit: $limit, orderBy: $orderBy) {
41
+ paginatorInfo {
42
+ total
43
+ currentPage
44
+ hasMorePages
45
+ }
46
+ data {
47
+ id
48
+ title
49
+ status
50
+ author {
51
+ ... on User {
52
+ id
53
+ name
54
+ type
55
+ }
56
+ }
57
+ template
58
+ created_at
59
+ updated_at
60
+ }
61
+ }
62
+ }
63
+ `;
@@ -1,4 +1,4 @@
1
- import { gql } from '@apollo/client';
1
+ import { gql } from "@apollo/client";
2
2
 
3
3
  export const GET_SETTINGS = gql`
4
4
  query Settings {
@@ -6,8 +6,14 @@ export const GET_SETTINGS = gql`
6
6
  name
7
7
  category
8
8
  value
9
+ file {
10
+ id
11
+ title
12
+ filename
13
+ filesize
14
+ filetype
15
+ url
16
+ }
9
17
  }
10
18
  }
11
19
  `;
12
-
13
-
@@ -1,25 +1,50 @@
1
- import { gql } from '@apollo/client';
1
+ import { gql } from "@apollo/client";
2
2
 
3
3
  export const GET_USER = gql`
4
4
  query User($id: ID!) {
5
5
  user(id: $id) {
6
6
  id
7
7
  name
8
- email,
9
- firstname,
10
- lastname,
8
+ email
9
+ firstname
10
+ lastname
11
+ active
12
+ personal_number
13
+ address1
14
+ address2
15
+ postalcode
16
+ town
17
+ country
18
+ phone1
19
+ profession
20
+ status
21
+ gdpr
22
+ description
11
23
  updated_at
12
24
  created_at
13
- groups {
25
+ images {
14
26
  id
15
27
  title
16
- type
28
+ filename
29
+ filesize
30
+ filetype
31
+ url
17
32
  }
18
33
  roles {
19
34
  id
20
35
  label
21
36
  type
22
37
  }
38
+ groupRoles {
39
+ id
40
+ label
41
+ type
42
+ }
43
+ groups {
44
+ id
45
+ title
46
+ type
47
+ }
23
48
  }
24
49
  }
25
50
  `;
@@ -43,7 +68,7 @@ export const GET_USERS = gql`
43
68
  $search: String
44
69
  $page: Int
45
70
  $limit: Int
46
- $orderBy: [GetUsersOrderByOrderByClause]
71
+ $orderBy: [GetUsersOrderByClause]
47
72
  ) {
48
73
  users(search: $search, page: $page, limit: $limit, orderBy: $orderBy) {
49
74
  paginatorInfo {
@@ -55,9 +80,69 @@ export const GET_USERS = gql`
55
80
  id
56
81
  name
57
82
  email
83
+ active
84
+ status
85
+ updated_at
86
+ created_at
87
+ roles {
88
+ id
89
+ label
90
+ type
91
+ }
92
+ groupRoles {
93
+ id
94
+ label
95
+ type
96
+ }
97
+ groups {
98
+ id
99
+ name
100
+ title
101
+ }
102
+ validig {
103
+ id
104
+ }
58
105
  }
59
106
  }
60
107
  }
61
108
  `;
62
109
 
63
-
110
+ export const GET_ACCOUNT = gql`
111
+ query Account($id: ID!) {
112
+ user(id: $id) {
113
+ id
114
+ name
115
+ email
116
+ firstname
117
+ lastname
118
+ active
119
+ personal_number
120
+ address1
121
+ address2
122
+ postalcode
123
+ town
124
+ country
125
+ phone1
126
+ profession
127
+ status
128
+ description
129
+ workplace
130
+ gdpr
131
+ images {
132
+ id
133
+ title
134
+ filename
135
+ filesize
136
+ filetype
137
+ url
138
+ }
139
+ }
140
+ userSettings {
141
+ publicDefaultPortfolio {
142
+ id
143
+ name
144
+ disk
145
+ }
146
+ }
147
+ }
148
+ `;
@@ -5,12 +5,13 @@ export const GET_PORTFOLIO = gql`
5
5
  portfolio(id: $id) {
6
6
  id
7
7
  disk
8
+ status
8
9
  name
9
- disk
10
10
  title
11
11
  description
12
12
  created_at
13
13
  updated_at
14
+ type
14
15
  }
15
16
  }
16
17
  `;
@@ -20,7 +21,7 @@ export const GET_PORTFOLIOS = gql`
20
21
  $search: String
21
22
  $page: Int
22
23
  $limit: Int
23
- $orderBy: [GetPortfoliosOrderByOrderByClause]
24
+ $orderBy: [GetPortfoliosOrderByClause]
24
25
  ) {
25
26
  portfolios(search: $search, page: $page, limit: $limit, orderBy: $orderBy) {
26
27
  # paginatorInfo {
@@ -31,12 +32,13 @@ export const GET_PORTFOLIOS = gql`
31
32
  data {
32
33
  id
33
34
  disk
35
+ status
34
36
  name
35
- disk
36
37
  title
37
38
  description
38
39
  created_at
39
40
  updated_at
41
+ type
40
42
  }
41
43
  }
42
44
  }
@@ -49,7 +51,7 @@ export const GET_FOLDER_ELEMENTS = gql`
49
51
  $search: String
50
52
  $page: Int
51
53
  $limit: Int
52
- $orderBy: [GetFolderElementsOrderByOrderByClause]
54
+ $orderBy: [GetFolderElementsOrderByClause]
53
55
  $filetypes: [String]
54
56
  ) {
55
57
  folderElements(
@@ -97,6 +99,7 @@ export const GET_FOLDER_ELEMENTS = gql`
97
99
  description
98
100
  created_at
99
101
  updated_at
102
+ type
100
103
  }
101
104
  ... on File {
102
105
  id
@@ -112,6 +115,7 @@ export const GET_FOLDER_ELEMENTS = gql`
112
115
  updated_at
113
116
  url
114
117
  previewUrl
118
+ type
115
119
  }
116
120
  }
117
121
  }
@@ -9,6 +9,10 @@ export const GET_GROUP = gql`
9
9
  description
10
10
  body
11
11
  category
12
+ docs
13
+ website
14
+ educator_category
15
+ certified
12
16
  status
13
17
  url
14
18
  created_at
@@ -27,7 +31,15 @@ export const GET_GROUP = gql`
27
31
  filetype
28
32
  url
29
33
  }
30
- image {
34
+ logo2 {
35
+ id
36
+ title
37
+ filename
38
+ filesize
39
+ filetype
40
+ url
41
+ }
42
+ logo3 {
31
43
  id
32
44
  title
33
45
  filename
@@ -41,6 +53,28 @@ export const GET_GROUP = gql`
41
53
  email
42
54
  firstname
43
55
  lastname
56
+ type
57
+ groupRoles {
58
+ id
59
+ label
60
+ type
61
+ }
62
+ }
63
+ contacts {
64
+ id
65
+ title
66
+ type
67
+ }
68
+ vopage
69
+ front_title
70
+ front_body
71
+ images {
72
+ id
73
+ title
74
+ filename
75
+ filesize
76
+ filetype
77
+ url
44
78
  }
45
79
  }
46
80
  allGroups(categories: $categories) {
@@ -50,12 +84,22 @@ export const GET_GROUP = gql`
50
84
  }
51
85
  `;
52
86
 
87
+ export const GET_AVAILABLE_GROUPS = gql`
88
+ query Group($categories: [String], $byPassMembership: Boolean) {
89
+ allGroups(categories: $categories, byPassMembership: $byPassMembership) {
90
+ id
91
+ title
92
+ category
93
+ }
94
+ }
95
+ `;
96
+
53
97
  export const GET_GROUPS = gql`
54
98
  query Groups(
55
99
  $search: String
56
100
  $page: Int
57
101
  $limit: Int
58
- $orderBy: [GetGroupsOrderByOrderByClause]
102
+ $orderBy: [GetGroupsOrderByClause]
59
103
  ) {
60
104
  groups(search: $search, page: $page, limit: $limit, orderBy: $orderBy) {
61
105
  paginatorInfo {
@@ -67,7 +111,9 @@ export const GET_GROUPS = gql`
67
111
  id
68
112
  name
69
113
  title
114
+ category
70
115
  status
116
+ vopage
71
117
  created_at
72
118
  updated_at
73
119
  }
@@ -1,12 +1,29 @@
1
- import VoApi from './VoApi';
2
- import VoConfig from './VoConfig';
3
- import VoRouter from './VoRouter';
1
+ import VoApi from "./VoApi";
2
+ import VoConfig from "./VoConfig";
3
+ import VoRouter from "./VoRouter";
4
+ import { localStorage } from "./VoHelpers";
5
+ import { toast } from "react-toastify";
6
+ import I18n from "./Services/I18n";
4
7
 
5
8
  class VoApp {
6
- configure(config: any, routes: any) {
7
- VoConfig.setConfig(config);
8
- VoRouter.setRoutes(routes);
9
- VoApi.init();
9
+ configure(config: any, routes: any) {
10
+ VoConfig.setConfig(config);
11
+ VoRouter.setRoutes(routes);
12
+ VoApi.init();
13
+ }
14
+ checkVersion() {
15
+ let storedVersion: any = localStorage.get("vo_app_version");
16
+ if (storedVersion) {
17
+ storedVersion = parseFloat(storedVersion);
10
18
  }
19
+ let currentVersion = parseFloat(VoConfig.get.APP_VERSION);
20
+ if (currentVersion && currentVersion !== storedVersion) {
21
+ toast.warning(I18n.get.messages.newVersionAvailable, {
22
+ autoClose: false,
23
+ });
24
+ localStorage.set("vo_app_version", `${currentVersion}`);
25
+ window.location.reload();
26
+ }
27
+ }
11
28
  }
12
- export default new VoApp();
29
+ export default new VoApp();