@evlop/commons 1.0.165 → 1.0.167

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=base64.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base64.test.d.ts","sourceRoot":"","sources":["../../../src/helpers/base64.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const chai_1 = require("chai");
4
+ const base64_1 = require("./base64"); // Assuming the functions are exported from this file
5
+ describe('Base64', () => {
6
+ it('should correctly encode to Base64', () => {
7
+ const result = base64_1.encodeBase64("Hello, World!");
8
+ chai_1.expect(result).to.equal("SGVsbG8sIFdvcmxkIQ==");
9
+ });
10
+ it('should correctly decode from Base64', () => {
11
+ const result = base64_1.decodeBase64("SGVsbG8sIFdvcmxkIQ==");
12
+ chai_1.expect(result).to.equal("Hello, World!");
13
+ });
14
+ it('should be able to decode encoded string', () => {
15
+ const original = "Hello, World!";
16
+ const encoded = base64_1.encodeBase64(original);
17
+ const decoded = base64_1.decodeBase64(encoded);
18
+ chai_1.expect(decoded).to.equal(original);
19
+ });
20
+ it('should throw error on invalid Base64 characters', () => {
21
+ const invalidBase64 = "SGVsbG8sIFdvcmxkIQ==$";
22
+ chai_1.expect(() => base64_1.decodeBase64(invalidBase64)).to.throw();
23
+ });
24
+ });
25
+ //# sourceMappingURL=base64.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base64.test.js","sourceRoot":"","sources":["../../../src/helpers/base64.test.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAC9B,qCAAsD,CAAC,qDAAqD;AAE5G,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACpB,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QACzC,MAAM,MAAM,GAAG,qBAAY,CAAC,eAAe,CAAC,CAAC;QAC7C,aAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC3C,MAAM,MAAM,GAAG,qBAAY,CAAC,sBAAsB,CAAC,CAAC;QACpD,aAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QAC/C,MAAM,QAAQ,GAAG,eAAe,CAAC;QACjC,MAAM,OAAO,GAAG,qBAAY,CAAC,QAAQ,CAAC,CAAC;QACvC,MAAM,OAAO,GAAG,qBAAY,CAAC,OAAO,CAAC,CAAC;QACtC,aAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACvD,MAAM,aAAa,GAAG,uBAAuB,CAAC;QAC9C,aAAM,CAAC,GAAG,EAAE,CAAC,qBAAY,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IACzD,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -6,4 +6,5 @@ export * from './base64';
6
6
  export * from './i18nHelpers';
7
7
  export * from './analytics';
8
8
  export * from './remoteAction';
9
+ export * from './pathHelper';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
@@ -18,4 +18,5 @@ __exportStar(require("./base64"), exports);
18
18
  __exportStar(require("./i18nHelpers"), exports);
19
19
  __exportStar(require("./analytics"), exports);
20
20
  __exportStar(require("./remoteAction"), exports);
21
+ __exportStar(require("./pathHelper"), exports);
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmC;AACnC,8CAA4B;AAC5B,iDAA+B;AAC/B,iDAA+B;AAC/B,2CAAyB;AACzB,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmC;AACnC,8CAA4B;AAC5B,iDAA+B;AAC/B,iDAA+B;AAC/B,2CAAyB;AACzB,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B;AAC/B,+CAA6B"}
@@ -0,0 +1,2 @@
1
+ export declare function generatePath(pathTemplate: string, params: any): string;
2
+ //# sourceMappingURL=pathHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathHelper.d.ts","sourceRoot":"","sources":["../../../src/helpers/pathHelper.ts"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,UA4B7D"}
@@ -0,0 +1,36 @@
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.generatePath = void 0;
7
+ const lodash_1 = require("lodash");
8
+ const query_string_1 = __importDefault(require("query-string"));
9
+ function generatePath(pathTemplate, params) {
10
+ const parts = lodash_1.compact(lodash_1.split(pathTemplate, '/'));
11
+ const { pathSegments, usedParams } = lodash_1.reduce(parts, ({ pathSegments, usedParams }, part) => {
12
+ const isOptional = part[part.length - 1] === '?';
13
+ if (isOptional)
14
+ part = part.slice(0, -1);
15
+ if (part[0] === ':') {
16
+ const key = part.slice(1);
17
+ if (lodash_1.has(params, [key])) {
18
+ pathSegments.push(encodeURIComponent(params[key]));
19
+ usedParams[key] = true;
20
+ }
21
+ else if (!isOptional) {
22
+ pathSegments.push(part);
23
+ }
24
+ }
25
+ else {
26
+ pathSegments.push(part);
27
+ }
28
+ return { pathSegments, usedParams };
29
+ }, { pathSegments: [], usedParams: {} });
30
+ const remainingParams = lodash_1.omit(params, Object.keys(usedParams));
31
+ const query = query_string_1.default.stringify(remainingParams);
32
+ const path = '/' + pathSegments.join('/');
33
+ return path + (query ? '?' + query : '');
34
+ }
35
+ exports.generatePath = generatePath;
36
+ //# sourceMappingURL=pathHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathHelper.js","sourceRoot":"","sources":["../../../src/helpers/pathHelper.ts"],"names":[],"mappings":";;;;;;AAAA,mCAA2D;AAC3D,gEAAuC;AAEvC,SAAgB,YAAY,CAAC,YAAoB,EAAE,MAAW;IAC1D,MAAM,KAAK,GAAG,gBAAO,CAAC,cAAK,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC;IAEhD,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,eAAM,CAAC,KAAK,EAAE,CAAC,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE;QACtF,MAAM,UAAU,G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.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathhelper.test.d.ts","sourceRoot":"","sources":["../../../src/helpers/pathhelper.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const chai_1 = require("chai");
4
+ const pathHelper_1 = require("./pathHelper");
5
+ describe('Test handlebar temaplates', function () {
6
+ it('should replace params and append query string', () => {
7
+ const result = pathHelper_1.generatePath("/users/:id?/edit?", { id: "42", a: 1 });
8
+ chai_1.expect(result).to.equal("/users/42/edit?a=1");
9
+ });
10
+ it('should handle optional path segments', () => {
11
+ const result = pathHelper_1.generatePath("/users/:id?/edit?", { a: 1 });
12
+ chai_1.expect(result).to.equal("/users/edit?a=1");
13
+ });
14
+ it('should handle missing optional params', () => {
15
+ const result = pathHelper_1.generatePath("/users/:id?/edit?", {});
16
+ chai_1.expect(result).to.equal("/users/edit");
17
+ });
18
+ it('should URL encode params', () => {
19
+ const result = pathHelper_1.generatePath("/users/:id?", { id: "hello world" });
20
+ chai_1.expect(result).to.equal("/users/hello%20world");
21
+ });
22
+ it('should URL encode query string', () => {
23
+ const result = pathHelper_1.generatePath("/users/:id?", { id: "42", a: "hello world" });
24
+ chai_1.expect(result).to.equal("/users/42?a=hello%20world");
25
+ });
26
+ it('should return root path when all path segments are optional and missing', () => {
27
+ const result = pathHelper_1.generatePath("/:a?/:b?/:c?", {});
28
+ chai_1.expect(result).to.equal("/");
29
+ });
30
+ it('should keep required params in path even if missing in params', () => {
31
+ const result = pathHelper_1.generatePath("/users/:id/edit", {});
32
+ chai_1.expect(result).to.eq("/users/:id/edit");
33
+ });
34
+ });
35
+ //# sourceMappingURL=pathhelper.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathhelper.test.js","sourceRoot":"","sources":["../../../src/helpers/pathhelper.test.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAC9B,6CAA4C;AAE5C,QAAQ,CAAC,2BAA2B,E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CAAC,CAAC;IAEH,EAAE,CAAC,yEAAyE,EAAE,GAAG,EAAE;QAC/E,MAAM,MAAM,GAAG,yBAAY,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;QAChD,aAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;QACrE,MAAM,MAAM,GAAG,yBAAY,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;QACnD,aAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAA"}
@@ -20,6 +20,17 @@ export declare const fontSizes: {
20
20
  xxxxxxxl: number;
21
21
  xxxxxxxxl: number;
22
22
  xxxxxxxxxl: number;
23
+ '4xs': number;
24
+ '3xs': number;
25
+ '2xs': number;
26
+ '2xl': number;
27
+ '3xl': number;
28
+ '4xl': number;
29
+ '5xl': number;
30
+ '6xl': number;
31
+ '7xl': number;
32
+ '8xl': number;
33
+ '9xl': number;
23
34
  };
24
35
  declare type FontSizes = typeof fontSizes;
25
36
  declare type FontSize = keyof FontSizes;
@@ -56,6 +67,17 @@ export declare const lineHeightVariants: {
56
67
  xxxxxxxl: number;
57
68
  xxxxxxxxl: number;
58
69
  xxxxxxxxxl: number;
70
+ '4xs': number;
71
+ '3xs': number;
72
+ '2xs': number;
73
+ '2xl': number;
74
+ '3xl': number;
75
+ '4xl': number;
76
+ '5xl': number;
77
+ '6xl': number;
78
+ '7xl': number;
79
+ '8xl': number;
80
+ '9xl': number;
59
81
  };
60
82
  declare type LineHeightVariants = typeof lineHeightVariants;
61
83
  declare type LineHeight = keyof LineHeightVariants;
@@ -81,6 +103,18 @@ export declare const spacingVariations: {
81
103
  xxxxxl: number;
82
104
  xxxxxxl: number;
83
105
  xxxxxxxl: number;
106
+ '7xs': number;
107
+ '6xs': number;
108
+ '5xs': number;
109
+ '4xs': number;
110
+ '3xs': number;
111
+ '2xs': number;
112
+ '2xl': number;
113
+ '3xl': number;
114
+ '4xl': number;
115
+ '5xl': number;
116
+ '6xl': number;
117
+ '7xl': number;
84
118
  };
85
119
  declare type SpaceVariants = typeof fontSizes;
86
120
  declare type Space = keyof SpaceVariants;
@@ -118,11 +152,37 @@ export declare type ColorShade = keyof ColorShades;
118
152
  declare type ShadeableColor = Exclude<BaseColor, 'white' | 'black'>;
119
153
  declare type ShadedColor = `${ShadeableColor}-shade-${ColorShade}`;
120
154
  export declare type Color = BaseColor | ShadedColor;
155
+ export declare function generateColorLightDarkShades(color: any): {
156
+ 0: string;
157
+ 50: string;
158
+ 100: string;
159
+ 200: string;
160
+ 300: string;
161
+ 400: string;
162
+ 500: string;
163
+ 600: string;
164
+ 700: string;
165
+ 800: string;
166
+ 900: string;
167
+ };
168
+ export declare function generateColorAlphaShades(color: any): {
169
+ 50: any;
170
+ 100: any;
171
+ 200: any;
172
+ 300: any;
173
+ 400: any;
174
+ 500: any;
175
+ 600: any;
176
+ 700: any;
177
+ 800: any;
178
+ 900: any;
179
+ };
180
+ export declare function generateColorShadesWithName(colorName: string, color: string): {
181
+ [x: string]: any;
182
+ };
121
183
  export declare function getColorVariants(colors: {
122
184
  [colorName: string]: string;
123
- }): {
124
- [colorName: string]: string;
125
- };
185
+ }): {};
126
186
  export interface Theme {
127
187
  space: {
128
188
  [key in Space]: string;
@@ -1 +1 @@
1
- {"version":3,"file":"themeHelpers.d.ts","sourceRoot":"","sources":["../../../src/helpers/themeHelpers.tsx"],"names":[],"mappings":"AA+BA,eAAO,MAAM,iBAAiB,aAAa,MAAM;;;;CAI/C,CAAC;AAGH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;CAiBrB,CAAA;AAED,aAAK,SAAS,GAAG,OAAO,SAAS,CAAC;AAClC,aAAK,QAAQ,GAAG,MAAM,SAAS,CAAC;AAEhC,QAAA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esModule", { value: true });
3
- exports.getColorVariants = exports.generateSpacingSizes = exports.spacingVariations = exports.generateLineHeights = exports.lineHeightVariants = exports.generateFontSizes = exports.fontSizes = exports.generateSizeScale = void 0;
3
+ exports.getColorVariants = exports.generateColorShadesWithName = exports.generateColorAlphaShades = exports.generateColorLightDarkShades = exports.generateSpacingSizes = exports.spacingVariations = exports.generateLineHeights = exports.lineHeightVariants = exports.generateFontSizes = exports.fontSizes = exports.generateSizeScale = void 0;
4
4
  const lodash_1 = require("lodash");
5
5
  const polished_1 = require("polished");
6
6
  function lightenRgb(hex, intensity) {
@@ -47,7 +47,18 @@ exports.fontSizes = {
47
47
  'xxxxxxl': 48 / 15,
48
48
  'xxxxxxxl': 60 / 15,
49
49
  'xxxxxxxxl': 76 / 15,
50
- 'xxxxxxxxxl': 94 / 15
50
+ 'xxxxxxxxxl': 94 / 15,
51
+ '4xs': 10 / 15,
52
+ '3xs': 11 / 15,
53
+ '2xs': 12 / 15,
54
+ '2xl': 20 / 15,
55
+ '3xl': 24 / 15,
56
+ '4xl': 27 / 15,
57
+ '5xl': 32 / 15,
58
+ '6xl': 48 / 15,
59
+ '7xl': 60 / 15,
60
+ '8xl': 76 / 15,
61
+ '9xl': 94 / 15
51
62
  };
52
63
  const fontWeights = {
53
64
  Thin: 100,
@@ -85,7 +96,19 @@ exports.spacingVariations = {
85
96
  'xxxxl': 40 / 20,
86
97
  'xxxxxl': 48 / 20,
87
98
  'xxxxxxl': 60 / 20,
88
- 'xxxxxxxl': 72 / 20
99
+ 'xxxxxxxl': 72 / 20,
100
+ '7xs': 1 / 20,
101
+ '6xs': 2 / 20,
102
+ '5xs': 4 / 20,
103
+ '4xs': 5 / 20,
104
+ '3xs': 8 / 20,
105
+ '2xs': 10 / 20,
106
+ '2xl': 32 / 20,
107
+ '3xl': 36 / 20,
108
+ '4xl': 40 / 20,
109
+ '5xl': 48 / 20,
110
+ '6xl': 60 / 20,
111
+ '7xl': 72 / 20,
89
112
  };
90
113
  const generateSpacingSizes = (baseSpacing) => exports.generateSizeScale(baseSpacing, exports.spacingVariations);
91
114
  exports.generateSpacingSizes = generateSpacingSizes;
@@ -115,62 +138,44 @@ const colorShades = {
115
138
  800: 0.4,
116
139
  900: 0.51
117
140
  };
118
- function interpolateShadeAndGetColor(color, shade) {
119
- let _shade = Math.max(Math.min(900, shade), 0);
120
- if (lodash_1.hasIn(colorShades, _shade))
121
- return getColorShade(color, _shade);
122
- const firstShade = Math.floor(_shade / 100);
123
- const secondShade = Math.ceil(_shade / 100);
124
- const weight = (_shade % 100) / 100;
125
- return polished_1.mix(weight, getColorShade(color, firstShade), getColorShade(color, secondShade));
126
- }
141
+ const colorAlphaShades = {
142
+ "50": 0.1,
143
+ "100": 0.2,
144
+ "200": 0.3,
145
+ "300": 0.4,
146
+ "400": 0.5,
147
+ "500": 0.6,
148
+ "600": 0.7,
149
+ "700": 0.8,
150
+ "800": 0.9,
151
+ "900": 0.95
152
+ };
127
153
  function getColorShade(color, shade) {
128
- if (shade < 500) {
154
+ if (+shade < 500) {
129
155
  return lightenRgb(color, colorShades[shade]);
130
156
  }
131
157
  else {
132
158
  return darkenRgb(color, colorShades[shade]);
133
159
  }
134
160
  }
161
+ function generateColorLightDarkShades(color) {
162
+ return lodash_1.mapValues(colorShades, (weight, shade) => getColorShade(color, shade));
163
+ }
164
+ exports.generateColorLightDarkShades = generateColorLightDarkShades;
165
+ function generateColorAlphaShades(color) {
166
+ return lodash_1.mapValues(colorAlphaShades, (weight) => polished_1.opacify(color, weight));
167
+ }
168
+ exports.generateColorAlphaShades = generateColorAlphaShades;
169
+ function generateColorShadesWithName(colorName, color) {
170
+ return Object.assign(Object.assign(Object.assign({}, lodash_1.mapKeys(generateColorLightDarkShades(color), (color, shade) => `${colorName}-${shade}`)), lodash_1.mapKeys(generateColorLightDarkShades(color), (color, shade) => `${colorName}-shade-${shade}`)), lodash_1.mapKeys(generateColorAlphaShades(color), (color, shade) => `${colorName}-alpha-${shade}`));
171
+ }
172
+ exports.generateColorShadesWithName = generateColorShadesWithName;
135
173
  // colors
136
174
  function getColorVariants(colors) {
137
- return new Proxy(colors, {
138
- get: (target, color) => {
139
- const colorParams = lodash_1.split(color, '-');
140
- let resultColor = target[colorParams.shift()];
141
- if (!resultColor)
142
- return;
143
- while (!lodash_1.isEmpty(colorParams) && resultColor) {
144
- const op = colorParams.shift();
145
- switch (op) {
146
- case 'lighten':
147
- const lightenAmount = +colorParams.shift() / 100;
148
- resultColor = polished_1.lighten(lightenAmount, resultColor);
149
- break;
150
- case 'darken':
151
- const darkenAmount = +colorParams.shift() / 100;
152
- resultColor = polished_1.darken(darkenAmount, resultColor);
153
- break;
154
- case 'transparentize':
155
- const transparentizeAmount = +colorParams.shift() / 100;
156
- resultColor = polished_1.transparentize(transparentizeAmount, resultColor);
157
- break;
158
- case 'invert':
159
- resultColor = polished_1.invert(resultColor);
160
- break;
161
- case 'grayscale':
162
- resultColor = polished_1.grayscale(resultColor);
163
- break;
164
- case 'shade':
165
- const shadeLevel = colorParams.shift();
166
- resultColor = interpolateShadeAndGetColor(resultColor, +shadeLevel);
167
- default:
168
- }
169
- }
170
- return resultColor;
171
- },
172
- set() { return false; }
173
- });
175
+ return lodash_1.reduce(colors, (_theme, color, colorName) => {
176
+ lodash_1.assign(_theme, { [colorName]: color, }, generateColorShadesWithName(colorName, color));
177
+ return _theme;
178
+ }, {});
174
179
  }
175
180
  exports.getColorVariants = getColorVariants;
176
181
  //# sourceMappingURL=themeHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"themeHelpers.js","sourceRoot":"","sources":["../../../src/helpers/themeHelpers.tsx"],"names":[],"mappings":";;;AAAA,mCAAkE;AAClE,uCAAiH;AAEjH,SAAS,UAAU,CAAC,GAAG,EAAE,SAAS;IAC9B,MAAM,KAAK,GAAG,qBAAU,CAAC,GAAG,CAAC,CAAC;IAE9B,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,EAAE,CAAC;KACX;IAED,MAAM,CAAC,GAAG,IAAI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AAC;AAFD,4DAEC;AAED,SAAgB,2BAA2B,CAAC,SAAgB,EAAE,KAAY;IACxE,qDACK,gBAAO,CAAC,4BAA4B,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAC,EAAE,CAAA,GAAG,SAAS,IAAI,KAAK,EAAE,CAAC,GACrF,gBAAO,CAAC,4BAA4B,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAC,EAAE,CAAA,GAAG,SAAS,UAAU,KAAK,EAAE,CAAC,GAC3F,gBAAO,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAC,EAAE,CAAA,GAAG,SAAS,UAAU,KAAK,EAAE,CAAC,EAC3F;AACH,CAAC;AAND,kEAMC;AAEH,SAAS;AACT,SAAgB,gBAAgB,CAAC,MAAqC;IAClE,OAAO,eAAM,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAC,EAAE;QAC9C,eAAM,CAAC,MAAM,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,GAAG,EAAE,2BAA2B,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAA;QACtF,OAAO,MAAM,CAAC;IAClB,CAAC,EAAE,EAAE,CAAC,CAAA;AACV,CAAC;AALD,4CAKC"}
@@ -1,15 +1,12 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  const react_native_1 = require("react-native");
4
+ const helpers_1 = require("../../helpers");
7
5
  const { AppConstants } = react_native_1.NativeModules;
8
- const react_native_base64_1 = __importDefault(require("react-native-base64"));
9
6
  let configData = null;
10
7
  try {
11
8
  const configDataJSONBase64 = AppConstants.getConfigDataJSONBase64();
12
- configData = JSON.parse(react_native_base64_1.default.decode(configDataJSONBase64));
9
+ configData = JSON.parse(helpers_1.decodeBase64(configDataJSONBase64));
13
10
  }
14
11
  catch (e) {
15
12
  console.log('Error redux initial state for config', e);
@@ -1 +1 @@
1
- {"version":3,"file":"initialState.native.js","sourceRoot":"","sources":["../../../../src/reducers/config/initialState.native.tsx"],"names":[],"mappings":";;;;;AAAA,+CAA2C;AAC3C,MAAM,EAAC,YAAY,EAAC,GAAG,4BAAa,CAAC;AACrC,8EAAyC;AAGzC,IAAI,UAAU,GAAG,IAAI,CAAC;AAEtB,IAAG;IACC,MAAM,oBAAoB,GAAG,YAAY,CAAC,uBAAuB,EAAE,CAAC;IACpE,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,6BAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC;CAChE;AAAA,OAAM,CAAC,EAAC;IACL,OAAO,CAAC,GAAG,CAAC,sCAAsC,EAAE,CAAC,CAAC,CAAC;IACvD,UAAU,GAAG,EAAE,CAAA;CAClB;AAED,MAAM,kBAAkB,GAAG;IACvB,MAAM,EAAE,EAAE;IACV,IAAI,EAAC,UAAU;CAClB,CAAA;AAED,kBAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"initialState.native.js","sourceRoot":"","sources":["../../../../src/reducers/config/initialState.native.tsx"],"names":[],"mappings":";;AAAA,+CAA6C;AAC7C,2CAA6C;AAC7C,MAAM,EAAC,YAAY,EAAC,GAAG,4BAAa,CAAC;AAGrC,IAAI,UAAU,GAAG,IAAI,CAAC;AAEtB,IAAG;IACC,MAAM,oBAAoB,GAAG,YAAY,CAAC,uBAAuB,EAAE,CAAC;IACpE,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,sBAAY,CAAC,oBAAoB,CAAC,CAAC,CAAC;CAC/D;AAAA,OAAM,CAAC,EAAC;IACL,OAAO,CAAC,GAAG,CAAC,sCAAsC,EAAE,CAAC,CAAC,CAAC;IACvD,UAAU,GAAG,EAAE,CAAA;CAClB;AAED,MAAM,kBAAkB,GAAG;IACvB,MAAM,EAAE,EAAE;IACV,IAAI,EAAC,UAAU;CAClB,CAAA;AAED,kBAAe,kBAAkB,CAAC"}
@@ -1,17 +1,14 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  const lodash_1 = require("lodash");
7
4
  const react_native_1 = require("react-native");
5
+ const helpers_1 = require("../../helpers");
8
6
  const { AppConstants } = react_native_1.NativeModules;
9
- const react_native_base64_1 = __importDefault(require("react-native-base64"));
10
7
  let pagesArray = [];
11
8
  let pagesById = {};
12
9
  try {
13
10
  const configDataJSONBase64 = AppConstants.getPagesJSONBase64();
14
- pagesArray = JSON.parse(react_native_base64_1.default.decode(configDataJSONBase64));
11
+ pagesArray = JSON.parse(helpers_1.decodeBase64(configDataJSONBase64));
15
12
  if (!Array.isArray(pagesArray))
16
13
  throw new Error('Pages must be an array');
17
14
  pagesById = lodash_1.keyBy(pagesArray, 'id');
@@ -1 +1 @@
1
- {"version":3,"file":"initialState.native.js","sourceRoot":"","sources":["../../../../src/reducers/pages/initialState.native.tsx"],"names":[],"mappings":";;;;;AAAA,mCAA+B;AAC/B,+CAA2C;AAC3C,MAAM,EAAC,YAAY,EAAC,GAAG,4BAAa,CAAC;AACrC,8EAAyC;AAEzC,IAAI,UAAU,GAAQ,EAAE,CAAC;AACzB,IAAI,SAAS,GAAQ,EAAE,CAAC;AAExB,IAAG;IACC,MAAM,oBAAoB,GAAG,YAAY,CAAC,kBAAkB,EAAE,CAAC;IAC/D,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,6BAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC7D,IAAG,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACzE,SAAS,GAAG,cAAK,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;CACvC;AAAA,OAAM,CAAC,EAAC;IACL,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,CAAC,CAAC,CAAC;IACtD,UAAU,GAAG,EAAE,CAAC;IAChB,SAAS,GAAG,EAAE,CAAC;CAClB;AAED,MAAM,iBAAiB,GAAG,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE,CAAA;AAElH,kBAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"initialState.native.js","sourceRoot":"","sources":["../../../../src/reducers/pages/initialState.native.tsx"],"names":[],"mappings":";;AAAA,mCAA+B;AAC/B,+CAA6C;AAC7C,2CAA6C;AAC7C,MAAM,EAAC,YAAY,EAAC,GAAG,4BAAa,CAAC;AAErC,IAAI,UAAU,GAAQ,EAAE,CAAC;AACzB,IAAI,SAAS,GAAQ,EAAE,CAAC;AAExB,IAAG;IACC,MAAM,oBAAoB,GAAG,YAAY,CAAC,kBAAkB,EAAE,CAAC;IAC/D,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,sBAAY,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC5D,IAAG,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACzE,SAAS,GAAG,cAAK,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;CACvC;AAAA,OAAM,CAAC,EAAC;IACL,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,CAAC,CAAC,CAAC;IACtD,UAAU,GAAG,EAAE,CAAC;IAChB,SAAS,GAAG,EAAE,CAAC;CAClB;AAED,MAAM,iBAAiB,GAAG,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE,CAAA;AAElH,kBAAe,iBAAiB,CAAC"}
@@ -37,7 +37,7 @@ export declare function unregisterAdminPage(id: any): {
37
37
  id: any;
38
38
  key: string;
39
39
  };
40
- export declare function getPagePath(typeOrId: any, options: any, platform?: any): (dispatch: any, getState: any) => any;
40
+ export declare function getPagePath(typeOrId: any, options: any, platform?: any): (dispatch: any, getState: any) => string;
41
41
  export declare function getPageRouteName(pathOrId: any, platform?: string): (dispatch: any, getState: any) => any;
42
42
  export declare function getPath(type: string, options?: any): (dispatch: any, getState: any) => any;
43
43
  declare const _default: (state: any, action: any) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/reducers/routes.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAC7D,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAE3D,eAAO,MAAM,eAAe,SAAS,CAAC;AACtC,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,SAAS,gBAAgB,CAAC;AACvC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,SAAS,cAAc,CAAC;AAErC,wBAAgB,gBAAgB,CAAC,QAAQ,KAAA;;;EAKxC;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,KAAA;;;EAK1C;AAED,wBAAgB,gBAAgB,CAAC,EAAE,KAAA,EAAE,IAAI,KAAA;;;;;EAOxC;AAED,wBAAgB,kBAAkB,CAAC,EAAE,KAAA;;;;EAMpC;AAED,wBAAgB,iBAAiB,CAAC,EAAE,KAAA,EAAE,IAAI,KAAA;;;;;EAOzC;AAED,wBAAgB,mBAAmB,CAAC,EAAE,KAAA;;;;EAMrC;AAED,wBAAgB,WAAW,CAAE,QAAQ,KAAA,EAAE,OAAO,KAAA,EAAE,QAAQ,MAAO,yCAQ9D;AAED,wB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 +10,10 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  }
11
11
  return t;
12
12
  };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
13
  Object.defineProperty(exports, "__esModule", { value: true });
17
14
  exports.getPath = exports.getPageRouteName = exports.getPagePath = exports.unregisterAdminPage = exports.registerAdminPage = exports.unregisterSitePage = exports.registerSitePage = exports.unregisterPageType = exports.registerPageType = exports.ROUTE_404 = exports.PAGE_EDITOR = exports.VIEW_PAGE = exports.SITE_PAGE = exports.ROUTE_TYPE_PATH = exports.UNREGISTER_PAGE_TYPE = exports.UNREGISTER_PAGE_ROUTE = exports.REGISTER_PAGE_TYPE = exports.REGISTER_PAGE_ROUTE = void 0;
18
- const react_router_1 = require("react-router");
19
- const lodash_1 = __importDefault(require("lodash"));
15
+ const lodash_1 = require("lodash");
16
+ const pathHelper_1 = require("../helpers/pathHelper");
20
17
  exports.REGISTER_PAGE_ROUTE = 'REGISTER_PAGE_ROUTE';
21
18
  exports.REGISTER_PAGE_TYPE = 'REGISTER_PAGE_TYPE';
22
19
  exports.UNREGISTER_PAGE_ROUTE = 'UNREGISTER_PAGE_ROUTE';
@@ -77,18 +74,18 @@ exports.unregisterAdminPage = unregisterAdminPage;
77
74
  function getPagePath(typeOrId, options, platform = null) {
78
75
  return (dispatch, getState) => {
79
76
  const { pages: { records: { data: pages = [] } } } = getState();
80
- const page = lodash_1.default.find(pages, page => (!platform || page.platform === platform) && (page.routeName === typeOrId || page.id === typeOrId));
77
+ const page = lodash_1.find(pages, page => (!platform || page.platform === platform) && (page.routeName === typeOrId || page.id === typeOrId));
81
78
  if (!page)
82
79
  return '/';
83
80
  const path = page.slug;
84
- return react_router_1.generatePath(path, options);
81
+ return pathHelper_1.generatePath(path, options);
85
82
  };
86
83
  }
87
84
  exports.getPagePath = getPagePath;
88
85
  function getPageRouteName(pathOrId, platform = "APP") {
89
86
  return (dispatch, getState) => {
90
87
  const { pages: { records: { data: pages = [] } } } = getState();
91
- const page = lodash_1.default.find(pages, page => (!platform || page.platform === platform) && (page.slug === pathOrId || page.id === pathOrId));
88
+ const page = lodash_1.find(pages, page => (!platform || page.platform === platform) && (page.slug === pathOrId || page.id === pathOrId));
92
89
  if (!page)
93
90
  return 'LANDING_PAGE';
94
91
  return page.routeName;
@@ -112,7 +109,7 @@ function getPath(type, options) {
112
109
  const routes = [...site, ...adminRoutesMapped];
113
110
  const route = routes.find(({ id }) => id === routeId);
114
111
  if (route) {
115
- return react_router_1.generatePath(route.path, options);
112
+ return pathHelper_1.generatePath(route.path, options);
116
113
  }
117
114
  else {
118
115
  return false;
@@ -1 +1 @@
1
- {"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../src/reducers/routes.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAC1C,oDAAuB;AAEV,QAAA,mBAAmB,GAAG,qBAAqB,CAAC;AAC5C,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAC1C,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAChD,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAE9C,QAAA,eAAe,GAAG,MAAM,CAAC;AACzB,QAAA,SAAS,GAAG,WAAW,CAAC;AACxB,QAAA,SAAS,GAAG,aAAa,CAAC;AAC1B,QAAA,WAAW,GAAG,aAAa,CAAC;AAC5B,QAAA,SAAS,GAAG,WAAW,CAAC;AAErC,SAAgB,gBAAgB,CAAC,QAAQ;IACrC,OAAO;QACH,IAAI,EAAE,0BAAkB;QACxB,QAAQ,EAAE,QAAQ;KACrB,CAAC;AACN,CAAC;AALD,4CAKC;AAED,SAAgB,kBAAkB,CAAC,QAAQ;IACvC,OAAO;QACH,IAAI,EAAE,4BAAoB;QAC1B,QAAQ,EAAE,QAAQ;KACrB,CAAC;AACN,CAAC;AALD,gDAKC;AAED,SAAgB,gBAAgB,CAAC,EAAE,EAAE,IAAI;IACrC,OAAO;QACH,IAAI,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AC;KACpB;AACL,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evlop/commons",
3
- "version": "1.0.165",
3
+ "version": "1.0.167",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "peerDependencies": {
@@ -10,14 +10,14 @@
10
10
  "lodash": "^4.17.21",
11
11
  "react-native": "^0.68.2",
12
12
  "react-native-vector-icons": "^9.1.0",
13
- "uuid": "^8.3.2"
13
+ "uuid": "^8.3.2",
14
+ "query-string": "^7.1.0"
14
15
  },
15
16
  "optionalDependencies": {},
16
17
  "dependencies": {
17
18
  "axios-retry": "^3.3.1",
18
19
  "events": "^3.3.0",
19
- "moment": "^2.29.1",
20
- "react-native-base64": "^0.2.1"
20
+ "moment": "^2.29.1"
21
21
  },
22
22
  "scripts": {
23
23
  "prepack": " rm -rf dist && npm run build",
@@ -48,6 +48,7 @@
48
48
  "jest": "^26.6.3",
49
49
  "lodash": "^4.17.21",
50
50
  "mocha": "^8.4.0",
51
+ "query-string": "^7.1.0",
51
52
  "react-native": "^0.68.2",
52
53
  "react-native-vector-icons": "^9.1.0",
53
54
  "ts-node": "^10.4.0",