@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.cjs.js CHANGED
@@ -15,13 +15,14 @@ var axios = require('axios');
15
15
  var reactQuery = require('react-query');
16
16
  var formik = require('@bigbinary/neetoui/formik');
17
17
  var neetoIcons = require('@bigbinary/neeto-icons');
18
- var pure = require('@bigbinary/neeto-commons-frontend/pure');
18
+ var TableWrapper = require('@bigbinary/neeto-molecules/TableWrapper');
19
19
  var utils = require('@bigbinary/neeto-commons-frontend/utils');
20
20
  var dayjs = require('dayjs');
21
21
  var timezone = require('dayjs/plugin/timezone');
22
22
  var utc = require('dayjs/plugin/utc');
23
23
  var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
24
24
  var neetoEditor = require('@bigbinary/neeto-editor');
25
+ var pure = require('@bigbinary/neeto-commons-frontend/pure');
25
26
  var formik$1 = require('formik');
26
27
  var NeetoHeader = require('@bigbinary/neeto-molecules/Header');
27
28
 
@@ -50,19 +51,20 @@ var Container__default = /*#__PURE__*/_interopDefaultLegacy(Container);
50
51
  var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
51
52
  var PageLoader__default = /*#__PURE__*/_interopDefaultLegacy(PageLoader);
52
53
  var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
54
+ var TableWrapper__default = /*#__PURE__*/_interopDefaultLegacy(TableWrapper);
53
55
  var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
54
56
  var timezone__default = /*#__PURE__*/_interopDefaultLegacy(timezone);
55
57
  var utc__default = /*#__PURE__*/_interopDefaultLegacy(utc);
56
58
  var NeetoHeader__default = /*#__PURE__*/_interopDefaultLegacy(NeetoHeader);
57
59
 
58
- function _typeof$3(o) {
60
+ function _typeof$4(o) {
59
61
  "@babel/helpers - typeof";
60
62
 
61
- return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
63
+ return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
62
64
  return typeof o;
63
65
  } : function (o) {
64
66
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
65
- }, _typeof$3(o);
67
+ }, _typeof$4(o);
66
68
  }
67
69
 
68
70
  function _classCallCheck$2(instance, Constructor) {
@@ -72,11 +74,11 @@ function _classCallCheck$2(instance, Constructor) {
72
74
  }
73
75
 
74
76
  function _toPrimitive$3(input, hint) {
75
- if (_typeof$3(input) !== "object" || input === null) return input;
77
+ if (_typeof$4(input) !== "object" || input === null) return input;
76
78
  var prim = input[Symbol.toPrimitive];
77
79
  if (prim !== undefined) {
78
80
  var res = prim.call(input, hint || "default");
79
- if (_typeof$3(res) !== "object") return res;
81
+ if (_typeof$4(res) !== "object") return res;
80
82
  throw new TypeError("@@toPrimitive must return a primitive value.");
81
83
  }
82
84
  return (hint === "string" ? String : Number)(input);
@@ -84,7 +86,7 @@ function _toPrimitive$3(input, hint) {
84
86
 
85
87
  function _toPropertyKey$3(arg) {
86
88
  var key = _toPrimitive$3(arg, "string");
87
- return _typeof$3(key) === "symbol" ? key : String(key);
89
+ return _typeof$4(key) === "symbol" ? key : String(key);
88
90
  }
89
91
 
90
92
  function _defineProperties$2(target, props) {
@@ -138,7 +140,7 @@ function _inherits(subClass, superClass) {
138
140
  }
139
141
 
140
142
  function _possibleConstructorReturn(self, call) {
141
- if (call && (_typeof$3(call) === "object" || typeof call === "function")) {
143
+ if (call && (_typeof$4(call) === "object" || typeof call === "function")) {
142
144
  return call;
143
145
  } else if (call !== void 0) {
144
146
  throw new TypeError("Derived constructors may only return object or undefined");
@@ -168,7 +170,7 @@ function _defineProperty$2(obj, key, value) {
168
170
  return obj;
169
171
  }
170
172
 
171
- function _arrayWithHoles$2(arr) {
173
+ function _arrayWithHoles$3(arr) {
172
174
  if (Array.isArray(arr)) return arr;
173
175
  }
174
176
 
@@ -176,27 +178,27 @@ function _iterableToArray$1(iter) {
176
178
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
177
179
  }
178
180
 
179
- function _arrayLikeToArray$2(arr, len) {
181
+ function _arrayLikeToArray$3(arr, len) {
180
182
  if (len == null || len > arr.length) len = arr.length;
181
183
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
182
184
  return arr2;
183
185
  }
184
186
 
185
- function _unsupportedIterableToArray$2(o, minLen) {
187
+ function _unsupportedIterableToArray$3(o, minLen) {
186
188
  if (!o) return;
187
- if (typeof o === "string") return _arrayLikeToArray$2(o, minLen);
189
+ if (typeof o === "string") return _arrayLikeToArray$3(o, minLen);
188
190
  var n = Object.prototype.toString.call(o).slice(8, -1);
189
191
  if (n === "Object" && o.constructor) n = o.constructor.name;
190
192
  if (n === "Map" || n === "Set") return Array.from(o);
191
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen);
193
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$3(o, minLen);
192
194
  }
193
195
 
194
- function _nonIterableRest$2() {
196
+ function _nonIterableRest$3() {
195
197
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
196
198
  }
197
199
 
198
200
  function _toArray(arr) {
199
- return _arrayWithHoles$2(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$2(arr) || _nonIterableRest$2();
201
+ return _arrayWithHoles$3(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$3(arr) || _nonIterableRest$3();
200
202
  }
201
203
 
202
204
  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; }
@@ -750,10 +752,10 @@ var Translator = function (_EventEmitter) {
750
752
  key: "translate",
751
753
  value: function translate(keys, options, lastKey) {
752
754
  var _this2 = this;
753
- if (_typeof$3(options) !== 'object' && this.options.overloadTranslationOptionHandler) {
755
+ if (_typeof$4(options) !== 'object' && this.options.overloadTranslationOptionHandler) {
754
756
  options = this.options.overloadTranslationOptionHandler(arguments);
755
757
  }
756
- if (_typeof$3(options) === 'object') options = _objectSpread$4$1({}, options);
758
+ if (_typeof$4(options) === 'object') options = _objectSpread$4$1({}, options);
757
759
  if (!options) options = {};
758
760
  if (keys === undefined || keys === null) return '';
759
761
  if (!Array.isArray(keys)) keys = [String(keys)];
@@ -1055,7 +1057,7 @@ var Translator = function (_EventEmitter) {
1055
1057
  return Translator;
1056
1058
  }(EventEmitter);
1057
1059
 
1058
- function capitalize(string) {
1060
+ function capitalize$1(string) {
1059
1061
  return string.charAt(0).toUpperCase() + string.slice(1);
1060
1062
  }
1061
1063
  var LanguageUtil = function () {
@@ -1095,13 +1097,13 @@ var LanguageUtil = function () {
1095
1097
  } else if (p.length === 2) {
1096
1098
  p[0] = p[0].toLowerCase();
1097
1099
  p[1] = p[1].toUpperCase();
1098
- if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
1100
+ if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize$1(p[1].toLowerCase());
1099
1101
  } else if (p.length === 3) {
1100
1102
  p[0] = p[0].toLowerCase();
1101
1103
  if (p[1].length === 2) p[1] = p[1].toUpperCase();
1102
1104
  if (p[0] !== 'sgn' && p[2].length === 2) p[2] = p[2].toUpperCase();
1103
- if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
1104
- if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase());
1105
+ if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize$1(p[1].toLowerCase());
1106
+ if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize$1(p[2].toLowerCase());
1105
1107
  }
1106
1108
  return p.join('-');
1107
1109
  }
@@ -2131,10 +2133,10 @@ function get() {
2131
2133
  appendNamespaceToCIMode: false,
2132
2134
  overloadTranslationOptionHandler: function handle(args) {
2133
2135
  var ret = {};
2134
- if (_typeof$3(args[1]) === 'object') ret = args[1];
2136
+ if (_typeof$4(args[1]) === 'object') ret = args[1];
2135
2137
  if (typeof args[1] === 'string') ret.defaultValue = args[1];
2136
2138
  if (typeof args[2] === 'string') ret.tDescription = args[2];
2137
- if (_typeof$3(args[2]) === 'object' || _typeof$3(args[3]) === 'object') {
2139
+ if (_typeof$4(args[2]) === 'object' || _typeof$4(args[3]) === 'object') {
2138
2140
  var options = args[3] || args[2];
2139
2141
  Object.keys(options).forEach(function (key) {
2140
2142
  ret[key] = options[key];
@@ -2173,7 +2175,7 @@ function ownKeys$g(object, enumerableOnly) { var keys = Object.keys(object); if
2173
2175
  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; }
2174
2176
  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); }; }
2175
2177
  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; } }
2176
- function noop() {}
2178
+ function noop$1() {}
2177
2179
  function bindMemberFunctions(inst) {
2178
2180
  var mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));
2179
2181
  mems.forEach(function (mem) {
@@ -2304,7 +2306,7 @@ var I18n = function (_EventEmitter) {
2304
2306
  });
2305
2307
  }
2306
2308
  this.format = this.options.interpolation.format;
2307
- if (!callback) callback = noop;
2309
+ if (!callback) callback = noop$1;
2308
2310
  if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
2309
2311
  var codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
2310
2312
  if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];
@@ -2351,7 +2353,7 @@ var I18n = function (_EventEmitter) {
2351
2353
  key: "loadResources",
2352
2354
  value: function loadResources(language) {
2353
2355
  var _this3 = this;
2354
- var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
2356
+ var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop$1;
2355
2357
  var usedCallback = callback;
2356
2358
  var usedLng = typeof language === 'string' ? language : this.language;
2357
2359
  if (typeof language === 'function') usedCallback = language;
@@ -2392,7 +2394,7 @@ var I18n = function (_EventEmitter) {
2392
2394
  var deferred = defer();
2393
2395
  if (!lngs) lngs = this.languages;
2394
2396
  if (!ns) ns = this.options.ns;
2395
- if (!callback) callback = noop;
2397
+ if (!callback) callback = noop$1;
2396
2398
  this.services.backendConnector.reload(lngs, ns, function (err) {
2397
2399
  deferred.resolve();
2398
2400
  callback(err);
@@ -2504,7 +2506,7 @@ var I18n = function (_EventEmitter) {
2504
2506
  var _this5 = this;
2505
2507
  var fixedT = function fixedT(key, opts) {
2506
2508
  var options;
2507
- if (_typeof$3(opts) !== 'object') {
2509
+ if (_typeof$4(opts) !== 'object') {
2508
2510
  for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
2509
2511
  rest[_key3 - 2] = arguments[_key3];
2510
2512
  }
@@ -2636,7 +2638,7 @@ var I18n = function (_EventEmitter) {
2636
2638
  value: function cloneInstance() {
2637
2639
  var _this8 = this;
2638
2640
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2639
- var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
2641
+ var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop$1;
2640
2642
  var mergedOptions = _objectSpread$g(_objectSpread$g(_objectSpread$g({}, this.options), options), {
2641
2643
  isClone: true
2642
2644
  });
@@ -2709,22 +2711,22 @@ function _classCallCheck$1(instance, Constructor) {
2709
2711
  }
2710
2712
  }
2711
2713
 
2712
- function _typeof$2(obj) {
2714
+ function _typeof$3(obj) {
2713
2715
  "@babel/helpers - typeof";
2714
2716
 
2715
- return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
2717
+ return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
2716
2718
  return typeof obj;
2717
2719
  } : function (obj) {
2718
2720
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2719
- }, _typeof$2(obj);
2721
+ }, _typeof$3(obj);
2720
2722
  }
2721
2723
 
2722
2724
  function _toPrimitive$2(input, hint) {
2723
- if (_typeof$2(input) !== "object" || input === null) return input;
2725
+ if (_typeof$3(input) !== "object" || input === null) return input;
2724
2726
  var prim = input[Symbol.toPrimitive];
2725
2727
  if (prim !== undefined) {
2726
2728
  var res = prim.call(input, hint || "default");
2727
- if (_typeof$2(res) !== "object") return res;
2729
+ if (_typeof$3(res) !== "object") return res;
2728
2730
  throw new TypeError("@@toPrimitive must return a primitive value.");
2729
2731
  }
2730
2732
  return (hint === "string" ? String : Number)(input);
@@ -2732,7 +2734,7 @@ function _toPrimitive$2(input, hint) {
2732
2734
 
2733
2735
  function _toPropertyKey$2(arg) {
2734
2736
  var key = _toPrimitive$2(arg, "string");
2735
- return _typeof$2(key) === "symbol" ? key : String(key);
2737
+ return _typeof$3(key) === "symbol" ? key : String(key);
2736
2738
  }
2737
2739
 
2738
2740
  function _defineProperties$1(target, props) {
@@ -3131,22 +3133,22 @@ function _objectWithoutProperties$1(source, excluded) {
3131
3133
  return target;
3132
3134
  }
3133
3135
 
3134
- function _typeof$1(obj) {
3136
+ function _typeof$2(obj) {
3135
3137
  "@babel/helpers - typeof";
3136
3138
 
3137
- return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
3139
+ return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
3138
3140
  return typeof obj;
3139
3141
  } : function (obj) {
3140
3142
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
3141
- }, _typeof$1(obj);
3143
+ }, _typeof$2(obj);
3142
3144
  }
3143
3145
 
3144
3146
  function _toPrimitive$1(input, hint) {
3145
- if (_typeof$1(input) !== "object" || input === null) return input;
3147
+ if (_typeof$2(input) !== "object" || input === null) return input;
3146
3148
  var prim = input[Symbol.toPrimitive];
3147
3149
  if (prim !== undefined) {
3148
3150
  var res = prim.call(input, hint || "default");
3149
- if (_typeof$1(res) !== "object") return res;
3151
+ if (_typeof$2(res) !== "object") return res;
3150
3152
  throw new TypeError("@@toPrimitive must return a primitive value.");
3151
3153
  }
3152
3154
  return (hint === "string" ? String : Number)(input);
@@ -3154,7 +3156,7 @@ function _toPrimitive$1(input, hint) {
3154
3156
 
3155
3157
  function _toPropertyKey$1(arg) {
3156
3158
  var key = _toPrimitive$1(arg, "string");
3157
- return _typeof$1(key) === "symbol" ? key : String(key);
3159
+ return _typeof$2(key) === "symbol" ? key : String(key);
3158
3160
  }
3159
3161
 
3160
3162
  function _defineProperty$1(obj, key, value) {
@@ -3468,7 +3470,7 @@ function nodesToString(children, i18nOptions) {
3468
3470
  }
3469
3471
  } else if (child === null) {
3470
3472
  warn("Trans: the passed in value is invalid - seems you passed in a null child.");
3471
- } else if (_typeof$1(child) === 'object') {
3473
+ } else if (_typeof$2(child) === 'object') {
3472
3474
  var format = child.format,
3473
3475
  clone = _objectWithoutProperties$1(child, _excluded$2);
3474
3476
 
@@ -3498,7 +3500,7 @@ function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, s
3498
3500
  var childrenArray = getAsArray(childs);
3499
3501
  childrenArray.forEach(function (child) {
3500
3502
  if (typeof child === 'string') return;
3501
- if (hasChildren(child)) getData(getChildren(child));else if (_typeof$1(child) === 'object' && !React__default["default"].isValidElement(child)) Object.assign(data, child);
3503
+ if (hasChildren(child)) getData(getChildren(child));else if (_typeof$2(child) === 'object' && !React__default["default"].isValidElement(child)) Object.assign(data, child);
3502
3504
  });
3503
3505
  }
3504
3506
 
@@ -3535,8 +3537,8 @@ function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, s
3535
3537
  }, tmp) : tmp;
3536
3538
  var isElement = React__default["default"].isValidElement(child);
3537
3539
  var isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;
3538
- var isEmptyTransWithHTML = emptyChildrenButNeedsHandling && _typeof$1(child) === 'object' && child.dummy && !isElement;
3539
- var isKnownComponent = _typeof$1(children) === 'object' && children !== null && Object.hasOwnProperty.call(children, node.name);
3540
+ var isEmptyTransWithHTML = emptyChildrenButNeedsHandling && _typeof$2(child) === 'object' && child.dummy && !isElement;
3541
+ var isKnownComponent = _typeof$2(children) === 'object' && children !== null && Object.hasOwnProperty.call(children, node.name);
3540
3542
 
3541
3543
  if (typeof child === 'string') {
3542
3544
  var value = i18n.services.interpolator.interpolate(child, opts, i18n.language);
@@ -3574,7 +3576,7 @@ function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, s
3574
3576
 
3575
3577
  mem.push("<".concat(node.name, ">").concat(_inner4, "</").concat(node.name, ">"));
3576
3578
  }
3577
- } else if (_typeof$1(child) === 'object' && !isElement) {
3579
+ } else if (_typeof$2(child) === 'object' && !isElement) {
3578
3580
  var content = node.children[0] ? translationContent : null;
3579
3581
  if (content) mem.push(content);
3580
3582
  } else if (node.children.length === 1 && translationContent) {
@@ -3672,11 +3674,11 @@ function Trans(_ref) {
3672
3674
  return useAsParent ? React__default["default"].createElement(useAsParent, additionalProps, content) : content;
3673
3675
  }
3674
3676
 
3675
- function _arrayWithHoles$1(arr) {
3677
+ function _arrayWithHoles$2(arr) {
3676
3678
  if (Array.isArray(arr)) return arr;
3677
3679
  }
3678
3680
 
3679
- function _iterableToArrayLimit$1(arr, i) {
3681
+ function _iterableToArrayLimit$2(arr, i) {
3680
3682
  var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
3681
3683
  if (null != _i) {
3682
3684
  var _s,
@@ -3704,27 +3706,27 @@ function _iterableToArrayLimit$1(arr, i) {
3704
3706
  }
3705
3707
  }
3706
3708
 
3707
- function _arrayLikeToArray$1(arr, len) {
3709
+ function _arrayLikeToArray$2(arr, len) {
3708
3710
  if (len == null || len > arr.length) len = arr.length;
3709
3711
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
3710
3712
  return arr2;
3711
3713
  }
3712
3714
 
3713
- function _unsupportedIterableToArray$1(o, minLen) {
3715
+ function _unsupportedIterableToArray$2(o, minLen) {
3714
3716
  if (!o) return;
3715
- if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
3717
+ if (typeof o === "string") return _arrayLikeToArray$2(o, minLen);
3716
3718
  var n = Object.prototype.toString.call(o).slice(8, -1);
3717
3719
  if (n === "Object" && o.constructor) n = o.constructor.name;
3718
3720
  if (n === "Map" || n === "Set") return Array.from(o);
3719
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
3721
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen);
3720
3722
  }
3721
3723
 
3722
- function _nonIterableRest$1() {
3724
+ function _nonIterableRest$2() {
3723
3725
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3724
3726
  }
3725
3727
 
3726
- function _slicedToArray$1(arr, i) {
3727
- return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1();
3728
+ function _slicedToArray$2(arr, i) {
3729
+ return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$2(arr, i) || _nonIterableRest$2();
3728
3730
  }
3729
3731
 
3730
3732
  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; }
@@ -3773,7 +3775,7 @@ function useTranslation(ns) {
3773
3775
  }
3774
3776
 
3775
3777
  var _useState = React.useState(getT),
3776
- _useState2 = _slicedToArray$1(_useState, 2),
3778
+ _useState2 = _slicedToArray$2(_useState, 2),
3777
3779
  t = _useState2[0],
3778
3780
  setT = _useState2[1];
3779
3781
 
@@ -3826,113 +3828,107 @@ function useTranslation(ns) {
3826
3828
  });
3827
3829
  }
3828
3830
 
3829
- var alerts$1 = {
3830
- deleting_: "You are permanently deleting the {{what}} <strong>{{- name}}</strong>. This can't be undone."
3831
- };
3832
- var buttons$1 = {
3833
- cancel: "Cancel",
3834
- saveChanges: "Save changes",
3835
- approve: "Approve",
3836
- decline: "Decline",
3837
- "delete": "Delete"
3838
- };
3839
- var common$1 = {
3840
- approval_one: "Approval",
3841
- approval_other: "Approvals",
3842
- pending: "Pending",
3843
- template_one: "Template",
3844
- template_other: "Templates",
3845
- approvalTemplate_one: "Approval template",
3846
- approvalTemplate_other: "Approval templates",
3847
- history: "History",
3848
- approvalHistory: "Approval history",
3849
- approver_one: "Approver",
3850
- approver_other: "Approvers",
3851
- email: "Email",
3852
- edit: "Edit",
3853
- "delete": "Delete",
3854
- delete_: "Delete {{what}}?",
3855
- add_: "Add {{what}}",
3856
- edit_: "Edit {{what}}",
3857
- name: "Name",
3858
- notFound_: "There are no {{what}} to show",
3859
- notFound: "Could not find the approval request.",
3860
- visibility: "Visibility",
3861
- variable: "Variable",
3862
- variable_: "Variable {{number}}",
3863
- pendingApproval_one: "Pending approval",
3864
- pendingApproval_other: "Pending approvals",
3865
- title: "Title",
3866
- id: "Id",
3867
- created: "Created",
3868
- status: "Status",
3869
- record_one: "Record",
3870
- record_other: "Records",
3871
- note: "Note",
3872
- approvedBy: "Approved by",
3873
- rejectedBy: "Rejected by",
3874
- cancelledBy: "Cancelled by",
3875
- waitingFor: "Waiting for",
3876
- templateDetails: "Template details",
3877
- field: "Field",
3878
- noDataHelpText: "Here is how you can use <a>{{entity}}.</a>"
3879
- };
3880
- var validations$1 = {
3881
- limitExceeded: "You have exceeded the limit of {{limit}} characters for the {{what}}.",
3882
- approver: "Please select a approver",
3883
- required: "{{what}} is required",
3884
- variableName: "Name must be alphanumeric, may include underscore, must start with a letter and must not end with an underscore.",
3885
- pleaseEnter_: "Please enter {{what}}"
3886
- };
3887
- var sidebar = {
3888
- description: "View and manage approvals."
3889
- };
3890
- var inputs = {
3891
- labels: {
3892
- firstName: "First name",
3893
- lastName: "Last name",
3894
- description: "Description",
3895
- approver: "Approver",
3896
- variableMapping: "Variable mapping",
3897
- message: "Message"
3831
+ var neetoApprovals = {
3832
+ alerts: {
3833
+ deleting_: "You are permanently deleting the {{what}} <strong>{{- name}}</strong>. This can't be undone."
3898
3834
  },
3899
- placeholders: {
3900
- firstName: "Enter first name",
3901
- lastName: "Enter last name",
3902
- email: "Enter email",
3903
- name: "Enter name",
3904
- description: "Enter description",
3905
- enter_: "Enter {{what}}",
3906
- search_: "Search {{what}}",
3907
- select_: "Select {{what}}",
3908
- add_: "Add {{what}}"
3909
- }
3910
- };
3911
- var typography = {
3912
- newApprover: "Add new approver",
3913
- editApprover: "Edit approver",
3914
- approvalRequest: "Approval request has been <strong>{{status}}</strong>."
3915
- };
3916
- var select = {
3917
- visibility: {
3918
- everyone: "Everyone"
3835
+ buttons: {
3836
+ cancel: "Cancel",
3837
+ saveChanges: "Save changes",
3838
+ approve: "Approve",
3839
+ decline: "Decline",
3840
+ "delete": "Delete"
3919
3841
  },
3920
- approval: "Select approval"
3921
- };
3922
- var example = {
3923
- settings: "Settings",
3924
- general: "General"
3842
+ common: {
3843
+ approval_one: "Approval",
3844
+ approval_other: "Approvals",
3845
+ pending: "Pending",
3846
+ template_one: "Template",
3847
+ template_other: "Templates",
3848
+ approvalTemplate_one: "Approval template",
3849
+ approvalTemplate_other: "Approval templates",
3850
+ history: "History",
3851
+ approvalHistory: "Approval history",
3852
+ approver_one: "Approver",
3853
+ approver_other: "Approvers",
3854
+ email: "Email",
3855
+ edit: "Edit",
3856
+ "delete": "Delete",
3857
+ delete_: "Delete {{what}}?",
3858
+ add_: "Add {{what}}",
3859
+ edit_: "Edit {{what}}",
3860
+ name: "Name",
3861
+ notFound_: "There are no {{what}} to show",
3862
+ notFound: "Could not find the approval request.",
3863
+ visibility: "Visibility",
3864
+ variable: "Variable",
3865
+ variable_: "Variable {{number}}",
3866
+ pendingApproval_one: "Pending approval",
3867
+ pendingApproval_other: "Pending approvals",
3868
+ title: "Title",
3869
+ id: "Id",
3870
+ created: "Created",
3871
+ status: "Status",
3872
+ record_one: "Record",
3873
+ record_other: "Records",
3874
+ note: "Note",
3875
+ approvedBy: "Approved by",
3876
+ rejectedBy: "Rejected by",
3877
+ cancelledBy: "Cancelled by",
3878
+ waitingFor: "Waiting for",
3879
+ templateDetails: "Template details",
3880
+ field: "Field",
3881
+ noDataHelpText: "Here is how you can use <a>{{entity}}.</a>"
3882
+ },
3883
+ validations: {
3884
+ limitExceeded: "You have exceeded the limit of {{limit}} characters for the {{what}}.",
3885
+ approver: "Please select a approver",
3886
+ required: "{{what}} is required",
3887
+ variableName: "Name must be alphanumeric, may include underscore, must start with a letter and must not end with an underscore.",
3888
+ pleaseEnter_: "Please enter {{what}}"
3889
+ },
3890
+ sidebar: {
3891
+ description: "View and manage approvals."
3892
+ },
3893
+ inputs: {
3894
+ labels: {
3895
+ firstName: "First name",
3896
+ lastName: "Last name",
3897
+ description: "Description",
3898
+ approver: "Approver",
3899
+ variableMapping: "Variable mapping",
3900
+ message: "Message"
3901
+ },
3902
+ placeholders: {
3903
+ firstName: "Enter first name",
3904
+ lastName: "Enter last name",
3905
+ email: "Enter email",
3906
+ name: "Enter name",
3907
+ description: "Enter description",
3908
+ enter_: "Enter {{what}}",
3909
+ search_: "Search {{what}}",
3910
+ select_: "Select {{what}}",
3911
+ add_: "Add {{what}}"
3912
+ }
3913
+ },
3914
+ typography: {
3915
+ newApprover: "Add new approver",
3916
+ editApprover: "Edit approver",
3917
+ approvalRequest: "Approval request has been <strong>{{status}}</strong>."
3918
+ },
3919
+ select: {
3920
+ visibility: {
3921
+ everyone: "Everyone"
3922
+ },
3923
+ approval: "Select approval"
3924
+ },
3925
+ example: {
3926
+ settings: "Settings",
3927
+ general: "General"
3928
+ }
3925
3929
  };
3926
3930
  var en = {
3927
- alerts: alerts$1,
3928
- buttons: buttons$1,
3929
- common: common$1,
3930
- validations: validations$1,
3931
- sidebar: sidebar,
3932
- inputs: inputs,
3933
- typography: typography,
3934
- select: select,
3935
- example: example
3931
+ neetoApprovals: neetoApprovals
3936
3932
  };
3937
3933
 
3938
3934
  var alerts = {
@@ -4047,22 +4043,22 @@ instance.use(Browser).use(initReactI18next).init({
4047
4043
  }
4048
4044
  });
4049
4045
 
4050
- function _typeof(obj) {
4046
+ function _typeof$1(obj) {
4051
4047
  "@babel/helpers - typeof";
4052
4048
 
4053
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
4049
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
4054
4050
  return typeof obj;
4055
4051
  } : function (obj) {
4056
4052
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
4057
- }, _typeof(obj);
4053
+ }, _typeof$1(obj);
4058
4054
  }
4059
4055
 
4060
4056
  function _toPrimitive(input, hint) {
4061
- if (_typeof(input) !== "object" || input === null) return input;
4057
+ if (_typeof$1(input) !== "object" || input === null) return input;
4062
4058
  var prim = input[Symbol.toPrimitive];
4063
4059
  if (prim !== undefined) {
4064
4060
  var res = prim.call(input, hint || "default");
4065
- if (_typeof(res) !== "object") return res;
4061
+ if (_typeof$1(res) !== "object") return res;
4066
4062
  throw new TypeError("@@toPrimitive must return a primitive value.");
4067
4063
  }
4068
4064
  return (hint === "string" ? String : Number)(input);
@@ -4070,7 +4066,7 @@ function _toPrimitive(input, hint) {
4070
4066
 
4071
4067
  function _toPropertyKey(arg) {
4072
4068
  var key = _toPrimitive(arg, "string");
4073
- return _typeof(key) === "symbol" ? key : String(key);
4069
+ return _typeof$1(key) === "symbol" ? key : String(key);
4074
4070
  }
4075
4071
 
4076
4072
  function _defineProperty(obj, key, value) {
@@ -4088,11 +4084,11 @@ function _defineProperty(obj, key, value) {
4088
4084
  return obj;
4089
4085
  }
4090
4086
 
4091
- function _arrayWithHoles(arr) {
4087
+ function _arrayWithHoles$1(arr) {
4092
4088
  if (Array.isArray(arr)) return arr;
4093
4089
  }
4094
4090
 
4095
- function _iterableToArrayLimit(arr, i) {
4091
+ function _iterableToArrayLimit$1(arr, i) {
4096
4092
  var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
4097
4093
  if (null != _i) {
4098
4094
  var _s,
@@ -4120,27 +4116,27 @@ function _iterableToArrayLimit(arr, i) {
4120
4116
  }
4121
4117
  }
4122
4118
 
4123
- function _arrayLikeToArray(arr, len) {
4119
+ function _arrayLikeToArray$1(arr, len) {
4124
4120
  if (len == null || len > arr.length) len = arr.length;
4125
4121
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
4126
4122
  return arr2;
4127
4123
  }
4128
4124
 
4129
- function _unsupportedIterableToArray(o, minLen) {
4125
+ function _unsupportedIterableToArray$1(o, minLen) {
4130
4126
  if (!o) return;
4131
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
4127
+ if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
4132
4128
  var n = Object.prototype.toString.call(o).slice(8, -1);
4133
4129
  if (n === "Object" && o.constructor) n = o.constructor.name;
4134
4130
  if (n === "Map" || n === "Set") return Array.from(o);
4135
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
4131
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
4136
4132
  }
4137
4133
 
4138
- function _nonIterableRest() {
4134
+ function _nonIterableRest$1() {
4139
4135
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4140
4136
  }
4141
4137
 
4142
- function _slicedToArray(arr, i) {
4143
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
4138
+ function _slicedToArray$1(arr, i) {
4139
+ return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1();
4144
4140
  }
4145
4141
 
4146
4142
  var BASE_URL = "neeto_approvals";
@@ -4185,15 +4181,15 @@ var APPROVAL_REQUEST_FORM_INITIAL_VALUES = {
4185
4181
  };
4186
4182
  var APPROVAL_REQUEST_FORM_VALIDATION_SCHEMA = yup__namespace.object().shape({
4187
4183
  variables: yup__namespace.array().of(yup__namespace.object().shape({
4188
- variable: yup__namespace.string().trim().required(t$2("validations.required", {
4189
- what: t$2("common.field")
4184
+ variable: yup__namespace.string().trim().required(t$2("neetoApprovals.validations.required", {
4185
+ what: t$2("neetoApprovals.common.field")
4190
4186
  }))
4191
4187
  }))
4192
4188
  });
4193
4189
  var STATUS_UPDATED_BY = {
4194
- rejected: t$2("common.rejectedBy"),
4195
- approved: t$2("common.approvedBy"),
4196
- cancelled: t$2("common.cancelledBy")
4190
+ rejected: t$2("neetoApprovals.common.rejectedBy"),
4191
+ approved: t$2("neetoApprovals.common.approvedBy"),
4192
+ cancelled: t$2("neetoApprovals.common.cancelledBy")
4197
4193
  };
4198
4194
 
4199
4195
  var handleEmptyPage = function handleEmptyPage(data, pageProperties, handleTablePagination) {
@@ -4302,7 +4298,7 @@ var usePaginate = function usePaginate() {
4302
4298
  index: Number(urlParams.get("page")) || constants.DEFAULT_PAGE_INDEX,
4303
4299
  size: Number(urlParams.get("size")) || DEFAULT_PAGE_SIZE
4304
4300
  }),
4305
- _useState2 = _slicedToArray(_useState, 2),
4301
+ _useState2 = _slicedToArray$1(_useState, 2),
4306
4302
  pageProperties = _useState2[0],
4307
4303
  setPageProperties = _useState2[1];
4308
4304
  var history = reactRouterDom.useHistory();
@@ -4339,20 +4335,20 @@ var APPROVER_FORM_INITIAL_VALUES = {
4339
4335
  email: ""
4340
4336
  };
4341
4337
  var APPROVER_FORM_VALIDATION_SCHEMA = yup__namespace.object().shape({
4342
- firstName: yup__namespace.string().trim().max(MAX_NAME_LENGTH, t$2("validations.limitExceeded", {
4343
- what: (_t$1 = t$2("inputs.labels.firstName")) === null || _t$1 === void 0 ? void 0 : _t$1.toLocaleLowerCase(),
4338
+ firstName: yup__namespace.string().trim().max(MAX_NAME_LENGTH, t$2("neetoApprovals.validations.limitExceeded", {
4339
+ what: (_t$1 = t$2("neetoApprovals.inputs.labels.firstName")) === null || _t$1 === void 0 ? void 0 : _t$1.toLocaleLowerCase(),
4344
4340
  limit: MAX_NAME_LENGTH
4345
- })).required(t$2("validations.required", {
4346
- what: t$2("inputs.labels.firstName")
4341
+ })).required(t$2("neetoApprovals.validations.required", {
4342
+ what: t$2("neetoApprovals.inputs.labels.firstName")
4347
4343
  })),
4348
- lastName: yup__namespace.string().trim().max(MAX_NAME_LENGTH, t$2("validations.limitExceeded", {
4349
- what: (_t2 = t$2("inputs.labels.lastName")) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase(),
4344
+ lastName: yup__namespace.string().trim().max(MAX_NAME_LENGTH, t$2("neetoApprovals.validations.limitExceeded", {
4345
+ what: (_t2 = t$2("neetoApprovals.inputs.labels.lastName")) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase(),
4350
4346
  limit: MAX_NAME_LENGTH
4351
- })).required(t$2("validations.required", {
4352
- what: t$2("inputs.labels.lastName")
4347
+ })).required(t$2("neetoApprovals.validations.required", {
4348
+ what: t$2("neetoApprovals.inputs.labels.lastName")
4353
4349
  })),
4354
- email: yup__namespace.string().email().required(t$2("validations.required", {
4355
- what: t$2("common.email")
4350
+ email: yup__namespace.string().email().required(t$2("neetoApprovals.validations.required", {
4351
+ what: t$2("neetoApprovals.common.email")
4356
4352
  }))
4357
4353
  });
4358
4354
 
@@ -4372,7 +4368,7 @@ var Form$2 = function Form(_ref) {
4372
4368
  onClose: onClose
4373
4369
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Header, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
4374
4370
  style: "h2"
4375
- }, ramda.isEmpty(initialData) ? t("typography.newApprover") : t("typography.editApprover"))), /*#__PURE__*/React__default["default"].createElement(formik.Form, {
4371
+ }, ramda.isEmpty(initialData) ? t("neetoApprovals.typography.newApprover") : t("neetoApprovals.typography.editApprover"))), /*#__PURE__*/React__default["default"].createElement(formik.Form, {
4376
4372
  formikProps: {
4377
4373
  initialValues: initialData || APPROVER_FORM_INITIAL_VALUES,
4378
4374
  validationSchema: APPROVER_FORM_VALIDATION_SCHEMA,
@@ -4383,30 +4379,30 @@ var Form$2 = function Form(_ref) {
4383
4379
  }, /*#__PURE__*/React__default["default"].createElement(formik.Input, {
4384
4380
  required: true,
4385
4381
  className: "w-full",
4386
- label: t("inputs.labels.firstName"),
4382
+ label: t("neetoApprovals.inputs.labels.firstName"),
4387
4383
  name: "firstName",
4388
- placeholder: t("inputs.placeholders.firstName"),
4384
+ placeholder: t("neetoApprovals.inputs.placeholders.firstName"),
4389
4385
  ref: inputReference
4390
4386
  }), /*#__PURE__*/React__default["default"].createElement(formik.Input, {
4391
4387
  required: true,
4392
4388
  className: "w-full",
4393
- label: t("inputs.labels.lastName"),
4389
+ label: t("neetoApprovals.inputs.labels.lastName"),
4394
4390
  name: "lastName",
4395
- placeholder: t("inputs.placeholders.lastName")
4391
+ placeholder: t("neetoApprovals.inputs.placeholders.lastName")
4396
4392
  }), /*#__PURE__*/React__default["default"].createElement(formik.Input, {
4397
4393
  required: true,
4398
4394
  className: "w-full",
4399
- label: t("common.email"),
4395
+ label: t("neetoApprovals.common.email"),
4400
4396
  name: "email",
4401
- placeholder: t("inputs.placeholders.email")
4397
+ placeholder: t("neetoApprovals.inputs.placeholders.email")
4402
4398
  }))), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Footer, {
4403
4399
  className: "flex gap-x-2"
4404
4400
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
4405
- label: t("buttons.saveChanges"),
4401
+ label: t("neetoApprovals.buttons.saveChanges"),
4406
4402
  loading: isLoading,
4407
4403
  type: "submit"
4408
4404
  }), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
4409
- label: t("buttons.cancel"),
4405
+ label: t("neetoApprovals.buttons.cancel"),
4410
4406
  style: "text",
4411
4407
  onClick: onClose
4412
4408
  })))));
@@ -4490,12 +4486,12 @@ var columnData$1 = function columnData(_ref) {
4490
4486
  dataIndex: "name",
4491
4487
  key: "name",
4492
4488
  sorter: true,
4493
- title: instance.t("common.name")
4489
+ title: instance.t("neetoApprovals.common.name")
4494
4490
  }, {
4495
4491
  dataIndex: "email",
4496
4492
  key: "email",
4497
4493
  sorter: true,
4498
- title: instance.t("common.email")
4494
+ title: instance.t("neetoApprovals.common.email")
4499
4495
  }, {
4500
4496
  key: "actions",
4501
4497
  ellipsis: true,
@@ -4507,24 +4503,24 @@ var columnData$1 = function columnData(_ref) {
4507
4503
  }
4508
4504
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, {
4509
4505
  autoWidth: true,
4506
+ buttonProps: {
4507
+ style: "text"
4508
+ },
4510
4509
  className: "flex-shrink-0",
4511
4510
  icon: neetoIcons.MenuHorizontal,
4512
4511
  position: "bottom-end",
4513
- strategy: "fixed",
4514
- buttonProps: {
4515
- style: "text"
4516
- }
4512
+ strategy: "fixed"
4517
4513
  }, /*#__PURE__*/React__default["default"].createElement(Menu$1, null, /*#__PURE__*/React__default["default"].createElement(MenuItem$1.Button, {
4518
4514
  "data-cy": "approvers-edit-button",
4519
4515
  onClick: function onClick() {
4520
4516
  return onEditClick(approver);
4521
4517
  }
4522
- }, instance.t("common.edit")), /*#__PURE__*/React__default["default"].createElement(MenuItem$1.Button, {
4518
+ }, instance.t("neetoApprovals.common.edit")), /*#__PURE__*/React__default["default"].createElement(MenuItem$1.Button, {
4523
4519
  "data-cy": "approvers-delete-button",
4524
4520
  onClick: function onClick() {
4525
4521
  return onDeleteClick(approver);
4526
4522
  }
4527
- }, instance.t("common.delete")))));
4523
+ }, instance.t("neetoApprovals.common.delete")))));
4528
4524
  }
4529
4525
  }];
4530
4526
  };
@@ -4577,7 +4573,7 @@ var renderNoDataHelpText = function renderNoDataHelpText(_ref) {
4577
4573
  var entity = _ref.entity,
4578
4574
  url = _ref.url;
4579
4575
  return /*#__PURE__*/React__default["default"].createElement(Trans, {
4580
- i18nKey: "common.noDataHelpText",
4576
+ i18nKey: "neetoApprovals.common.noDataHelpText",
4581
4577
  values: {
4582
4578
  entity: entity
4583
4579
  },
@@ -4626,8 +4622,8 @@ var Table = function Table(_ref) {
4626
4622
  };
4627
4623
  var noDataProps = {
4628
4624
  primaryButtonProps: {
4629
- label: t("common.add_", {
4630
- what: (_t = t("common.template", constants.SINGULAR)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
4625
+ label: t("neetoApprovals.common.add_", {
4626
+ what: (_t = t("neetoApprovals.common.template", constants.SINGULAR)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
4631
4627
  }),
4632
4628
  onClick: function onClick() {
4633
4629
  return setIsPaneOpen(true);
@@ -4642,13 +4638,14 @@ var Table = function Table(_ref) {
4642
4638
  return /*#__PURE__*/React__default["default"].createElement("div", {
4643
4639
  className: "flex h-full w-full flex-grow items-center justify-center"
4644
4640
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.NoData, _extends({
4645
- title: t("common.notFound_", {
4641
+ title: t("neetoApprovals.common.notFound_", {
4646
4642
  what: entity
4647
4643
  })
4648
4644
  }, !filters.search && noDataProps)));
4649
4645
  }
4650
- return /*#__PURE__*/React__default["default"].createElement("div", {
4651
- className: "neeto-approvals__table-wrapper"
4646
+ return /*#__PURE__*/React__default["default"].createElement(TableWrapper__default["default"], {
4647
+ className: "mt-12",
4648
+ hasPagination: totalCount > pageProperties.size
4652
4649
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Table, _extends({
4653
4650
  fixedHeight: true,
4654
4651
  columnData: columns,
@@ -4677,11 +4674,11 @@ var Approvers = function Approvers(_ref) {
4677
4674
  helpDocUrl = _ref.helpDocUrl,
4678
4675
  setFilters = _ref.setFilters;
4679
4676
  var _useState = React.useState(""),
4680
- _useState2 = _slicedToArray(_useState, 2),
4677
+ _useState2 = _slicedToArray$1(_useState, 2),
4681
4678
  approverToEdit = _useState2[0],
4682
4679
  setApproverToEdit = _useState2[1];
4683
4680
  var _useState3 = React.useState(""),
4684
- _useState4 = _slicedToArray(_useState3, 2),
4681
+ _useState4 = _slicedToArray$1(_useState3, 2),
4685
4682
  approverToDelete = _useState4[0],
4686
4683
  setApproverToDelete = _useState4[1];
4687
4684
  var debouncedSearch = reactUtils.useDebounce(filters.search, SEARCH_DELAY);
@@ -4717,7 +4714,7 @@ var Approvers = function Approvers(_ref) {
4717
4714
  var onDeleteClick = function onDeleteClick(approver) {
4718
4715
  setApproverToDelete(approver);
4719
4716
  };
4720
- var entity = (_t = t("common.approver", constants.PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase();
4717
+ var entity = (_t = t("neetoApprovals.common.approver", constants.PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase();
4721
4718
  var handleDelete = function handleDelete(approverId) {
4722
4719
  deleteApprover({
4723
4720
  approverId: approverId
@@ -4747,16 +4744,16 @@ var Approvers = function Approvers(_ref) {
4747
4744
  }), /*#__PURE__*/React__default["default"].createElement(neetoui.Alert, {
4748
4745
  isOpen: !!approverToDelete,
4749
4746
  isSubmitting: isDeleting,
4750
- submitButtonLabel: t("buttons.delete"),
4747
+ submitButtonLabel: t("neetoApprovals.buttons.delete"),
4751
4748
  message: /*#__PURE__*/React__default["default"].createElement(Trans, {
4752
- i18nKey: "alerts.deleting_",
4749
+ i18nKey: "neetoApprovals.alerts.deleting_",
4753
4750
  values: {
4754
- what: (_t2 = t("common.approver", constants.SINGULAR)) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase(),
4751
+ what: (_t2 = t("neetoApprovals.common.approver", constants.SINGULAR)) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase(),
4755
4752
  name: approverToDelete === null || approverToDelete === void 0 ? void 0 : approverToDelete.name
4756
4753
  }
4757
4754
  }),
4758
- title: t("common.delete_", {
4759
- what: (_t3 = t("common.approver", constants.SINGULAR)) === null || _t3 === void 0 ? void 0 : _t3.toLocaleLowerCase()
4755
+ title: t("neetoApprovals.common.delete_", {
4756
+ what: (_t3 = t("neetoApprovals.common.approver", constants.SINGULAR)) === null || _t3 === void 0 ? void 0 : _t3.toLocaleLowerCase()
4760
4757
  }),
4761
4758
  onClose: function onClose() {
4762
4759
  return setApproverToDelete("");
@@ -4767,6 +4764,136 @@ var Approvers = function Approvers(_ref) {
4767
4764
  }));
4768
4765
  };
4769
4766
 
4767
+ function _arrayWithHoles(arr) {
4768
+ if (Array.isArray(arr)) return arr;
4769
+ }
4770
+
4771
+ function _iterableToArrayLimit(arr, i) {
4772
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
4773
+ if (null != _i) {
4774
+ var _s,
4775
+ _e,
4776
+ _x,
4777
+ _r,
4778
+ _arr = [],
4779
+ _n = !0,
4780
+ _d = !1;
4781
+ try {
4782
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
4783
+ if (Object(_i) !== _i) return;
4784
+ _n = !1;
4785
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
4786
+ } catch (err) {
4787
+ _d = !0, _e = err;
4788
+ } finally {
4789
+ try {
4790
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
4791
+ } finally {
4792
+ if (_d) throw _e;
4793
+ }
4794
+ }
4795
+ return _arr;
4796
+ }
4797
+ }
4798
+
4799
+ function _arrayLikeToArray(arr, len) {
4800
+ if (len == null || len > arr.length) len = arr.length;
4801
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
4802
+ return arr2;
4803
+ }
4804
+
4805
+ function _unsupportedIterableToArray(o, minLen) {
4806
+ if (!o) return;
4807
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
4808
+ var n = Object.prototype.toString.call(o).slice(8, -1);
4809
+ if (n === "Object" && o.constructor) n = o.constructor.name;
4810
+ if (n === "Map" || n === "Set") return Array.from(o);
4811
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
4812
+ }
4813
+
4814
+ function _nonIterableRest() {
4815
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4816
+ }
4817
+
4818
+ function _slicedToArray(arr, i) {
4819
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
4820
+ }
4821
+
4822
+ function _typeof(obj) {
4823
+ "@babel/helpers - typeof";
4824
+
4825
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
4826
+ return typeof obj;
4827
+ } : function (obj) {
4828
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
4829
+ }, _typeof(obj);
4830
+ }
4831
+
4832
+ /**
4833
+ * @template {Function} T
4834
+ * @param {T} func
4835
+ * @returns {T}
4836
+ */
4837
+ var nullSafe = function nullSafe(func) {
4838
+ return (
4839
+ // @ts-ignore
4840
+ ramda.curryN(func.length, function () {
4841
+ var _ref;
4842
+ var dataArg = (_ref = func.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref]);
4843
+ return ramda.isNil(dataArg) ? dataArg : func.apply(void 0, arguments);
4844
+ })
4845
+ );
4846
+ };
4847
+ var noop = function noop() {};
4848
+ var isNotPresent = /*#__PURE__*/ramda.either(ramda.isNil, ramda.isEmpty);
4849
+ var isPresent = /*#__PURE__*/ramda.complement(isNotPresent);
4850
+ var camelToSnakeCase = function camelToSnakeCase(string) {
4851
+ return string.replace(/[A-Z]/g, function (letter) {
4852
+ return "_".concat(letter.toLowerCase());
4853
+ });
4854
+ };
4855
+ var capitalize = function capitalize(string) {
4856
+ return string.charAt(0).toUpperCase() + string.slice(1);
4857
+ };
4858
+
4859
+ var matchesImpl = function matchesImpl(pattern, object) {
4860
+ var __parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : object;
4861
+ if (object === pattern) return true;
4862
+ if (typeof pattern === "function" && pattern(object, __parent)) return true;
4863
+ if (ramda.isNil(pattern) || ramda.isNil(object)) return false;
4864
+ if (_typeof(pattern) !== "object") return false;
4865
+ return Object.entries(pattern).every(function (_ref) {
4866
+ var _ref2 = _slicedToArray(_ref, 2),
4867
+ key = _ref2[0],
4868
+ value = _ref2[1];
4869
+ return matchesImpl(value, object[key], __parent);
4870
+ });
4871
+ };
4872
+ var matches = /*#__PURE__*/ramda.curry(function (pattern, object) {
4873
+ return matchesImpl(pattern, object);
4874
+ });
4875
+ var filterNonNull = function filterNonNull(object) {
4876
+ return Object.fromEntries(Object.entries(object).filter(function (_ref5) {
4877
+ var _ref6 = _slicedToArray(_ref5, 2),
4878
+ v = _ref6[1];
4879
+ return !ramda.isNil(v);
4880
+ }).map(function (_ref7) {
4881
+ var _ref8 = _slicedToArray(_ref7, 2),
4882
+ k = _ref8[0],
4883
+ v = _ref8[1];
4884
+ return [k, _typeof(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
4885
+ }));
4886
+ };
4887
+ nullSafe(filterNonNull);
4888
+ var findById = /*#__PURE__*/ramda.curry(function (id, array) {
4889
+ return array.find(function (item) {
4890
+ return item.id === id;
4891
+ });
4892
+ });
4893
+ var findBy = /*#__PURE__*/ramda.curry(function (pattern, array) {
4894
+ return array.find(matches(pattern));
4895
+ });
4896
+
4770
4897
  var fetch$2 = function fetch(params, url) {
4771
4898
  return axios__default["default"].get(url, {
4772
4899
  params: params
@@ -4821,8 +4948,8 @@ dayjs__default["default"].extend(timezone__default["default"]);
4821
4948
  var updateApprovalDetails = function updateApprovalDetails(_ref) {
4822
4949
  var requestsData = _ref.requestsData,
4823
4950
  approvalDetails = _ref.approvalDetails;
4824
- if (pure.isPresent(requestsData === null || requestsData === void 0 ? void 0 : requestsData.requests) && pure.isPresent(approvalDetails)) {
4825
- var request = pure.findBy({
4951
+ if (isPresent(requestsData === null || requestsData === void 0 ? void 0 : requestsData.requests) && isPresent(approvalDetails)) {
4952
+ var request = findBy({
4826
4953
  id: approvalDetails.id
4827
4954
  }, requestsData.requests) || {};
4828
4955
  return request;
@@ -4837,19 +4964,19 @@ var timeInZone = function timeInZone(time) {
4837
4964
  var getApprovalFilter = function getApprovalFilter() {
4838
4965
  return {
4839
4966
  PENDING: {
4840
- label: t$2("common.pending"),
4967
+ label: t$2("neetoApprovals.common.pending"),
4841
4968
  value: "PENDING"
4842
4969
  },
4843
4970
  TEMPLATES: {
4844
- label: t$2("common.template", constants.PLURAL),
4971
+ label: t$2("neetoApprovals.common.template", constants.PLURAL),
4845
4972
  value: "TEMPLATES"
4846
4973
  },
4847
4974
  HISTORY: {
4848
- label: t$2("common.history"),
4975
+ label: t$2("neetoApprovals.common.history"),
4849
4976
  value: "HISTORY"
4850
4977
  },
4851
4978
  APPROVERS: {
4852
- label: t$2("common.approver", constants.PLURAL),
4979
+ label: t$2("neetoApprovals.common.approver", constants.PLURAL),
4853
4980
  value: "APPROVERS"
4854
4981
  }
4855
4982
  };
@@ -4860,7 +4987,7 @@ var HISTORY_TABLE_COLUMNS = [{
4860
4987
  key: "approvalLabel",
4861
4988
  sorter: true,
4862
4989
  width: "25%",
4863
- title: t$2("common.id"),
4990
+ title: t$2("neetoApprovals.common.id"),
4864
4991
  render: function render(approvalLabel, _ref) {
4865
4992
  var requestableUrl = _ref.requestableUrl;
4866
4993
  var url = new URL(requestableUrl || window.location.origin);
@@ -4875,16 +5002,16 @@ var HISTORY_TABLE_COLUMNS = [{
4875
5002
  key: "title",
4876
5003
  sorter: true,
4877
5004
  width: "25%",
4878
- title: t$2("common.title")
5005
+ title: t$2("neetoApprovals.common.title")
4879
5006
  }, {
4880
5007
  dataIndex: "status",
4881
5008
  key: "status",
4882
5009
  sorter: true,
4883
5010
  width: "25%",
4884
- title: t$2("common.status"),
5011
+ title: t$2("neetoApprovals.common.status"),
4885
5012
  render: function render(status) {
4886
5013
  return /*#__PURE__*/React__default["default"].createElement(neetoui.Tag, {
4887
- label: pure.capitalize(status),
5014
+ label: capitalize(status),
4888
5015
  style: STATUS_TAG_STYLE[status]
4889
5016
  });
4890
5017
  }
@@ -4893,7 +5020,7 @@ var HISTORY_TABLE_COLUMNS = [{
4893
5020
  key: "createdAt",
4894
5021
  sorter: true,
4895
5022
  width: "25%",
4896
- title: t$2("common.created"),
5023
+ title: t$2("neetoApprovals.common.created"),
4897
5024
  render: function render(createdAt) {
4898
5025
  return utils.dateFormat.fromNow(timeInZone(createdAt));
4899
5026
  }
@@ -4908,7 +5035,7 @@ var ApprovalsDetails = function ApprovalsDetails(_ref) {
4908
5035
  _ref$isPending = _ref.isPending,
4909
5036
  isPending = _ref$isPending === void 0 ? false : _ref$isPending,
4910
5037
  _ref$onSubmit = _ref.onSubmit,
4911
- onSubmit = _ref$onSubmit === void 0 ? pure.noop : _ref$onSubmit,
5038
+ onSubmit = _ref$onSubmit === void 0 ? noop : _ref$onSubmit,
4912
5039
  _ref$isLoading = _ref.isLoading,
4913
5040
  isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading;
4914
5041
  var _useTranslation = useTranslation(),
@@ -4925,7 +5052,7 @@ var ApprovalsDetails = function ApprovalsDetails(_ref) {
4925
5052
  requesterName = approvalDetails.requesterName,
4926
5053
  requesterEmail = approvalDetails.requesterEmail;
4927
5054
  var _useState = React.useState(initialNote),
4928
- _useState2 = _slicedToArray(_useState, 2),
5055
+ _useState2 = _slicedToArray$1(_useState, 2),
4929
5056
  note = _useState2[0],
4930
5057
  setNote = _useState2[1];
4931
5058
  React.useEffect(function () {
@@ -4935,7 +5062,7 @@ var ApprovalsDetails = function ApprovalsDetails(_ref) {
4935
5062
  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;
4936
5063
  var getStatusLabel = function getStatusLabel() {
4937
5064
  if (isPending) {
4938
- return t("common.waitingFor");
5065
+ return t("neetoApprovals.common.waitingFor");
4939
5066
  }
4940
5067
  return STATUS_UPDATED_BY[status];
4941
5068
  };
@@ -4959,7 +5086,7 @@ var ApprovalsDetails = function ApprovalsDetails(_ref) {
4959
5086
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
4960
5087
  style: "h2"
4961
5088
  }, title), /*#__PURE__*/React__default["default"].createElement(neetoui.Tag, {
4962
- label: pure.capitalize(status),
5089
+ label: capitalize(status),
4963
5090
  style: STATUS_TAG_STYLE[status]
4964
5091
  })), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Body, {
4965
5092
  className: "space-y-6"
@@ -4971,35 +5098,35 @@ var ApprovalsDetails = function ApprovalsDetails(_ref) {
4971
5098
  style: "body2"
4972
5099
  }, requesterOrApproverDetails)), /*#__PURE__*/React__default["default"].createElement("div", {
4973
5100
  className: "flex space-x-10 p-2"
4974
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, null, t("common.created")), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, null, utils.dateFormat.extended(timeInZone(createdAt))))), /*#__PURE__*/React__default["default"].createElement("div", {
5101
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, null, t("neetoApprovals.common.created")), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, null, utils.dateFormat.extended(timeInZone(createdAt))))), /*#__PURE__*/React__default["default"].createElement("div", {
4975
5102
  className: "w-full space-y-2"
4976
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, null, t("inputs.labels.message")), /*#__PURE__*/React__default["default"].createElement(MemoizedEditorContent$1, {
5103
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, null, t("neetoApprovals.inputs.labels.message")), /*#__PURE__*/React__default["default"].createElement(MemoizedEditorContent$1, {
4977
5104
  className: "neeto-ui-bg-gray-100 p-4",
4978
5105
  content: message
4979
5106
  })), isPending && isCurrentUserApprover && /*#__PURE__*/React__default["default"].createElement(neetoui.Textarea, {
4980
5107
  className: "w-full",
4981
5108
  disabled: !isPending,
4982
- label: t("common.note"),
5109
+ label: t("neetoApprovals.common.note"),
4983
5110
  value: note,
4984
- placeholder: t("inputs.placeholders.add_", {
4985
- what: (_t = t("common.note")) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5111
+ placeholder: t("neetoApprovals.inputs.placeholders.add_", {
5112
+ what: (_t = t("neetoApprovals.common.note")) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
4986
5113
  }),
4987
5114
  onChange: utils.withEventTargetValue(setNote)
4988
5115
  }), !isPending && note && /*#__PURE__*/React__default["default"].createElement("div", {
4989
5116
  className: "w-full space-y-2"
4990
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, null, t("common.note")), /*#__PURE__*/React__default["default"].createElement("div", {
5117
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, null, t("neetoApprovals.common.note")), /*#__PURE__*/React__default["default"].createElement("div", {
4991
5118
  className: "neeto-ui-bg-gray-100 p-4"
4992
5119
  }, note))), isPending && isCurrentUserApprover && /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Footer, {
4993
5120
  className: "flex gap-x-2"
4994
5121
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
4995
- label: t("buttons.approve"),
5122
+ label: t("neetoApprovals.buttons.approve"),
4996
5123
  loading: isLoading,
4997
5124
  type: "submit",
4998
5125
  onClick: function onClick() {
4999
5126
  return handleSubmit(STATUSES.approved);
5000
5127
  }
5001
5128
  }), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
5002
- label: t("buttons.decline"),
5129
+ label: t("neetoApprovals.buttons.decline"),
5003
5130
  loading: isLoading,
5004
5131
  style: "text",
5005
5132
  onClick: function onClick() {
@@ -5014,7 +5141,7 @@ var History = function History(_ref) {
5014
5141
  var _t;
5015
5142
  var requestUrl = _ref.requestUrl;
5016
5143
  var _useState = React.useState(DEFAULT_FILTER_VALUES),
5017
- _useState2 = _slicedToArray(_useState, 2),
5144
+ _useState2 = _slicedToArray$1(_useState, 2),
5018
5145
  filters = _useState2[0],
5019
5146
  setFilters = _useState2[1];
5020
5147
  var debouncedSearch = reactUtils.useDebounce(filters.search, SEARCH_DELAY);
@@ -5022,7 +5149,7 @@ var History = function History(_ref) {
5022
5149
  pageProperties = _usePaginate.pageProperties,
5023
5150
  handleTablePagination = _usePaginate.handleTablePagination;
5024
5151
  var _useState3 = React.useState({}),
5025
- _useState4 = _slicedToArray(_useState3, 2),
5152
+ _useState4 = _slicedToArray$1(_useState3, 2),
5026
5153
  approvalDetails = _useState4[0],
5027
5154
  setApprovalDetails = _useState4[1];
5028
5155
  var _useTranslation = useTranslation(),
@@ -5049,7 +5176,7 @@ var History = function History(_ref) {
5049
5176
  totalCount = _useFetchRequests$dat4 === void 0 ? 0 : _useFetchRequests$dat4;
5050
5177
  var handleTableChange = function handleTableChange(_, __, sorter) {
5051
5178
  setFilters(_objectSpread$8(_objectSpread$8({}, filters), {}, {
5052
- sortBy: pure.camelToSnakeCase(sorter.field),
5179
+ sortBy: camelToSnakeCase(sorter.field),
5053
5180
  sortDirection: sorter.order
5054
5181
  }));
5055
5182
  };
@@ -5076,12 +5203,12 @@ var History = function History(_ref) {
5076
5203
  })) : /*#__PURE__*/React__default["default"].createElement("div", {
5077
5204
  className: "flex h-full w-full flex-grow items-center justify-center"
5078
5205
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.NoData, {
5079
- title: t("common.notFound_", {
5080
- what: (_t = t("common.record", constants.PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5206
+ title: t("neetoApprovals.common.notFound_", {
5207
+ what: (_t = t("neetoApprovals.common.record", constants.PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5081
5208
  })
5082
5209
  })), /*#__PURE__*/React__default["default"].createElement(ApprovalsDetails, {
5083
5210
  approvalDetails: approvalDetails,
5084
- isOpen: pure.isPresent(approvalDetails),
5211
+ isOpen: isPresent(approvalDetails),
5085
5212
  onClose: function onClose() {
5086
5213
  return setApprovalDetails({});
5087
5214
  }
@@ -5098,11 +5225,11 @@ var PendingRequests = function PendingRequests(_ref) {
5098
5225
  var _t;
5099
5226
  var requestUrl = _ref.requestUrl;
5100
5227
  var _useState = React.useState(DEFAULT_FILTER_VALUES),
5101
- _useState2 = _slicedToArray(_useState, 2),
5228
+ _useState2 = _slicedToArray$1(_useState, 2),
5102
5229
  filters = _useState2[0],
5103
5230
  setFilters = _useState2[1];
5104
5231
  var _useState3 = React.useState({}),
5105
- _useState4 = _slicedToArray(_useState3, 2),
5232
+ _useState4 = _slicedToArray$1(_useState3, 2),
5106
5233
  approvalDetails = _useState4[0],
5107
5234
  setApprovalDetails = _useState4[1];
5108
5235
  var debouncedSearch = reactUtils.useDebounce(filters.search, SEARCH_DELAY);
@@ -5130,7 +5257,7 @@ var PendingRequests = function PendingRequests(_ref) {
5130
5257
  isLoading = _useUpdateRequest.isLoading;
5131
5258
  var handleTableChange = function handleTableChange(_, __, sorter) {
5132
5259
  setFilters(_objectSpread$7(_objectSpread$7({}, filters), {}, {
5133
- sortBy: pure.camelToSnakeCase(sorter.field),
5260
+ sortBy: camelToSnakeCase(sorter.field),
5134
5261
  sortDirection: sorter.order
5135
5262
  }));
5136
5263
  };
@@ -5167,15 +5294,15 @@ var PendingRequests = function PendingRequests(_ref) {
5167
5294
  })) : /*#__PURE__*/React__default["default"].createElement("div", {
5168
5295
  className: "flex h-full w-full flex-grow items-center justify-center"
5169
5296
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.NoData, {
5170
- title: t("common.notFound_", {
5171
- what: (_t = t("common.pendingApproval", constants.PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5297
+ title: t("neetoApprovals.common.notFound_", {
5298
+ what: (_t = t("neetoApprovals.common.pendingApproval", constants.PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5172
5299
  })
5173
5300
  })), /*#__PURE__*/React__default["default"].createElement(ApprovalsDetails, {
5174
5301
  isPending: true,
5175
5302
  approvalDetails: approvalDetails,
5176
5303
  isLoading: isLoading,
5177
5304
  onSubmit: onSubmit,
5178
- isOpen: pure.isPresent(approvalDetails),
5305
+ isOpen: isPresent(approvalDetails),
5179
5306
  onClose: function onClose() {
5180
5307
  return setApprovalDetails({});
5181
5308
  }
@@ -5270,7 +5397,7 @@ var useDeleteTemplate = function useDeleteTemplate(options) {
5270
5397
  };
5271
5398
 
5272
5399
  function _arrayWithoutHoles(arr) {
5273
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
5400
+ if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
5274
5401
  }
5275
5402
 
5276
5403
  function _iterableToArray(iter) {
@@ -5282,13 +5409,13 @@ function _nonIterableSpread() {
5282
5409
  }
5283
5410
 
5284
5411
  function _toConsumableArray(arr) {
5285
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
5412
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();
5286
5413
  }
5287
5414
 
5288
5415
  var _t;
5289
5416
  var VALID_VARIABLE_NAME_REGEX = /^[a-z](?:\w*[a-z0-9])*$/i;
5290
5417
  var EVERYONE_VISIBILITY = {
5291
- label: t$2("select.visibility.everyone"),
5418
+ label: t$2("neetoApprovals.select.visibility.everyone"),
5292
5419
  value: "everyone"
5293
5420
  };
5294
5421
  var TEMPLATE_FORM_INITIAL_VALUES = {
@@ -5300,19 +5427,19 @@ var TEMPLATE_FORM_INITIAL_VALUES = {
5300
5427
  message: ""
5301
5428
  };
5302
5429
  var TEMPLATE_FORM_VALIDATION_SCHEMA = yup__namespace.object().shape({
5303
- name: yup__namespace.string().trim().required(t$2("validations.required", {
5304
- what: t$2("common.name")
5430
+ name: yup__namespace.string().trim().required(t$2("neetoApprovals.validations.required", {
5431
+ what: t$2("neetoApprovals.common.name")
5305
5432
  })),
5306
- approver: yup__namespace.object().required(t$2("validations.approver")),
5307
- message: yup__namespace.string().test("message", t$2("validations.required", {
5308
- what: t$2("inputs.labels.message")
5433
+ approver: yup__namespace.object().required(t$2("neetoApprovals.validations.approver")),
5434
+ message: yup__namespace.string().test("message", t$2("neetoApprovals.validations.required", {
5435
+ what: t$2("neetoApprovals.inputs.labels.message")
5309
5436
  }), function (content) {
5310
5437
  return !neetoEditor.isEditorEmpty(content);
5311
5438
  }),
5312
5439
  variables: yup__namespace.array().of(yup__namespace.object().shape({
5313
- variable: yup__namespace.string().trim().required(t$2("validations.pleaseEnter_", {
5314
- what: (_t = t$2("common.variable")) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5315
- })).matches(VALID_VARIABLE_NAME_REGEX, t$2("validations.variableName"))
5440
+ variable: yup__namespace.string().trim().required(t$2("neetoApprovals.validations.pleaseEnter_", {
5441
+ what: (_t = t$2("neetoApprovals.common.variable")) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5442
+ })).matches(VALID_VARIABLE_NAME_REGEX, t$2("neetoApprovals.validations.variableName"))
5316
5443
  }))
5317
5444
  });
5318
5445
 
@@ -5332,7 +5459,7 @@ var DynamicBlock = function DynamicBlock() {
5332
5459
  });
5333
5460
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
5334
5461
  className: "space-y-2 "
5335
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, null, t("inputs.labels.variableMapping")), /*#__PURE__*/React__default["default"].createElement(formik$1.FieldArray, {
5462
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, null, t("neetoApprovals.inputs.labels.variableMapping")), /*#__PURE__*/React__default["default"].createElement(formik$1.FieldArray, {
5336
5463
  name: "variables"
5337
5464
  }, function (_ref2) {
5338
5465
  var remove = _ref2.remove,
@@ -5348,10 +5475,10 @@ var DynamicBlock = function DynamicBlock() {
5348
5475
  }, /*#__PURE__*/React__default["default"].createElement(formik.Input, {
5349
5476
  autoFocus: true,
5350
5477
  required: true,
5351
- label: t("common.variable_", {
5478
+ name: "variables[".concat(index, "][variable]"),
5479
+ label: t("neetoApprovals.common.variable_", {
5352
5480
  number: index + 1
5353
- }),
5354
- name: "variables[".concat(index, "][variable]")
5481
+ })
5355
5482
  }), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
5356
5483
  className: "my-5",
5357
5484
  icon: neetoIcons.Delete,
@@ -5361,10 +5488,10 @@ var DynamicBlock = function DynamicBlock() {
5361
5488
  }
5362
5489
  }));
5363
5490
  })), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
5364
- label: t("common.add_", {
5365
- what: t("common.variable")
5366
- }),
5367
5491
  style: "link",
5492
+ label: t("neetoApprovals.common.add_", {
5493
+ what: t("neetoApprovals.common.variable")
5494
+ }),
5368
5495
  onClick: function onClick() {
5369
5496
  return push({
5370
5497
  variable: ""
@@ -5374,12 +5501,12 @@ var DynamicBlock = function DynamicBlock() {
5374
5501
  })), /*#__PURE__*/React__default["default"].createElement(neetoEditor.FormikEditor, {
5375
5502
  required: true,
5376
5503
  key: variables,
5377
- label: t("inputs.labels.message"),
5504
+ label: t("neetoApprovals.inputs.labels.message"),
5378
5505
  name: "message",
5379
5506
  rows: 3,
5380
5507
  variables: editorVariables,
5381
- placeholder: t("inputs.placeholders.enter_", {
5382
- what: t("inputs.labels.message")
5508
+ placeholder: t("neetoApprovals.inputs.placeholders.enter_", {
5509
+ what: t("neetoApprovals.inputs.labels.message")
5383
5510
  }),
5384
5511
  shouldUpdate: function shouldUpdate(nextProps, prevProps) {
5385
5512
  return nextProps.variables !== prevProps.variables;
@@ -5394,7 +5521,7 @@ var Form$1 = function Form(_ref) {
5394
5521
  _ref$initialData = _ref.initialData,
5395
5522
  initialData = _ref$initialData === void 0 ? {} : _ref$initialData,
5396
5523
  _ref$onSubmit = _ref.onSubmit,
5397
- onSubmit = _ref$onSubmit === void 0 ? pure.noop : _ref$onSubmit,
5524
+ onSubmit = _ref$onSubmit === void 0 ? noop : _ref$onSubmit,
5398
5525
  _ref$isLoading = _ref.isLoading,
5399
5526
  isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
5400
5527
  visibilityOptions = _ref.visibilityOptions;
@@ -5406,10 +5533,10 @@ var Form$1 = function Form(_ref) {
5406
5533
  _useFetchApprovers$da2 = _useFetchApprovers$da === void 0 ? {} : _useFetchApprovers$da,
5407
5534
  _useFetchApprovers$da3 = _useFetchApprovers$da2.approvers,
5408
5535
  approvers = _useFetchApprovers$da3 === void 0 ? [] : _useFetchApprovers$da3;
5409
- var header = ramda.isEmpty(initialData) ? t("common.add_", {
5410
- what: t("common.approvalTemplate", constants.SINGULAR).toLocaleLowerCase()
5411
- }) : t("common.edit_", {
5412
- what: t("common.approvalTemplate", constants.SINGULAR).toLocaleLowerCase()
5536
+ var header = ramda.isEmpty(initialData) ? t("neetoApprovals.common.add_", {
5537
+ what: t("neetoApprovals.common.approvalTemplate", constants.SINGULAR).toLocaleLowerCase()
5538
+ }) : t("neetoApprovals.common.edit_", {
5539
+ what: t("neetoApprovals.common.approvalTemplate", constants.SINGULAR).toLocaleLowerCase()
5413
5540
  });
5414
5541
  return /*#__PURE__*/React__default["default"].createElement(neetoui.Pane, {
5415
5542
  initialFocusRef: inputReference,
@@ -5421,7 +5548,7 @@ var Form$1 = function Form(_ref) {
5421
5548
  }, header)), /*#__PURE__*/React__default["default"].createElement(formik.Form, {
5422
5549
  formikProps: {
5423
5550
  enableReinitialize: true,
5424
- initialValues: pure.isPresent(initialData) ? initialData : TEMPLATE_FORM_INITIAL_VALUES,
5551
+ initialValues: isPresent(initialData) ? initialData : TEMPLATE_FORM_INITIAL_VALUES,
5425
5552
  validationSchema: TEMPLATE_FORM_VALIDATION_SCHEMA,
5426
5553
  onSubmit: onSubmit
5427
5554
  }
@@ -5431,19 +5558,19 @@ var Form$1 = function Form(_ref) {
5431
5558
  autoFocus: true,
5432
5559
  required: true,
5433
5560
  className: "w-1/2",
5434
- label: t("common.name"),
5561
+ label: t("neetoApprovals.common.name"),
5435
5562
  name: "name",
5436
- placeholder: t("inputs.placeholders.name")
5563
+ placeholder: t("neetoApprovals.inputs.placeholders.name")
5437
5564
  }), /*#__PURE__*/React__default["default"].createElement(formik.Textarea, {
5438
5565
  className: "w-full",
5439
- label: t("inputs.labels.description"),
5566
+ label: t("neetoApprovals.inputs.labels.description"),
5440
5567
  name: "description",
5441
- placeholder: t("inputs.placeholders.description")
5568
+ placeholder: t("neetoApprovals.inputs.placeholders.description")
5442
5569
  }), /*#__PURE__*/React__default["default"].createElement("div", {
5443
5570
  className: "flex space-x-6"
5444
5571
  }, /*#__PURE__*/React__default["default"].createElement(formik.Select, {
5445
5572
  required: true,
5446
- label: t("inputs.labels.approver"),
5573
+ label: t("neetoApprovals.inputs.labels.approver"),
5447
5574
  name: "approver",
5448
5575
  options: approvers.map(function (approver) {
5449
5576
  return {
@@ -5451,24 +5578,24 @@ var Form$1 = function Form(_ref) {
5451
5578
  value: approver.id
5452
5579
  };
5453
5580
  }),
5454
- placeholder: t("inputs.placeholders.select_", {
5455
- what: (_t = t("common.approver", constants.SINGULAR)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5581
+ placeholder: t("neetoApprovals.inputs.placeholders.select_", {
5582
+ what: (_t = t("neetoApprovals.common.approver", constants.SINGULAR)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
5456
5583
  })
5457
5584
  }), /*#__PURE__*/React__default["default"].createElement(formik.Select, {
5458
- label: t("common.visibility"),
5585
+ label: t("neetoApprovals.common.visibility"),
5459
5586
  name: "visibility",
5460
5587
  options: [].concat(_toConsumableArray(visibilityOptions), [EVERYONE_VISIBILITY]),
5461
- placeholder: t("inputs.placeholders.select_", {
5462
- what: (_t2 = t("common.visibility")) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase()
5588
+ placeholder: t("neetoApprovals.inputs.placeholders.select_", {
5589
+ what: (_t2 = t("neetoApprovals.common.visibility")) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase()
5463
5590
  })
5464
5591
  })), /*#__PURE__*/React__default["default"].createElement(DynamicBlock, null))), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Footer, {
5465
5592
  className: "flex gap-x-2"
5466
5593
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
5467
- label: t("buttons.saveChanges"),
5594
+ label: t("neetoApprovals.buttons.saveChanges"),
5468
5595
  loading: isLoading,
5469
5596
  type: "submit"
5470
5597
  }), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
5471
- label: t("buttons.cancel"),
5598
+ label: t("neetoApprovals.buttons.cancel"),
5472
5599
  style: "text",
5473
5600
  onClick: onClose
5474
5601
  })))));
@@ -5600,34 +5727,34 @@ var TemplateDetails = function TemplateDetails(_ref) {
5600
5727
  className: "space-y-2"
5601
5728
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
5602
5729
  style: "h2"
5603
- }, t("common.templateDetails"))), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Body, {
5730
+ }, t("neetoApprovals.common.templateDetails"))), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Body, {
5604
5731
  className: "space-y-6"
5605
5732
  }, /*#__PURE__*/React__default["default"].createElement(Field$1, {
5606
- label: t("common.name"),
5733
+ label: t("neetoApprovals.common.name"),
5607
5734
  value: name
5608
5735
  }), /*#__PURE__*/React__default["default"].createElement(Field$1, {
5609
- label: t("inputs.labels.description"),
5736
+ label: t("neetoApprovals.inputs.labels.description"),
5610
5737
  value: description
5611
5738
  }), /*#__PURE__*/React__default["default"].createElement(Field$1, {
5612
- label: t("common.approver", constants.SINGULAR),
5739
+ label: t("neetoApprovals.common.approver", constants.SINGULAR),
5613
5740
  value: approverName
5614
5741
  }), /*#__PURE__*/React__default["default"].createElement(Field$1, {
5615
- label: t("common.visibility"),
5742
+ label: t("neetoApprovals.common.visibility"),
5616
5743
  value: (accessible === null || accessible === void 0 ? void 0 : accessible.label) || EVERYONE_VISIBILITY.label
5617
5744
  }), (_Object$entries = Object.entries(variables || {})) === null || _Object$entries === void 0 ? void 0 : _Object$entries.map(function (_ref2) {
5618
- var _ref3 = _slicedToArray(_ref2, 2),
5745
+ var _ref3 = _slicedToArray$1(_ref2, 2),
5619
5746
  variable = _ref3[0],
5620
5747
  value = _ref3[1];
5621
5748
  return /*#__PURE__*/React__default["default"].createElement(Field$1, {
5622
5749
  key: value,
5623
- label: pure.capitalize(variable),
5750
+ label: capitalize(variable),
5624
5751
  value: value
5625
5752
  });
5626
5753
  }), /*#__PURE__*/React__default["default"].createElement("div", {
5627
5754
  className: "flex w-full flex-col space-y-4"
5628
5755
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, {
5629
5756
  className: "mb-1 font-normal"
5630
- }, t("inputs.labels.message")), /*#__PURE__*/React__default["default"].createElement(MemoizedEditorContent, {
5757
+ }, t("neetoApprovals.inputs.labels.message")), /*#__PURE__*/React__default["default"].createElement(MemoizedEditorContent, {
5631
5758
  className: "neeto-ui-bg-gray-100 neeto-ui-rounded-lg p-3",
5632
5759
  content: message
5633
5760
  }))));
@@ -5642,11 +5769,11 @@ var columnData = function columnData(_ref) {
5642
5769
  dataIndex: "name",
5643
5770
  key: "name",
5644
5771
  sorter: true,
5645
- title: instance.t("common.name")
5772
+ title: instance.t("neetoApprovals.common.name")
5646
5773
  }, {
5647
5774
  dataIndex: "visibility",
5648
5775
  key: "visibility",
5649
- title: instance.t("common.visibility"),
5776
+ title: instance.t("neetoApprovals.common.visibility"),
5650
5777
  render: function render(_, _ref2) {
5651
5778
  var accessible = _ref2.accessible;
5652
5779
  return (accessible === null || accessible === void 0 ? void 0 : accessible.label) || EVERYONE_VISIBILITY.label;
@@ -5674,12 +5801,12 @@ var columnData = function columnData(_ref) {
5674
5801
  onClick: function onClick() {
5675
5802
  return onEditClick(template);
5676
5803
  }
5677
- }, instance.t("common.edit")), /*#__PURE__*/React__default["default"].createElement(MenuItem.Button, {
5804
+ }, instance.t("neetoApprovals.common.edit")), /*#__PURE__*/React__default["default"].createElement(MenuItem.Button, {
5678
5805
  "data-cy": "approvers-delete-button",
5679
5806
  onClick: function onClick() {
5680
5807
  return onDeleteClick(template);
5681
5808
  }
5682
- }, instance.t("common.delete")))));
5809
+ }, instance.t("neetoApprovals.common.delete")))));
5683
5810
  }
5684
5811
  }];
5685
5812
  };
@@ -5696,19 +5823,19 @@ var Templates = function Templates(_ref) {
5696
5823
  helpDocUrl = _ref.helpDocUrl,
5697
5824
  otherProps = _objectWithoutProperties(_ref, _excluded);
5698
5825
  var _useState = React.useState({}),
5699
- _useState2 = _slicedToArray(_useState, 2),
5826
+ _useState2 = _slicedToArray$1(_useState, 2),
5700
5827
  selectedTemplate = _useState2[0],
5701
5828
  setSelectedTemplate = _useState2[1];
5702
5829
  var _useState3 = React.useState(false),
5703
- _useState4 = _slicedToArray(_useState3, 2),
5830
+ _useState4 = _slicedToArray$1(_useState3, 2),
5704
5831
  isDeleteAlertOpen = _useState4[0],
5705
5832
  setIsDeleteAlertOpen = _useState4[1];
5706
5833
  var _useState5 = React.useState(false),
5707
- _useState6 = _slicedToArray(_useState5, 2),
5834
+ _useState6 = _slicedToArray$1(_useState5, 2),
5708
5835
  isEditPaneOpen = _useState6[0],
5709
5836
  setIsEditPaneOpen = _useState6[1];
5710
5837
  var _useState7 = React.useState(false),
5711
- _useState8 = _slicedToArray(_useState7, 2),
5838
+ _useState8 = _slicedToArray$1(_useState7, 2),
5712
5839
  isShowPaneOpen = _useState8[0],
5713
5840
  setIsShowPaneOpen = _useState8[1];
5714
5841
  var debouncedSearch = reactUtils.useDebounce(filters.search, SEARCH_DELAY);
@@ -5759,7 +5886,7 @@ var Templates = function Templates(_ref) {
5759
5886
  });
5760
5887
  setSelectedTemplate({});
5761
5888
  };
5762
- var entity = (_t = t("common.template", constants.PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase();
5889
+ var entity = (_t = t("neetoApprovals.common.template", constants.PLURAL)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase();
5763
5890
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTemplateLoading ? /*#__PURE__*/React__default["default"].createElement(PageLoader__default["default"], null) : /*#__PURE__*/React__default["default"].createElement(Table, {
5764
5891
  items: templates,
5765
5892
  setIsPaneOpen: setIsNewTemplatePaneOpen,
@@ -5788,16 +5915,16 @@ var Templates = function Templates(_ref) {
5788
5915
  })), /*#__PURE__*/React__default["default"].createElement(neetoui.Alert, {
5789
5916
  isOpen: isDeleteAlertOpen,
5790
5917
  isSubmitting: isDeleting,
5791
- submitButtonLabel: t("buttons.delete"),
5918
+ submitButtonLabel: t("neetoApprovals.buttons.delete"),
5792
5919
  message: /*#__PURE__*/React__default["default"].createElement(Trans, {
5793
- i18nKey: "alerts.deleting_",
5920
+ i18nKey: "neetoApprovals.alerts.deleting_",
5794
5921
  values: {
5795
- what: (_t2 = t("common.template", constants.SINGULAR)) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase(),
5922
+ what: (_t2 = t("neetoApprovals.common.template", constants.SINGULAR)) === null || _t2 === void 0 ? void 0 : _t2.toLocaleLowerCase(),
5796
5923
  name: selectedTemplate === null || selectedTemplate === void 0 ? void 0 : selectedTemplate.name
5797
5924
  }
5798
5925
  }),
5799
- title: t("common.delete_", {
5800
- what: (_t3 = t("common.template", constants.SINGULAR)) === null || _t3 === void 0 ? void 0 : _t3.toLocaleLowerCase()
5926
+ title: t("neetoApprovals.common.delete_", {
5927
+ what: (_t3 = t("neetoApprovals.common.template", constants.SINGULAR)) === null || _t3 === void 0 ? void 0 : _t3.toLocaleLowerCase()
5801
5928
  }),
5802
5929
  onClose: function onClose() {
5803
5930
  return setSelectedTemplate({});
@@ -5836,16 +5963,16 @@ var createRoutes = function createRoutes(_ref) {
5836
5963
  path: "".concat(config.approvalsPath).concat(routes.approvers),
5837
5964
  actionBlock: function actionBlock() {
5838
5965
  return /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
5839
- label: t$2("common.add_", {
5840
- what: t$2("common.approver", constants.SINGULAR).toLocaleLowerCase()
5966
+ label: t$2("neetoApprovals.common.add_", {
5967
+ what: t$2("neetoApprovals.common.approver", constants.SINGULAR).toLocaleLowerCase()
5841
5968
  }),
5842
5969
  onClick: function onClick() {
5843
5970
  return setIsNewApproverPaneOpen(true);
5844
5971
  }
5845
5972
  });
5846
5973
  },
5847
- searchPlaceholder: t$2("inputs.placeholders.search_", {
5848
- what: t$2("common.approver", constants.PLURAL).toLocaleLowerCase()
5974
+ searchPlaceholder: t$2("neetoApprovals.inputs.placeholders.search_", {
5975
+ what: t$2("neetoApprovals.common.approver", constants.PLURAL).toLocaleLowerCase()
5849
5976
  })
5850
5977
  }, {
5851
5978
  component: function component() {
@@ -5859,16 +5986,16 @@ var createRoutes = function createRoutes(_ref) {
5859
5986
  path: "".concat(config.approvalsPath).concat(routes.templates.index),
5860
5987
  actionBlock: function actionBlock() {
5861
5988
  return /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
5862
- label: t$2("common.add_", {
5863
- what: t$2("common.approvalTemplate", constants.SINGULAR).toLocaleLowerCase()
5989
+ label: t$2("neetoApprovals.common.add_", {
5990
+ what: t$2("neetoApprovals.common.approvalTemplate", constants.SINGULAR).toLocaleLowerCase()
5864
5991
  }),
5865
5992
  onClick: function onClick() {
5866
5993
  return setIsNewTemplatePaneOpen(true);
5867
5994
  }
5868
5995
  });
5869
5996
  },
5870
- searchPlaceholder: t$2("inputs.placeholders.search_", {
5871
- what: t$2("common.template", constants.PLURAL).toLocaleLowerCase()
5997
+ searchPlaceholder: t$2("neetoApprovals.inputs.placeholders.search_", {
5998
+ what: t$2("neetoApprovals.common.template", constants.PLURAL).toLocaleLowerCase()
5872
5999
  })
5873
6000
  }, {
5874
6001
  component: function component() {
@@ -5893,12 +6020,12 @@ var Header = function Header(_ref) {
5893
6020
  t = _useTranslation.t;
5894
6021
  var _useLocation = reactRouterDom.useLocation(),
5895
6022
  pathname = _useLocation.pathname;
5896
- var currentTab = pure.findBy({
6023
+ var currentTab = findBy({
5897
6024
  path: pathname
5898
6025
  }, appRoutes);
5899
6026
  return /*#__PURE__*/React__default["default"].createElement(NeetoHeader__default["default"], {
5900
6027
  actionBlock: currentTab === null || currentTab === void 0 ? void 0 : (_currentTab$actionBlo = currentTab.actionBlock) === null || _currentTab$actionBlo === void 0 ? void 0 : _currentTab$actionBlo.call(currentTab),
5901
- title: t("common.approval", constants.PLURAL),
6028
+ title: t("neetoApprovals.common.approval", constants.PLURAL),
5902
6029
  searchProps: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.searchPlaceholder) && {
5903
6030
  onChange: function onChange(event) {
5904
6031
  return setFilters(ramda.assoc("search", event.target.value));
@@ -5968,15 +6095,15 @@ function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) {
5968
6095
  var Approvals = function Approvals(_ref) {
5969
6096
  var config = _ref.config;
5970
6097
  var _useState = React.useState(DEFAULT_FILTER_VALUES),
5971
- _useState2 = _slicedToArray(_useState, 2),
6098
+ _useState2 = _slicedToArray$1(_useState, 2),
5972
6099
  filters = _useState2[0],
5973
6100
  setFilters = _useState2[1];
5974
6101
  var _useState3 = React.useState(false),
5975
- _useState4 = _slicedToArray(_useState3, 2),
6102
+ _useState4 = _slicedToArray$1(_useState3, 2),
5976
6103
  isNewTemplatePaneOpen = _useState4[0],
5977
6104
  setIsNewTemplatePaneOpen = _useState4[1];
5978
6105
  var _useState5 = React.useState(false),
5979
- _useState6 = _slicedToArray(_useState5, 2),
6106
+ _useState6 = _slicedToArray$1(_useState5, 2),
5980
6107
  isNewApproverPaneOpen = _useState6[0],
5981
6108
  setIsNewApproverPaneOpen = _useState6[1];
5982
6109
  var appRoutes = createRoutes({
@@ -6021,7 +6148,7 @@ var Form = function Form(_ref) {
6021
6148
  onSubmit = _ref.onSubmit,
6022
6149
  isLoading = _ref.isLoading;
6023
6150
  var _useState = React.useState({}),
6024
- _useState2 = _slicedToArray(_useState, 2),
6151
+ _useState2 = _slicedToArray$1(_useState, 2),
6025
6152
  selectedTemplateData = _useState2[0],
6026
6153
  setSelectedTemplateData = _useState2[1];
6027
6154
  var _useTranslation = useTranslation(),
@@ -6040,11 +6167,11 @@ var Form = function Form(_ref) {
6040
6167
  });
6041
6168
  var handleTemplateChange = function handleTemplateChange(selectedTemplate, setFieldValue, resetForm) {
6042
6169
  resetForm();
6043
- var template = pure.findById(selectedTemplate.value, templates);
6170
+ var template = findById(selectedTemplate.value, templates);
6044
6171
  setSelectedTemplateData(template);
6045
6172
  setFieldValue("message", template.message);
6046
6173
  var variables = Object.values(template.variables);
6047
- if (pure.isPresent(variables)) {
6174
+ if (isPresent(variables)) {
6048
6175
  variables.forEach(function (_, index) {
6049
6176
  return setFieldValue("variables[".concat(index, "].variable"), "");
6050
6177
  });
@@ -6079,8 +6206,8 @@ var Form = function Form(_ref) {
6079
6206
  onClose: onClose
6080
6207
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Header, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
6081
6208
  style: "h2"
6082
- }, t("common.add_", {
6083
- what: (_t = t("common.approval", constants.SINGULAR)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
6209
+ }, t("neetoApprovals.common.add_", {
6210
+ what: (_t = t("neetoApprovals.common.approval", constants.SINGULAR)) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
6084
6211
  }))), /*#__PURE__*/React__default["default"].createElement(formik.Form, {
6085
6212
  formikProps: {
6086
6213
  onSubmit: handleSubmit,
@@ -6095,14 +6222,14 @@ var Form = function Form(_ref) {
6095
6222
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Body, null, /*#__PURE__*/React__default["default"].createElement("div", {
6096
6223
  className: "w-full space-y-6"
6097
6224
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Select, {
6098
- label: t("select.approval"),
6225
+ label: t("neetoApprovals.select.approval"),
6099
6226
  options: templateOptions,
6100
6227
  onChange: function onChange(selectedTemplate) {
6101
6228
  return handleTemplateChange(selectedTemplate, setFieldValue, resetForm);
6102
6229
  }
6103
- }), pure.isPresent(variables) && /*#__PURE__*/React__default["default"].createElement("div", {
6230
+ }), isPresent(variables) && /*#__PURE__*/React__default["default"].createElement("div", {
6104
6231
  className: "space-y-2"
6105
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, null, t("inputs.labels.variableMapping")), /*#__PURE__*/React__default["default"].createElement("div", {
6232
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, null, t("neetoApprovals.inputs.labels.variableMapping")), /*#__PURE__*/React__default["default"].createElement("div", {
6106
6233
  className: "neeto-ui-bg-gray-100 neeto-ui-border-gray-300 neeto-ui-rounded-lg space-y-4 border p-3"
6107
6234
  }, /*#__PURE__*/React__default["default"].createElement(formik$1.FieldArray, {
6108
6235
  name: "variables"
@@ -6118,7 +6245,7 @@ var Form = function Form(_ref) {
6118
6245
  });
6119
6246
  }))), (selectedTemplateData === null || selectedTemplateData === void 0 ? void 0 : selectedTemplateData.message) && /*#__PURE__*/React__default["default"].createElement("div", {
6120
6247
  className: "space-y-2"
6121
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, null, t("inputs.labels.message")), /*#__PURE__*/React__default["default"].createElement(neetoEditor.EditorContent, {
6248
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, null, t("neetoApprovals.inputs.labels.message")), /*#__PURE__*/React__default["default"].createElement(neetoEditor.EditorContent, {
6122
6249
  className: "neeto-ui-bg-gray-100 neeto-ui-rounded-lg p-3",
6123
6250
  content: selectedTemplateData === null || selectedTemplateData === void 0 ? void 0 : selectedTemplateData.message,
6124
6251
  name: "message",
@@ -6127,11 +6254,11 @@ var Form = function Form(_ref) {
6127
6254
  className: "flex gap-x-2"
6128
6255
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
6129
6256
  disabled: !dirty,
6130
- label: t("buttons.saveChanges"),
6257
+ label: t("neetoApprovals.buttons.saveChanges"),
6131
6258
  loading: isLoading,
6132
6259
  type: "submit"
6133
6260
  }), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
6134
- label: t("buttons.cancel"),
6261
+ label: t("neetoApprovals.buttons.cancel"),
6135
6262
  style: "text",
6136
6263
  onClick: onClose
6137
6264
  })));
@@ -6199,7 +6326,7 @@ var useDeclinePendingRequest = function useDeclinePendingRequest(options) {
6199
6326
  var Public = function Public() {
6200
6327
  var _t;
6201
6328
  var _useState = React.useState(""),
6202
- _useState2 = _slicedToArray(_useState, 2),
6329
+ _useState2 = _slicedToArray$1(_useState, 2),
6203
6330
  note = _useState2[0],
6204
6331
  setNote = _useState2[1];
6205
6332
  var _useParams = reactRouterDom.useParams(),
@@ -6233,7 +6360,7 @@ var Public = function Public() {
6233
6360
  }, /*#__PURE__*/React__default["default"].createElement(PageLoader__default["default"], null));
6234
6361
  }
6235
6362
  return /*#__PURE__*/React__default["default"].createElement(Container__default["default"], null, /*#__PURE__*/React__default["default"].createElement(NeetoHeader__default["default"], {
6236
- title: t("common.approval", constants.PLURAL)
6363
+ title: t("neetoApprovals.common.approval", constants.PLURAL)
6237
6364
  }), /*#__PURE__*/React__default["default"].createElement("div", {
6238
6365
  className: "flex h-screen w-full flex-col items-center"
6239
6366
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -6245,9 +6372,9 @@ var Public = function Public() {
6245
6372
  }, approvalRequest.title), /*#__PURE__*/React__default["default"].createElement(neetoEditor.EditorContent, {
6246
6373
  content: approvalRequest.message
6247
6374
  }), !hideTextArea && /*#__PURE__*/React__default["default"].createElement(neetoui.Textarea, {
6248
- label: t("common.note"),
6249
- placeholder: t("inputs.placeholders.add_", {
6250
- what: (_t = t("common.note")) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
6375
+ label: t("neetoApprovals.common.note"),
6376
+ placeholder: t("neetoApprovals.inputs.placeholders.add_", {
6377
+ what: (_t = t("neetoApprovals.common.note")) === null || _t === void 0 ? void 0 : _t.toLocaleLowerCase()
6251
6378
  }),
6252
6379
  value: note,
6253
6380
  disabled: approvalRequest.status !== STATUSES.pending,
@@ -6255,7 +6382,7 @@ var Public = function Public() {
6255
6382
  }), approvalRequest.status === STATUSES.pending ? /*#__PURE__*/React__default["default"].createElement("div", {
6256
6383
  className: "mx-auto mt-8 flex space-x-6"
6257
6384
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
6258
- label: t("buttons.approve"),
6385
+ label: t("neetoApprovals.buttons.approve"),
6259
6386
  onClick: function onClick() {
6260
6387
  return acceptPendingRequest({
6261
6388
  id: approvalRequest.id,
@@ -6264,7 +6391,7 @@ var Public = function Public() {
6264
6391
  },
6265
6392
  loading: isAccepting
6266
6393
  }), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
6267
- label: t("buttons.decline"),
6394
+ label: t("neetoApprovals.buttons.decline"),
6268
6395
  onClick: function onClick() {
6269
6396
  return declinePendingRequest({
6270
6397
  id: approvalRequest.id,
@@ -6278,14 +6405,14 @@ var Public = function Public() {
6278
6405
  }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
6279
6406
  style: "body1"
6280
6407
  }, /*#__PURE__*/React__default["default"].createElement(Trans, {
6281
- i18nKey: "typography.approvalRequest",
6408
+ i18nKey: "neetoApprovals.typography.approvalRequest",
6282
6409
  values: {
6283
6410
  status: approvalRequest.status
6284
6411
  }
6285
6412
  })))) : /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
6286
6413
  style: "h4",
6287
6414
  className: "text-center"
6288
- }, t("common.notFound")))));
6415
+ }, t("neetoApprovals.common.notFound")))));
6289
6416
  };
6290
6417
 
6291
6418
  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}}