@bigbinary/neeto-team-members-frontend 2.7.0 → 2.7.2
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 +74 -47
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +75 -47
- package/dist/index.js.map +1 -1
- package/package.json +14 -14
package/dist/index.js
CHANGED
|
@@ -17,14 +17,13 @@ import { useFormikContext } from 'formik';
|
|
|
17
17
|
import * as yup from 'yup';
|
|
18
18
|
import { object, string } from 'yup';
|
|
19
19
|
import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
|
|
20
|
-
import { buildFiltersFromURL,
|
|
20
|
+
import { buildFiltersFromURL, Bar } from '@bigbinary/neeto-filters-frontend';
|
|
21
21
|
import { useHistory } from 'react-router-dom';
|
|
22
22
|
import require$$0 from 'util';
|
|
23
|
-
import Columns from '@bigbinary/neeto-molecules/Columns';
|
|
24
23
|
import classnames from 'classnames';
|
|
25
24
|
import MenuBar from '@bigbinary/neeto-molecules/MenuBar';
|
|
26
25
|
|
|
27
|
-
/*! @license DOMPurify 3.0.
|
|
26
|
+
/*! @license DOMPurify 3.0.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.3/LICENSE */
|
|
28
27
|
|
|
29
28
|
const {
|
|
30
29
|
entries,
|
|
@@ -100,7 +99,9 @@ function unconstruct(func) {
|
|
|
100
99
|
/* Add properties to a lookup table */
|
|
101
100
|
|
|
102
101
|
function addToSet(set, array, transformCaseFunc) {
|
|
103
|
-
|
|
102
|
+
var _transformCaseFunc;
|
|
103
|
+
|
|
104
|
+
transformCaseFunc = (_transformCaseFunc = transformCaseFunc) !== null && _transformCaseFunc !== void 0 ? _transformCaseFunc : stringToLowerCase;
|
|
104
105
|
|
|
105
106
|
if (setPrototypeOf) {
|
|
106
107
|
// Make 'in' and truthy checks like Boolean(set.constructor)
|
|
@@ -174,12 +175,12 @@ function lookupGetter(object, prop) {
|
|
|
174
175
|
const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG
|
|
175
176
|
|
|
176
177
|
const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
|
|
177
|
-
const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.
|
|
178
|
+
const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.
|
|
178
179
|
// We still need to know them so that we can do namespace
|
|
179
180
|
// checks properly in case one wants to add them to
|
|
180
181
|
// allow-list.
|
|
181
182
|
|
|
182
|
-
const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', '
|
|
183
|
+
const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
|
|
183
184
|
const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']); // Similarly to SVG, we want to know all MathML elements,
|
|
184
185
|
// even those that we disallow by default.
|
|
185
186
|
|
|
@@ -224,13 +225,13 @@ const getGlobal = () => typeof window === 'undefined' ? null : window;
|
|
|
224
225
|
* Creates a no-op policy for internal use only.
|
|
225
226
|
* Don't export this function outside this module!
|
|
226
227
|
* @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.
|
|
227
|
-
* @param {
|
|
228
|
+
* @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
|
|
228
229
|
* @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types
|
|
229
|
-
* are not supported).
|
|
230
|
+
* are not supported or creating the policy failed).
|
|
230
231
|
*/
|
|
231
232
|
|
|
232
233
|
|
|
233
|
-
const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes,
|
|
234
|
+
const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
|
|
234
235
|
if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
|
|
235
236
|
return null;
|
|
236
237
|
} // Allow the callers to control the unique policy name
|
|
@@ -241,8 +242,8 @@ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedType
|
|
|
241
242
|
let suffix = null;
|
|
242
243
|
const ATTR_NAME = 'data-tt-policy-suffix';
|
|
243
244
|
|
|
244
|
-
if (
|
|
245
|
-
suffix =
|
|
245
|
+
if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
|
|
246
|
+
suffix = purifyHostElement.getAttribute(ATTR_NAME);
|
|
246
247
|
}
|
|
247
248
|
|
|
248
249
|
const policyName = 'dompurify' + (suffix ? '#' + suffix : '');
|
|
@@ -277,7 +278,7 @@ function createDOMPurify() {
|
|
|
277
278
|
*/
|
|
278
279
|
|
|
279
280
|
|
|
280
|
-
DOMPurify.version = '3.0.
|
|
281
|
+
DOMPurify.version = '3.0.3';
|
|
281
282
|
/**
|
|
282
283
|
* Array of elements that DOMPurify removed during sanitation.
|
|
283
284
|
* Empty if nothing was removed.
|
|
@@ -293,6 +294,7 @@ function createDOMPurify() {
|
|
|
293
294
|
}
|
|
294
295
|
|
|
295
296
|
const originalDocument = window.document;
|
|
297
|
+
const currentScript = originalDocument.currentScript;
|
|
296
298
|
let {
|
|
297
299
|
document
|
|
298
300
|
} = window;
|
|
@@ -326,9 +328,8 @@ function createDOMPurify() {
|
|
|
326
328
|
}
|
|
327
329
|
}
|
|
328
330
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
const emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';
|
|
331
|
+
let trustedTypesPolicy;
|
|
332
|
+
let emptyHTML = '';
|
|
332
333
|
const {
|
|
333
334
|
implementation,
|
|
334
335
|
createNodeIterator,
|
|
@@ -343,7 +344,7 @@ function createDOMPurify() {
|
|
|
343
344
|
* Expose whether this browser supports running the full DOMPurify.
|
|
344
345
|
*/
|
|
345
346
|
|
|
346
|
-
DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation &&
|
|
347
|
+
DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
|
|
347
348
|
const {
|
|
348
349
|
MUSTACHE_EXPR,
|
|
349
350
|
ERB_EXPR,
|
|
@@ -690,6 +691,31 @@ function createDOMPurify() {
|
|
|
690
691
|
if (ALLOWED_TAGS.table) {
|
|
691
692
|
addToSet(ALLOWED_TAGS, ['tbody']);
|
|
692
693
|
delete FORBID_TAGS.tbody;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
if (cfg.TRUSTED_TYPES_POLICY) {
|
|
697
|
+
if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
|
|
698
|
+
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
|
|
702
|
+
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
703
|
+
} // Overwrite existing TrustedTypes policy.
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY; // Sign local variables required by `sanitize`.
|
|
707
|
+
|
|
708
|
+
emptyHTML = trustedTypesPolicy.createHTML('');
|
|
709
|
+
} else {
|
|
710
|
+
// Uninitialized policy, attempt to initialize the internal dompurify policy.
|
|
711
|
+
if (trustedTypesPolicy === undefined) {
|
|
712
|
+
trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
|
|
713
|
+
} // If creating the internal policy succeeded sign internal variables.
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
|
|
717
|
+
emptyHTML = trustedTypesPolicy.createHTML('');
|
|
718
|
+
}
|
|
693
719
|
} // Prevent further manipulation of configuration.
|
|
694
720
|
// Not available in IE8, Safari 5, etc.
|
|
695
721
|
|
|
@@ -1126,9 +1152,9 @@ function createDOMPurify() {
|
|
|
1126
1152
|
}
|
|
1127
1153
|
/* Check value is safe. First, is attr inert? If so, is safe */
|
|
1128
1154
|
|
|
1129
|
-
} else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (
|
|
1155
|
+
} else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {
|
|
1130
1156
|
return false;
|
|
1131
|
-
}
|
|
1157
|
+
} else ;
|
|
1132
1158
|
|
|
1133
1159
|
return true;
|
|
1134
1160
|
};
|
|
@@ -1258,12 +1284,16 @@ function createDOMPurify() {
|
|
|
1258
1284
|
if (namespaceURI) ; else {
|
|
1259
1285
|
switch (trustedTypes.getAttributeType(lcTag, lcName)) {
|
|
1260
1286
|
case 'TrustedHTML':
|
|
1261
|
-
|
|
1262
|
-
|
|
1287
|
+
{
|
|
1288
|
+
value = trustedTypesPolicy.createHTML(value);
|
|
1289
|
+
break;
|
|
1290
|
+
}
|
|
1263
1291
|
|
|
1264
1292
|
case 'TrustedScriptURL':
|
|
1265
|
-
|
|
1266
|
-
|
|
1293
|
+
{
|
|
1294
|
+
value = trustedTypesPolicy.createScriptURL(value);
|
|
1295
|
+
break;
|
|
1296
|
+
}
|
|
1267
1297
|
}
|
|
1268
1298
|
}
|
|
1269
1299
|
}
|
|
@@ -1356,15 +1386,14 @@ function createDOMPurify() {
|
|
|
1356
1386
|
|
|
1357
1387
|
|
|
1358
1388
|
if (typeof dirty !== 'string' && !_isNode(dirty)) {
|
|
1359
|
-
|
|
1360
|
-
if (typeof dirty.toString !== 'function') {
|
|
1361
|
-
throw typeErrorCreate('toString is not a function');
|
|
1362
|
-
} else {
|
|
1389
|
+
if (typeof dirty.toString === 'function') {
|
|
1363
1390
|
dirty = dirty.toString();
|
|
1364
1391
|
|
|
1365
1392
|
if (typeof dirty !== 'string') {
|
|
1366
1393
|
throw typeErrorCreate('dirty is not a string, aborting');
|
|
1367
1394
|
}
|
|
1395
|
+
} else {
|
|
1396
|
+
throw typeErrorCreate('toString is not a function');
|
|
1368
1397
|
}
|
|
1369
1398
|
}
|
|
1370
1399
|
/* Return dirty HTML if DOMPurify cannot run */
|
|
@@ -5335,8 +5364,6 @@ var common$1 = {
|
|
|
5335
5364
|
addNew_: "Add new {{what}}",
|
|
5336
5365
|
all: "All",
|
|
5337
5366
|
all_: "All {{what}}",
|
|
5338
|
-
column_one: "Column",
|
|
5339
|
-
column_other: "Columns",
|
|
5340
5367
|
deactivate: "Deactivate",
|
|
5341
5368
|
deactivate_: "Deactivate {{what}}",
|
|
5342
5369
|
deactivated: "Deactivated",
|
|
@@ -9379,6 +9406,7 @@ var getDefaultColumns = function getDefaultColumns(_ref5) {
|
|
|
9379
9406
|
permissions = _ref5.permissions;
|
|
9380
9407
|
return [{
|
|
9381
9408
|
dataIndex: "name",
|
|
9409
|
+
fixed: "left",
|
|
9382
9410
|
key: "name",
|
|
9383
9411
|
render: function render(_, tableData) {
|
|
9384
9412
|
return renderNameColumn({
|
|
@@ -10100,9 +10128,6 @@ var useTeams = function useTeams(_ref) {
|
|
|
10100
10128
|
};
|
|
10101
10129
|
|
|
10102
10130
|
var FIXED_COLUMNS = ["name", "actions"];
|
|
10103
|
-
var COLUMNS_DROPDOWN_PROPS = {
|
|
10104
|
-
label: instance.t("common.column", PLURAL)
|
|
10105
|
-
};
|
|
10106
10131
|
var COLUMNS_SEARCH_PROPS = {
|
|
10107
10132
|
placeholder: instance.t("columns.search")
|
|
10108
10133
|
};
|
|
@@ -10355,20 +10380,22 @@ var Right = function Right(_ref2) {
|
|
|
10355
10380
|
isFiltersPaneOpen = _ref2.isFiltersPaneOpen;
|
|
10356
10381
|
var _useTranslation2 = useTranslation(),
|
|
10357
10382
|
t = _useTranslation2.t;
|
|
10358
|
-
return /*#__PURE__*/React.createElement(
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10383
|
+
return /*#__PURE__*/React.createElement(SubHeader$2.RightBlock, {
|
|
10384
|
+
columnsButtonProps: {
|
|
10385
|
+
columnData: columns,
|
|
10386
|
+
fixedColumns: FIXED_COLUMNS,
|
|
10387
|
+
localStorageKey: "TEAM_MEMBERS_TABLE_HIDDEN_COLUMNS",
|
|
10388
|
+
noColumnMessage: t("columns.noColumnsFound"),
|
|
10389
|
+
searchProps: COLUMNS_SEARCH_PROPS,
|
|
10390
|
+
onChange: setColumnData
|
|
10391
|
+
},
|
|
10392
|
+
filterProps: {
|
|
10393
|
+
columns: filterColumns,
|
|
10394
|
+
isOpen: isFiltersPaneOpen,
|
|
10395
|
+
setIsOpen: setIsFiltersPaneOpen,
|
|
10396
|
+
onChange: handleNeetoFilterChange
|
|
10397
|
+
}
|
|
10398
|
+
});
|
|
10372
10399
|
};
|
|
10373
10400
|
var SubHeader = {
|
|
10374
10401
|
Left: Left,
|
|
@@ -10394,7 +10421,7 @@ var AppList = function AppList(_ref) {
|
|
|
10394
10421
|
var selectedEmail = pluck("value", emails);
|
|
10395
10422
|
useEffect(function () {
|
|
10396
10423
|
if (savedStateRef.current.isAppListEnabled !== isAppListEnabled) {
|
|
10397
|
-
appRoles.forEach(function (appRole, index) {
|
|
10424
|
+
appRoles === null || appRoles === void 0 ? void 0 : appRoles.forEach(function (appRole, index) {
|
|
10398
10425
|
var _globalProps$appName;
|
|
10399
10426
|
if ((appRole === null || appRole === void 0 ? void 0 : appRole.appName) === ((_globalProps$appName = globalProps.appName) === null || _globalProps$appName === void 0 ? void 0 : _globalProps$appName.substring(5))) {
|
|
10400
10427
|
setFieldValue("appRoles[".concat(index, "].isEnabled"), true);
|
|
@@ -10792,8 +10819,9 @@ var RolesRadioGroup = function RolesRadioGroup(_ref) {
|
|
|
10792
10819
|
values = _useFormikContext.values,
|
|
10793
10820
|
setFieldValue = _useFormikContext.setFieldValue;
|
|
10794
10821
|
var setDefaultSelection = function setDefaultSelection(currentRole) {
|
|
10822
|
+
var _values$appRoles;
|
|
10795
10823
|
var condition = isAdminRole(currentRole);
|
|
10796
|
-
values.appRoles.forEach(function (_ref2, index) {
|
|
10824
|
+
(_values$appRoles = values.appRoles) === null || _values$appRoles === void 0 ? void 0 : _values$appRoles.forEach(function (_ref2, index) {
|
|
10797
10825
|
var _globalProps$appName;
|
|
10798
10826
|
var appName = _ref2.appName,
|
|
10799
10827
|
activeRole = _ref2.activeRole;
|