npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ticatec/uniface-editable-data-table

v0.2.0

Published

A customizable editable table component for Svelte supporting text, number, date, dropdown, and user-defined column types.

Downloads

13

Readme

@ticatec/uniface-editable-data-table

A highly customizable multi-row editable data table for Svelte 5, with built-in support for inline editing, row validation, optional row indicator and action buttons, and dynamic column configuration.


✨ Features

  • 📝 Inline editing with multiple editor types (text, number, date, checkbox, etc.)
  • ✅ Built-in validation system using @ticatec/web-bean-validator
  • 🧭 Optional row indicator column (row numbers, selection)
  • 🗑️ Optional row delete support with confirmation
  • 📏 Configurable columns (type, width, formatter, editable)
  • 🔁 Live column refresh support
  • 🧱 Designed for enterprise-grade editable data UIs

📦 Installation

npm install @ticatec/uniface-editable-data-table

Requires svelte@^5 as a peer dependency.


🚀 Basic Usage

<script lang="ts">
  import EditableDataTable from "@ticatec/uniface-editable-data-table";
  import type { DataColumn, IndicatorColumn } from "@ticatec/uniface-element/DataTable";

  let columns: DataColumn[] = [
    { field: "name", text: "Name", type: "text", width: 150 },
    { field: "age", text: "Age", type: "number", width: 100 },
    { field: "birth", text: "Birth Date", type: "date", width: 180 },
  ];

  let list = [
    { name: "Alice", age: 28, birth: "1996-01-01" },
    { name: "Bob", age: 35, birth: "1989-05-12" },
  ];
</script>

<EditableDataTable
  {columns}
  {list}
  rowHeight={40}
  allowDelete={true}
/>

🔧 Props

| Prop | Type | Default | Description | | ----------------- | -------------------------------- | ------------ | ---------------------------------------------- | | columns | DataColumn[] | (required) | Column definitions | | list | any[] | (required) | Data rows | | selectedRows | any[] | [] | Selected row references | | indicatorColumn | IndicatorColumn \| null | null | Optional row indicators (checkbox, row number) | | rowHeight | number | 40 | Row height in pixels | | allowDelete | boolean | true | Whether to allow row deletion | | deleteConfirm | (row: any) => Promise<boolean> | true | Async confirmation before deleting a row | | style | string | '' | Inline styles for the table container |


🧪 Exposed Methods

These methods are exported from the module and can be used from outside the component:

import {
  getData,
  removeRows,
  validateData
} from "@ticatec/uniface-editable-data-table";

getData(): any[]

Returns the current list of edited row data.

removeRows(...rows: RowData[])

Removes one or more rows from the table.

validateData(rules: BaseValidator[]): boolean

Validates all rows using an array of BaseValidator. Returns true if all rows are valid, otherwise highlights invalid ones.


🧱 DataColumn Definition

interface DataColumn {
  field?: string;
  text: string;
  align?: 'left' | 'center' | 'right';
  width: number;
  resizable?: boolean;
  visible?: boolean;
  type?: string; // text | number | date | date-time | boolean | options-selector | multi-select
  attrs?: any;
  props?: any;
  minWidth?: number;
  formatter?: FormatCell;
  escapeHTML?: boolean;
}

🧭 IndicatorColumn Definition

interface IndicatorColumn {
  width: number;
  selectable?: boolean;
  displayNo?: boolean;
}

Set selectable: true to show checkboxes, and displayNo: true to show row numbers.


🧩 Row Delete Confirmation

To control row deletion with confirmation:

function confirmDelete(row: any): Promise<boolean> {
  return Promise.resolve(confirm(`Delete row: ${row.name}?`));
}

Pass it via:

<EditableDataTable
  {columns}
  {list}
  allowDelete={true}
  {deleteConfirm}
/>

🧰 Editor Types

Registered by default:

| type | Editor Component | | -------------------- | -------------------------- | | "text" | InlineTextEditor | | "number" | InlineNumberEditor | | "date" | InlineDatePicker | | "date-time" | InlineDateTimePicker | | "boolean" | InlineCheckbox | | "options-selector" | InlineOptionsSelect | | "multi-select" | InlineOptionsMultiSelect |

You can register custom editors via:

import editorManager from "@ticatec/uniface-editable-data-table/lib/editorManager";
editorManager.register("custom-type", YourCustomEditorComponent);

🎨 Styling

To include the default styles:

import "@ticatec/uniface-editable-data-table/uniface-editable-datatable.css";

You can also override styles using the style prop or custom CSS.


📄 License

MIT


👤 Author

Henry Feng @ticatec


🔗 Related Packages