Skip to content

Utilities

Account

utils.account

Helper functions for user account management: email verification, password reset, identity change, and signup flows. Backed by the KDK account FeathersJS service.

Actions

utils.actions

Exports actionProps, a reusable Vue props definition object shared by all KDK action components (buttons, FAB actions, tabs, items, etc.).

Collection

utils.collection

Helpers for querying FeathersJS collections: listItems, getOldestItem, getLatestItem, getDistinctValues, searchText, containsText, and getCollectionService.

Colors

utils.colors

Color utilities including Quasar and HTML palette constants, getHtmlColor, getPaletteFromColor, findClosestPaletteColor, getContrastColor, and buildColorScale.

Content

utils.content

The content binding and filtering engine. Provides filterContent, bindContent, bindProperties, bindHandler, generateHandler, bindParams, and getBoundValue to connect configuration-driven UI component definitions to their runtime context via :xxx syntax.

Files

utils.files

Browser-compatible file path and size utilities: getFileName, getExtension, getBaseName, getDir, and formatSize.

Items

utils.items

Exports CardSectionProps, a reusable Vue props definition object shared by KDK card section components.

Locale

utils.locale

Locale detection utilities: getBrowserLocale, getLocale, and getFallbackLocale.

Math

utils.math

Mathematical helpers for animations and interpolation: clamp, easeOut, linear, and cubicBezier.

Offline

utils.offline

Offline-first synchronisation utilities. Manages Automerge CRDT offline documents and offline-capable service instances via LocalCache.

Push

utils.push

Provides subscribeToPushNotifications for registering a device with the KDK web push notification system. Requires PWA mode.

Screen

utils.screen

Responsive screen helpers: computeResponsiveWidth, computeResponsiveHeight, computeResponsiveSize, getOrientation, toggleFullscreen, and lockOrientation.

Services

utils.services

Service operation classification helpers and event listener utilities: listenToServiceEvents, unlistenToServiceEvents, and isReadOperation, isCreateOperation, isUpdateOperation, isRemoveOperation, isDataOperation, isCustomOperation.

Session

utils.session

Core authentication and session management functions: login, register, logout, restoreSession, updateAbilities, updateUser, logoutUser, subscribeToUserChanges, and unsubscribeToUserChanges.

Shapes

utils.shapes

SVG/HTML shape generation for map markers and point symbols. Exports the Shapes catalog and createShape(options) which produces HTML strings with optional icon, text, and HTML overlays.

Tags

utils.tags

Provides getTagsFilterOptions(service) to fetch available tags for a given service from the KDK tags service.

Time

utils.time

Time-related utilities: getTimezoneLabel, roundHours, roundMinutes, and getNearestIntervalTime for interval-based time snapping.

Tours

utils.tours

Exports buildTours(config) which transforms a Vue Router route configuration tree into a flat map of tour step arrays for the KDK tour system.