@windward/integrations 0.0.11 → 0.1.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.
@@ -1,5 +1,30 @@
1
1
  <template>
2
2
  <v-container>
3
+ <v-text-field
4
+ v-model="block.metadata.config.title"
5
+ outlined
6
+ :counter="50"
7
+ maxlength="50"
8
+ :label="
9
+ $t(
10
+ 'windward.integrations.components.settings.external_integration.lti_consumer.title'
11
+ )
12
+ "
13
+ ></v-text-field>
14
+ <v-textarea
15
+ v-model="block.metadata.config.instructions"
16
+ outlined
17
+ :counter="255"
18
+ maxlength="255"
19
+ :label="
20
+ $t(
21
+ 'windward.integrations.components.settings.external_integration.lti_consumer.instructions'
22
+ )
23
+ "
24
+ ></v-textarea>
25
+ <br />
26
+ <v-divider class="primary"></v-divider>
27
+ <br />
3
28
  <v-select
4
29
  v-model="block.metadata.config.launch_type"
5
30
  :label="
@@ -17,40 +42,55 @@
17
42
  )
18
43
  }}
19
44
  <v-list>
20
- <v-list-item
21
- v-for="consumer in consumers"
22
- :key="consumer.id"
23
- two-line
24
- :disabled="!consumer.enabled"
25
- @click="onSelectLink(consumer)"
45
+ <v-list-item-group
46
+ v-model="block.metadata.config.tool_id"
47
+ color="primary"
26
48
  >
27
- <v-list-item-avatar :color="!consumer.enabled ? 'error' : ''">
28
- <v-icon> mdi-shield-link-variant-outline </v-icon>
29
- </v-list-item-avatar>
30
- <v-list-item-content>
31
- <v-list-item-title>{{ consumer.name }}</v-list-item-title>
32
- <v-list-item-subtitle v-if="!consumer.enabled">
33
- <v-chip color="error">{{
34
- $t(
35
- 'windward.integrations.components.settings.external_integration.lti_consumer.link_disabled'
36
- )
37
- }}</v-chip>
38
- </v-list-item-subtitle>
39
- <v-list-item-subtitle>{{
40
- consumer.description.replace(/(<([^>]+)>)/gi, '').trim()
41
- }}</v-list-item-subtitle>
42
- </v-list-item-content>
43
- </v-list-item>
49
+ <v-list-item
50
+ v-for="consumer in consumers"
51
+ :key="consumer.id"
52
+ two-line
53
+ :disabled="!consumer.enabled"
54
+ :value="consumer.id"
55
+ >
56
+ <v-list-item-avatar
57
+ :color="!consumer.enabled ? 'error' : ''"
58
+ >
59
+ <v-icon> mdi-shield-link-variant-outline</v-icon>
60
+ </v-list-item-avatar>
61
+ <v-list-item-content color="secondary">
62
+ <v-list-item-title>{{
63
+ consumer.name
64
+ }}</v-list-item-title>
65
+ <v-list-item-subtitle v-if="!consumer.enabled">
66
+ <v-chip color="error"
67
+ >{{
68
+ $t(
69
+ 'windward.integrations.components.settings.external_integration.lti_consumer.link_disabled'
70
+ )
71
+ }}
72
+ </v-chip>
73
+ </v-list-item-subtitle>
74
+ <v-list-item-subtitle
75
+ >{{
76
+ consumer.description
77
+ .replace(/(<([^>]+)>)/gi, '')
78
+ .trim()
79
+ }}
80
+ </v-list-item-subtitle>
81
+ </v-list-item-content>
82
+ </v-list-item>
83
+ </v-list-item-group>
44
84
  </v-list>
45
85
  </v-container>
46
86
  </template>
47
87
 
48
88
  <script>
49
89
  import { mapGetters } from 'vuex'
90
+ import LtiConsumer from '../../../models/ExternalIntegration/LtiConsumer'
50
91
  import BaseContentSettings from '~/components/Content/Tool/BaseContentSettings.js'
51
92
  import Course from '~/models/Course'
52
93
  import Organization from '~/models/Organization'
53
- import Lti1p1Consumer from '../../../models/ExternalIntegration/Lti1p1Consumer'
54
94
 
55
95
  export default {
56
96
  name: 'ContentBlockExternalIntegrationLti1p1ConsumerSettings',
@@ -75,11 +115,17 @@ export default {
75
115
  ),
76
116
  value: 'inline',
77
117
  },
118
+ {
119
+ name: this.$t(
120
+ 'windward.integrations.components.settings.external_integration.lti_consumer.launch_type_modal'
121
+ ),
122
+ value: 'modal',
123
+ },
78
124
  ],
79
125
  }
80
126
  },
81
127
  async fetch() {
82
- this.consumers = await new Lti1p1Consumer()
128
+ this.consumers = await new LtiConsumer()
83
129
  .for(
84
130
  new Organization({ id: this.organization.id }),
85
131
  new Course({ id: this.course.id })
@@ -96,10 +142,6 @@ export default {
96
142
  watch: {},
97
143
  beforeMount() {},
98
144
  mounted() {},
99
- methods: {
100
- onSelectLink(consumer) {
101
- this.block.metadata.config.tool_id = consumer.id
102
- },
103
- },
145
+ methods: {},
104
146
  }
105
147
  </script>
@@ -1,5 +1,12 @@
1
1
  export default {
2
+ title: 'LTI Consumer Block Title',
3
+ instructions:
4
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam fringilla ipsum eget ante tempus blandit. Maecenas vel massa\n' +
5
+ 'nec tellus vestibulum porttitor non a enim.',
2
6
  launch: 'Launch',
7
+ goodbye: 'goodbye',
8
+ launch_in_new_window: 'launch {0} in new tab',
9
+ launch_in_modal: 'launch {0} in modal',
3
10
  configure_warning:
4
11
  'This block needs to be configured. Please select a LTI tool in the settings panel.',
5
12
  no_access:
@@ -1,13 +1,22 @@
1
1
  export default {
2
2
  key: 'Key',
3
+ issuer: 'Issuer',
3
4
  tool_public_keyset_url: 'Tool Keyset Url',
4
5
  tool_oidc_auth_endpoint: 'Tool OpenID Connect Endpoint',
6
+ login_hint: 'login hint',
7
+ platform_id: 'Platform Identifier',
8
+ platform_name: 'Platform Name',
5
9
  platform_public_keyset_url: 'Platform Keyset Url',
6
10
  platform_oidc_auth_endpoint: 'Platform OpenID Connect Endpoint',
7
- platform_client_id: 'Platform Client ID',
8
- platform_deployment_id: 'Platform Deployment ID',
11
+ platform_oauth2_access_token_url: 'Platform OAuth2 Access Token URL',
12
+ platform_oauth2_audience: 'Platform Oauth2 audience',
13
+ tool_client_id: 'Tool Client ID',
14
+ platform_deployment_id: 'Deployment ID',
15
+ enable_button_feedback:
16
+ 'Link can only be enabled once plateform client identifier and and keyset urls are set !',
9
17
  parameter_name: 'Custom Parameter Name',
10
18
  value: 'Value',
11
19
  new: 'New LTI Link',
12
20
  edit: 'Edit LTI Link',
21
+ view: 'View LTI link details',
13
22
  }
@@ -1,7 +1,10 @@
1
1
  export default {
2
+ title: 'title',
3
+ instructions: 'instructions',
2
4
  launch_type: 'Launch Type',
3
5
  launch_type_new_window: 'New Window',
4
6
  launch_type_inline_frame: 'Inline Frame',
7
+ launch_type_modal: 'Modal',
5
8
  link_select: 'Select a Link:',
6
9
  link_disabled: 'Link Disabled',
7
10
  }
@@ -1,13 +1,13 @@
1
1
  // @ts-ignore
2
2
  import Model from '~/models/Model'
3
3
 
4
- export default class Lti1p1Consumer extends Model {
4
+ export default class LtiConsumer extends Model {
5
5
  get required(): string[] {
6
6
  return []
7
7
  }
8
8
 
9
9
  // Set the resource route of the model
10
10
  resource() {
11
- return 'external-integrations/lti/1.1/consumers'
11
+ return 'external-integrations/lti/consumers'
12
12
  }
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windward/integrations",
3
- "version": "0.0.11",
3
+ "version": "0.1.0",
4
4
  "description": "Windward UI Plugin Integrations for 3rd Party Systems",
5
5
  "main": "plugin.js",
6
6
  "scripts": {
package/plugin.js CHANGED
@@ -216,7 +216,7 @@ export default {
216
216
  {
217
217
  tag: 'windward-integrations-lti-consumer-settings',
218
218
  template: LtiConsumerBlockSettings,
219
- context: ['block.windward-integrations-lti-consumer'],
219
+ context: ['block'],
220
220
  metadata: {
221
221
  icon: 'mdi-cog',
222
222
  name: 'windward.integrations.shared.settings.title.lti_consumer',