intelliwaketssveltekitv25 1.0.34 → 1.0.35

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.
@@ -177,7 +177,9 @@
177
177
  <div
178
178
  class='relative not-print:grid not-print:grid-rows-1 not-print:overflow-hidden'>
179
179
  {#if detail}
180
- {@render detail()}
180
+ {#key pathAnalyzer?.activePageSlug}
181
+ {@render detail()}
182
+ {/key}
181
183
  {/if}
182
184
  </div>
183
185
  </div>
@@ -10,10 +10,9 @@
10
10
  ToArray,
11
11
  ToDigits
12
12
  } from '@solidbasisventures/intelliwaketsfoundation'
13
- import { CookieCreate, CookieErase, CookieRead, type IDDAction, PageAdvanceSize } from './index'
13
+ import { type IDDAction, PageAdvanceSize } from './index'
14
14
  import { page as pageState } from '$app/state'
15
15
  import { goto, invalidate as doInvalidate, invalidateAll } from '$app/navigation'
16
- import { browser } from '$app/environment'
17
16
  import DropDown from './DropDown.svelte'
18
17
  import { untrack } from 'svelte'
19
18
 
@@ -22,8 +21,6 @@
22
21
  pageCount,
23
22
  verbose = false,
24
23
  updateQueryParams = false,
25
- cookieParms = false,
26
- cookieDays,
27
24
  invalidate,
28
25
  class: clazz = '',
29
26
  onPageChange
@@ -31,8 +28,6 @@
31
28
  {
32
29
  verbose?: boolean
33
30
  updateQueryParams?: boolean | string
34
- cookieParms?: boolean | string
35
- cookieDays?: number
36
31
  invalidate?: string | string[] | (string | URL | ((url: URL) => boolean)) | (string | URL | ((url: URL) => boolean))[] | null
37
32
  class?: string,
38
33
  onPageChange?: (page: number) => void | Promise<void>
@@ -113,7 +108,6 @@
113
108
  let display = $derived(createDisplay(page, pageCount, clientWidth))
114
109
 
115
110
  let queryParamName = $derived(!updateQueryParams ? null : updateQueryParams === true ? 'page' : updateQueryParams)
116
- let cookieName = $derived(!cookieParms ? null : cookieParms === true ? 'page' : cookieParms)
117
111
 
118
112
  function performInvalidate() {
119
113
  if (page !== lastPage) {
@@ -136,9 +130,9 @@
136
130
  // Don't run the effect until clientWidth has been measured
137
131
  if (!clientWidth) return
138
132
 
139
- if (queryParamName || cookieName) {
140
- if (verbose) console.info('Paginator query/cookie', queryParamName, cookieName)
141
- const currentValue = CleanNumberNull(cookieName ? CookieRead(cookieName) : queryParamName ? pageState.url.searchParams.get(queryParamName) : null)
133
+ if (queryParamName) {
134
+ if (verbose) console.info('Paginator query', queryParamName)
135
+ const currentValue = CleanNumberNull(queryParamName ? pageState.url.searchParams.get(queryParamName) : null)
142
136
  const gotoSettings: {
143
137
  replaceState?: boolean | undefined;
144
138
  invalidateAll?: boolean | undefined;
@@ -154,18 +148,6 @@
154
148
  pageState.url.searchParams.delete(queryParamName)
155
149
  if (verbose) console.info('Paginator goto url', pageState.url, gotoSettings)
156
150
  goto(pageState.url, gotoSettings)
157
- } else if (cookieName) {
158
- if (verbose) console.info('Paginator Erase Cookie')
159
- CookieErase(cookieName)
160
- if (invalidate) {
161
- if (verbose) console.info('Paginator calling invalidate')
162
- performInvalidate()
163
- } else {
164
- if (verbose) console.info('Paginator doing a reload')
165
- if (browser) {
166
- window.location.reload()
167
- }
168
- }
169
151
  }
170
152
  }
171
153
  } else if (display.page !== currentValue) {
@@ -173,18 +155,6 @@
173
155
  pageState.url.searchParams.set(queryParamName, display.page.toString())
174
156
  if (verbose) console.info('Paginator goto url 2', pageState.url, gotoSettings)
175
157
  goto(pageState.url, gotoSettings)
176
- } else if (cookieName) {
177
- if (verbose) console.info('Paginator Cookie Create', display.page.toString(), cookieDays)
178
- CookieCreate(cookieName, display.page.toString(), cookieDays)
179
- if (invalidate) {
180
- if (verbose) console.info('Paginator calling invalidate 2')
181
- performInvalidate()
182
- } else {
183
- if (verbose) console.info('Paginator doing a reload 2')
184
- if (browser) {
185
- window.location.reload()
186
- }
187
- }
188
158
  }
189
159
  }
190
160
  } else if (invalidate) {
@@ -2,8 +2,6 @@ import { type IPaginatorResponse } from '@solidbasisventures/intelliwaketsfounda
2
2
  type $$ComponentProps = (Pick<IPaginatorResponse, 'page' | 'pageCount'> & {
3
3
  verbose?: boolean;
4
4
  updateQueryParams?: boolean | string;
5
- cookieParms?: boolean | string;
6
- cookieDays?: number;
7
5
  invalidate?: string | string[] | (string | URL | ((url: URL) => boolean)) | (string | URL | ((url: URL) => boolean))[] | null;
8
6
  class?: string;
9
7
  onPageChange?: (page: number) => void | Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelliwaketssveltekitv25",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",