Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add REDUX integration into our Core Font functionality Reorganise components into subfolders Move the registered field to View_Save_Core_Fonts Swap old Uglify plugin out for new one Write PHPUnit tests for our new AJAX functionality Fix up Mocha tests due to changes to the reducer function Fix JS tests by processing a node_module that wasn't ES5 friendly Add unit tests to our Core Fonts React component Add comments to new React code and tidy up the tests / runners Change the Core Font tool description Fix Gulp image reference error Add Core Font installer prompt and unit tests Ensure the same item cannot be added to the redux retry list more than once Fix unit tests due to font removal and new one-time action Fix up test where the array doesn't have the key
- Loading branch information
1 parent
e6e3464
commit b38eac6
Showing
86 changed files
with
2,796 additions
and
885 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,24 @@ | ||
{ | ||
"presets": [ | ||
["es2015", { "modules": false }], | ||
"react", | ||
"stage-2" | ||
[ | ||
"env", | ||
{ | ||
"targets": { | ||
"node": "current", | ||
"browsers": [ | ||
"last 2 versions", | ||
"IE >= 10" | ||
], | ||
"modules": false, | ||
"useBuiltIns": "usage" | ||
}, | ||
"forceAllTransforms": true | ||
} | ||
], | ||
"react" | ||
], | ||
"plugins": [ | ||
"transform-object-rest-spread", | ||
"transform-class-properties" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Our Redux Action Type Constants | ||
* | ||
* @package Gravity PDF | ||
* @copyright Copyright (c) 2017, Blue Liquid Designs | ||
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | ||
* @since 4.4 | ||
*/ | ||
|
||
/* | ||
This file is part of Gravity PDF. | ||
Gravity PDF – Copyright (C) 2017, Blue Liquid Designs | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Found | ||
*/ | ||
|
||
export const ADD_TO_CONSOLE = 'ADD_TO_CONSOLE' | ||
export const CLEAR_CONSOLE = 'CLEAR_CONSOLE' | ||
export const ADD_TO_RETRY_LIST = 'ADD_TO_RETRY_LIST' | ||
export const CLEAR_RETRY_LIST = 'CLEAR_RETRY_LIST' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
import { | ||
ADD_TO_CONSOLE, | ||
ADD_TO_RETRY_LIST, | ||
CLEAR_CONSOLE, | ||
CLEAR_RETRY_LIST | ||
} from '../actionTypes/coreFonts' | ||
|
||
/** | ||
* Redux Actions - payloads of information that send data from your application to your store | ||
* | ||
* @package Gravity PDF | ||
* @copyright Copyright (c) 2017, Blue Liquid Designs | ||
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | ||
* @since 4.4 | ||
*/ | ||
|
||
/* | ||
This file is part of Gravity PDF. | ||
Gravity PDF – Copyright (C) 2017, Blue Liquid Designs | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
*/ | ||
|
||
/** | ||
* Adds a message to our buffer for display to the user | ||
* | ||
* @param key | ||
* @param status | ||
* @param message | ||
* | ||
* @returns {{type, key: *, status: *, message: *}} | ||
* | ||
* @since 4.4 | ||
*/ | ||
export const addToConsole = (key, status, message) => { | ||
return { | ||
type: ADD_TO_CONSOLE, | ||
key, | ||
status, | ||
message | ||
} | ||
} | ||
|
||
/** | ||
* Clears the message buffer | ||
* | ||
* @returns {{type}} | ||
* | ||
* @since 4.4 | ||
*/ | ||
export const clearConsole = () => { | ||
return { | ||
type: CLEAR_CONSOLE, | ||
} | ||
} | ||
|
||
/** | ||
* Adds a font to our retry list | ||
* | ||
* @param name | ||
* @returns {{type, name: *}} | ||
* | ||
* @since 4.4 | ||
*/ | ||
export const addToRetryList = (name) => { | ||
return { | ||
type: ADD_TO_RETRY_LIST, | ||
name | ||
} | ||
} | ||
|
||
/** | ||
* Clears our retry list | ||
* | ||
* @returns {{type}} | ||
* | ||
* @since 4.4 | ||
*/ | ||
export const clearRetryList = () => { | ||
return { | ||
type: CLEAR_RETRY_LIST, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import React from 'react' | ||
import { render } from 'react-dom' | ||
import { Provider } from 'react-redux' | ||
|
||
import { getStore } from '../store' | ||
import Routes from '../router/coreFontRouter' | ||
|
||
/** | ||
* Core Font Downloader Bootstrap | ||
* | ||
* @package Gravity PDF | ||
* @copyright Copyright (c) 2017, Blue Liquid Designs | ||
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | ||
* @since 4.4 | ||
*/ | ||
|
||
/* | ||
This file is part of Gravity PDF. | ||
Gravity PDF – Copyright (C) 2017, Blue Liquid Designs | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Found | ||
*/ | ||
|
||
/** | ||
* Mount our Core Font UI on the DOM | ||
* | ||
* @since 4.4 | ||
*/ | ||
export default function coreFontBootstrap () { | ||
const container = document.getElementById('gfpdf-install-core-fonts') | ||
const button = container.getElementsByTagName('button')[0] | ||
const store = getStore() | ||
|
||
render( | ||
<Provider store={store}> | ||
<Routes button={button}/> | ||
</Provider>, | ||
container | ||
) | ||
} |
Oops, something went wrong.