@onsvisual/svelte-components 1.1.31 → 1.1.33

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.
@@ -2,6 +2,11 @@
2
2
  import { onMount, createEventDispatcher } from "svelte";
3
3
  import pym from "pym.js";
4
4
 
5
+ /**
6
+ * (Optional) ID for embed
7
+ * @type {string|null}
8
+ */
9
+ export let id = null;
5
10
  /**
6
11
  * Binding for pymChild element (can be used to send messages to parent of iframe)
7
12
  * @type {object}
@@ -16,7 +21,7 @@
16
21
  const dispatch = createEventDispatcher();
17
22
 
18
23
  onMount(() => {
19
- pymChild = new pym.Child();
24
+ pymChild = id ? new pym.Child({ id }) : new pym.Child();
20
25
 
21
26
  if (polling) {
22
27
  setInterval(() => {
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} EmbedEvents */
3
3
  /** @typedef {typeof __propDef.slots} EmbedSlots */
4
4
  export default class Embed extends SvelteComponentTyped<{
5
+ id?: string | null | undefined;
5
6
  polling?: number | false | undefined;
6
7
  pymChild?: object | undefined;
7
8
  }, {
@@ -18,6 +19,7 @@ export type EmbedSlots = typeof __propDef.slots;
18
19
  import { SvelteComponentTyped } from "svelte";
19
20
  declare const __propDef: {
20
21
  props: {
22
+ id?: string | null | undefined;
21
23
  polling?: number | false | undefined;
22
24
  pymChild?: object | undefined;
23
25
  };
@@ -131,17 +131,17 @@
131
131
  {
132
132
  label_en: "Construction industry",
133
133
  label_cy: "Diwydiant adeiladu",
134
- url: "/businessindustryandtrade/itandinternetindustry"
134
+ url: "/businessindustryandtrade/constructionindustry"
135
135
  },
136
136
  {
137
137
  label_en: "International trade",
138
138
  label_cy: "Masnach ryngwladol",
139
- url: "/businessindustryandtrade/constructionindustry"
139
+ url: "/businessindustryandtrade/internationaltrade"
140
140
  },
141
141
  {
142
142
  label_en: "IT and internet industry",
143
143
  label_cy: "Y diwydiant TGCh a'r rhyngrwyd",
144
- url: "/businessindustryandtrade/internationaltrade"
144
+ url: "/businessindustryandtrade/itandinternetindustry"
145
145
  },
146
146
  {
147
147
  label_en: "Manufacturing and production industry",
@@ -584,7 +584,7 @@
584
584
  </div>
585
585
  </form>
586
586
  </Container>
587
- <Container {width}>
587
+ <!-- <Container {width}>
588
588
  <h2 class="ons-u-fs-r--b ons-u-mb-s ons-header-nav-search__heading">
589
589
  {i18n("Popular searches")}
590
590
  </h2>
@@ -598,7 +598,7 @@
598
598
  </li>
599
599
  {/each}
600
600
  </ul>
601
- </Container>
601
+ </Container> -->
602
602
  </nav>
603
603
  {/if}
604
604
 
@@ -642,4 +642,9 @@
642
642
  .ons-header__language {
643
643
  display: block;
644
644
  }
645
+ .ons-header-nav-search__input {
646
+ /* This is a shim to avoid having a redundant border under the search box */
647
+ border-bottom: none;
648
+ padding-bottom: 0 !important;
649
+ }
645
650
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onsvisual/svelte-components",
3
- "version": "1.1.31",
3
+ "version": "1.1.33",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "npm run build:package && npm run build:docs",