WIP
This commit is contained in:
parent
e9c26ce2d0
commit
3558f2712c
21 changed files with 520 additions and 163 deletions
4
.babelrc
4
.babelrc
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"compact":false,
|
||||
"presets": ["@babel/preset-env"]
|
||||
}
|
2
Gemfile
2
Gemfile
|
@ -18,7 +18,7 @@ gem 'sassc', '~> 2.0', '>= 2.0.1'
|
|||
gem 'stripe', '~> 1.58' # January 19, 2017 version of the Stripe API https://stripe.com/docs/api
|
||||
gem 'uglifier', '~> 4.1', '>= 4.1.20'
|
||||
gem 'ffi', '~> 1.11', '>= 1.11.1'
|
||||
gem 'webpacker', '~> 4.x'
|
||||
gem 'webpacker', '~> 4.2'
|
||||
|
||||
gem 'httparty', '~> 0.17.0' # https://github.com/jnunemaker/httparty
|
||||
gem 'rack-attack', '~> 5.2' # for blocking ip addressses
|
||||
|
|
28
Gemfile.lock
28
Gemfile.lock
|
@ -103,7 +103,7 @@ GEM
|
|||
debug_inspector (>= 0.0.1)
|
||||
bootsnap (1.4.4)
|
||||
msgpack (~> 1.0)
|
||||
builder (3.2.3)
|
||||
builder (3.2.4)
|
||||
bunny (2.14.2)
|
||||
amq-protocol (~> 2.3, >= 2.3.0)
|
||||
byebug (11.0.1)
|
||||
|
@ -117,7 +117,7 @@ GEM
|
|||
chronic (0.10.2)
|
||||
coderay (1.1.2)
|
||||
colorize (0.8.1)
|
||||
concurrent-ruby (1.1.5)
|
||||
concurrent-ruby (1.1.6)
|
||||
config (1.7.2)
|
||||
activesupport (>= 3.0)
|
||||
deep_merge (~> 1.2, >= 1.2.1)
|
||||
|
@ -128,7 +128,7 @@ GEM
|
|||
unicode_utils (~> 1.4)
|
||||
crack (0.4.3)
|
||||
safe_yaml (~> 1.0.0)
|
||||
crass (1.0.4)
|
||||
crass (1.0.6)
|
||||
css_parser (1.7.0)
|
||||
addressable
|
||||
dante (0.2.0)
|
||||
|
@ -183,7 +183,7 @@ GEM
|
|||
dry-equalizer (~> 0.2)
|
||||
dry-logic (~> 0.5, >= 0.5.0)
|
||||
dry-types (~> 0.14.0)
|
||||
erubi (1.8.0)
|
||||
erubi (1.9.0)
|
||||
execjs (2.7.0)
|
||||
factory_bot (5.0.2)
|
||||
activesupport (>= 4.2.0)
|
||||
|
@ -219,7 +219,7 @@ GEM
|
|||
httparty (0.17.0)
|
||||
mime-types (~> 3.0)
|
||||
multi_xml (>= 0.5.2)
|
||||
i18n (1.6.0)
|
||||
i18n (1.8.2)
|
||||
concurrent-ruby (~> 1.0)
|
||||
i18n-js (3.3.0)
|
||||
i18n (>= 0.6.6)
|
||||
|
@ -235,7 +235,7 @@ GEM
|
|||
activesupport (>= 4)
|
||||
railties (>= 4)
|
||||
request_store (~> 1.0)
|
||||
loofah (2.2.3)
|
||||
loofah (2.5.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.7.1)
|
||||
|
@ -252,7 +252,7 @@ GEM
|
|||
mini_magick (4.9.5)
|
||||
mini_mime (1.0.2)
|
||||
mini_portile2 (2.4.0)
|
||||
minitest (5.11.3)
|
||||
minitest (5.14.0)
|
||||
msgpack (1.3.1)
|
||||
multi_json (1.13.1)
|
||||
multi_xml (0.6.0)
|
||||
|
@ -263,7 +263,7 @@ GEM
|
|||
require_all
|
||||
netrc (0.11.0)
|
||||
nio4r (2.4.0)
|
||||
nokogiri (1.10.3)
|
||||
nokogiri (1.10.9)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
orm_adapter (0.5.0)
|
||||
parallel (1.17.0)
|
||||
|
@ -287,7 +287,7 @@ GEM
|
|||
puma (>= 2.7, < 5)
|
||||
rabl (0.14.1)
|
||||
activesupport (>= 2.3.14)
|
||||
rack (2.0.9)
|
||||
rack (2.2.2)
|
||||
rack-attack (5.4.2)
|
||||
rack (>= 1.0, < 3)
|
||||
rack-proxy (0.6.5)
|
||||
|
@ -313,8 +313,8 @@ GEM
|
|||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.2.0)
|
||||
loofah (~> 2.2, >= 2.2.2)
|
||||
rails-html-sanitizer (1.3.0)
|
||||
loofah (~> 2.3)
|
||||
rails-i18n (5.1.3)
|
||||
i18n (>= 0.7, < 2)
|
||||
railties (>= 5.0, < 6)
|
||||
|
@ -413,7 +413,7 @@ GEM
|
|||
timecop (0.9.1)
|
||||
traceroute (0.8.0)
|
||||
rails (>= 3.0.0)
|
||||
tzinfo (1.2.5)
|
||||
tzinfo (1.2.7)
|
||||
thread_safe (~> 0.1)
|
||||
uglifier (4.1.20)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
|
@ -428,7 +428,7 @@ GEM
|
|||
addressable (>= 2.3.6)
|
||||
crack (>= 0.3.2)
|
||||
hashdiff (>= 0.4.0, < 2.0.0)
|
||||
webpacker (4.0.7)
|
||||
webpacker (4.2.2)
|
||||
activesupport (>= 4.2)
|
||||
rack-proxy (>= 0.6.1)
|
||||
railties (>= 4.2)
|
||||
|
@ -515,7 +515,7 @@ DEPENDENCIES
|
|||
traceroute (~> 0.8.0)
|
||||
uglifier (~> 4.1, >= 4.1.20)
|
||||
webmock (~> 3.6, >= 3.6.2)
|
||||
webpacker (~> 4.x)
|
||||
webpacker (~> 4.2)
|
||||
wisper (~> 2.0)
|
||||
wisper-activejob (~> 1.0.0)
|
||||
wisper-rspec (~> 1.1.0)
|
||||
|
|
8
app/javascript/donate-button/details.js.erb
Normal file
8
app/javascript/donate-button/details.js.erb
Normal file
|
@ -0,0 +1,8 @@
|
|||
<%
|
||||
cdn_url = URI(Settings.cdn.url)
|
||||
cdn_url = cdn_url.to_s
|
||||
if Settings.button_config&.url
|
||||
cdn_url = URI(Settings.button_config.url).to_s
|
||||
end
|
||||
%>
|
||||
module.exports = "<%= cdn_url %>"
|
|
@ -1,8 +1,6 @@
|
|||
import { NotifyReporter } from "@jest/reporters";
|
||||
|
||||
const donate_css = require('../../assets/stylesheets/donate-button/donate-button.v2.css');
|
||||
|
||||
const iframeHost = 'https://us.commitchange.com'
|
||||
const iframeHost = require('./details.js.erb')
|
||||
|
||||
function on_ios11() {
|
||||
var userAgent = window.navigator.userAgent;
|
||||
|
|
6
app/javascript/packs/hello_erb.js.erb
Normal file
6
app/javascript/packs/hello_erb.js.erb
Normal file
|
@ -0,0 +1,6 @@
|
|||
// Run this example by adding <%%= javascript_pack_tag 'hello_erb' %> to the head of your layout file,
|
||||
// like app/views/layouts/application.html.erb. Don't forget to uncomment erb tag after adding it to your layout file.
|
||||
|
||||
<% name = 'Erb' %>
|
||||
|
||||
console.log('Hello world from <%= name %>')
|
4
app/javascript/packs/hello_typescript.ts
Normal file
4
app/javascript/packs/hello_typescript.ts
Normal file
|
@ -0,0 +1,4 @@
|
|||
// Run this example by adding <%= javascript_pack_tag 'hello_typescript' %> to the head of your layout file,
|
||||
// like app/views/layouts/application.html.erb.
|
||||
|
||||
console.log('Hello world from typescript');
|
|
@ -7,7 +7,6 @@ require "pathname"
|
|||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
||||
Pathname.new(__FILE__).realpath)
|
||||
|
||||
require "rubygems"
|
||||
require "bundler/setup"
|
||||
|
||||
require "webpacker"
|
||||
|
|
|
@ -7,7 +7,6 @@ require "pathname"
|
|||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
||||
Pathname.new(__FILE__).realpath)
|
||||
|
||||
require "rubygems"
|
||||
require "bundler/setup"
|
||||
|
||||
require "webpacker"
|
||||
|
|
|
@ -5,4 +5,7 @@ const typescript = require('./loaders/typescript')
|
|||
environment.loaders.prepend('typescript', typescript)
|
||||
|
||||
environment.loaders.prepend('erb', erb)
|
||||
|
||||
environment.loaders.delete('nodeModules')
|
||||
|
||||
module.exports = environment
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const PnpWebpackPlugin = require('pnp-webpack-plugin')
|
||||
|
||||
module.exports = {
|
||||
test: /\.(ts|tsx)?(\.erb)?$/,
|
||||
test: /\.tsx?(\.erb)?$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'ts-loader',
|
||||
|
|
|
@ -33,7 +33,7 @@ export function mountForMobx<TProps>(props:TProps,
|
|||
|
||||
|
||||
return mount(<OuterWrapper {...props}
|
||||
__childrenCreator={rootComponentCreator} />)
|
||||
__childrenCreator={rootComponentCreator as any} />)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ export function mountForMobx<TProps>(props:TProps,
|
|||
export function mountForMobxWithIntl<TProps>(props:TProps,
|
||||
rootComponentCreator:(props:TProps) => React.ReactNode): ReactWrapper {
|
||||
return mountWithIntl(<OuterWrapper {...props}
|
||||
__childrenCreator={rootComponentCreator} />)
|
||||
__childrenCreator={rootComponentCreator as any} />)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import * as React from 'react';
|
|||
import { observer } from 'mobx-react';
|
||||
import {InjectedIntlProps, injectIntl} from 'react-intl';
|
||||
import Modal from "../common/Modal";
|
||||
import { FundraiserInfo} from "../edit_payment_pane/EditPaymentPane";
|
||||
//import { FundraiserInfo} from "../edit_payment_pane/EditPaymentPane";
|
||||
import {HoudiniForm} from "../../lib/houdini_form";
|
||||
import {BasicField, CurrencyField, SelectField, TextareaField} from "../common/fields";
|
||||
import ProgressableButton from "../common/ProgressableButton";
|
||||
|
|
|
@ -76,7 +76,7 @@ export class CreateOffsiteDonation {
|
|||
|
||||
}
|
||||
);
|
||||
return dfd.promise();
|
||||
return dfd.promise() as any;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ export class PutDonation {
|
|||
|
||||
}
|
||||
);
|
||||
return dfd.promise();
|
||||
return dfd.promise() as any;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ export class WebUserSignInOut {
|
|||
|
||||
}
|
||||
);
|
||||
return dfd.promise();
|
||||
return dfd.promise() as any;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
11
no.nbabelrcn
Normal file
11
no.nbabelrcn
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"compact": false,
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
|
@ -32,7 +32,7 @@
|
|||
"@types/moment-timezone": "^0.5.9",
|
||||
"@types/prop-types": "^15.5.5",
|
||||
"@types/react": "^16.9.11",
|
||||
"@types/react-dom": "^16.9.3",
|
||||
"@types/react-dom": "^16.9.4",
|
||||
"@types/react-intl": "^2.3.7",
|
||||
"@types/react-test-renderer": "^16.0.1",
|
||||
"@types/react-text-mask": "^5.4.2",
|
||||
|
@ -76,13 +76,14 @@
|
|||
"style-loader": "^0.21.0",
|
||||
"ts-jest": "^24.0.0",
|
||||
"ts-loader": "^6.2.1",
|
||||
"typescript": "^2.9.2",
|
||||
"typescript": "^3.7.2",
|
||||
"url-loader": "^1.0.1",
|
||||
"webpack": "^4.0.0",
|
||||
"webpack-dev-server": "^3.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@rails/webpacker": "^4.0.7",
|
||||
"@babel/core": "^7.0.0",
|
||||
"@rails/webpacker": "^4.2.0",
|
||||
"attr-binder": "0.3.1",
|
||||
"aws-sdk": "^2.402.0",
|
||||
"chart.js": "2.1.4",
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
// License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('postcss-import'),
|
||||
|
|
Loading…
Reference in a new issue