@zthun/helpful-web 7.2.0 → 8.0.0
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/assets/hierarchy.js +1 -1
- package/dist/assets/main.js +5 -5
- package/dist/assets/navigation.js +1 -1
- package/dist/assets/search.js +1 -1
- package/dist/assets/style.css +262 -232
- package/dist/classes/_zthun_helpful-brands.ZBrandBuilder.html +85 -85
- package/dist/classes/_zthun_helpful-fn.ZAssert.html +11 -11
- package/dist/classes/_zthun_helpful-fn.ZDeserializeJson.html +7 -7
- package/dist/classes/_zthun_helpful-fn.ZDeserializeTry.html +12 -12
- package/dist/classes/_zthun_helpful-fn.ZLazy.html +4 -4
- package/dist/classes/_zthun_helpful-fn.ZQuadrilateralBuilder.html +34 -34
- package/dist/classes/_zthun_helpful-fn.ZQuadrilateralCornersBuilder.html +41 -41
- package/dist/classes/_zthun_helpful-fn.ZRectangle.html +36 -36
- package/dist/classes/_zthun_helpful-fn.ZSerializeJson.html +5 -5
- package/dist/classes/_zthun_helpful-internet.ZCookieBuilder.html +35 -35
- package/dist/classes/_zthun_helpful-internet.ZEmailBuilder.html +17 -17
- package/dist/classes/_zthun_helpful-internet.ZEmailContactAddressBuilder.html +12 -12
- package/dist/classes/_zthun_helpful-internet.ZEmailContactBuilder.html +17 -17
- package/dist/classes/_zthun_helpful-internet.ZEmailEnvelopeBuilder.html +24 -24
- package/dist/classes/_zthun_helpful-internet.ZServerBuilder.html +18 -18
- package/dist/classes/_zthun_helpful-query.ZDataFilterFields.html +7 -7
- package/dist/classes/_zthun_helpful-query.ZDataMatchAlways.html +5 -5
- package/dist/classes/_zthun_helpful-query.ZDataMatchOptional.html +11 -11
- package/dist/classes/_zthun_helpful-query.ZDataRequestBuilder.html +22 -22
- package/dist/classes/_zthun_helpful-query.ZDataSearchFields.html +8 -8
- package/dist/classes/_zthun_helpful-query.ZDataSearchText.html +5 -5
- package/dist/classes/_zthun_helpful-query.ZDataSourceStatic.html +29 -29
- package/dist/classes/_zthun_helpful-query.ZDataSourceStaticOptionsBuilder.html +18 -18
- package/dist/classes/_zthun_helpful-query.ZFilterBinaryBuilder.html +36 -36
- package/dist/classes/_zthun_helpful-query.ZFilterCollectionBuilder.html +23 -23
- package/dist/classes/_zthun_helpful-query.ZFilterDeserialize.html +6 -6
- package/dist/classes/_zthun_helpful-query.ZFilterLogicBuilder.html +21 -21
- package/dist/classes/_zthun_helpful-query.ZFilterSerialize.html +5 -5
- package/dist/classes/_zthun_helpful-query.ZFilterUnaryBuilder.html +18 -18
- package/dist/classes/_zthun_helpful-query.ZMetadataBuilder.html +52 -52
- package/dist/classes/_zthun_helpful-query.ZPageBuilder.html +29 -29
- package/dist/classes/_zthun_helpful-query.ZSortBuilder.html +14 -14
- package/dist/classes/_zthun_helpful-query.ZSortDeserialize.html +6 -6
- package/dist/classes/_zthun_helpful-query.ZSortSerialize.html +5 -5
- package/dist/classes/_zthun_helpful-query.ZSorterSingle.html +10 -10
- package/dist/classes/_zthun_helpful-query.ZWellKnownIconClasses.html +15 -15
- package/dist/classes/_zthun_helpful-react.ZFileSelect.html +6 -6
- package/dist/classes/_zthun_helpful-validation.EqualsOtherPropertyValidator.html +5 -5
- package/dist/classes/_zthun_helpful-validation.IsDataURILimitValidator.html +5 -5
- package/dist/classes/_zthun_helpful-validation.IsNotWhiteSpaceValidator.html +5 -5
- package/dist/classes/_zthun_helpful-validation.RequiresOtherPropertyValidator.html +5 -5
- package/dist/enums/_zthun_helpful-fn.ZHorizontalAnchor.html +8 -8
- package/dist/enums/_zthun_helpful-fn.ZOrientation.html +6 -6
- package/dist/enums/_zthun_helpful-fn.ZVerticalAnchor.html +8 -8
- package/dist/enums/_zthun_helpful-query.ZMetadataType.html +14 -14
- package/dist/enums/_zthun_helpful-query.ZOperatorBinary.html +16 -16
- package/dist/enums/_zthun_helpful-query.ZOperatorCollection.html +6 -6
- package/dist/enums/_zthun_helpful-query.ZOperatorLogic.html +6 -6
- package/dist/enums/_zthun_helpful-query.ZOperatorUnary.html +6 -6
- package/dist/enums/_zthun_helpful-query.ZSortDirection.html +6 -6
- package/dist/functions/_zthun_helpful-fn.countBuckets.html +3 -3
- package/dist/functions/_zthun_helpful-fn.createError.html +3 -3
- package/dist/functions/_zthun_helpful-fn.firstDefined.html +8 -8
- package/dist/functions/_zthun_helpful-fn.firstTruthy.html +8 -8
- package/dist/functions/_zthun_helpful-fn.firstWhere.html +8 -8
- package/dist/functions/_zthun_helpful-fn.isEmptyObject.html +2 -2
- package/dist/functions/_zthun_helpful-fn.joinDefined.html +5 -5
- package/dist/functions/_zthun_helpful-fn.optional.html +15 -15
- package/dist/functions/_zthun_helpful-fn.peel.html +5 -5
- package/dist/functions/_zthun_helpful-fn.peelBetween.html +4 -4
- package/dist/functions/_zthun_helpful-fn.pickBy.html +4 -4
- package/dist/functions/_zthun_helpful-fn.pickDataAttributes.html +4 -4
- package/dist/functions/_zthun_helpful-fn.pickDefined.html +4 -4
- package/dist/functions/_zthun_helpful-fn.purge.html +1 -1
- package/dist/functions/_zthun_helpful-fn.required.html +6 -6
- package/dist/functions/_zthun_helpful-fn.setFirst.html +7 -7
- package/dist/functions/_zthun_helpful-fn.sleep.html +10 -10
- package/dist/functions/_zthun_helpful-fn.tag.html +3 -3
- package/dist/functions/_zthun_helpful-fn.tryFallback.html +12 -12
- package/dist/functions/_zthun_helpful-fn.tryFallbackAsync.html +12 -12
- package/dist/functions/_zthun_helpful-query.isBinaryFilter.html +2 -2
- package/dist/functions/_zthun_helpful-query.isBinaryOperator.html +2 -2
- package/dist/functions/_zthun_helpful-query.isCollectionFilter.html +2 -2
- package/dist/functions/_zthun_helpful-query.isCollectionOperator.html +2 -2
- package/dist/functions/_zthun_helpful-query.isLogicFilter.html +2 -2
- package/dist/functions/_zthun_helpful-query.isLogicOperator.html +2 -2
- package/dist/functions/_zthun_helpful-query.isUnaryFilter.html +2 -2
- package/dist/functions/_zthun_helpful-query.isUnaryOperator.html +2 -2
- package/dist/functions/_zthun_helpful-react.asStateData.html +15 -15
- package/dist/functions/_zthun_helpful-react.asStateError.html +5 -5
- package/dist/functions/_zthun_helpful-react.createKeyboardActivate.html +4 -4
- package/dist/functions/_zthun_helpful-react.isStateErrored.html +4 -4
- package/dist/functions/_zthun_helpful-react.isStateLoaded.html +5 -5
- package/dist/functions/_zthun_helpful-react.isStateLoading.html +4 -4
- package/dist/functions/_zthun_helpful-react.useAmbassadorState.html +17 -17
- package/dist/functions/_zthun_helpful-react.useAsyncState.html +5 -5
- package/dist/functions/_zthun_helpful-react.useFileSelect.html +2 -2
- package/dist/functions/_zthun_helpful-react.useKeyboardActivate.html +4 -4
- package/dist/functions/_zthun_helpful-react.useMoreViewState.html +5 -5
- package/dist/functions/_zthun_helpful-react.usePageViewState.html +5 -5
- package/dist/functions/_zthun_helpful-react.useStateAsArray.html +4 -4
- package/dist/functions/_zthun_helpful-react.useWindowService.html +2 -2
- package/dist/functions/_zthun_helpful-validation.EqualsOtherProperty.html +3 -3
- package/dist/functions/_zthun_helpful-validation.IsDataURILimit.html +2 -2
- package/dist/functions/_zthun_helpful-validation.IsNotWhiteSpace.html +2 -2
- package/dist/functions/_zthun_helpful-validation.RequiresOtherProperty.html +3 -3
- package/dist/hierarchy.html +1 -1
- package/dist/index.html +2 -2
- package/dist/interfaces/_zthun_helpful-brands.IZBrand.html +11 -11
- package/dist/interfaces/_zthun_helpful-fn.IZDeserialize.html +9 -9
- package/dist/interfaces/_zthun_helpful-fn.IZPoint2d.html +6 -6
- package/dist/interfaces/_zthun_helpful-fn.IZPoint3d.html +8 -8
- package/dist/interfaces/_zthun_helpful-fn.IZQuadrilateral.html +11 -11
- package/dist/interfaces/_zthun_helpful-fn.IZQuadrilateralCorners.html +7 -7
- package/dist/interfaces/_zthun_helpful-fn.IZSerialize.html +8 -8
- package/dist/interfaces/_zthun_helpful-internet.IZCookie.html +16 -16
- package/dist/interfaces/_zthun_helpful-internet.IZEmail.html +8 -8
- package/dist/interfaces/_zthun_helpful-internet.IZEmailContact.html +8 -8
- package/dist/interfaces/_zthun_helpful-internet.IZEmailEnvelope.html +10 -10
- package/dist/interfaces/_zthun_helpful-internet.IZServer.html +10 -10
- package/dist/interfaces/_zthun_helpful-query.IZDataMatch.html +8 -8
- package/dist/interfaces/_zthun_helpful-query.IZDataRequest.html +15 -15
- package/dist/interfaces/_zthun_helpful-query.IZDataRequestQuery.html +12 -12
- package/dist/interfaces/_zthun_helpful-query.IZDataSource.html +8 -8
- package/dist/interfaces/_zthun_helpful-query.IZDataSourceStaticOptions.html +8 -8
- package/dist/interfaces/_zthun_helpful-query.IZFilterBinary.html +10 -10
- package/dist/interfaces/_zthun_helpful-query.IZFilterCollection.html +10 -10
- package/dist/interfaces/_zthun_helpful-query.IZFilterLogic.html +8 -8
- package/dist/interfaces/_zthun_helpful-query.IZFilterMetadata.html +4 -4
- package/dist/interfaces/_zthun_helpful-query.IZFilterOperator.html +7 -7
- package/dist/interfaces/_zthun_helpful-query.IZFilterSubject.html +8 -8
- package/dist/interfaces/_zthun_helpful-query.IZMetadata.html +24 -24
- package/dist/interfaces/_zthun_helpful-query.IZPage.html +7 -7
- package/dist/interfaces/_zthun_helpful-query.IZSort.html +6 -6
- package/dist/interfaces/_zthun_helpful-query.IZSorter.html +8 -8
- package/dist/interfaces/_zthun_helpful-react.IZFileSelect.html +4 -4
- package/dist/interfaces/_zthun_helpful-react.IZKeyboardInteraction.html +8 -8
- package/dist/modules/_zthun_helpful-brands.html +4 -4
- package/dist/modules/_zthun_helpful-fn.html +3 -3
- package/dist/modules/_zthun_helpful-internet.html +3 -3
- package/dist/modules/_zthun_helpful-node.html +3 -3
- package/dist/modules/_zthun_helpful-query.html +4 -4
- package/dist/modules/_zthun_helpful-react.html +3 -3
- package/dist/modules/_zthun_helpful-validation.html +3 -3
- package/dist/modules.html +1 -1
- package/dist/types/_zthun_helpful-fn.DeepPartial.html +1 -1
- package/dist/types/_zthun_helpful-fn.JoinListInputParameter.html +3 -3
- package/dist/types/_zthun_helpful-fn.PickPredicate.html +1 -1
- package/dist/types/_zthun_helpful-fn.PickResult.html +1 -1
- package/dist/types/_zthun_helpful-fn.RequiredDeep.html +1 -1
- package/dist/types/_zthun_helpful-fn.RequiredPick.html +1 -1
- package/dist/types/_zthun_helpful-fn.ZAnchor.html +4 -4
- package/dist/types/_zthun_helpful-fn.ZCornersHorizontal.html +4 -2
- package/dist/types/_zthun_helpful-fn.ZCornersVertical.html +4 -2
- package/dist/types/_zthun_helpful-fn.ZObligatedValue.html +3 -3
- package/dist/types/_zthun_helpful-fn.ZQuadrilateralCornersLike.html +2 -2
- package/dist/types/_zthun_helpful-fn.ZQuadrilateralLike.html +2 -2
- package/dist/types/_zthun_helpful-fn.ZSideAnchor.html +2 -2
- package/dist/types/_zthun_helpful-fn.ZSupplier.html +2 -2
- package/dist/types/_zthun_helpful-fn.ZSupplierAsync.html +2 -2
- package/dist/types/_zthun_helpful-query.IZFilter.html +2 -2
- package/dist/types/_zthun_helpful-query.IZFilterUnary.html +2 -2
- package/dist/types/_zthun_helpful-query.ZOperatorFilter.html +2 -2
- package/dist/types/_zthun_helpful-react.ZAmbassadorReducer.html +2 -2
- package/dist/types/_zthun_helpful-react.ZAmbassadorReducerRequired.html +2 -2
- package/dist/types/_zthun_helpful-react.ZAmbassadorSetCurrent.html +2 -2
- package/dist/types/_zthun_helpful-react.ZAsyncDataState.html +2 -2
- package/dist/types/_zthun_helpful-react.ZAsyncDataTuple.html +2 -2
- package/dist/types/_zthun_helpful-react.ZAsyncUseData.html +2 -2
- package/dist/types/_zthun_helpful-react.ZSetStateAsArray.html +1 -1
- package/dist/types/_zthun_helpful-react.ZStateAsArrayReducer.html +1 -1
- package/dist/variables/_zthun_helpful-brands.ZBrands.html +2 -2
- package/dist/variables/_zthun_helpful-fn._global.html +1 -1
- package/dist/variables/_zthun_helpful-fn.bash.html +14 -0
- package/dist/variables/_zthun_helpful-fn.commaJoinDefined.html +5 -0
- package/dist/variables/_zthun_helpful-fn.createGuid.html +11 -0
- package/dist/variables/_zthun_helpful-fn.css.html +16 -0
- package/dist/variables/_zthun_helpful-fn.cssJoinDefined.html +5 -0
- package/dist/variables/_zthun_helpful-fn.html.html +16 -0
- package/dist/variables/_zthun_helpful-fn.javascript.html +14 -0
- package/dist/variables/_zthun_helpful-fn.js.html +16 -0
- package/dist/variables/_zthun_helpful-fn.markdown.html +14 -0
- package/dist/variables/_zthun_helpful-fn.md.html +16 -0
- package/dist/variables/_zthun_helpful-fn.pipeJoinDefined.html +5 -0
- package/dist/variables/_zthun_helpful-fn.semiColonJoinDefined.html +5 -0
- package/dist/variables/_zthun_helpful-fn.sh.html +14 -0
- package/dist/variables/_zthun_helpful-fn.spaceJoinDefined.html +5 -0
- package/dist/variables/_zthun_helpful-fn.ts.html +16 -0
- package/dist/variables/_zthun_helpful-fn.typescript.html +14 -0
- package/dist/variables/_zthun_helpful-fn.zsh.html +14 -0
- package/dist/variables/_zthun_helpful-query.ZBinaryComparators.html +2 -2
- package/dist/variables/_zthun_helpful-query.ZCollectionComparators.html +2 -2
- package/dist/variables/_zthun_helpful-query.ZOperatorsBinary.html +2 -2
- package/dist/variables/_zthun_helpful-query.ZOperatorsCollection.html +2 -2
- package/dist/variables/_zthun_helpful-query.ZOperatorsFilter.html +2 -2
- package/dist/variables/_zthun_helpful-query.ZOperatorsLogic.html +2 -2
- package/dist/variables/_zthun_helpful-query.ZOperatorsUnary.html +2 -2
- package/dist/variables/_zthun_helpful-query.ZSortDirections.html +2 -2
- package/dist/variables/_zthun_helpful-query.ZUnaryComparators.html +2 -2
- package/dist/variables/_zthun_helpful-react.DefaultActivateCodes.html +2 -2
- package/dist/variables/_zthun_helpful-react.ZAsyncLoading.html +2 -2
- package/dist/variables/_zthun_helpful-react.ZFileSelectContext.html +2 -0
- package/dist/variables/_zthun_helpful-react.ZWindowServiceContext.html +2 -0
- package/package.json +12 -12
- package/dist/classes/_zthun_helpful-node.ZFileSystemNodeBuilder.html +0 -11
- package/dist/classes/_zthun_helpful-node.ZFileSystemService.html +0 -12
- package/dist/enums/_zthun_helpful-node.ZFileSystemNodeType.html +0 -4
- package/dist/functions/_zthun_helpful-fn.bash.html +0 -14
- package/dist/functions/_zthun_helpful-fn.commaJoinDefined.html +0 -5
- package/dist/functions/_zthun_helpful-fn.createGuid.html +0 -11
- package/dist/functions/_zthun_helpful-fn.css.html +0 -16
- package/dist/functions/_zthun_helpful-fn.cssJoinDefined.html +0 -5
- package/dist/functions/_zthun_helpful-fn.html.html +0 -16
- package/dist/functions/_zthun_helpful-fn.javascript.html +0 -14
- package/dist/functions/_zthun_helpful-fn.js.html +0 -16
- package/dist/functions/_zthun_helpful-fn.markdown.html +0 -14
- package/dist/functions/_zthun_helpful-fn.md.html +0 -16
- package/dist/functions/_zthun_helpful-fn.pipeJoinDefined.html +0 -5
- package/dist/functions/_zthun_helpful-fn.semiColonJoinDefined.html +0 -5
- package/dist/functions/_zthun_helpful-fn.sh.html +0 -14
- package/dist/functions/_zthun_helpful-fn.spaceJoinDefined.html +0 -5
- package/dist/functions/_zthun_helpful-fn.ts.html +0 -16
- package/dist/functions/_zthun_helpful-fn.typescript.html +0 -14
- package/dist/functions/_zthun_helpful-fn.zsh.html +0 -14
- package/dist/functions/_zthun_helpful-node.walk.html +0 -12
- package/dist/functions/_zthun_helpful-react.ZFileSelectContext.html +0 -10
- package/dist/functions/_zthun_helpful-react.ZWindowServiceContext.html +0 -10
- package/dist/interfaces/_zthun_helpful-node.IZFileSystemNode.html +0 -11
- package/dist/interfaces/_zthun_helpful-node.IZFileSystemSearchOptions.html +0 -5
- package/dist/interfaces/_zthun_helpful-node.IZFileSystemService.html +0 -11
- package/dist/interfaces/_zthun_helpful-node.ZWalkOptions.html +0 -13
- package/dist/variables/_zthun_helpful-node.ZFileSystemToken.html +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>createKeyboardActivate | Helpful</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Helpful"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Helpful</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/_zthun_helpful-react.html">@zthun/helpful-react</a></li><li><a href="" aria-current="page">createKeyboardActivate</a></li></ul><h1>Function createKeyboardActivate</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="createkeyboardactivate"><span class="tsd-kind-call-signature">createKeyboardActivate</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#createkeyboardactivatet">T</a> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">Element</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">handler</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">KeyboardEventHandler</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#createkeyboardactivatet">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">codes</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> (<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">e</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">KeyboardEvent</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#createkeyboardactivatet">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span>)<a href="#createkeyboardactivate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="createkeyboardactivatet"><span class="tsd-kind-type-parameter">T</span> = <span class="tsd-signature-type">Element</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">handler</span>: <span class="tsd-signature-type">KeyboardEventHandler</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#createkeyboardactivatet">T</a><span class="tsd-signature-symbol">></span></span><div class="tsd-comment tsd-typography"><p>The callback handler to invoke when any of the key codes
|
|
2
2
|
are pressed. If this is undefined, then it will never be invoked</p>
|
|
3
3
|
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">codes</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>The list of key codes that will fire the event handler. The default
|
|
4
4
|
value will be <a href="../variables/_zthun_helpful-react.DefaultActivateCodes.html" class="tsd-kind-variable">DefaultActivateCodes</a>.</p>
|
|
5
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">e</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">KeyboardEvent</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="
|
|
6
|
-
<div class="tsd-comment tsd-typography"><div class="tsd-tag-see"><h4 class="tsd-anchor-link"
|
|
7
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
5
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> (<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">e</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">KeyboardEvent</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#createkeyboardactivatet">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span>)</h4><p>An object that contains the equivalent keydown event</p>
|
|
6
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-see"><h4 class="tsd-anchor-link" id="see">See<a href="#see" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="_zthun_helpful-react.useKeyboardActivate.html" class="tsd-kind-function">useKeyboardActivate</a></p>
|
|
7
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/3e88f38b916d0973f2520566526efbd1519ed6af/packages/helpful-react/src/keyboard-activate/use-keyboard-activate.mts#L52">keyboard-activate/use-keyboard-activate.mts:52</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="
|
|
2
|
-
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span
|
|
3
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/_zthun_helpful-react.ZAsyncDataState.html" class="tsd-signature-type tsd-kind-type-alias">ZAsyncDataState</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>isStateErrored | Helpful</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Helpful"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Helpful</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/_zthun_helpful-react.html">@zthun/helpful-react</a></li><li><a href="" aria-current="page">isStateErrored</a></li></ul><h1>Function isStateErrored</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="isstateerrored"><span class="tsd-kind-call-signature">isStateErrored</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#isstateerroredt">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/_zthun_helpful-react.ZAsyncDataState.html" class="tsd-signature-type tsd-kind-type-alias">ZAsyncDataState</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#isstateerroredt">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-kind-parameter">data</span> <span class="tsd-signature-keyword">is</span> <span class="tsd-signature-type">Error</span><a href="#isstateerrored" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets whether data has errored.</p>
|
|
2
|
+
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="isstateerroredt"><span class="tsd-kind-type-parameter">T</span></span><div class="tsd-comment tsd-typography"><p>The type of data of the loaded state.</p>
|
|
3
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/_zthun_helpful-react.ZAsyncDataState.html" class="tsd-signature-type tsd-kind-type-alias">ZAsyncDataState</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#isstateerroredt">T</a><span class="tsd-signature-symbol">></span></span><div class="tsd-comment tsd-typography"><p>The data to check.</p>
|
|
4
4
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-kind-parameter">data</span> <span class="tsd-signature-keyword">is</span> <span class="tsd-signature-type">Error</span></h4><p>True if the data is in an error state.</p>
|
|
5
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
5
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/3e88f38b916d0973f2520566526efbd1519ed6af/packages/helpful-react/src/async-state/use-async-state.mts#L129">async-state/use-async-state.mts:129</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="
|
|
2
|
-
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span
|
|
3
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/_zthun_helpful-react.ZAsyncDataState.html" class="tsd-signature-type tsd-kind-type-alias">ZAsyncDataState</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="
|
|
4
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-kind-parameter">data</span> <span class="tsd-signature-keyword">is</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="
|
|
5
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>isStateLoaded | Helpful</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Helpful"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Helpful</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/_zthun_helpful-react.html">@zthun/helpful-react</a></li><li><a href="" aria-current="page">isStateLoaded</a></li></ul><h1>Function isStateLoaded</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="isstateloaded"><span class="tsd-kind-call-signature">isStateLoaded</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#isstateloadedt">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/_zthun_helpful-react.ZAsyncDataState.html" class="tsd-signature-type tsd-kind-type-alias">ZAsyncDataState</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#isstateloadedt">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-kind-parameter">data</span> <span class="tsd-signature-keyword">is</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#isstateloadedt">T</a><a href="#isstateloaded" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets whether data has been loaded.</p>
|
|
2
|
+
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="isstateloadedt"><span class="tsd-kind-type-parameter">T</span></span><div class="tsd-comment tsd-typography"><p>The type of data of the loaded state.</p>
|
|
3
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/_zthun_helpful-react.ZAsyncDataState.html" class="tsd-signature-type tsd-kind-type-alias">ZAsyncDataState</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#isstateloadedt">T</a><span class="tsd-signature-symbol">></span></span><div class="tsd-comment tsd-typography"><p>The data to check.</p>
|
|
4
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-kind-parameter">data</span> <span class="tsd-signature-keyword">is</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#isstateloadedt">T</a></h4><p>True if the data is loaded.</p>
|
|
5
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/3e88f38b916d0973f2520566526efbd1519ed6af/packages/helpful-react/src/async-state/use-async-state.mts#L114">async-state/use-async-state.mts:114</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="
|
|
2
|
-
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span
|
|
3
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/_zthun_helpful-react.ZAsyncDataState.html" class="tsd-signature-type tsd-kind-type-alias">ZAsyncDataState</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>isStateLoading | Helpful</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Helpful"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Helpful</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/_zthun_helpful-react.html">@zthun/helpful-react</a></li><li><a href="" aria-current="page">isStateLoading</a></li></ul><h1>Function isStateLoading</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="isstateloading"><span class="tsd-kind-call-signature">isStateLoading</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#isstateloadingt">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/_zthun_helpful-react.ZAsyncDataState.html" class="tsd-signature-type tsd-kind-type-alias">ZAsyncDataState</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#isstateloadingt">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-kind-parameter">data</span> <span class="tsd-signature-keyword">is</span> <span class="tsd-signature-type">symbol</span><a href="#isstateloading" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets whether data is loading.</p>
|
|
2
|
+
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="isstateloadingt"><span class="tsd-kind-type-parameter">T</span></span><div class="tsd-comment tsd-typography"><p>The type of data of the loaded state.</p>
|
|
3
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/_zthun_helpful-react.ZAsyncDataState.html" class="tsd-signature-type tsd-kind-type-alias">ZAsyncDataState</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#isstateloadingt">T</a><span class="tsd-signature-symbol">></span></span><div class="tsd-comment tsd-typography"><p>The data to check.</p>
|
|
4
4
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-kind-parameter">data</span> <span class="tsd-signature-keyword">is</span> <span class="tsd-signature-type">symbol</span></h4><p>True if the data is in a loading state.</p>
|
|
5
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
5
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/3e88f38b916d0973f2520566526efbd1519ed6af/packages/helpful-react/src/async-state/use-async-state.mts#L99">async-state/use-async-state.mts:99</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>useAmbassadorState | Helpful</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Helpful"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Helpful</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/_zthun_helpful-react.html">@zthun/helpful-react</a></li><li><a href="" aria-current="page">useAmbassadorState</a></li></ul><h1>Function useAmbassadorState</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>A type of state where the value is used from the props in the case of them being set.</p>
|
|
2
2
|
<p>Otherwise, an internal set of properties are used. This is useful in the case that you
|
|
3
3
|
want to allow properties to control the state of the component, but this functionality is
|
|
4
4
|
to be optional.</p>
|
|
5
|
-
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-param"><h4 class="tsd-anchor-link"
|
|
5
|
+
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-current">Param: current<a href="#param-current" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>The current value from the props. If this is
|
|
6
6
|
undefined, then the internal state is used.</p>
|
|
7
|
-
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link"
|
|
7
|
+
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-setcurrent">Param: setCurrent<a href="#param-setcurrent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>The mutator method to set the current value. This can
|
|
8
8
|
be undefined, but if it is set, both the internal value and
|
|
9
9
|
the prop value are set.</p>
|
|
10
|
-
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link"
|
|
11
|
-
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link"
|
|
12
|
-
</div><div class="tsd-tag-returns"><h4 class="tsd-anchor-link"
|
|
10
|
+
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-initial">Param: initial<a href="#param-initial" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>The initial value to set if current is undefined.</p>
|
|
11
|
+
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-t">Param: T<a href="#param-t" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>The type of data for the state.</p>
|
|
12
|
+
</div><div class="tsd-tag-returns"><h4 class="tsd-anchor-link" id="returns">Returns<a href="#returns" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>A tuple where the first item is the current state and the 2nd item is a mutator
|
|
13
13
|
method to modify the state.</p>
|
|
14
|
-
</div></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"
|
|
14
|
+
</div></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="useambassadorstate"><span class="tsd-kind-call-signature">useAmbassadorState</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">current</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet">T</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">setCurrent</span><span class="tsd-signature-symbol">:</span> <a href="../types/_zthun_helpful-react.ZAmbassadorSetCurrent.html" class="tsd-signature-type tsd-kind-type-alias">ZAmbassadorSetCurrent</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet">T</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet">T</a> <span class="tsd-signature-symbol">|</span> <a href="../types/_zthun_helpful-react.ZAmbassadorReducer.html" class="tsd-signature-type tsd-kind-type-alias">ZAmbassadorReducer</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">]</span><a href="#useambassadorstate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>A type of state where the value is used from the props in the case of them being set.</p>
|
|
15
15
|
<p>Otherwise, an internal set of properties are used. This is useful in the case that you
|
|
16
16
|
want to allow properties to control the state of the component, but this functionality is
|
|
17
17
|
to be optional.</p>
|
|
18
|
-
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span
|
|
19
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">current</span>: <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="
|
|
18
|
+
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="useambassadorstatet"><span class="tsd-kind-type-parameter">T</span></span><div class="tsd-comment tsd-typography"><p>The type of data for the state.</p>
|
|
19
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">current</span>: <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet">T</a></span><div class="tsd-comment tsd-typography"><p>The current value from the props. If this is
|
|
20
20
|
undefined, then the internal state is used.</p>
|
|
21
|
-
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">setCurrent</span>: <a href="../types/_zthun_helpful-react.ZAmbassadorSetCurrent.html" class="tsd-signature-type tsd-kind-type-alias">ZAmbassadorSetCurrent</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="
|
|
21
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">setCurrent</span>: <a href="../types/_zthun_helpful-react.ZAmbassadorSetCurrent.html" class="tsd-signature-type tsd-kind-type-alias">ZAmbassadorSetCurrent</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet">T</a><span class="tsd-signature-symbol">></span></span><div class="tsd-comment tsd-typography"><p>The mutator method to set the current value. This can
|
|
22
22
|
be undefined, but if it is set, both the internal value and
|
|
23
23
|
the prop value are set.</p>
|
|
24
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">[</span><
|
|
24
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet">T</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet">T</a> <span class="tsd-signature-symbol">|</span> <a href="../types/_zthun_helpful-react.ZAmbassadorReducer.html" class="tsd-signature-type tsd-kind-type-alias">ZAmbassadorReducer</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">]</span></h4><p>A tuple where the first item is the current state and the 2nd item is a mutator
|
|
25
25
|
method to modify the state.</p>
|
|
26
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
26
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/3e88f38b916d0973f2520566526efbd1519ed6af/packages/helpful-react/src/ambassador-state/use-ambassador-state.mts#L41">ambassador-state/use-ambassador-state.mts:41</a></li></ul></aside></div></li><li class=""><div class="tsd-signature tsd-anchor-link" id="useambassadorstate-1"><span class="tsd-kind-call-signature">useAmbassadorState</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet-1">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">current</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet-1">T</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">setCurrent</span><span class="tsd-signature-symbol">:</span> <a href="../types/_zthun_helpful-react.ZAmbassadorSetCurrent.html" class="tsd-signature-type tsd-kind-type-alias">ZAmbassadorSetCurrent</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet-1">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet-1">T</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">[</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet-1">T</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet-1">T</a> <span class="tsd-signature-symbol">|</span> <a href="../types/_zthun_helpful-react.ZAmbassadorReducerRequired.html" class="tsd-signature-type tsd-kind-type-alias">ZAmbassadorReducerRequired</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet-1">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">]</span><a href="#useambassadorstate-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>A type of state where the value is used from the props in the case of them being set.</p>
|
|
27
27
|
<p>Otherwise, an internal set of properties are used. This is useful in the case that you
|
|
28
28
|
want to allow properties to control the state of the component, but this functionality is
|
|
29
29
|
to be optional.</p>
|
|
30
|
-
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span
|
|
30
|
+
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="useambassadorstatet-1"><span class="tsd-kind-type-parameter">T</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">current</span>: <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet-1">T</a></span><div class="tsd-comment tsd-typography"><p>The current value from the props. If this is
|
|
31
31
|
undefined, then the internal state is used.</p>
|
|
32
|
-
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">setCurrent</span>: <a href="../types/_zthun_helpful-react.ZAmbassadorSetCurrent.html" class="tsd-signature-type tsd-kind-type-alias">ZAmbassadorSetCurrent</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="
|
|
32
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">setCurrent</span>: <a href="../types/_zthun_helpful-react.ZAmbassadorSetCurrent.html" class="tsd-signature-type tsd-kind-type-alias">ZAmbassadorSetCurrent</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet-1">T</a><span class="tsd-signature-symbol">></span></span><div class="tsd-comment tsd-typography"><p>The mutator method to set the current value. This can
|
|
33
33
|
be undefined, but if it is set, both the internal value and
|
|
34
34
|
the prop value are set.</p>
|
|
35
|
-
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">initial</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="
|
|
36
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">[</span><a class="tsd-signature-type tsd-kind-type-parameter" href="
|
|
35
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">initial</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet-1">T</a></span><div class="tsd-comment tsd-typography"><p>The initial value to set if current is undefined.</p>
|
|
36
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">[</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet-1">T</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet-1">T</a> <span class="tsd-signature-symbol">|</span> <a href="../types/_zthun_helpful-react.ZAmbassadorReducerRequired.html" class="tsd-signature-type tsd-kind-type-alias">ZAmbassadorReducerRequired</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useambassadorstatet-1">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">]</span></h4><p>A tuple where the first item is the current state and the 2nd item is a mutator
|
|
37
37
|
method to modify the state.</p>
|
|
38
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
38
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/3e88f38b916d0973f2520566526efbd1519ed6af/packages/helpful-react/src/ambassador-state/use-ambassador-state.mts#L67">ambassador-state/use-ambassador-state.mts:67</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="
|
|
2
|
-
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span
|
|
3
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">load</span>: <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>useAsyncState | Helpful</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Helpful"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Helpful</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/_zthun_helpful-react.html">@zthun/helpful-react</a></li><li><a href="" aria-current="page">useAsyncState</a></li></ul><h1>Function useAsyncState</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="useasyncstate"><span class="tsd-kind-call-signature">useAsyncState</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useasyncstatet">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">load</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useasyncstatet">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">deps</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">DependencyList</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="../types/_zthun_helpful-react.ZAsyncDataTuple.html" class="tsd-signature-type tsd-kind-type-alias">ZAsyncDataTuple</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useasyncstatet">T</a><span class="tsd-signature-symbol">></span><a href="#useasyncstate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Represents a hook to use async data.</p>
|
|
2
|
+
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="useasyncstatet"><span class="tsd-kind-type-parameter">T</span></span><div class="tsd-comment tsd-typography"><p>The type of data that will eventually be given.</p>
|
|
3
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">load</span>: <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useasyncstatet">T</a><span class="tsd-signature-symbol">></span></span><div class="tsd-comment tsd-typography"><p>The load method for the data.</p>
|
|
4
4
|
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">deps</span>: <span class="tsd-signature-type">DependencyList</span><span class="tsd-signature-symbol"> = []</span></span><div class="tsd-comment tsd-typography"><p>The dependencies to force a refresh of the data.</p>
|
|
5
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../types/_zthun_helpful-react.ZAsyncDataTuple.html" class="tsd-signature-type tsd-kind-type-alias">ZAsyncDataTuple</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="
|
|
5
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../types/_zthun_helpful-react.ZAsyncDataTuple.html" class="tsd-signature-type tsd-kind-type-alias">ZAsyncDataTuple</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#useasyncstatet">T</a><span class="tsd-signature-symbol">></span></h4><p>A tuple where the first item is the current state of the data and
|
|
6
6
|
the 2nd argument is a refresh function to refresh the data.</p>
|
|
7
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/
|
|
7
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/zthun/helpful/blob/3e88f38b916d0973f2520566526efbd1519ed6af/packages/helpful-react/src/async-state/use-async-state.mts#L53">async-state/use-async-state.mts:53</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Helpful</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|