intelliwaketssveltekitv25 0.1.120 → 0.1.122
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.
- package/dist/Functions.d.ts +1 -1
- package/dist/InputNumber.svelte +6 -7
- package/dist/PathAnalyzer.js +19 -10
- package/package.json +1 -1
package/dist/Functions.d.ts
CHANGED
|
@@ -202,7 +202,7 @@ export declare function IsMobileOrTablet(): boolean;
|
|
|
202
202
|
*/
|
|
203
203
|
export declare function DownloadString(filename: string, text: string): void;
|
|
204
204
|
export declare function HandleKeyDownNumerics(event: KeyboardEvent, allowDecimals?: boolean, allowNegative?: boolean): void;
|
|
205
|
-
export type TInputNumberAttributes = Omit<HTMLInputAttributes, 'value' | 'this' | 'onchange' | '
|
|
205
|
+
export type TInputNumberAttributes = Omit<HTMLInputAttributes, 'value' | 'this' | 'onchange' | 'use'> & {
|
|
206
206
|
value: number | null;
|
|
207
207
|
onchange?: (value: number | null) => void;
|
|
208
208
|
inputClass?: string;
|
package/dist/InputNumber.svelte
CHANGED
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
nullDash,
|
|
26
26
|
prefix,
|
|
27
27
|
suffix,
|
|
28
|
+
min,
|
|
29
|
+
max,
|
|
28
30
|
allowNegative,
|
|
29
31
|
use = [],
|
|
30
32
|
thisRef = $bindable<HTMLInputElement>(),
|
|
@@ -84,13 +86,10 @@
|
|
|
84
86
|
if (onchange) onchange(numericValue)
|
|
85
87
|
} else if (!isNaN(numericValue)) {
|
|
86
88
|
numericValue /= displayMultiplier
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
let minAt = CleanNumberNull(fixedDecimals ?? maxAt)
|
|
92
|
-
if (minAt !== null) numericValue = Math.min(numericValue, minAt)
|
|
93
|
-
|
|
89
|
+
const useMin = CleanNumberNull(min)
|
|
90
|
+
if (useMin !== null) numericValue = Math.max(numericValue, useMin)
|
|
91
|
+
const useMax = CleanNumberNull(max)
|
|
92
|
+
if (useMax !== null) numericValue = Math.min(numericValue, useMax)
|
|
94
93
|
value = CleanNumber(numericValue, useDecimals)
|
|
95
94
|
|
|
96
95
|
if (onchange) onchange(numericValue)
|
package/dist/PathAnalyzer.js
CHANGED
|
@@ -101,6 +101,15 @@ export class PathAnalyzer {
|
|
|
101
101
|
return BuildPath('/', ...this.predecessorComponents);
|
|
102
102
|
let components = [...this.preComponents, ...this.activePageComponents];
|
|
103
103
|
if (!components[components.length - 1]?.toLowerCase().startsWith('tab')) {
|
|
104
|
+
const indexOfBase = components.findIndex(comp => comp === this.base);
|
|
105
|
+
const indexOfTab = components.findIndex(comp => comp.toLowerCase().startsWith('tab'));
|
|
106
|
+
if (indexOfBase > 0 && indexOfBase >= indexOfTab) {
|
|
107
|
+
const indexOfTilde = components.findIndex(comp => comp === '~');
|
|
108
|
+
if (indexOfTilde > 0) {
|
|
109
|
+
return BuildPath('/', ...components.slice(0, indexOfBase + 1), ...components.slice(indexOfTilde, components.length - 1));
|
|
110
|
+
}
|
|
111
|
+
return BuildPath('/', ...components.slice(0, indexOfBase + 1));
|
|
112
|
+
}
|
|
104
113
|
return BuildPath('/', ...components.slice(0, components.length - 1));
|
|
105
114
|
}
|
|
106
115
|
while (components[components.length - 1]?.toLowerCase().startsWith('tab')) {
|
|
@@ -163,16 +172,16 @@ export class PathAnalyzer {
|
|
|
163
172
|
if (closeIfOpen) {
|
|
164
173
|
// const pathNoDigits = path.replace(/[0-9]/g, '')
|
|
165
174
|
if (this.isOpen(path)) {
|
|
166
|
-
if (path.includes('/')) {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
else {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
175
|
+
// if (path.includes('/')) {
|
|
176
|
+
// console.log(this.base, this.basePath, path)
|
|
177
|
+
// return BuildPath(this.basePath, path.substring(0, path.indexOf('/')))
|
|
178
|
+
// } else {
|
|
179
|
+
// if (path === pathNoDigits) {
|
|
180
|
+
return this.basePath;
|
|
181
|
+
// } else {
|
|
182
|
+
// return BuildPath(this.basePath, pathNoDigits)
|
|
183
|
+
// }
|
|
184
|
+
// }
|
|
176
185
|
// } else if (pathNoDigits !== path && path === this.activePageSlug) {
|
|
177
186
|
// return BuildPath(this.basePath, pathNoDigits)
|
|
178
187
|
// } else if (pathNoDigits === path && path === (this.activePageSlug ?? '').replace(/[0-9]/g, '') && pathNoDigits !== this.activePage) {
|