@windward/core 0.13.0 → 0.15.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/bitbucket-pipelines.yml +8 -0
  3. package/components/Content/Blocks/UserUpload/ManageDataTableUserFiles.vue +2 -11
  4. package/components/Content/Blocks/Video.vue +1 -1
  5. package/components/Glossary/GlossaryVerification.vue +240 -0
  6. package/components/Navigation/Items/AskTheExpert.vue +1 -37
  7. package/components/Navigation/Items/GlossaryNav.vue +8 -2
  8. package/components/Navigation/Items/UserUploadNav.vue +10 -2
  9. package/components/Settings/AccordionSettings.vue +37 -27
  10. package/components/Settings/ClickableIconsSettings.vue +34 -7
  11. package/components/Settings/ImageSettings.vue +5 -12
  12. package/components/Settings/TabSettings.vue +33 -23
  13. package/components/Settings/TextEditorSettings.vue +16 -245
  14. package/components/Settings/VideoSettings.vue +1 -1
  15. package/components/utils/ContentViewer.vue +3 -3
  16. package/components/utils/TinyMCEWrapper.vue +24 -14
  17. package/components/utils/glossary/CourseGlossary.vue +66 -91
  18. package/components/utils/glossary/CourseGlossaryForm.vue +42 -13
  19. package/components/utils/glossary/GlossaryToolTip.vue +7 -11
  20. package/helpers/GlossaryHelper.ts +18 -16
  21. package/i18n/en-US/pages/glossary.ts +3 -1
  22. package/i18n/en-US/shared/notification.ts +5 -0
  23. package/i18n/en-US/shared/permission.ts +4 -0
  24. package/i18n/es-ES/pages/glossary.ts +3 -1
  25. package/i18n/es-ES/shared/notification.ts +5 -0
  26. package/i18n/es-ES/shared/permission.ts +8 -4
  27. package/i18n/sv-SE/pages/glossary.ts +3 -1
  28. package/i18n/sv-SE/shared/notification.ts +4 -0
  29. package/i18n/sv-SE/shared/permission.ts +8 -4
  30. package/jest.config.js +3 -0
  31. package/models/BaseModel.ts +16 -0
  32. package/models/CourseGlossaryTerm.ts +22 -0
  33. package/models/UserFileAsset.ts +1 -0
  34. package/package.json +4 -3
  35. package/pages/glossary.vue +11 -3
  36. package/pages/userUpload.vue +1 -1
  37. package/plugin.js +32 -22
  38. package/store/glossary.js +57 -0
  39. package/test/Components/Content/Blocks/Feedback.spec.js +3 -1
  40. package/test/Components/Content/Blocks/Video.spec.js +2 -2
  41. package/test/Components/Glossary/GlossaryVerification.spec.js +19 -0
  42. package/test/Components/utils/glossary/CourseGlossary.spec.js +19 -0
  43. package/test/Components/utils/glossary/CourseGlossaryForm.spec.js +28 -0
  44. package/test/__mocks__/helpersMock.js +0 -24
  45. package/test/__mocks__/modelMock.js +5 -0
  46. package/test/helpers/GlossaryHelper.spec.js +32 -14
  47. package/test/mocks.js +11 -0
  48. package/test/setup/before.js +15 -0
  49. package/helpers/GlossaryTerm.ts +0 -31
@@ -0,0 +1,15 @@
1
+ // Mocks to run BEFORE any other imports take place
2
+ // window.matchMedia is required for tinyMCE unit tests since it doesn't check if that function exists
3
+ Object.defineProperty(window, 'matchMedia', {
4
+ writable: true,
5
+ value: jest.fn().mockImplementation((query) => ({
6
+ matches: false,
7
+ media: query,
8
+ onchange: null,
9
+ addListener: jest.fn(), // Deprecated
10
+ removeListener: jest.fn(), // Deprecated
11
+ addEventListener: jest.fn(),
12
+ removeEventListener: jest.fn(),
13
+ dispatchEvent: jest.fn(),
14
+ })),
15
+ })
@@ -1,31 +0,0 @@
1
- class GlossaryTerm {
2
-
3
- term!: string
4
-
5
- definition!: string
6
-
7
- alternate_forms: any = null
8
-
9
- related_term: any =null
10
-
11
- private required: string[] = ['term', 'definition']
12
-
13
- constructor(params: any) {
14
- this.required.forEach((field) => {
15
- if (!params[field]) {
16
- throw new Error('Glossary term ' + field + ' is required')
17
- }
18
- })
19
-
20
- this.term = params.term
21
- this.definition = params.definition
22
- this.alternate_forms = params.alternate_forms || null
23
- this.related_term = params.related_term || null
24
- }
25
-
26
- public static toString(){
27
-
28
- }
29
- }
30
-
31
- export default GlossaryTerm