open-index/open-npm huggingface dataset:
npm package: @mattybeard/datavalidation
Description: A Power Platform Toolbox tool for validating Dataverse table data against configurable column-level rules. Run tests across thousands of records and instantly see pass/fail results with detailed breakdowns.
Author: Matt Beard
Latest version: 0.1.4

# DataValidation

DataValidation is a Power Platform ToolBox tool for running simple, repeatable data quality checks against Dataverse tables.

The tool lets you select a table, choose columns, configure tests per column, and run those tests across all records to produce a headline pass rate and per-test results.

## Current Capabilities

### Table and Column Setup

- Browse Dataverse tables (display name + logical name).
- Load table columns and filter out unsupported/internal types.
- Sort columns by logical name, display name, type, or configured test count.
- Configure tests per column or apply tests in bulk to selected columns.

### Implemented Tests

- `Contains Data`
  - Passes when the value is not null, undefined, or empty/whitespace.

- `Matches Regex`
  - Uses a configured regular expression against the string form of the value.

- `Matches Metadata` (currently implemented for selected attribute types)
  - `StringType`: value length must be `<= MaxLength`.
  - `IntegerType`: value must be an integer within `[MinValue, MaxValue]` (where bounds exist).
  - `DecimalType` and `MoneyType`: numeric value must be within `[MinValue, MaxValue]` (where bounds exist).
  - `PicklistType`, `StateType`, `StatusType`: value must exist in metadata options.

## How Test Execution Works

When you click `Run Selected Tests`, the tool:

1. Builds a FetchXML query including only columns with configured tests.
2. Retrieves all records for the selected table (paged).
3. Executes configured tests against each record value.
4. Displays:
   - A headline pass rate across all executed checks.
   - A per-column, per-test pass/fail breakdown.

## Local Development

### Prerequisites

- Node.js 18+

### Install

```bash
npm install
```

or

```bash
pnpm install
```

### Run Dev Mode

```bash
npm run dev
```

### Build

```bash
npm run build
```

### Validate Package

```bash
npm run validate
```

## Usage in Power Platform ToolBox

1. Build the tool (`npm run build`).
2. Package/install in ToolBox using your normal ToolBox workflow.
3. Connect to a Dataverse environment.
4. Select a table.
5. Configure tests on one or more columns.
6. Run tests and review the summary/results grid.

## Notes and Limitations

- `Matches Metadata` is intentionally incremental and currently covers the types listed above.
- Empty values are treated as metadata-valid so that completeness checks remain the job of `Contains Data`.
- Very large tables may take longer due to full-table paging and in-memory evaluation.

## Tech Stack

- React 18 + TypeScript
- MobX
- Fluent UI React v8
- Vite
- `window.dataverseAPI` and `window.toolboxAPI` from Power Platform ToolBox

## License

MIT
npm package: @mattyreacts/debouncetextfield
Description: A debounced text field based on @mui/material/TextField. The onChange callback is not called until the user has stopped entering text for a period of time.
Author: Mathew Crothers
Latest version: 1.0.2

# DebounceTextField
## Description
A React component based on [@mui/material/TextField](https://mui.com/material-ui/react-text-field/). The onChange callback is
called only after the user has stopped modifying the text in the field for a defined period of time.

## Installation
`npm install @mattyreacts/debouncetextfield`

## Usage
See [MUI TextField API](https://mui.com/material-ui/api/text-field/) for TextField properties

### Extended Properties

| Name     | Type                                 | Default    | Description                                                          |
|----------|--------------------------------------|------------|----------------------------------------------------------------------|
| delay    | `number`                             | 500        | The delay on the debounce in milliseconds                            |
| onChange | `(value: string) => void`            | -          | The callback to call after the delay timeout once editing has ceased |
| value    | `string`                             | -          | The value of the field                                               |

## Example
```ts
import * as React from "react";
import { useCallback, useState, useEffect } from "react";
import { Search } from "@mui/icons-material";
import DebounceTextField from "@mattyreacts/debouncetextfield";
import { Stack, Typography } from "@mui/material";

function DelaySearch(): React.JSX.Element {
    const [items, setItems] = useState<string[]>([]);
    const [search, setSearch] = useState<string>('');

    const handleSearchChange = useCallback((value: string) => {
        setSearch(value);
    }, []);

    useEffect((): void => {
        if(search.trim() === '')
            return;
        
        (async (): Promise<void> => {
            try {
                const res = await fetch(`/search?query=${search}`);
                const items = await res.json();
                setItems(items);
            } catch(err) {
                console.error(err);
            }
        })();
    }, [search]);

    return (
        <Stack direction="column">
            <DebounceTextField value={search} onChange={handleSearchChange} />
            {items.map((item: string, index: number) => (
                <Typography variant="body1" key={`item${index}`}>{item}</Topography>
            ))}
        </Stack>
    );
}
```
npm package: @mattyreacts/mui-confirm-dialog
Description: An easy to use confirm dialog using @mui/material/Dialog using Promises for confirm or cancel
Author: Mathew Crothers
Latest version: 1.0.1

# ConfirmDialog
An easy to use confirm dialog using [@mui/material/Dialog](https://mui.com/material-ui/react-dialog/). Use async/await to control program flow
with the confirm dialog as the dialog resolves on "OK" click and rejects on "Cancel" click or dialog dismiss.

## Installation
`npm install @mattyreacts/mui-confirm-dialog`

## Setup
Include the ConfirmDialog component anywhere in your application, but usually at the root of the tree.

```tsx
import * as React from 'react';
import { ConfirmDialog } from '@mattyreacts/mui-confirm-dialog';

function App(): React.JSX.Element {
    return (
        <>
            <ConfirmDialog />
            {...otherComponents}
        </>
    )
}
```

## Usage
Call the `showConfirmDialog(props: ConfirmDialogProps): Promise<void>` function to show the dialog from anywhere in your React application.

### ConfirmDialogProps Interface
| Property   | Type   | Description                                             | Required | Default   |
|------------|--------|---------------------------------------------------------|----------|-----------|
| text       | string | The text to display in the body of the confirm dialog   | Yes      | -         |
| title      | string | The title of the dialog box                             | No       | "Confirm" |
| OKText     | string | The text to show on the OK button of the dialog box     | No       | "OK"      |
| CancelText | string | The text to show on the Cancel button of the dialog box | No       | "Cancel"  |

## Example
```tsx
import * as React from 'react';
import { useCallback } from 'react';
import { showConfirmDialog, ConfirmDialog } from '@mattyreacts/mui-confirm-dialog';
import { Button } from '@mui/material'

function Component(): React.JSX.Element {
    const handleDelete = useCallback(async (): Promise<void> => {
        try {
            await showConfirmDialog({
                text: 'Are you sure you want to delete this item?',
                title: 'Confirm Delete',
                OKText: 'Yes',
                CancelText: 'No'
            });
        } catch(err) {
            //dialog cancelled
            return;
        }
        await fetch('/api/delete');
    }, []);

    return (
        <>
            <ConfirmDialog />
            <Button onClick={handleDelete}>
                Delete Item
            </Button>
        </>
    )
}
```
npm package: @mattyreacts/numberfield
Description: A number text field based on @mui/material/TextField that only allows valid numbers as input
Author: Mathew Crothers
Latest version: 1.0.4

# NumberField
## Description
A React component based on [@mui/material/TextField](https://mui.com/material-ui/react-text-field/). Only allows
valid numbers as input and ignores all else.

## Installation
`npm install @mattyreacts/numberfield`

## Usage
See [MUI TextField API](https://mui.com/material-ui/api/text-field/) for TextField properties

### Extended Properties

| Name          | Type      | Default | Description                                                          |
|---------------|-----------|---------|----------------------------------------------------------------------|
| allowDecimal? | `boolean` | true    | If True then the user can input numbers with decimal places after.   |
| min?          | `number`  | -       | If set then any number below this minimum will be ignored            |
| max?          | `number`  | -       | If set then any number greater than this will be ignored             |
| maxDp?        | `number`  | -       | The maximum number of decimal places to allow                        |

## Example
```ts
import * as React from "react";
import { useCallback, useState } from "react";
import NumberField from "@mattyreacts/numberfield";
import { Stack, Typography, InputAdornment } from "@mui/material";

function PriceInput(): React.JSX.Element {
    const [price, setPrice] = useState<string>('');

    const handlePriceChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {
        setPrice(event.target.value);
    }, []);

    return (
        <Stack direction="column">
            <Typography variant="body1">{price}</Typography>
            <NumberField value={price}
                onChange={handlePriceChange}
                variant="outlined"
                label="Price"
                allowDecimal
                maxDp={2}
                slotProps={{
                    input: {
                        startAdornment: <InputAdornment position="start">$</InputAdornment>
                    }
                }} 
            />
        </Stack>
    );
}

export default React.memo(PriceInput);
```
npm package: @mattzgg/react-tagarea
Description: A simple react component used to input tag like data.
Author: Matthew Gong
Latest version: 1.0.2

# react-tagarea

A react component used to input tag like data.

# Installation

1. Install react-tagarea

    `yarn add @mattzgg/react-tagarea`

2. Install the peer dependencies

    `yarn add react react-dom prop-types lodash styled-components`

# Demo

```javascript
import React, { useState } from "react";
import Tagarea from "@mattzgg/react-tagarea";
import "./App.css";

function App() {
    const [tags, setTags] = useState([
        {
            text: "Fullstack Web Development",
            value: "1",
        },
        {
            text: "React",
            value: "2",
        },
        {
            text: "React Native",
            value: "3",
        },
        {
            text: "Object-oriented Analysis and Design",
            value: "4",
        },
    ]);
    const [appearanceConfig, setAppearanceConfig] = useState(
        Tagarea.defaultProps.appearanceConfig
    );
    const onAddTag = (newTag) => {
        setTags([...tags, newTag]);
    };
    const onDeleteTag = (deletedTagIndex) => {
        setTags(tags.filter((tag, index) => index !== deletedTagIndex));
    };
    const onResize = (newAppearanceConfig) => {
        setAppearanceConfig(newAppearanceConfig);
    };
    return (
        <div className="App">
            <div>
                <label htmlFor="skills">
                    Please input the skills that you have:
                </label>
                <Tagarea
                    name="skills"
                    tags={tags}
                    appearanceConfig={appearanceConfig}
                    onAddTag={onAddTag}
                    onDeleteTag={onDeleteTag}
                    onResize={onResize}
                />
            </div>
        </div>
    );
}

export default App;
```

![Demo](./doc/demo.gif)
npm package: @matukio/auth-types
Description: TypeScript types for authentication and authorization including roles, permissions, resources, and user interfaces
Author: swe.robertkibet@gmail.com
Latest version: 1.2.0

# @matukio/auth-types

TypeScript types for authentication and authorization, including roles, permissions, resources, and user interfaces. This package ensures type safety across frontend and backend when implementing access control rules.

## Installation

```bash
npm install @matukio/auth-types
```

## Usage

### Basic Import

```typescript
import { User, Role, Permission, Resource } from '@matukio/auth-types';

// Define a user with roles
const user: User = {
  id: '123',
  email: 'user@example.com',
  roles: [
    {
      id: 'editor',
      name: 'Editor',
      resources: {
        [Resource.ArticleCreate]: [Permission.Read, Permission.Write],
        [Resource.ArticleRead]: [Permission.Read]
      }
    }
  ]
};
```

### Available Types

#### `User`
Represents a user in the system with assigned roles.

```typescript
interface User {
  id: string;       // Unique user identifier
  email: string;    // User email
  roles: Role[];    // Array of roles assigned to the user
}
```

#### `Role`
Defines a role with resource-based permissions.

```typescript
interface Role {
  id: string;       // Unique identifier for the role
  name: string;     // Human-readable role name
  resources: Partial<Record<Resource, Permission[]>>;  // Resource -> allowed permissions
}
```

#### `Permission` (Enum)
Available permission types:
- `Permission.Read` - Read access to a resource
- `Permission.Write` - Write/modify access to a resource
- `Permission.Delete` - Delete access to a resource

#### `Resource` (Enum)
Available resources in the system:
- `Resource.ArticleCreate` - Article creation resource
- `Resource.ArticleRead` - Article reading resource
- `Resource.UserManage` - User management resource

## Development

```bash
# Type check without building
npm run type-check

# Build the package
npm run build

# Clean build artifacts
npm run clean
```

## Publishing

This package is automatically published to npm via GitHub Actions when the version in `package.json` changes on the `main` branch. See [PUBLISHING.md](./PUBLISHING.md) for detailed instructions.

**Quick publish:**
```bash
# Update version in package.json, then:
git add package.json
git commit -m "Bump version to 0.1.1"
git push origin main
```

## Extensibility

Future domains (e.g., billing, analytics) can be added as separate modules within this package while maintaining backward compatibility.

## License

MIT