@oicl/openbridge-webcomponents 0.0.15-dev-20241203183951 → 0.0.15-dev-20241203184948

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 (52) hide show
  1. package/__snapshots__/building-blocks-poi-line--primary.png +0 -0
  2. package/__snapshots__/button-poi-target-button--primary.png +0 -0
  3. package/__snapshots__/navigation-instruments-poi-target--primary.png +0 -0
  4. package/custom-elements.json +76 -43
  5. package/dist/components/poi-target-button/poi-target-button.css.js +65 -77
  6. package/dist/components/poi-target-button/poi-target-button.css.js.map +1 -1
  7. package/dist/components/poi-target-button/poi-target-button.d.ts +2 -1
  8. package/dist/components/poi-target-button/poi-target-button.d.ts.map +1 -1
  9. package/dist/components/poi-target-button/poi-target-button.js +7 -4
  10. package/dist/components/poi-target-button/poi-target-button.js.map +1 -1
  11. package/dist/navigation-instruments/poi-graphic-line/poi-config.d.ts +14 -11
  12. package/dist/navigation-instruments/poi-graphic-line/poi-config.d.ts.map +1 -1
  13. package/dist/navigation-instruments/poi-graphic-line/poi-config.js +18 -42
  14. package/dist/navigation-instruments/poi-graphic-line/poi-config.js.map +1 -1
  15. package/dist/navigation-instruments/poi-graphic-line/poi-graphic-line.d.ts +9 -3
  16. package/dist/navigation-instruments/poi-graphic-line/poi-graphic-line.d.ts.map +1 -1
  17. package/dist/navigation-instruments/poi-graphic-line/poi-graphic-line.js +147 -42
  18. package/dist/navigation-instruments/poi-graphic-line/poi-graphic-line.js.map +1 -1
  19. package/dist/navigation-instruments/poi-line/poi-line.css.js +8 -7
  20. package/dist/navigation-instruments/poi-line/poi-line.css.js.map +1 -1
  21. package/dist/navigation-instruments/poi-line/poi-line.d.ts +1 -1
  22. package/dist/navigation-instruments/poi-line/poi-line.d.ts.map +1 -1
  23. package/dist/navigation-instruments/poi-line/poi-line.js +28 -10
  24. package/dist/navigation-instruments/poi-line/poi-line.js.map +1 -1
  25. package/dist/navigation-instruments/poi-line/pointerDot.d.ts +7 -1
  26. package/dist/navigation-instruments/poi-line/pointerDot.d.ts.map +1 -1
  27. package/dist/navigation-instruments/poi-line/pointerDot.js +96 -99
  28. package/dist/navigation-instruments/poi-line/pointerDot.js.map +1 -1
  29. package/dist/navigation-instruments/poi-target/arrow.d.ts.map +1 -1
  30. package/dist/navigation-instruments/poi-target/arrow.js +1 -0
  31. package/dist/navigation-instruments/poi-target/arrow.js.map +1 -1
  32. package/dist/navigation-instruments/poi-target/poi-target.css.js +9 -11
  33. package/dist/navigation-instruments/poi-target/poi-target.css.js.map +1 -1
  34. package/dist/navigation-instruments/poi-target/poi-target.d.ts +4 -0
  35. package/dist/navigation-instruments/poi-target/poi-target.d.ts.map +1 -1
  36. package/dist/navigation-instruments/poi-target/poi-target.js +21 -20
  37. package/dist/navigation-instruments/poi-target/poi-target.js.map +1 -1
  38. package/package.json +1 -1
  39. package/src/components/poi-target-button/poi-target-button.css +20 -10
  40. package/src/components/poi-target-button/poi-target-button.stories.ts +6 -0
  41. package/src/components/poi-target-button/poi-target-button.ts +7 -2
  42. package/src/navigation-instruments/poi-graphic-line/poi-config.ts +24 -27
  43. package/src/navigation-instruments/poi-graphic-line/poi-graphic-line.stories.ts +3 -4
  44. package/src/navigation-instruments/poi-graphic-line/poi-graphic-line.ts +145 -38
  45. package/src/navigation-instruments/poi-line/poi-line.css +8 -7
  46. package/src/navigation-instruments/poi-line/poi-line.stories.ts +5 -5
  47. package/src/navigation-instruments/poi-line/poi-line.ts +29 -8
  48. package/src/navigation-instruments/poi-line/pointerDot.ts +115 -99
  49. package/src/navigation-instruments/poi-target/arrow.ts +1 -0
  50. package/src/navigation-instruments/poi-target/poi-target.css +9 -13
  51. package/src/navigation-instruments/poi-target/poi-target.stories.ts +5 -5
  52. package/src/navigation-instruments/poi-target/poi-target.ts +31 -23
@@ -5,7 +5,7 @@ import {classMap} from 'lit/directives/class-map.js';
5
5
  import '../poi-line/poi-line';
6
6
  import '../../components/poi-target-button/poi-target-button';
7
7
  import {POIStyle} from '../poi-graphic-line/poi-config';
8
- import {pointerArrow} from './arrow';
8
+
9
9
  import {PoiTargetButtonValue} from '../../components/poi-target-button/poi-target-button';
10
10
 
11
11
  export enum TargetValue {
@@ -46,30 +46,35 @@ export enum Pointer {
46
46
  None = 'null',
47
47
  }
48
48
 
49
+ /**
50
+ *
51
+ * @prop {number} height - y-coordinate of pointer (centre) if pointerType 'line' is selected.
52
+ */
53
+
49
54
  @customElement('obc-poi-target')
50
55
  export class ObcPoiTarget extends LitElement {
51
- @property({type: Number}) height: number = 188;
56
+ @property({type: Number}) height: number = 192;
52
57
  @property({type: String}) value: TargetValue = TargetValue.enabled;
53
58
  @property({type: String}) pointerType: Pointer = Pointer.Line;
54
59
  @property({type: Number}) relativeDirection = 0;
55
60
 
56
61
  override render() {
57
62
  let pointer = null;
58
- let hasArrowPointer = false;
63
+
59
64
  switch (this.pointerType) {
60
65
  case Pointer.Line:
61
- pointer = html`<obc-poi-line
62
- height=${this.height}
63
- lineStyle=${valueToPointerStyle(this.value)}
64
- ></obc-poi-line>`;
66
+ pointer = html`
67
+ <obc-poi-line
68
+ height=${this.height}
69
+ poiStyle=${valueToPointerStyle(this.value)}
70
+ ></obc-poi-line>
71
+ `;
65
72
  break;
66
73
  case Pointer.ArrowLeft:
67
- pointer = pointerArrow(this.pointerType, this.value);
68
- hasArrowPointer = true;
74
+ pointer = Pointer.ArrowLeft;
69
75
  break;
70
76
  case Pointer.ArrowRight:
71
- pointer = pointerArrow(this.pointerType, this.value);
72
- hasArrowPointer = true;
77
+ pointer = Pointer.ArrowRight;
73
78
  break;
74
79
  case Pointer.None:
75
80
  pointer = null;
@@ -79,18 +84,21 @@ export class ObcPoiTarget extends LitElement {
79
84
  }
80
85
 
81
86
  return html`
82
- <div
83
- class=${classMap({
84
- wrapper: true,
85
- ['type-' + this.pointerType]: true,
86
- })}
87
- >
88
- <obc-poi-target-button
89
- .value=${valueToButtonStyle(this.value)}
90
- .hasPointer=${hasArrowPointer}
91
- .relativeDirection=${this.relativeDirection}
92
- ></obc-poi-target-button>
93
- ${pointer}
87
+ <div class="wrapper">
88
+ <div
89
+ class=${classMap({
90
+ wrapper: true,
91
+ ['type-' + this.pointerType]: true,
92
+ })}
93
+ >
94
+ <obc-poi-target-button
95
+ .value=${valueToButtonStyle(this.value)}
96
+ .pointer=${this.pointerType}
97
+ .relativeDirection=${this.relativeDirection}
98
+ ></obc-poi-target-button>
99
+
100
+ ${this.pointerType === Pointer.Line ? pointer : null}
101
+ </div>
94
102
  </div>
95
103
  `;
96
104
  }