You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var _createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
function _objectWithoutProperties(obj, keys) {
var target = {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
}
function uniq(arr) {
var out = [];
for (var i = 0; i < arr.length; i++) {
if (out.indexOf(arr[i]) === -1) {
out.push(arr[i]);
}
}
return out;
}
/* istanbul ignore next */
function getClipboardData(e) {
if (window.clipboardData) {
return window.clipboardData.getData('Text');
}
if (e.clipboardData) {
return e.clipboardData.getData('text/plain');
}
return '';
}
function defaultRenderTag(props) {
var tag = props.tag,
key = props.key,
disabled = props.disabled,
onRemove = props.onRemove,
classNameRemove = props.classNameRemove,
getTagDisplayValue = props.getTagDisplayValue,
other = _objectWithoutProperties(props, ['tag', 'key', 'disabled', 'onRemove', 'classNameRemove', 'getTagDisplayValue']);
I have been trying to find out where 'define' is on react-tagsinput.js.
For define.amd on the second line.
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ReactTagsInput', ['exports', 'react', 'prop-types'], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require('react'), require('prop-types'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, global.React, global.propTypes);
global.ReactTagsInput = mod.exports;
}
})(this, function (exports, _react, _propTypes) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var _createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
}();
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
}
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
};
function _objectWithoutProperties(obj, keys) {
var target = {};
}
function uniq(arr) {
var out = [];
}
/* istanbul ignore next */
function getClipboardData(e) {
if (window.clipboardData) {
return window.clipboardData.getData('Text');
}
}
function defaultRenderTag(props) {
var tag = props.tag,
key = props.key,
disabled = props.disabled,
onRemove = props.onRemove,
classNameRemove = props.classNameRemove,
getTagDisplayValue = props.getTagDisplayValue,
other = _objectWithoutProperties(props, ['tag', 'key', 'disabled', 'onRemove', 'classNameRemove', 'getTagDisplayValue']);
}
function defaultRenderInput(_ref) {
var addTag = _ref.addTag,
props = _objectWithoutProperties(_ref, ['addTag']);
}
function defaultRenderLayout(tagComponents, inputComponent) {
return _react2.default.createElement(
'span',
null,
tagComponents,
inputComponent
);
}
function defaultPasteSplit(data) {
return data.split(' ').map(function (d) {
return d.trim();
});
}
var defaultInputProps = {
className: 'react-tagsinput-input',
placeholder: 'Add a tag'
};
var TagsInput = function (_React$Component) {
_inherits(TagsInput, _React$Component);
}(_react2.default.Component);
TagsInput.defaultProps = {
className: 'react-tagsinput',
focusedClassName: 'react-tagsinput--focused',
addKeys: ['Tab', 'Enter'],
addOnBlur: false,
addOnPaste: false,
inputProps: {},
removeKeys: ['Backspace'],
renderInput: defaultRenderInput,
renderTag: defaultRenderTag,
renderLayout: defaultRenderLayout,
pasteSplit: defaultPasteSplit,
tagProps: { className: 'react-tagsinput-tag', classNameRemove: 'react-tagsinput-remove' },
onlyUnique: false,
maxTags: -1,
validate: function validate() {
return true;
},
validationRegex: /.*/,
disabled: false,
tagDisplayProp: null,
preventSubmit: true
};
exports.default = TagsInput;
module.exports = exports.default;
});
The text was updated successfully, but these errors were encountered: