@webiny/app 5.43.2 → 6.0.0-alpha.0

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.
Files changed (155) hide show
  1. package/App.d.ts +3 -10
  2. package/App.js +70 -84
  3. package/App.js.map +1 -1
  4. package/AppContainer.d.ts +23 -0
  5. package/AppContainer.js +9 -0
  6. package/AppContainer.js.map +1 -0
  7. package/apollo-client/InMemoryCache.js +16 -47
  8. package/apollo-client/InMemoryCache.js.map +1 -1
  9. package/apollo-client/IntrospectionFragmentMatcher.js +33 -50
  10. package/apollo-client/IntrospectionFragmentMatcher.js.map +1 -1
  11. package/components/Image.js +11 -19
  12. package/components/Image.js.map +1 -1
  13. package/components/Routes.js +13 -23
  14. package/components/Routes.js.map +1 -1
  15. package/components/View.js +14 -26
  16. package/components/View.js.map +1 -1
  17. package/components/index.js +2 -19
  18. package/components/index.js.map +1 -1
  19. package/config/RouterConfig/Route.d.ts +30 -0
  20. package/config/RouterConfig/Route.js +42 -0
  21. package/config/RouterConfig/Route.js.map +1 -0
  22. package/config/RouterConfig.d.ts +32 -0
  23. package/config/RouterConfig.js +18 -0
  24. package/config/RouterConfig.js.map +1 -0
  25. package/config.js +9 -15
  26. package/config.js.map +1 -1
  27. package/contexts/Ui/index.js +28 -52
  28. package/contexts/Ui/index.js.map +1 -1
  29. package/core/DebounceRender.js +13 -24
  30. package/core/DebounceRender.js.map +1 -1
  31. package/core/Plugin.js +11 -19
  32. package/core/Plugin.js.map +1 -1
  33. package/core/Plugins.js +18 -24
  34. package/core/Plugins.js.map +1 -1
  35. package/core/Provider.js +9 -13
  36. package/core/Provider.js.map +1 -1
  37. package/core/Routes.js +14 -23
  38. package/core/Routes.js.map +1 -1
  39. package/core/createProvider.js +1 -7
  40. package/core/createProvider.js.map +1 -1
  41. package/core/createProviderPlugin.js +4 -10
  42. package/core/createProviderPlugin.js.map +1 -1
  43. package/hooks/useAutocomplete/index.js +1 -12
  44. package/hooks/useAutocomplete/index.js.map +1 -1
  45. package/hooks/useAutocomplete/useAutocomplete.js +9 -16
  46. package/hooks/useAutocomplete/useAutocomplete.js.map +1 -1
  47. package/hooks/useDataList/functions/getData.js +2 -11
  48. package/hooks/useDataList/functions/getData.js.map +1 -1
  49. package/hooks/useDataList/functions/getError.js +2 -11
  50. package/hooks/useDataList/functions/getError.js.map +1 -1
  51. package/hooks/useDataList/functions/getMeta.js +2 -11
  52. package/hooks/useDataList/functions/getMeta.js.map +1 -1
  53. package/hooks/useDataList/functions/index.js +3 -27
  54. package/hooks/useDataList/functions/index.js.map +1 -1
  55. package/hooks/useDataList/functions/searchDataByKey.js +4 -10
  56. package/hooks/useDataList/functions/searchDataByKey.js.map +1 -1
  57. package/hooks/useDataList/index.js +1 -12
  58. package/hooks/useDataList/index.js.map +1 -1
  59. package/hooks/useDataList/useDataList.js +78 -78
  60. package/hooks/useDataList/useDataList.js.map +1 -1
  61. package/hooks/useDataList/utils/index.js +2 -20
  62. package/hooks/useDataList/utils/index.js.map +1 -1
  63. package/hooks/useDataList/utils/prepareLoadListParams.js +9 -15
  64. package/hooks/useDataList/utils/prepareLoadListParams.js.map +1 -1
  65. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js +10 -14
  66. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js.map +1 -1
  67. package/hooks/useDataList/utils/types.js +1 -5
  68. package/hooks/useHandler.js +7 -12
  69. package/hooks/useHandler.js.map +1 -1
  70. package/hooks/useHandlers.js +11 -17
  71. package/hooks/useHandlers.js.map +1 -1
  72. package/hooks/useRegisterLegacyPlugin.js +5 -11
  73. package/hooks/useRegisterLegacyPlugin.js.map +1 -1
  74. package/hooks/useUi.d.ts +1 -1
  75. package/hooks/useUi.js +4 -10
  76. package/hooks/useUi.js.map +1 -1
  77. package/i18n/i18n.js +5 -13
  78. package/i18n/i18n.js.map +1 -1
  79. package/i18n/index.js +1 -13
  80. package/i18n/index.js.map +1 -1
  81. package/index.d.ts +1 -1
  82. package/index.js +17 -177
  83. package/index.js.map +1 -1
  84. package/package.json +10 -9
  85. package/plugins/AddQuerySelectionPlugin.js +62 -107
  86. package/plugins/AddQuerySelectionPlugin.js.map +1 -1
  87. package/plugins/ApolloCacheObjectIdPlugin.js +12 -31
  88. package/plugins/ApolloCacheObjectIdPlugin.js.map +1 -1
  89. package/plugins/ApolloDynamicLink.js +19 -46
  90. package/plugins/ApolloDynamicLink.js.map +1 -1
  91. package/plugins/ApolloLinkPlugin.js +18 -37
  92. package/plugins/ApolloLinkPlugin.js.map +1 -1
  93. package/plugins/ConsoleLinkPlugin.js +20 -41
  94. package/plugins/ConsoleLinkPlugin.js.map +1 -1
  95. package/plugins/LocaleHeaderLinkPlugin.js +23 -40
  96. package/plugins/LocaleHeaderLinkPlugin.js.map +1 -1
  97. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js +39 -51
  98. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js.map +1 -1
  99. package/plugins/NetworkErrorLinkPlugin/StyledComponents.js +68 -12
  100. package/plugins/NetworkErrorLinkPlugin/StyledComponents.js.map +1 -1
  101. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js +12 -18
  102. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js.map +1 -1
  103. package/plugins/NetworkErrorLinkPlugin.js +23 -40
  104. package/plugins/NetworkErrorLinkPlugin.js.map +1 -1
  105. package/plugins/OmitTypenameLinkPlugin.js +11 -30
  106. package/plugins/OmitTypenameLinkPlugin.js.map +1 -1
  107. package/plugins/RoutePlugin.js +12 -31
  108. package/plugins/RoutePlugin.js.map +1 -1
  109. package/plugins/TenantHeaderLinkPlugin.js +30 -47
  110. package/plugins/TenantHeaderLinkPlugin.js.map +1 -1
  111. package/plugins/ViewPlugin.js +15 -36
  112. package/plugins/ViewPlugin.js.map +1 -1
  113. package/plugins/image.js +46 -53
  114. package/plugins/image.js.map +1 -1
  115. package/plugins/index.js +31 -53
  116. package/plugins/index.js.map +1 -1
  117. package/react-butterfiles/Files.js +208 -235
  118. package/react-butterfiles/Files.js.map +1 -1
  119. package/react-butterfiles/index.js +2 -8
  120. package/react-butterfiles/index.js.map +1 -1
  121. package/react-butterfiles/utils/generateId.js +1 -7
  122. package/react-butterfiles/utils/generateId.js.map +1 -1
  123. package/react-butterfiles/utils/readFileContent.js +4 -10
  124. package/react-butterfiles/utils/readFileContent.js.map +1 -1
  125. package/renderApp.js +4 -11
  126. package/renderApp.js.map +1 -1
  127. package/types.js +11 -11
  128. package/types.js.map +1 -1
  129. package/utils/createGenericContext.js +13 -22
  130. package/utils/createGenericContext.js.map +1 -1
  131. package/utils/createHashing.js +9 -15
  132. package/utils/createHashing.js.map +1 -1
  133. package/utils/getApiUrl.js +1 -8
  134. package/utils/getApiUrl.js.map +1 -1
  135. package/utils/getGqlApiUrl.js +3 -9
  136. package/utils/getGqlApiUrl.js.map +1 -1
  137. package/utils/getHeadlessCmsGqlApiUrl.js +7 -13
  138. package/utils/getHeadlessCmsGqlApiUrl.js.map +1 -1
  139. package/utils/getLocaleCode.js +6 -16
  140. package/utils/getLocaleCode.js.map +1 -1
  141. package/utils/getPrerenderId.js +1 -7
  142. package/utils/getPrerenderId.js.map +1 -1
  143. package/utils/getTenantId.js +7 -13
  144. package/utils/getTenantId.js.map +1 -1
  145. package/utils/index.js +10 -115
  146. package/utils/index.js.map +1 -1
  147. package/utils/isLocalhost.js +4 -12
  148. package/utils/isLocalhost.js.map +1 -1
  149. package/utils/isPrerendering.js +1 -7
  150. package/utils/isPrerendering.js.map +1 -1
  151. package/utils/legacyPluginToReactComponent.js +5 -11
  152. package/utils/legacyPluginToReactComponent.js.map +1 -1
  153. package/core/AddRoute.d.ts +0 -21
  154. package/core/AddRoute.js +0 -21
  155. package/core/AddRoute.js.map +0 -1
@@ -1,22 +1,13 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.Routes = void 0;
8
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
- var _react = _interopRequireDefault(require("react"));
10
- var _plugins = require("@webiny/plugins");
11
- var _reactRouter = require("@webiny/react-router");
12
1
  // This file is necessary only for backwards compatibility.
13
2
  // We'll remove this once the legacy rendering engine is removed.
14
-
15
- var Routes = exports.Routes = function Routes() {
3
+ import React from "react";
4
+ import { plugins } from "@webiny/plugins";
5
+ import { Routes as ReactRouterRoutes } from "@webiny/react-router";
6
+ export const Routes = () => {
16
7
  // We cannot call `sort` on the array returned by the `plugins.byType` call - it is read-only.
17
- var routes = (0, _toConsumableArray2.default)(_plugins.plugins.byType("route")).sort(function (a, b) {
18
- var pathA = a.route.props.path || "*";
19
- var pathB = b.route.props.path || "*";
8
+ const routes = [...plugins.byType("route")].sort((a, b) => {
9
+ const pathA = a.route.props.path || "*";
10
+ const pathB = b.route.props.path || "*";
20
11
 
21
12
  // This will sort paths at the very bottom of the list
22
13
  if (pathA === "/" && pathB === "*") {
@@ -34,13 +25,12 @@ var Routes = exports.Routes = function Routes() {
34
25
  }
35
26
  return 0;
36
27
  });
37
- return /*#__PURE__*/_react.default.createElement(_reactRouter.Routes, null, routes.map(function (_ref) {
38
- var route = _ref.route,
39
- name = _ref.name;
40
- return /*#__PURE__*/_react.default.cloneElement(route, {
41
- key: name
42
- });
43
- }));
28
+ return /*#__PURE__*/React.createElement(ReactRouterRoutes, null, routes.map(({
29
+ route,
30
+ name
31
+ }) => /*#__PURE__*/React.cloneElement(route, {
32
+ key: name
33
+ })));
44
34
  };
45
35
 
46
36
  //# sourceMappingURL=Routes.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_plugins","_reactRouter","Routes","exports","routes","_toConsumableArray2","default","plugins","byType","sort","a","b","pathA","route","props","path","pathB","includes","createElement","map","_ref","name","React","cloneElement","key"],"sources":["Routes.tsx"],"sourcesContent":["// This file is necessary only for backwards compatibility.\n// We'll remove this once the legacy rendering engine is removed.\nimport React from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { Routes as ReactRouterRoutes } from \"@webiny/react-router\";\nimport { RoutePlugin } from \"../types\";\n\nexport const Routes = () => {\n // We cannot call `sort` on the array returned by the `plugins.byType` call - it is read-only.\n const routes = [...plugins.byType<RoutePlugin>(\"route\")].sort((a, b) => {\n const pathA = a.route.props.path || \"*\";\n const pathB = b.route.props.path || \"*\";\n\n // This will sort paths at the very bottom of the list\n if (pathA === \"/\" && pathB === \"*\") {\n return -1;\n }\n\n // This will push * and / to the bottom of the list\n if (pathA === \"*\" || pathA === \"/\") {\n return 1;\n }\n\n // This will push * and / to the bottom of the list\n if ([\"*\", \"/\"].includes(pathB)) {\n return -1;\n }\n\n return 0;\n });\n\n return (\n <ReactRouterRoutes>\n {routes.map(({ route, name }) => React.cloneElement(route, { key: name }))}\n </ReactRouterRoutes>\n );\n};\n"],"mappings":";;;;;;;;AAEA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAJA;AACA;;AAMO,IAAMG,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG,SAATA,MAAMA,CAAA,EAAS;EACxB;EACA,IAAME,MAAM,GAAG,IAAAC,mBAAA,CAAAC,OAAA,EAAIC,gBAAO,CAACC,MAAM,CAAc,OAAO,CAAC,EAAEC,IAAI,CAAC,UAACC,CAAC,EAAEC,CAAC,EAAK;IACpE,IAAMC,KAAK,GAAGF,CAAC,CAACG,KAAK,CAACC,KAAK,CAACC,IAAI,IAAI,GAAG;IACvC,IAAMC,KAAK,GAAGL,CAAC,CAACE,KAAK,CAACC,KAAK,CAACC,IAAI,IAAI,GAAG;;IAEvC;IACA,IAAIH,KAAK,KAAK,GAAG,IAAII,KAAK,KAAK,GAAG,EAAE;MAChC,OAAO,CAAC,CAAC;IACb;;IAEA;IACA,IAAIJ,KAAK,KAAK,GAAG,IAAIA,KAAK,KAAK,GAAG,EAAE;MAChC,OAAO,CAAC;IACZ;;IAEA;IACA,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAACK,QAAQ,CAACD,KAAK,CAAC,EAAE;MAC5B,OAAO,CAAC,CAAC;IACb;IAEA,OAAO,CAAC;EACZ,CAAC,CAAC;EAEF,oBACInB,MAAA,CAAAS,OAAA,CAAAY,aAAA,CAACjB,YAAA,CAAAC,MAAiB,QACbE,MAAM,CAACe,GAAG,CAAC,UAAAC,IAAA;IAAA,IAAGP,KAAK,GAAAO,IAAA,CAALP,KAAK;MAAEQ,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAA,oBAAOC,cAAK,CAACC,YAAY,CAACV,KAAK,EAAE;MAAEW,GAAG,EAAEH;IAAK,CAAC,CAAC;EAAA,EAC1D,CAAC;AAE5B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","plugins","Routes","ReactRouterRoutes","routes","byType","sort","a","b","pathA","route","props","path","pathB","includes","createElement","map","name","cloneElement","key"],"sources":["Routes.tsx"],"sourcesContent":["// This file is necessary only for backwards compatibility.\n// We'll remove this once the legacy rendering engine is removed.\nimport React from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { Routes as ReactRouterRoutes } from \"@webiny/react-router\";\nimport { RoutePlugin } from \"../types\";\n\nexport const Routes = () => {\n // We cannot call `sort` on the array returned by the `plugins.byType` call - it is read-only.\n const routes = [...plugins.byType<RoutePlugin>(\"route\")].sort((a, b) => {\n const pathA = a.route.props.path || \"*\";\n const pathB = b.route.props.path || \"*\";\n\n // This will sort paths at the very bottom of the list\n if (pathA === \"/\" && pathB === \"*\") {\n return -1;\n }\n\n // This will push * and / to the bottom of the list\n if (pathA === \"*\" || pathA === \"/\") {\n return 1;\n }\n\n // This will push * and / to the bottom of the list\n if ([\"*\", \"/\"].includes(pathB)) {\n return -1;\n }\n\n return 0;\n });\n\n return (\n <ReactRouterRoutes>\n {routes.map(({ route, name }) => React.cloneElement(route, { key: name }))}\n </ReactRouterRoutes>\n );\n};\n"],"mappings":"AAAA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,iBAAiB;AACzC,SAASC,MAAM,IAAIC,iBAAiB,QAAQ,sBAAsB;AAGlE,OAAO,MAAMD,MAAM,GAAGA,CAAA,KAAM;EACxB;EACA,MAAME,MAAM,GAAG,CAAC,GAAGH,OAAO,CAACI,MAAM,CAAc,OAAO,CAAC,CAAC,CAACC,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAK;IACpE,MAAMC,KAAK,GAAGF,CAAC,CAACG,KAAK,CAACC,KAAK,CAACC,IAAI,IAAI,GAAG;IACvC,MAAMC,KAAK,GAAGL,CAAC,CAACE,KAAK,CAACC,KAAK,CAACC,IAAI,IAAI,GAAG;;IAEvC;IACA,IAAIH,KAAK,KAAK,GAAG,IAAII,KAAK,KAAK,GAAG,EAAE;MAChC,OAAO,CAAC,CAAC;IACb;;IAEA;IACA,IAAIJ,KAAK,KAAK,GAAG,IAAIA,KAAK,KAAK,GAAG,EAAE;MAChC,OAAO,CAAC;IACZ;;IAEA;IACA,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAACK,QAAQ,CAACD,KAAK,CAAC,EAAE;MAC5B,OAAO,CAAC,CAAC;IACb;IAEA,OAAO,CAAC;EACZ,CAAC,CAAC;EAEF,oBACIb,KAAA,CAAAe,aAAA,CAACZ,iBAAiB,QACbC,MAAM,CAACY,GAAG,CAAC,CAAC;IAAEN,KAAK;IAAEO;EAAK,CAAC,kBAAKjB,KAAK,CAACkB,YAAY,CAACR,KAAK,EAAE;IAAES,GAAG,EAAEF;EAAK,CAAC,CAAC,CAC1D,CAAC;AAE5B,CAAC","ignoreList":[]}
@@ -1,31 +1,19 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.View = void 0;
9
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
10
- var _react = _interopRequireWildcard(require("react"));
11
- var _plugins = require("@webiny/plugins");
12
- var _ViewPlugin = require("../plugins/ViewPlugin");
13
- var View = exports.View = function View(_ref) {
14
- var name = _ref.name,
15
- children = _ref.children,
16
- _ref$props = _ref.props,
17
- props = _ref$props === void 0 ? {} : _ref$props;
18
- var viewPlugins = _plugins.plugins.byType(_ViewPlugin.ViewPlugin.type).filter(function (pl) {
19
- return pl.key === name;
20
- });
1
+ import React, { Fragment } from "react";
2
+ import { plugins } from "@webiny/plugins";
3
+ import { ViewPlugin } from "../plugins/ViewPlugin";
4
+ export const View = ({
5
+ name,
6
+ children,
7
+ props = {}
8
+ }) => {
9
+ const viewPlugins = plugins.byType(ViewPlugin.type).filter(pl => pl.key === name);
21
10
  if (viewPlugins.length) {
22
- children = viewPlugins.reduce(function (el, pl) {
23
- return pl.render((0, _objectSpread2.default)({
24
- children: el
25
- }, props));
26
- }, children);
11
+ children = viewPlugins.reduce((el, pl) => pl.render({
12
+ children: el,
13
+ ...props
14
+ }), children);
27
15
  }
28
- return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, children || null);
16
+ return /*#__PURE__*/React.createElement(Fragment, null, children || null);
29
17
  };
30
18
 
31
19
  //# sourceMappingURL=View.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_plugins","_ViewPlugin","View","exports","_ref","name","children","_ref$props","props","viewPlugins","plugins","byType","ViewPlugin","type","filter","pl","key","length","reduce","el","render","_objectSpread2","default","createElement","Fragment"],"sources":["View.tsx"],"sourcesContent":["import React, { Fragment } from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { ViewPlugin } from \"../plugins/ViewPlugin\";\n\ninterface Props {\n name: string;\n props?: Record<string, any>;\n children?: React.ReactNode;\n}\n\nexport const View = ({ name, children, props = {} }: Props) => {\n const viewPlugins = plugins.byType<ViewPlugin>(ViewPlugin.type).filter(pl => pl.key === name);\n\n if (viewPlugins.length) {\n children = viewPlugins.reduce((el, pl) => pl.render({ children: el, ...props }), children);\n }\n\n return <Fragment>{children || null}</Fragment>;\n};\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAQO,IAAMG,IAAI,GAAAC,OAAA,CAAAD,IAAA,GAAG,SAAPA,IAAIA,CAAAE,IAAA,EAA8C;EAAA,IAAxCC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAAC,UAAA,GAAAH,IAAA,CAAEI,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,CAAC,CAAC,GAAAA,UAAA;EAC7C,IAAME,WAAW,GAAGC,gBAAO,CAACC,MAAM,CAAaC,sBAAU,CAACC,IAAI,CAAC,CAACC,MAAM,CAAC,UAAAC,EAAE;IAAA,OAAIA,EAAE,CAACC,GAAG,KAAKX,IAAI;EAAA,EAAC;EAE7F,IAAII,WAAW,CAACQ,MAAM,EAAE;IACpBX,QAAQ,GAAGG,WAAW,CAACS,MAAM,CAAC,UAACC,EAAE,EAAEJ,EAAE;MAAA,OAAKA,EAAE,CAACK,MAAM,KAAAC,cAAA,CAAAC,OAAA;QAAGhB,QAAQ,EAAEa;MAAE,GAAKX,KAAK,CAAE,CAAC;IAAA,GAAEF,QAAQ,CAAC;EAC9F;EAEA,oBAAOT,MAAA,CAAAyB,OAAA,CAAAC,aAAA,CAAC1B,MAAA,CAAA2B,QAAQ,QAAElB,QAAQ,IAAI,IAAe,CAAC;AAClD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Fragment","plugins","ViewPlugin","View","name","children","props","viewPlugins","byType","type","filter","pl","key","length","reduce","el","render","createElement"],"sources":["View.tsx"],"sourcesContent":["import React, { Fragment } from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { ViewPlugin } from \"../plugins/ViewPlugin\";\n\ninterface Props {\n name: string;\n props?: Record<string, any>;\n children?: React.ReactNode;\n}\n\nexport const View = ({ name, children, props = {} }: Props) => {\n const viewPlugins = plugins.byType<ViewPlugin>(ViewPlugin.type).filter(pl => pl.key === name);\n\n if (viewPlugins.length) {\n children = viewPlugins.reduce((el, pl) => pl.render({ children: el, ...props }), children);\n }\n\n return <Fragment>{children || null}</Fragment>;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,OAAO,QAAQ,iBAAiB;AACzC,SAASC,UAAU;AAQnB,OAAO,MAAMC,IAAI,GAAGA,CAAC;EAAEC,IAAI;EAAEC,QAAQ;EAAEC,KAAK,GAAG,CAAC;AAAS,CAAC,KAAK;EAC3D,MAAMC,WAAW,GAAGN,OAAO,CAACO,MAAM,CAAaN,UAAU,CAACO,IAAI,CAAC,CAACC,MAAM,CAACC,EAAE,IAAIA,EAAE,CAACC,GAAG,KAAKR,IAAI,CAAC;EAE7F,IAAIG,WAAW,CAACM,MAAM,EAAE;IACpBR,QAAQ,GAAGE,WAAW,CAACO,MAAM,CAAC,CAACC,EAAE,EAAEJ,EAAE,KAAKA,EAAE,CAACK,MAAM,CAAC;MAAEX,QAAQ,EAAEU,EAAE;MAAE,GAAGT;IAAM,CAAC,CAAC,EAAED,QAAQ,CAAC;EAC9F;EAEA,oBAAON,KAAA,CAAAkB,aAAA,CAACjB,QAAQ,QAAEK,QAAQ,IAAI,IAAe,CAAC;AAClD,CAAC","ignoreList":[]}
@@ -1,21 +1,4 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Image", {
7
- enumerable: true,
8
- get: function get() {
9
- return _Image.Image;
10
- }
11
- });
12
- Object.defineProperty(exports, "Routes", {
13
- enumerable: true,
14
- get: function get() {
15
- return _Routes.Routes;
16
- }
17
- });
18
- var _Image = require("./Image");
19
- var _Routes = require("./Routes");
1
+ export { Image } from "./Image";
2
+ export { Routes } from "./Routes";
20
3
 
21
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_Image","require","_Routes"],"sources":["index.ts"],"sourcesContent":["export { Image } from \"./Image\";\nexport { Routes } from \"./Routes\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["Image","Routes"],"sources":["index.ts"],"sourcesContent":["export { Image } from \"./Image\";\nexport { Routes } from \"./Routes\";\n"],"mappings":"AAAA,SAASA,KAAK;AACd,SAASC,MAAM","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+ export interface RouteProps {
3
+ name: string;
4
+ path: string;
5
+ exact?: boolean;
6
+ element: React.ReactElement;
7
+ remove?: boolean;
8
+ before?: string;
9
+ after?: string;
10
+ }
11
+ export type RouteConfig = Pick<RouteProps, "name" | "path" | "element">;
12
+ export declare const Route: (({ name, path, element, exact, remove, before, after }: RouteProps) => React.JSX.Element) & {
13
+ original: ({ name, path, element, exact, remove, before, after }: RouteProps) => React.JSX.Element;
14
+ originalName: string;
15
+ displayName: string;
16
+ } & {
17
+ original: (({ name, path, element, exact, remove, before, after }: RouteProps) => React.JSX.Element) & {
18
+ original: ({ name, path, element, exact, remove, before, after }: RouteProps) => React.JSX.Element;
19
+ originalName: string;
20
+ displayName: string;
21
+ };
22
+ originalName: string;
23
+ displayName: string;
24
+ } & {
25
+ createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ name, path, element, exact, remove, before, after }: RouteProps) => React.JSX.Element) & {
26
+ original: ({ name, path, element, exact, remove, before, after }: RouteProps) => React.JSX.Element;
27
+ originalName: string;
28
+ displayName: string;
29
+ }>) => (props: unknown) => React.JSX.Element;
30
+ };
@@ -0,0 +1,42 @@
1
+ import React from "react";
2
+ import { makeDecoratable } from "@webiny/react-composition";
3
+ import { Property, useIdGenerator } from "@webiny/react-properties";
4
+ export const Route = makeDecoratable("Route", ({
5
+ name,
6
+ path,
7
+ element,
8
+ exact,
9
+ remove,
10
+ before,
11
+ after
12
+ }) => {
13
+ const getId = useIdGenerator("Route");
14
+ const placeAfter = after !== undefined ? getId(after) : undefined;
15
+ const placeBefore = before !== undefined ? getId(before) : undefined;
16
+ return /*#__PURE__*/React.createElement(Property, {
17
+ id: getId(name),
18
+ name: "routes",
19
+ remove: remove,
20
+ array: true,
21
+ before: placeBefore,
22
+ after: placeAfter
23
+ }, /*#__PURE__*/React.createElement(Property, {
24
+ id: getId(name, "name"),
25
+ name: "name",
26
+ value: name
27
+ }), /*#__PURE__*/React.createElement(Property, {
28
+ id: getId(name, "path"),
29
+ name: "path",
30
+ value: path
31
+ }), /*#__PURE__*/React.createElement(Property, {
32
+ id: getId(name, "exact"),
33
+ name: "exact",
34
+ value: exact
35
+ }), /*#__PURE__*/React.createElement(Property, {
36
+ id: getId(name, "element"),
37
+ name: "element",
38
+ value: element
39
+ }));
40
+ });
41
+
42
+ //# sourceMappingURL=Route.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","makeDecoratable","Property","useIdGenerator","Route","name","path","element","exact","remove","before","after","getId","placeAfter","undefined","placeBefore","createElement","id","array","value"],"sources":["Route.tsx"],"sourcesContent":["import React from \"react\";\nimport { makeDecoratable } from \"@webiny/react-composition\";\nimport { Property, useIdGenerator } from \"@webiny/react-properties\";\n\nexport interface RouteProps {\n name: string;\n path: string;\n exact?: boolean;\n element: React.ReactElement;\n remove?: boolean;\n before?: string;\n after?: string;\n}\n\nexport type RouteConfig = Pick<RouteProps, \"name\" | \"path\" | \"element\">;\n\nexport const Route = makeDecoratable(\n \"Route\",\n ({ name, path, element, exact, remove, before, after }: RouteProps) => {\n const getId = useIdGenerator(\"Route\");\n\n const placeAfter = after !== undefined ? getId(after) : undefined;\n const placeBefore = before !== undefined ? getId(before) : undefined;\n\n return (\n <Property\n id={getId(name)}\n name={\"routes\"}\n remove={remove}\n array={true}\n before={placeBefore}\n after={placeAfter}\n >\n <Property id={getId(name, \"name\")} name={\"name\"} value={name} />\n <Property id={getId(name, \"path\")} name={\"path\"} value={path} />\n <Property id={getId(name, \"exact\")} name={\"exact\"} value={exact} />\n <Property id={getId(name, \"element\")} name={\"element\"} value={element} />\n </Property>\n );\n }\n);\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,QAAQ,2BAA2B;AAC3D,SAASC,QAAQ,EAAEC,cAAc,QAAQ,0BAA0B;AAcnE,OAAO,MAAMC,KAAK,GAAGH,eAAe,CAChC,OAAO,EACP,CAAC;EAAEI,IAAI;EAAEC,IAAI;EAAEC,OAAO;EAAEC,KAAK;EAAEC,MAAM;EAAEC,MAAM;EAAEC;AAAkB,CAAC,KAAK;EACnE,MAAMC,KAAK,GAAGT,cAAc,CAAC,OAAO,CAAC;EAErC,MAAMU,UAAU,GAAGF,KAAK,KAAKG,SAAS,GAAGF,KAAK,CAACD,KAAK,CAAC,GAAGG,SAAS;EACjE,MAAMC,WAAW,GAAGL,MAAM,KAAKI,SAAS,GAAGF,KAAK,CAACF,MAAM,CAAC,GAAGI,SAAS;EAEpE,oBACId,KAAA,CAAAgB,aAAA,CAACd,QAAQ;IACLe,EAAE,EAAEL,KAAK,CAACP,IAAI,CAAE;IAChBA,IAAI,EAAE,QAAS;IACfI,MAAM,EAAEA,MAAO;IACfS,KAAK,EAAE,IAAK;IACZR,MAAM,EAAEK,WAAY;IACpBJ,KAAK,EAAEE;EAAW,gBAElBb,KAAA,CAAAgB,aAAA,CAACd,QAAQ;IAACe,EAAE,EAAEL,KAAK,CAACP,IAAI,EAAE,MAAM,CAAE;IAACA,IAAI,EAAE,MAAO;IAACc,KAAK,EAAEd;EAAK,CAAE,CAAC,eAChEL,KAAA,CAAAgB,aAAA,CAACd,QAAQ;IAACe,EAAE,EAAEL,KAAK,CAACP,IAAI,EAAE,MAAM,CAAE;IAACA,IAAI,EAAE,MAAO;IAACc,KAAK,EAAEb;EAAK,CAAE,CAAC,eAChEN,KAAA,CAAAgB,aAAA,CAACd,QAAQ;IAACe,EAAE,EAAEL,KAAK,CAACP,IAAI,EAAE,OAAO,CAAE;IAACA,IAAI,EAAE,OAAQ;IAACc,KAAK,EAAEX;EAAM,CAAE,CAAC,eACnER,KAAA,CAAAgB,aAAA,CAACd,QAAQ;IAACe,EAAE,EAAEL,KAAK,CAACP,IAAI,EAAE,SAAS,CAAE;IAACA,IAAI,EAAE,SAAU;IAACc,KAAK,EAAEZ;EAAQ,CAAE,CAClE,CAAC;AAEnB,CACJ,CAAC","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ /// <reference types="react" />
2
+ import { type RouteConfig } from "./RouterConfig/Route";
3
+ export declare const RouterWithConfig: (({ onProperties, children }: import("@webiny/react-properties").WithConfigProps) => import("react").JSX.Element) & {
4
+ displayName: string;
5
+ };
6
+ export declare const useRouterConfig: () => {
7
+ routes: RouteConfig[];
8
+ };
9
+ export declare const RouterConfig: (({ priority, children }: import("@webiny/react-properties").ConfigProps) => import("react").JSX.Element) & {
10
+ Route: (({ name, path, element, exact, remove, before, after }: import("./RouterConfig/Route").RouteProps) => import("react").JSX.Element) & {
11
+ original: ({ name, path, element, exact, remove, before, after }: import("./RouterConfig/Route").RouteProps) => import("react").JSX.Element;
12
+ originalName: string;
13
+ displayName: string;
14
+ } & {
15
+ original: (({ name, path, element, exact, remove, before, after }: import("./RouterConfig/Route").RouteProps) => import("react").JSX.Element) & {
16
+ original: ({ name, path, element, exact, remove, before, after }: import("./RouterConfig/Route").RouteProps) => import("react").JSX.Element;
17
+ originalName: string;
18
+ displayName: string;
19
+ };
20
+ originalName: string;
21
+ displayName: string;
22
+ } & {
23
+ createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ name, path, element, exact, remove, before, after }: import("./RouterConfig/Route").RouteProps) => import("react").JSX.Element) & {
24
+ original: ({ name, path, element, exact, remove, before, after }: import("./RouterConfig/Route").RouteProps) => import("react").JSX.Element;
25
+ originalName: string;
26
+ displayName: string;
27
+ }>) => (props: unknown) => import("react").JSX.Element;
28
+ };
29
+ useRouterConfig: () => {
30
+ routes: RouteConfig[];
31
+ };
32
+ };
@@ -0,0 +1,18 @@
1
+ import { createConfigurableComponent } from "@webiny/react-properties";
2
+ import { Route } from "./RouterConfig/Route";
3
+ const base = createConfigurableComponent("RouterConfig");
4
+ export const RouterWithConfig = Object.assign(base.WithConfig, {
5
+ displayName: "RouterWithConfig"
6
+ });
7
+ export const useRouterConfig = () => {
8
+ const baseConfig = base.useConfig();
9
+ return {
10
+ routes: baseConfig.routes ?? []
11
+ };
12
+ };
13
+ export const RouterConfig = Object.assign(base.Config, {
14
+ Route,
15
+ useRouterConfig
16
+ });
17
+
18
+ //# sourceMappingURL=RouterConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createConfigurableComponent","Route","base","RouterWithConfig","Object","assign","WithConfig","displayName","useRouterConfig","baseConfig","useConfig","routes","RouterConfig","Config"],"sources":["RouterConfig.tsx"],"sourcesContent":["import { createConfigurableComponent } from \"@webiny/react-properties\";\nimport { Route, type RouteConfig } from \"./RouterConfig/Route\";\n\nconst base = createConfigurableComponent<RouterConfig>(\"RouterConfig\");\n\nexport const RouterWithConfig = Object.assign(base.WithConfig, {\n displayName: \"RouterWithConfig\"\n});\n\ninterface RouterConfig {\n routes: RouteConfig[];\n}\n\nexport const useRouterConfig = () => {\n const baseConfig = base.useConfig();\n\n return {\n routes: baseConfig.routes ?? []\n };\n};\n\nexport const RouterConfig = Object.assign(base.Config, {\n Route,\n useRouterConfig\n});\n"],"mappings":"AAAA,SAASA,2BAA2B,QAAQ,0BAA0B;AACtE,SAASC,KAAK;AAEd,MAAMC,IAAI,GAAGF,2BAA2B,CAAe,cAAc,CAAC;AAEtE,OAAO,MAAMG,gBAAgB,GAAGC,MAAM,CAACC,MAAM,CAACH,IAAI,CAACI,UAAU,EAAE;EAC3DC,WAAW,EAAE;AACjB,CAAC,CAAC;AAMF,OAAO,MAAMC,eAAe,GAAGA,CAAA,KAAM;EACjC,MAAMC,UAAU,GAAGP,IAAI,CAACQ,SAAS,CAAC,CAAC;EAEnC,OAAO;IACHC,MAAM,EAAEF,UAAU,CAACE,MAAM,IAAI;EACjC,CAAC;AACL,CAAC;AAED,OAAO,MAAMC,YAAY,GAAGR,MAAM,CAACC,MAAM,CAACH,IAAI,CAACW,MAAM,EAAE;EACnDZ,KAAK;EACLO;AACJ,CAAC,CAAC","ignoreList":[]}
package/config.js CHANGED
@@ -1,31 +1,25 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.config = void 0;
7
- var _deepFreeze = function deepFreeze(obj) {
8
- Object.keys(obj).forEach(function (prop) {
1
+ const deepFreeze = obj => {
2
+ Object.keys(obj).forEach(prop => {
9
3
  if (typeof obj[prop] === "object" && !Object.isFrozen(obj[prop])) {
10
- _deepFreeze(obj[prop]);
4
+ deepFreeze(obj[prop]);
11
5
  }
12
6
  });
13
7
  return Object.freeze(obj);
14
8
  };
15
9
  function createConfig() {
16
- var _config = {};
10
+ let _config = {};
17
11
  return {
18
- set: function set(config) {
19
- _config = _deepFreeze(config);
12
+ set(config) {
13
+ _config = deepFreeze(config);
20
14
  },
21
- get: function get() {
15
+ get() {
22
16
  return _config;
23
17
  },
24
- getKey: function getKey(key, defaultValue) {
18
+ getKey(key, defaultValue) {
25
19
  return key in _config ? _config[key] : defaultValue;
26
20
  }
27
21
  };
28
22
  }
29
- var config = exports.config = createConfig();
23
+ export const config = createConfig();
30
24
 
31
25
  //# sourceMappingURL=config.js.map
package/config.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["deepFreeze","obj","Object","keys","forEach","prop","isFrozen","freeze","createConfig","_config","set","config","get","getKey","key","defaultValue","exports"],"sources":["config.ts"],"sourcesContent":["export type Config = Record<string, any>;\n\ninterface AppConfig {\n set(config: Config): void;\n get(): Config;\n getKey<T = string>(key: string, defaultValue: T): T;\n}\n\nconst deepFreeze = (obj: Record<string, any>): Record<string, any> => {\n Object.keys(obj).forEach(prop => {\n if (typeof obj[prop] === \"object\" && !Object.isFrozen(obj[prop])) {\n deepFreeze(obj[prop]);\n }\n });\n return Object.freeze(obj);\n};\n\nfunction createConfig(): AppConfig {\n let _config: Record<string, any> = {};\n\n return {\n set(config: Config) {\n _config = deepFreeze(config);\n },\n get() {\n return _config;\n },\n getKey(key, defaultValue) {\n return key in _config ? _config[key] : defaultValue;\n }\n };\n}\n\nexport const config = createConfig();\n"],"mappings":";;;;;;AAQA,IAAMA,WAAU,GAAG,SAAbA,UAAUA,CAAIC,GAAwB,EAA0B;EAClEC,MAAM,CAACC,IAAI,CAACF,GAAG,CAAC,CAACG,OAAO,CAAC,UAAAC,IAAI,EAAI;IAC7B,IAAI,OAAOJ,GAAG,CAACI,IAAI,CAAC,KAAK,QAAQ,IAAI,CAACH,MAAM,CAACI,QAAQ,CAACL,GAAG,CAACI,IAAI,CAAC,CAAC,EAAE;MAC9DL,WAAU,CAACC,GAAG,CAACI,IAAI,CAAC,CAAC;IACzB;EACJ,CAAC,CAAC;EACF,OAAOH,MAAM,CAACK,MAAM,CAACN,GAAG,CAAC;AAC7B,CAAC;AAED,SAASO,YAAYA,CAAA,EAAc;EAC/B,IAAIC,OAA4B,GAAG,CAAC,CAAC;EAErC,OAAO;IACHC,GAAG,WAAHA,GAAGA,CAACC,MAAc,EAAE;MAChBF,OAAO,GAAGT,WAAU,CAACW,MAAM,CAAC;IAChC,CAAC;IACDC,GAAG,WAAHA,GAAGA,CAAA,EAAG;MACF,OAAOH,OAAO;IAClB,CAAC;IACDI,MAAM,WAANA,MAAMA,CAACC,GAAG,EAAEC,YAAY,EAAE;MACtB,OAAOD,GAAG,IAAIL,OAAO,GAAGA,OAAO,CAACK,GAAG,CAAC,GAAGC,YAAY;IACvD;EACJ,CAAC;AACL;AAEO,IAAMJ,MAAM,GAAAK,OAAA,CAAAL,MAAA,GAAGH,YAAY,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["deepFreeze","obj","Object","keys","forEach","prop","isFrozen","freeze","createConfig","_config","set","config","get","getKey","key","defaultValue"],"sources":["config.ts"],"sourcesContent":["export type Config = Record<string, any>;\n\ninterface AppConfig {\n set(config: Config): void;\n get(): Config;\n getKey<T = string>(key: string, defaultValue: T): T;\n}\n\nconst deepFreeze = (obj: Record<string, any>): Record<string, any> => {\n Object.keys(obj).forEach(prop => {\n if (typeof obj[prop] === \"object\" && !Object.isFrozen(obj[prop])) {\n deepFreeze(obj[prop]);\n }\n });\n return Object.freeze(obj);\n};\n\nfunction createConfig(): AppConfig {\n let _config: Record<string, any> = {};\n\n return {\n set(config: Config) {\n _config = deepFreeze(config);\n },\n get() {\n return _config;\n },\n getKey(key, defaultValue) {\n return key in _config ? _config[key] : defaultValue;\n }\n };\n}\n\nexport const config = createConfig();\n"],"mappings":"AAQA,MAAMA,UAAU,GAAIC,GAAwB,IAA0B;EAClEC,MAAM,CAACC,IAAI,CAACF,GAAG,CAAC,CAACG,OAAO,CAACC,IAAI,IAAI;IAC7B,IAAI,OAAOJ,GAAG,CAACI,IAAI,CAAC,KAAK,QAAQ,IAAI,CAACH,MAAM,CAACI,QAAQ,CAACL,GAAG,CAACI,IAAI,CAAC,CAAC,EAAE;MAC9DL,UAAU,CAACC,GAAG,CAACI,IAAI,CAAC,CAAC;IACzB;EACJ,CAAC,CAAC;EACF,OAAOH,MAAM,CAACK,MAAM,CAACN,GAAG,CAAC;AAC7B,CAAC;AAED,SAASO,YAAYA,CAAA,EAAc;EAC/B,IAAIC,OAA4B,GAAG,CAAC,CAAC;EAErC,OAAO;IACHC,GAAGA,CAACC,MAAc,EAAE;MAChBF,OAAO,GAAGT,UAAU,CAACW,MAAM,CAAC;IAChC,CAAC;IACDC,GAAGA,CAAA,EAAG;MACF,OAAOH,OAAO;IAClB,CAAC;IACDI,MAAMA,CAACC,GAAG,EAAEC,YAAY,EAAE;MACtB,OAAOD,GAAG,IAAIL,OAAO,GAAGA,OAAO,CAACK,GAAG,CAAC,GAAGC,YAAY;IACvD;EACJ,CAAC;AACL;AAEA,OAAO,MAAMJ,MAAM,GAAGH,YAAY,CAAC,CAAC","ignoreList":[]}
@@ -1,56 +1,32 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.UiProvider = exports.UiContext = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
- var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
12
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
- var _react = _interopRequireDefault(require("react"));
15
- var _plugins = require("@webiny/plugins");
16
- var UiContext = exports.UiContext = /*#__PURE__*/_react.default.createContext({});
17
- var UiProvider = exports.UiProvider = /*#__PURE__*/function (_React$Component) {
18
- function UiProvider() {
19
- var _this;
20
- (0, _classCallCheck2.default)(this, UiProvider);
21
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
22
- args[_key] = arguments[_key];
23
- }
24
- _this = (0, _callSuper2.default)(this, UiProvider, [].concat(args));
25
- (0, _defineProperty2.default)(_this, "state", {
26
- ui: {}
27
- });
28
- (0, _defineProperty2.default)(_this, "setData", function (setter) {
29
- return _this.setState(function (state) {
30
- return {
31
- ui: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state.ui), setter(state.ui))
32
- };
33
- });
1
+ import React from "react";
2
+ import { plugins } from "@webiny/plugins";
3
+ export const UiContext = /*#__PURE__*/React.createContext({});
4
+ export class UiProvider extends React.Component {
5
+ state = {
6
+ ui: {}
7
+ };
8
+ setData = setter => {
9
+ return this.setState(state => {
10
+ return {
11
+ ui: {
12
+ ...state.ui,
13
+ ...setter(state.ui)
14
+ }
15
+ };
34
16
  });
35
- return _this;
17
+ };
18
+ render() {
19
+ const value = {
20
+ ...this.state.ui,
21
+ setState: this.setData
22
+ };
23
+ const uiStatePlugins = plugins.byType("ui-state");
24
+ return /*#__PURE__*/React.createElement(UiContext.Provider, {
25
+ value: value
26
+ }, uiStatePlugins.map(pl => /*#__PURE__*/React.cloneElement(pl.render(), {
27
+ key: pl.name
28
+ })), this.props.children);
36
29
  }
37
- (0, _inherits2.default)(UiProvider, _React$Component);
38
- return (0, _createClass2.default)(UiProvider, [{
39
- key: "render",
40
- value: function render() {
41
- var value = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.state.ui), {}, {
42
- setState: this.setData
43
- });
44
- var uiStatePlugins = _plugins.plugins.byType("ui-state");
45
- return /*#__PURE__*/_react.default.createElement(UiContext.Provider, {
46
- value: value
47
- }, uiStatePlugins.map(function (pl) {
48
- return /*#__PURE__*/_react.default.cloneElement(pl.render(), {
49
- key: pl.name
50
- });
51
- }), this.props.children);
52
- }
53
- }]);
54
- }(_react.default.Component);
30
+ }
55
31
 
56
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_plugins","UiContext","exports","React","createContext","UiProvider","_React$Component","_this","_classCallCheck2","default","_len","arguments","length","args","Array","_key","_callSuper2","concat","_defineProperty2","ui","setter","setState","state","_objectSpread2","_inherits2","_createClass2","key","value","render","setData","uiStatePlugins","plugins","byType","createElement","Provider","map","pl","cloneElement","name","props","children","Component"],"sources":["index.tsx"],"sourcesContent":["import React from \"react\";\nimport { UiStatePlugin } from \"~/types\";\nimport { plugins } from \"@webiny/plugins\";\n\nexport const UiContext = React.createContext<Record<string, any>>({});\n\ntype Props = Record<string, any>;\n\ntype State = {\n ui: { [key: string]: any };\n};\n\ninterface UiData {\n [key: string]: any;\n}\n\ninterface UiDataSetter {\n (ui: UiData): UiData;\n}\n\nexport interface UiContextValue {\n setState: (setter: UiDataSetter) => void;\n [key: string]: any;\n}\n\nexport class UiProvider extends React.Component<Props, State> {\n public override state: State = {\n ui: {}\n };\n\n private readonly setData = (setter: UiDataSetter): void => {\n return this.setState((state: State) => {\n return { ui: { ...state.ui, ...setter(state.ui) } };\n });\n };\n\n public override render() {\n const value: UiContextValue = { ...this.state.ui, setState: this.setData };\n const uiStatePlugins = plugins.byType<UiStatePlugin>(\"ui-state\");\n return (\n <UiContext.Provider value={value}>\n {uiStatePlugins.map(pl => React.cloneElement(pl.render(), { key: pl.name }))}\n {this.props.children}\n </UiContext.Provider>\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAEO,IAAME,SAAS,GAAAC,OAAA,CAAAD,SAAA,gBAAGE,cAAK,CAACC,aAAa,CAAsB,CAAC,CAAC,CAAC;AAAC,IAqBzDC,UAAU,GAAAH,OAAA,CAAAG,UAAA,0BAAAC,gBAAA;EAAA,SAAAD,WAAA;IAAA,IAAAE,KAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAJ,UAAA;IAAA,SAAAK,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAR,KAAA,OAAAS,WAAA,CAAAP,OAAA,QAAAJ,UAAA,KAAAY,MAAA,CAAAJ,IAAA;IAAA,IAAAK,gBAAA,CAAAT,OAAA,EAAAF,KAAA,WACY;MAC3BY,EAAE,EAAE,CAAC;IACT,CAAC;IAAA,IAAAD,gBAAA,CAAAT,OAAA,EAAAF,KAAA,aAE0B,UAACa,MAAoB,EAAW;MACvD,OAAOb,KAAA,CAAKc,QAAQ,CAAC,UAACC,KAAY,EAAK;QACnC,OAAO;UAAEH,EAAE,MAAAI,cAAA,CAAAd,OAAA,MAAAc,cAAA,CAAAd,OAAA,MAAOa,KAAK,CAACH,EAAE,GAAKC,MAAM,CAACE,KAAK,CAACH,EAAE,CAAC;QAAG,CAAC;MACvD,CAAC,CAAC;IACN,CAAC;IAAA,OAAAZ,KAAA;EAAA;EAAA,IAAAiB,UAAA,CAAAf,OAAA,EAAAJ,UAAA,EAAAC,gBAAA;EAAA,WAAAmB,aAAA,CAAAhB,OAAA,EAAAJ,UAAA;IAAAqB,GAAA;IAAAC,KAAA,EAED,SAAgBC,MAAMA,CAAA,EAAG;MACrB,IAAMD,KAAqB,OAAAJ,cAAA,CAAAd,OAAA,MAAAc,cAAA,CAAAd,OAAA,MAAQ,IAAI,CAACa,KAAK,CAACH,EAAE;QAAEE,QAAQ,EAAE,IAAI,CAACQ;MAAO,EAAE;MAC1E,IAAMC,cAAc,GAAGC,gBAAO,CAACC,MAAM,CAAgB,UAAU,CAAC;MAChE,oBACInC,MAAA,CAAAY,OAAA,CAAAwB,aAAA,CAAChC,SAAS,CAACiC,QAAQ;QAACP,KAAK,EAAEA;MAAM,GAC5BG,cAAc,CAACK,GAAG,CAAC,UAAAC,EAAE;QAAA,oBAAIjC,cAAK,CAACkC,YAAY,CAACD,EAAE,CAACR,MAAM,CAAC,CAAC,EAAE;UAAEF,GAAG,EAAEU,EAAE,CAACE;QAAK,CAAC,CAAC;MAAA,EAAC,EAC3E,IAAI,CAACC,KAAK,CAACC,QACI,CAAC;IAE7B;EAAC;AAAA,EApB2BrC,cAAK,CAACsC,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["React","plugins","UiContext","createContext","UiProvider","Component","state","ui","setData","setter","setState","render","value","uiStatePlugins","byType","createElement","Provider","map","pl","cloneElement","key","name","props","children"],"sources":["index.tsx"],"sourcesContent":["import React from \"react\";\nimport { UiStatePlugin } from \"~/types\";\nimport { plugins } from \"@webiny/plugins\";\n\nexport const UiContext = React.createContext<Record<string, any>>({});\n\ntype Props = Record<string, any>;\n\ntype State = {\n ui: { [key: string]: any };\n};\n\ninterface UiData {\n [key: string]: any;\n}\n\ninterface UiDataSetter {\n (ui: UiData): UiData;\n}\n\nexport interface UiContextValue {\n setState: (setter: UiDataSetter) => void;\n [key: string]: any;\n}\n\nexport class UiProvider extends React.Component<Props, State> {\n public override state: State = {\n ui: {}\n };\n\n private readonly setData = (setter: UiDataSetter): void => {\n return this.setState((state: State) => {\n return { ui: { ...state.ui, ...setter(state.ui) } };\n });\n };\n\n public override render() {\n const value: UiContextValue = { ...this.state.ui, setState: this.setData };\n const uiStatePlugins = plugins.byType<UiStatePlugin>(\"ui-state\");\n return (\n <UiContext.Provider value={value}>\n {uiStatePlugins.map(pl => React.cloneElement(pl.render(), { key: pl.name }))}\n {this.props.children}\n </UiContext.Provider>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,OAAO,QAAQ,iBAAiB;AAEzC,OAAO,MAAMC,SAAS,gBAAGF,KAAK,CAACG,aAAa,CAAsB,CAAC,CAAC,CAAC;AAqBrE,OAAO,MAAMC,UAAU,SAASJ,KAAK,CAACK,SAAS,CAAe;EAC1CC,KAAK,GAAU;IAC3BC,EAAE,EAAE,CAAC;EACT,CAAC;EAEgBC,OAAO,GAAIC,MAAoB,IAAW;IACvD,OAAO,IAAI,CAACC,QAAQ,CAAEJ,KAAY,IAAK;MACnC,OAAO;QAAEC,EAAE,EAAE;UAAE,GAAGD,KAAK,CAACC,EAAE;UAAE,GAAGE,MAAM,CAACH,KAAK,CAACC,EAAE;QAAE;MAAE,CAAC;IACvD,CAAC,CAAC;EACN,CAAC;EAEeI,MAAMA,CAAA,EAAG;IACrB,MAAMC,KAAqB,GAAG;MAAE,GAAG,IAAI,CAACN,KAAK,CAACC,EAAE;MAAEG,QAAQ,EAAE,IAAI,CAACF;IAAQ,CAAC;IAC1E,MAAMK,cAAc,GAAGZ,OAAO,CAACa,MAAM,CAAgB,UAAU,CAAC;IAChE,oBACId,KAAA,CAAAe,aAAA,CAACb,SAAS,CAACc,QAAQ;MAACJ,KAAK,EAAEA;IAAM,GAC5BC,cAAc,CAACI,GAAG,CAACC,EAAE,iBAAIlB,KAAK,CAACmB,YAAY,CAACD,EAAE,CAACP,MAAM,CAAC,CAAC,EAAE;MAAES,GAAG,EAAEF,EAAE,CAACG;IAAK,CAAC,CAAC,CAAC,EAC3E,IAAI,CAACC,KAAK,CAACC,QACI,CAAC;EAE7B;AACJ","ignoreList":[]}
@@ -1,42 +1,31 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.DebounceRender = void 0;
9
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
- var _react = _interopRequireWildcard(require("react"));
11
- var _debounce = _interopRequireDefault(require("lodash/debounce"));
1
+ import React from "react";
2
+ import { useEffect, useMemo, useState } from "react";
3
+ import debounce from "lodash/debounce";
12
4
  /**
13
5
  * We need to debounce the rendering of children during app bootstrap, since many plugins
14
6
  * can add more and more Providers which will recompose the entire hierarchy of React Context providers.
15
7
  * During this stage, we don't want to render anything.
16
8
  */
17
- var DebounceRender = exports.DebounceRender = function DebounceRender(_ref) {
18
- var _ref$wait = _ref.wait,
19
- wait = _ref$wait === void 0 ? 50 : _ref$wait,
20
- children = _ref.children;
21
- var _useState = (0, _react.useState)(wait === 0),
22
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
23
- render = _useState2[0],
24
- setRender = _useState2[1];
25
- var debouncedRender = (0, _react.useMemo)(function () {
26
- return (0, _debounce.default)(function () {
9
+ export const DebounceRender = ({
10
+ wait = 50,
11
+ children
12
+ }) => {
13
+ const [render, setRender] = useState(wait === 0);
14
+ const debouncedRender = useMemo(() => {
15
+ return debounce(() => {
27
16
  setRender(true);
28
17
  }, wait);
29
18
  }, [setRender]);
30
- (0, _react.useEffect)(function () {
19
+ useEffect(() => {
31
20
  if (render) {
32
21
  return;
33
22
  }
34
23
  debouncedRender();
35
- return function () {
24
+ return () => {
36
25
  debouncedRender.cancel();
37
26
  };
38
27
  }, []);
39
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, render ? children : null);
28
+ return /*#__PURE__*/React.createElement(React.Fragment, null, render ? children : null);
40
29
  };
41
30
 
42
31
  //# sourceMappingURL=DebounceRender.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_debounce","_interopRequireDefault","DebounceRender","exports","_ref","_ref$wait","wait","children","_useState","useState","_useState2","_slicedToArray2","default","render","setRender","debouncedRender","useMemo","debounce","useEffect","cancel","createElement","Fragment"],"sources":["DebounceRender.tsx"],"sourcesContent":["import React from \"react\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport debounce from \"lodash/debounce\";\n\ninterface Props {\n wait?: number;\n children?: React.ReactNode;\n}\n/**\n * We need to debounce the rendering of children during app bootstrap, since many plugins\n * can add more and more Providers which will recompose the entire hierarchy of React Context providers.\n * During this stage, we don't want to render anything.\n */\nexport const DebounceRender = ({ wait = 50, children }: Props) => {\n const [render, setRender] = useState(wait === 0);\n\n const debouncedRender = useMemo(() => {\n return debounce(() => {\n setRender(true);\n }, wait);\n }, [setRender]);\n\n useEffect(() => {\n if (render) {\n return;\n }\n\n debouncedRender();\n\n return () => {\n debouncedRender.cancel();\n };\n }, []);\n\n return <>{render ? children : null}</>;\n};\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AAMA;AACA;AACA;AACA;AACA;AACO,IAAMG,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,SAAjBA,cAAcA,CAAAE,IAAA,EAAuC;EAAA,IAAAC,SAAA,GAAAD,IAAA,CAAjCE,IAAI;IAAJA,IAAI,GAAAD,SAAA,cAAG,EAAE,GAAAA,SAAA;IAAEE,QAAQ,GAAAH,IAAA,CAARG,QAAQ;EAChD,IAAAC,SAAA,GAA4B,IAAAC,eAAQ,EAACH,IAAI,KAAK,CAAC,CAAC;IAAAI,UAAA,OAAAC,eAAA,CAAAC,OAAA,EAAAJ,SAAA;IAAzCK,MAAM,GAAAH,UAAA;IAAEI,SAAS,GAAAJ,UAAA;EAExB,IAAMK,eAAe,GAAG,IAAAC,cAAO,EAAC,YAAM;IAClC,OAAO,IAAAC,iBAAQ,EAAC,YAAM;MAClBH,SAAS,CAAC,IAAI,CAAC;IACnB,CAAC,EAAER,IAAI,CAAC;EACZ,CAAC,EAAE,CAACQ,SAAS,CAAC,CAAC;EAEf,IAAAI,gBAAS,EAAC,YAAM;IACZ,IAAIL,MAAM,EAAE;MACR;IACJ;IAEAE,eAAe,CAAC,CAAC;IAEjB,OAAO,YAAM;MACTA,eAAe,CAACI,MAAM,CAAC,CAAC;IAC5B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,oBAAOtB,MAAA,CAAAe,OAAA,CAAAQ,aAAA,CAAAvB,MAAA,CAAAe,OAAA,CAAAS,QAAA,QAAGR,MAAM,GAAGN,QAAQ,GAAG,IAAO,CAAC;AAC1C,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useEffect","useMemo","useState","debounce","DebounceRender","wait","children","render","setRender","debouncedRender","cancel","createElement","Fragment"],"sources":["DebounceRender.tsx"],"sourcesContent":["import React from \"react\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport debounce from \"lodash/debounce\";\n\ninterface Props {\n wait?: number;\n children?: React.ReactNode;\n}\n/**\n * We need to debounce the rendering of children during app bootstrap, since many plugins\n * can add more and more Providers which will recompose the entire hierarchy of React Context providers.\n * During this stage, we don't want to render anything.\n */\nexport const DebounceRender = ({ wait = 50, children }: Props) => {\n const [render, setRender] = useState(wait === 0);\n\n const debouncedRender = useMemo(() => {\n return debounce(() => {\n setRender(true);\n }, wait);\n }, [setRender]);\n\n useEffect(() => {\n if (render) {\n return;\n }\n\n debouncedRender();\n\n return () => {\n debouncedRender.cancel();\n };\n }, []);\n\n return <>{render ? children : null}</>;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACpD,OAAOC,QAAQ,MAAM,iBAAiB;AAMtC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAGA,CAAC;EAAEC,IAAI,GAAG,EAAE;EAAEC;AAAgB,CAAC,KAAK;EAC9D,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGN,QAAQ,CAACG,IAAI,KAAK,CAAC,CAAC;EAEhD,MAAMI,eAAe,GAAGR,OAAO,CAAC,MAAM;IAClC,OAAOE,QAAQ,CAAC,MAAM;MAClBK,SAAS,CAAC,IAAI,CAAC;IACnB,CAAC,EAAEH,IAAI,CAAC;EACZ,CAAC,EAAE,CAACG,SAAS,CAAC,CAAC;EAEfR,SAAS,CAAC,MAAM;IACZ,IAAIO,MAAM,EAAE;MACR;IACJ;IAEAE,eAAe,CAAC,CAAC;IAEjB,OAAO,MAAM;MACTA,eAAe,CAACC,MAAM,CAAC,CAAC;IAC5B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,oBAAOX,KAAA,CAAAY,aAAA,CAAAZ,KAAA,CAAAa,QAAA,QAAGL,MAAM,GAAGD,QAAQ,GAAG,IAAO,CAAC;AAC1C,CAAC","ignoreList":[]}
package/core/Plugin.js CHANGED
@@ -1,22 +1,14 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.Plugin = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _Provider = require("./Provider");
10
- var _Plugins = require("./Plugins");
11
- var Plugin = exports.Plugin = /*#__PURE__*/_react.default.memo(function Plugin(_ref) {
12
- var providers = _ref.providers,
13
- children = _ref.children;
14
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (providers || []).map(function (provider, index) {
15
- return /*#__PURE__*/_react.default.createElement(_Provider.Provider, {
16
- key: index,
17
- hoc: provider
18
- });
19
- }), children ? /*#__PURE__*/_react.default.createElement(_Plugins.Plugins, null, children) : null);
1
+ import React from "react";
2
+ import { Provider } from "./Provider";
3
+ import { Plugins } from "./Plugins";
4
+ export const Plugin = /*#__PURE__*/React.memo(function Plugin({
5
+ providers,
6
+ children
7
+ }) {
8
+ return /*#__PURE__*/React.createElement(React.Fragment, null, (providers || []).map((provider, index) => /*#__PURE__*/React.createElement(Provider, {
9
+ key: index,
10
+ hoc: provider
11
+ })), children ? /*#__PURE__*/React.createElement(Plugins, null, children) : null);
20
12
  });
21
13
 
22
14
  //# sourceMappingURL=Plugin.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_Provider","_Plugins","Plugin","exports","React","memo","_ref","providers","children","default","createElement","Fragment","map","provider","index","Provider","key","hoc","Plugins"],"sources":["Plugin.tsx"],"sourcesContent":["import React from \"react\";\nimport { Provider } from \"./Provider\";\nimport { Plugins } from \"./Plugins\";\nimport { GenericComponent, Decorator } from \"@webiny/react-composition\";\n\ninterface PluginProps {\n providers?: Decorator<GenericComponent>[];\n children?: React.ReactNode;\n}\n\nexport const Plugin = React.memo(function Plugin({ providers, children }: PluginProps) {\n return (\n <>\n {(providers || []).map((provider, index) => (\n <Provider key={index} hoc={provider} />\n ))}\n {children ? <Plugins>{children}</Plugins> : null}\n </>\n );\n});\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAQO,IAAMG,MAAM,GAAAC,OAAA,CAAAD,MAAA,gBAAGE,cAAK,CAACC,IAAI,CAAC,SAASH,MAAMA,CAAAI,IAAA,EAAuC;EAAA,IAApCC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;EAClE,oBACIX,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAAAb,MAAA,CAAAY,OAAA,CAAAE,QAAA,QACK,CAACJ,SAAS,IAAI,EAAE,EAAEK,GAAG,CAAC,UAACC,QAAQ,EAAEC,KAAK;IAAA,oBACnCjB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACV,SAAA,CAAAe,QAAQ;MAACC,GAAG,EAAEF,KAAM;MAACG,GAAG,EAAEJ;IAAS,CAAE,CAAC;EAAA,CAC1C,CAAC,EACDL,QAAQ,gBAAGX,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACT,QAAA,CAAAiB,OAAO,QAAEV,QAAkB,CAAC,GAAG,IAC9C,CAAC;AAEX,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Provider","Plugins","Plugin","memo","providers","children","createElement","Fragment","map","provider","index","key","hoc"],"sources":["Plugin.tsx"],"sourcesContent":["import React from \"react\";\nimport { Provider } from \"./Provider\";\nimport { Plugins } from \"./Plugins\";\nimport { GenericComponent, Decorator } from \"@webiny/react-composition\";\n\ninterface PluginProps {\n providers?: Decorator<GenericComponent>[];\n children?: React.ReactNode;\n}\n\nexport const Plugin = React.memo(function Plugin({ providers, children }: PluginProps) {\n return (\n <>\n {(providers || []).map((provider, index) => (\n <Provider key={index} hoc={provider} />\n ))}\n {children ? <Plugins>{children}</Plugins> : null}\n </>\n );\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ;AACjB,SAASC,OAAO;AAQhB,OAAO,MAAMC,MAAM,gBAAGH,KAAK,CAACI,IAAI,CAAC,SAASD,MAAMA,CAAC;EAAEE,SAAS;EAAEC;AAAsB,CAAC,EAAE;EACnF,oBACIN,KAAA,CAAAO,aAAA,CAAAP,KAAA,CAAAQ,QAAA,QACK,CAACH,SAAS,IAAI,EAAE,EAAEI,GAAG,CAAC,CAACC,QAAQ,EAAEC,KAAK,kBACnCX,KAAA,CAAAO,aAAA,CAACN,QAAQ;IAACW,GAAG,EAAED,KAAM;IAACE,GAAG,EAAEH;EAAS,CAAE,CACzC,CAAC,EACDJ,QAAQ,gBAAGN,KAAA,CAAAO,aAAA,CAACL,OAAO,QAAEI,QAAkB,CAAC,GAAG,IAC9C,CAAC;AAEX,CAAC,CAAC","ignoreList":[]}