@lblod/ember-rdfa-editor-lblod-plugins 17.1.0 → 17.1.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @lblod/ember-rdfa-editor-lblod-plugins
2
2
 
3
+ ## 17.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#415](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/415) [`dff79133f9072cb1a817ed73588ffe8dea315479`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/dff79133f9072cb1a817ed73588ffe8dea315479) Thanks [@elpoelma](https://github.com/elpoelma)! - When passing a `content` argument to the `insertStructure` command, do not run the `wrapStructureContent` command
8
+
9
+ - [#416](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/416) [`4b40cafe3aee7846e44f0a5be7c5330ced28736e`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/4b40cafe3aee7846e44f0a5be7c5330ced28736e) Thanks [@dkozickis](https://github.com/dkozickis)! - GN-4816: Fix selecting snippet list when pressing on a checkbox
10
+
3
11
  ## 17.1.0
4
12
 
5
13
  ### Minor Changes
@@ -30,7 +30,19 @@ export default class SnippetListViewComponent extends Component<Args> {
30
30
  }
31
31
 
32
32
  @action
33
- onClickRow(snippetList: SnippetList) {
33
+ onClickRow(snippetList: SnippetList, event: Event) {
34
+ if (!(event.target instanceof HTMLElement)) {
35
+ return;
36
+ }
37
+
38
+ const target = event.target;
39
+
40
+ // Only trigger the action when clicking on a td or tr element
41
+ // This is to prevent the action from being triggered when clicking on a checkbox
42
+ if (target.tagName !== 'TD' && target.tagName !== 'TR') {
43
+ return;
44
+ }
45
+
34
46
  const snippetListId = snippetList.id;
35
47
 
36
48
  if (!snippetListId) {
@@ -17,7 +17,10 @@ const insertStructure = (
17
17
  ): Command => {
18
18
  return (state, dispatch) => {
19
19
  const { schema, selection, doc } = state;
20
- if (wrapStructureContent(structureSpec, intl)(state, dispatch)) {
20
+ if (
21
+ !content &&
22
+ wrapStructureContent(structureSpec, intl)(state, dispatch)
23
+ ) {
21
24
  return true;
22
25
  }
23
26
  const insertionRange = findInsertionRange({
@@ -9,7 +9,7 @@ interface Args {
9
9
  }
10
10
  export default class SnippetListViewComponent extends Component<Args> {
11
11
  onChange(snippetId: string, isSelected: boolean): void;
12
- onClickRow(snippetList: SnippetList): void;
12
+ onClickRow(snippetList: SnippetList, event: Event): void;
13
13
  get snippetLists(): SnippetList[];
14
14
  }
15
15
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lblod/ember-rdfa-editor-lblod-plugins",
3
- "version": "17.1.0",
3
+ "version": "17.1.1",
4
4
  "description": "Ember addon providing lblod specific plugins for the ember-rdfa-editor",
5
5
  "keywords": [
6
6
  "ember-addon",