@bigbinary/neeto-approvals-frontend 0.2.5 → 0.2.6

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.js CHANGED
@@ -6,29 +6,30 @@ import { DEFAULT_PAGE_INDEX, SINGULAR, PLURAL } from '@bigbinary/neeto-commons-f
6
6
  import { Pane, Typography, Button, Dropdown, NoData, Table as Table$1, Alert, Tag, Label, Textarea, Tab as Tab$1, Select as Select$1, Callout } from '@bigbinary/neetoui';
7
7
  import { useDebounce } from '@bigbinary/neeto-commons-frontend/react-utils';
8
8
  import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
9
- import { isEmpty, fromPairs, assoc, keys, modify } from 'ramda';
9
+ import { isEmpty, curryN, isNil, complement, either, curry, fromPairs, assoc, keys, modify } from 'ramda';
10
10
  import axios from 'axios';
11
11
  import { useQuery, useQueryClient, useMutation } from 'react-query';
12
12
  import { Form as Form$3, Input, Textarea as Textarea$1, Select } from '@bigbinary/neetoui/formik';
13
13
  import { MenuHorizontal, Delete } from '@bigbinary/neeto-icons';
14
- import { isPresent, findBy, capitalize as capitalize$1, noop as noop$1, camelToSnakeCase, removeBy, findById } from '@bigbinary/neeto-commons-frontend/pure';
14
+ import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
15
15
  import { dateFormat, withEventTargetValue } from '@bigbinary/neeto-commons-frontend/utils';
16
16
  import dayjs from 'dayjs';
17
17
  import timezone from 'dayjs/plugin/timezone';
18
18
  import utc from 'dayjs/plugin/utc';
19
19
  import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
20
20
  import { EditorContent, isEditorEmpty, FormikEditor, substituteVariables } from '@bigbinary/neeto-editor';
21
+ import { removeBy } from '@bigbinary/neeto-commons-frontend/pure';
21
22
  import { useFormikContext, FieldArray } from 'formik';
22
23
  import NeetoHeader from '@bigbinary/neeto-molecules/Header';
23
24
 
24
- function _typeof$3(o) {
25
+ function _typeof$4(o) {
25
26
  "@babel/helpers - typeof";
26
27
 
27
- return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
28
+ return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
28
29
  return typeof o;
29
30
  } : function (o) {
30
31
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
31
- }, _typeof$3(o);
32
+ }, _typeof$4(o);
32
33
  }
33
34
 
34
35
  function _classCallCheck$2(instance, Constructor) {
@@ -38,11 +39,11 @@ function _classCallCheck$2(instance, Constructor) {
38
39
  }
39
40
 
40
41
  function _toPrimitive$3(input, hint) {
41
- if (_typeof$3(input) !== "object" || input === null) return input;
42
+ if (_typeof$4(input) !== "object" || input === null) return input;
42
43
  var prim = input[Symbol.toPrimitive];
43
44
  if (prim !== undefined) {
44
45
  var res = prim.call(input, hint || "default");
45
- if (_typeof$3(res) !== "object") return res;
46
+ if (_typeof$4(res) !== "object") return res;
46
47
  throw new TypeError("@@toPrimitive must return a primitive value.");
47
48
  }
48
49
  return (hint === "string" ? String : Number)(input);
@@ -50,7 +51,7 @@ function _toPrimitive$3(input, hint) {
50
51
 
51
52
  function _toPropertyKey$3(arg) {
52
53
  var key = _toPrimitive$3(arg, "string");
53
- return _typeof$3(key) === "symbol" ? key : String(key);
54
+ return _typeof$4(key) === "symbol" ? key : String(key);
54
55
  }
55
56
 
56
57
  function _defineProperties$2(target, props) {
@@ -104,7 +105,7 @@ function _inherits(subClass, superClass) {
104
105
  }
105
106
 
106
107
  function _possibleConstructorReturn(self, call) {
107
- if (call && (_typeof$3(call) === "object" || typeof call === "function")) {
108
+ if (call && (_typeof$4(call) === "object" || typeof call === "function")) {
108
109
  return call;
109
110
  } else if (call !== void 0) {
110
111
  throw new TypeError("Derived constructors may only return object or undefined");
@@ -134,7 +135,7 @@ function _defineProperty$2(obj, key, value) {
134
135
  return obj;
135
136
  }
136
137
 
137
- function _arrayWithHoles$2(arr) {
138
+ function _arrayWithHoles$3(arr) {
138
139
  if (Array.isArray(arr)) return arr;
139
140
  }
140
141
 
@@ -142,27 +143,27 @@ function _iterableToArray$1(iter) {
142
143
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
143
144
  }
144
145
 
145
- function _arrayLikeToArray$2(arr, len) {
146
+ function _arrayLikeToArray$3(arr, len) {
146
147
  if (len == null || len > arr.length) len = arr.length;
147
148
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
148
149
  return arr2;
149
150
  }
150
151
 
151
- function _unsupportedIterableToArray$2(o, minLen) {
152
+ function _unsupportedIterableToArray$3(o, minLen) {
152
153
  if (!o) return;
153
- if (typeof o === "string") return _arrayLikeToArray$2(o, minLen);
154
+ if (typeof o === "string") return _arrayLikeToArray$3(o, minLen);
154
155
  var n = Object.prototype.toString.call(o).slice(8, -1);
155
156
  if (n === "Object" && o.constructor) n = o.constructor.name;
156
157
  if (n === "Map" || n === "Set") return Array.from(o);
157
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen);
158
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$3(o, minLen);
158
159
  }
159
160
 
160
- function _nonIterableRest$2() {
161
+ function _nonIterableRest$3() {
161
162
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
162
163
  }
163
164
 
164
165
  function _toArray(arr) {
165
- return _arrayWithHoles$2(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$2(arr) || _nonIterableRest$2();
166
+ return _arrayWithHoles$3(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$3(arr) || _nonIterableRest$3();
166
167
  }
167
168
 
168
169
  function ownKeys$6$1(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; }
@@ -716,10 +717,10 @@ var Translator = function (_EventEmitter) {
716
717
  key: "translate",
717
718
  value: function translate(keys, options, lastKey) {
718
719
  var _this2 = this;
719
- if (_typeof$3(options) !== 'object' && this.options.overloadTranslationOptionHandler) {
720
+ if (_typeof$4(options) !== 'object' && this.options.overloadTranslationOptionHandler) {
720
721
  options = this.options.overloadTranslationOptionHandler(arguments);
721
722
  }
722
- if (_typeof$3(options) === 'object') options = _objectSpread$4$1({}, options);
723
+ if (_typeof$4(options) === 'object') options = _objectSpread$4$1({}, options);
723
724
  if (!options) options = {};
724
725
  if (keys === undefined || keys === null) return '';
725
726
  if (!Array.isArray(keys)) keys = [String(keys)];
@@ -1021,7 +1022,7 @@ var Translator = function (_EventEmitter) {
1021
1022
  return Translator;
1022
1023
  }(EventEmitter);
1023
1024
 
1024
- function capitalize(string) {
1025
+ function capitalize$1(string) {
1025
1026
  return string.charAt(0).toUpperCase() + string.slice(1);
1026
1027
  }
1027
1028
  var LanguageUtil = function () {
@@ -1061,13 +1062,13 @@ var LanguageUtil = function () {
1061
1062
  } else if (p.length === 2) {
1062
1063
  p[0] = p[0].toLowerCase();
1063
1064
  p[1] = p[1].toUpperCase();
1064
- if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
1065
+ if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize$1(p[1].toLowerCase());
1065
1066
  } else if (p.length === 3) {
1066
1067
  p[0] = p[0].toLowerCase();
1067
1068
  if (p[1].length === 2) p[1] = p[1].toUpperCase();
1068
1069
  if (p[0] !== 'sgn' && p[2].length === 2) p[2] = p[2].toUpperCase();
1069
- if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
1070
- if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase());
1070
+ if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize$1(p[1].toLowerCase());
1071
+ if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize$1(p[2].toLowerCase());
1071
1072
  }
1072
1073
  return p.join('-');
1073
1074
  }
@@ -2097,10 +2098,10 @@ function get() {
2097
2098
  appendNamespaceToCIMode: false,
2098
2099
  overloadTranslationOptionHandler: function handle(args) {
2099
2100
  var ret = {};
2100
- if (_typeof$3(args[1]) === 'object') ret = args[1];
2101
+ if (_typeof$4(args[1]) === 'object') ret = args[1];
2101
2102
  if (typeof args[1] === 'string') ret.defaultValue = args[1];
2102
2103
  if (typeof args[2] === 'string') ret.tDescription = args[2];
2103
- if (_typeof$3(args[2]) === 'object' || _typeof$3(args[3]) === 'object') {
2104
+ if (_typeof$4(args[2]) === 'object' || _typeof$4(args[3]) === 'object') {
2104
2105
  var options = args[3] || args[2];
2105
2106
  Object.keys(options).forEach(function (key) {
2106
2107
  ret[key] = options[key];
@@ -2139,7 +2140,7 @@ function ownKeys$g(object, enumerableOnly) { var keys = Object.keys(object); if
2139
2140
  function _objectSpread$g(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$g(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$g(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2140
2141
  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); }; }
2141
2142
  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; } }
2142
- function noop() {}
2143
+ function noop$1() {}
2143
2144
  function bindMemberFunctions(inst) {
2144
2145
  var mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));
2145
2146
  mems.forEach(function (mem) {
@@ -2270,7 +2271,7 @@ var I18n = function (_EventEmitter) {
2270
2271
  });
2271
2272
  }
2272
2273
  this.format = this.options.interpolation.format;
2273
- if (!callback) callback = noop;
2274
+ if (!callback) callback = noop$1;
2274
2275
  if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
2275
2276
  var codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
2276
2277
  if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];
@@ -2317,7 +2318,7 @@ var I18n = function (_EventEmitter) {
2317
2318
  key: "loadResources",
2318
2319
  value: function loadResources(language) {
2319
2320
  var _this3 = this;
2320
- var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
2321
+ var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop$1;
2321
2322
  var usedCallback = callback;
2322
2323
  var usedLng = typeof language === 'string' ? language : this.language;
2323
2324
  if (typeof language === 'function') usedCallback = language;
@@ -2358,7 +2359,7 @@ var I18n = function (_EventEmitter) {
2358
2359
  var deferred = defer();
2359
2360
  if (!lngs) lngs = this.languages;
2360
2361
  if (!ns) ns = this.options.ns;
2361
- if (!callback) callback = noop;
2362
+ if (!callback) callback = noop$1;
2362
2363
  this.services.backendConnector.reload(lngs, ns, function (err) {
2363
2364
  deferred.resolve();
2364
2365
  callback(err);
@@ -2470,7 +2471,7 @@ var I18n = function (_EventEmitter) {
2470
2471
  var _this5 = this;
2471
2472
  var fixedT = function fixedT(key, opts) {
2472
2473
  var options;
2473
- if (_typeof$3(opts) !== 'object') {
2474
+ if (_typeof$4(opts) !== 'object') {
2474
2475
  for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
2475
2476
  rest[_key3 - 2] = arguments[_key3];
2476
2477
  }
@@ -2602,7 +2603,7 @@ var I18n = function (_EventEmitter) {
2602
2603
  value: function cloneInstance() {
2603
2604
  var _this8 = this;
2604
2605
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2605
- var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
2606
+ var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop$1;
2606
2607
  var mergedOptions = _objectSpread$g(_objectSpread$g(_objectSpread$g({}, this.options), options), {
2607
2608
  isClone: true
2608
2609
  });
@@ -2675,22 +2676,22 @@ function _classCallCheck$1(instance, Constructor) {
2675
2676
  }
2676
2677
  }
2677
2678
 
2678
- function _typeof$2(obj) {
2679
+ function _typeof$3(obj) {
2679
2680
  "@babel/helpers - typeof";
2680
2681
 
2681
- return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
2682
+ return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
2682
2683
  return typeof obj;
2683
2684
  } : function (obj) {
2684
2685
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2685
- }, _typeof$2(obj);
2686
+ }, _typeof$3(obj);
2686
2687
  }
2687
2688
 
2688
2689
  function _toPrimitive$2(input, hint) {
2689
- if (_typeof$2(input) !== "object" || input === null) return input;
2690
+ if (_typeof$3(input) !== "object" || input === null) return input;
2690
2691
  var prim = input[Symbol.toPrimitive];
2691
2692
  if (prim !== undefined) {
2692
2693
  var res = prim.call(input, hint || "default");
2693
- if (_typeof$2(res) !== "object") return res;
2694
+ if (_typeof$3(res) !== "object") return res;
2694
2695
  throw new TypeError("@@toPrimitive must return a primitive value.");
2695
2696
  }
2696
2697
  return (hint === "string" ? String : Number)(input);
@@ -2698,7 +2699,7 @@ function _toPrimitive$2(input, hint) {
2698
2699
 
2699
2700
  function _toPropertyKey$2(arg) {
2700
2701
  var key = _toPrimitive$2(arg, "string");
2701
- return _typeof$2(key) === "symbol" ? key : String(key);
2702
+ return _typeof$3(key) === "symbol" ? key : String(key);
2702
2703
  }
2703
2704
 
2704
2705
  function _defineProperties$1(target, props) {
@@ -3097,22 +3098,22 @@ function _objectWithoutProperties$1(source, excluded) {
3097
3098
  return target;
3098
3099
  }
3099
3100
 
3100
- function _typeof$1(obj) {
3101
+ function _typeof$2(obj) {
3101
3102
  "@babel/helpers - typeof";
3102
3103
 
3103
- return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
3104
+ return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
3104
3105
  return typeof obj;
3105
3106
  } : function (obj) {
3106
3107
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
3107
- }, _typeof$1(obj);
3108
+ }, _typeof$2(obj);
3108
3109
  }
3109
3110
 
3110
3111
  function _toPrimitive$1(input, hint) {
3111
- if (_typeof$1(input) !== "object" || input === null) return input;
3112
+ if (_typeof$2(input) !== "object" || input === null) return input;
3112
3113
  var prim = input[Symbol.toPrimitive];
3113
3114
  if (prim !== undefined) {
3114
3115
  var res = prim.call(input, hint || "default");
3115
- if (_typeof$1(res) !== "object") return res;
3116
+ if (_typeof$2(res) !== "object") return res;
3116
3117
  throw new TypeError("@@toPrimitive must return a primitive value.");
3117
3118
  }
3118
3119
  return (hint === "string" ? String : Number)(input);
@@ -3120,7 +3121,7 @@ function _toPrimitive$1(input, hint) {
3120
3121
 
3121
3122
  function _toPropertyKey$1(arg) {
3122
3123
  var key = _toPrimitive$1(arg, "string");
3123
- return _typeof$1(key) === "symbol" ? key : String(key);
3124
+ return _typeof$2(key) === "symbol" ? key : String(key);
3124
3125
  }
3125
3126
 
3126
3127
  function _defineProperty$1(obj, key, value) {
@@ -3434,7 +3435,7 @@ function nodesToString(children, i18nOptions) {
3434
3435
  }
3435
3436
  } else if (child === null) {
3436
3437
  warn("Trans: the passed in value is invalid - seems you passed in a null child.");
3437
- } else if (_typeof$1(child) === 'object') {
3438
+ } else if (_typeof$2(child) === 'object') {
3438
3439
  var format = child.format,
3439
3440
  clone = _objectWithoutProperties$1(child, _excluded$2);
3440
3441
 
@@ -3464,7 +3465,7 @@ function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, s
3464
3465
  var childrenArray = getAsArray(childs);
3465
3466
  childrenArray.forEach(function (child) {
3466
3467
  if (typeof child === 'string') return;
3467
- if (hasChildren(child)) getData(getChildren(child));else if (_typeof$1(child) === 'object' && !React.isValidElement(child)) Object.assign(data, child);
3468
+ if (hasChildren(child)) getData(getChildren(child));else if (_typeof$2(child) === 'object' && !React.isValidElement(child)) Object.assign(data, child);
3468
3469
  });
3469
3470
  }
3470
3471
 
@@ -3501,8 +3502,8 @@ function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, s
3501
3502
  }, tmp) : tmp;
3502
3503
  var isElement = React.isValidElement(child);
3503
3504
  var isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;
3504
- var isEmptyTransWithHTML = emptyChildrenButNeedsHandling && _typeof$1(child) === 'object' && child.dummy && !isElement;
3505
- var isKnownComponent = _typeof$1(children) === 'object' && children !== null && Object.hasOwnProperty.call(children, node.name);
3505
+ var isEmptyTransWithHTML = emptyChildrenButNeedsHandling && _typeof$2(child) === 'object' && child.dummy && !isElement;
3506
+ var isKnownComponent = _typeof$2(children) === 'object' && children !== null && Object.hasOwnProperty.call(children, node.name);
3506
3507
 
3507
3508
  if (typeof child === 'string') {
3508
3509
  var value = i18n.services.interpolator.interpolate(child, opts, i18n.language);
@@ -3540,7 +3541,7 @@ function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, s
3540
3541
 
3541
3542
  mem.push("<".concat(node.name, ">").concat(_inner4, "</").concat(node.name, ">"));
3542
3543
  }
3543
- } else if (_typeof$1(child) === 'object' && !isElement) {
3544
+ } else if (_typeof$2(child) === 'object' && !isElement) {
3544
3545
  var content = node.children[0] ? translationContent : null;
3545
3546
  if (content) mem.push(content);
3546
3547
  } else if (node.children.length === 1 && translationContent) {
@@ -3638,11 +3639,11 @@ function Trans(_ref) {
3638
3639
  return useAsParent ? React.createElement(useAsParent, additionalProps, content) : content;
3639
3640
  }
3640
3641
 
3641
- function _arrayWithHoles$1(arr) {
3642
+ function _arrayWithHoles$2(arr) {
3642
3643
  if (Array.isArray(arr)) return arr;
3643
3644
  }
3644
3645
 
3645
- function _iterableToArrayLimit$1(arr, i) {
3646
+ function _iterableToArrayLimit$2(arr, i) {
3646
3647
  var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
3647
3648
  if (null != _i) {
3648
3649
  var _s,
@@ -3670,27 +3671,27 @@ function _iterableToArrayLimit$1(arr, i) {
3670
3671
  }
3671
3672
  }
3672
3673
 
3673
- function _arrayLikeToArray$1(arr, len) {
3674
+ function _arrayLikeToArray$2(arr, len) {
3674
3675
  if (len == null || len > arr.length) len = arr.length;
3675
3676
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
3676
3677
  return arr2;
3677
3678
  }
3678
3679
 
3679
- function _unsupportedIterableToArray$1(o, minLen) {
3680
+ function _unsupportedIterableToArray$2(o, minLen) {
3680
3681
  if (!o) return;
3681
- if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
3682
+ if (typeof o === "string") return _arrayLikeToArray$2(o, minLen);
3682
3683
  var n = Object.prototype.toString.call(o).slice(8, -1);
3683
3684
  if (n === "Object" && o.constructor) n = o.constructor.name;
3684
3685
  if (n === "Map" || n === "Set") return Array.from(o);
3685
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
3686
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen);
3686
3687
  }
3687
3688
 
3688
- function _nonIterableRest$1() {
3689
+ function _nonIterableRest$2() {
3689
3690
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3690
3691
  }
3691
3692
 
3692
- function _slicedToArray$1(arr, i) {
3693
- return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1();
3693
+ function _slicedToArray$2(arr, i) {
3694
+ return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$2(arr, i) || _nonIterableRest$2();
3694
3695
  }
3695
3696
 
3696
3697
  function ownKeys$d(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; }
@@ -3739,7 +3740,7 @@ function useTranslation(ns) {
3739
3740
  }
3740
3741
 
3741
3742
  var _useState = useState(getT),
3742
- _useState2 = _slicedToArray$1(_useState, 2),
3743
+ _useState2 = _slicedToArray$2(_useState, 2),
3743
3744
  t = _useState2[0],
3744
3745
  setT = _useState2[1];
3745
3746
 
@@ -3792,113 +3793,107 @@ function useTranslation(ns) {
3792
3793
  });
3793
3794
  }
3794
3795
 
3795
- var alerts$1 = {
3796
- deleting_: "You are permanently deleting the {{what}} <strong>{{- name}}</strong>. This can't be undone."
3797
- };
3798
- var buttons$1 = {
3799
- cancel: "Cancel",
3800
- saveChanges: "Save changes",
3801
- approve: "Approve",
3802
- decline: "Decline",
3803
- "delete": "Delete"
3804
- };
3805
- var common$1 = {
3806
- approval_one: "Approval",
3807
- approval_other: "Approvals",
3808
- pending: "Pending",
3809
- template_one: "Template",
3810
- template_other: "Templates",
3811
- approvalTemplate_one: "Approval template",
3812
- approvalTemplate_other: "Approval templates",
3813
- history: "History",
3814
- approvalHistory: "Approval history",
3815
- approver_one: "Approver",
3816
- approver_other: "Approvers",
3817
- email: "Email",
3818
- edit: "Edit",
3819
- "delete": "Delete",
3820
- delete_: "Delete {{what}}?",
3821
- add_: "Add {{what}}",
3822
- edit_: "Edit {{what}}",
3823
- name: "Name",
3824
- notFound_: "There are no {{what}} to show",
3825
- notFound: "Could not find the approval request.",
3826
- visibility: "Visibility",
3827
- variable: "Variable",
3828
- variable_: "Variable {{number}}",
3829
- pendingApproval_one: "Pending approval",
3830
- pendingApproval_other: "Pending approvals",
3831
- title: "Title",
3832
- id: "Id",
3833
- created: "Created",
3834
- status: "Status",
3835
- record_one: "Record",
3836
- record_other: "Records",
3837
- note: "Note",
3838
- approvedBy: "Approved by",
3839
- rejectedBy: "Rejected by",
3840
- cancelledBy: "Cancelled by",
3841
- waitingFor: "Waiting for",
3842
- templateDetails: "Template details",
3843
- field: "Field",
3844
- noDataHelpText: "Here is how you can use <a>{{entity}}.</a>"
3845
- };
3846
- var validations$1 = {
3847
- limitExceeded: "You have exceeded the limit of {{limit}} characters for the {{what}}.",
3848
- approver: "Please select a approver",
3849
- required: "{{what}} is required",
3850
- variableName: "Name must be alphanumeric, may include underscore, must start with a letter and must not end with an underscore.",
3851
- pleaseEnter_: "Please enter {{what}}"
3852
- };
3853
- var sidebar = {
3854
- description: "View and manage approvals."
3855
- };
3856
- var inputs = {
3857
- labels: {
3858
- firstName: "First name",
3859
- lastName: "Last name",
3860
- description: "Description",
3861
- approver: "Approver",
3862
- variableMapping: "Variable mapping",
3863
- message: "Message"
3796
+ var neetoApprovals = {
3797
+ alerts: {
3798
+ deleting_: "You are permanently deleting the {{what}} <strong>{{- name}}</strong>. This can't be undone."
3864
3799
  },
3865
- placeholders: {
3866
- firstName: "Enter first name",
3867
- lastName: "Enter last name",
3868
- email: "Enter email",
3869
- name: "Enter name",
3870
- description: "Enter description",
3871
- enter_: "Enter {{what}}",
3872
- search_: "Search {{what}}",
3873
- select_: "Select {{what}}",
3874
- add_: "Add {{what}}"
3875
- }
3876
- };
3877
- var typography = {
3878
- newApprover: "Add new approver",
3879
- editApprover: "Edit approver",
3880
- approvalRequest: "Approval request has been <strong>{{status}}</strong>."
3881
- };
3882
- var select = {
3883
- visibility: {
3884
- everyone: "Everyone"
3800
+ buttons: {
3801
+ cancel: "Cancel",
3802
+ saveChanges: "Save changes",
3803
+ approve: "Approve",
3804
+ decline: "Decline",
3805
+ "delete": "Delete"
3885
3806
  },
3886
- approval: "Select approval"
3887
- };
3888
- var example = {
3889
- settings: "Settings",
3890
- general: "General"
3807
+ common: {
3808
+ approval_one: "Approval",
3809
+ approval_other: "Approvals",
3810
+ pending: "Pending",
3811
+ template_one: "Template",
3812
+ template_other: "Templates",
3813
+ approvalTemplate_one: "Approval template",
3814
+ approvalTemplate_other: "Approval templates",
3815
+ history: "History",
3816
+ approvalHistory: "Approval history",
3817
+ approver_one: "Approver",
3818
+ approver_other: "Approvers",
3819
+ email: "Email",
3820
+ edit: "Edit",
3821
+ "delete": "Delete",
3822
+ delete_: "Delete {{what}}?",
3823
+ add_: "Add {{what}}",
3824
+ edit_: "Edit {{what}}",
3825
+ name: "Name",
3826
+ notFound_: "There are no {{what}} to show",
3827
+ notFound: "Could not find the approval request.",
3828
+ visibility: "Visibility",
3829
+ variable: "Variable",
3830
+ variable_: "Variable {{number}}",
3831
+ pendingApproval_one: "Pending approval",
3832
+ pendingApproval_other: "Pending approvals",
3833
+ title: "Title",
3834
+ id: "Id",
3835
+ created: "Created",
3836
+ status: "Status",
3837
+ record_one: "Record",
3838
+ record_other: "Records",
3839
+ note: "Note",
3840
+ approvedBy: "Approved by",
3841
+ rejectedBy: "Rejected by",
3842
+ cancelledBy: "Cancelled by",
3843
+ waitingFor: "Waiting for",
3844
+ templateDetails: "Template details",
3845
+ field: "Field",
3846
+ noDataHelpText: "Here is how you can use <a>{{entity}}.</a>"
3847
+ },
3848
+ validations: {
3849
+ limitExceeded: "You have exceeded the limit of {{limit}} characters for the {{what}}.",
3850
+ approver: "Please select a approver",
3851
+ required: "{{what}} is required",
3852
+ variableName: "Name must be alphanumeric, may include underscore, must start with a letter and must not end with an underscore.",
3853
+ pleaseEnter_: "Please enter {{what}}"
3854
+ },
3855
+ sidebar: {
3856
+ description: "View and manage approvals."
3857
+ },
3858
+ inputs: {
3859
+ labels: {
3860
+ firstName: "First name",
3861
+ lastName: "Last name",
3862
+ description: "Description",
3863
+ approver: "Approver",
3864
+ variableMapping: "Variable mapping",
3865
+ message: "Message"
3866
+ },
3867
+ placeholders: {
3868
+ firstName: "Enter first name",
3869
+ lastName: "Enter last name",
3870
+ email: "Enter email",
3871
+ name: "Enter name",
3872
+ description: "Enter description",
3873
+ enter_: "Enter {{what}}",
3874
+ search_: "Search {{what}}",
3875
+ select_: "Select {{what}}",
3876
+ add_: "Add {{what}}"
3877
+ }
3878
+ },
3879
+ typography: {
3880
+ newApprover: "Add new approver",
3881
+ editApprover: "Edit approver",
3882
+ approvalRequest: "Approval request has been <strong>{{status}}</strong>."
3883
+ },
3884
+ select: {
3885
+ visibility: {
3886
+ everyone: "Everyone"
3887
+ },
3888
+ approval: "Select approval"
3889
+ },
3890
+ example: {
3891
+ settings: "Settings",
3892
+ general: "General"
3893
+ }
3891
3894
  };
3892
3895
  var en = {
3893
- alerts: alerts$1,
3894
- buttons: buttons$1,
3895
- common: common$1,
3896
- validations: validations$1,
3897
- sidebar: sidebar,
3898
- inputs: inputs,
3899
- typography: typography,
3900
- select: select,
3901
- example: example
3896
+ neetoApprovals: neetoApprovals
3902
3897
  };
3903
3898
 
3904
3899
  var alerts = {
@@ -4013,22 +4008,22 @@ instance.use(Browser).use(initReactI18next).init({
4013
4008
  }
4014
4009
  });
4015
4010
 
4016
- function _typeof(obj) {
4011
+ function _typeof$1(obj) {
4017
4012
  "@babel/helpers - typeof";
4018
4013
 
4019
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
4014
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
4020
4015
  return typeof obj;
4021
4016
  } : function (obj) {
4022
4017
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
4023
- }, _typeof(obj);
4018
+ }, _typeof$1(obj);
4024
4019
  }
4025
4020
 
4026
4021
  function _toPrimitive(input, hint) {
4027
- if (_typeof(input) !== "object" || input === null) return input;
4022
+ if (_typeof$1(input) !== "object" || input === null) return input;
4028
4023
  var prim = input[Symbol.toPrimitive];
4029
4024
  if (prim !== undefined) {
4030
4025
  var res = prim.call(input, hint || "default");
4031
- if (_typeof(res) !== "object") return res;
4026
+ if (_typeof$1(res) !== "object") return res;
4032
4027
  throw new TypeError("@@toPrimitive must return a primitive value.");
4033
4028
  }
4034
4029
  return (hint === "string" ? String : Number)(input);
@@ -4036,7 +4031,7 @@ function _toPrimitive(input, hint) {
4036
4031
 
4037
4032
  function _toPropertyKey(arg) {
4038
4033
  var key = _toPrimitive(arg, "string");
4039
- return _typeof(key) === "symbol" ? key : String(key);
4034
+ return _typeof$1(key) === "symbol" ? key : String(key);
4040
4035
  }
4041
4036
 
4042
4037
  function _defineProperty(obj, key, value) {
@@ -4054,11 +4049,11 @@ function _defineProperty(obj, key, value) {
4054
4049
  return obj;
4055
4050
  }
4056
4051
 
4057
- function _arrayWithHoles(arr) {
4052
+ function _arrayWithHoles$1(arr) {
4058
4053
  if (Array.isArray(arr)) return arr;
4059
4054
  }
4060
4055
 
4061
- function _iterableToArrayLimit(arr, i) {
4056
+ function _iterableToArrayLimit$1(arr, i) {
4062
4057
  var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
4063
4058
  if (null != _i) {
4064
4059
  var _s,
@@ -4086,27 +4081,27 @@ function _iterableToArrayLimit(arr, i) {
4086
4081
  }
4087
4082
  }
4088
4083
 
4089
- function _arrayLikeToArray(arr, len) {
4084
+ function _arrayLikeToArray$1(arr, len) {
4090
4085
  if (len == null || len > arr.length) len = arr.length;
4091
4086
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
4092
4087
  return arr2;
4093
4088
  }
4094
4089
 
4095
- function _unsupportedIterableToArray(o, minLen) {
4090
+ function _unsupportedIterableToArray$1(o, minLen) {
4096
4091
  if (!o) return;
4097
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
4092
+ if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
4098
4093
  var n = Object.prototype.toString.call(o).slice(8, -1);
4099
4094
  if (n === "Object" && o.constructor) n = o.constructor.name;
4100
4095
  if (n === "Map" || n === "Set") return Array.from(o);
4101
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
4096
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
4102
4097
  }
4103
4098
 
4104
- function _nonIterableRest() {
4099
+ function _nonIterableRest$1() {
4105
4100
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4106
4101
  }
4107
4102
 
4108
- function _slicedToArray(arr, i) {
4109
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
4103
+ function _slicedToArray$1(arr, i) {
4104
+ return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1();
4110
4105
  }
4111
4106
 
4112
4107
  var BASE_URL = "neeto_approvals";
@@ -4151,15 +4146,15 @@ var APPROVAL_REQUEST_FORM_INITIAL_VALUES = {
4151
4146
  };
4152
4147
  var APPROVAL_REQUEST_FORM_VALIDATION_SCHEMA = yup.object().shape({
4153
4148
  variables: yup.array().of(yup.object().shape({
4154
- variable: yup.string().trim().required(t$2("validations.required", {
4155
- what: t$2("common.field")
4149
+ variable: yup.string().trim().required(t$2("neetoApprovals.validations.required", {
4150
+ what: t$2("neetoApprovals.common.field")
4156
4151
  }))
4157
4152
  }))
4158
4153
  });
4159
4154
  var STATUS_UPDATED_BY = {
4160
- rejected: t$2("common.rejectedBy"),
4161
- approved: t$2("common.approvedBy"),
4162
- cancelled: t$2("common.cancelledBy")
4155
+ rejected: t$2("neetoApprovals.common.rejectedBy"),
4156
+ approved: t$2("neetoApprovals.common.approvedBy"),
4157
+ cancelled: t$2("neetoApprovals.common.cancelledBy")
4163
4158
  };
4164
4159
 
4165
4160
  var handleEmptyPage = function handleEmptyPage(data, pageProperties, handleTablePagination) {
@@ -4268,7 +4263,7 @@ var usePaginate = function usePaginate() {
4268
4263
  index: Number(urlParams.get("page")) || DEFAULT_PAGE_INDEX,
4269
4264
  size: Number(urlParams.get("size")) || DEFAULT_PAGE_SIZE
4270
4265
  }),
4271
- _useState2 = _slicedToArray(_useState, 2),
4266
+ _useState2 = _slicedToArray$1(_useState, 2),
4272
4267
  pageProperties = _useState2[0],
4273
4268
  setPageProperties = _useState2[1];
4274
4269
  var history = useHistory();
@@ -4305,20 +4300,20 @@ var APPROVER_FORM_INITIAL_VALUES = {
4305
4300
  email: ""
4306
4301
  };
4307
4302
  var APPROVER_FORM_VALIDATION_SCHEMA = yup.object().shape({
4308
- firstName: yup.string().trim().max(MAX_NAME_LENGTH, t$2("validations.limitExceeded", {
4309
- what: (_t$1 = t$2("inputs.labels.firstName")) === null || _t$1 === void 0 ? void 0 : _t$1.toLocaleLowerCase(),
4303
+ firstName: yup.string().trim().max(MAX_NAME_LENGTH, t$2("neetoApprovals.validations.limitExceeded", {
4304
+ what: (_t$1 = t$2("neetoApprovals.inputs.labels.firstName")) === null || _t$1 === void 0 ? void 0 : _t$1.toLocaleLowerCase(),
4310
4305
  limit: MAX_NAME_LENGTH
4311
- })).required(t$2("validations.required", {
4312
- what: t$2("inputs.labels.firstName")
4306
+ })).required(t$2("neetoApprovals.validations.required", {
4307
+ what: t$2("neetoApprovals.inputs.labels.firstName")
4313
4308
  })),
4314
- lastName: yup.string().trim().max(MAX_NAME_LENGTH, t$2("validations.limitExceeded", {
4315
- what: (_t2 = t$2("inputs.labels.lastName")) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase(),
4309
+ lastName: yup.string().trim().max(MAX_NAME_LENGTH, t$2("neetoApprovals.validations.limitExceeded", {
4310
+ what: (_t2 = t$2("neetoApprovals.inputs.labels.lastName")) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase(),
4316
4311
  limit: MAX_NAME_LENGTH
4317
- })).required(t$2("validations.required", {
4318
- what: t$2("inputs.labels.lastName")
4312
+ })).required(t$2("neetoApprovals.validations.required", {
4313
+ what: t$2("neetoApprovals.inputs.labels.lastName")
4319
4314
  })),
4320
- email: yup.string().email().required(t$2("validations.required", {
4321
- what: t$2("common.email")
4315
+ email: yup.string().email().required(t$2("neetoApprovals.validations.required", {
4316
+ what: t$2("neetoApprovals.common.email")
4322
4317
  }))
4323
4318
  });
4324
4319
 
@@ -4338,7 +4333,7 @@ var Form$2 = function Form(_ref) {
4338
4333
  onClose: onClose
4339
4334
  }, /*#__PURE__*/React.createElement(Pane.Header, null, /*#__PURE__*/React.createElement(Typography, {
4340
4335
  style: "h2"
4341
- }, isEmpty(initialData) ? t("typography.newApprover") : t("typography.editApprover"))), /*#__PURE__*/React.createElement(Form$3, {
4336
+ }, isEmpty(initialData) ? t("neetoApprovals.typography.newApprover") : t("neetoApprovals.typography.editApprover"))), /*#__PURE__*/React.createElement(Form$3, {
4342
4337
  formikProps: {
4343
4338
  initialValues: initialData || APPROVER_FORM_INITIAL_VALUES,
4344
4339
  validationSchema: APPROVER_FORM_VALIDATION_SCHEMA,
@@ -4349,30 +4344,30 @@ var Form$2 = function Form(_ref) {
4349
4344
  }, /*#__PURE__*/React.createElement(Input, {
4350
4345
  required: true,
4351
4346
  className: "w-full",
4352
- label: t("inputs.labels.firstName"),
4347
+ label: t("neetoApprovals.inputs.labels.firstName"),
4353
4348
  name: "firstName",
4354
- placeholder: t("inputs.placeholders.firstName"),
4349
+ placeholder: t("neetoApprovals.inputs.placeholders.firstName"),
4355
4350
  ref: inputReference
4356
4351
  }), /*#__PURE__*/React.createElement(Input, {
4357
4352
  required: true,
4358
4353
  className: "w-full",
4359
- label: t("inputs.labels.lastName"),
4354
+ label: t("neetoApprovals.inputs.labels.lastName"),
4360
4355
  name: "lastName",
4361
- placeholder: t("inputs.placeholders.lastName")
4356
+ placeholder: t("neetoApprovals.inputs.placeholders.lastName")
4362
4357
  }), /*#__PURE__*/React.createElement(Input, {
4363
4358
  required: true,
4364
4359
  className: "w-full",
4365
- label: t("common.email"),
4360
+ label: t("neetoApprovals.common.email"),
4366
4361
  name: "email",
4367
- placeholder: t("inputs.placeholders.email")
4362
+ placeholder: t("neetoApprovals.inputs.placeholders.email")
4368
4363
  }))), /*#__PURE__*/React.createElement(Pane.Footer, {
4369
4364
  className: "flex gap-x-2"
4370
4365
  }, /*#__PURE__*/React.createElement(Button, {
4371
- label: t("buttons.saveChanges"),
4366
+ label: t("neetoApprovals.buttons.saveChanges"),
4372
4367
  loading: isLoading,
4373
4368
  type: "submit"
4374
4369
  }), /*#__PURE__*/React.createElement(Button, {
4375
- label: t("buttons.cancel"),
4370
+ label: t("neetoApprovals.buttons.cancel"),
4376
4371
  style: "text",
4377
4372
  onClick: onClose
4378
4373
  })))));
@@ -4456,12 +4451,12 @@ var columnData$1 = function columnData(_ref) {
4456
4451
  dataIndex: "name",
4457
4452
  key: "name",
4458
4453
  sorter: true,
4459
- title: instance.t("common.name")
4454
+ title: instance.t("neetoApprovals.common.name")
4460
4455
  }, {
4461
4456
  dataIndex: "email",
4462
4457
  key: "email",
4463
4458
  sorter: true,
4464
- title: instance.t("common.email")
4459
+ title: instance.t("neetoApprovals.common.email")
4465
4460
  }, {
4466
4461
  key: "actions",
4467
4462
  ellipsis: true,
@@ -4473,24 +4468,24 @@ var columnData$1 = function columnData(_ref) {
4473
4468
  }
4474
4469
  }, /*#__PURE__*/React.createElement(Dropdown, {
4475
4470
  autoWidth: true,
4471
+ buttonProps: {
4472
+ style: "text"
4473
+ },
4476
4474
  className: "flex-shrink-0",
4477
4475
  icon: MenuHorizontal,
4478
4476
  position: "bottom-end",
4479
- strategy: "fixed",
4480
- buttonProps: {
4481
- style: "text"
4482
- }
4477
+ strategy: "fixed"
4483
4478
  }, /*#__PURE__*/React.createElement(Menu$1, null, /*#__PURE__*/React.createElement(MenuItem$1.Button, {
4484
4479
  "data-cy": "approvers-edit-button",
4485
4480
  onClick: function onClick() {
4486
4481
  return onEditClick(approver);
4487
4482
  }
4488
- }, instance.t("common.edit")), /*#__PURE__*/React.createElement(MenuItem$1.Button, {
4483
+ }, instance.t("neetoApprovals.common.edit")), /*#__PURE__*/React.createElement(MenuItem$1.Button, {
4489
4484
  "data-cy": "approvers-delete-button",
4490
4485
  onClick: function onClick() {
4491
4486
  return onDeleteClick(approver);
4492
4487
  }
4493
- }, instance.t("common.delete")))));
4488
+ }, instance.t("neetoApprovals.common.delete")))));
4494
4489
  }
4495
4490
  }];
4496
4491
  };
@@ -4543,7 +4538,7 @@ var renderNoDataHelpText = function renderNoDataHelpText(_ref) {
4543
4538
  var entity = _ref.entity,
4544
4539
  url = _ref.url;
4545
4540
  return /*#__PURE__*/React.createElement(Trans, {
4546
- i18nKey: "common.noDataHelpText",
4541
+ i18nKey: "neetoApprovals.common.noDataHelpText",
4547
4542
  values: {
4548
4543
  entity: entity
4549
4544
  },
@@ -4592,8 +4587,8 @@ var Table = function Table(_ref) {
4592
4587
  };
4593
4588
  var noDataProps = {
4594
4589
  primaryButtonProps: {
4595
- label: t("common.add_", {
4596
- what: (_t = t("common.template", SINGULAR)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
4590
+ label: t("neetoApprovals.common.add_", {
4591
+ what: (_t = t("neetoApprovals.common.template", SINGULAR)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
4597
4592
  }),
4598
4593
  onClick: function onClick() {
4599
4594
  return setIsPaneOpen(true);
@@ -4608,13 +4603,14 @@ var Table = function Table(_ref) {
4608
4603
  return /*#__PURE__*/React.createElement("div", {
4609
4604
  className: "flex h-full w-full flex-grow items-center justify-center"
4610
4605
  }, /*#__PURE__*/React.createElement(NoData, _extends({
4611
- title: t("common.notFound_", {
4606
+ title: t("neetoApprovals.common.notFound_", {
4612
4607
  what: entity
4613
4608
  })
4614
4609
  }, !filters.search && noDataProps)));
4615
4610
  }
4616
- return /*#__PURE__*/React.createElement("div", {
4617
- className: "neeto-approvals__table-wrapper"
4611
+ return /*#__PURE__*/React.createElement(TableWrapper, {
4612
+ className: "mt-12",
4613
+ hasPagination: totalCount > pageProperties.size
4618
4614
  }, /*#__PURE__*/React.createElement(Table$1, _extends({
4619
4615
  fixedHeight: true,
4620
4616
  columnData: columns,
@@ -4643,11 +4639,11 @@ var Approvers = function Approvers(_ref) {
4643
4639
  helpDocUrl = _ref.helpDocUrl,
4644
4640
  setFilters = _ref.setFilters;
4645
4641
  var _useState = useState(""),
4646
- _useState2 = _slicedToArray(_useState, 2),
4642
+ _useState2 = _slicedToArray$1(_useState, 2),
4647
4643
  approverToEdit = _useState2[0],
4648
4644
  setApproverToEdit = _useState2[1];
4649
4645
  var _useState3 = useState(""),
4650
- _useState4 = _slicedToArray(_useState3, 2),
4646
+ _useState4 = _slicedToArray$1(_useState3, 2),
4651
4647
  approverToDelete = _useState4[0],
4652
4648
  setApproverToDelete = _useState4[1];
4653
4649
  var debouncedSearch = useDebounce(filters.search, SEARCH_DELAY);
@@ -4683,7 +4679,7 @@ var Approvers = function Approvers(_ref) {
4683
4679
  var onDeleteClick = function onDeleteClick(approver) {
4684
4680
  setApproverToDelete(approver);
4685
4681
  };
4686
- var entity = (_t = t("common.approver", PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase();
4682
+ var entity = (_t = t("neetoApprovals.common.approver", PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase();
4687
4683
  var handleDelete = function handleDelete(approverId) {
4688
4684
  deleteApprover({
4689
4685
  approverId: approverId
@@ -4713,16 +4709,16 @@ var Approvers = function Approvers(_ref) {
4713
4709
  }), /*#__PURE__*/React.createElement(Alert, {
4714
4710
  isOpen: !!approverToDelete,
4715
4711
  isSubmitting: isDeleting,
4716
- submitButtonLabel: t("buttons.delete"),
4712
+ submitButtonLabel: t("neetoApprovals.buttons.delete"),
4717
4713
  message: /*#__PURE__*/React.createElement(Trans, {
4718
- i18nKey: "alerts.deleting_",
4714
+ i18nKey: "neetoApprovals.alerts.deleting_",
4719
4715
  values: {
4720
- what: (_t2 = t("common.approver", SINGULAR)) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase(),
4716
+ what: (_t2 = t("neetoApprovals.common.approver", SINGULAR)) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase(),
4721
4717
  name: approverToDelete === null || approverToDelete === void 0 ? void 0 : approverToDelete.name
4722
4718
  }
4723
4719
  }),
4724
- title: t("common.delete_", {
4725
- what: (_t3 = t("common.approver", SINGULAR)) === null || _t3 === void 0 ? void 0 : _t3.toLocaleLowerCase()
4720
+ title: t("neetoApprovals.common.delete_", {
4721
+ what: (_t3 = t("neetoApprovals.common.approver", SINGULAR)) === null || _t3 === void 0 ? void 0 : _t3.toLocaleLowerCase()
4726
4722
  }),
4727
4723
  onClose: function onClose() {
4728
4724
  return setApproverToDelete("");
@@ -4733,6 +4729,136 @@ var Approvers = function Approvers(_ref) {
4733
4729
  }));
4734
4730
  };
4735
4731
 
4732
+ function _arrayWithHoles(arr) {
4733
+ if (Array.isArray(arr)) return arr;
4734
+ }
4735
+
4736
+ function _iterableToArrayLimit(arr, i) {
4737
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
4738
+ if (null != _i) {
4739
+ var _s,
4740
+ _e,
4741
+ _x,
4742
+ _r,
4743
+ _arr = [],
4744
+ _n = !0,
4745
+ _d = !1;
4746
+ try {
4747
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
4748
+ if (Object(_i) !== _i) return;
4749
+ _n = !1;
4750
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
4751
+ } catch (err) {
4752
+ _d = !0, _e = err;
4753
+ } finally {
4754
+ try {
4755
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
4756
+ } finally {
4757
+ if (_d) throw _e;
4758
+ }
4759
+ }
4760
+ return _arr;
4761
+ }
4762
+ }
4763
+
4764
+ function _arrayLikeToArray(arr, len) {
4765
+ if (len == null || len > arr.length) len = arr.length;
4766
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
4767
+ return arr2;
4768
+ }
4769
+
4770
+ function _unsupportedIterableToArray(o, minLen) {
4771
+ if (!o) return;
4772
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
4773
+ var n = Object.prototype.toString.call(o).slice(8, -1);
4774
+ if (n === "Object" && o.constructor) n = o.constructor.name;
4775
+ if (n === "Map" || n === "Set") return Array.from(o);
4776
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
4777
+ }
4778
+
4779
+ function _nonIterableRest() {
4780
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4781
+ }
4782
+
4783
+ function _slicedToArray(arr, i) {
4784
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
4785
+ }
4786
+
4787
+ function _typeof(obj) {
4788
+ "@babel/helpers - typeof";
4789
+
4790
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
4791
+ return typeof obj;
4792
+ } : function (obj) {
4793
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
4794
+ }, _typeof(obj);
4795
+ }
4796
+
4797
+ /**
4798
+ * @template {Function} T
4799
+ * @param {T} func
4800
+ * @returns {T}
4801
+ */
4802
+ var nullSafe = function nullSafe(func) {
4803
+ return (
4804
+ // @ts-ignore
4805
+ curryN(func.length, function () {
4806
+ var _ref;
4807
+ var dataArg = (_ref = func.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref]);
4808
+ return isNil(dataArg) ? dataArg : func.apply(void 0, arguments);
4809
+ })
4810
+ );
4811
+ };
4812
+ var noop = function noop() {};
4813
+ var isNotPresent = /*#__PURE__*/either(isNil, isEmpty);
4814
+ var isPresent = /*#__PURE__*/complement(isNotPresent);
4815
+ var camelToSnakeCase = function camelToSnakeCase(string) {
4816
+ return string.replace(/[A-Z]/g, function (letter) {
4817
+ return "_".concat(letter.toLowerCase());
4818
+ });
4819
+ };
4820
+ var capitalize = function capitalize(string) {
4821
+ return string.charAt(0).toUpperCase() + string.slice(1);
4822
+ };
4823
+
4824
+ var matchesImpl = function matchesImpl(pattern, object) {
4825
+ var __parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : object;
4826
+ if (object === pattern) return true;
4827
+ if (typeof pattern === "function" && pattern(object, __parent)) return true;
4828
+ if (isNil(pattern) || isNil(object)) return false;
4829
+ if (_typeof(pattern) !== "object") return false;
4830
+ return Object.entries(pattern).every(function (_ref) {
4831
+ var _ref2 = _slicedToArray(_ref, 2),
4832
+ key = _ref2[0],
4833
+ value = _ref2[1];
4834
+ return matchesImpl(value, object[key], __parent);
4835
+ });
4836
+ };
4837
+ var matches = /*#__PURE__*/curry(function (pattern, object) {
4838
+ return matchesImpl(pattern, object);
4839
+ });
4840
+ var filterNonNull = function filterNonNull(object) {
4841
+ return Object.fromEntries(Object.entries(object).filter(function (_ref5) {
4842
+ var _ref6 = _slicedToArray(_ref5, 2),
4843
+ v = _ref6[1];
4844
+ return !isNil(v);
4845
+ }).map(function (_ref7) {
4846
+ var _ref8 = _slicedToArray(_ref7, 2),
4847
+ k = _ref8[0],
4848
+ v = _ref8[1];
4849
+ return [k, _typeof(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
4850
+ }));
4851
+ };
4852
+ nullSafe(filterNonNull);
4853
+ var findById = /*#__PURE__*/curry(function (id, array) {
4854
+ return array.find(function (item) {
4855
+ return item.id === id;
4856
+ });
4857
+ });
4858
+ var findBy = /*#__PURE__*/curry(function (pattern, array) {
4859
+ return array.find(matches(pattern));
4860
+ });
4861
+
4736
4862
  var fetch$2 = function fetch(params, url) {
4737
4863
  return axios.get(url, {
4738
4864
  params: params
@@ -4803,19 +4929,19 @@ var timeInZone = function timeInZone(time) {
4803
4929
  var getApprovalFilter = function getApprovalFilter() {
4804
4930
  return {
4805
4931
  PENDING: {
4806
- label: t$2("common.pending"),
4932
+ label: t$2("neetoApprovals.common.pending"),
4807
4933
  value: "PENDING"
4808
4934
  },
4809
4935
  TEMPLATES: {
4810
- label: t$2("common.template", PLURAL),
4936
+ label: t$2("neetoApprovals.common.template", PLURAL),
4811
4937
  value: "TEMPLATES"
4812
4938
  },
4813
4939
  HISTORY: {
4814
- label: t$2("common.history"),
4940
+ label: t$2("neetoApprovals.common.history"),
4815
4941
  value: "HISTORY"
4816
4942
  },
4817
4943
  APPROVERS: {
4818
- label: t$2("common.approver", PLURAL),
4944
+ label: t$2("neetoApprovals.common.approver", PLURAL),
4819
4945
  value: "APPROVERS"
4820
4946
  }
4821
4947
  };
@@ -4826,7 +4952,7 @@ var HISTORY_TABLE_COLUMNS = [{
4826
4952
  key: "approvalLabel",
4827
4953
  sorter: true,
4828
4954
  width: "25%",
4829
- title: t$2("common.id"),
4955
+ title: t$2("neetoApprovals.common.id"),
4830
4956
  render: function render(approvalLabel, _ref) {
4831
4957
  var requestableUrl = _ref.requestableUrl;
4832
4958
  var url = new URL(requestableUrl || window.location.origin);
@@ -4841,16 +4967,16 @@ var HISTORY_TABLE_COLUMNS = [{
4841
4967
  key: "title",
4842
4968
  sorter: true,
4843
4969
  width: "25%",
4844
- title: t$2("common.title")
4970
+ title: t$2("neetoApprovals.common.title")
4845
4971
  }, {
4846
4972
  dataIndex: "status",
4847
4973
  key: "status",
4848
4974
  sorter: true,
4849
4975
  width: "25%",
4850
- title: t$2("common.status"),
4976
+ title: t$2("neetoApprovals.common.status"),
4851
4977
  render: function render(status) {
4852
4978
  return /*#__PURE__*/React.createElement(Tag, {
4853
- label: capitalize$1(status),
4979
+ label: capitalize(status),
4854
4980
  style: STATUS_TAG_STYLE[status]
4855
4981
  });
4856
4982
  }
@@ -4859,7 +4985,7 @@ var HISTORY_TABLE_COLUMNS = [{
4859
4985
  key: "createdAt",
4860
4986
  sorter: true,
4861
4987
  width: "25%",
4862
- title: t$2("common.created"),
4988
+ title: t$2("neetoApprovals.common.created"),
4863
4989
  render: function render(createdAt) {
4864
4990
  return dateFormat.fromNow(timeInZone(createdAt));
4865
4991
  }
@@ -4874,7 +5000,7 @@ var ApprovalsDetails = function ApprovalsDetails(_ref) {
4874
5000
  _ref$isPending = _ref.isPending,
4875
5001
  isPending = _ref$isPending === void 0 ? false : _ref$isPending,
4876
5002
  _ref$onSubmit = _ref.onSubmit,
4877
- onSubmit = _ref$onSubmit === void 0 ? noop$1 : _ref$onSubmit,
5003
+ onSubmit = _ref$onSubmit === void 0 ? noop : _ref$onSubmit,
4878
5004
  _ref$isLoading = _ref.isLoading,
4879
5005
  isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading;
4880
5006
  var _useTranslation = useTranslation(),
@@ -4891,7 +5017,7 @@ var ApprovalsDetails = function ApprovalsDetails(_ref) {
4891
5017
  requesterName = approvalDetails.requesterName,
4892
5018
  requesterEmail = approvalDetails.requesterEmail;
4893
5019
  var _useState = useState(initialNote),
4894
- _useState2 = _slicedToArray(_useState, 2),
5020
+ _useState2 = _slicedToArray$1(_useState, 2),
4895
5021
  note = _useState2[0],
4896
5022
  setNote = _useState2[1];
4897
5023
  useEffect(function () {
@@ -4901,7 +5027,7 @@ var ApprovalsDetails = function ApprovalsDetails(_ref) {
4901
5027
  var isCurrentUserApprover = ((_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 ? void 0 : (_window$globalProps$u = _window$globalProps.user) === null || _window$globalProps$u === void 0 ? void 0 : _window$globalProps$u.email) === approverEmail;
4902
5028
  var getStatusLabel = function getStatusLabel() {
4903
5029
  if (isPending) {
4904
- return t("common.waitingFor");
5030
+ return t("neetoApprovals.common.waitingFor");
4905
5031
  }
4906
5032
  return STATUS_UPDATED_BY[status];
4907
5033
  };
@@ -4925,7 +5051,7 @@ var ApprovalsDetails = function ApprovalsDetails(_ref) {
4925
5051
  }, /*#__PURE__*/React.createElement(Typography, {
4926
5052
  style: "h2"
4927
5053
  }, title), /*#__PURE__*/React.createElement(Tag, {
4928
- label: capitalize$1(status),
5054
+ label: capitalize(status),
4929
5055
  style: STATUS_TAG_STYLE[status]
4930
5056
  })), /*#__PURE__*/React.createElement(Pane.Body, {
4931
5057
  className: "space-y-6"
@@ -4937,35 +5063,35 @@ var ApprovalsDetails = function ApprovalsDetails(_ref) {
4937
5063
  style: "body2"
4938
5064
  }, requesterOrApproverDetails)), /*#__PURE__*/React.createElement("div", {
4939
5065
  className: "flex space-x-10 p-2"
4940
- }, /*#__PURE__*/React.createElement(Label, null, t("common.created")), /*#__PURE__*/React.createElement(Typography, null, dateFormat.extended(timeInZone(createdAt))))), /*#__PURE__*/React.createElement("div", {
5066
+ }, /*#__PURE__*/React.createElement(Label, null, t("neetoApprovals.common.created")), /*#__PURE__*/React.createElement(Typography, null, dateFormat.extended(timeInZone(createdAt))))), /*#__PURE__*/React.createElement("div", {
4941
5067
  className: "w-full space-y-2"
4942
- }, /*#__PURE__*/React.createElement(Label, null, t("inputs.labels.message")), /*#__PURE__*/React.createElement(MemoizedEditorContent$1, {
5068
+ }, /*#__PURE__*/React.createElement(Label, null, t("neetoApprovals.inputs.labels.message")), /*#__PURE__*/React.createElement(MemoizedEditorContent$1, {
4943
5069
  className: "neeto-ui-bg-gray-100 p-4",
4944
5070
  content: message
4945
5071
  })), isPending && isCurrentUserApprover && /*#__PURE__*/React.createElement(Textarea, {
4946
5072
  className: "w-full",
4947
5073
  disabled: !isPending,
4948
- label: t("common.note"),
5074
+ label: t("neetoApprovals.common.note"),
4949
5075
  value: note,
4950
- placeholder: t("inputs.placeholders.add_", {
4951
- what: (_t = t("common.note")) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5076
+ placeholder: t("neetoApprovals.inputs.placeholders.add_", {
5077
+ what: (_t = t("neetoApprovals.common.note")) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
4952
5078
  }),
4953
5079
  onChange: withEventTargetValue(setNote)
4954
5080
  }), !isPending && note && /*#__PURE__*/React.createElement("div", {
4955
5081
  className: "w-full space-y-2"
4956
- }, /*#__PURE__*/React.createElement(Label, null, t("common.note")), /*#__PURE__*/React.createElement("div", {
5082
+ }, /*#__PURE__*/React.createElement(Label, null, t("neetoApprovals.common.note")), /*#__PURE__*/React.createElement("div", {
4957
5083
  className: "neeto-ui-bg-gray-100 p-4"
4958
5084
  }, note))), isPending && isCurrentUserApprover && /*#__PURE__*/React.createElement(Pane.Footer, {
4959
5085
  className: "flex gap-x-2"
4960
5086
  }, /*#__PURE__*/React.createElement(Button, {
4961
- label: t("buttons.approve"),
5087
+ label: t("neetoApprovals.buttons.approve"),
4962
5088
  loading: isLoading,
4963
5089
  type: "submit",
4964
5090
  onClick: function onClick() {
4965
5091
  return handleSubmit(STATUSES.approved);
4966
5092
  }
4967
5093
  }), /*#__PURE__*/React.createElement(Button, {
4968
- label: t("buttons.decline"),
5094
+ label: t("neetoApprovals.buttons.decline"),
4969
5095
  loading: isLoading,
4970
5096
  style: "text",
4971
5097
  onClick: function onClick() {
@@ -4980,7 +5106,7 @@ var History = function History(_ref) {
4980
5106
  var _t;
4981
5107
  var requestUrl = _ref.requestUrl;
4982
5108
  var _useState = useState(DEFAULT_FILTER_VALUES),
4983
- _useState2 = _slicedToArray(_useState, 2),
5109
+ _useState2 = _slicedToArray$1(_useState, 2),
4984
5110
  filters = _useState2[0],
4985
5111
  setFilters = _useState2[1];
4986
5112
  var debouncedSearch = useDebounce(filters.search, SEARCH_DELAY);
@@ -4988,7 +5114,7 @@ var History = function History(_ref) {
4988
5114
  pageProperties = _usePaginate.pageProperties,
4989
5115
  handleTablePagination = _usePaginate.handleTablePagination;
4990
5116
  var _useState3 = useState({}),
4991
- _useState4 = _slicedToArray(_useState3, 2),
5117
+ _useState4 = _slicedToArray$1(_useState3, 2),
4992
5118
  approvalDetails = _useState4[0],
4993
5119
  setApprovalDetails = _useState4[1];
4994
5120
  var _useTranslation = useTranslation(),
@@ -5042,8 +5168,8 @@ var History = function History(_ref) {
5042
5168
  })) : /*#__PURE__*/React.createElement("div", {
5043
5169
  className: "flex h-full w-full flex-grow items-center justify-center"
5044
5170
  }, /*#__PURE__*/React.createElement(NoData, {
5045
- title: t("common.notFound_", {
5046
- what: (_t = t("common.record", PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5171
+ title: t("neetoApprovals.common.notFound_", {
5172
+ what: (_t = t("neetoApprovals.common.record", PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5047
5173
  })
5048
5174
  })), /*#__PURE__*/React.createElement(ApprovalsDetails, {
5049
5175
  approvalDetails: approvalDetails,
@@ -5064,11 +5190,11 @@ var PendingRequests = function PendingRequests(_ref) {
5064
5190
  var _t;
5065
5191
  var requestUrl = _ref.requestUrl;
5066
5192
  var _useState = useState(DEFAULT_FILTER_VALUES),
5067
- _useState2 = _slicedToArray(_useState, 2),
5193
+ _useState2 = _slicedToArray$1(_useState, 2),
5068
5194
  filters = _useState2[0],
5069
5195
  setFilters = _useState2[1];
5070
5196
  var _useState3 = useState({}),
5071
- _useState4 = _slicedToArray(_useState3, 2),
5197
+ _useState4 = _slicedToArray$1(_useState3, 2),
5072
5198
  approvalDetails = _useState4[0],
5073
5199
  setApprovalDetails = _useState4[1];
5074
5200
  var debouncedSearch = useDebounce(filters.search, SEARCH_DELAY);
@@ -5133,8 +5259,8 @@ var PendingRequests = function PendingRequests(_ref) {
5133
5259
  })) : /*#__PURE__*/React.createElement("div", {
5134
5260
  className: "flex h-full w-full flex-grow items-center justify-center"
5135
5261
  }, /*#__PURE__*/React.createElement(NoData, {
5136
- title: t("common.notFound_", {
5137
- what: (_t = t("common.pendingApproval", PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5262
+ title: t("neetoApprovals.common.notFound_", {
5263
+ what: (_t = t("neetoApprovals.common.pendingApproval", PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5138
5264
  })
5139
5265
  })), /*#__PURE__*/React.createElement(ApprovalsDetails, {
5140
5266
  isPending: true,
@@ -5236,7 +5362,7 @@ var useDeleteTemplate = function useDeleteTemplate(options) {
5236
5362
  };
5237
5363
 
5238
5364
  function _arrayWithoutHoles(arr) {
5239
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
5365
+ if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
5240
5366
  }
5241
5367
 
5242
5368
  function _iterableToArray(iter) {
@@ -5248,13 +5374,13 @@ function _nonIterableSpread() {
5248
5374
  }
5249
5375
 
5250
5376
  function _toConsumableArray(arr) {
5251
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
5377
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();
5252
5378
  }
5253
5379
 
5254
5380
  var _t;
5255
5381
  var VALID_VARIABLE_NAME_REGEX = /^[a-z](?:\w*[a-z0-9])*$/i;
5256
5382
  var EVERYONE_VISIBILITY = {
5257
- label: t$2("select.visibility.everyone"),
5383
+ label: t$2("neetoApprovals.select.visibility.everyone"),
5258
5384
  value: "everyone"
5259
5385
  };
5260
5386
  var TEMPLATE_FORM_INITIAL_VALUES = {
@@ -5266,19 +5392,19 @@ var TEMPLATE_FORM_INITIAL_VALUES = {
5266
5392
  message: ""
5267
5393
  };
5268
5394
  var TEMPLATE_FORM_VALIDATION_SCHEMA = yup.object().shape({
5269
- name: yup.string().trim().required(t$2("validations.required", {
5270
- what: t$2("common.name")
5395
+ name: yup.string().trim().required(t$2("neetoApprovals.validations.required", {
5396
+ what: t$2("neetoApprovals.common.name")
5271
5397
  })),
5272
- approver: yup.object().required(t$2("validations.approver")),
5273
- message: yup.string().test("message", t$2("validations.required", {
5274
- what: t$2("inputs.labels.message")
5398
+ approver: yup.object().required(t$2("neetoApprovals.validations.approver")),
5399
+ message: yup.string().test("message", t$2("neetoApprovals.validations.required", {
5400
+ what: t$2("neetoApprovals.inputs.labels.message")
5275
5401
  }), function (content) {
5276
5402
  return !isEditorEmpty(content);
5277
5403
  }),
5278
5404
  variables: yup.array().of(yup.object().shape({
5279
- variable: yup.string().trim().required(t$2("validations.pleaseEnter_", {
5280
- what: (_t = t$2("common.variable")) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5281
- })).matches(VALID_VARIABLE_NAME_REGEX, t$2("validations.variableName"))
5405
+ variable: yup.string().trim().required(t$2("neetoApprovals.validations.pleaseEnter_", {
5406
+ what: (_t = t$2("neetoApprovals.common.variable")) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5407
+ })).matches(VALID_VARIABLE_NAME_REGEX, t$2("neetoApprovals.validations.variableName"))
5282
5408
  }))
5283
5409
  });
5284
5410
 
@@ -5298,7 +5424,7 @@ var DynamicBlock = function DynamicBlock() {
5298
5424
  });
5299
5425
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
5300
5426
  className: "space-y-2 "
5301
- }, /*#__PURE__*/React.createElement(Label, null, t("inputs.labels.variableMapping")), /*#__PURE__*/React.createElement(FieldArray, {
5427
+ }, /*#__PURE__*/React.createElement(Label, null, t("neetoApprovals.inputs.labels.variableMapping")), /*#__PURE__*/React.createElement(FieldArray, {
5302
5428
  name: "variables"
5303
5429
  }, function (_ref2) {
5304
5430
  var remove = _ref2.remove,
@@ -5314,10 +5440,10 @@ var DynamicBlock = function DynamicBlock() {
5314
5440
  }, /*#__PURE__*/React.createElement(Input, {
5315
5441
  autoFocus: true,
5316
5442
  required: true,
5317
- label: t("common.variable_", {
5443
+ name: "variables[".concat(index, "][variable]"),
5444
+ label: t("neetoApprovals.common.variable_", {
5318
5445
  number: index + 1
5319
- }),
5320
- name: "variables[".concat(index, "][variable]")
5446
+ })
5321
5447
  }), /*#__PURE__*/React.createElement(Button, {
5322
5448
  className: "my-5",
5323
5449
  icon: Delete,
@@ -5327,10 +5453,10 @@ var DynamicBlock = function DynamicBlock() {
5327
5453
  }
5328
5454
  }));
5329
5455
  })), /*#__PURE__*/React.createElement(Button, {
5330
- label: t("common.add_", {
5331
- what: t("common.variable")
5332
- }),
5333
5456
  style: "link",
5457
+ label: t("neetoApprovals.common.add_", {
5458
+ what: t("neetoApprovals.common.variable")
5459
+ }),
5334
5460
  onClick: function onClick() {
5335
5461
  return push({
5336
5462
  variable: ""
@@ -5340,12 +5466,12 @@ var DynamicBlock = function DynamicBlock() {
5340
5466
  })), /*#__PURE__*/React.createElement(FormikEditor, {
5341
5467
  required: true,
5342
5468
  key: variables,
5343
- label: t("inputs.labels.message"),
5469
+ label: t("neetoApprovals.inputs.labels.message"),
5344
5470
  name: "message",
5345
5471
  rows: 3,
5346
5472
  variables: editorVariables,
5347
- placeholder: t("inputs.placeholders.enter_", {
5348
- what: t("inputs.labels.message")
5473
+ placeholder: t("neetoApprovals.inputs.placeholders.enter_", {
5474
+ what: t("neetoApprovals.inputs.labels.message")
5349
5475
  }),
5350
5476
  shouldUpdate: function shouldUpdate(nextProps, prevProps) {
5351
5477
  return nextProps.variables !== prevProps.variables;
@@ -5360,7 +5486,7 @@ var Form$1 = function Form(_ref) {
5360
5486
  _ref$initialData = _ref.initialData,
5361
5487
  initialData = _ref$initialData === void 0 ? {} : _ref$initialData,
5362
5488
  _ref$onSubmit = _ref.onSubmit,
5363
- onSubmit = _ref$onSubmit === void 0 ? noop$1 : _ref$onSubmit,
5489
+ onSubmit = _ref$onSubmit === void 0 ? noop : _ref$onSubmit,
5364
5490
  _ref$isLoading = _ref.isLoading,
5365
5491
  isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
5366
5492
  visibilityOptions = _ref.visibilityOptions;
@@ -5372,10 +5498,10 @@ var Form$1 = function Form(_ref) {
5372
5498
  _useFetchApprovers$da2 = _useFetchApprovers$da === void 0 ? {} : _useFetchApprovers$da,
5373
5499
  _useFetchApprovers$da3 = _useFetchApprovers$da2.approvers,
5374
5500
  approvers = _useFetchApprovers$da3 === void 0 ? [] : _useFetchApprovers$da3;
5375
- var header = isEmpty(initialData) ? t("common.add_", {
5376
- what: t("common.approvalTemplate", SINGULAR).toLocaleLowerCase()
5377
- }) : t("common.edit_", {
5378
- what: t("common.approvalTemplate", SINGULAR).toLocaleLowerCase()
5501
+ var header = isEmpty(initialData) ? t("neetoApprovals.common.add_", {
5502
+ what: t("neetoApprovals.common.approvalTemplate", SINGULAR).toLocaleLowerCase()
5503
+ }) : t("neetoApprovals.common.edit_", {
5504
+ what: t("neetoApprovals.common.approvalTemplate", SINGULAR).toLocaleLowerCase()
5379
5505
  });
5380
5506
  return /*#__PURE__*/React.createElement(Pane, {
5381
5507
  initialFocusRef: inputReference,
@@ -5397,19 +5523,19 @@ var Form$1 = function Form(_ref) {
5397
5523
  autoFocus: true,
5398
5524
  required: true,
5399
5525
  className: "w-1/2",
5400
- label: t("common.name"),
5526
+ label: t("neetoApprovals.common.name"),
5401
5527
  name: "name",
5402
- placeholder: t("inputs.placeholders.name")
5528
+ placeholder: t("neetoApprovals.inputs.placeholders.name")
5403
5529
  }), /*#__PURE__*/React.createElement(Textarea$1, {
5404
5530
  className: "w-full",
5405
- label: t("inputs.labels.description"),
5531
+ label: t("neetoApprovals.inputs.labels.description"),
5406
5532
  name: "description",
5407
- placeholder: t("inputs.placeholders.description")
5533
+ placeholder: t("neetoApprovals.inputs.placeholders.description")
5408
5534
  }), /*#__PURE__*/React.createElement("div", {
5409
5535
  className: "flex space-x-6"
5410
5536
  }, /*#__PURE__*/React.createElement(Select, {
5411
5537
  required: true,
5412
- label: t("inputs.labels.approver"),
5538
+ label: t("neetoApprovals.inputs.labels.approver"),
5413
5539
  name: "approver",
5414
5540
  options: approvers.map(function (approver) {
5415
5541
  return {
@@ -5417,24 +5543,24 @@ var Form$1 = function Form(_ref) {
5417
5543
  value: approver.id
5418
5544
  };
5419
5545
  }),
5420
- placeholder: t("inputs.placeholders.select_", {
5421
- what: (_t = t("common.approver", SINGULAR)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5546
+ placeholder: t("neetoApprovals.inputs.placeholders.select_", {
5547
+ what: (_t = t("neetoApprovals.common.approver", SINGULAR)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5422
5548
  })
5423
5549
  }), /*#__PURE__*/React.createElement(Select, {
5424
- label: t("common.visibility"),
5550
+ label: t("neetoApprovals.common.visibility"),
5425
5551
  name: "visibility",
5426
5552
  options: [].concat(_toConsumableArray(visibilityOptions), [EVERYONE_VISIBILITY]),
5427
- placeholder: t("inputs.placeholders.select_", {
5428
- what: (_t2 = t("common.visibility")) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase()
5553
+ placeholder: t("neetoApprovals.inputs.placeholders.select_", {
5554
+ what: (_t2 = t("neetoApprovals.common.visibility")) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase()
5429
5555
  })
5430
5556
  })), /*#__PURE__*/React.createElement(DynamicBlock, null))), /*#__PURE__*/React.createElement(Pane.Footer, {
5431
5557
  className: "flex gap-x-2"
5432
5558
  }, /*#__PURE__*/React.createElement(Button, {
5433
- label: t("buttons.saveChanges"),
5559
+ label: t("neetoApprovals.buttons.saveChanges"),
5434
5560
  loading: isLoading,
5435
5561
  type: "submit"
5436
5562
  }), /*#__PURE__*/React.createElement(Button, {
5437
- label: t("buttons.cancel"),
5563
+ label: t("neetoApprovals.buttons.cancel"),
5438
5564
  style: "text",
5439
5565
  onClick: onClose
5440
5566
  })))));
@@ -5566,34 +5692,34 @@ var TemplateDetails = function TemplateDetails(_ref) {
5566
5692
  className: "space-y-2"
5567
5693
  }, /*#__PURE__*/React.createElement(Typography, {
5568
5694
  style: "h2"
5569
- }, t("common.templateDetails"))), /*#__PURE__*/React.createElement(Pane.Body, {
5695
+ }, t("neetoApprovals.common.templateDetails"))), /*#__PURE__*/React.createElement(Pane.Body, {
5570
5696
  className: "space-y-6"
5571
5697
  }, /*#__PURE__*/React.createElement(Field$1, {
5572
- label: t("common.name"),
5698
+ label: t("neetoApprovals.common.name"),
5573
5699
  value: name
5574
5700
  }), /*#__PURE__*/React.createElement(Field$1, {
5575
- label: t("inputs.labels.description"),
5701
+ label: t("neetoApprovals.inputs.labels.description"),
5576
5702
  value: description
5577
5703
  }), /*#__PURE__*/React.createElement(Field$1, {
5578
- label: t("common.approver", SINGULAR),
5704
+ label: t("neetoApprovals.common.approver", SINGULAR),
5579
5705
  value: approverName
5580
5706
  }), /*#__PURE__*/React.createElement(Field$1, {
5581
- label: t("common.visibility"),
5707
+ label: t("neetoApprovals.common.visibility"),
5582
5708
  value: (accessible === null || accessible === void 0 ? void 0 : accessible.label) || EVERYONE_VISIBILITY.label
5583
5709
  }), (_Object$entries = Object.entries(variables || {})) === null || _Object$entries === void 0 ? void 0 : _Object$entries.map(function (_ref2) {
5584
- var _ref3 = _slicedToArray(_ref2, 2),
5710
+ var _ref3 = _slicedToArray$1(_ref2, 2),
5585
5711
  variable = _ref3[0],
5586
5712
  value = _ref3[1];
5587
5713
  return /*#__PURE__*/React.createElement(Field$1, {
5588
5714
  key: value,
5589
- label: capitalize$1(variable),
5715
+ label: capitalize(variable),
5590
5716
  value: value
5591
5717
  });
5592
5718
  }), /*#__PURE__*/React.createElement("div", {
5593
5719
  className: "flex w-full flex-col space-y-4"
5594
5720
  }, /*#__PURE__*/React.createElement(Label, {
5595
5721
  className: "mb-1 font-normal"
5596
- }, t("inputs.labels.message")), /*#__PURE__*/React.createElement(MemoizedEditorContent, {
5722
+ }, t("neetoApprovals.inputs.labels.message")), /*#__PURE__*/React.createElement(MemoizedEditorContent, {
5597
5723
  className: "neeto-ui-bg-gray-100 neeto-ui-rounded-lg p-3",
5598
5724
  content: message
5599
5725
  }))));
@@ -5608,11 +5734,11 @@ var columnData = function columnData(_ref) {
5608
5734
  dataIndex: "name",
5609
5735
  key: "name",
5610
5736
  sorter: true,
5611
- title: instance.t("common.name")
5737
+ title: instance.t("neetoApprovals.common.name")
5612
5738
  }, {
5613
5739
  dataIndex: "visibility",
5614
5740
  key: "visibility",
5615
- title: instance.t("common.visibility"),
5741
+ title: instance.t("neetoApprovals.common.visibility"),
5616
5742
  render: function render(_, _ref2) {
5617
5743
  var accessible = _ref2.accessible;
5618
5744
  return (accessible === null || accessible === void 0 ? void 0 : accessible.label) || EVERYONE_VISIBILITY.label;
@@ -5640,12 +5766,12 @@ var columnData = function columnData(_ref) {
5640
5766
  onClick: function onClick() {
5641
5767
  return onEditClick(template);
5642
5768
  }
5643
- }, instance.t("common.edit")), /*#__PURE__*/React.createElement(MenuItem.Button, {
5769
+ }, instance.t("neetoApprovals.common.edit")), /*#__PURE__*/React.createElement(MenuItem.Button, {
5644
5770
  "data-cy": "approvers-delete-button",
5645
5771
  onClick: function onClick() {
5646
5772
  return onDeleteClick(template);
5647
5773
  }
5648
- }, instance.t("common.delete")))));
5774
+ }, instance.t("neetoApprovals.common.delete")))));
5649
5775
  }
5650
5776
  }];
5651
5777
  };
@@ -5662,19 +5788,19 @@ var Templates = function Templates(_ref) {
5662
5788
  helpDocUrl = _ref.helpDocUrl,
5663
5789
  otherProps = _objectWithoutProperties(_ref, _excluded);
5664
5790
  var _useState = useState({}),
5665
- _useState2 = _slicedToArray(_useState, 2),
5791
+ _useState2 = _slicedToArray$1(_useState, 2),
5666
5792
  selectedTemplate = _useState2[0],
5667
5793
  setSelectedTemplate = _useState2[1];
5668
5794
  var _useState3 = useState(false),
5669
- _useState4 = _slicedToArray(_useState3, 2),
5795
+ _useState4 = _slicedToArray$1(_useState3, 2),
5670
5796
  isDeleteAlertOpen = _useState4[0],
5671
5797
  setIsDeleteAlertOpen = _useState4[1];
5672
5798
  var _useState5 = useState(false),
5673
- _useState6 = _slicedToArray(_useState5, 2),
5799
+ _useState6 = _slicedToArray$1(_useState5, 2),
5674
5800
  isEditPaneOpen = _useState6[0],
5675
5801
  setIsEditPaneOpen = _useState6[1];
5676
5802
  var _useState7 = useState(false),
5677
- _useState8 = _slicedToArray(_useState7, 2),
5803
+ _useState8 = _slicedToArray$1(_useState7, 2),
5678
5804
  isShowPaneOpen = _useState8[0],
5679
5805
  setIsShowPaneOpen = _useState8[1];
5680
5806
  var debouncedSearch = useDebounce(filters.search, SEARCH_DELAY);
@@ -5725,7 +5851,7 @@ var Templates = function Templates(_ref) {
5725
5851
  });
5726
5852
  setSelectedTemplate({});
5727
5853
  };
5728
- var entity = (_t = t("common.template", PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase();
5854
+ var entity = (_t = t("neetoApprovals.common.template", PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase();
5729
5855
  return /*#__PURE__*/React.createElement(React.Fragment, null, isTemplateLoading ? /*#__PURE__*/React.createElement(PageLoader, null) : /*#__PURE__*/React.createElement(Table, {
5730
5856
  items: templates,
5731
5857
  setIsPaneOpen: setIsNewTemplatePaneOpen,
@@ -5754,16 +5880,16 @@ var Templates = function Templates(_ref) {
5754
5880
  })), /*#__PURE__*/React.createElement(Alert, {
5755
5881
  isOpen: isDeleteAlertOpen,
5756
5882
  isSubmitting: isDeleting,
5757
- submitButtonLabel: t("buttons.delete"),
5883
+ submitButtonLabel: t("neetoApprovals.buttons.delete"),
5758
5884
  message: /*#__PURE__*/React.createElement(Trans, {
5759
- i18nKey: "alerts.deleting_",
5885
+ i18nKey: "neetoApprovals.alerts.deleting_",
5760
5886
  values: {
5761
- what: (_t2 = t("common.template", SINGULAR)) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase(),
5887
+ what: (_t2 = t("neetoApprovals.common.template", SINGULAR)) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase(),
5762
5888
  name: selectedTemplate === null || selectedTemplate === void 0 ? void 0 : selectedTemplate.name
5763
5889
  }
5764
5890
  }),
5765
- title: t("common.delete_", {
5766
- what: (_t3 = t("common.template", SINGULAR)) === null || _t3 === void 0 ? void 0 : _t3.toLocaleLowerCase()
5891
+ title: t("neetoApprovals.common.delete_", {
5892
+ what: (_t3 = t("neetoApprovals.common.template", SINGULAR)) === null || _t3 === void 0 ? void 0 : _t3.toLocaleLowerCase()
5767
5893
  }),
5768
5894
  onClose: function onClose() {
5769
5895
  return setSelectedTemplate({});
@@ -5802,16 +5928,16 @@ var createRoutes = function createRoutes(_ref) {
5802
5928
  path: "".concat(config.approvalsPath).concat(routes.approvers),
5803
5929
  actionBlock: function actionBlock() {
5804
5930
  return /*#__PURE__*/React.createElement(Button, {
5805
- label: t$2("common.add_", {
5806
- what: t$2("common.approver", SINGULAR).toLocaleLowerCase()
5931
+ label: t$2("neetoApprovals.common.add_", {
5932
+ what: t$2("neetoApprovals.common.approver", SINGULAR).toLocaleLowerCase()
5807
5933
  }),
5808
5934
  onClick: function onClick() {
5809
5935
  return setIsNewApproverPaneOpen(true);
5810
5936
  }
5811
5937
  });
5812
5938
  },
5813
- searchPlaceholder: t$2("inputs.placeholders.search_", {
5814
- what: t$2("common.approver", PLURAL).toLocaleLowerCase()
5939
+ searchPlaceholder: t$2("neetoApprovals.inputs.placeholders.search_", {
5940
+ what: t$2("neetoApprovals.common.approver", PLURAL).toLocaleLowerCase()
5815
5941
  })
5816
5942
  }, {
5817
5943
  component: function component() {
@@ -5825,16 +5951,16 @@ var createRoutes = function createRoutes(_ref) {
5825
5951
  path: "".concat(config.approvalsPath).concat(routes.templates.index),
5826
5952
  actionBlock: function actionBlock() {
5827
5953
  return /*#__PURE__*/React.createElement(Button, {
5828
- label: t$2("common.add_", {
5829
- what: t$2("common.approvalTemplate", SINGULAR).toLocaleLowerCase()
5954
+ label: t$2("neetoApprovals.common.add_", {
5955
+ what: t$2("neetoApprovals.common.approvalTemplate", SINGULAR).toLocaleLowerCase()
5830
5956
  }),
5831
5957
  onClick: function onClick() {
5832
5958
  return setIsNewTemplatePaneOpen(true);
5833
5959
  }
5834
5960
  });
5835
5961
  },
5836
- searchPlaceholder: t$2("inputs.placeholders.search_", {
5837
- what: t$2("common.template", PLURAL).toLocaleLowerCase()
5962
+ searchPlaceholder: t$2("neetoApprovals.inputs.placeholders.search_", {
5963
+ what: t$2("neetoApprovals.common.template", PLURAL).toLocaleLowerCase()
5838
5964
  })
5839
5965
  }, {
5840
5966
  component: function component() {
@@ -5864,7 +5990,7 @@ var Header = function Header(_ref) {
5864
5990
  }, appRoutes);
5865
5991
  return /*#__PURE__*/React.createElement(NeetoHeader, {
5866
5992
  actionBlock: currentTab === null || currentTab === void 0 ? void 0 : (_currentTab$actionBlo = currentTab.actionBlock) === null || _currentTab$actionBlo === void 0 ? void 0 : _currentTab$actionBlo.call(currentTab),
5867
- title: t("common.approval", PLURAL),
5993
+ title: t("neetoApprovals.common.approval", PLURAL),
5868
5994
  searchProps: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.searchPlaceholder) && {
5869
5995
  onChange: function onChange(event) {
5870
5996
  return setFilters(assoc("search", event.target.value));
@@ -5934,15 +6060,15 @@ function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) {
5934
6060
  var Approvals = function Approvals(_ref) {
5935
6061
  var config = _ref.config;
5936
6062
  var _useState = useState(DEFAULT_FILTER_VALUES),
5937
- _useState2 = _slicedToArray(_useState, 2),
6063
+ _useState2 = _slicedToArray$1(_useState, 2),
5938
6064
  filters = _useState2[0],
5939
6065
  setFilters = _useState2[1];
5940
6066
  var _useState3 = useState(false),
5941
- _useState4 = _slicedToArray(_useState3, 2),
6067
+ _useState4 = _slicedToArray$1(_useState3, 2),
5942
6068
  isNewTemplatePaneOpen = _useState4[0],
5943
6069
  setIsNewTemplatePaneOpen = _useState4[1];
5944
6070
  var _useState5 = useState(false),
5945
- _useState6 = _slicedToArray(_useState5, 2),
6071
+ _useState6 = _slicedToArray$1(_useState5, 2),
5946
6072
  isNewApproverPaneOpen = _useState6[0],
5947
6073
  setIsNewApproverPaneOpen = _useState6[1];
5948
6074
  var appRoutes = createRoutes({
@@ -5987,7 +6113,7 @@ var Form = function Form(_ref) {
5987
6113
  onSubmit = _ref.onSubmit,
5988
6114
  isLoading = _ref.isLoading;
5989
6115
  var _useState = useState({}),
5990
- _useState2 = _slicedToArray(_useState, 2),
6116
+ _useState2 = _slicedToArray$1(_useState, 2),
5991
6117
  selectedTemplateData = _useState2[0],
5992
6118
  setSelectedTemplateData = _useState2[1];
5993
6119
  var _useTranslation = useTranslation(),
@@ -6045,8 +6171,8 @@ var Form = function Form(_ref) {
6045
6171
  onClose: onClose
6046
6172
  }, /*#__PURE__*/React.createElement(Pane.Header, null, /*#__PURE__*/React.createElement(Typography, {
6047
6173
  style: "h2"
6048
- }, t("common.add_", {
6049
- what: (_t = t("common.approval", SINGULAR)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
6174
+ }, t("neetoApprovals.common.add_", {
6175
+ what: (_t = t("neetoApprovals.common.approval", SINGULAR)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
6050
6176
  }))), /*#__PURE__*/React.createElement(Form$3, {
6051
6177
  formikProps: {
6052
6178
  onSubmit: handleSubmit,
@@ -6061,14 +6187,14 @@ var Form = function Form(_ref) {
6061
6187
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement("div", {
6062
6188
  className: "w-full space-y-6"
6063
6189
  }, /*#__PURE__*/React.createElement(Select$1, {
6064
- label: t("select.approval"),
6190
+ label: t("neetoApprovals.select.approval"),
6065
6191
  options: templateOptions,
6066
6192
  onChange: function onChange(selectedTemplate) {
6067
6193
  return handleTemplateChange(selectedTemplate, setFieldValue, resetForm);
6068
6194
  }
6069
6195
  }), isPresent(variables) && /*#__PURE__*/React.createElement("div", {
6070
6196
  className: "space-y-2"
6071
- }, /*#__PURE__*/React.createElement(Label, null, t("inputs.labels.variableMapping")), /*#__PURE__*/React.createElement("div", {
6197
+ }, /*#__PURE__*/React.createElement(Label, null, t("neetoApprovals.inputs.labels.variableMapping")), /*#__PURE__*/React.createElement("div", {
6072
6198
  className: "neeto-ui-bg-gray-100 neeto-ui-border-gray-300 neeto-ui-rounded-lg space-y-4 border p-3"
6073
6199
  }, /*#__PURE__*/React.createElement(FieldArray, {
6074
6200
  name: "variables"
@@ -6084,7 +6210,7 @@ var Form = function Form(_ref) {
6084
6210
  });
6085
6211
  }))), (selectedTemplateData === null || selectedTemplateData === void 0 ? void 0 : selectedTemplateData.message) && /*#__PURE__*/React.createElement("div", {
6086
6212
  className: "space-y-2"
6087
- }, /*#__PURE__*/React.createElement(Label, null, t("inputs.labels.message")), /*#__PURE__*/React.createElement(EditorContent, {
6213
+ }, /*#__PURE__*/React.createElement(Label, null, t("neetoApprovals.inputs.labels.message")), /*#__PURE__*/React.createElement(EditorContent, {
6088
6214
  className: "neeto-ui-bg-gray-100 neeto-ui-rounded-lg p-3",
6089
6215
  content: selectedTemplateData === null || selectedTemplateData === void 0 ? void 0 : selectedTemplateData.message,
6090
6216
  name: "message",
@@ -6093,11 +6219,11 @@ var Form = function Form(_ref) {
6093
6219
  className: "flex gap-x-2"
6094
6220
  }, /*#__PURE__*/React.createElement(Button, {
6095
6221
  disabled: !dirty,
6096
- label: t("buttons.saveChanges"),
6222
+ label: t("neetoApprovals.buttons.saveChanges"),
6097
6223
  loading: isLoading,
6098
6224
  type: "submit"
6099
6225
  }), /*#__PURE__*/React.createElement(Button, {
6100
- label: t("buttons.cancel"),
6226
+ label: t("neetoApprovals.buttons.cancel"),
6101
6227
  style: "text",
6102
6228
  onClick: onClose
6103
6229
  })));
@@ -6165,7 +6291,7 @@ var useDeclinePendingRequest = function useDeclinePendingRequest(options) {
6165
6291
  var Public = function Public() {
6166
6292
  var _t;
6167
6293
  var _useState = useState(""),
6168
- _useState2 = _slicedToArray(_useState, 2),
6294
+ _useState2 = _slicedToArray$1(_useState, 2),
6169
6295
  note = _useState2[0],
6170
6296
  setNote = _useState2[1];
6171
6297
  var _useParams = useParams(),
@@ -6199,7 +6325,7 @@ var Public = function Public() {
6199
6325
  }, /*#__PURE__*/React.createElement(PageLoader, null));
6200
6326
  }
6201
6327
  return /*#__PURE__*/React.createElement(Container, null, /*#__PURE__*/React.createElement(NeetoHeader, {
6202
- title: t("common.approval", PLURAL)
6328
+ title: t("neetoApprovals.common.approval", PLURAL)
6203
6329
  }), /*#__PURE__*/React.createElement("div", {
6204
6330
  className: "flex h-screen w-full flex-col items-center"
6205
6331
  }, /*#__PURE__*/React.createElement("div", {
@@ -6211,9 +6337,9 @@ var Public = function Public() {
6211
6337
  }, approvalRequest.title), /*#__PURE__*/React.createElement(EditorContent, {
6212
6338
  content: approvalRequest.message
6213
6339
  }), !hideTextArea && /*#__PURE__*/React.createElement(Textarea, {
6214
- label: t("common.note"),
6215
- placeholder: t("inputs.placeholders.add_", {
6216
- what: (_t = t("common.note")) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
6340
+ label: t("neetoApprovals.common.note"),
6341
+ placeholder: t("neetoApprovals.inputs.placeholders.add_", {
6342
+ what: (_t = t("neetoApprovals.common.note")) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
6217
6343
  }),
6218
6344
  value: note,
6219
6345
  disabled: approvalRequest.status !== STATUSES.pending,
@@ -6221,7 +6347,7 @@ var Public = function Public() {
6221
6347
  }), approvalRequest.status === STATUSES.pending ? /*#__PURE__*/React.createElement("div", {
6222
6348
  className: "mx-auto mt-8 flex space-x-6"
6223
6349
  }, /*#__PURE__*/React.createElement(Button, {
6224
- label: t("buttons.approve"),
6350
+ label: t("neetoApprovals.buttons.approve"),
6225
6351
  onClick: function onClick() {
6226
6352
  return acceptPendingRequest({
6227
6353
  id: approvalRequest.id,
@@ -6230,7 +6356,7 @@ var Public = function Public() {
6230
6356
  },
6231
6357
  loading: isAccepting
6232
6358
  }), /*#__PURE__*/React.createElement(Button, {
6233
- label: t("buttons.decline"),
6359
+ label: t("neetoApprovals.buttons.decline"),
6234
6360
  onClick: function onClick() {
6235
6361
  return declinePendingRequest({
6236
6362
  id: approvalRequest.id,
@@ -6244,14 +6370,14 @@ var Public = function Public() {
6244
6370
  }, /*#__PURE__*/React.createElement(Typography, {
6245
6371
  style: "body1"
6246
6372
  }, /*#__PURE__*/React.createElement(Trans, {
6247
- i18nKey: "typography.approvalRequest",
6373
+ i18nKey: "neetoApprovals.typography.approvalRequest",
6248
6374
  values: {
6249
6375
  status: approvalRequest.status
6250
6376
  }
6251
6377
  })))) : /*#__PURE__*/React.createElement(Typography, {
6252
6378
  style: "h4",
6253
6379
  className: "text-center"
6254
- }, t("common.notFound")))));
6380
+ }, t("neetoApprovals.common.notFound")))));
6255
6381
  };
6256
6382
 
6257
6383
  var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}