@bigbinary/neeto-tags-frontend 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +564 -100
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +564 -100
- package/dist/index.esm.js.map +1 -1
- package/package.json +13 -13
package/dist/index.cjs.js
CHANGED
|
@@ -2129,8 +2129,8 @@ function transformOptions(options) {
|
|
|
2129
2129
|
return options;
|
|
2130
2130
|
}
|
|
2131
2131
|
|
|
2132
|
-
function ownKeys$
|
|
2133
|
-
function _objectSpread$
|
|
2132
|
+
function ownKeys$9(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2133
|
+
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$9(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2134
2134
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
2135
2135
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
2136
2136
|
function noop() {}
|
|
@@ -2190,9 +2190,9 @@ var I18n = function (_EventEmitter) {
|
|
|
2190
2190
|
}
|
|
2191
2191
|
}
|
|
2192
2192
|
var defOpts = get();
|
|
2193
|
-
this.options = _objectSpread$
|
|
2193
|
+
this.options = _objectSpread$9(_objectSpread$9(_objectSpread$9({}, defOpts), this.options), transformOptions(options));
|
|
2194
2194
|
if (this.options.compatibilityAPI !== 'v1') {
|
|
2195
|
-
this.options.interpolation = _objectSpread$
|
|
2195
|
+
this.options.interpolation = _objectSpread$9(_objectSpread$9({}, defOpts.interpolation), this.options.interpolation);
|
|
2196
2196
|
}
|
|
2197
2197
|
if (options.keySeparator !== undefined) {
|
|
2198
2198
|
this.options.userDefinedKeySeparator = options.keySeparator;
|
|
@@ -2470,7 +2470,7 @@ var I18n = function (_EventEmitter) {
|
|
|
2470
2470
|
}
|
|
2471
2471
|
options = _this5.options.overloadTranslationOptionHandler([key, opts].concat(rest));
|
|
2472
2472
|
} else {
|
|
2473
|
-
options = _objectSpread$
|
|
2473
|
+
options = _objectSpread$9({}, opts);
|
|
2474
2474
|
}
|
|
2475
2475
|
options.lng = options.lng || fixedT.lng;
|
|
2476
2476
|
options.lngs = options.lngs || fixedT.lngs;
|
|
@@ -2597,7 +2597,7 @@ var I18n = function (_EventEmitter) {
|
|
|
2597
2597
|
var _this8 = this;
|
|
2598
2598
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2599
2599
|
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
|
|
2600
|
-
var mergedOptions = _objectSpread$
|
|
2600
|
+
var mergedOptions = _objectSpread$9(_objectSpread$9(_objectSpread$9({}, this.options), options), {
|
|
2601
2601
|
isClone: true
|
|
2602
2602
|
});
|
|
2603
2603
|
var clone = new I18n(mergedOptions);
|
|
@@ -2608,7 +2608,7 @@ var I18n = function (_EventEmitter) {
|
|
|
2608
2608
|
membersToCopy.forEach(function (m) {
|
|
2609
2609
|
clone[m] = _this8[m];
|
|
2610
2610
|
});
|
|
2611
|
-
clone.services = _objectSpread$
|
|
2611
|
+
clone.services = _objectSpread$9({}, this.services);
|
|
2612
2612
|
clone.services.utils = {
|
|
2613
2613
|
hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
|
|
2614
2614
|
};
|
|
@@ -2692,6 +2692,8 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
2692
2692
|
return target;
|
|
2693
2693
|
}
|
|
2694
2694
|
|
|
2695
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2696
|
+
|
|
2695
2697
|
/**
|
|
2696
2698
|
* This file automatically generated from `pre-publish.js`.
|
|
2697
2699
|
* Do not manually edit.
|
|
@@ -2828,9 +2830,9 @@ var unescape = function unescape(text) {
|
|
|
2828
2830
|
return text.replace(matchHtmlEntity, unescapeHtmlEntity);
|
|
2829
2831
|
};
|
|
2830
2832
|
|
|
2831
|
-
function ownKeys$
|
|
2833
|
+
function ownKeys$8(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
2832
2834
|
|
|
2833
|
-
function _objectSpread$
|
|
2835
|
+
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$8(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
2834
2836
|
var defaultOptions = {
|
|
2835
2837
|
bindI18n: 'languageChanged',
|
|
2836
2838
|
bindI18nStore: '',
|
|
@@ -2843,7 +2845,7 @@ var defaultOptions = {
|
|
|
2843
2845
|
};
|
|
2844
2846
|
function setDefaults() {
|
|
2845
2847
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2846
|
-
defaultOptions = _objectSpread$
|
|
2848
|
+
defaultOptions = _objectSpread$8(_objectSpread$8({}, defaultOptions), options);
|
|
2847
2849
|
}
|
|
2848
2850
|
function getDefaults() {
|
|
2849
2851
|
return defaultOptions;
|
|
@@ -2860,9 +2862,9 @@ function getI18n() {
|
|
|
2860
2862
|
var _excluded$1 = ["format"],
|
|
2861
2863
|
_excluded2 = ["children", "count", "parent", "i18nKey", "context", "tOptions", "values", "defaults", "components", "ns", "i18n", "t", "shouldUnescape"];
|
|
2862
2864
|
|
|
2863
|
-
function ownKeys$
|
|
2865
|
+
function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
2864
2866
|
|
|
2865
|
-
function _objectSpread$
|
|
2867
|
+
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$7(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
2866
2868
|
|
|
2867
2869
|
function hasChildren(node, checkLength) {
|
|
2868
2870
|
if (!node) return false;
|
|
@@ -2888,7 +2890,7 @@ function getAsArray(data) {
|
|
|
2888
2890
|
}
|
|
2889
2891
|
|
|
2890
2892
|
function mergeProps(source, target) {
|
|
2891
|
-
var newTarget = _objectSpread$
|
|
2893
|
+
var newTarget = _objectSpread$7({}, target);
|
|
2892
2894
|
|
|
2893
2895
|
newTarget.props = Object.assign(source.props, target.props);
|
|
2894
2896
|
return newTarget;
|
|
@@ -2958,7 +2960,7 @@ function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, s
|
|
|
2958
2960
|
getData(children);
|
|
2959
2961
|
var ast = c.parse("<0>".concat(targetString, "</0>"));
|
|
2960
2962
|
|
|
2961
|
-
var opts = _objectSpread$
|
|
2963
|
+
var opts = _objectSpread$7(_objectSpread$7({}, data), combinedTOpts);
|
|
2962
2964
|
|
|
2963
2965
|
function renderInner(child, node, rootReactNode) {
|
|
2964
2966
|
var childs = getChildren(child);
|
|
@@ -2968,7 +2970,7 @@ function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, s
|
|
|
2968
2970
|
|
|
2969
2971
|
function pushTranslatedJSX(child, inner, mem, i, isVoid) {
|
|
2970
2972
|
if (child.dummy) child.children = inner;
|
|
2971
|
-
mem.push(React.cloneElement(child, _objectSpread$
|
|
2973
|
+
mem.push(React.cloneElement(child, _objectSpread$7(_objectSpread$7({}, child.props), {}, {
|
|
2972
2974
|
key: i
|
|
2973
2975
|
}), isVoid ? undefined : inner));
|
|
2974
2976
|
}
|
|
@@ -3000,7 +3002,7 @@ function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, s
|
|
|
3000
3002
|
} else if (isEmptyTransWithHTML) {
|
|
3001
3003
|
var _inner = mapAST(reactNodes, node.children, rootReactNode);
|
|
3002
3004
|
|
|
3003
|
-
mem.push(React.cloneElement(child, _objectSpread$
|
|
3005
|
+
mem.push(React.cloneElement(child, _objectSpread$7(_objectSpread$7({}, child.props), {}, {
|
|
3004
3006
|
key: i
|
|
3005
3007
|
}), _inner));
|
|
3006
3008
|
} else if (Number.isNaN(parseFloat(node.name))) {
|
|
@@ -3031,11 +3033,11 @@ function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, s
|
|
|
3031
3033
|
var content = node.children[0] ? translationContent : null;
|
|
3032
3034
|
if (content) mem.push(content);
|
|
3033
3035
|
} else if (node.children.length === 1 && translationContent) {
|
|
3034
|
-
mem.push(React.cloneElement(child, _objectSpread$
|
|
3036
|
+
mem.push(React.cloneElement(child, _objectSpread$7(_objectSpread$7({}, child.props), {}, {
|
|
3035
3037
|
key: i
|
|
3036
3038
|
}), translationContent));
|
|
3037
3039
|
} else {
|
|
3038
|
-
mem.push(React.cloneElement(child, _objectSpread$
|
|
3040
|
+
mem.push(React.cloneElement(child, _objectSpread$7(_objectSpread$7({}, child.props), {}, {
|
|
3039
3041
|
key: i
|
|
3040
3042
|
})));
|
|
3041
3043
|
}
|
|
@@ -3094,7 +3096,7 @@ function Trans$1(_ref) {
|
|
|
3094
3096
|
|
|
3095
3097
|
if (context) tOptions.context = context;
|
|
3096
3098
|
|
|
3097
|
-
var reactI18nextOptions = _objectSpread$
|
|
3099
|
+
var reactI18nextOptions = _objectSpread$7(_objectSpread$7({}, getDefaults()), i18n.options && i18n.options.react);
|
|
3098
3100
|
|
|
3099
3101
|
var namespaces = ns || t.ns || i18n.options && i18n.options.defaultNS;
|
|
3100
3102
|
namespaces = typeof namespaces === 'string' ? [namespaces] : namespaces || ['translation'];
|
|
@@ -3102,13 +3104,13 @@ function Trans$1(_ref) {
|
|
|
3102
3104
|
var hashTransKey = reactI18nextOptions.hashTransKey;
|
|
3103
3105
|
var key = i18nKey || (hashTransKey ? hashTransKey(defaultValue) : defaultValue);
|
|
3104
3106
|
var interpolationOverride = values ? tOptions.interpolation : {
|
|
3105
|
-
interpolation: _objectSpread$
|
|
3107
|
+
interpolation: _objectSpread$7(_objectSpread$7({}, tOptions.interpolation), {}, {
|
|
3106
3108
|
prefix: '#$?',
|
|
3107
3109
|
suffix: '?$#'
|
|
3108
3110
|
})
|
|
3109
3111
|
};
|
|
3110
3112
|
|
|
3111
|
-
var combinedTOpts = _objectSpread$
|
|
3113
|
+
var combinedTOpts = _objectSpread$7(_objectSpread$7(_objectSpread$7(_objectSpread$7({}, tOptions), {}, {
|
|
3112
3114
|
count: count
|
|
3113
3115
|
}, values), interpolationOverride), {}, {
|
|
3114
3116
|
defaultValue: defaultValue,
|
|
@@ -3158,9 +3160,9 @@ var ReportNamespaces = function () {
|
|
|
3158
3160
|
|
|
3159
3161
|
var _excluded = ["children", "count", "parent", "i18nKey", "context", "tOptions", "values", "defaults", "components", "ns", "i18n", "t", "shouldUnescape"];
|
|
3160
3162
|
|
|
3161
|
-
function ownKeys$
|
|
3163
|
+
function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
3162
3164
|
|
|
3163
|
-
function _objectSpread$
|
|
3165
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$6(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
3164
3166
|
function Trans(_ref) {
|
|
3165
3167
|
var children = _ref.children,
|
|
3166
3168
|
count = _ref.count,
|
|
@@ -3184,7 +3186,7 @@ function Trans(_ref) {
|
|
|
3184
3186
|
|
|
3185
3187
|
var i18n = i18nFromProps || i18nFromContext || getI18n();
|
|
3186
3188
|
var t = tFromProps || i18n && i18n.t.bind(i18n);
|
|
3187
|
-
return Trans$1(_objectSpread$
|
|
3189
|
+
return Trans$1(_objectSpread$6({
|
|
3188
3190
|
children: children,
|
|
3189
3191
|
count: count,
|
|
3190
3192
|
parent: parent,
|
|
@@ -3233,9 +3235,9 @@ function _slicedToArray(arr, i) {
|
|
|
3233
3235
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
3234
3236
|
}
|
|
3235
3237
|
|
|
3236
|
-
function ownKeys$
|
|
3238
|
+
function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
3237
3239
|
|
|
3238
|
-
function _objectSpread$
|
|
3240
|
+
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$5(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
3239
3241
|
|
|
3240
3242
|
var usePrevious = function usePrevious(value, ignore) {
|
|
3241
3243
|
var ref = React.useRef();
|
|
@@ -3272,7 +3274,7 @@ function useTranslation(ns) {
|
|
|
3272
3274
|
|
|
3273
3275
|
if (i18n.options.react && i18n.options.react.wait !== undefined) warnOnce('It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');
|
|
3274
3276
|
|
|
3275
|
-
var i18nOptions = _objectSpread$
|
|
3277
|
+
var i18nOptions = _objectSpread$5(_objectSpread$5(_objectSpread$5({}, getDefaults()), i18n.options.react), props);
|
|
3276
3278
|
|
|
3277
3279
|
var useSuspense = i18nOptions.useSuspense,
|
|
3278
3280
|
keyPrefix = i18nOptions.keyPrefix;
|
|
@@ -3666,15 +3668,15 @@ var queryClient = new reactQuery.QueryClient({
|
|
|
3666
3668
|
})
|
|
3667
3669
|
});
|
|
3668
3670
|
|
|
3669
|
-
function ownKeys$
|
|
3670
|
-
function _objectSpread$
|
|
3671
|
+
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3672
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3671
3673
|
var TAG_KEY = "tag-key";
|
|
3672
3674
|
var STALE_TIME = 3200000;
|
|
3673
3675
|
var useFetchTags = function useFetchTags(params) {
|
|
3674
3676
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3675
3677
|
return reactQuery.useQuery([TAG_KEY, Object.values(params)], function () {
|
|
3676
3678
|
return tagsApi.fetch(params);
|
|
3677
|
-
}, _objectSpread$
|
|
3679
|
+
}, _objectSpread$4({
|
|
3678
3680
|
staleTime: STALE_TIME,
|
|
3679
3681
|
select: function select(response) {
|
|
3680
3682
|
return response.data || response;
|
|
@@ -3722,10 +3724,8 @@ var useMergeTags = function useMergeTags() {
|
|
|
3722
3724
|
payload = _ref4.payload;
|
|
3723
3725
|
return tagsApi.merge(url, payload);
|
|
3724
3726
|
}, {
|
|
3725
|
-
onSuccess: function onSuccess(
|
|
3726
|
-
|
|
3727
|
-
queryClient.invalidateQueries([TAG_KEY]);
|
|
3728
|
-
neetoui.Toastr.success(notice);
|
|
3727
|
+
onSuccess: function onSuccess() {
|
|
3728
|
+
return queryClient.invalidateQueries([TAG_KEY]);
|
|
3729
3729
|
}
|
|
3730
3730
|
});
|
|
3731
3731
|
};
|
|
@@ -3809,8 +3809,8 @@ var useTagsForm = function useTagsForm(_ref) {
|
|
|
3809
3809
|
};
|
|
3810
3810
|
};
|
|
3811
3811
|
|
|
3812
|
-
function ownKeys$
|
|
3813
|
-
function _objectSpread$
|
|
3812
|
+
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3813
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3814
3814
|
var ManageTags = function ManageTags(_ref) {
|
|
3815
3815
|
var createTags = _ref.createTags,
|
|
3816
3816
|
goToFirstPage = _ref.goToFirstPage,
|
|
@@ -3846,7 +3846,7 @@ var ManageTags = function ManageTags(_ref) {
|
|
|
3846
3846
|
}) : t("addNew", {
|
|
3847
3847
|
what: t("tag").toLocaleLowerCase()
|
|
3848
3848
|
}))), /*#__PURE__*/React__default["default"].createElement(formik.Form, {
|
|
3849
|
-
formikProps: _objectSpread$
|
|
3849
|
+
formikProps: _objectSpread$3(_objectSpread$3({}, TAGS_FORMIK_PROPS), {}, {
|
|
3850
3850
|
initialValues: initialValues,
|
|
3851
3851
|
onSubmit: handleSubmit
|
|
3852
3852
|
})
|
|
@@ -3927,8 +3927,8 @@ var getHelpText = function getHelpText(url) {
|
|
|
3927
3927
|
}));
|
|
3928
3928
|
};
|
|
3929
3929
|
|
|
3930
|
-
function ownKeys$
|
|
3931
|
-
function _objectSpread$
|
|
3930
|
+
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3931
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3932
3932
|
var Dashboard = function Dashboard(_ref) {
|
|
3933
3933
|
var _data$tags2, _tagType$label;
|
|
3934
3934
|
var breadcrumbs = _ref.breadcrumbs,
|
|
@@ -3975,7 +3975,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3975
3975
|
var _useTranslation = useTranslation(),
|
|
3976
3976
|
t = _useTranslation.t;
|
|
3977
3977
|
var history = reactRouterDom.useHistory();
|
|
3978
|
-
var primaryButtonProps = _objectSpread$
|
|
3978
|
+
var primaryButtonProps = _objectSpread$2(_objectSpread$2({}, NO_DATA_PRIMARY_BUTTON_PROPS$1), {}, {
|
|
3979
3979
|
onClick: function onClick() {
|
|
3980
3980
|
setSelectedTag(null);
|
|
3981
3981
|
setPaneType(PANE_TYPES.CREATE);
|
|
@@ -4017,7 +4017,11 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
4017
4017
|
});
|
|
4018
4018
|
}
|
|
4019
4019
|
deleteTags === null || deleteTags === void 0 ? void 0 : (_deleteTags$onSuccess = deleteTags.onSuccess) === null || _deleteTags$onSuccess === void 0 ? void 0 : _deleteTags$onSuccess.callback();
|
|
4020
|
-
|
|
4020
|
+
// @ts-ignore
|
|
4021
|
+
neetoui.Toastr.success("", {
|
|
4022
|
+
icon: "👍",
|
|
4023
|
+
className: "w-20"
|
|
4024
|
+
});
|
|
4021
4025
|
},
|
|
4022
4026
|
onError: function onError(_ref2) {
|
|
4023
4027
|
var errors = _ref2.errors;
|
|
@@ -4196,55 +4200,519 @@ var List = function List(_ref) {
|
|
|
4196
4200
|
})));
|
|
4197
4201
|
};
|
|
4198
4202
|
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
man: "men",
|
|
4208
|
-
medium: "media",
|
|
4209
|
-
person: "people",
|
|
4210
|
-
woman: "women"
|
|
4211
|
-
};
|
|
4212
|
-
var pluralize = function pluralize(_ref) {
|
|
4213
|
-
var _ref$count = _ref.count,
|
|
4214
|
-
count = _ref$count === void 0 ? 0 : _ref$count,
|
|
4215
|
-
_ref$singular = _ref.singular,
|
|
4216
|
-
singular = _ref$singular === void 0 ? "" : _ref$singular,
|
|
4217
|
-
_ref$plural = _ref.plural,
|
|
4218
|
-
plural = _ref$plural === void 0 ? "" : _ref$plural,
|
|
4219
|
-
_ref$zero = _ref.zero,
|
|
4220
|
-
zero = _ref$zero === void 0 ? false : _ref$zero,
|
|
4221
|
-
_ref$skipCount = _ref.skipCount,
|
|
4222
|
-
skipCount = _ref$skipCount === void 0 ? false : _ref$skipCount;
|
|
4223
|
-
var pluralString = function pluralString() {
|
|
4224
|
-
if (plural) return plural;
|
|
4225
|
-
var str = unusualPlurals[singular];
|
|
4226
|
-
if (str) return str;
|
|
4227
|
-
return "".concat(singular, "s");
|
|
4228
|
-
};
|
|
4229
|
-
var resultText = "";
|
|
4230
|
-
if (!skipCount) resultText += "".concat(count, " ");
|
|
4231
|
-
switch (count) {
|
|
4232
|
-
case 0:
|
|
4233
|
-
if (zero) return zero;
|
|
4234
|
-
resultText += pluralString();
|
|
4235
|
-
break;
|
|
4236
|
-
case 1:
|
|
4237
|
-
resultText += singular;
|
|
4238
|
-
break;
|
|
4239
|
-
default:
|
|
4240
|
-
resultText += pluralString();
|
|
4241
|
-
break;
|
|
4242
|
-
}
|
|
4243
|
-
return resultText;
|
|
4203
|
+
function commonjsRequire(path) {
|
|
4204
|
+
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
4205
|
+
}
|
|
4206
|
+
|
|
4207
|
+
var pluralizeExports = {};
|
|
4208
|
+
var pluralize$1 = {
|
|
4209
|
+
get exports(){ return pluralizeExports; },
|
|
4210
|
+
set exports(v){ pluralizeExports = v; },
|
|
4244
4211
|
};
|
|
4245
4212
|
|
|
4246
|
-
|
|
4247
|
-
|
|
4213
|
+
/* global define */
|
|
4214
|
+
|
|
4215
|
+
(function (module, exports) {
|
|
4216
|
+
(function (root, pluralize) {
|
|
4217
|
+
/* istanbul ignore else */
|
|
4218
|
+
if (typeof commonjsRequire === 'function' && 'object' === 'object' && 'object' === 'object') {
|
|
4219
|
+
// Node.
|
|
4220
|
+
module.exports = pluralize();
|
|
4221
|
+
} else {
|
|
4222
|
+
// Browser global.
|
|
4223
|
+
root.pluralize = pluralize();
|
|
4224
|
+
}
|
|
4225
|
+
})(commonjsGlobal, function () {
|
|
4226
|
+
// Rule storage - pluralize and singularize need to be run sequentially,
|
|
4227
|
+
// while other rules can be optimized using an object for instant lookups.
|
|
4228
|
+
var pluralRules = [];
|
|
4229
|
+
var singularRules = [];
|
|
4230
|
+
var uncountables = {};
|
|
4231
|
+
var irregularPlurals = {};
|
|
4232
|
+
var irregularSingles = {};
|
|
4233
|
+
|
|
4234
|
+
/**
|
|
4235
|
+
* Sanitize a pluralization rule to a usable regular expression.
|
|
4236
|
+
*
|
|
4237
|
+
* @param {(RegExp|string)} rule
|
|
4238
|
+
* @return {RegExp}
|
|
4239
|
+
*/
|
|
4240
|
+
function sanitizeRule (rule) {
|
|
4241
|
+
if (typeof rule === 'string') {
|
|
4242
|
+
return new RegExp('^' + rule + '$', 'i');
|
|
4243
|
+
}
|
|
4244
|
+
|
|
4245
|
+
return rule;
|
|
4246
|
+
}
|
|
4247
|
+
|
|
4248
|
+
/**
|
|
4249
|
+
* Pass in a word token to produce a function that can replicate the case on
|
|
4250
|
+
* another word.
|
|
4251
|
+
*
|
|
4252
|
+
* @param {string} word
|
|
4253
|
+
* @param {string} token
|
|
4254
|
+
* @return {Function}
|
|
4255
|
+
*/
|
|
4256
|
+
function restoreCase (word, token) {
|
|
4257
|
+
// Tokens are an exact match.
|
|
4258
|
+
if (word === token) return token;
|
|
4259
|
+
|
|
4260
|
+
// Lower cased words. E.g. "hello".
|
|
4261
|
+
if (word === word.toLowerCase()) return token.toLowerCase();
|
|
4262
|
+
|
|
4263
|
+
// Upper cased words. E.g. "WHISKY".
|
|
4264
|
+
if (word === word.toUpperCase()) return token.toUpperCase();
|
|
4265
|
+
|
|
4266
|
+
// Title cased words. E.g. "Title".
|
|
4267
|
+
if (word[0] === word[0].toUpperCase()) {
|
|
4268
|
+
return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();
|
|
4269
|
+
}
|
|
4270
|
+
|
|
4271
|
+
// Lower cased words. E.g. "test".
|
|
4272
|
+
return token.toLowerCase();
|
|
4273
|
+
}
|
|
4274
|
+
|
|
4275
|
+
/**
|
|
4276
|
+
* Interpolate a regexp string.
|
|
4277
|
+
*
|
|
4278
|
+
* @param {string} str
|
|
4279
|
+
* @param {Array} args
|
|
4280
|
+
* @return {string}
|
|
4281
|
+
*/
|
|
4282
|
+
function interpolate (str, args) {
|
|
4283
|
+
return str.replace(/\$(\d{1,2})/g, function (match, index) {
|
|
4284
|
+
return args[index] || '';
|
|
4285
|
+
});
|
|
4286
|
+
}
|
|
4287
|
+
|
|
4288
|
+
/**
|
|
4289
|
+
* Replace a word using a rule.
|
|
4290
|
+
*
|
|
4291
|
+
* @param {string} word
|
|
4292
|
+
* @param {Array} rule
|
|
4293
|
+
* @return {string}
|
|
4294
|
+
*/
|
|
4295
|
+
function replace (word, rule) {
|
|
4296
|
+
return word.replace(rule[0], function (match, index) {
|
|
4297
|
+
var result = interpolate(rule[1], arguments);
|
|
4298
|
+
|
|
4299
|
+
if (match === '') {
|
|
4300
|
+
return restoreCase(word[index - 1], result);
|
|
4301
|
+
}
|
|
4302
|
+
|
|
4303
|
+
return restoreCase(match, result);
|
|
4304
|
+
});
|
|
4305
|
+
}
|
|
4306
|
+
|
|
4307
|
+
/**
|
|
4308
|
+
* Sanitize a word by passing in the word and sanitization rules.
|
|
4309
|
+
*
|
|
4310
|
+
* @param {string} token
|
|
4311
|
+
* @param {string} word
|
|
4312
|
+
* @param {Array} rules
|
|
4313
|
+
* @return {string}
|
|
4314
|
+
*/
|
|
4315
|
+
function sanitizeWord (token, word, rules) {
|
|
4316
|
+
// Empty string or doesn't need fixing.
|
|
4317
|
+
if (!token.length || uncountables.hasOwnProperty(token)) {
|
|
4318
|
+
return word;
|
|
4319
|
+
}
|
|
4320
|
+
|
|
4321
|
+
var len = rules.length;
|
|
4322
|
+
|
|
4323
|
+
// Iterate over the sanitization rules and use the first one to match.
|
|
4324
|
+
while (len--) {
|
|
4325
|
+
var rule = rules[len];
|
|
4326
|
+
|
|
4327
|
+
if (rule[0].test(word)) return replace(word, rule);
|
|
4328
|
+
}
|
|
4329
|
+
|
|
4330
|
+
return word;
|
|
4331
|
+
}
|
|
4332
|
+
|
|
4333
|
+
/**
|
|
4334
|
+
* Replace a word with the updated word.
|
|
4335
|
+
*
|
|
4336
|
+
* @param {Object} replaceMap
|
|
4337
|
+
* @param {Object} keepMap
|
|
4338
|
+
* @param {Array} rules
|
|
4339
|
+
* @return {Function}
|
|
4340
|
+
*/
|
|
4341
|
+
function replaceWord (replaceMap, keepMap, rules) {
|
|
4342
|
+
return function (word) {
|
|
4343
|
+
// Get the correct token and case restoration functions.
|
|
4344
|
+
var token = word.toLowerCase();
|
|
4345
|
+
|
|
4346
|
+
// Check against the keep object map.
|
|
4347
|
+
if (keepMap.hasOwnProperty(token)) {
|
|
4348
|
+
return restoreCase(word, token);
|
|
4349
|
+
}
|
|
4350
|
+
|
|
4351
|
+
// Check against the replacement map for a direct word replacement.
|
|
4352
|
+
if (replaceMap.hasOwnProperty(token)) {
|
|
4353
|
+
return restoreCase(word, replaceMap[token]);
|
|
4354
|
+
}
|
|
4355
|
+
|
|
4356
|
+
// Run all the rules against the word.
|
|
4357
|
+
return sanitizeWord(token, word, rules);
|
|
4358
|
+
};
|
|
4359
|
+
}
|
|
4360
|
+
|
|
4361
|
+
/**
|
|
4362
|
+
* Check if a word is part of the map.
|
|
4363
|
+
*/
|
|
4364
|
+
function checkWord (replaceMap, keepMap, rules, bool) {
|
|
4365
|
+
return function (word) {
|
|
4366
|
+
var token = word.toLowerCase();
|
|
4367
|
+
|
|
4368
|
+
if (keepMap.hasOwnProperty(token)) return true;
|
|
4369
|
+
if (replaceMap.hasOwnProperty(token)) return false;
|
|
4370
|
+
|
|
4371
|
+
return sanitizeWord(token, token, rules) === token;
|
|
4372
|
+
};
|
|
4373
|
+
}
|
|
4374
|
+
|
|
4375
|
+
/**
|
|
4376
|
+
* Pluralize or singularize a word based on the passed in count.
|
|
4377
|
+
*
|
|
4378
|
+
* @param {string} word The word to pluralize
|
|
4379
|
+
* @param {number} count How many of the word exist
|
|
4380
|
+
* @param {boolean} inclusive Whether to prefix with the number (e.g. 3 ducks)
|
|
4381
|
+
* @return {string}
|
|
4382
|
+
*/
|
|
4383
|
+
function pluralize (word, count, inclusive) {
|
|
4384
|
+
var pluralized = count === 1
|
|
4385
|
+
? pluralize.singular(word) : pluralize.plural(word);
|
|
4386
|
+
|
|
4387
|
+
return (inclusive ? count + ' ' : '') + pluralized;
|
|
4388
|
+
}
|
|
4389
|
+
|
|
4390
|
+
/**
|
|
4391
|
+
* Pluralize a word.
|
|
4392
|
+
*
|
|
4393
|
+
* @type {Function}
|
|
4394
|
+
*/
|
|
4395
|
+
pluralize.plural = replaceWord(
|
|
4396
|
+
irregularSingles, irregularPlurals, pluralRules
|
|
4397
|
+
);
|
|
4398
|
+
|
|
4399
|
+
/**
|
|
4400
|
+
* Check if a word is plural.
|
|
4401
|
+
*
|
|
4402
|
+
* @type {Function}
|
|
4403
|
+
*/
|
|
4404
|
+
pluralize.isPlural = checkWord(
|
|
4405
|
+
irregularSingles, irregularPlurals, pluralRules
|
|
4406
|
+
);
|
|
4407
|
+
|
|
4408
|
+
/**
|
|
4409
|
+
* Singularize a word.
|
|
4410
|
+
*
|
|
4411
|
+
* @type {Function}
|
|
4412
|
+
*/
|
|
4413
|
+
pluralize.singular = replaceWord(
|
|
4414
|
+
irregularPlurals, irregularSingles, singularRules
|
|
4415
|
+
);
|
|
4416
|
+
|
|
4417
|
+
/**
|
|
4418
|
+
* Check if a word is singular.
|
|
4419
|
+
*
|
|
4420
|
+
* @type {Function}
|
|
4421
|
+
*/
|
|
4422
|
+
pluralize.isSingular = checkWord(
|
|
4423
|
+
irregularPlurals, irregularSingles, singularRules
|
|
4424
|
+
);
|
|
4425
|
+
|
|
4426
|
+
/**
|
|
4427
|
+
* Add a pluralization rule to the collection.
|
|
4428
|
+
*
|
|
4429
|
+
* @param {(string|RegExp)} rule
|
|
4430
|
+
* @param {string} replacement
|
|
4431
|
+
*/
|
|
4432
|
+
pluralize.addPluralRule = function (rule, replacement) {
|
|
4433
|
+
pluralRules.push([sanitizeRule(rule), replacement]);
|
|
4434
|
+
};
|
|
4435
|
+
|
|
4436
|
+
/**
|
|
4437
|
+
* Add a singularization rule to the collection.
|
|
4438
|
+
*
|
|
4439
|
+
* @param {(string|RegExp)} rule
|
|
4440
|
+
* @param {string} replacement
|
|
4441
|
+
*/
|
|
4442
|
+
pluralize.addSingularRule = function (rule, replacement) {
|
|
4443
|
+
singularRules.push([sanitizeRule(rule), replacement]);
|
|
4444
|
+
};
|
|
4445
|
+
|
|
4446
|
+
/**
|
|
4447
|
+
* Add an uncountable word rule.
|
|
4448
|
+
*
|
|
4449
|
+
* @param {(string|RegExp)} word
|
|
4450
|
+
*/
|
|
4451
|
+
pluralize.addUncountableRule = function (word) {
|
|
4452
|
+
if (typeof word === 'string') {
|
|
4453
|
+
uncountables[word.toLowerCase()] = true;
|
|
4454
|
+
return;
|
|
4455
|
+
}
|
|
4456
|
+
|
|
4457
|
+
// Set singular and plural references for the word.
|
|
4458
|
+
pluralize.addPluralRule(word, '$0');
|
|
4459
|
+
pluralize.addSingularRule(word, '$0');
|
|
4460
|
+
};
|
|
4461
|
+
|
|
4462
|
+
/**
|
|
4463
|
+
* Add an irregular word definition.
|
|
4464
|
+
*
|
|
4465
|
+
* @param {string} single
|
|
4466
|
+
* @param {string} plural
|
|
4467
|
+
*/
|
|
4468
|
+
pluralize.addIrregularRule = function (single, plural) {
|
|
4469
|
+
plural = plural.toLowerCase();
|
|
4470
|
+
single = single.toLowerCase();
|
|
4471
|
+
|
|
4472
|
+
irregularSingles[single] = plural;
|
|
4473
|
+
irregularPlurals[plural] = single;
|
|
4474
|
+
};
|
|
4475
|
+
|
|
4476
|
+
/**
|
|
4477
|
+
* Irregular rules.
|
|
4478
|
+
*/
|
|
4479
|
+
[
|
|
4480
|
+
// Pronouns.
|
|
4481
|
+
['I', 'we'],
|
|
4482
|
+
['me', 'us'],
|
|
4483
|
+
['he', 'they'],
|
|
4484
|
+
['she', 'they'],
|
|
4485
|
+
['them', 'them'],
|
|
4486
|
+
['myself', 'ourselves'],
|
|
4487
|
+
['yourself', 'yourselves'],
|
|
4488
|
+
['itself', 'themselves'],
|
|
4489
|
+
['herself', 'themselves'],
|
|
4490
|
+
['himself', 'themselves'],
|
|
4491
|
+
['themself', 'themselves'],
|
|
4492
|
+
['is', 'are'],
|
|
4493
|
+
['was', 'were'],
|
|
4494
|
+
['has', 'have'],
|
|
4495
|
+
['this', 'these'],
|
|
4496
|
+
['that', 'those'],
|
|
4497
|
+
// Words ending in with a consonant and `o`.
|
|
4498
|
+
['echo', 'echoes'],
|
|
4499
|
+
['dingo', 'dingoes'],
|
|
4500
|
+
['volcano', 'volcanoes'],
|
|
4501
|
+
['tornado', 'tornadoes'],
|
|
4502
|
+
['torpedo', 'torpedoes'],
|
|
4503
|
+
// Ends with `us`.
|
|
4504
|
+
['genus', 'genera'],
|
|
4505
|
+
['viscus', 'viscera'],
|
|
4506
|
+
// Ends with `ma`.
|
|
4507
|
+
['stigma', 'stigmata'],
|
|
4508
|
+
['stoma', 'stomata'],
|
|
4509
|
+
['dogma', 'dogmata'],
|
|
4510
|
+
['lemma', 'lemmata'],
|
|
4511
|
+
['schema', 'schemata'],
|
|
4512
|
+
['anathema', 'anathemata'],
|
|
4513
|
+
// Other irregular rules.
|
|
4514
|
+
['ox', 'oxen'],
|
|
4515
|
+
['axe', 'axes'],
|
|
4516
|
+
['die', 'dice'],
|
|
4517
|
+
['yes', 'yeses'],
|
|
4518
|
+
['foot', 'feet'],
|
|
4519
|
+
['eave', 'eaves'],
|
|
4520
|
+
['goose', 'geese'],
|
|
4521
|
+
['tooth', 'teeth'],
|
|
4522
|
+
['quiz', 'quizzes'],
|
|
4523
|
+
['human', 'humans'],
|
|
4524
|
+
['proof', 'proofs'],
|
|
4525
|
+
['carve', 'carves'],
|
|
4526
|
+
['valve', 'valves'],
|
|
4527
|
+
['looey', 'looies'],
|
|
4528
|
+
['thief', 'thieves'],
|
|
4529
|
+
['groove', 'grooves'],
|
|
4530
|
+
['pickaxe', 'pickaxes'],
|
|
4531
|
+
['passerby', 'passersby']
|
|
4532
|
+
].forEach(function (rule) {
|
|
4533
|
+
return pluralize.addIrregularRule(rule[0], rule[1]);
|
|
4534
|
+
});
|
|
4535
|
+
|
|
4536
|
+
/**
|
|
4537
|
+
* Pluralization rules.
|
|
4538
|
+
*/
|
|
4539
|
+
[
|
|
4540
|
+
[/s?$/i, 's'],
|
|
4541
|
+
[/[^\u0000-\u007F]$/i, '$0'],
|
|
4542
|
+
[/([^aeiou]ese)$/i, '$1'],
|
|
4543
|
+
[/(ax|test)is$/i, '$1es'],
|
|
4544
|
+
[/(alias|[^aou]us|t[lm]as|gas|ris)$/i, '$1es'],
|
|
4545
|
+
[/(e[mn]u)s?$/i, '$1s'],
|
|
4546
|
+
[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, '$1'],
|
|
4547
|
+
[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1i'],
|
|
4548
|
+
[/(alumn|alg|vertebr)(?:a|ae)$/i, '$1ae'],
|
|
4549
|
+
[/(seraph|cherub)(?:im)?$/i, '$1im'],
|
|
4550
|
+
[/(her|at|gr)o$/i, '$1oes'],
|
|
4551
|
+
[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, '$1a'],
|
|
4552
|
+
[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, '$1a'],
|
|
4553
|
+
[/sis$/i, 'ses'],
|
|
4554
|
+
[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, '$1$2ves'],
|
|
4555
|
+
[/([^aeiouy]|qu)y$/i, '$1ies'],
|
|
4556
|
+
[/([^ch][ieo][ln])ey$/i, '$1ies'],
|
|
4557
|
+
[/(x|ch|ss|sh|zz)$/i, '$1es'],
|
|
4558
|
+
[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'],
|
|
4559
|
+
[/\b((?:tit)?m|l)(?:ice|ouse)$/i, '$1ice'],
|
|
4560
|
+
[/(pe)(?:rson|ople)$/i, '$1ople'],
|
|
4561
|
+
[/(child)(?:ren)?$/i, '$1ren'],
|
|
4562
|
+
[/eaux$/i, '$0'],
|
|
4563
|
+
[/m[ae]n$/i, 'men'],
|
|
4564
|
+
['thou', 'you']
|
|
4565
|
+
].forEach(function (rule) {
|
|
4566
|
+
return pluralize.addPluralRule(rule[0], rule[1]);
|
|
4567
|
+
});
|
|
4568
|
+
|
|
4569
|
+
/**
|
|
4570
|
+
* Singularization rules.
|
|
4571
|
+
*/
|
|
4572
|
+
[
|
|
4573
|
+
[/s$/i, ''],
|
|
4574
|
+
[/(ss)$/i, '$1'],
|
|
4575
|
+
[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, '$1fe'],
|
|
4576
|
+
[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, '$1f'],
|
|
4577
|
+
[/ies$/i, 'y'],
|
|
4578
|
+
[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, '$1ie'],
|
|
4579
|
+
[/\b(mon|smil)ies$/i, '$1ey'],
|
|
4580
|
+
[/\b((?:tit)?m|l)ice$/i, '$1ouse'],
|
|
4581
|
+
[/(seraph|cherub)im$/i, '$1'],
|
|
4582
|
+
[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, '$1'],
|
|
4583
|
+
[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, '$1sis'],
|
|
4584
|
+
[/(movie|twelve|abuse|e[mn]u)s$/i, '$1'],
|
|
4585
|
+
[/(test)(?:is|es)$/i, '$1is'],
|
|
4586
|
+
[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1us'],
|
|
4587
|
+
[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, '$1um'],
|
|
4588
|
+
[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, '$1on'],
|
|
4589
|
+
[/(alumn|alg|vertebr)ae$/i, '$1a'],
|
|
4590
|
+
[/(cod|mur|sil|vert|ind)ices$/i, '$1ex'],
|
|
4591
|
+
[/(matr|append)ices$/i, '$1ix'],
|
|
4592
|
+
[/(pe)(rson|ople)$/i, '$1rson'],
|
|
4593
|
+
[/(child)ren$/i, '$1'],
|
|
4594
|
+
[/(eau)x?$/i, '$1'],
|
|
4595
|
+
[/men$/i, 'man']
|
|
4596
|
+
].forEach(function (rule) {
|
|
4597
|
+
return pluralize.addSingularRule(rule[0], rule[1]);
|
|
4598
|
+
});
|
|
4599
|
+
|
|
4600
|
+
/**
|
|
4601
|
+
* Uncountable rules.
|
|
4602
|
+
*/
|
|
4603
|
+
[
|
|
4604
|
+
// Singular words with no plurals.
|
|
4605
|
+
'adulthood',
|
|
4606
|
+
'advice',
|
|
4607
|
+
'agenda',
|
|
4608
|
+
'aid',
|
|
4609
|
+
'aircraft',
|
|
4610
|
+
'alcohol',
|
|
4611
|
+
'ammo',
|
|
4612
|
+
'analytics',
|
|
4613
|
+
'anime',
|
|
4614
|
+
'athletics',
|
|
4615
|
+
'audio',
|
|
4616
|
+
'bison',
|
|
4617
|
+
'blood',
|
|
4618
|
+
'bream',
|
|
4619
|
+
'buffalo',
|
|
4620
|
+
'butter',
|
|
4621
|
+
'carp',
|
|
4622
|
+
'cash',
|
|
4623
|
+
'chassis',
|
|
4624
|
+
'chess',
|
|
4625
|
+
'clothing',
|
|
4626
|
+
'cod',
|
|
4627
|
+
'commerce',
|
|
4628
|
+
'cooperation',
|
|
4629
|
+
'corps',
|
|
4630
|
+
'debris',
|
|
4631
|
+
'diabetes',
|
|
4632
|
+
'digestion',
|
|
4633
|
+
'elk',
|
|
4634
|
+
'energy',
|
|
4635
|
+
'equipment',
|
|
4636
|
+
'excretion',
|
|
4637
|
+
'expertise',
|
|
4638
|
+
'firmware',
|
|
4639
|
+
'flounder',
|
|
4640
|
+
'fun',
|
|
4641
|
+
'gallows',
|
|
4642
|
+
'garbage',
|
|
4643
|
+
'graffiti',
|
|
4644
|
+
'hardware',
|
|
4645
|
+
'headquarters',
|
|
4646
|
+
'health',
|
|
4647
|
+
'herpes',
|
|
4648
|
+
'highjinks',
|
|
4649
|
+
'homework',
|
|
4650
|
+
'housework',
|
|
4651
|
+
'information',
|
|
4652
|
+
'jeans',
|
|
4653
|
+
'justice',
|
|
4654
|
+
'kudos',
|
|
4655
|
+
'labour',
|
|
4656
|
+
'literature',
|
|
4657
|
+
'machinery',
|
|
4658
|
+
'mackerel',
|
|
4659
|
+
'mail',
|
|
4660
|
+
'media',
|
|
4661
|
+
'mews',
|
|
4662
|
+
'moose',
|
|
4663
|
+
'music',
|
|
4664
|
+
'mud',
|
|
4665
|
+
'manga',
|
|
4666
|
+
'news',
|
|
4667
|
+
'only',
|
|
4668
|
+
'personnel',
|
|
4669
|
+
'pike',
|
|
4670
|
+
'plankton',
|
|
4671
|
+
'pliers',
|
|
4672
|
+
'police',
|
|
4673
|
+
'pollution',
|
|
4674
|
+
'premises',
|
|
4675
|
+
'rain',
|
|
4676
|
+
'research',
|
|
4677
|
+
'rice',
|
|
4678
|
+
'salmon',
|
|
4679
|
+
'scissors',
|
|
4680
|
+
'series',
|
|
4681
|
+
'sewage',
|
|
4682
|
+
'shambles',
|
|
4683
|
+
'shrimp',
|
|
4684
|
+
'software',
|
|
4685
|
+
'species',
|
|
4686
|
+
'staff',
|
|
4687
|
+
'swine',
|
|
4688
|
+
'tennis',
|
|
4689
|
+
'traffic',
|
|
4690
|
+
'transportation',
|
|
4691
|
+
'trout',
|
|
4692
|
+
'tuna',
|
|
4693
|
+
'wealth',
|
|
4694
|
+
'welfare',
|
|
4695
|
+
'whiting',
|
|
4696
|
+
'wildebeest',
|
|
4697
|
+
'wildlife',
|
|
4698
|
+
'you',
|
|
4699
|
+
/pok[eé]mon$/i,
|
|
4700
|
+
// Regexes.
|
|
4701
|
+
/[^aeiou]ese$/i, // "chinese", "japanese"
|
|
4702
|
+
/deer$/i, // "deer", "reindeer"
|
|
4703
|
+
/fish$/i, // "fish", "blowfish", "angelfish"
|
|
4704
|
+
/measles$/i,
|
|
4705
|
+
/o[iu]s$/i, // "carnivorous"
|
|
4706
|
+
/pox$/i, // "chickpox", "smallpox"
|
|
4707
|
+
/sheep$/i
|
|
4708
|
+
].forEach(pluralize.addUncountableRule);
|
|
4709
|
+
|
|
4710
|
+
return pluralize;
|
|
4711
|
+
});
|
|
4712
|
+
} (pluralize$1));
|
|
4713
|
+
|
|
4714
|
+
var pluralize = pluralizeExports;
|
|
4715
|
+
|
|
4248
4716
|
var MergeAlert = function MergeAlert(_ref) {
|
|
4249
4717
|
var sourceTag = _ref.sourceTag,
|
|
4250
4718
|
destinationTag = _ref.destinationTag,
|
|
@@ -4261,34 +4729,30 @@ var MergeAlert = function MergeAlert(_ref) {
|
|
|
4261
4729
|
return setShowModal(false);
|
|
4262
4730
|
}
|
|
4263
4731
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Modal.Header, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
4264
|
-
|
|
4265
|
-
|
|
4732
|
+
id: "dialog1Title",
|
|
4733
|
+
style: "h2"
|
|
4266
4734
|
}, t("merge.confirmation.title"))), /*#__PURE__*/React__default["default"].createElement(neetoui.Modal.Body, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
4267
|
-
|
|
4268
|
-
|
|
4735
|
+
lineHeight: "normal",
|
|
4736
|
+
style: "body2"
|
|
4269
4737
|
}, /*#__PURE__*/React__default["default"].createElement(Trans, {
|
|
4270
4738
|
i18nKey: "merge.confirmation.message",
|
|
4271
4739
|
values: {
|
|
4272
4740
|
sourceTag: sourceTag.name,
|
|
4273
4741
|
destinationTag: destinationTag.name,
|
|
4274
|
-
entities: pluralize(
|
|
4275
|
-
singular: tagType.label.toLowerCase()
|
|
4276
|
-
}, PLURAL), {}, {
|
|
4277
|
-
skipCount: true
|
|
4278
|
-
}))
|
|
4742
|
+
entities: pluralize(tagType.label.toLowerCase())
|
|
4279
4743
|
}
|
|
4280
4744
|
}))), /*#__PURE__*/React__default["default"].createElement(neetoui.Modal.Footer, {
|
|
4281
4745
|
className: "space-x-2"
|
|
4282
4746
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
4283
4747
|
"data-cy": "neeto-tags-merge-proceed-button",
|
|
4748
|
+
disabled: isSubmitting,
|
|
4284
4749
|
label: t("proceed"),
|
|
4285
|
-
onClick: handleSubmit,
|
|
4286
4750
|
loading: isSubmitting,
|
|
4287
|
-
|
|
4751
|
+
onClick: handleSubmit
|
|
4288
4752
|
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
4289
4753
|
"data-cy": "neeto-tags-merge-cancel-button",
|
|
4290
|
-
style: "text",
|
|
4291
4754
|
label: t("cancel"),
|
|
4755
|
+
style: "text",
|
|
4292
4756
|
onClick: function onClick() {
|
|
4293
4757
|
return setShowModal(false);
|
|
4294
4758
|
}
|