types cleanup
This commit is contained in:
parent
50f18db73c
commit
b173335b1f
11 changed files with 54 additions and 44 deletions
|
|
@ -1,7 +1,7 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
parser: '@typescript-eslint/parser',
|
||||
ignorePatterns: ['node_modules', 'docs/**'],
|
||||
ignorePatterns: ['node_modules', 'docs/**', '.eslintrc.cjs'],
|
||||
extends: ['standard', 'plugin:svelte/recommended'],
|
||||
plugins: ['@typescript-eslint'],
|
||||
parserOptions: {
|
||||
|
|
|
|||
|
|
@ -98,12 +98,12 @@
|
|||
"rimraf": "^5.0.0",
|
||||
"sass": "^1.65.1",
|
||||
"storybook": "^7.4.2",
|
||||
"svelte": "^4.2.0",
|
||||
"svelte": "^4.2.8",
|
||||
"svelte-loader": "^3.1.9",
|
||||
"svelte-preprocess": "^5.0.4",
|
||||
"svelte2tsx": "^0.6.21",
|
||||
"svelte-preprocess": "^5.1.3",
|
||||
"svelte2tsx": "^0.6.27",
|
||||
"tiny-glob": "^0.2.9",
|
||||
"typescript": "^5.2.2",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^4.4.9"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts">
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import bootstrapLoad from './scripts/bootstrapLoad';
|
||||
import { loadBootstrap } from './adScripts/bootstrap';
|
||||
|
||||
onMount(() => {
|
||||
window.graphicsAdQueue = window.graphicsAdQueue || [];
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
<script
|
||||
src="https://graphics.thomsonreuters.com/cdn/js/bootstrap.static.js"
|
||||
on:load="{bootstrapLoad}"
|
||||
on:load="{loadBootstrap}"
|
||||
></script>
|
||||
|
||||
<script
|
||||
|
|
|
|||
|
|
@ -34,9 +34,11 @@
|
|||
<Meta {...meta} />
|
||||
|
||||
<Template let:args>
|
||||
<AdScripts />
|
||||
<AdSlot {...args} />
|
||||
<AdSlot placementName="reuters_desktop_canvas" dataFreestarAd="__970x250" />
|
||||
<div>
|
||||
<AdScripts />
|
||||
<AdSlot {...args} />
|
||||
<AdSlot placementName="reuters_desktop_canvas" dataFreestarAd="__970x250" />
|
||||
</div>
|
||||
</Template>
|
||||
|
||||
<Story
|
||||
|
|
|
|||
|
|
@ -1,22 +1,28 @@
|
|||
<script lang="ts">
|
||||
/** ✏️ DOCUMENT your chart's props using TypeScript and JSDoc comments like below! */
|
||||
|
||||
type PlacementName =
|
||||
| 'reuters_desktop_leaderboard_atf'
|
||||
| 'reuters_desktop_native'
|
||||
| 'reuters_desktop_canvas';
|
||||
|
||||
/**
|
||||
* The unique placement name from FreeStar dashboard.
|
||||
* @required
|
||||
*/
|
||||
export let placementName: string;
|
||||
export let placementName: PlacementName = 'reuters_desktop_native';
|
||||
|
||||
/**
|
||||
* The unique slot Id from FreeStar dashboard.
|
||||
*/
|
||||
export let dataFreestarAd: string;
|
||||
export let dataFreestarAd: string = '__970x250';
|
||||
|
||||
/** Add an ID to target with SCSS. */
|
||||
export let id: string = '';
|
||||
|
||||
/** Add a class to target with SCSS. */
|
||||
export let cls: string = '';
|
||||
let cls: string = '';
|
||||
export { cls as class };
|
||||
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
|
|
@ -32,6 +38,6 @@
|
|||
</script>
|
||||
|
||||
<!-- @component `AdSlot` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-AdSlot--default) -->
|
||||
<Block id="{id}" cls="freestar-adslot {cls}">
|
||||
<Block id="{id}" class="freestar-adslot {cls}">
|
||||
<div data-freestar-ad="{dataFreestarAd || null}" id="{placementName}"></div>
|
||||
</Block>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const ONETRUST_LOGS = 'ot_logs';
|
|||
const ONETRUST_GEOLOCATION_MOCK = 'ot_geolocation_mock';
|
||||
const ONETRUST_SCRIPT_ID = '38cb75bd-fbe1-4ac8-b4af-e531ab368caf-test';
|
||||
|
||||
export default () => {
|
||||
export const loadBootstrap = () => {
|
||||
const freestar = (<any>window).freestar || {};
|
||||
freestar.queue = freestar.queue || [];
|
||||
freestar.config = freestar.config || {};
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
Display a FreeStar Ad Slot
|
||||
|
||||
Note: You must use this domain to access the story book:
|
||||
<http://localhost.arcpublishing.com:3000>
|
||||
`http://localhost.arcpublishing.com:3000`
|
||||
|
||||
This domain has been whitelisted on the Ad server. To setup the domain please add the following line to `/etc/hosts`:
|
||||
This domain has been whitelisted on the Ad server. To setup the domain locally, add the following line to `/etc/hosts`:
|
||||
|
||||
```
|
||||
127.0.0.1 localhost localhost.arcpublishing.com
|
||||
|
|
|
|||
2
src/globals.d.ts
vendored
2
src/globals.d.ts
vendored
|
|
@ -17,6 +17,8 @@ declare global {
|
|||
_sf_async_config: ChartbeatConfig,
|
||||
/** Chartbeat method */
|
||||
pSUPERFLY: (config: { path: string, title: string }) => void,
|
||||
/** Graphics ads */
|
||||
graphicsAdQueue: any[],
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
52
yarn.lock
52
yarn.lock
|
|
@ -2569,7 +2569,7 @@
|
|||
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24"
|
||||
integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==
|
||||
|
||||
"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.13", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15":
|
||||
"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15":
|
||||
version "1.4.15"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32"
|
||||
integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
|
||||
|
|
@ -8470,13 +8470,6 @@ lz-string@^1.4.4:
|
|||
resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941"
|
||||
integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==
|
||||
|
||||
magic-string@^0.27.0:
|
||||
version "0.27.0"
|
||||
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.27.0.tgz#e4a3413b4bab6d98d2becffd48b4a257effdbbf3"
|
||||
integrity sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==
|
||||
dependencies:
|
||||
"@jridgewell/sourcemap-codec" "^1.4.13"
|
||||
|
||||
magic-string@^0.30.0, magic-string@^0.30.1:
|
||||
version "0.30.1"
|
||||
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.1.tgz#ce5cd4b0a81a5d032bd69aab4522299b2166284d"
|
||||
|
|
@ -8484,6 +8477,13 @@ magic-string@^0.30.0, magic-string@^0.30.1:
|
|||
dependencies:
|
||||
"@jridgewell/sourcemap-codec" "^1.4.15"
|
||||
|
||||
magic-string@^0.30.4, magic-string@^0.30.5:
|
||||
version "0.30.5"
|
||||
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.5.tgz#1994d980bd1c8835dc6e78db7cbd4ae4f24746f9"
|
||||
integrity sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==
|
||||
dependencies:
|
||||
"@jridgewell/sourcemap-codec" "^1.4.15"
|
||||
|
||||
make-dir@^2.0.0, make-dir@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
|
||||
|
|
@ -11032,14 +11032,14 @@ svelte-loader@^3.1.9:
|
|||
svelte-dev-helper "^1.1.9"
|
||||
svelte-hmr "^0.14.2"
|
||||
|
||||
svelte-preprocess@^5.0.4:
|
||||
version "5.0.4"
|
||||
resolved "https://registry.yarnpkg.com/svelte-preprocess/-/svelte-preprocess-5.0.4.tgz#2123898e079a074f7f4ef1799e10e037f5bcc55b"
|
||||
integrity sha512-ABia2QegosxOGsVlsSBJvoWeXy1wUKSfF7SWJdTjLAbx/Y3SrVevvvbFNQqrSJw89+lNSsM58SipmZJ5SRi5iw==
|
||||
svelte-preprocess@^5.1.3:
|
||||
version "5.1.3"
|
||||
resolved "https://registry.yarnpkg.com/svelte-preprocess/-/svelte-preprocess-5.1.3.tgz#7682239fe53f724c845b53026816fdfe15d028f9"
|
||||
integrity sha512-xxAkmxGHT+J/GourS5mVJeOXZzne1FR5ljeOUAMXUkfEhkLEllRreXpbl3dIYJlcJRfL1LO1uIAPpBpBfiqGPw==
|
||||
dependencies:
|
||||
"@types/pug" "^2.0.6"
|
||||
detect-indent "^6.1.0"
|
||||
magic-string "^0.27.0"
|
||||
magic-string "^0.30.5"
|
||||
sorcery "^0.11.0"
|
||||
strip-indent "^3.0.0"
|
||||
|
||||
|
|
@ -11048,18 +11048,18 @@ svelte-search@^2.0.1:
|
|||
resolved "https://registry.yarnpkg.com/svelte-search/-/svelte-search-2.0.1.tgz#d8b5ef9ac152f045a5c74a1b75c9d51c0091c839"
|
||||
integrity sha512-JBoObru/BUk86EmuRtYBa99xnH1RB8jqDuYYJHH0PUzN9BINo1+1GZataC/m5368BG3kZRb3wZI5ztjoi1WWXg==
|
||||
|
||||
svelte2tsx@^0.6.21:
|
||||
version "0.6.21"
|
||||
resolved "https://registry.yarnpkg.com/svelte2tsx/-/svelte2tsx-0.6.21.tgz#c2ce9857c3d066b818ef47683f4d997d63f9aa28"
|
||||
integrity sha512-v+vvbiy6WDmEQdIkJpvHYxJYG/obALfH0P6CTreYO350q/9+QmFTNCOJvx0O1o59Zpzx1Bqe+qlDxP/KtJSZEA==
|
||||
svelte2tsx@^0.6.27:
|
||||
version "0.6.27"
|
||||
resolved "https://registry.yarnpkg.com/svelte2tsx/-/svelte2tsx-0.6.27.tgz#5b2c21f38608be51cd32de177722f123e57919e5"
|
||||
integrity sha512-E1uPW1o6VsbRz+nUk3fznZ2lSmCITAJoNu8AYefWSvIwE2pSB01i5sId4RMbWNzfcwCQl1DcgGShCPcldl4rvg==
|
||||
dependencies:
|
||||
dedent-js "^1.0.1"
|
||||
pascal-case "^3.1.1"
|
||||
|
||||
svelte@^4.2.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/svelte/-/svelte-4.2.0.tgz#0e4304c15524450b22fba02516eb72efbd8847b6"
|
||||
integrity sha512-kVsdPjDbLrv74SmLSUzAsBGquMs4MPgWGkGLpH+PjOYnFOziAvENVzgJmyOCV2gntxE32aNm8/sqNKD6LbIpeQ==
|
||||
svelte@^4.2.8:
|
||||
version "4.2.8"
|
||||
resolved "https://registry.yarnpkg.com/svelte/-/svelte-4.2.8.tgz#a279d8b6646131ffb11bc692840f8839b8ae4ed1"
|
||||
integrity sha512-hU6dh1MPl8gh6klQZwK/n73GiAHiR95IkFsesLPbMeEZi36ydaXL/ZAb4g9sayT0MXzpxyZjR28yderJHxcmYA==
|
||||
dependencies:
|
||||
"@ampproject/remapping" "^2.2.1"
|
||||
"@jridgewell/sourcemap-codec" "^1.4.15"
|
||||
|
|
@ -11072,7 +11072,7 @@ svelte@^4.2.0:
|
|||
estree-walker "^3.0.3"
|
||||
is-reference "^3.0.1"
|
||||
locate-character "^3.0.0"
|
||||
magic-string "^0.30.0"
|
||||
magic-string "^0.30.4"
|
||||
periscopic "^3.1.0"
|
||||
|
||||
sveltedoc-parser@^4.2.1:
|
||||
|
|
@ -11401,10 +11401,10 @@ typescript-memoize@^1.0.0-alpha.3:
|
|||
resolved "https://registry.yarnpkg.com/typescript-memoize/-/typescript-memoize-1.1.1.tgz#02737495d5df6ebf72c07ba0d002e8f4cf5ccfa0"
|
||||
integrity sha512-GQ90TcKpIH4XxYTI2F98yEQYZgjNMOGPpOgdjIBhaLaWji5HPWlRnZ4AeA1hfBxtY7bCGDJsqDDHk/KaHOl5bA==
|
||||
|
||||
typescript@^5.2.2:
|
||||
version "5.2.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78"
|
||||
integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==
|
||||
typescript@^5.3.3:
|
||||
version "5.3.3"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
|
||||
integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==
|
||||
|
||||
typical@^4.0.0:
|
||||
version "4.0.0"
|
||||
|
|
|
|||
Loading…
Reference in a new issue