intelliwaketssveltekitv25 0.1.30 → 0.1.31

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.
@@ -221,7 +221,7 @@
221
221
  }
222
222
  })
223
223
 
224
- let indentsExist = $derived(ddActions.some((ddAction) => ddAction.active && ddAction.indented))
224
+ let indentsExist = $derived(ddActions?.some((ddAction) => ddAction.active && ddAction.indented))
225
225
 
226
226
  // let useKeys = $derived(visibleDDActions.reduce((result, action) => result && (!!action.key && visibleDDActions.filter(subAction => subAction.key === action.key).length < 2), true))
227
227
 
@@ -120,8 +120,8 @@
120
120
  }
121
121
 
122
122
  let quickArray = $derived(ArrayRange(upperRange + increment, increment, lowerRange).map(ar => CleanNumberNull(ar, GreaterNumber(maxDigitsDisplay, 2))))
123
- let valueExistsInQuickArray = $derived(quickArray.some(qa => qa == CleanNumberNull(value, GreaterNumber(maxDigitsDisplay, 2))))
124
- let valueHighlightExistsInQuickArray = $derived(valueHighlight !== undefined && quickArray.some(qa => qa == CleanNumberNull(valueHighlight, GreaterNumber(maxDigitsDisplay, 2))))
123
+ let valueExistsInQuickArray = $derived(!!quickArray?.some(qa => qa == CleanNumberNull(value, GreaterNumber(maxDigitsDisplay, 2))))
124
+ let valueHighlightExistsInQuickArray = $derived(valueHighlight !== undefined && quickArray?.some(qa => qa == CleanNumberNull(valueHighlight, GreaterNumber(maxDigitsDisplay, 2))))
125
125
 
126
126
  </script>
127
127
 
@@ -58,7 +58,7 @@
58
58
  useListItems: TListGroupItem[]): boolean {
59
59
  const isTopValue = (item.parent_value ?? null) === useTopValue
60
60
  const isShown = useActive === null || useActive === !item.hidden
61
- const hasVisibleChild = useListItems.some(listItem => {
61
+ const hasVisibleChild = (useListItems ?? []).some(listItem => {
62
62
  const hasChild = !!listItem?.parent_value && (listItem.parent_value === item.value)
63
63
  const isChildShown = useActive === null || useActive === !listItem?.hidden
64
64
 
@@ -139,7 +139,7 @@
139
139
  }
140
140
  }
141
141
 
142
- let listItems = $derived(SearchRows(possibles.filter(poss => !selected.some(sel => DeepEqual(idValue(sel), idValue(poss)))), searchValue)
142
+ let listItems = $derived(SearchRows(possibles.filter(poss => !selected?.some(sel => DeepEqual(idValue(sel), idValue(poss)))), searchValue)
143
143
  .map(item => ({
144
144
  display: displayValue(item),
145
145
  id: idValue(item),
@@ -147,7 +147,7 @@
147
147
  })))
148
148
 
149
149
  function setSelectedIDs(sels: T[]) {
150
- if (!initialPass && selectedIDs && (selectedIDs.length !== sels.length || !sels.every(sel => selectedIDs?.some(selID => selID === idValue(sel))))) {
150
+ if (!initialPass && selectedIDs && (selectedIDs.length !== sels.length || !sels.every(sel => !!selectedIDs?.some(selID => selID === idValue(sel))))) {
151
151
  selectedIDs = sels.map(sel => idValue(sel))
152
152
  }
153
153
  }
@@ -157,8 +157,8 @@
157
157
  })
158
158
 
159
159
  function setSelected(selIDs: (string | number)[] | undefined, poss: T[]) {
160
- if (selIDs && (selIDs.length !== selected.length || !selected.every(sel => selIDs?.some(selID => selID === idValue(sel))))) {
161
- selected = poss.filter(po => selIDs.some(selID => selID == idValue(po)))
160
+ if (selIDs && (selIDs.length !== selected.length || !selected.every(sel => !!selIDs?.some(selID => selID === idValue(sel))))) {
161
+ selected = poss.filter(po => !!selIDs?.some(selID => selID == idValue(po)))
162
162
  }
163
163
  }
164
164
 
@@ -220,11 +220,11 @@
220
220
  })
221
221
 
222
222
  $effect(() => {
223
- created = selected.filter(sel => !possibles.some(pos => DeepEqual(idValue(pos), idValue(sel))))
223
+ created = selected.filter(sel => !possibles?.some(pos => DeepEqual(idValue(pos), idValue(sel))))
224
224
  })
225
225
 
226
226
  $effect(() => {
227
- existing = selected.filter(sel => possibles.some(pos => DeepEqual(idValue(pos), idValue(sel))))
227
+ existing = selected.filter(sel => !!possibles?.some(pos => DeepEqual(idValue(pos), idValue(sel))))
228
228
  })
229
229
 
230
230
  let showInvalid = $derived(required && (invalid || !selected.length))
@@ -131,7 +131,7 @@
131
131
 
132
132
  const ddStyle = !maxHeight ? undefined : `max-height: ${maxHeight as string};`
133
133
 
134
- let indentsExist = $derived(ddActions.some(ddAction => ddAction.active && ddAction.indented))
134
+ let indentsExist = $derived(!!ddActions?.some(ddAction => ddAction.active && ddAction.indented))
135
135
  </script>
136
136
 
137
137
  <svelte:window onkeydown={keyDown}
@@ -98,7 +98,7 @@
98
98
 
99
99
  if (consoleLogs) console.info('mountAction', pathAnalyzer.activePageSlugs)
100
100
 
101
- if (!noResolveHidden && pathAnalyzer?.activePageSlug && !visibleItems.some(
101
+ if (!noResolveHidden && pathAnalyzer?.activePageSlug && !visibleItems?.some(
102
102
  item => getSlug(item)?.includes(pathAnalyzer?.activePageFull ?? '(NoNe)') ?? true)) {
103
103
  const toItem = visibleItems.find(item => item.isInitial) ?? visibleItems.find(() => true)
104
104
  if (toItem) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelliwaketssveltekitv25",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",