Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript #47

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a2779cb
Complete project rebuild in Typescript
Feb 3, 2020
144e8bd
Changes to get the forms changes working back in the repo
Feb 4, 2020
97409de
Form edit state story, remove flexbox lib from group code
Feb 6, 2020
209b07b
Some of list code working again
Feb 9, 2020
1e0f717
Fix inline editing edit pencil icon
Feb 9, 2020
43ca5b1
Removed chunk of flexbox library code from List
Feb 10, 2020
dfd87d2
Fix editing list items
Feb 10, 2020
c07e6ca
Refactored controls that are rendered from the controls declared by t…
Mar 5, 2020
fed648e
Add chooser to form example and fix a couple of bugs
Mar 5, 2020
cff231a
Update storybook config to be the same as the charts
Mar 6, 2020
b4eaaa2
Build and travis setup test
Mar 10, 2020
c9ff2c8
Update .travis.yml
Mar 10, 2020
d224a8e
Update Form.stories.tsx
Mar 10, 2020
f02dc50
Fixes hover layout weirdness and adds button indents back to example
Mar 10, 2020
9dbde62
Strip code
Mar 10, 2020
49cec0c
Checkpointing work on async chooser
Mar 11, 2020
b12ea34
Async choosers
Mar 13, 2020
768fecd
Added switch control, help popover, fixed textedit bug, more stories
Mar 20, 2020
5dc1063
Remove unused error checking on switch and clean up stories
Mar 21, 2020
98ebfd6
Add TagsControl and updated React to fix warnings
Mar 23, 2020
2355715
Added the DateEdit component
Mar 25, 2020
9cb0756
Add extra options to DateEdit and cleanup log messages
Mar 26, 2020
aa72efc
Fix chooser view display for non-async use case
Mar 26, 2020
12b9ea2
Build
Mar 27, 2020
fc657d9
Some reorg (renames stories) and adds TextArea
Mar 30, 2020
12dcdc0
Story cleanup
Mar 30, 2020
5fbf0ae
Change the way component types are compared
Jul 18, 2020
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
*.log
.DS_Store
npm-debug.log
examples-bundle.js
examples-bundle.js
.metals
3 changes: 3 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { configure } from "@storybook/react";

configure(require.context("../src", true, /\.stories\.tsx$/), module);
18 changes: 18 additions & 0 deletions .storybook/esnet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { create } from "@storybook/theming/create";

export default create({
base: "light",

colorPrimary: "gray",
colorSecondary: "#4ec1e0",

// UI
appBg: "#fdfdfd",
appContentBg: "#ffffff",
appBorderColor: "grey",
appBorderRadius: 4,

brandTitle: "react-dynamic-forms",
brandUrl: "https://software.es.net",
brandImage: "http://software.es.net/react-dynamic-forms/static/media/forms.aec5c7b8.png"
});
File renamed without changes
4 changes: 4 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
stories: ["../src/**/*.stories.(js|mdx)"],
addons: ["@storybook/addon-docs"]
};
6 changes: 6 additions & 0 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from "@storybook/addons";
import theme from "./esnet";

addons.setConfig({
theme
});
6 changes: 6 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous"
/>
19 changes: 19 additions & 0 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const path = require("path");
const SRC_PATH = path.join(__dirname, "../src");

module.exports = ({ config }) => {
config.module.rules.push({
test: /\.(ts|tsx)$/,
include: [SRC_PATH],
use: [
{
loader: require.resolve("awesome-typescript-loader"),
options: {
configFileName: "./tsconfig.json"
}
}
]
});
config.resolve.extensions.push(".ts", ".tsx");
return config;
};
27 changes: 24 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
sudo: false

language: node_js
node_js:
- "0.12"

node_js: 10

notifications:
email: false
email: false

cache: yarn

install:
- yarn

jobs:
include:
- stage: Chromatic
if: (branch != master) AND NOT type = pull_request
install: yarn --frozen-lockfile
script:
- yarn chromatic

- stage: Chromatic Master
if: (branch = master) AND NOT type = pull_request AND NOT env(RELEASE)
install: yarn --frozen-lockfile
script:
- yarn chromatic --auto-accept-changes
40 changes: 0 additions & 40 deletions LICENSE

This file was deleted.

187 changes: 0 additions & 187 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions build/__tests__/index.spec.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
1 change: 1 addition & 0 deletions build/actions.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export declare function editAction(enabled: any, handler: any): JSX.Element;
42 changes: 42 additions & 0 deletions build/components/Field.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Copyright (c) 2017 - present, The Regents of the University of California,
* through Lawrence Berkeley National Laboratory (subject to receipt
* of any required approvals from the U.S. Dept. of Energy).
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from "react";
export interface FieldProps {
name: string;
label: string;
required: boolean;
placeholder?: string;
validation?: any;
}
/**
* A `Field` is a part of the JSX definition of a `Schema`. Each `Field` describes
* the rules and meta data associated with a field on the `Form`.
*
* For example, here is an `Field` which will input the users email address, defining
* a user friendly label "Email", a placeholder and a validation rule that expects
* the field to be a valid email address. The field is also required to be filled in.
*
* ```
* <Schema>
* ...
* <Field
* required
* name="email"
* label="Email"
* placeholder="Enter valid email address"
* validation={{"format": "email"}}/>
* ...
* </Schema>
* ```
*/
export default class Field extends React.Component<FieldProps> {
constructor(props: FieldProps);
render(): JSX.Element;
}
Loading