Skip to content

Commit

Permalink
fix: 🐛 Critical bug fix of NPM imports not working
Browse files Browse the repository at this point in the history
  • Loading branch information
deltoss committed Nov 16, 2019
1 parent ebd8cea commit c965963
Show file tree
Hide file tree
Showing 31 changed files with 43,871 additions and 48,276 deletions.
11,944 changes: 5,972 additions & 5,972 deletions projects/mitch-datasource-documentation/docs/ast/source/AjaxDatasource.js.json

Large diffs are not rendered by default.

7,088 changes: 3,544 additions & 3,544 deletions projects/mitch-datasource-documentation/docs/ast/source/ArrayDatasource.js.json

Large diffs are not rendered by default.

4,408 changes: 2,204 additions & 2,204 deletions projects/mitch-datasource-documentation/docs/ast/source/DatasourceBase.js.json

Large diffs are not rendered by default.

7,752 changes: 3,876 additions & 3,876 deletions projects/mitch-datasource-documentation/docs/ast/source/QueryBuilder.js.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
</nav>

<div class="content" data-ice="content"><div class="header-notice">
<div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import AjaxDatasource from &apos;<span><a href="file/js/AjaxDatasource.js.html#lineNumber57">mitch-datasource-documentation/js/AjaxDatasource.js</a></span>&apos;</code></pre></div>
<div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import AjaxDatasource from &apos;<span><a href="file/js/AjaxDatasource.js.html#lineNumber67">mitch-datasource-documentation/js/AjaxDatasource.js</a></span>&apos;</code></pre></div>
<span data-ice="access">public</span>
<span data-ice="kind">class</span>



<span data-ice="source">| <span><a href="file/js/AjaxDatasource.js.html#lineNumber57">source</a></span></span>
<span data-ice="source">| <span><a href="file/js/AjaxDatasource.js.html#lineNumber67">source</a></span></span>
</div>

<div class="self-detail detail">
Expand Down Expand Up @@ -83,7 +83,10 @@ <h4>Example:</h4>

<div class="example-doc" data-ice="exampleDoc">
<div class="example-caption" data-ice="exampleCaption">Basic Usage</div>
<pre class="prettyprint source-code"><code data-ice="exampleCode">async function exampleAsyncFunction() {
<pre class="prettyprint source-code"><code data-ice="exampleCode">
import { AjaxDatasource } from &apos;mitch-datasource&apos;;

async function exampleAsyncFunction() {
let datasource = new AjaxDatasource({
ajax: &apos;https://path/to/remote/endpoint&apos;
});
Expand All @@ -94,7 +97,10 @@ <h4>Example:</h4>
</div>
<div class="example-doc" data-ice="exampleDoc">
<div class="example-caption" data-ice="exampleCaption">Basic Usage with Options Object</div>
<pre class="prettyprint source-code"><code data-ice="exampleCode">async function exampleAsyncFunction() {
<pre class="prettyprint source-code"><code data-ice="exampleCode">
import { AjaxDatasource } from &apos;mitch-datasource&apos;;

async function exampleAsyncFunction() {
let datasource = new AjaxDatasource({
ajax: {
// Note pagination/sorting/filtering doesn&apos;t
Expand All @@ -105,7 +111,8 @@ <h4>Example:</h4>
url: &apos;https://jsonplaceholder.typicode.com/posts&apos;,
method: &apos;get&apos;,
// ... Other Axios options
// `mapper` is a custom option unique to this library
// `mapper` is a custom option unique to the datasource package,
// it&apos;s not actually part of Axios
mapper: function(response) {
return {
data: response.data,
Expand All @@ -121,7 +128,10 @@ <h4>Example:</h4>
</div>
<div class="example-doc" data-ice="exampleDoc">
<div class="example-caption" data-ice="exampleCaption">Basic Usage with Function</div>
<pre class="prettyprint source-code"><code data-ice="exampleCode">async function exampleAsyncFunction() {
<pre class="prettyprint source-code"><code data-ice="exampleCode">
import { AjaxDatasource } from &apos;mitch-datasource&apos;;

async function exampleAsyncFunction() {
let datasource = new AjaxDatasource({
ajax: async function() {
return await mockAjaxCall();
Expand Down Expand Up @@ -947,7 +957,7 @@ <h3 data-ice="anchor" id="instance-constructor-constructor">
<span class="right-info">


<span data-ice="source"><span><a href="file/js/AjaxDatasource.js.html#lineNumber71">source</a></span></span>
<span data-ice="source"><span><a href="file/js/AjaxDatasource.js.html#lineNumber81">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -1018,7 +1028,7 @@ <h3 data-ice="anchor" id="instance-member-ajax">
<span class="right-info">


<span data-ice="source"><span><a href="file/js/AjaxDatasource.js.html#lineNumber133">source</a></span></span>
<span data-ice="source"><span><a href="file/js/AjaxDatasource.js.html#lineNumber143">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -1069,7 +1079,7 @@ <h3 data-ice="anchor" id="instance-get-data">
<span class="right-info">


<span data-ice="source"><span><a href="file/js/AjaxDatasource.js.html#lineNumber206">source</a></span></span>
<span data-ice="source"><span><a href="file/js/AjaxDatasource.js.html#lineNumber216">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -1114,7 +1124,7 @@ <h3 data-ice="anchor" id="instance-member-queryBuilder">
<span class="right-info">


<span data-ice="source"><span><a href="file/js/AjaxDatasource.js.html#lineNumber115">source</a></span></span>
<span data-ice="source"><span><a href="file/js/AjaxDatasource.js.html#lineNumber125">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -1162,7 +1172,7 @@ <h3 data-ice="anchor" id="instance-get-total">
<span class="right-info">


<span data-ice="source"><span><a href="file/js/AjaxDatasource.js.html#lineNumber197">source</a></span></span>
<span data-ice="source"><span><a href="file/js/AjaxDatasource.js.html#lineNumber207">source</a></span></span>
</span>
</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
</nav>

<div class="content" data-ice="content"><div class="header-notice">
<div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import ArrayDatasource from &apos;<span><a href="file/js/ArrayDatasource.js.html#lineNumber28">mitch-datasource-documentation/js/ArrayDatasource.js</a></span>&apos;</code></pre></div>
<div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import ArrayDatasource from &apos;<span><a href="file/js/ArrayDatasource.js.html#lineNumber87">mitch-datasource-documentation/js/ArrayDatasource.js</a></span>&apos;</code></pre></div>
<span data-ice="access">public</span>
<span data-ice="kind">class</span>



<span data-ice="source">| <span><a href="file/js/ArrayDatasource.js.html#lineNumber28">source</a></span></span>
<span data-ice="source">| <span><a href="file/js/ArrayDatasource.js.html#lineNumber87">source</a></span></span>
</div>

<div class="self-detail detail">
Expand Down Expand Up @@ -82,7 +82,10 @@ <h4>Example:</h4>

<div class="example-doc" data-ice="exampleDoc">
<div class="example-caption" data-ice="exampleCaption">Basic Usage</div>
<pre class="prettyprint source-code"><code data-ice="exampleCode">async function exampleAsyncFunction() {
<pre class="prettyprint source-code"><code data-ice="exampleCode">
import { ArrayDatasource } from &apos;mitch-datasource&apos;;

async function exampleAsyncFunction() {
let datasource = new ArrayDatasource({
data: [
{
Expand All @@ -101,6 +104,64 @@ <h4>Example:</h4>
await datasource.update();
console.log(`First page of data: ${JSON.stringify(datasource.data)}`);
}
exampleAsyncFunction();</code></pre>
</div>
<div class="example-doc" data-ice="exampleDoc">
<div class="example-caption" data-ice="exampleCaption">Sorting</div>
<pre class="prettyprint source-code"><code data-ice="exampleCode">
import { ArrayDatasource } from &apos;mitch-datasource&apos;;

async function exampleAsyncFunction() {
let datasource = new ArrayDatasource({
data: [
{
id: 1,
firstName: &apos;John&apos;,
lastName: &apos;Smith&apos;
},
{
id: 2,
firstName: &apos;Mary&apos;,
lastName: &apos;Jane&apos;
},
// ... More
],
sort: (data, sortArguments = { &apos;firstName&apos;: &apos;asc&apos; }) =&gt; {
return mockSortLogic(data, sortArguments);
}
});
await datasource.sort({ &apos;lastName&apos;: &apos;asc&apos; });
console.log(`First page of sorted data: ${JSON.stringify(datasource.data)}`);
}
exampleAsyncFunction();</code></pre>
</div>
<div class="example-doc" data-ice="exampleDoc">
<div class="example-caption" data-ice="exampleCaption">Filtering</div>
<pre class="prettyprint source-code"><code data-ice="exampleCode">
import { ArrayDatasource } from &apos;mitch-datasource&apos;;

async function exampleAsyncFunction() {
let datasource = new ArrayDatasource({
data: [
{
id: 1,
firstName: &apos;John&apos;,
lastName: &apos;Smith&apos;
},
{
id: 2,
firstName: &apos;Mary&apos;,
lastName: &apos;Jane&apos;
},
// ... More
],
search: (data, searchText) =&gt; {
return mockSearchLogic(data, searchText);
}
});
await datasource.search(&apos;John Smith&apos;);
console.log(`First page of filtered data: ${JSON.stringify(datasource.data)}`);
}
exampleAsyncFunction();</code></pre>
</div>
</div>
Expand Down Expand Up @@ -855,7 +916,7 @@ <h3 data-ice="anchor" id="instance-constructor-constructor">
<span class="right-info">


<span data-ice="source"><span><a href="file/js/ArrayDatasource.js.html#lineNumber61">source</a></span></span>
<span data-ice="source"><span><a href="file/js/ArrayDatasource.js.html#lineNumber120">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -937,7 +998,7 @@ <h3 data-ice="anchor" id="instance-get-data">
<span class="right-info">


<span data-ice="source"><span><a href="file/js/ArrayDatasource.js.html#lineNumber165">source</a></span></span>
<span data-ice="source"><span><a href="file/js/ArrayDatasource.js.html#lineNumber224">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -982,7 +1043,7 @@ <h3 data-ice="anchor" id="instance-get-total">
<span class="right-info">


<span data-ice="source"><span><a href="file/js/ArrayDatasource.js.html#lineNumber150">source</a></span></span>
<span data-ice="source"><span><a href="file/js/ArrayDatasource.js.html#lineNumber209">source</a></span></span>
</span>
</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -833,15 +833,15 @@ <h4 data-ice="title">Params:</h4>
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></span></td>
<td data-ice="appendix"><ul><li>optional</li>
<li>default: 1</li></ul></td>
<td data-ice="description"><p>The page Number for data pagination.</p>
<td data-ice="description"><p>The page number for data pagination.</p>
</td>
</tr>
<tr data-ice="property" data-depth="1">
<td data-ice="name" class="code" data-depth="1">options.size</td>
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></span></td>
<td data-ice="appendix"><ul><li>optional</li>
<li>default: 10</li></ul></td>
<td data-ice="description"><p>The pagination size, i.e. the Number
<td data-ice="description"><p>The pagination size, i.e. the number
of records per page.</p>
</td>
</tr>
Expand Down Expand Up @@ -1361,7 +1361,7 @@ <h3 data-ice="anchor" id="instance-member-size">



<div data-ice="description"><p>The pagination size, i.e. the Number
<div data-ice="description"><p>The pagination size, i.e. the number
of records per page.</p>
</div>

Expand Down Expand Up @@ -1498,7 +1498,7 @@ <h3 data-ice="anchor" id="instance-get-totalPages">

<div data-ice="description"><p>The total amount of pages.
Returns null if total wasn&apos;t provided.
A Number representing current page otherwise.</p>
A number representing current page otherwise.</p>
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
</nav>

<div class="content" data-ice="content"><div class="header-notice">
<div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import QueryBuilder from &apos;<span><a href="file/js/QueryBuilder.js.html#lineNumber62">mitch-datasource-documentation/js/QueryBuilder.js</a></span>&apos;</code></pre></div>
<div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import QueryBuilder from &apos;<span><a href="file/js/QueryBuilder.js.html#lineNumber75">mitch-datasource-documentation/js/QueryBuilder.js</a></span>&apos;</code></pre></div>
<span data-ice="access">public</span>
<span data-ice="kind">class</span>



<span data-ice="source">| <span><a href="file/js/QueryBuilder.js.html#lineNumber62">source</a></span></span>
<span data-ice="source">| <span><a href="file/js/QueryBuilder.js.html#lineNumber75">source</a></span></span>
</div>

<div class="self-detail detail">
Expand Down Expand Up @@ -84,7 +84,10 @@ <h4>Example:</h4>

<div class="example-doc" data-ice="exampleDoc">
<div class="example-caption" data-ice="exampleCaption">With AJAX Datasource</div>
<pre class="prettyprint source-code"><code data-ice="exampleCode">let datasource = new AjaxDatasource({
<pre class="prettyprint source-code"><code data-ice="exampleCode">
import { AjaxDatasource, QueryBuilder } from &apos;mitch-datasource&apos;;

let datasource = new AjaxDatasource({
// ...
queryBuilder: new QueryBuilder({
// ...
Expand All @@ -93,7 +96,10 @@ <h4>Example:</h4>
</div>
<div class="example-doc" data-ice="exampleDoc">
<div class="example-caption" data-ice="exampleCaption">With Adding to Defaults</div>
<pre class="prettyprint source-code"><code data-ice="exampleCode">let datasource = new AjaxDatasource({
<pre class="prettyprint source-code"><code data-ice="exampleCode">
import { AjaxDatasource, QueryBuilder } from &apos;mitch-datasource&apos;;

let datasource = new AjaxDatasource({
// ...
queryBuilder: new QueryBuilder({
// ...
Expand All @@ -102,12 +108,14 @@ <h4>Example:</h4>
let queryObject = QueryBuilder.prototype
.defaults.serialiseToQueryObject(datasource);
// ... Do your additional operations
return queryObject;
},
serialiseToQueryString(objectToSerialise) {
// Calls the original default serialiser
let queryString = QueryBuilder.prototype
.defaults.serialiseToQueryString(objectToSerialise);
// ... Do your additional operations
return queryString;
},
queryStringOptions: {
// Keep the default options
Expand All @@ -120,7 +128,10 @@ <h4>Example:</h4>
</div>
<div class="example-doc" data-ice="exampleDoc">
<div class="example-caption" data-ice="exampleCaption">With Extra Parameter for GET/POST Request</div>
<pre class="prettyprint source-code"><code data-ice="exampleCode">let datasource = new AjaxDatasource({
<pre class="prettyprint source-code"><code data-ice="exampleCode">
import { AjaxDatasource, QueryBuilder } from &apos;mitch-datasource&apos;;

let datasource = new AjaxDatasource({
// ...
queryBuilder: new QueryBuilder({
serialiseToQueryObject(datasource) {
Expand Down Expand Up @@ -358,7 +369,7 @@ <h3 data-ice="anchor" id="instance-constructor-constructor">
<span class="right-info">


<span data-ice="source"><span><a href="file/js/QueryBuilder.js.html#lineNumber112">source</a></span></span>
<span data-ice="source"><span><a href="file/js/QueryBuilder.js.html#lineNumber125">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -445,7 +456,7 @@ <h3 data-ice="anchor" id="instance-member-queryStringOptions">
<span class="right-info">


<span data-ice="source"><span><a href="file/js/QueryBuilder.js.html#lineNumber131">source</a></span></span>
<span data-ice="source"><span><a href="file/js/QueryBuilder.js.html#lineNumber144">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -489,7 +500,7 @@ <h3 data-ice="anchor" id="instance-member-serialiseToQueryObject">
<span class="right-info">


<span data-ice="source"><span><a href="file/js/QueryBuilder.js.html#lineNumber123">source</a></span></span>
<span data-ice="source"><span><a href="file/js/QueryBuilder.js.html#lineNumber136">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -533,7 +544,7 @@ <h3 data-ice="anchor" id="instance-member-serialiseToQueryString">
<span class="right-info">


<span data-ice="source"><span><a href="file/js/QueryBuilder.js.html#lineNumber143">source</a></span></span>
<span data-ice="source"><span><a href="file/js/QueryBuilder.js.html#lineNumber156">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -583,7 +594,7 @@ <h3 data-ice="anchor" id="instance-method-getQueryObject">
<span class="right-info">


<span data-ice="source"><span><a href="file/js/QueryBuilder.js.html#lineNumber156">source</a></span></span>
<span data-ice="source"><span><a href="file/js/QueryBuilder.js.html#lineNumber169">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -660,7 +671,7 @@ <h3 data-ice="anchor" id="instance-method-getQueryString">
<span class="right-info">


<span data-ice="source"><span><a href="file/js/QueryBuilder.js.html#lineNumber173">source</a></span></span>
<span data-ice="source"><span><a href="file/js/QueryBuilder.js.html#lineNumber186">source</a></span></span>
</span>
</h3>

Expand Down
Loading

0 comments on commit c965963

Please sign in to comment.