@lblod/ember-rdfa-editor-lblod-plugins 8.4.2 → 8.4.3

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
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [8.4.3] - 2023-08-07
11
+
12
+ ### Fixed
13
+ - GN-4451: fix roadsign plugin no longer showing rendered templates in modal
14
+
10
15
  ## [8.4.2] - 2023-08-02
11
16
  ### Fixed
12
17
  - GN-4446: fix email-address formatting in error components
@@ -557,7 +562,7 @@ add onclick handler to pencil icon in variable plugin
557
562
 
558
563
  # Changelog
559
564
 
560
- [unreleased]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v8.4.2...HEAD
565
+ [unreleased]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v8.4.3...HEAD
561
566
  [8.0.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v8.0.0...v8.0.1
562
567
  [8.0.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v7.1.0...v8.0.0
563
568
  [7.1.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v7.0.0...v7.1.0
@@ -573,6 +578,7 @@ add onclick handler to pencil icon in variable plugin
573
578
  [3.0.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v2.1.2...v3.0.0
574
579
  [2.1.2]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v2.1.1...v2.1.2
575
580
  [2.1.1]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v2.1.0...v2.1.1
581
+ [8.4.3]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v8.4.2...v8.4.3
576
582
  [8.4.2]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v8.4.1...v8.4.2
577
583
  [8.4.1]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v8.4.0...v8.4.1
578
584
  [8.4.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v8.3.0...v8.4.0
@@ -3,7 +3,11 @@
3
3
  <AuHeading @level="6" @skin="6">Voeg maatregel in:</AuHeading>
4
4
  <p>
5
5
  <AuPill>
6
- <RoadsignRegulationPlugin::MeasureTemplate @measure={{@measure.uri}} @template={{@measure.template}} />
6
+ <RoadsignRegulationPlugin::MeasureTemplate
7
+ @measure={{@measure.uri}}
8
+ @template={{@measure.template}}
9
+ @endpoint={{@endpoint}}
10
+ />
7
11
  </AuPill>
8
12
  </p>
9
13
  {{#if this.isPotentiallyZonal}}
@@ -17,6 +17,7 @@ type Args = {
17
17
  zonalityValue?: string,
18
18
  temporalValue?: string
19
19
  ) => void;
20
+ endpoint: string;
20
21
  };
21
22
 
22
23
  export default class ExpandedMeasureComponent extends Component<Args> {
@@ -1,9 +1,8 @@
1
1
  import Component from '@glimmer/component';
2
2
  import { inject as service } from '@ember/service';
3
- import { task } from 'ember-concurrency';
4
- import { tracked } from '@glimmer/tracking';
5
3
  import includeInstructions from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/roadsign-regulation-plugin/utils/includeInstructions';
6
4
  import RoadsignRegistryService from '@lblod/ember-rdfa-editor-lblod-plugins/services/roadsign-registry';
5
+ import { trackedFunction } from 'ember-resources/util/function';
7
6
 
8
7
  type Args = {
9
8
  template: string;
@@ -13,27 +12,22 @@ type Args = {
13
12
  };
14
13
  export default class MeasureTemplateComponent extends Component<Args> {
15
14
  @service declare roadsignRegistry: RoadsignRegistryService;
16
- @tracked template = '';
17
- endpoint: string;
18
15
 
19
- constructor(parent: unknown, args: Args) {
20
- super(parent, args);
21
- this.template = this.args.template;
22
- void this.fetchData.perform();
23
- this.endpoint = this.args.endpoint;
16
+ get template() {
17
+ return this.instructionData.value ?? '';
24
18
  }
25
19
 
26
- fetchData = task(async () => {
20
+ instructionData = trackedFunction(this, async () => {
27
21
  const instructions =
28
22
  await this.roadsignRegistry.getInstructionsForMeasure.perform(
29
23
  this.args.measure,
30
- this.endpoint
24
+ this.args.endpoint
31
25
  );
32
26
  const template = includeInstructions(
33
27
  this.args.template,
34
28
  instructions,
35
29
  this.args.annotated
36
30
  );
37
- this.template = template;
31
+ return template;
38
32
  });
39
33
  }
@@ -33,7 +33,13 @@
33
33
  </div>
34
34
  </td>
35
35
  <td>
36
- <AuHelpText skin="secondary" class="au-u-margin-none"><RoadsignRegulationPlugin::MeasureTemplate @measure={{row.uri}} @template={{row.template}} @limitText={{true}}/></AuHelpText>
36
+ <AuHelpText skin="secondary" class="au-u-margin-none">
37
+ <RoadsignRegulationPlugin::MeasureTemplate
38
+ @measure={{row.uri}}
39
+ @template={{row.template}}
40
+ @limitText={{true}}
41
+ @endpoint={{@options.endpoint}} />
42
+ </AuHelpText>
37
43
  </td>
38
44
  <td>
39
45
  {{#each row.classifications as |classification|}}
@@ -51,7 +57,12 @@
51
57
  </td>
52
58
  </tr>
53
59
  {{#if (eq this.selected row.uri)}}
54
- <RoadsignRegulationPlugin::ExpandedMeasure @measure={{row}} @insert={{@insert}} @selectRow={{this.selectRow}} />
60
+ <RoadsignRegulationPlugin::ExpandedMeasure
61
+ @measure={{row}}
62
+ @insert={{@insert}}
63
+ @selectRow={{this.selectRow}}
64
+ @endpoint={{@options.endpoint}}
65
+ />
55
66
  {{/if}}
56
67
  {{else}}
57
68
  <tr>
@@ -4,6 +4,7 @@ type Args = {
4
4
  measure: Measure;
5
5
  selectRow: (uri: string) => void;
6
6
  insert: (measure: Measure, zonalityValue?: string, temporalValue?: string) => void;
7
+ endpoint: string;
7
8
  };
8
9
  export default class ExpandedMeasureComponent extends Component<Args> {
9
10
  zonalityValue?: string;
@@ -8,9 +8,7 @@ type Args = {
8
8
  };
9
9
  export default class MeasureTemplateComponent extends Component<Args> {
10
10
  roadsignRegistry: RoadsignRegistryService;
11
- template: string;
12
- endpoint: string;
13
- constructor(parent: unknown, args: Args);
14
- fetchData: import("ember-concurrency").TaskForAsyncTaskFunction<unknown, () => Promise<void>>;
11
+ get template(): string;
12
+ instructionData: import("ember-resources/util/function").State<Promise<string>>;
15
13
  }
16
14
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lblod/ember-rdfa-editor-lblod-plugins",
3
- "version": "8.4.2",
3
+ "version": "8.4.3",
4
4
  "description": "Ember addon providing lblod specific plugins for the ember-rdfa-editor",
5
5
  "keywords": [
6
6
  "ember-addon",