Skip to content
This repository has been archived by the owner on Dec 14, 2019. It is now read-only.

Papertrain v0.1.4 Release #165

Merged
merged 6 commits into from
Jun 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 19 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
## 0.1.5 - Unreleased

## 0.1.4 - 2019-06-05

### Added

- Adds: IE 11 (only) polyfill scripts [#163](https://github.com/Pageworks/papertrain/issues/163)
- Adds: global "This site requires JavaScript" notice [#162](https://github.com/Pageworks/papertrain/issues/162)

### Fixed

- Fixes: changelog heading sizes
- Fixes: `normalize.scss` line heights and inline elements display values [#158](https://github.com/Pageworks/papertrain/issues/158)
- Fixes: input border radius defaults to `0px` [#156](https://github.com/Pageworks/papertrain/issues/156)
- Fixes: relocates the global JavaScript & CSS [#161](https://github.com/Pageworks/papertrain/issues/161)

## 0.1.3.3 - 2019-05-14

## Fixed
### Fixed

- Fixes: setup test email address validation bug

## 0.1.3.2 - 2019-05-14

## Added
### Added

- Adds: setup script requires the developers email address and sets it as the `testToEmailAddress` in `general.php`

## Fixed
### Fixed

- Fixes: outstanding merge conflict issue from the previous release

Expand Down
16 changes: 16 additions & 0 deletions build-tools/cc-installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

if [ -d ../templates/_complex-content ] || [ -d ../templates/_blocks ] || [ -d ../templates/component-gallery ]
then
echo Complex Content is already installed OR you have conflicting directories in your templates folder.
else
cd ../ && \
mkdir ./cc-temp && \
curl --request POST http://papertrain.io/actions/papertrain-module/default/complex-content-download -o ./cc-temp/build.zip && \
mv ./cc-temp/_blocks ./templates && \
mv ./cc-temp/_complex-content ./templates && \
mv ./cc-temp/component-gallery ./templates && \
mv ./cc-temp/complex-content.yaml ./ && \
rm -rf ./cc-temp && \
echo Complex Content has been installed
fi
4 changes: 2 additions & 2 deletions config/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
'useProjectConfigFile' => true,

// Leave at bottom of global settings
'jsCacheBustTimestamp' => '54654843',
'cssCacheBustTimestamp' => '54655693',
'jsCacheBustTimestamp' => '98165515',
'cssCacheBustTimestamp' => '98166328',
],

// Dev environment settings
Expand Down
79 changes: 79 additions & 0 deletions public/assets/polyfills/array-from.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
if(!!window.MSInputMethodContext && !!document.documentMode && (window.chrome === undefined)){
if (!Array.from) {
Array.from = (function () {
var toStr = Object.prototype.toString;
var isCallable = function (fn) {
return typeof fn === 'function' || toStr.call(fn) === '[object Function]';
};
var toInteger = function (value) {
var number = Number(value);
if (isNaN(number)) { return 0; }
if (number === 0 || !isFinite(number)) { return number; }
return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
};
var maxSafeInteger = Math.pow(2, 53) - 1;
var toLength = function (value) {
var len = toInteger(value);
return Math.min(Math.max(len, 0), maxSafeInteger);
};

// The length property of the from method is 1.
return function from(arrayLike/*, mapFn, thisArg */) {
// 1. Let C be the this value.
var C = this;

// 2. Let items be ToObject(arrayLike).
var items = Object(arrayLike);

// 3. ReturnIfAbrupt(items).
if (arrayLike == null) {
throw new TypeError('Array.from requires an array-like object - not null or undefined');
}

// 4. If mapfn is undefined, then let mapping be false.
var mapFn = arguments.length > 1 ? arguments[1] : void undefined;
var T;
if (typeof mapFn !== 'undefined') {
// 5. else
// 5. a If IsCallable(mapfn) is false, throw a TypeError exception.
if (!isCallable(mapFn)) {
throw new TypeError('Array.from: when provided, the second argument must be a function');
}

// 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.
if (arguments.length > 2) {
T = arguments[2];
}
}

// 10. Let lenValue be Get(items, "length").
// 11. Let len be ToLength(lenValue).
var len = toLength(items.length);

// 13. If IsConstructor(C) is true, then
// 13. a. Let A be the result of calling the [[Construct]] internal method
// of C with an argument list containing the single item len.
// 14. a. Else, Let A be ArrayCreate(len).
var A = isCallable(C) ? Object(new C(len)) : new Array(len);

// 16. Let k be 0.
var k = 0;
// 17. Repeat, while k < len… (also steps a - h)
var kValue;
while (k < len) {
kValue = items[k];
if (mapFn) {
A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);
} else {
A[k] = kValue;
}
k += 1;
}
// 18. Let putStatus be Put(A, "length", len, true).
A.length = len;
// 20. Return A.
return A;
};
}());
}
}
17 changes: 17 additions & 0 deletions public/assets/polyfills/closest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
if(!!window.MSInputMethodContext && !!document.documentMode && (window.chrome === undefined)){
if (!Element.prototype.matches) {
Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
}

if (!Element.prototype.closest) {
Element.prototype.closest = function(s) {
var el = this;

do {
if (el.matches(s)) return el;
el = el.parentElement || el.parentNode;
} while (el !== null && el.nodeType === 1);
return null;
};
}
}
Loading