@lblod/ember-rdfa-editor-lblod-plugins 24.1.0 → 24.1.2

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,17 @@
1
1
  # @lblod/ember-rdfa-editor-lblod-plugins
2
2
 
3
+ ## 24.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`45068be`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/45068be46fccd98ad9af2afafcd423c9c5dfd5fd) Thanks [@abeforgit](https://github.com/abeforgit)! - fix word-wrapping in structure nodes
8
+
9
+ ## 24.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#488](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/488) [`8f665b9`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/8f665b907a1e89859b236d43c69beb941337dc48) Thanks [@lagartoverde](https://github.com/lagartoverde)! - Fix the person edit modal was not being resetted on closing
14
+
3
15
  ## 24.1.0
4
16
 
5
17
  ### Minor Changes
@@ -80,6 +80,5 @@ export default class LmbPluginInsertComponent extends Component<Args> {
80
80
  this.controller.doCommand(replaceSelectionWithAndSelectNode(node), {
81
81
  view: this.controller.mainEditorView,
82
82
  });
83
- this.closeModal();
84
83
  }
85
84
  }
@@ -43,7 +43,7 @@
43
43
  @services={{this.servicesResource}}
44
44
  @sort={{this.sort}}
45
45
  @setSort={{this.setSort}}
46
- @insert={{@onInsert}}
46
+ @insert={{this.onInsert}}
47
47
  />
48
48
  {{/if}}
49
49
  </div>
@@ -14,7 +14,7 @@ interface Args {
14
14
  config: LmbPluginConfig;
15
15
  open: boolean;
16
16
  closeModal: () => void;
17
- onInsert: () => void;
17
+ onInsert: (mandatee: Mandatee) => void;
18
18
  }
19
19
 
20
20
  export default class LmbPluginSearchModalComponent extends Component<Args> {
@@ -34,6 +34,8 @@ export default class LmbPluginSearchModalComponent extends Component<Args> {
34
34
 
35
35
  @action
36
36
  async closeModal() {
37
+ this.inputSearchText = null;
38
+ this.sort = false;
37
39
  await this.servicesResource.cancel();
38
40
  this.args.closeModal();
39
41
  }
@@ -45,6 +47,13 @@ export default class LmbPluginSearchModalComponent extends Component<Args> {
45
47
  // TODO Either make this a trackedFunction or do filtering on the query and correctly pass an
46
48
  // AbortController
47
49
  search = restartableTask(async () => {
50
+ if (!this.args.open) {
51
+ return {
52
+ results: [],
53
+ totalCount: 0,
54
+ };
55
+ }
56
+
48
57
  // Can't do what I want, so if the user modifies the filter before resolving the query will run again
49
58
  if (!this.fetchData.lastComplete) {
50
59
  try {
@@ -108,6 +117,7 @@ export default class LmbPluginSearchModalComponent extends Component<Args> {
108
117
  this.sort,
109
118
  this.pageNumber,
110
119
  this.pageSize,
120
+ this.args.open,
111
121
  ]);
112
122
 
113
123
  @action
@@ -133,4 +143,9 @@ export default class LmbPluginSearchModalComponent extends Component<Args> {
133
143
  nextPage() {
134
144
  ++this.pageNumber;
135
145
  }
146
+ @action
147
+ async onInsert(mandatee: Mandatee) {
148
+ this.args.onInsert(mandatee);
149
+ await this.closeModal();
150
+ }
136
151
  }
@@ -26,7 +26,7 @@
26
26
  }
27
27
  padding: 0;
28
28
  white-space: break-spaces;
29
- word-break: break-all;
29
+ word-break: break-word;
30
30
  word-wrap: break-word;
31
31
  }
32
32
  padding: var(--au-small);
@@ -34,7 +34,7 @@
34
34
  .say-structure__content {
35
35
  [data-slot] {
36
36
  white-space: break-spaces;
37
- word-break: break-all;
37
+ word-break: break-word;
38
38
  word-wrap: break-word;
39
39
  }
40
40
  padding: var(--au-small);
@@ -6,7 +6,7 @@ interface Args {
6
6
  config: LmbPluginConfig;
7
7
  open: boolean;
8
8
  closeModal: () => void;
9
- onInsert: () => void;
9
+ onInsert: (mandatee: Mandatee) => void;
10
10
  }
11
11
  export default class LmbPluginSearchModalComponent extends Component<Args> {
12
12
  error: unknown;
@@ -27,5 +27,6 @@ export default class LmbPluginSearchModalComponent extends Component<Args> {
27
27
  setInputSearchText(event: InputEvent): void;
28
28
  previousPage(): void;
29
29
  nextPage(): void;
30
+ onInsert(mandatee: Mandatee): Promise<void>;
30
31
  }
31
32
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lblod/ember-rdfa-editor-lblod-plugins",
3
- "version": "24.1.0",
3
+ "version": "24.1.2",
4
4
  "description": "Ember addon providing lblod specific plugins for the ember-rdfa-editor",
5
5
  "keywords": [
6
6
  "ember-addon",