├── _config.yml ├── __tests__ ├── test.d.ts └── test.d.ts.map ├── ts ├── __tests__ │ ├── test.d.ts │ └── test.d.ts.map ├── es.tsconfig.json ├── cjs.tsconfig.json └── types.tsconfig.json ├── .npmignore ├── .husky └── pre-commit ├── screenshot.PNG ├── demo ├── README.md ├── .babelrc ├── CHANGELOG.md ├── index.js ├── package.json ├── webpack.config.js └── iframe.js ├── .prettierrc ├── iframe.d.ts ├── jest.config.json ├── .babelrc ├── iframe.d.ts.map ├── test_setup └── ts-preprocessor.js ├── bin └── authors ├── tsconfig.json ├── .eslintrc.json ├── AUTHORS ├── .yarnclean ├── LICENSE ├── .gitignore ├── types.d.ts ├── src ├── types.d.ts ├── __tests__ │ ├── __snapshots__ │ │ └── test.tsx.snap │ └── test.tsx └── iframe.tsx ├── README.md ├── package.json └── CHANGELOG.md /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-hacker -------------------------------------------------------------------------------- /__tests__/test.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | //# sourceMappingURL=test.d.ts.map -------------------------------------------------------------------------------- /ts/__tests__/test.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | //# sourceMappingURL=test.d.ts.map -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | screenshot.PNG 2 | dist 3 | index.js 4 | node_modules 5 | bin 6 | 7 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npm test 5 | -------------------------------------------------------------------------------- /screenshot.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robbestad/react-iframe/HEAD/screenshot.PNG -------------------------------------------------------------------------------- /demo/README.md: -------------------------------------------------------------------------------- 1 | # React-iframe demo 2 | 3 | Install dependencies and run demo with `npm start` 4 | -------------------------------------------------------------------------------- /ts/__tests__/test.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"test.d.ts","sourceRoot":"./","sources":["__tests__/test.tsx"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /__tests__/test.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/__tests__/test.tsx"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 150, 3 | "semi":false, 4 | "bracketSpacing": true, 5 | "singleQuote": false, 6 | "useTabs": true, 7 | "tabWidth": 2 8 | } 9 | -------------------------------------------------------------------------------- /demo/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react" 5 | ], 6 | "plugins": [ 7 | ], 8 | "compact": false 9 | } 10 | -------------------------------------------------------------------------------- /iframe.d.ts: -------------------------------------------------------------------------------- 1 | import { ComponentType } from "react"; 2 | import { IIframe } from "./types"; 3 | declare const Iframe: ComponentType; 4 | export default Iframe; 5 | //# sourceMappingURL=iframe.d.ts.map -------------------------------------------------------------------------------- /jest.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "preset": "ts-jest", 3 | "testURL": "http://localhost/", 4 | "verbose": true, 5 | "testMatch": [ 6 | "**/**/__tests__/**/*.ts", 7 | "**/**/__tests__/**/*.tsx" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /ts/es.tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "include": ["../src"], 4 | "compilerOptions": { 5 | "module": "ESNext", 6 | "declaration": false, 7 | "outDir": "../dist/es" 8 | } 9 | } -------------------------------------------------------------------------------- /ts/cjs.tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "include": ["../src"], 4 | "compilerOptions": { 5 | "module": "CommonJS", 6 | "declaration": false, 7 | "outDir": "../dist/cjs" 8 | } 9 | } -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "env", 4 | "react" 5 | ], 6 | "plugins": [ 7 | "transform-class-properties", 8 | "transform-decorators", 9 | "transform-react-constant-elements", 10 | "transform-react-inline-elements" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /iframe.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"iframe.d.ts","sourceRoot":"","sources":["../src/iframe.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG5C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEjC,QAAA,MAAM,MAAM,EAAE,aAAa,CAAC,OAAO,CAqGlC,CAAA;AAED,eAAe,MAAM,CAAA"} -------------------------------------------------------------------------------- /ts/types.tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "ESNext", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "declarationDir": "../defs" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /demo/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. 4 | 5 | ## [1.0.1](https://github.com/svenanders/react-iframe/compare/v1.7.4...v1.0.1) (2019-04-11) 6 | -------------------------------------------------------------------------------- /test_setup/ts-preprocessor.js: -------------------------------------------------------------------------------- 1 | const tsc = require("typescript") 2 | const tsConfig = require("../tsconfig.json") 3 | 4 | module.exports = { 5 | process(src, path) { 6 | if (path.endsWith(".ts") || path.endsWith(".tsx")) { 7 | return tsc.transpile(src, tsConfig.compilerOptions, path, []) 8 | } 9 | return src 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /bin/authors: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # Generate an AUTHORS file based on the output of git shortlog. It uses ABC 4 | # order, strips out leading spaces and numbers, then filters out specific 5 | # authors. 6 | 7 | git shortlog -se \ 8 | | perl -spe 's/^\s+\d+\s+//' \ 9 | | sed -e '/^CommitSyncScript.*$/d' \ 10 | > AUTHORS 11 | 12 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "declaration": false, 5 | "emitDecoratorMetadata": true, 6 | "experimentalDecorators": true, 7 | "esModuleInterop": true, 8 | "moduleResolution": "node", 9 | "target": "es2015", 10 | "module": "amd", 11 | "jsx": "react", 12 | "baseUrl": "" 13 | }, 14 | "include": [ 15 | "src" 16 | ], 17 | "exclude": [ 18 | "node_modules" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parser": "babel-eslint", 4 | "extends": [ 5 | "prettier" 6 | ], 7 | "plugins": [ 8 | "prettier", 9 | "react" 10 | ], 11 | "parserOptions": { 12 | "ecmaVersion": 7, 13 | "sourceType": "module", 14 | "ecmaFeatures": { 15 | "jsx": true 16 | } 17 | }, 18 | "env": { 19 | "es6": true, 20 | "browser": true, 21 | "node": true 22 | }, 23 | "rules": { 24 | "quotes": [2, "double"], 25 | "linebreak-style": 0, 26 | "complexity": 0 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Dave Carlson 2 | Elias Ojala 3 | Hamed Farag 4 | Michael J. Fox 5 | Mordy Tikotzky 6 | Sven A Robbestad 7 | Sven Anders Robbestad 8 | Sven Anders Robbestad 9 | Sven Anders Robbestad 10 | Victor Havrylin 11 | ados1991 12 | bklynate 13 | foxmicha 14 | -------------------------------------------------------------------------------- /.yarnclean: -------------------------------------------------------------------------------- 1 | # test directories 2 | __tests__ 3 | test 4 | tests 5 | powered-test 6 | 7 | # asset directories 8 | docs 9 | doc 10 | website 11 | images 12 | assets 13 | 14 | # examples 15 | example 16 | examples 17 | 18 | # code coverage directories 19 | coverage 20 | .nyc_output 21 | 22 | # build scripts 23 | Makefile 24 | Gulpfile.js 25 | Gruntfile.js 26 | 27 | # configs 28 | .tern-project 29 | .gitattributes 30 | .editorconfig 31 | .*ignore 32 | .eslintrc 33 | .jshintrc 34 | .flowconfig 35 | .documentup.json 36 | .yarn-metadata.json 37 | .*.yml 38 | *.yml 39 | 40 | # misc 41 | *.gz 42 | *.md 43 | -------------------------------------------------------------------------------- /demo/index.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from "react" 2 | import ReactDOM from "react-dom" 3 | import Iframe from "./iframe.js" 4 | 5 | class Demo extends PureComponent { 6 | render() { 7 | return ( 8 |