@nhtio/lucid-resourceful-vue-components/helpers
Helper functions and constants provided by the @nhtio/lucid-resourceful-vue-components package.
Namespaces
| Namespace | Description |
|---|---|
| numeral | - |
| qs | - |
Interfaces
| Interface | Description |
|---|---|
| BigNumber | - |
| FocusProps | - |
Type Aliases
| Type Alias | Description |
|---|---|
| _ToObjectOutput | - |
| _ToObjectUnit | - |
| CallbackFnResponse | - |
| CreatedException | - |
| Encodable | Defines all the types which can be be encoded |
| EncodablePrimitive | Defines the union of all encodable primitive types. |
| EncodableTypedArray | Defines a union for all the encodable typed arrays. |
| EventProp | - |
| EventProp | - |
| ExtractPublicDefaultPropTypes | Extract default values for properties that are both public and have defaults. This ensures we only get defaults for props that are actually exposed to consumers. |
| FactoryPropFactory | Type representing the return value of a Vuetifiable props factory function. This is used to constrain the generic parameter in getDefaultsForPropFactory. |
| MaybeRefOrGetter | - |
| NamedSlotParameters | - |
| ObjectStrippedOfUndefinedValues | - |
| ResourcefulFieldType | - |
| RGB | - |
| Slot | - |
| SlotParameters | - |
| ThemeDefinition | - |
Variables
| Variable | Description |
|---|---|
| decode | Decodes a compressed base64 string back into a value |
| decodeValidator | Decodes a base64-encoded schema string back into a usable validation schema. |
| dot | - |
| encode | Encodes a value into a compressed base64 string |
| encodeValidator | Encodes a validation schema into a compressed, base64-encoded string for transport between environments. |
| format | - |
| IN_BROWSER | - |
| ResourcefulFieldType | - |
| SUPPORTS_INTERSECTION | - |
| SUPPORTS_RESIZE_OBSERVATION | - |
| SUPPORTS_VISUAL_VIEWPORT | - |
| version | The current version of the package. |
Functions
| Function | Description |
|---|---|
| asAbsInt | Converts a value to an absolute integer, with fallback handling. This utility is useful for sanitizing numeric inputs that should always be positive integers. |
| copyToClipboard | Copies text to the system clipboard using multiple fallback strategies for maximum compatibility. |
| createError | - |
| debounce | - |
| extractErrorCode | - |
| formatBigNumber | Drop-in replacement for numeral().format() for use with Big.js |
| getDefaultsForPropFactory | Extracts default values from a Vuetifiable props factory and returns them as a runtime object. This is useful for getting default prop values for component initialization or testing. |
| getNormalizedBackgroundColor | - |
| getNormalizedForegroundColor | - |
| getOxfordizedListParts | - |
| getStringOrVNodeAsString | Converts a string or VNode to a plain string representation. This utility is essential for handling mixed content types where both plain text and rich VNode content need to be converted to string format for contexts that only accept text (like HTML attributes, tooltips, accessibility labels, etc.). |
| isNotEmpty | - |
| makeIdentifier | Generates unique HTML element identifiers using high-quality encoding for collision resistance. This function creates valid HTML IDs by combining a prefix with an encoded, sanitized suffix derived from namespace, timestamp, and random data. |
| mergeClasses | Merges CSS classes from multiple sources into a single array suitable for Vue's class binding. This utility is designed for component development where you need to combine built-in component classes with user-provided class additions (not overrides) while maintaining Vue's flexible class binding format. |
| numeral | A javascript library for formatting and manipulating numbers. |
| ordinal | - |
| renderDefaultResourcefulRecordForm | - |
| renderResourcefulRecordModelPropertyField | - |
| stripUndefinedValuesFromObject | Removes all properties with undefined values from an object. This is useful for cleaning up objects before passing them to APIs or components that should not receive undefined values. |
| throttle | - |
| toUnreactive | Recursively converts reactive Vue values to plain JavaScript equivalents. Removes all Vue reactivity (reactive, ref, computed) from nested data structures. Handles objects, arrays, primitives, and any other value types safely. |
| typeAndFormatToResourcefulFieldType | - |
| useNormalizedColor | - |
| useNormalizedColors | - |
| useNormalizedOpacities | - |
References
BaseException
Re-exports BaseException
ExtractSlotDefinitions
Re-exports ExtractSlotDefinitions
getCamelAndMaybeKebabPropKeysFor
Re-exports getCamelAndMaybeKebabPropKeysFor
PropType
Re-exports PropType
Ref
Re-exports Ref
Schema
Re-exports Schema
SlotsType
Re-exports SlotsType
svgPathToIconValue
Re-exports svgPathToIconValue
VNode
Re-exports VNode