0.2.4 • Published 1 year ago

dasmaql-svelte v0.2.4

Weekly downloads
-
License
GPL-3.0-or-later
Repository
-
Last release
1 year ago

DasmaQL Svelte - Work in Progress

The DasmaQL component is a Svelte component built on top of the npm package dasmaql. It provides support for highlighting, autocompletion, and model generation, which can be utilized in both frontend and backend applications.

Features

  • Highlighting: Svelte DasmaQL component supports syntax highlighting for enhanced readability and understanding of DasmaQL queries.
  • Autocompletion: It offers autocompletion functionality to assist users in typing DasmaQL queries more efficiently and accurately.
  • Model Generation: The component can generate DasmaQL query models based on provided fields and search callbacks, facilitating easier integration with backend systems.

Example Usage

Parameters

  • fields: An array of valid fields for autocompletion suggestions.
  • callbackSearch: A callback function to search for parameters based on the provided field and search query.
<script lang="ts">

    const callbackSearch = (field: string, search: string): (string | { label: string })[] => {
        // Placeholder for search functionality
        // Replace with actual search logic
    
        // Return dummy search result for example
        return [label: '"some result"'];
    };
</script>

<DasmaQl {fields} {callbackSearch} />

Demo

Demo

0.2.3

1 year ago

0.2.4

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.2.2

1 year ago

0.1.0

1 year ago