Skip to content

Commit

Permalink
bump version and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
ReeceM committed Dec 22, 2022
1 parent a6f9ca3 commit 0d82ddd
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 15 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
All notable changes to `h-bar` will be documented in this file.
## [Unreleased]

## [2.0.2] - 2022-12-22
### Fixed
- `customStyles` prop was ignored in version change


## [2.0.1] - 2022-12-21
### Added
- Templating for custom styles.
Expand Down Expand Up @@ -80,7 +85,8 @@ Also update the readme.

Before this the documented changes are vague cause it was the initial flesh of the package.

[Unreleased]: https://github.com/reecem/h-bar/compare/v2.0.1...HEAD
[Unreleased]: https://github.com/reecem/h-bar/compare/v2.0.2...HEAD
[2.0.2]: https://github.com/reecem/h-bar/compare/v2.0.1...v2.0.2
[2.0.1]: https://github.com/reecem/h-bar/compare/v1.0.1...v2.0.1
[1.1.0]: https://github.com/reecem/h-bar/compare/v1.0.1...v1.1.0
[1.0.1]: https://github.com/reecem/h-bar/compare/v0.3.0...v1.0.1
Expand Down
47 changes: 36 additions & 11 deletions dist/hBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,13 @@ function styleTagTransform(css, styleElement) {

module.exports = styleTagTransform;

/***/ }),

/***/ 147:
/***/ ((module) => {

module.exports = {"i8":"2.0.2"};

/***/ })

/******/ });
Expand Down Expand Up @@ -645,6 +652,8 @@ var themes = {
*
* @var {object} config
* @var {object} config.fetchOptions
* @var {string} config.version
* @var {bool} config.production
*/
var config = {
fetchOptions: {
Expand All @@ -657,7 +666,10 @@ var config = {
'Accept': 'application/json'
},
redirect: 'follow' // manual, *follow, error
}
},

version: (__webpack_require__(147)/* .version */ .i8),
production: process.env.production
};
;// CONCATENATED MODULE: ./src/functions/normalise.js
/**
Expand Down Expand Up @@ -753,7 +765,12 @@ function init_init() {
configuration.url = options.url;
// if the user has dompurify installed. It can be optional
configuration.DOMPurify = options.DOMPurify || null;
configuration.theme = themes[options.theme] || 'grey';
configuration.theme = themes[options.theme] || themes.gray;

// load overrides for the styling section.
if (options.customStyles) {
configuration.customStyles = Object.assign(styling, options.customStyles);
}
configuration.badge = options.badge || null;

// we will default to false for configuration
Expand Down Expand Up @@ -867,6 +884,8 @@ function getElementOptions(element) {
/**
* Determines if the banner has been dismissed.
*
* @todo add option to check the hash on the stored value
*
* @returns boolean
*/
function isDismissed() {
Expand Down Expand Up @@ -964,13 +983,18 @@ var Banner = /*#__PURE__*/function () {
dismissible = _ref.dismissible,
dismissFor = _ref.dismissFor,
theme = _ref.theme,
badge = _ref.badge;
badge = _ref.badge,
_ref$customStyles = _ref.customStyles,
customStyles = _ref$customStyles === void 0 ? null : _ref$customStyles;
banner_classCallCheck(this, Banner);
this.$el = $el;
this.dismissible = dismissible;
this.dismissFor = dismissFor;
this.badge = badge;
this.theme = theme;

// use the top level styling preferences
this.styling = customStyles != null ? customStyles : styling;
}

/**
Expand All @@ -994,20 +1018,20 @@ var Banner = /*#__PURE__*/function () {
var secondaryLinkList = _this.createSecondaryLinks(secondaryLinks);
secondaryElement = newElement('div', {
children: secondaryLinkList,
classes: "".concat(styling.linkWrapper, " ").concat(_this.theme.linkWrapper)
classes: "".concat(_this.theme.linkWrapper, " ").concat(_this.styling.linkWrapper, " ")
});
} else {
secondaryElement = _this.dismissibleButton();
}
var badgeElement = null;
if (_this.badge) {
badgeElement = newElement('span', {
classes: "".concat(styling.badge, " ").concat(_this.theme.badge)
classes: "".concat(_this.theme.badge, " ").concat(_this.styling.badge)
});
badgeElement.innerText = _this.badge;
}
var postLink = newElement('a', {
classes: "".concat(styling.postTitle, " ").concat(_this.theme.postTitle)
classes: "".concat(_this.theme.postTitle, " ").concat(_this.styling.postTitle)
});
postLink.href = link;
postLink.innerText = title;
Expand All @@ -1017,11 +1041,11 @@ var Banner = /*#__PURE__*/function () {
postChildren.unshift(badgeElement);
}
var postElement = newElement('div', {
classes: "".concat(styling.linkWrapper, " ").concat(_this.theme.linkWrapper),
classes: "".concat(_this.theme.linkWrapper, " ").concat(_this.styling.linkWrapper, " "),
children: postChildren
});
var _hbar = newElement('div', {
classes: "".concat(styling.wrapper, " ").concat(_this.theme.wrapper),
classes: "".concat(_this.theme.wrapper, " ").concat(_this.styling.wrapper, " "),
children: [postElement, secondaryElement]
});
var container = document.querySelector(_this.$el);
Expand Down Expand Up @@ -1086,7 +1110,7 @@ var Banner = /*#__PURE__*/function () {
return secondaryLinks.map(function (_ref3) {
var title = _ref3.title,
link = _ref3.link;
var style = "".concat(styling.secondaryLink, " ").concat(_this3.theme.secondaryLink);
var style = "".concat(_this3.theme.secondaryLink, " ").concat(_this3.styling.secondaryLink, " ");
var butter = newElement('a', {
classes: style
});
Expand All @@ -1104,7 +1128,7 @@ function src_typeof(obj) { "@babel/helpers - typeof"; return src_typeof = "funct
/**
* h-bar banner and dynamic announcement library
*
* @version 2.0.0
* @version 2.0.2
* @license MIT
* @copyright @ReeceM
*/
Expand All @@ -1115,6 +1139,7 @@ function src_typeof(obj) { "@babel/helpers - typeof"; return src_typeof = "funct




/**
* Set all the configuration options for the hBar library
*
Expand All @@ -1135,7 +1160,7 @@ function src_typeof(obj) { "@babel/helpers - typeof"; return src_typeof = "funct
* @property {string} title Manual Override
*/
var hBar = {
version: "2.0.0",
version: config.version,
rendered: false,
fetching: false,
usingBanner: true,
Expand Down
Loading

0 comments on commit 0d82ddd

Please sign in to comment.