From c9262d64c81bd3ff04dd9c21ec3f81ef99698bb5 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Wed, 13 Nov 2024 12:40:25 +0000 Subject: [PATCH] Update PIS Finder to use Cards rather than Islands --- package-lock.json | 18 ++++--- package.json | 2 +- src/lib/cards/Card.types.ts | 6 ++- src/lib/stores/version.ts | 2 +- src/routes/pis/+page.svelte | 103 +++++++++++++++++++++++++----------- 5 files changed, 88 insertions(+), 43 deletions(-) diff --git a/package-lock.json b/package-lock.json index ae55ebd..5c5d0bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,14 +7,12 @@ "": { "name": "owlboard-svelte", "version": "2024.03.2", - "dependencies": { - "@tabler/icons-svelte": "^3.2.0" - }, "devDependencies": { - "@owlboard/ts-types": "^1.2.0", + "@owlboard/ts-types": "^1.2.1", "@sveltejs/adapter-auto": "^2.0.0", "@sveltejs/adapter-static": "^2.0.2", "@sveltejs/kit": "^1.5.0", + "@tabler/icons-svelte": "^3.2.0", "eslint": "^8.28.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-svelte": "^2.26.0", @@ -589,10 +587,11 @@ } }, "node_modules/@owlboard/ts-types": { - "version": "1.2.0", - "resolved": "https://git.fjla.uk/api/packages/OwlBoard/npm/%40owlboard%2Fts-types/-/1.2.0/ts-types-1.2.0.tgz", - "integrity": "sha512-9xu7WJ+6eIiz6frd1O3/LGLrD4wAr16tI1Xd2WTkke8VONEm28f8T5M5J68pXPddHXOygXVkHUUFjAbTYrS+7Q==", - "dev": true + "version": "1.2.1", + "resolved": "https://git.fjla.uk/api/packages/OwlBoard/npm/%40owlboard%2Fts-types/-/1.2.1/ts-types-1.2.1.tgz", + "integrity": "sha512-3iLFBPmLblQiksvGciPxmnZ+1kvywYDH0Qb8BIY33tZqmkY+/IccqoaxLICRrVPzDo87YkiMwsjorHloxlXJog==", + "dev": true, + "license": "GPL-3.0-or-later" }, "node_modules/@polka/url": { "version": "1.0.0-next.25", @@ -696,6 +695,7 @@ "version": "3.7.0", "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-3.7.0.tgz", "integrity": "sha512-lJGIZLSWrPO6VygRUbaVvQjWgL2EaiBMD8e6leCYUQ8ZPO4LIzKMq358C8KlhXJcyNiRz1Io3YWoc/DNTcWqSg==", + "dev": true, "funding": { "type": "github", "url": "https://github.com/sponsors/codecalm" @@ -705,6 +705,7 @@ "version": "3.7.0", "resolved": "https://registry.npmjs.org/@tabler/icons-svelte/-/icons-svelte-3.7.0.tgz", "integrity": "sha512-G8/SINJ4sRxICHJMbQaLH2FWJZPFns4N383wvw2LQ7lQUT8NhhsKjK/i6LxyLZtyEjmVyGaEKpBLdz3SWldgBA==", + "dev": true, "dependencies": { "@tabler/icons": "3.7.0" }, @@ -2435,6 +2436,7 @@ "version": "3.59.2", "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.59.2.tgz", "integrity": "sha512-vzSyuGr3eEoAtT/A6bmajosJZIUWySzY2CzB3w2pgPvnkUjGqlDnsNnA0PMO+mMAhuyMul6C2uuZzY6ELSkzyA==", + "dev": true, "engines": { "node": ">= 8" } diff --git a/package.json b/package.json index a2df54d..58271c2 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "format": "prettier --plugin-search-dir . --write ." }, "devDependencies": { - "@owlboard/ts-types": "^1.2.0", + "@owlboard/ts-types": "^1.2.1", "@sveltejs/adapter-auto": "^2.0.0", "@sveltejs/adapter-static": "^2.0.2", "@sveltejs/kit": "^1.5.0", diff --git a/src/lib/cards/Card.types.ts b/src/lib/cards/Card.types.ts index 5777ef3..b026e66 100644 --- a/src/lib/cards/Card.types.ts +++ b/src/lib/cards/Card.types.ts @@ -1,4 +1,4 @@ -export interface CardConfig { +interface CardConfig { title: string; showHelp: boolean; showRefresh: boolean; @@ -7,7 +7,7 @@ export interface CardConfig { refreshing: boolean; } -export interface LookupCardConfig { +interface LookupCardConfig { title: string; formAction: string; maxLen: number; @@ -15,3 +15,5 @@ export interface LookupCardConfig { helpText: string; fieldName: string; } + +export type {CardConfig, LookupCardConfig} \ No newline at end of file diff --git a/src/lib/stores/version.ts b/src/lib/stores/version.ts index 9e4c77b..97c7d3c 100644 --- a/src/lib/stores/version.ts +++ b/src/lib/stores/version.ts @@ -1,2 +1,2 @@ -export const version: string = "2024.11.1"; +export const version: string = "2024.11.2"; export const versionTag: string = ""; diff --git a/src/routes/pis/+page.svelte b/src/routes/pis/+page.svelte index f1797e6..ea002d7 100644 --- a/src/routes/pis/+page.svelte +++ b/src/routes/pis/+page.svelte @@ -1,19 +1,20 @@
{#if error} - +

{errMsg}

-
+ {:else if data.length} - + @@ -101,27 +142,30 @@ {/each}
TOC
-
+ + {:else} -

To search by headcode use the Train Finder on the homepage

-

This feature now supports all GWR Services

-

Find By Start/End CRS:

+ + Find by Headcode from the homepage + +
- - + +
+
- -

Find By PIS Code:

-
- -
- -
- +
+ +
+ +
+ + +
+
{/if} -