@evlop/commons 1.0.237 → 1.0.239

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. package/dist/src/actions/restApi.js +8 -1
  2. package/dist/src/actions/restApi.js.map +1 -1
  3. package/dist/src/adapters/getUserToken/index.js +7 -18
  4. package/dist/src/adapters/getUserToken/index.js.map +1 -1
  5. package/dist/src/adapters/getUserToken/index.native.js +9 -20
  6. package/dist/src/adapters/getUserToken/index.native.js.map +1 -1
  7. package/dist/src/classes/Model.js +5 -14
  8. package/dist/src/classes/Model.js.map +1 -1
  9. package/dist/src/components/hoc/withSettings.js +1 -12
  10. package/dist/src/components/hoc/withSettings.js.map +1 -1
  11. package/dist/src/components/hoc/withSettings.native.js +2 -13
  12. package/dist/src/components/hoc/withSettings.native.js.map +1 -1
  13. package/dist/src/constants/iconInfo/index.js +4 -5
  14. package/dist/src/constants/iconInfo/index.js.map +1 -1
  15. package/dist/src/constants/iconInfo/reactNativeVectorIcons.js +1 -1
  16. package/dist/src/constants/iconInfo/reactNativeVectorIcons.js.map +1 -1
  17. package/dist/src/contexts/EDLContext.d.ts +7 -0
  18. package/dist/src/contexts/EDLContext.d.ts.map +1 -0
  19. package/dist/src/contexts/EDLContext.js +10 -0
  20. package/dist/src/contexts/EDLContext.js.map +1 -0
  21. package/dist/src/data-sources/collection.js +3 -12
  22. package/dist/src/data-sources/collection.js.map +1 -1
  23. package/dist/src/data-sources/collectionRecord.js +3 -12
  24. package/dist/src/data-sources/collectionRecord.js.map +1 -1
  25. package/dist/src/data-sources/listUrl.js +3 -12
  26. package/dist/src/data-sources/listUrl.js.map +1 -1
  27. package/dist/src/data-sources/url.js +3 -12
  28. package/dist/src/data-sources/url.js.map +1 -1
  29. package/dist/src/edl/BlockRenderer.d.ts +9 -0
  30. package/dist/src/edl/BlockRenderer.d.ts.map +1 -0
  31. package/dist/src/edl/BlockRenderer.js +102 -0
  32. package/dist/src/edl/BlockRenderer.js.map +1 -0
  33. package/dist/src/edl/DataSourceLoader.d.ts +7 -0
  34. package/dist/src/edl/DataSourceLoader.d.ts.map +1 -0
  35. package/dist/src/edl/DataSourceLoader.js +13 -0
  36. package/dist/src/edl/DataSourceLoader.js.map +1 -0
  37. package/dist/src/edl/elements/DataSource.d.ts +8 -0
  38. package/dist/src/edl/elements/DataSource.d.ts.map +1 -0
  39. package/dist/src/edl/elements/DataSource.js +19 -0
  40. package/dist/src/edl/elements/DataSource.js.map +1 -0
  41. package/dist/src/edl/elements/Fragment.d.ts +9 -0
  42. package/dist/src/edl/elements/Fragment.d.ts.map +1 -0
  43. package/dist/src/edl/elements/Fragment.js +14 -0
  44. package/dist/src/edl/elements/Fragment.js.map +1 -0
  45. package/dist/src/edl/elements/UseEffect.d.ts +10 -0
  46. package/dist/src/edl/elements/UseEffect.d.ts.map +1 -0
  47. package/dist/src/edl/elements/UseEffect.js +28 -0
  48. package/dist/src/edl/elements/UseEffect.js.map +1 -0
  49. package/dist/src/edl/elements/index.d.ts +17 -0
  50. package/dist/src/edl/elements/index.d.ts.map +1 -0
  51. package/dist/src/edl/elements/index.js +16 -0
  52. package/dist/src/edl/elements/index.js.map +1 -0
  53. package/dist/src/edl/index.d.ts +29 -0
  54. package/dist/src/edl/index.d.ts.map +1 -0
  55. package/dist/src/edl/index.js +108 -0
  56. package/dist/src/edl/index.js.map +1 -0
  57. package/dist/src/edl/localStorage.app.d.ts +6 -0
  58. package/dist/src/edl/localStorage.app.d.ts.map +1 -0
  59. package/dist/src/edl/localStorage.app.js +14 -0
  60. package/dist/src/edl/localStorage.app.js.map +1 -0
  61. package/dist/src/edl/localStorage.d.ts +6 -0
  62. package/dist/src/edl/localStorage.d.ts.map +1 -0
  63. package/dist/src/edl/localStorage.js +10 -0
  64. package/dist/src/edl/localStorage.js.map +1 -0
  65. package/dist/src/edl/parser.d.ts +3 -0
  66. package/dist/src/edl/parser.d.ts.map +1 -0
  67. package/dist/src/edl/parser.js +166 -0
  68. package/dist/src/edl/parser.js.map +1 -0
  69. package/dist/src/helpers/functions.js +1 -1
  70. package/dist/src/helpers/functions.js.map +1 -1
  71. package/dist/src/helpers/iconHelper.js +7 -13
  72. package/dist/src/helpers/iconHelper.js.map +1 -1
  73. package/dist/src/helpers/pathHelper.js +1 -1
  74. package/dist/src/helpers/pathHelper.js.map +1 -1
  75. package/dist/src/helpers/themeHelpers.js +23 -3
  76. package/dist/src/helpers/themeHelpers.js.map +1 -1
  77. package/dist/src/hooks/useAction.js +3 -12
  78. package/dist/src/hooks/useAction.js.map +1 -1
  79. package/dist/src/hooks/useActionable.d.ts +1 -0
  80. package/dist/src/hooks/useActionable.d.ts.map +1 -1
  81. package/dist/src/hooks/useActionable.js +3 -1
  82. package/dist/src/hooks/useActionable.js.map +1 -1
  83. package/dist/src/hooks/useComponentConfigProps.js +1 -1
  84. package/dist/src/hooks/useComponentConfigProps.js.map +1 -1
  85. package/dist/src/hooks/useDataSource.js +1 -1
  86. package/dist/src/hooks/useDataSource.js.map +1 -1
  87. package/dist/src/hooks/useNavigator.js +1 -1
  88. package/dist/src/hooks/useNavigator.js.map +1 -1
  89. package/dist/src/hooks/useParams.js +1 -1
  90. package/dist/src/hooks/useParams.js.map +1 -1
  91. package/dist/src/middlewares/dataSourceMiddleware.js +11 -22
  92. package/dist/src/middlewares/dataSourceMiddleware.js.map +1 -1
  93. package/dist/src/middlewares/restApiMiddleware.js +5 -5
  94. package/dist/src/middlewares/restApiMiddleware.js.map +1 -1
  95. package/dist/src/providers/Scope.js +4 -1
  96. package/dist/src/providers/Scope.js.map +1 -1
  97. package/dist/src/reducers/adminMenus.js +1 -1
  98. package/dist/src/reducers/adminMenus.js.map +1 -1
  99. package/dist/src/reducers/collection.js +66 -15
  100. package/dist/src/reducers/collection.js.map +1 -1
  101. package/dist/src/reducers/components.js +28 -7
  102. package/dist/src/reducers/components.js.map +1 -1
  103. package/dist/src/reducers/config/index.js +16 -4
  104. package/dist/src/reducers/config/index.js.map +1 -1
  105. package/dist/src/reducers/context.js +5 -16
  106. package/dist/src/reducers/context.js.map +1 -1
  107. package/dist/src/reducers/dataSource.js +14 -2
  108. package/dist/src/reducers/dataSource.js.map +1 -1
  109. package/dist/src/reducers/files.js +18 -4
  110. package/dist/src/reducers/files.js.map +1 -1
  111. package/dist/src/reducers/fonts.js +15 -6
  112. package/dist/src/reducers/fonts.js.map +1 -1
  113. package/dist/src/reducers/icons.js +3 -12
  114. package/dist/src/reducers/icons.js.map +1 -1
  115. package/dist/src/reducers/modals.js +1 -1
  116. package/dist/src/reducers/modals.js.map +1 -1
  117. package/dist/src/reducers/pages/index.js +69 -27
  118. package/dist/src/reducers/pages/index.js.map +1 -1
  119. package/dist/src/reducers/routes.js +19 -21
  120. package/dist/src/reducers/routes.js.map +1 -1
  121. package/dist/src/reducers/search.js +4 -1
  122. package/dist/src/reducers/search.js.map +1 -1
  123. package/dist/src/reducers/session.js +21 -4
  124. package/dist/src/reducers/session.js.map +1 -1
  125. package/dist/src/reducers/user.js +12 -2
  126. package/dist/src/reducers/user.js.map +1 -1
  127. package/dist/src/services/SessionManager.js +4 -1
  128. package/dist/src/services/SessionManager.js.map +1 -1
  129. package/package.json +1 -1
@@ -0,0 +1,102 @@
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
+ const lodash_1 = require("lodash");
7
+ const react_1 = __importDefault(require("react"));
8
+ const reservedProps = [':if', ':forEach', ':as', ':withContext'];
9
+ const isReservedProp = lodash_1.fromPairs(lodash_1.map(reservedProps, propName => [propName, true]));
10
+ function safelyRunFunction(fn, data) {
11
+ try {
12
+ return fn.call(data, data);
13
+ }
14
+ catch (e) {
15
+ }
16
+ }
17
+ const clone = typeof structuredClone === 'function' ? structuredClone : lodash_1.cloneDeep;
18
+ class EDLBlockRenderer {
19
+ constructor(elements, options) {
20
+ this.renderBlock = (block, context, parentBlockId) => {
21
+ if (!block)
22
+ return null;
23
+ if (typeof block === 'string')
24
+ return block;
25
+ if (typeof block === 'function')
26
+ return safelyRunFunction(block, context);
27
+ const { tag, staticProps, variableProps, sharedPropNames, children } = block;
28
+ // special props handling
29
+ if (staticProps[':withContext'] && staticProps[':as']) {
30
+ const { ':withContext': contextName, ':as': asName, ...remainingStaticProps } = staticProps;
31
+ const contextValue = lodash_1.get(context.context, contextName);
32
+ const dataToAdd = { [asName]: contextValue };
33
+ const newContext = this.prepareNewContext(context, dataToAdd);
34
+ const newBlock = {
35
+ ...block,
36
+ staticProps: remainingStaticProps,
37
+ };
38
+ return this.renderBlock(newBlock, newContext, parentBlockId);
39
+ }
40
+ else if ((variableProps[":forEach"])) {
41
+ const items = safelyRunFunction(variableProps[":forEach"], context);
42
+ return lodash_1.map(items, (item, index) => {
43
+ const asName = staticProps[':as'] || 'loopItem';
44
+ const dataToAdd = { [asName]: item, [`${asName}Index`]: index };
45
+ const newContext = this.prepareNewContext(context, dataToAdd);
46
+ const { ":forEach": sfe, ':as': _staticAsName, ...remainingStaticProps } = staticProps;
47
+ const { ":forEach": vfe, ':as': _variableAsName, ...remainingVariableProps } = variableProps;
48
+ const newBlock = {
49
+ ...block,
50
+ _id: `${block._id}-${index}`,
51
+ staticProps: remainingStaticProps,
52
+ variableProps: remainingVariableProps,
53
+ };
54
+ return this.renderBlock(newBlock, newContext, parentBlockId);
55
+ });
56
+ }
57
+ else if (variableProps[":if"]) {
58
+ const shouldShow = safelyRunFunction(variableProps[":if"], context);
59
+ if (!shouldShow)
60
+ return null;
61
+ }
62
+ const Element = this.elements[tag] || (lodash_1.get(this.options, ['allowAnyTags']) ? tag : null);
63
+ if (Element) {
64
+ const props = { ...staticProps };
65
+ lodash_1.forEach(sharedPropNames, propName => {
66
+ if (staticProps[propName]) {
67
+ props[propName] = clone(props[propName]);
68
+ }
69
+ });
70
+ lodash_1.forEach(variableProps, (expression, propName) => {
71
+ if (typeof expression === 'function' && !isReservedProp[propName]) {
72
+ lodash_1.set(props, propName, safelyRunFunction(expression, context));
73
+ }
74
+ });
75
+ if (!lodash_1.isEmpty(children)) {
76
+ let childRenderContext = context;
77
+ if (staticProps[':as'] && tag === 'DataSource') {
78
+ const datasourceAsName = staticProps[':as'];
79
+ const datasourceDataKey = parentBlockId ? `${parentBlockId}-${block._id}` : block._id;
80
+ const dataToAdd = { [datasourceAsName]: lodash_1.get(context.data, datasourceDataKey) };
81
+ childRenderContext = this.prepareNewContext(context, dataToAdd);
82
+ }
83
+ const childrenRendered = this.renderBlocks(children, childRenderContext, parentBlockId ? `${parentBlockId}-${block._id}` : block._id);
84
+ lodash_1.assign(props, { children: childrenRendered });
85
+ }
86
+ return react_1.default.createElement(Element, Object.assign({ _parentBlockId: parentBlockId, _blockId: block._id, key: props.key || block._id }, props));
87
+ }
88
+ return null;
89
+ };
90
+ this.renderBlocks = (blocks, contextData, parentBlockId) => {
91
+ return lodash_1.map(blocks, (block, index) => this.renderBlock(block, contextData, parentBlockId));
92
+ };
93
+ this.elements = elements;
94
+ this.options = options;
95
+ }
96
+ prepareNewContext(context, dataToAdd) {
97
+ const newContextData = lodash_1.assign({}, context.data, dataToAdd);
98
+ return lodash_1.assign({}, context, { data: newContextData }, dataToAdd);
99
+ }
100
+ }
101
+ exports.default = EDLBlockRenderer;
102
+ //# sourceMappingURL=BlockRenderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockRenderer.js","sourceRoot":"","sources":["../../../src/edl/BlockRenderer.tsx"],"names":[],"mappings":";;;;;AAAA,mCAAuF;AACvF,kDAA0B;AAI1B,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;AACjE,MAAM,cAAc,GAAG,kBAAS,CAAC,YAAG,CAAC,aAAa,EAAE,QAAQ,CAAA,EAAE,CAAA,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;AAEhF,SAAS,iBAAiB,CAAC,EAAE,EAAE,IAAI;IACjC,IAAG;QACD,OAAO,EAAE,CA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+ setDatasourceData: any;
5
+ }): any;
6
+ export default DataSourceLoader;
7
+ //# sourceMappingURL=DataSourceLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSourceLoader.d.ts","sourceRoot":"","sources":["../../../src/edl/DataSourceLoader.tsx"],"names":[],"mappings":"AAGA,iBAAS,gBAAgB,CAAC,EAAC,UAAU,EAAE,IAAI,EAAE,iBAAiB,EAAC;;;;CAAA,OAQ9D;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const commons_1 = require("@evlop/commons");
4
+ const react_1 = require("react");
5
+ function DataSourceLoader({ dataSource, name, setDatasourceData }) {
6
+ const data = commons_1.useDataSource(dataSource);
7
+ react_1.useEffect(() => {
8
+ setDatasourceData({ [name]: data });
9
+ }, [data, name, setDatasourceData]);
10
+ return null;
11
+ }
12
+ exports.default = DataSourceLoader;
13
+ //# sourceMappingURL=DataSourceLoader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSourceLoader.js","sourceRoot":"","sources":["../../../src/edl/DataSourceLoader.tsx"],"names":[],"mappings":";;AAAA,4CAA+C;AAC/C,iCAAkC;AAElC,SAAS,gBAAgB,CAAC,EAAC,UAAU,EAAE,IAAI,EAAE,iBAAiB,EAAC;IAC3D,MAAM,IAAI,GAAG,uBAAa,CAAC,UAAU,CAAC,CAAC;IAEvC,iBAAS,CAAC,GAAG,EAAE;QACX,iBAAiB,CAAC,EAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAC,CAAC,CAAC;IACtC,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAEpC,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,kBAAe,gBAAgB,CAAC"}
@@ -0,0 +1,8 @@
1
+ declare function DataSource({ _parentBlockId, _blockId, dataSource, children }: {
2
+ _parentBlockId: any;
3
+ _blockId: any;
4
+ dataSource: any;
5
+ children: any;
6
+ }): any;
7
+ export default DataSource;
8
+ //# sourceMappingURL=DataSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSource.d.ts","sourceRoot":"","sources":["../../../../src/edl/elements/DataSource.ts"],"names":[],"mappings":"AAIA,iBAAS,UAAU,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAC;;;;;CAAA,OAUpE;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,19 @@
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
+ const commons_1 = require("@evlop/commons");
7
+ const react_1 = require("react");
8
+ const EDLContext_1 = __importDefault(require("../../contexts/EDLContext"));
9
+ function DataSource({ _parentBlockId, _blockId, dataSource, children }) {
10
+ const data = commons_1.useDataSource(dataSource);
11
+ const { setRuntimeData } = react_1.useContext(EDLContext_1.default);
12
+ react_1.useEffect(() => {
13
+ const key = _parentBlockId ? `${_parentBlockId}-${_blockId}` : _blockId;
14
+ setRuntimeData({ [key]: data });
15
+ }, [data, _parentBlockId, _blockId, setRuntimeData]);
16
+ return children;
17
+ }
18
+ exports.default = DataSource;
19
+ //# sourceMappingURL=DataSource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSource.js","sourceRoot":"","sources":["../../../../src/edl/elements/DataSource.ts"],"names":[],"mappings":";;;;;AAAA,4CAA+C;AAC/C,iCAA8C;AAC9C,2EAAmD;AAEnD,SAAS,UAAU,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAC;IACjE,MAAM,IAAI,GAAG,uBAAa,CAAC,UAAU,CAAC,CAAC;IACvC,MAAM,EAAE,cAAc,EAAE,GAAG,kBAAU,CAAC,oBAAU,CAAC,CAAC;IAElD,iBAAS,CAAC,GAAG,EAAE;QACX,MAAM,GAAG,GAAG,cAAc,CAAA,CAAC,CAAC,GAAG,cAAc,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;QACvE,cAAc,CAAC,EAAC,CAAC,GAAG,CAAC,EAAE,IAAI,EAAC,CAAC,CAAC;IAClC,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC;IAErD,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED,kBAAe,UAAU,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @typedef {{ children: any }} FragmentProps
3
+ * @type {React.FC<FragmentProps>}
4
+ */
5
+ declare const Fragment: ({ children }: {
6
+ children: any;
7
+ }) => any;
8
+ export default Fragment;
9
+ //# sourceMappingURL=Fragment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fragment.d.ts","sourceRoot":"","sources":["../../../../src/edl/elements/Fragment.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,QAAA,MAAM,QAAQ;;SAEb,CAAA;AAMD,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * @typedef {{ children: any }} FragmentProps
5
+ * @type {React.FC<FragmentProps>}
6
+ */
7
+ const Fragment = ({ children }) => {
8
+ return children;
9
+ };
10
+ Object.assign(Fragment, {
11
+ propGroups: ['fragment']
12
+ });
13
+ exports.default = Fragment;
14
+ //# sourceMappingURL=Fragment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fragment.js","sourceRoot":"","sources":["../../../../src/edl/elements/Fragment.ts"],"names":[],"mappings":";;AAEA;;;GAGG;AAEH,MAAM,QAAQ,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9B,OAAO,QAAQ,CAAC;AACpB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;IACpB,UAAU,EAAE,CAAC,UAAU,CAAC;CAC3B,CAAC,CAAC;AAEH,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @typedef {{ children: any, ':function': Function, ':dependencies': any[] }} UseEffectProps
3
+ * @type {React.FC<UseEffectProps>}
4
+ */
5
+ declare const UseEffect: ({ ":function": fn, ":dependencies": deps }: {
6
+ ":function": any;
7
+ ":dependencies": any;
8
+ }) => any;
9
+ export default UseEffect;
10
+ //# sourceMappingURL=UseEffect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UseEffect.d.ts","sourceRoot":"","sources":["../../../../src/edl/elements/UseEffect.tsx"],"names":[],"mappings":"AAEA;;;GAGG;AACH,QAAA,MAAM,SAAS;;;SAcd,CAAA;AAOD,eAAe,SAAS,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const react_1 = require("react");
4
+ /**
5
+ * @typedef {{ children: any, ':function': Function, ':dependencies': any[] }} UseEffectProps
6
+ * @type {React.FC<UseEffectProps>}
7
+ */
8
+ const UseEffect = ({ ':function': fn, ':dependencies': deps }) => {
9
+ const dependencies = Array.isArray(deps) ? deps : [];
10
+ react_1.useEffect(() => {
11
+ if (typeof fn != "function")
12
+ return;
13
+ try {
14
+ return fn();
15
+ }
16
+ catch (e) {
17
+ console.error(e);
18
+ }
19
+ // eslint-disable-next-line react-hooks/exhaustive-deps
20
+ }, dependencies);
21
+ return null;
22
+ };
23
+ Object.assign(UseEffect, {
24
+ isSelfClosing: true,
25
+ propGroups: ['useEffect']
26
+ });
27
+ exports.default = UseEffect;
28
+ //# sourceMappingURL=UseEffect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UseEffect.js","sourceRoot":"","sources":["../../../../src/edl/elements/UseEffect.tsx"],"names":[],"mappings":";;AAAA,iCAAyC;AAEzC;;;GAGG;AACH,MAAM,SAAS,GAAG,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE,EAAE;IAC7D,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IAErD,iBAAS,CAAC,GAAG,EAAE;QACX,IAAI,OAAO,EAAE,IAAI,UAAU;YAAE,OAAO;QACpC,IAAI;YACA,OAAO,EAAE,EAAE,CAAC;SACf;QAAC,OAAO,CAAC,EAAE;YACR,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SACpB;QACL,uDAAuD;IACvD,CAAC,EAAE,YAAY,CAAC,CAAC;IAEjB,OAAO,IAAI,CAAC;AAChB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE;IACrB,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,CAAC,WAAW,CAAC;CAC1B,CAAC,CAAC;AAEL,kBAAe,SAAS,CAAC"}
@@ -0,0 +1,17 @@
1
+ import DataSource from './DataSource';
2
+ declare const coreElements: {
3
+ UseEffect: ({ ":function": fn, ":dependencies": deps }: {
4
+ ":function": any;
5
+ ":dependencies": any;
6
+ }) => any;
7
+ Script: ({ ":function": fn, ":dependencies": deps }: {
8
+ ":function": any;
9
+ ":dependencies": any;
10
+ }) => any;
11
+ Fragment: ({ children }: {
12
+ children: any;
13
+ }) => any;
14
+ DataSource: typeof DataSource;
15
+ };
16
+ export default coreElements;
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/edl/elements/index.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,QAAA,MAAM,YAAY;;;;;;;;;;;;;CAKjB,CAAA;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,16 @@
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
+ const UseEffect_1 = __importDefault(require("./UseEffect"));
7
+ const Fragment_1 = __importDefault(require("./Fragment"));
8
+ const DataSource_1 = __importDefault(require("./DataSource"));
9
+ const coreElements = {
10
+ UseEffect: UseEffect_1.default,
11
+ Script: UseEffect_1.default,
12
+ Fragment: Fragment_1.default,
13
+ DataSource: DataSource_1.default,
14
+ };
15
+ exports.default = coreElements;
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/edl/elements/index.ts"],"names":[],"mappings":";;;;;AAAA,4DAAoC;AACpC,0DAAkC;AAClC,8DAAsC;AAEtC,MAAM,YAAY,GAAG;IACjB,SAAS,EAAT,mBAAS;IACT,MAAM,EAAE,mBAAS;IACjB,QAAQ,EAAR,kBAAQ;IACR,UAAU,EAAE,oBAAU;CACzB,CAAA;AAED,kBAAe,YAAY,CAAC"}
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ declare function registerElement(name: any, element: any): void;
3
+ declare function registerRenderContextValue(name: any, value: any): void;
4
+ export declare const EDL: {
5
+ Render: ({ edl, data: _data, dataSources }: {
6
+ edl: any;
7
+ data: any;
8
+ dataSources: any;
9
+ }) => React.JSX.Element;
10
+ registerElement: typeof registerElement;
11
+ registerContextValue: typeof registerRenderContextValue;
12
+ elements: {
13
+ UseEffect: ({ ":function": fn, ":dependencies": deps }: {
14
+ ":function": any;
15
+ ":dependencies": any;
16
+ }) => any;
17
+ Script: ({ ":function": fn, ":dependencies": deps }: {
18
+ ":function": any;
19
+ ":dependencies": any;
20
+ }) => any;
21
+ Fragment: ({ children }: {
22
+ children: any;
23
+ }) => any;
24
+ DataSource: typeof import("./elements/DataSource").default;
25
+ };
26
+ parse: ((edl: any) => any[]) & import("lodash").MemoizedFunction;
27
+ };
28
+ export default EDL;
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/edl/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAwB9D,iBAAS,eAAe,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,QAErC;AAGD,iBAAS,0BAA0B,CAAC,IAAI,KAAA,EAAE,KAAK,KAAA,QAG9C;AAiED,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAMf,CAAC;AAEF,eAAe,GAAG,CAAC"}
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22
+ return (mod && mod.__esModule) ? mod : { "default": mod };
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.EDL = void 0;
26
+ const lodash_1 = require("lodash");
27
+ const react_1 = __importStar(require("react"));
28
+ const DataSourceLoader_1 = __importDefault(require("./DataSourceLoader"));
29
+ const elements_1 = __importDefault(require("./elements"));
30
+ const BlockRenderer_1 = __importDefault(require("./BlockRenderer"));
31
+ const parser_1 = __importDefault(require("./parser"));
32
+ const helpers_1 = require("../helpers");
33
+ const hooks_1 = require("../hooks");
34
+ const localStorage_1 = __importDefault(require("./localStorage"));
35
+ const EDLContext_1 = require("../contexts/EDLContext");
36
+ const lodash = require('lodash');
37
+ const edlElements = {
38
+ ...elements_1.default,
39
+ };
40
+ const renderContextValues = {
41
+ axios: helpers_1.axiosClient,
42
+ _: lodash,
43
+ localStorage: localStorage_1.default,
44
+ };
45
+ const renderContextVariables = ['axios', 'localStorage', '_'];
46
+ // should be called before EDL.Render
47
+ function registerElement(name, element) {
48
+ edlElements[name] = element;
49
+ }
50
+ // should be called before EDL.Render
51
+ function registerRenderContextValue(name, value) {
52
+ renderContextValues[name] = value;
53
+ renderContextVariables.push(name);
54
+ }
55
+ const edlBlockRenderer = new BlockRenderer_1.default(edlElements, {});
56
+ /**
57
+ * @typedef {{ jsx: string, injectScope: string[] }} JsxRendererComponentProps
58
+ * @type {React.FC<JsxRendererComponentProps>}
59
+ */
60
+ const parseEDLMemoized = lodash_1.memoize(edl => parser_1.default(edl, renderContextVariables));
61
+ const RenderEDL = ({ edl, data: _data, dataSources }) => {
62
+ const scope = hooks_1.useScope();
63
+ const actionable = hooks_1.useActionable();
64
+ const blocks = react_1.useMemo(() => parseEDLMemoized(edl), [edl]);
65
+ const [datasourceData, _setDatasourceData] = react_1.useState({});
66
+ const [state, _setState] = react_1.useState({});
67
+ const [runtimeData, _setRuntimeData] = react_1.useState({});
68
+ const setDatasourceData = react_1.useCallback(newData => _setDatasourceData(currentData => ({ ...currentData, ...newData })), []);
69
+ // managed by Script tag
70
+ const setRuntimeData = react_1.useCallback(newRuntimeData => _setRuntimeData(currentRuntimeData => ({ ...currentRuntimeData, ...newRuntimeData })), []);
71
+ const setState = react_1.useCallback((key, value) => {
72
+ _setState(currentState => {
73
+ let newValue = value;
74
+ if (typeof value === 'function') {
75
+ newValue = value(currentState[key]);
76
+ }
77
+ return { ...currentState, [key]: newValue };
78
+ });
79
+ }, []);
80
+ const setStates = react_1.useCallback((newStates) => {
81
+ _setState(currentState => ({ ...currentState, ...newStates }));
82
+ }, []);
83
+ const renderData = react_1.useMemo(() => ({ ..._data, ...datasourceData }), [_data, datasourceData]);
84
+ const renderContext = react_1.useMemo(() => lodash_1.assign({}, scope, {
85
+ setState: setState,
86
+ setStates,
87
+ state,
88
+ data: renderData,
89
+ dispatchAction: action => actionable(action)(null),
90
+ createAction: action => actionable(action),
91
+ context: scope,
92
+ setRuntimeData,
93
+ ...renderContextValues,
94
+ ...runtimeData,
95
+ }), [scope, setState, runtimeData, setRuntimeData, state, renderData]);
96
+ const dataSourceLoaders = react_1.useMemo(() => lodash_1.map(dataSources, (dataSource, name) => (react_1.default.createElement(DataSourceLoader_1.default, { key: name, name: name, dataSource: dataSource, setDatasourceData: setDatasourceData }))), [dataSources]);
97
+ const renderedBlocks = react_1.useMemo(() => edlBlockRenderer.renderBlocks(blocks, renderContext, null), [blocks, renderContext]);
98
+ return react_1.useMemo(() => react_1.default.createElement(EDLContext_1.EDLProvider, { value: { setRuntimeData }, children: [...dataSourceLoaders, ...renderedBlocks] }), [dataSourceLoaders, renderedBlocks]);
99
+ };
100
+ exports.EDL = {
101
+ Render: RenderEDL,
102
+ registerElement,
103
+ registerContextValue: registerRenderContextValue,
104
+ elements: edlElements,
105
+ parse: parseEDLMemoized,
106
+ };
107
+ exports.default = exports.EDL;
108
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/edl/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA8C;AAC9C,+CAA8D;AAC9D,0EAAkD;AAClD,0DAAsC;AACtC,oEAA+C;AAC/C,sDAAgC;AAChC,wCAAyC;AACzC,oCAAmD;AACnD,kEAA0C;AAC1C,uDAAqD;AACrD,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEjC,MAAM,WAAW,GAAG;IAChB,GAAG,kBAAY;CAClB,CAAA;AAED,MAAM,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AK,EAAE,gBAAgB;CAC1B,CAAC;AAEF,kBAAe,WAAG,CAAC"}
@@ -0,0 +1,6 @@
1
+ declare const localStorage: {
2
+ setItem: (key: any, value: any) => any;
3
+ getItem: (key: any) => any;
4
+ };
5
+ export default localStorage;
6
+ //# sourceMappingURL=localStorage.app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localStorage.app.d.ts","sourceRoot":"","sources":["../../../src/edl/localStorage.app.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,YAAY;;;CAGjB,CAAA;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,14 @@
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
+ const async_storage_1 = __importDefault(require("@react-native-async-storage/async-storage"));
7
+ const constants_1 = require("../constants");
8
+ const localStorageKeyPrefix = `@${constants_1.API_BASE_URL}:edl:`;
9
+ const localStorage = {
10
+ setItem: (key, value) => async_storage_1.default.setItem(`${localStorageKeyPrefix}${key}`, value),
11
+ getItem: (key) => async_storage_1.default.getItem(`${localStorageKeyPrefix}${key}`),
12
+ };
13
+ exports.default = localStorage;
14
+ //# sourceMappingURL=localStorage.app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localStorage.app.js","sourceRoot":"","sources":["../../../src/edl/localStorage.app.ts"],"names":[],"mappings":";;;;;AAAA,8FAAqE;AACrE,4CAA4C;AAE5C,MAAM,qBAAqB,GAAG,IAAI,wBAAY,OAAO,CAAC;AACtD,MAAM,YAAY,GAAG;IACjB,OAAO,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,uBAAY,CAAC,OAAO,CAAC,GAAG,qBAAqB,GAAG,GAAG,EAAE,EAAE,KAAK,CAAC;IACtF,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,uBAAY,CAAC,OAAO,CAAC,GAAG,qBAAqB,GAAG,GAAG,EAAE,CAAC;CAC3E,CAAA;AAED,kBAAe,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ declare const localStorage: {
2
+ setItem: (key: any, value: any) => void;
3
+ getItem: (key: any) => string;
4
+ };
5
+ export default localStorage;
6
+ //# sourceMappingURL=localStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localStorage.d.ts","sourceRoot":"","sources":["../../../src/edl/localStorage.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,YAAY;;;CAGjB,CAAA;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const constants_1 = require("../constants");
4
+ const localStorageKeyPrefix = `@${constants_1.API_BASE_URL}:edl:`;
5
+ const localStorage = {
6
+ setItem: (key, value) => window.localStorage.setItem(`${localStorageKeyPrefix}${key}`, value),
7
+ getItem: (key) => window.localStorage.getItem(`${localStorageKeyPrefix}${key}`),
8
+ };
9
+ exports.default = localStorage;
10
+ //# sourceMappingURL=localStorage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localStorage.js","sourceRoot":"","sources":["../../../src/edl/localStorage.ts"],"names":[],"mappings":";;AAAA,4CAA4C;AAC5C,MAAM,qBAAqB,GAAG,IAAI,wBAAY,OAAO,CAAC;AACtD,MAAM,YAAY,GAAG;IACjB,OAAO,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,qBAAqB,GAAG,GAAG,EAAE,EAAE,KAAK,CAAC;IAC7F,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,qBAAqB,GAAG,GAAG,EAAE,CAAC;CAClF,CAAA;AAED,kBAAe,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare function parseEDL(edlString: any, additionalVariables: any): any[];
2
+ export default parseEDL;
3
+ //# sourceMappingURL=parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../src/edl/parser.ts"],"names":[],"mappings":"AAkEA,iBAAS,QAAQ,CAAC,SAAS,KAAA,EAAE,mBAAmB,KAAA,SA6H7C;AAGD,eAAe,QAAQ,CAAC"}