Skip to content
This repository was archived by the owner on Apr 30, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
6dedde6
Added Schema component (#14)
roll Jun 14, 2021
7c18da9
v0.4.0
roll Jun 14, 2021
d14797f
Dropped react-addons-test-utils (fixes #13)
roll Jun 14, 2021
292edb9
v0.4.1
roll Jun 14, 2021
f0db7d3
Added npmrc with "legacy-peer-deps" (#16)
roll Jun 16, 2021
82b6386
v0.4.2
roll Jun 16, 2021
ecbec9a
Fixed the textarea for the Workflow's badge
roll Jun 16, 2021
49ad41f
v0.4.3
roll Jun 16, 2021
91f52e9
v1.0.0
roll Jun 25, 2021
9646dea
Fixed report loading in Workflow
roll Jul 6, 2021
48c6187
v1.0.1
roll Jul 6, 2021
11a29ac
Run tests on schedule
roll Jul 12, 2021
23eae7b
Added changelog
roll Jul 12, 2021
9fd9d97
Updated gtag
roll Jul 12, 2021
894963b
Fixed gtag
roll Aug 1, 2021
e83f4fb
Fixed discord link
roll Aug 19, 2021
087a45f
Support inline data names
roll Oct 16, 2021
b701240
v1.0.2
roll Oct 16, 2021
3dcea2d
Fixed typescript compilation
roll Oct 16, 2021
43c29bf
v1.0.3
roll Oct 16, 2021
3f40123
Fixed inline data support
roll Oct 20, 2021
7af6f79
v1.0.4
roll Oct 20, 2021
d5e5d60
Fixed inline data names
roll Oct 20, 2021
b0f2f06
v1.0.5
roll Oct 20, 2021
0bd1490
Create optional "onSchemaChanged" prop for schema editor component (#18)
istrupin Nov 8, 2021
ab6ecd0
v1.1.0
roll Nov 8, 2021
a4834ad
Moved report helpers to component
roll Nov 12, 2021
11fdd4b
v1.1.1
roll Nov 12, 2021
2fab24b
Updated description
roll Nov 24, 2021
9eb907c
v1.1.2
roll Nov 24, 2021
005f8ae
Updated description
roll Nov 24, 2021
73cb8ae
v1.1.3
roll Nov 24, 2021
d2d12d3
Projects integration
roll Dec 31, 2021
be48047
Fixed project workflow
roll Jan 13, 2022
b310fe4
Updated PR template
roll Jan 19, 2022
62c98c8
Update project.yaml
roll Feb 3, 2022
34ae91e
Fixed an error if no resource.schema (#22)
roll Feb 3, 2022
9198ad7
v1.1.4
roll Feb 3, 2022
9d3c8fa
Disable exemplar counter
roll Feb 4, 2022
75ca65d
Removed husky's pre-commit
roll Feb 12, 2022
eb513ee
Fixed make release
roll Feb 12, 2022
0492c98
Added old/newIndex to props validation
roll Mar 14, 2022
ef69208
Update project.yaml
roll Mar 21, 2022
5fdc2f5
Support workflows by name (#23)
roll Apr 4, 2022
2ac0f08
v1.2.0
roll Apr 4, 2022
0c4b3fe
updates from frictionless 1.20
sfisher Jun 1, 2022
fce88fa
merge of outstanding PR
sfisher Jun 1, 2022
d336e6b
updated yarn lock
sfisher Jun 1, 2022
143b3f1
fix to make linter happy
sfisher Jun 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"rules": {
"indent": "off",
"no-unused-vars": "off",
"multiline-ternary": "off",
"import/no-duplicates": "off",
"no-use-before-define": "off",
"no-useless-constructor": "off",
Expand Down
4 changes: 0 additions & 4 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Overview

Please replace this line with full information about your idea or problem. If it's a bug share as much as possible to reproduce it

---

Please preserve this line to notify @roll (lead of this repository)
6 changes: 2 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Overview

Please replace this line with full information about your pull request. Make sure that tests pass before publishing it
- fixes #<issue-number>

---

Please preserve this line to notify @roll (lead of this repository)
Please make sure that all the checks pass. Please add here any additional information regarding this pull request. It's highly recommended that you link this PR to an issue (please create one if it doesn't exist for this PR)
2 changes: 2 additions & 0 deletions .github/workflows/general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
pull_request:
branches:
- main
schedule:
- cron: "0 3 * * *"

jobs:

Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: project

on:
issues:
types:
- opened
- reopened
pull_request:
types:
- opened
- reopened

jobs:
project-assign:
runs-on: ubuntu-latest
steps:
- name: Assign to project
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.PROJECT_TOKEN }}
resource_node_id: ${{ github.event_name == 'issues' && github.event.issue.node_id || github.event.pull_request.node_id }}
organization: frictionlessdata
project_id: 16
status_value: Inbox
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

5 changes: 0 additions & 5 deletions .huskyrc

This file was deleted.

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# https://github.com/storybookjs/storybook/issues/12983
legacy-peer-deps = true
5 changes: 4 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module.exports = {
stories: ['../docs/**/*.stories.mdx', '../docs/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
webpackFinal: async (config, { configType }) => {
config.node = { ...config.node, fs: 'empty' }
return config
},
}

15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

Here described only the breaking and most significant changes. The full changelog and documentation for all released versions could be found in nicely formatted [commit history](https://github.com/frictionlessdata/components/commits/main).

## v1.2.0

- Supported workflows by name (#23)

## v1.1.0

- Create optional "onSchemaChange" prop for schema editor component (#18)

## v1.0.0

- First stable version
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ release:
@cp README.md docs/Inroduction.stories.mdx && echo '\nWe are including a docs update to the commit\n'
@git log --pretty=format:"%C(yellow)%h%Creset %s%Cgreen%d" --reverse -20
@echo "\nReleasing v$(VERSION) in 10 seconds. Press <CTRL+C> to abort\n" && sleep 10
git commit -a -m 'v$(VERSION)' && git tag -a v$(VERSION) -m 'v$(VERSION)'
npm test && git commit -a -m 'v$(VERSION)' && git tag -a v$(VERSION) -m 'v$(VERSION)'
git push --follow-tags

templates:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
[![Coverage](https://img.shields.io/codecov/c/github/frictionlessdata/components/main)](https://codecov.io/gh/frictionlessdata/components)
[![Registry](https://img.shields.io/npm/v/frictionless-components.svg)](https://www.npmjs.com/package/frictionless-components)
[![Codebase](https://img.shields.io/badge/github-main-brightgreen)](https://github.com/frictionlessdata/components)
[![Support](https://img.shields.io/badge/chat-discord-brightgreen)](https://discord.com/channels/695635777199145130/695635777199145133)
[![Support](https://img.shields.io/badge/support-discord-brightgreen)](https://discordapp.com/invite/Sewv6av)

Visual components for the Frictionless Data project in TypeScript/React.
Data integration components for TypeScript/React that implement Frictionless Data concepts in visual UI.

## Purpose

Expand Down
4 changes: 2 additions & 2 deletions docs/Inroduction.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
[![Coverage](https://img.shields.io/codecov/c/github/frictionlessdata/components/main)](https://codecov.io/gh/frictionlessdata/components)
[![Registry](https://img.shields.io/npm/v/frictionless-components.svg)](https://www.npmjs.com/package/frictionless-components)
[![Codebase](https://img.shields.io/badge/github-main-brightgreen)](https://github.com/frictionlessdata/components)
[![Support](https://img.shields.io/badge/chat-discord-brightgreen)](https://discord.com/channels/695635777199145130/695635777199145133)
[![Support](https://img.shields.io/badge/support-discord-brightgreen)](https://discordapp.com/invite/Sewv6av)

Visual components for the Frictionless Data project in TypeScript/React.
Data integration components for TypeScript/React that implement Frictionless Data concepts in visual UI.

## Purpose

Expand Down
24 changes: 24 additions & 0 deletions docs/Schema.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import '../src/styles'
import React from 'react'
import { Story, Meta } from '@storybook/react'
import { Schema, ISchemaProps } from '../src'

export default {
title: 'Components/Schema',
component: Schema,
} as Meta

const Template: Story<ISchemaProps> = (args) => <Schema {...args} />
const onSave = () => alert('Clicked on the "Save button"')

export const Empty = Template.bind({})
Empty.args = {
onSave,
}

export const Source = Template.bind({})
Source.args = {
source:
'https://raw.githubusercontent.com/frictionlessdata/frictionless-py/main/data/table.csv',
onSave,
}
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@cdl-dryad/frictionless-components",
"version": "0.3.14",
"version": "1.2.0",
"license": "MIT",
"author": "roll <[email protected]>",
"description": "Visual components for frictionless",
"homepage": "https://github.com/frictionlessdata/frictionless-ui",
"description": "Data integration components for TypeScript/React that implement Frictionless Data concepts in visual UI.",
"homepage": ["https://github.com/frictionlessdata/frictionless-ui", "https://github.com/CDL-Dryad/components"],
"bugs": "https://github.com/frictionlessdata/frictionless-ui/issues",
"repository": {
"type": "git",
Expand All @@ -29,7 +29,6 @@
"e2e": "cypress run",
"format": "prettier --write '{src,test}/**/*.ts*' && eslint --fix '{src,test}/**/*.ts*'",
"lint": "prettier --check '{src,test}/**/*.ts*' && eslint '{src,test}/**/*.ts*'",
"prepare": "husky install",
"pretest": "npm run lint",
"readme": "doctoc --maxlevel 3 README.md",
"test": "jest --coverage",
Expand All @@ -38,16 +37,20 @@
"dependencies": {
"@types/lodash": "^4.14.168",
"@types/marked": "^2.0.1",
"@types/uuid": "^8.3.0",
"classnames": "^2.3.1",
"jsonschema": "^1.4.0",
"jszip": "^3.6.0",
"lodash": "^4.17.21",
"marked": "^2.0.1",
"use-async-effect": "^2.2.3"
"react-sortable-hoc": "^2.0.0",
"tableschema": "^1.12.4",
"use-async-effect": "^2.2.3",
"uuid": "^8.3.2"
},
"peerDependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react": ">=17.0.0",
"react-dom": ">=17.0.0"
},
"devDependencies": {
"@babel/core": "^7.13.15",
Expand Down Expand Up @@ -79,14 +82,12 @@
"eslint-plugin-standard": "^5.0.0",
"file-loader": "^6.2.0",
"http-server": "^0.12.3",
"husky": "^6.0.0",
"jest": "^26.6.3",
"mini-css-extract-plugin": "^1.4.1",
"node-fetch": "^2.6.1",
"npm-check-updates": "^11.4.1",
"prettier": "^2.2.1",
"react": "^17.0.2",
"react-addons-test-utils": "^15.6.2",
"react-dom": "^17.0.2",
"react-hot-loader": "^4.13.0",
"react-test-renderer": "^17.0.2",
Expand Down
14 changes: 14 additions & 0 deletions src/components/ReportTask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,23 @@ export function ReportTask(props: IReportTaskProps) {

// Helpers

export function removeBaseUrl(text: string) {
return text.replace(/https:\/\/raw\.githubusercontent\.com\/\S*?\/\S*?\/\S*?\//g, '')
}

export function splitFilePath(path: string) {
const parts = path.split('/')
return {
name: parts.pop(),
base: parts.join('/'),
sep: parts.length ? '/' : '',
}
}

export function getReportErrors(task: IReportTask) {
const reportErrors: { [code: string]: IReportError } = {}
for (const error of task.errors) {
if (!task.resource.schema) continue
const header = task.resource.schema.fields.map((field) => field.name)

// Prepare reportError
Expand Down
Loading