@bigbinary/neeto-commons-frontend 2.0.11 → 2.0.12
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/README.md +1 -1
- package/initializers.cjs.js +14 -0
- package/initializers.d.ts +1 -0
- package/initializers.js +13 -0
- package/package.json +5 -2
- package/react-utils.cjs.js +107 -79
- package/react-utils.d.ts +20 -2
- package/react-utils.js +108 -81
- package/utils.d.ts +2 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ The commons frontend library for Neeto Applications.
|
|
|
7
7
|
Install from npm:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
yarn add "@bigbinary/neeto-commons-frontend@2.0.
|
|
10
|
+
yarn add "@bigbinary/neeto-commons-frontend@2.0.12"
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
This package relies on the host project's tailwind configuration. So add
|
package/initializers.cjs.js
CHANGED
|
@@ -7,12 +7,14 @@ var axios = require('axios');
|
|
|
7
7
|
var i18next = require('i18next');
|
|
8
8
|
var ramda = require('ramda');
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
10
|
+
var Logger = require('js-logger');
|
|
10
11
|
var mixpanel = require('mixpanel-browser');
|
|
11
12
|
|
|
12
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
14
|
|
|
14
15
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
15
16
|
var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
|
|
17
|
+
var Logger__default = /*#__PURE__*/_interopDefaultLegacy(Logger);
|
|
16
18
|
var mixpanel__default = /*#__PURE__*/_interopDefaultLegacy(mixpanel);
|
|
17
19
|
|
|
18
20
|
function _typeof(obj) {
|
|
@@ -428,6 +430,17 @@ var initializeI18n = function initializeI18n(resources) {
|
|
|
428
430
|
});
|
|
429
431
|
};
|
|
430
432
|
|
|
433
|
+
function initializeLogger() {
|
|
434
|
+
/* eslint react-hooks/rules-of-hooks: "off" */
|
|
435
|
+
Logger__default["default"].useDefaults();
|
|
436
|
+
|
|
437
|
+
if (process.env.RAILS_ENV === "production") {
|
|
438
|
+
Logger__default["default"].setLevel(Logger__default["default"].OFF);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
window.logger = Logger__default["default"];
|
|
442
|
+
}
|
|
443
|
+
|
|
431
444
|
function initializeMixPanel() {
|
|
432
445
|
var isProduction = process.env.NODE_ENV === "production";
|
|
433
446
|
var isTokenPresent = !!process.env.MIXPANEL_TOKEN;
|
|
@@ -467,6 +480,7 @@ function initializeApplication(_ref) {
|
|
|
467
480
|
}
|
|
468
481
|
|
|
469
482
|
if (!(skip !== null && skip !== void 0 && skip.i18n)) initializeI18n(translationResources);
|
|
483
|
+
if (!(skip !== null && skip !== void 0 && skip.logger)) initializeLogger();
|
|
470
484
|
}
|
|
471
485
|
|
|
472
486
|
exports["default"] = initializeApplication;
|
package/initializers.d.ts
CHANGED
package/initializers.js
CHANGED
|
@@ -3,6 +3,7 @@ import axios from 'axios';
|
|
|
3
3
|
import i18next from 'i18next';
|
|
4
4
|
import { values, evolve, omit, modify, mergeDeepLeft, either, isEmpty, isNil } from 'ramda';
|
|
5
5
|
import { initReactI18next } from 'react-i18next';
|
|
6
|
+
import Logger from 'js-logger';
|
|
6
7
|
import mixpanel from 'mixpanel-browser';
|
|
7
8
|
|
|
8
9
|
function _typeof(obj) {
|
|
@@ -418,6 +419,17 @@ var initializeI18n = function initializeI18n(resources) {
|
|
|
418
419
|
});
|
|
419
420
|
};
|
|
420
421
|
|
|
422
|
+
function initializeLogger() {
|
|
423
|
+
/* eslint react-hooks/rules-of-hooks: "off" */
|
|
424
|
+
Logger.useDefaults();
|
|
425
|
+
|
|
426
|
+
if (process.env.RAILS_ENV === "production") {
|
|
427
|
+
Logger.setLevel(Logger.OFF);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
window.logger = Logger;
|
|
431
|
+
}
|
|
432
|
+
|
|
421
433
|
function initializeMixPanel() {
|
|
422
434
|
var isProduction = process.env.NODE_ENV === "production";
|
|
423
435
|
var isTokenPresent = !!process.env.MIXPANEL_TOKEN;
|
|
@@ -457,6 +469,7 @@ function initializeApplication(_ref) {
|
|
|
457
469
|
}
|
|
458
470
|
|
|
459
471
|
if (!(skip !== null && skip !== void 0 && skip.i18n)) initializeI18n(translationResources);
|
|
472
|
+
if (!(skip !== null && skip !== void 0 && skip.logger)) initializeLogger();
|
|
460
473
|
}
|
|
461
474
|
|
|
462
475
|
export { initializeApplication as default, globalProps$1 as globalProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-frontend",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.12",
|
|
4
4
|
"description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
"husky": "^7.0.4",
|
|
80
80
|
"i18next": "21.7.0",
|
|
81
81
|
"jest": "27.5.1",
|
|
82
|
+
"js-logger": "^1.6.1",
|
|
82
83
|
"lint-staged": "^12.3.7",
|
|
83
84
|
"mixpanel-browser": "^2.45.0",
|
|
84
85
|
"prettier": "^2.6.2",
|
|
@@ -95,7 +96,8 @@
|
|
|
95
96
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
96
97
|
"rollup-plugin-cleaner": "^1.0.0",
|
|
97
98
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
98
|
-
"yup": "^0.32.11"
|
|
99
|
+
"yup": "^0.32.11",
|
|
100
|
+
"zustand": "^4.1.2"
|
|
99
101
|
},
|
|
100
102
|
"dependencies": {},
|
|
101
103
|
"peerDependencies": {
|
|
@@ -107,6 +109,7 @@
|
|
|
107
109
|
"dayjs": "1.11.1",
|
|
108
110
|
"formik": "^2.2.9",
|
|
109
111
|
"i18next": "21.7.0",
|
|
112
|
+
"js-logger": "^1.6.1",
|
|
110
113
|
"mixpanel-browser": "^2.45.0",
|
|
111
114
|
"ramda": "^0.28.0",
|
|
112
115
|
"react": "^17.0.2",
|
package/react-utils.cjs.js
CHANGED
|
@@ -51483,10 +51483,10 @@ var languageLoaders = {
|
|
|
51483
51483
|
return Promise.resolve().then(function () { return ada$2; });
|
|
51484
51484
|
}),
|
|
51485
51485
|
agda: createLanguageAsyncLoader("agda", function () {
|
|
51486
|
-
return Promise.resolve().then(function () { return agda
|
|
51486
|
+
return Promise.resolve().then(function () { return agda; });
|
|
51487
51487
|
}),
|
|
51488
51488
|
al: createLanguageAsyncLoader("al", function () {
|
|
51489
|
-
return Promise.resolve().then(function () { return al; });
|
|
51489
|
+
return Promise.resolve().then(function () { return al$1; });
|
|
51490
51490
|
}),
|
|
51491
51491
|
antlr4: createLanguageAsyncLoader("antlr4", function () {
|
|
51492
51492
|
return Promise.resolve().then(function () { return antlr4$1; });
|
|
@@ -60971,82 +60971,82 @@ var ada$2 = /*#__PURE__*/_mergeNamespaces({
|
|
|
60971
60971
|
'default': ada_1
|
|
60972
60972
|
}, [ada_1]);
|
|
60973
60973
|
|
|
60974
|
-
var agda_1
|
|
60975
|
-
|
|
60976
|
-
|
|
60977
|
-
function
|
|
60974
|
+
var agda_1;
|
|
60975
|
+
var hasRequiredAgda;
|
|
60976
|
+
|
|
60977
|
+
function requireAgda () {
|
|
60978
|
+
if (hasRequiredAgda) return agda_1;
|
|
60979
|
+
hasRequiredAgda = 1;
|
|
60980
|
+
|
|
60981
|
+
agda_1 = agda;
|
|
60982
|
+
agda.displayName = 'agda';
|
|
60983
|
+
agda.aliases = [];
|
|
60984
|
+
function agda(Prism) {
|
|
60978
60985
|
(function (Prism) {
|
|
60979
|
-
|
|
60980
|
-
|
|
60981
|
-
|
|
60982
|
-
|
|
60983
|
-
|
|
60984
|
-
|
|
60985
|
-
|
|
60986
|
-
|
|
60987
|
-
|
|
60988
|
-
|
|
60989
|
-
|
|
60990
|
-
|
|
60991
|
-
|
|
60992
|
-
|
|
60993
|
-
|
|
60994
|
-
|
|
60995
|
-
|
|
60996
|
-
|
|
60997
|
-
|
|
60998
|
-
|
|
60999
|
-
|
|
61000
|
-
|
|
61001
|
-
|
|
60986
|
+
Prism.languages.agda = {
|
|
60987
|
+
comment: /\{-[\s\S]*?(?:-\}|$)|--.*/,
|
|
60988
|
+
string: {
|
|
60989
|
+
pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,
|
|
60990
|
+
greedy: true
|
|
60991
|
+
},
|
|
60992
|
+
punctuation: /[(){}⦃⦄.;@]/,
|
|
60993
|
+
'class-name': {
|
|
60994
|
+
pattern: /((?:data|record) +)\S+/,
|
|
60995
|
+
lookbehind: true
|
|
60996
|
+
},
|
|
60997
|
+
function: {
|
|
60998
|
+
pattern: /(^[ \t]*)(?!\s)[^:\r\n]+(?=:)/m,
|
|
60999
|
+
lookbehind: true
|
|
61000
|
+
},
|
|
61001
|
+
operator: {
|
|
61002
|
+
pattern: /(^\s*|\s)(?:[=|:∀→λ\\?_]|->)(?=\s)/,
|
|
61003
|
+
lookbehind: true
|
|
61004
|
+
},
|
|
61005
|
+
keyword:
|
|
61006
|
+
/\b(?:Set|abstract|constructor|data|eta-equality|field|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)\b/
|
|
61007
|
+
};
|
|
61008
|
+
})(Prism);
|
|
61009
|
+
}
|
|
61010
|
+
return agda_1;
|
|
61002
61011
|
}
|
|
61003
61012
|
|
|
61004
|
-
var
|
|
61005
|
-
|
|
61006
|
-
|
|
61007
|
-
|
|
61008
|
-
|
|
61009
|
-
|
|
61010
|
-
|
|
61011
|
-
|
|
61012
|
-
|
|
61013
|
-
|
|
61014
|
-
|
|
61015
|
-
|
|
61016
|
-
|
|
61017
|
-
|
|
61018
|
-
|
|
61019
|
-
|
|
61020
|
-
|
|
61021
|
-
|
|
61022
|
-
|
|
61023
|
-
|
|
61024
|
-
|
|
61025
|
-
|
|
61026
|
-
|
|
61027
|
-
|
|
61028
|
-
|
|
61029
|
-
|
|
61030
|
-
|
|
61031
|
-
|
|
61032
|
-
|
|
61033
|
-
|
|
61034
|
-
/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i, // objects and metadata that are used like keywords
|
|
61035
|
-
/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i
|
|
61036
|
-
],
|
|
61037
|
-
number:
|
|
61038
|
-
/\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|LL?|U(?:LL?)?)?\b/i,
|
|
61039
|
-
boolean: /\b(?:false|true)\b/i,
|
|
61040
|
-
variable: /\b(?:Curr(?:FieldNo|Page|Report)|x?Rec|RequestOptionsPage)\b/,
|
|
61041
|
-
'class-name':
|
|
61042
|
-
/\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,
|
|
61043
|
-
operator: /\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,
|
|
61044
|
-
punctuation: /[()\[\]{}:.;,]/
|
|
61045
|
-
};
|
|
61046
|
-
}
|
|
61047
|
-
return al_1;
|
|
61013
|
+
var al_1 = al;
|
|
61014
|
+
al.displayName = 'al';
|
|
61015
|
+
al.aliases = [];
|
|
61016
|
+
function al(Prism) {
|
|
61017
|
+
// based on https://github.com/microsoft/AL/blob/master/grammar/alsyntax.tmlanguage
|
|
61018
|
+
Prism.languages.al = {
|
|
61019
|
+
comment: /\/\/.*|\/\*[\s\S]*?\*\//,
|
|
61020
|
+
string: {
|
|
61021
|
+
pattern: /'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,
|
|
61022
|
+
greedy: true
|
|
61023
|
+
},
|
|
61024
|
+
function: {
|
|
61025
|
+
pattern:
|
|
61026
|
+
/(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,
|
|
61027
|
+
lookbehind: true
|
|
61028
|
+
},
|
|
61029
|
+
keyword: [
|
|
61030
|
+
// keywords
|
|
61031
|
+
/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i, // objects and metadata that are used like keywords
|
|
61032
|
+
/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i
|
|
61033
|
+
],
|
|
61034
|
+
number:
|
|
61035
|
+
/\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|LL?|U(?:LL?)?)?\b/i,
|
|
61036
|
+
boolean: /\b(?:false|true)\b/i,
|
|
61037
|
+
variable: /\b(?:Curr(?:FieldNo|Page|Report)|x?Rec|RequestOptionsPage)\b/,
|
|
61038
|
+
'class-name':
|
|
61039
|
+
/\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,
|
|
61040
|
+
operator: /\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,
|
|
61041
|
+
punctuation: /[()\[\]{}:.;,]/
|
|
61042
|
+
};
|
|
61048
61043
|
}
|
|
61049
61044
|
|
|
61045
|
+
var al$1 = /*#__PURE__*/_mergeNamespaces({
|
|
61046
|
+
__proto__: null,
|
|
61047
|
+
'default': al_1
|
|
61048
|
+
}, [al_1]);
|
|
61049
|
+
|
|
61050
61050
|
var antlr4_1 = antlr4;
|
|
61051
61051
|
antlr4.displayName = 'antlr4';
|
|
61052
61052
|
antlr4.aliases = ['g4'];
|
|
@@ -84084,8 +84084,8 @@ refractor.register(abap_1);
|
|
|
84084
84084
|
refractor.register(abnf_1);
|
|
84085
84085
|
refractor.register(actionscript_1);
|
|
84086
84086
|
refractor.register(ada_1);
|
|
84087
|
-
refractor.register(
|
|
84088
|
-
refractor.register(
|
|
84087
|
+
refractor.register(requireAgda());
|
|
84088
|
+
refractor.register(al_1);
|
|
84089
84089
|
refractor.register(antlr4_1);
|
|
84090
84090
|
refractor.register(apacheconf_1);
|
|
84091
84091
|
refractor.register(apex_1);
|
|
@@ -86388,6 +86388,33 @@ var createContext = function createContext(initialValue) {
|
|
|
86388
86388
|
}), _ref3;
|
|
86389
86389
|
};
|
|
86390
86390
|
|
|
86391
|
+
var setWithoutModifyingActions = function setWithoutModifyingActions(set) {
|
|
86392
|
+
return function (partial) {
|
|
86393
|
+
return set(function (previous) {
|
|
86394
|
+
if (typeof partial === "function") partial = partial(previous);
|
|
86395
|
+
var isOverwritingActions = ramda.toPairs(partial).some(function (_ref) {
|
|
86396
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
86397
|
+
key = _ref2[0],
|
|
86398
|
+
value = _ref2[1];
|
|
86399
|
+
|
|
86400
|
+
return typeof (previous === null || previous === void 0 ? void 0 : previous[key]) === "function" && value !== previous[key];
|
|
86401
|
+
});
|
|
86402
|
+
|
|
86403
|
+
if (isOverwritingActions) {
|
|
86404
|
+
throw new Error("Actions should not be modified");
|
|
86405
|
+
}
|
|
86406
|
+
|
|
86407
|
+
return partial;
|
|
86408
|
+
}, false);
|
|
86409
|
+
};
|
|
86410
|
+
};
|
|
86411
|
+
|
|
86412
|
+
var withImmutableActions = function withImmutableActions(config) {
|
|
86413
|
+
return function (set, get, api) {
|
|
86414
|
+
return config(setWithoutModifyingActions(set), get, api);
|
|
86415
|
+
};
|
|
86416
|
+
};
|
|
86417
|
+
|
|
86391
86418
|
var _path$1, _path2, _path3, _path4, _path5, _path6, _path7;
|
|
86392
86419
|
|
|
86393
86420
|
function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
@@ -87985,12 +88012,12 @@ var zephir = /*#__PURE__*/_mergeNamespaces({
|
|
|
87985
88012
|
'default': zephirExports
|
|
87986
88013
|
}, [zephirExports]);
|
|
87987
88014
|
|
|
87988
|
-
var
|
|
88015
|
+
var agdaExports = requireAgda();
|
|
87989
88016
|
|
|
87990
|
-
var
|
|
88017
|
+
var agda = /*#__PURE__*/_mergeNamespaces({
|
|
87991
88018
|
__proto__: null,
|
|
87992
|
-
'default':
|
|
87993
|
-
}, [
|
|
88019
|
+
'default': agdaExports
|
|
88020
|
+
}, [agdaExports]);
|
|
87994
88021
|
|
|
87995
88022
|
var avroIdlExports = requireAvroIdl();
|
|
87996
88023
|
|
|
@@ -89766,3 +89793,4 @@ exports.useLocalStorage = useLocalStorage;
|
|
|
89766
89793
|
exports.useOnClickOutside = useOnClickOutside;
|
|
89767
89794
|
exports.usePrevious = usePrevious;
|
|
89768
89795
|
exports.useUpdateEffect = useUpdateEffect;
|
|
89796
|
+
exports.withImmutableActions = withImmutableActions;
|
package/react-utils.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
DropdownProps,
|
|
7
7
|
InputProps,
|
|
8
8
|
TooltipProps,
|
|
9
|
-
TypographyProps
|
|
9
|
+
TypographyProps,
|
|
10
10
|
} from "@bigbinary/neetoui";
|
|
11
11
|
import { LinkType, NavLinkItemType } from "@bigbinary/neetoui/layouts";
|
|
12
12
|
import { RouteProps } from "react-router-dom";
|
|
@@ -121,7 +121,7 @@ export interface ColumnsProps {
|
|
|
121
121
|
actionBlock?: React.ReactNode;
|
|
122
122
|
checkboxProps?: CheckboxProps;
|
|
123
123
|
columnData: Object[];
|
|
124
|
-
dropdownProps?: DropdownProps
|
|
124
|
+
dropdownProps?: DropdownProps;
|
|
125
125
|
fixedColumns?: string[];
|
|
126
126
|
isSearchable?: boolean;
|
|
127
127
|
localStorageKey: string;
|
|
@@ -129,3 +129,21 @@ export interface ColumnsProps {
|
|
|
129
129
|
onChange: (columns: any[]) => any[];
|
|
130
130
|
searchProps?: InputProps;
|
|
131
131
|
}
|
|
132
|
+
|
|
133
|
+
type ZustandConfigType = (
|
|
134
|
+
set: (data: any) => void,
|
|
135
|
+
get: () => any,
|
|
136
|
+
api: any
|
|
137
|
+
) => any;
|
|
138
|
+
|
|
139
|
+
export function withImmutableActions(
|
|
140
|
+
config: ZustandConfigType
|
|
141
|
+
): ZustandConfigType;
|
|
142
|
+
|
|
143
|
+
export declare type ZustandStoreHook = {
|
|
144
|
+
(
|
|
145
|
+
selector: (state: any) => any,
|
|
146
|
+
comparator?: (a: any, b: any) => boolean
|
|
147
|
+
): any;
|
|
148
|
+
(): any;
|
|
149
|
+
};
|
package/react-utils.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import React__default, { useState, useEffect, useMemo, useRef, useReducer } from 'react';
|
|
3
3
|
import { Search, Check, Copy, Help, LeftArrow as LeftArrow$1, User, Settings } from '@bigbinary/neeto-icons';
|
|
4
4
|
import { Dropdown, Input, Checkbox, Typography, Tooltip, Button, Toastr, Modal, PageLoader } from '@bigbinary/neetoui';
|
|
5
|
-
import { curry, isNil, complement as complement$1, isEmpty, includes, __, filter, trim, toLower, identity, without, append, fromPairs, keys, values, last, pluck, any, uniq, intersection, mergeLeft, not as not$2, assoc } from 'ramda';
|
|
5
|
+
import { curry, isNil, complement as complement$1, isEmpty, includes, __, filter, trim, toLower, identity, without, append, fromPairs, keys, values, last, pluck, any, uniq, intersection, mergeLeft, not as not$2, toPairs, assoc } from 'ramda';
|
|
6
6
|
import dayjs from 'dayjs';
|
|
7
7
|
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
8
8
|
import updateLocale from 'dayjs/plugin/updateLocale';
|
|
@@ -51451,10 +51451,10 @@ var languageLoaders = {
|
|
|
51451
51451
|
return Promise.resolve().then(function () { return ada$2; });
|
|
51452
51452
|
}),
|
|
51453
51453
|
agda: createLanguageAsyncLoader("agda", function () {
|
|
51454
|
-
return Promise.resolve().then(function () { return agda
|
|
51454
|
+
return Promise.resolve().then(function () { return agda; });
|
|
51455
51455
|
}),
|
|
51456
51456
|
al: createLanguageAsyncLoader("al", function () {
|
|
51457
|
-
return Promise.resolve().then(function () { return al; });
|
|
51457
|
+
return Promise.resolve().then(function () { return al$1; });
|
|
51458
51458
|
}),
|
|
51459
51459
|
antlr4: createLanguageAsyncLoader("antlr4", function () {
|
|
51460
51460
|
return Promise.resolve().then(function () { return antlr4$1; });
|
|
@@ -60939,82 +60939,82 @@ var ada$2 = /*#__PURE__*/_mergeNamespaces({
|
|
|
60939
60939
|
'default': ada_1
|
|
60940
60940
|
}, [ada_1]);
|
|
60941
60941
|
|
|
60942
|
-
var agda_1
|
|
60943
|
-
|
|
60944
|
-
|
|
60945
|
-
function
|
|
60942
|
+
var agda_1;
|
|
60943
|
+
var hasRequiredAgda;
|
|
60944
|
+
|
|
60945
|
+
function requireAgda () {
|
|
60946
|
+
if (hasRequiredAgda) return agda_1;
|
|
60947
|
+
hasRequiredAgda = 1;
|
|
60948
|
+
|
|
60949
|
+
agda_1 = agda;
|
|
60950
|
+
agda.displayName = 'agda';
|
|
60951
|
+
agda.aliases = [];
|
|
60952
|
+
function agda(Prism) {
|
|
60946
60953
|
(function (Prism) {
|
|
60947
|
-
|
|
60948
|
-
|
|
60949
|
-
|
|
60950
|
-
|
|
60951
|
-
|
|
60952
|
-
|
|
60953
|
-
|
|
60954
|
-
|
|
60955
|
-
|
|
60956
|
-
|
|
60957
|
-
|
|
60958
|
-
|
|
60959
|
-
|
|
60960
|
-
|
|
60961
|
-
|
|
60962
|
-
|
|
60963
|
-
|
|
60964
|
-
|
|
60965
|
-
|
|
60966
|
-
|
|
60967
|
-
|
|
60968
|
-
|
|
60969
|
-
|
|
60954
|
+
Prism.languages.agda = {
|
|
60955
|
+
comment: /\{-[\s\S]*?(?:-\}|$)|--.*/,
|
|
60956
|
+
string: {
|
|
60957
|
+
pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,
|
|
60958
|
+
greedy: true
|
|
60959
|
+
},
|
|
60960
|
+
punctuation: /[(){}⦃⦄.;@]/,
|
|
60961
|
+
'class-name': {
|
|
60962
|
+
pattern: /((?:data|record) +)\S+/,
|
|
60963
|
+
lookbehind: true
|
|
60964
|
+
},
|
|
60965
|
+
function: {
|
|
60966
|
+
pattern: /(^[ \t]*)(?!\s)[^:\r\n]+(?=:)/m,
|
|
60967
|
+
lookbehind: true
|
|
60968
|
+
},
|
|
60969
|
+
operator: {
|
|
60970
|
+
pattern: /(^\s*|\s)(?:[=|:∀→λ\\?_]|->)(?=\s)/,
|
|
60971
|
+
lookbehind: true
|
|
60972
|
+
},
|
|
60973
|
+
keyword:
|
|
60974
|
+
/\b(?:Set|abstract|constructor|data|eta-equality|field|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)\b/
|
|
60975
|
+
};
|
|
60976
|
+
})(Prism);
|
|
60977
|
+
}
|
|
60978
|
+
return agda_1;
|
|
60970
60979
|
}
|
|
60971
60980
|
|
|
60972
|
-
var
|
|
60973
|
-
|
|
60974
|
-
|
|
60975
|
-
|
|
60976
|
-
|
|
60977
|
-
|
|
60978
|
-
|
|
60979
|
-
|
|
60980
|
-
|
|
60981
|
-
|
|
60982
|
-
|
|
60983
|
-
|
|
60984
|
-
|
|
60985
|
-
|
|
60986
|
-
|
|
60987
|
-
|
|
60988
|
-
|
|
60989
|
-
|
|
60990
|
-
|
|
60991
|
-
|
|
60992
|
-
|
|
60993
|
-
|
|
60994
|
-
|
|
60995
|
-
|
|
60996
|
-
|
|
60997
|
-
|
|
60998
|
-
|
|
60999
|
-
|
|
61000
|
-
|
|
61001
|
-
|
|
61002
|
-
/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i, // objects and metadata that are used like keywords
|
|
61003
|
-
/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i
|
|
61004
|
-
],
|
|
61005
|
-
number:
|
|
61006
|
-
/\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|LL?|U(?:LL?)?)?\b/i,
|
|
61007
|
-
boolean: /\b(?:false|true)\b/i,
|
|
61008
|
-
variable: /\b(?:Curr(?:FieldNo|Page|Report)|x?Rec|RequestOptionsPage)\b/,
|
|
61009
|
-
'class-name':
|
|
61010
|
-
/\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,
|
|
61011
|
-
operator: /\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,
|
|
61012
|
-
punctuation: /[()\[\]{}:.;,]/
|
|
61013
|
-
};
|
|
61014
|
-
}
|
|
61015
|
-
return al_1;
|
|
60981
|
+
var al_1 = al;
|
|
60982
|
+
al.displayName = 'al';
|
|
60983
|
+
al.aliases = [];
|
|
60984
|
+
function al(Prism) {
|
|
60985
|
+
// based on https://github.com/microsoft/AL/blob/master/grammar/alsyntax.tmlanguage
|
|
60986
|
+
Prism.languages.al = {
|
|
60987
|
+
comment: /\/\/.*|\/\*[\s\S]*?\*\//,
|
|
60988
|
+
string: {
|
|
60989
|
+
pattern: /'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,
|
|
60990
|
+
greedy: true
|
|
60991
|
+
},
|
|
60992
|
+
function: {
|
|
60993
|
+
pattern:
|
|
60994
|
+
/(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,
|
|
60995
|
+
lookbehind: true
|
|
60996
|
+
},
|
|
60997
|
+
keyword: [
|
|
60998
|
+
// keywords
|
|
60999
|
+
/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i, // objects and metadata that are used like keywords
|
|
61000
|
+
/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i
|
|
61001
|
+
],
|
|
61002
|
+
number:
|
|
61003
|
+
/\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|LL?|U(?:LL?)?)?\b/i,
|
|
61004
|
+
boolean: /\b(?:false|true)\b/i,
|
|
61005
|
+
variable: /\b(?:Curr(?:FieldNo|Page|Report)|x?Rec|RequestOptionsPage)\b/,
|
|
61006
|
+
'class-name':
|
|
61007
|
+
/\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,
|
|
61008
|
+
operator: /\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,
|
|
61009
|
+
punctuation: /[()\[\]{}:.;,]/
|
|
61010
|
+
};
|
|
61016
61011
|
}
|
|
61017
61012
|
|
|
61013
|
+
var al$1 = /*#__PURE__*/_mergeNamespaces({
|
|
61014
|
+
__proto__: null,
|
|
61015
|
+
'default': al_1
|
|
61016
|
+
}, [al_1]);
|
|
61017
|
+
|
|
61018
61018
|
var antlr4_1 = antlr4;
|
|
61019
61019
|
antlr4.displayName = 'antlr4';
|
|
61020
61020
|
antlr4.aliases = ['g4'];
|
|
@@ -84052,8 +84052,8 @@ refractor.register(abap_1);
|
|
|
84052
84052
|
refractor.register(abnf_1);
|
|
84053
84053
|
refractor.register(actionscript_1);
|
|
84054
84054
|
refractor.register(ada_1);
|
|
84055
|
-
refractor.register(
|
|
84056
|
-
refractor.register(
|
|
84055
|
+
refractor.register(requireAgda());
|
|
84056
|
+
refractor.register(al_1);
|
|
84057
84057
|
refractor.register(antlr4_1);
|
|
84058
84058
|
refractor.register(apacheconf_1);
|
|
84059
84059
|
refractor.register(apex_1);
|
|
@@ -86356,6 +86356,33 @@ var createContext = function createContext(initialValue) {
|
|
|
86356
86356
|
}), _ref3;
|
|
86357
86357
|
};
|
|
86358
86358
|
|
|
86359
|
+
var setWithoutModifyingActions = function setWithoutModifyingActions(set) {
|
|
86360
|
+
return function (partial) {
|
|
86361
|
+
return set(function (previous) {
|
|
86362
|
+
if (typeof partial === "function") partial = partial(previous);
|
|
86363
|
+
var isOverwritingActions = toPairs(partial).some(function (_ref) {
|
|
86364
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
86365
|
+
key = _ref2[0],
|
|
86366
|
+
value = _ref2[1];
|
|
86367
|
+
|
|
86368
|
+
return typeof (previous === null || previous === void 0 ? void 0 : previous[key]) === "function" && value !== previous[key];
|
|
86369
|
+
});
|
|
86370
|
+
|
|
86371
|
+
if (isOverwritingActions) {
|
|
86372
|
+
throw new Error("Actions should not be modified");
|
|
86373
|
+
}
|
|
86374
|
+
|
|
86375
|
+
return partial;
|
|
86376
|
+
}, false);
|
|
86377
|
+
};
|
|
86378
|
+
};
|
|
86379
|
+
|
|
86380
|
+
var withImmutableActions = function withImmutableActions(config) {
|
|
86381
|
+
return function (set, get, api) {
|
|
86382
|
+
return config(setWithoutModifyingActions(set), get, api);
|
|
86383
|
+
};
|
|
86384
|
+
};
|
|
86385
|
+
|
|
86359
86386
|
var _path$1, _path2, _path3, _path4, _path5, _path6, _path7;
|
|
86360
86387
|
|
|
86361
86388
|
function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
@@ -87953,12 +87980,12 @@ var zephir = /*#__PURE__*/_mergeNamespaces({
|
|
|
87953
87980
|
'default': zephirExports
|
|
87954
87981
|
}, [zephirExports]);
|
|
87955
87982
|
|
|
87956
|
-
var
|
|
87983
|
+
var agdaExports = requireAgda();
|
|
87957
87984
|
|
|
87958
|
-
var
|
|
87985
|
+
var agda = /*#__PURE__*/_mergeNamespaces({
|
|
87959
87986
|
__proto__: null,
|
|
87960
|
-
'default':
|
|
87961
|
-
}, [
|
|
87987
|
+
'default': agdaExports
|
|
87988
|
+
}, [agdaExports]);
|
|
87962
87989
|
|
|
87963
87990
|
var avroIdlExports = requireAvroIdl();
|
|
87964
87991
|
|
|
@@ -89717,4 +89744,4 @@ var zig = /*#__PURE__*/_mergeNamespaces({
|
|
|
89717
89744
|
'default': zigExports
|
|
89718
89745
|
}, [zigExports]);
|
|
89719
89746
|
|
|
89720
|
-
export { Columns, DateFormat, ErrorPage, HoneybadgerErrorBoundary, SignIn as LoginPage, NeetoWidget, PrivateRoute, Sidebar, TimeFormat, createContext, useDebounce, useFuncDebounce, useIsElementVisibleInDom, useLocalStorage, useOnClickOutside, usePrevious, useUpdateEffect };
|
|
89747
|
+
export { Columns, DateFormat, ErrorPage, HoneybadgerErrorBoundary, SignIn as LoginPage, NeetoWidget, PrivateRoute, Sidebar, TimeFormat, createContext, useDebounce, useFuncDebounce, useIsElementVisibleInDom, useLocalStorage, useOnClickOutside, usePrevious, useUpdateEffect, withImmutableActions };
|
package/utils.d.ts
CHANGED
|
@@ -15,14 +15,14 @@ export function withEventTargetValue(
|
|
|
15
15
|
export function getSubdomain(): string;
|
|
16
16
|
export function simulateApiCall<T>(
|
|
17
17
|
result: T,
|
|
18
|
-
error
|
|
18
|
+
error?: any,
|
|
19
19
|
errorProbability?: number,
|
|
20
20
|
delayMs?: number
|
|
21
21
|
): Promise<T>;
|
|
22
22
|
|
|
23
23
|
export function copyToClipboard(
|
|
24
24
|
text: string,
|
|
25
|
-
configs
|
|
25
|
+
configs?: { showToastr?: boolean; message?: string }
|
|
26
26
|
): void;
|
|
27
27
|
|
|
28
28
|
export function buildUrl(route: string, params: object): string;
|