@evlop/commons 1.0.117 → 1.0.120

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"scopeDataSource.d.ts","sourceRoot":"","sources":["../../../src/data-sources/scopeDataSource.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK1C,QAAA,MAAM,eAAe,EAAE,WAEtB,CAAC;AAsBF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"scopeDataSource.d.ts","sourceRoot":"","sources":["../../../src/data-sources/scopeDataSource.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,QAAA,MAAM,eAAe,EAAE,WAEtB,CAAC;AAWF,eAAe,eAAe,CAAC"}
@@ -1,23 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const lodash_1 = require("lodash");
4
- const uuid_1 = require("uuid");
5
- const constants_1 = require("../constants");
6
4
  const scopeDataSource = (options, { scope }) => {
7
5
  return lodash_1.get(scope, lodash_1.get(options, 'path'));
8
6
  };
9
- scopeDataSource.keyExtractor = (options, { scope }) => {
10
- const path = lodash_1.get(options, 'path', '');
11
- const scopeValue = lodash_1.get(scope, lodash_1.get(options, 'path'));
12
- return uuid_1.v5([
13
- path,
14
- JSON.stringify(scopeValue),
15
- // to detect change in collection
16
- lodash_1.get(scopeValue, 'page', ''),
17
- lodash_1.get(scopeValue, 'isLoading', ''),
18
- lodash_1.get(scopeValue, 'hasMore', ''),
19
- ].join(':'), constants_1.DATA_SOURCE_KEY_NAMESPACE);
20
- };
7
+ scopeDataSource.keyExtractor = () => 'scope';
21
8
  scopeDataSource.displayName = 'Scope';
22
9
  scopeDataSource.identifier = 'scope';
23
10
  scopeDataSource.type = 'Object';
@@ -1 +1 @@
1
- {"version":3,"file":"scopeDataSource.js","sourceRoot":"","sources":["../../../src/data-sources/scopeDataSource.ts"],"names":[],"mappings":";;AAAA,mCAA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6B;AAI7B,MAAM,eAAe,GAAgB,CAAC,OAAO,EAAE,EAAC,KAAK,EAAC,EAAC,EAAE;IACjD,OAAO,YAAG,CAAC,KAAK,EAAC,YAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAA;AAC9C,CAAC,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC;AAC7C,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC;AACtC,eAAe,CAAC,UAAU,GAAG,OAAO,CAAC;AACrC,eAAe,CAAC,IAAI,GAAG,QAAQ,CAAC;AAChC,eAAe,CAAC,oBAAoB,GAAG;IACnC,EAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAG,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAC;CAEjG,CAAC;AAEF,kBAAe,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const encodeBase64: (input: string) => string;
2
+ export declare const decodeBase64: (input: string) => string;
3
+ //# sourceMappingURL=base64.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../../src/helpers/base64.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,UAAoB,MAAM,WAgClD,CAAC;AAEF,eAAO,MAAM,YAAY,UAAoB,MAAM,WAwClD,CAAC"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decodeBase64 = exports.encodeBase64 = void 0;
4
+ const keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
5
+ const encodeBase64 = function (input) {
6
+ let output = [];
7
+ let chr1, chr2, chr3 = "";
8
+ let enc1, enc2, enc3, enc4 = "";
9
+ let i = 0;
10
+ do {
11
+ chr1 = input.charCodeAt(i++);
12
+ chr2 = input.charCodeAt(i++);
13
+ chr3 = input.charCodeAt(i++);
14
+ enc1 = chr1 >> 2;
15
+ enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
16
+ enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
17
+ enc4 = chr3 & 63;
18
+ if (isNaN(chr2)) {
19
+ enc3 = enc4 = 64;
20
+ }
21
+ else if (isNaN(chr3)) {
22
+ enc4 = 64;
23
+ }
24
+ output.push(keyStr.charAt(enc1) +
25
+ keyStr.charAt(enc2) +
26
+ keyStr.charAt(enc3) +
27
+ keyStr.charAt(enc4));
28
+ chr1 = chr2 = chr3 = "";
29
+ enc1 = enc2 = enc3 = enc4 = "";
30
+ } while (i < input.length);
31
+ return output.join('');
32
+ };
33
+ exports.encodeBase64 = encodeBase64;
34
+ const decodeBase64 = function (input) {
35
+ let output = "";
36
+ let chr1, chr2, chr3 = "";
37
+ let enc1, enc2, enc3, enc4 = "";
38
+ let i = 0;
39
+ // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
40
+ var base64test = /[^A-Za-z0-9\+\/\=]/g;
41
+ if (base64test.exec(input)) {
42
+ throw new Error("There were invalid base64 characters in the input text.\n" +
43
+ "Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\n" +
44
+ "Expect errors in decoding.");
45
+ }
46
+ input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
47
+ do {
48
+ enc1 = keyStr.indexOf(input.charAt(i++));
49
+ enc2 = keyStr.indexOf(input.charAt(i++));
50
+ enc3 = keyStr.indexOf(input.charAt(i++));
51
+ enc4 = keyStr.indexOf(input.charAt(i++));
52
+ chr1 = (enc1 << 2) | (enc2 >> 4);
53
+ chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
54
+ chr3 = ((enc3 & 3) << 6) | enc4;
55
+ output = output + String.fromCharCode(chr1);
56
+ if (enc3 != 64) {
57
+ output = output + String.fromCharCode(chr2);
58
+ }
59
+ if (enc4 != 64) {
60
+ output = output + String.fromCharCode(chr3);
61
+ }
62
+ chr1 = chr2 = chr3 = "";
63
+ enc1 = enc2 = enc3 = enc4 = "";
64
+ } while (i < input.length);
65
+ return output;
66
+ };
67
+ exports.decodeBase64 = decodeBase64;
68
+ //# sourceMappingURL=base64.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base64.js","sourceRoot":"","sources":["../../../src/helpers/base64.ts"],"names":[],"mappings":";;;AAAA,MAAM,MAAM,GAAG,mEAAmE,CAAC;AAE5E,MAAM,YAAY,GAAG,UAAU,KAAa;IAC/C,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,IAAS,EAAE,IAAS,EAAE,IAAI,GAAQ,EAAE,CAAC;IACzC,IAAI,IAAS,EAAE,IAAS,EAAE,IAAS,EAAE,IAAI,GAAQ,EAAE,CAAC;IACpD,IAAI,CAAC,GAAG,CAAC,CAAC;IAEV,GAAG;QACC,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;QAC7B,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;QAC7B,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;QAE7B,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC;QACjB,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;QACvC,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;QACxC,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;QAEjB,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE;YACb,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;SACpB;aAAM,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE;YACpB,IAAI,GAAG,EAAE,CAAC;SACb;QAED,MAAM,CAAC,IAAI,CACP,MAA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,EAAE,CAAC,CAAC,CAAC;QACzC,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAEzC,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;QACjC,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;QACxC,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;QAEhC,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAE5C,IAAI,IAAI,IAAI,EAAE,EAAE;YACZ,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;SAC/C;QACD,IAAI,IAAI,IAAI,EAAE,EAAE;YACZ,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;SAC/C;QAED,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;QACxB,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;KAElC,QAAQ,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE;IAE3B,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAxCW,QAAA,YAAY,gBAwCvB"}
@@ -1,10 +1,12 @@
1
1
  import { Collection } from '../classes';
2
+ declare type DataSourceName = 'static' | 'collection' | 'url' | 'scope' | any;
2
3
  interface DataSourceOptions {
3
- type: 'static' | 'collection' | 'url' | 'scope' | any;
4
- sourceId?: string;
4
+ type?: DataSourceName;
5
+ memoize?: boolean;
5
6
  params?: string;
6
7
  transformer?: string;
7
8
  data?: Object;
9
+ [key: string]: any;
8
10
  }
9
11
  declare type Data = Collection | Object;
10
12
  export declare const useDataSource: (source: string | DataSourceOptions, options?: DataSourceOptions) => Data;
@@ -1 +1 @@
1
- {"version":3,"file":"useDataSource.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDataSource.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxC,UAAU,iBAAiB;IACvB,IAAI,EAAE,QAAQ,GAAG,YAAY,GAAG,KAAK,GAAG,OAAO,GAAG,GAAG,CAAC;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAE;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,aAAK,IAAI,GAAG,UAAU,GAAG,MAAM,CAAC;AAEhC,eAAO,MAAM,aAAa,WAAa,MAAM,GAAG,iBAAiB,YAAa,iBAAiB,KAAI,IAwGlG,CAAC"}
1
+ {"version":3,"file":"useDataSource.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDataSource.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAKxC,aAAK,cAAc,GAAG,QAAQ,GAAG,YAAY,GAAG,KAAK,GAAG,OAAO,GAAG,GAAG,CAAC;AACtE,UAAU,iBAAiB;IACvB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAE;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAC,MAAM,GAAG,GAAG,CAAC;CACrB;AAED,aAAK,IAAI,GAAG,UAAU,GAAG,MAAM,CAAC;AAIhC,eAAO,MAAM,aAAa,WAAa,MAAM,GAAG,iBAAiB,YAAa,iBAAiB,KAAI,IA4GlG,CAAC"}
@@ -11,30 +11,27 @@ const classes_1 = require("../classes");
11
11
  const reducers_1 = require("../reducers");
12
12
  const useScope_1 = require("./useScope");
13
13
  const useTemplate_1 = __importDefault(require("./useTemplate"));
14
+ const defaultDatasourceOptions = { memoize: true };
14
15
  const useDataSource = (source, options) => {
15
16
  const dispatch = react_redux_1.useDispatch();
16
17
  const template = useTemplate_1.default();
17
18
  const scope = useScope_1.useScope();
18
- let dataSourceName, _dataSourceOptions;
19
- if (typeof source === 'object') {
20
- dataSourceName = source.type;
21
- _dataSourceOptions = lodash_1.omit(source, ['type']);
22
- }
23
- else {
24
- dataSourceName = source;
25
- _dataSourceOptions = options || {};
26
- }
19
+ const { dataSourceName, options: _dataSourceOptions } = react_1.useMemo(() => {
20
+ if (typeof source === 'object') {
21
+ return { dataSourceName: source.type, options: lodash_1.defaults(lodash_1.omit(source, ['type']), defaultDatasourceOptions) };
22
+ }
23
+ else {
24
+ return { dataSourceName: source, options: lodash_1.defaults(options, defaultDatasourceOptions) };
25
+ }
26
+ }, [source, options]);
27
27
  const dataSource = react_redux_1.useSelector(state => state.dataSource.dataSources[dataSourceName]);
28
- const { dependencies, dataSourceOptions } = react_1.useMemo(() => {
28
+ // prepare datasource options by filling values from scope using template
29
+ const dataSourceOptions = react_1.useMemo(() => {
29
30
  const paramNames = lodash_1.sortedUniq(lodash_1.map(lodash_1.get(dataSource, 'configurationOptions'), 'name'));
30
31
  const templatedValues = lodash_1.reduce(paramNames, (acc, paramName) => (Object.assign(Object.assign({}, acc), { [paramName]: template(lodash_1.get(_dataSourceOptions, paramName)) })), {});
31
- const dependencies = lodash_1.map(paramNames, paramName => lodash_1.get(templatedValues, paramName));
32
- // to refresh value when scope changes for scoope data source
33
- if (dataSourceName === 'scope' && templatedValues['path']) {
34
- dependencies.push(lodash_1.get(scope, templatedValues['path']));
35
- }
36
- return { dependencies, dataSourceOptions: lodash_1.defaults(templatedValues, _dataSourceOptions) };
32
+ return lodash_1.defaults(templatedValues, _dataSourceOptions);
37
33
  }, [scope, template, dataSourceName, dataSource, _dataSourceOptions]);
34
+ const { memoize } = dataSourceOptions;
38
35
  const key = dataSource && dataSource.keyExtractor(dataSourceOptions, { scope, dispatch });
39
36
  const currentValue = react_redux_1.useSelector(state => state.dataSource.data[key]);
40
37
  const loadData = react_1.useCallback((params) => {
@@ -77,11 +74,15 @@ const useDataSource = (source, options) => {
77
74
  });
78
75
  }, [loadData, dataSourceOptions, scope, key]);
79
76
  react_1.useEffect(() => {
80
- if (!currentValue) {
77
+ if (dataSourceName === 'scope')
78
+ return;
79
+ if (!currentValue || !memoize) {
81
80
  loadData();
82
81
  }
83
- }, [key]);
84
- return react_1.useMemo(() => {
82
+ }, [dataSourceName, key, memoize]);
83
+ const value = react_1.useMemo(() => {
84
+ if (dataSourceName === 'scope')
85
+ return;
85
86
  if (lodash_1.get(dataSource, 'type') === 'Array') {
86
87
  let items = lodash_1.get(currentValue, 'items');
87
88
  items = Array.isArray(items) ? items : [];
@@ -102,7 +103,11 @@ const useDataSource = (source, options) => {
102
103
  });
103
104
  }
104
105
  return currentValue || { isLoading: true };
105
- }, [currentValue, dataSource]);
106
+ }, [dataSourceName, currentValue, dataSource]);
107
+ if (dataSourceName === 'scope') {
108
+ return lodash_1.get(scope, dataSourceOptions.path);
109
+ }
110
+ return value;
106
111
  };
107
112
  exports.useDataSource = useDataSource;
108
113
  //# sourceMappingURL=useDataSource.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDataSource.js","sourceRoot":"","sources":["../../../src/hooks/useDataSource.tsx"],"names":[],"mappings":";;;;;;AAAA,mCAAiG;AACjG,iCAAwD;AACxD,6CAAuD;AACvD,wCAAwC;AACxC,0CAAmK;AACnK,yCAAsC;AACtC,gEAAwC;AAWjC,MAAM,aAAa,GAAG,CAAE,MAAkC,EAAG,OAA2B,EAAQ,EAAE;IACrG,MAAM,QAAQ,GAAG,yBAAW,EAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,qBAAW,EAAE,CAAC;IAC/B,MAAM,KAAK,GAAG,m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AW,EAAE,CAAC,CAAC;gBAC7C,YAAY,EAAE,YAAG,CAAC,YAAY,EAAE,cAAc,EAAE,CAAC,CAAC;gBAClD,OAAO,EAAE,QAAQ;gBACjB,MAAM;gBACN,QAAQ;gBACR,IAAI;gBACJ,QAAQ;aACX,CAAC,CAAC;SACN;QACD,OAAO,YAAY,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IAC/C,CAAC,EAAE,CAAC,cAAc,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC;IAE/C,IAAG,cAAc,KAAK,OAAO,EAAC;QAC1B,OAAO,YAAG,CAAC,KAAK,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAA;KAC5C;IAED,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AA5GW,QAAA,aAAa,iBA4GxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evlop/commons",
3
- "version": "1.0.117",
3
+ "version": "1.0.120",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "peerDependencies": {
@@ -1,3 +0,0 @@
1
- export declare const encodeBase64: typeof btoa;
2
- export declare const decodeBase64: typeof atob;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/base64/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,aAAO,CAAC;AACjC,eAAO,MAAM,YAAY,aAAO,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.decodeBase64 = exports.encodeBase64 = void 0;
4
- exports.encodeBase64 = btoa;
5
- exports.decodeBase64 = atob;
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/helpers/base64/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG,IAAI,CAAC;AACpB,QAAA,YAAY,GAAG,IAAI,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const encodeBase64: any;
2
- export declare const decodeBase64: any;
3
- //# sourceMappingURL=index.native.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/helpers/base64/index.native.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,KAAgB,CAAC;AAC1C,eAAO,MAAM,YAAY,KAAgB,CAAC"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.decodeBase64 = exports.encodeBase64 = void 0;
7
- const react_native_base64_1 = __importDefault(require("react-native-base64"));
8
- exports.encodeBase64 = react_native_base64_1.default.encode;
9
- exports.decodeBase64 = react_native_base64_1.default.decode;
10
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/helpers/base64/index.native.ts"],"names":[],"mappings":";;;;;;AAAA,8EAAyC;AAE5B,QAAA,YAAY,GAAG,6BAAM,CAAC,MAAM,CAAC;AAC7B,QAAA,YAAY,GAAG,6BAAM,CAAC,MAAM,CAAC"}