Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
2 changes: 0 additions & 2 deletions .coveralls.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
25 changes: 0 additions & 25 deletions .github/workflows/ci-tests.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: test

on:
push:
branches:
- feat-allow-textarea-select
pull_request:
branches:
- feat-allow-textarea-select

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: lts/*
- name: Install
run: npm install --no-package-lock --force
- name: Test
run: npm test
# - name: Report
# run: mkdir -p coverage && npx c8 report --reporter=text-lcov > coverage/lcov.info
# - name: Coverage
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# - name: Release
# if: ${{ github.ref == 'refs/heads/master' && !startsWith(github.event.head_commit.message, 'chore(release):') && !startsWith(github.event.head_commit.message, 'docs:') }}
# shell: 'script -q -e -c "bash {0}"'
# env:
# CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# run: |
# git config --global user.email ${{ secrets.GIT_EMAIL }}
# git config --global user.name ${{ secrets.GIT_USERNAME }}
# npm run release
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
npm-debug.log

/coverage
/dist
/debug
/dist
/node_modules

.nyc_output
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions dev-server/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ ReactDom.render(
src.constructor &&
src.constructor.name === 'Moment'
}
selectOnFocus
/>

<br />
Expand Down
12 changes: 12 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,18 @@ export interface ReactJsonViewProps {
* Default: null
*/
defaultValue?: TypeDefaultValue | TypeDefaultValue[] | null;
/**
* Whether to select the textarea contents on edit
*
* Default: false
*/
selectOnFocus?: boolean;
/**
* The key modifier to be combined with a click on JSON values to edit them
*
* Default: (e) => e.metaKey || e.ctrlKey
*/
keyModifier?: (event: Event, type: 'edit' | 'submit') => boolean;
}

export interface OnCopyProps {
Expand Down
Loading