Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fork #5

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e388da8
updated with changes from master
troy-barnard Apr 26, 2024
f7a80d9
updated gitignore with dist dist-modules commented out
troy-barnard Apr 26, 2024
1817f64
new build
troy-barnard Apr 26, 2024
34e0aea
changed up svg imports
troy-barnard Apr 26, 2024
5e8d106
notes classname added
troy-barnard Apr 26, 2024
5d4fda7
wrapped label in a span
troy-barnard Apr 26, 2024
45d41ca
added workflow and history buttons
troy-barnard May 1, 2024
ee6fd58
moved history,buttons inline and added text props for them
troy-barnard May 1, 2024
ecb008a
added workflow/history button icons
troy-barnard May 1, 2024
df16d86
added showAll button
troy-barnard May 2, 2024
49629c0
added tagLimit hidden count text
troy-barnard May 2, 2024
e5aec8b
added hiddenTags logs for debugging
troy-barnard May 2, 2024
fb25bb1
fixed usehiddenTags bool
troy-barnard May 2, 2024
b21d641
more logs
troy-barnard May 2, 2024
8dbe744
repalced tagLimit with hiddenTagCount
troy-barnard May 2, 2024
c32c531
only show showAll button when tags are hidden
troy-barnard May 2, 2024
acf7af4
reduced logging to debug
troy-barnard May 2, 2024
039fb8f
setting key on Tags
troy-barnard May 3, 2024
3d7bc8e
setting selectedIndex to -1 when moving down or up at the suggestion …
troy-barnard Jul 10, 2024
d968f3b
swapped crypto.randomUUID for uuid package
troy-barnard Jul 16, 2024
a2c3a6b
cropped protected close icon
troy-barnard Jul 17, 2024
be04469
new build
troy-barnard Jul 17, 2024
2ca67f7
cropped svg icons
troy-barnard Oct 9, 2024
4d3919c
ran build with new cropped svgs
troy-barnard Oct 9, 2024
3408b65
cropped more icons
troy-barnard Oct 9, 2024
9ca5fbd
cropped protected icon, css classnames for remove icons
troy-barnard Oct 9, 2024
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ npm-debug.log
.idea
.vscode
coverage
dist-modules
dist
# dist-modules
# dist
example/public/bundle.*
example/public/ReactTags.*
example/.DS_Store
5 changes: 5 additions & 0 deletions dist-modules/assets/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions dist-modules/assets/history.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions dist-modules/assets/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions dist-modules/assets/protected_close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions dist-modules/assets/show_all.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions dist-modules/assets/sticky_note.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions dist-modules/components/ClearAllTags.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var ClearAllTags = function ClearAllTags(props) {
return /*#__PURE__*/_react["default"].createElement("button", {
className: props.classNames.clearAll,
onClick: props.onClick
}, "Clear all");
};
ClearAllTags.propTypes = {
classNames: _propTypes["default"].object,
onClick: _propTypes["default"].func
};
var _default = exports["default"] = ClearAllTags;
70 changes: 70 additions & 0 deletions dist-modules/components/NotesComponent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _constants = require("./constants");
var _sticky_note = _interopRequireDefault(require("../assets/sticky_note.svg"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var crossStr = String.fromCharCode(215);
var NotesComponent = function NotesComponent(props) {
var readOnly = props.readOnly,
notesComponent = props.notesComponent,
onClick = props.onClick,
className = props.className,
tag = props.tag,
index = props.index,
useIcon = props.useIcon;
var onKeydown = function onKeydown(event) {
if (_constants.KEYS.ENTER.includes(event.keyCode) || event.keyCode === _constants.KEYS.SPACE) {
event.preventDefault();
event.stopPropagation();
return;
}
if (event.keyCode === _constants.KEYS.BACKSPACE) {
onClick(event);
}
};
if (readOnly) {
return /*#__PURE__*/_react["default"].createElement("span", null);
}
var ariaLabel = "Tag at index ".concat(index, " with value ").concat(tag.id, " focussed. Press backspace to remove");
if (notesComponent) {
var Component = notesComponent;
return /*#__PURE__*/_react["default"].createElement(Component, {
onClick: onClick,
onKeyDown: onKeydown,
className: className,
"aria-label": ariaLabel,
tag: tag,
index: index,
useIcon: useIcon
});
}
return /*#__PURE__*/_react["default"].createElement("button", {
onClick: onClick,
onKeyDown: onKeydown,
className: className,
type: "button",
"aria-label": ariaLabel
}, useIcon ? /*#__PURE__*/_react["default"].createElement("img", {
src: _sticky_note["default"]
}) : crossStr);
};
NotesComponent.propTypes = {
className: _propTypes["default"].string,
onClick: _propTypes["default"].func.isRequired,
readOnly: _propTypes["default"].bool,
notesComponent: _propTypes["default"].func,
tag: _propTypes["default"].shape({
id: _propTypes["default"].string.isRequired,
className: _propTypes["default"].string,
key: _propTypes["default"].string
}),
index: _propTypes["default"].number.isRequired,
useIcon: _propTypes["default"].bool.isRequired
};
var _default = exports["default"] = NotesComponent;
Loading