Skip to content

Commit

Permalink
4.13.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Yair Even Or authored and Yair Even Or committed Jul 13, 2022
1 parent 4060b04 commit 7b8e208
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 31 deletions.
6 changes: 3 additions & 3 deletions dist/jQuery.tagify.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/react.tagify.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tagify.css

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions dist/tagify.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Tagify (v 4.13.2) - tags input component
* Tagify (v 4.13.3) - tags input component
* By Yair Even-Or
* https://github.com/yairEO/tagify
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -382,7 +382,7 @@ var _dropdown = {
// 2. dropdown is disabled
// 3. loader is showing (controlled outside of this code)

if (noWhitelist && !allowNewTags && !_s.templates.dropdownItemNoMatch || _s.dropdown.enable === false || this.state.isLoading) return;
if (noWhitelist && !allowNewTags && !_s.templates.dropdownItemNoMatch || _s.dropdown.enable === false || this.state.isLoading || this.settings.readonly) return;
clearTimeout(this.dropdownHide__bindEventsTimeout); // if no value was supplied, show all the "whitelist" items in the dropdown
// @type [Array] listItems
// TODO: add a Setting to control items' sort order for "listItems"
Expand Down Expand Up @@ -1877,17 +1877,19 @@ var events = {
// node isn't in the DOM anynmore because it has been replaced.

if (!this.DOM.scope.contains(editableElm)) return;

var _s = this.settings,
tagElm = editableElm.closest('.' + _s.classNames.tag),
textValue = this.input.normalize.call(this, editableElm),
originalData = this.tagData(tagElm).__originalData,
tagData = this.tagData(tagElm),
originalData = tagData.__originalData,
// pre-edit data
hasChanged = this.editTagChangeDetected(this.tagData(tagElm)),
hasChanged = this.editTagChangeDetected(tagData),
isValid = this.validateTag({
[_s.tagTextProp]: textValue
[_s.tagTextProp]: textValue,
__tagId: tagData.__tagId
}),
hasMaxTags,
// "__tagId" is needed so validation will skip current tag when checking for dups
hasMaxTags,
newTagData;

if (!textValue) {
Expand Down Expand Up @@ -2952,10 +2954,8 @@ Tagify.prototype = {
},

setContentEditable(state) {
if (!this.settings.readonly && this.settings.userInput) {
this.DOM.input.contentEditable = state;
this.DOM.input.tabIndex = !!state ? 0 : -1;
}
this.DOM.input.contentEditable = state;
this.DOM.input.tabIndex = !!state ? 0 : -1;
},

setDisabled(isDisabled) {
Expand Down
22 changes: 11 additions & 11 deletions dist/tagify.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Tagify (v 4.13.2) - tags input component
* Tagify (v 4.13.3) - tags input component
* By Yair Even-Or
* https://github.com/yairEO/tagify
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -388,7 +388,7 @@
// 2. dropdown is disabled
// 3. loader is showing (controlled outside of this code)

if (noWhitelist && !allowNewTags && !_s.templates.dropdownItemNoMatch || _s.dropdown.enable === false || this.state.isLoading) return;
if (noWhitelist && !allowNewTags && !_s.templates.dropdownItemNoMatch || _s.dropdown.enable === false || this.state.isLoading || this.settings.readonly) return;
clearTimeout(this.dropdownHide__bindEventsTimeout); // if no value was supplied, show all the "whitelist" items in the dropdown
// @type [Array] listItems
// TODO: add a Setting to control items' sort order for "listItems"
Expand Down Expand Up @@ -1883,17 +1883,19 @@
// node isn't in the DOM anynmore because it has been replaced.

if (!this.DOM.scope.contains(editableElm)) return;

var _s = this.settings,
tagElm = editableElm.closest('.' + _s.classNames.tag),
textValue = this.input.normalize.call(this, editableElm),
originalData = this.tagData(tagElm).__originalData,
tagData = this.tagData(tagElm),
originalData = tagData.__originalData,
// pre-edit data
hasChanged = this.editTagChangeDetected(this.tagData(tagElm)),
hasChanged = this.editTagChangeDetected(tagData),
isValid = this.validateTag({
[_s.tagTextProp]: textValue
[_s.tagTextProp]: textValue,
__tagId: tagData.__tagId
}),
hasMaxTags,
// "__tagId" is needed so validation will skip current tag when checking for dups
hasMaxTags,
newTagData;

if (!textValue) {
Expand Down Expand Up @@ -2958,10 +2960,8 @@
},

setContentEditable(state) {
if (!this.settings.readonly && this.settings.userInput) {
this.DOM.input.contentEditable = state;
this.DOM.input.tabIndex = !!state ? 0 : -1;
}
this.DOM.input.contentEditable = state;
this.DOM.input.tabIndex = !!state ? 0 : -1;
},

setDisabled(isDisabled) {
Expand Down
4 changes: 2 additions & 2 deletions dist/tagify.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/tagify.polyfills.min.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Tagify (v 4.13.2) - tags input component
* Tagify (v 4.13.3) - tags input component
* By Yair Even-Or
* https://github.com/yairEO/tagify
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yaireo/tagify",
"version": "4.13.2",
"version": "4.13.3",
"homepage": "https://github.com/yairEO/tagify",
"description": "lightweight, efficient Tags input component in Vanilla JS / React / Angular [super customizable, tiny size & top performance]",
"keywords": [
Expand Down

0 comments on commit 7b8e208

Please sign in to comment.