From ba7ca217eddc0e9aa0106b1b1829aa5721eca1c5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:23:19 +0000 Subject: [PATCH] deploy: a80eb3a4f3ac5aa44eb2218e752175db34fdc129 --- 404.html | 10 +-- advanced-features/dynamic-imports/index.html | 10 +-- .../ima_core.AbstractController/index.html | 44 ++++++------ .../ima_core.AbstractExecution/index.html | 16 ++--- .../ima_core.AbstractExtension/index.html | 34 +++++----- .../ima_core.AbstractPageManager/index.html | 46 ++++++------- api/classes/ima_core.AbstractRoute/index.html | 36 +++++----- .../ima_core.AbstractRouter/index.html | 56 +++++++-------- api/classes/ima_core.Bootstrap/index.html | 24 +++---- api/classes/ima_core.Cache/index.html | 26 +++---- api/classes/ima_core.CacheEntry/index.html | 16 ++--- api/classes/ima_core.CacheFactory/index.html | 10 +-- api/classes/ima_core.CacheImpl/index.html | 28 ++++---- api/classes/ima_core.CancelError/index.html | 18 ++--- .../ima_core.ClientPageManager/index.html | 60 ++++++++-------- api/classes/ima_core.ClientRouter/index.html | 68 +++++++++---------- api/classes/ima_core.ClientWindow/index.html | 42 ++++++------ .../ima_core.ComponentUtils/index.html | 10 +-- api/classes/ima_core.Controller/index.html | 42 ++++++------ .../ima_core.ControllerDecorator/index.html | 44 ++++++------ api/classes/ima_core.CookieStorage/index.html | 38 +++++------ api/classes/ima_core.Dictionary/index.html | 18 ++--- api/classes/ima_core.Dispatcher/index.html | 22 +++--- .../ima_core.DispatcherImpl/index.html | 26 +++---- api/classes/ima_core.DynamicRoute/index.html | 36 +++++----- api/classes/ima_core.Entry/index.html | 18 ++--- api/classes/ima_core.Error/index.html | 18 ++--- api/classes/ima_core.EventBus/index.html | 20 +++--- api/classes/ima_core.EventBusImpl/index.html | 26 +++---- api/classes/ima_core.Execution/index.html | 14 ++-- api/classes/ima_core.Extension/index.html | 36 +++++----- api/classes/ima_core.GenericError/index.html | 18 ++--- api/classes/ima_core.HttpAgent/index.html | 26 +++---- api/classes/ima_core.HttpAgentImpl/index.html | 48 ++++++------- api/classes/ima_core.HttpProxy/index.html | 38 +++++------ api/classes/ima_core.MapStorage/index.html | 22 +++--- .../index.html | 22 +++--- api/classes/ima_core.MetaManager/index.html | 26 +++---- .../ima_core.MetaManagerImpl/index.html | 24 +++---- api/classes/ima_core.Namespace/index.html | 16 ++--- .../ima_core.ObjectContainer/index.html | 50 +++++++------- api/classes/ima_core.Observable/index.html | 22 ++++++ .../ima_core.ObservableImpl/index.html | 23 +++++++ api/classes/ima_core.PageFactory/index.html | 12 ++-- api/classes/ima_core.PageHandler/index.html | 16 ++--- .../ima_core.PageHandlerRegistry/index.html | 14 ++-- api/classes/ima_core.PageManager/index.html | 16 ++--- .../ima_core.PageMetaHandler/index.html | 16 ++--- .../ima_core.PageNavigationHandler/index.html | 20 +++--- api/classes/ima_core.PageRenderer/index.html | 14 ++-- .../ima_core.PageStateManager/index.html | 18 ++--- .../index.html | 20 +++--- .../ima_core.PageStateManagerImpl/index.html | 20 +++--- api/classes/ima_core.PluginLoader/index.html | 14 ++-- api/classes/ima_core.Request/index.html | 14 ++-- api/classes/ima_core.Response/index.html | 16 ++--- api/classes/ima_core.RouteFactory/index.html | 10 +-- api/classes/ima_core.Router/index.html | 38 +++++------ api/classes/ima_core.SerialBatch/index.html | 16 ++--- .../ima_core.ServerPageManager/index.html | 46 ++++++------- api/classes/ima_core.ServerRouter/index.html | 54 +++++++-------- api/classes/ima_core.ServerWindow/index.html | 42 ++++++------ .../ima_core.SessionMapStorage/index.html | 22 +++--- .../ima_core.SessionStorage/index.html | 22 +++--- api/classes/ima_core.StaticRoute/index.html | 44 ++++++------ api/classes/ima_core.Storage/index.html | 22 +++--- .../ima_core.UrlTransformer/index.html | 14 ++-- .../ima_core.WeakMapStorage/index.html | 22 +++--- api/classes/ima_core.Window/index.html | 42 ++++++------ api/classes/ima_dev_utils.Logger/index.html | 12 ++-- .../index.html | 22 +++--- .../index.html | 22 +++--- .../index.html | 16 ++--- .../index.html | 18 ++--- .../index.html | 14 ++-- .../index.html | 12 ++-- .../index.html | 20 +++--- api/enums/ima_core.ActionTypes/index.html | 10 +-- api/enums/ima_core.BindingState/index.html | 14 ++-- api/enums/ima_core.HttpStatusCode/index.html | 10 +-- api/enums/ima_core.RendererEvents/index.html | 16 ++--- api/enums/ima_core.RendererTypes/index.html | 10 +-- api/enums/ima_core.RouteNames/index.html | 12 ++-- api/enums/ima_core.RouterEvents/index.html | 16 ++--- api/enums/ima_core.StateEvents/index.html | 12 ++-- api/index.html | 10 +-- api/interfaces/ima_cli.ImaCliArgs/index.html | 10 +-- .../ima_cli.ImaCliPlugin/index.html | 16 ++--- .../index.html | 10 +-- .../ima_core.AppEnvironment/index.html | 10 +-- api/interfaces/ima_core.BootConfig/index.html | 10 +-- .../ima_core.BootServices/index.html | 10 +-- .../ima_core.DictionaryMap/index.html | 10 +-- .../ima_core.DispatcherEventsMap/index.html | 10 +-- .../ima_core.Environment/index.html | 10 +-- .../ima_core.GlobalImaObject/index.html | 10 +-- .../index.html | 10 +-- .../ima_core.ImaRequestInit/index.html | 10 +-- .../ima_core.InitAppConfig/index.html | 10 +-- .../ima_core.InitImaConfig/index.html | 10 +-- .../ima_core.InitPluginConfig/index.html | 10 +-- api/interfaces/ima_core.Manifest/index.html | 10 +-- .../ima_core.ManifestAsset/index.html | 10 +-- api/interfaces/ima_core.OCAliasMap/index.html | 10 +-- api/interfaces/ima_core.PageAction/index.html | 10 +-- .../ima_core.PageRendererSettings/index.html | 10 +-- api/interfaces/ima_core.Resources/index.html | 10 +-- .../ima_core.RouteAction/index.html | 10 +-- .../ima_core.RouteFactoryOptions/index.html | 10 +-- .../ima_core.RouteLocals/index.html | 10 +-- .../ima_core.RouteOptions/index.html | 10 +-- api/interfaces/ima_core.Settings/index.html | 10 +-- api/interfaces/ima_core.Utils/index.html | 10 +-- .../ima_core.WindowCustomEventsMap/index.html | 10 +-- .../ima_dev_utils.CompileError/index.html | 10 +-- .../ima_dev_utils.FragmentLine/index.html | 10 +-- .../ima_dev_utils.LoggerOptions/index.html | 10 +-- .../ima_plugin_cli.Context/index.html | 10 +-- .../ima_plugin_cli.ImaPluginConfig/index.html | 10 +-- .../ima_plugin_cli.PipeContext/index.html | 10 +-- .../ima_plugin_cli.Source/index.html | 10 +-- .../index.html | 10 +-- .../index.html | 10 +-- .../index.html | 20 +++--- .../index.html | 10 +-- .../index.html | 10 +-- api/modules/ima_cli/index.html | 20 +++--- api/modules/ima_core/index.html | 14 ++-- api/modules/ima_dev_utils/index.html | 26 +++---- api/modules/ima_plugin_cli/index.html | 12 ++-- .../ima_react_page_renderer/index.html | 30 ++++---- ...c3ad9.48e89701.js => 01fc3ad9.f7b373ff.js} | 2 +- assets/js/046a2c8d.83c92fd3.js | 1 - assets/js/046a2c8d.9dd7210f.js | 1 + ...d9a97.91f20180.js => 087d9a97.5f47faf8.js} | 2 +- ...5269d.4e8a62e3.js => 0915269d.619b7005.js} | 2 +- ...a494b.68e30ef0.js => 094a494b.8af801ae.js} | 2 +- ...04565.4dbe4cf2.js => 0b304565.7e3685a6.js} | 2 +- ...97735.12154425.js => 0b497735.bdb9f3e1.js} | 2 +- ...684f2.d0a36e5f.js => 0f7684f2.b3f4ca86.js} | 2 +- ...127c8.b47ef8b0.js => 106127c8.d7e5cf06.js} | 2 +- ...17864.29d82948.js => 10617864.d4dee5d5.js} | 2 +- ...88b42.8d994eab.js => 10a88b42.0008582e.js} | 2 +- ...85a35.a093f164.js => 10f85a35.67d5e5e7.js} | 2 +- ...940f3.236d91f1.js => 12a940f3.f34f637c.js} | 2 +- ...12aaf.8b0a566a.js => 13512aaf.777e67b4.js} | 2 +- ...2a5d9.054768ad.js => 1352a5d9.72cae4f2.js} | 2 +- ...b6e84.76752e5e.js => 151b6e84.0ef63d71.js} | 2 +- ...c616c.1d743e4a.js => 153c616c.133e907a.js} | 2 +- assets/js/162a65f7.6823923a.js | 1 - assets/js/162a65f7.820b695f.js | 1 + ...eba69.e08cb02b.js => 16feba69.1f2318be.js} | 2 +- ...a1c5e.e9f7e908.js => 18ba1c5e.cfbb1091.js} | 2 +- ...c90c3.4fa629f3.js => 192c90c3.9b854362.js} | 2 +- ...6f9c3.58897fdb.js => 1ae6f9c3.24aef780.js} | 2 +- ...9d490.8f656932.js => 1ae9d490.bb87d518.js} | 2 +- assets/js/1ba2ef78.82dfcd56.js | 1 + assets/js/1ba2ef78.c2c21164.js | 1 - assets/js/1bd618df.8213e9cc.js | 1 - assets/js/1bd618df.b8c27984.js | 1 + ...50b43.57f1a0a4.js => 1d150b43.f5fd4582.js} | 2 +- assets/js/201713f2.0b71da4d.js | 1 - assets/js/201713f2.aa2aab5e.js | 1 + ...e3b5d.3bf9aa05.js => 212e3b5d.ef391f40.js} | 2 +- ...956d8.30cf7083.js => 214956d8.8187daa0.js} | 2 +- assets/js/21ee5e18.5389ec9a.js | 1 + assets/js/21ee5e18.743c6d14.js | 1 - assets/js/23f47465.3c0d0cae.js | 1 + assets/js/23f47465.ce7fea0c.js | 1 - assets/js/25accc40.713a0f48.js | 1 + assets/js/25accc40.8b4714d2.js | 1 - assets/js/25aeb21c.4e3c9f61.js | 1 - assets/js/25aeb21c.d3bd7fbb.js | 1 + ...3d74a.7f770a40.js => 27a3d74a.c2f94954.js} | 2 +- ...4c996.db5c3515.js => 27b4c996.895ab122.js} | 2 +- assets/js/284c0bdc.2ec5055e.js | 1 - assets/js/284c0bdc.5087c7c5.js | 1 + ...3167a.5f8dadf2.js => 2c83167a.7ad9c4f6.js} | 2 +- ...52c80.3343b3e4.js => 2ca52c80.39f587d7.js} | 2 +- ...5e39d.2fd20775.js => 2e35e39d.e0cea43d.js} | 2 +- ...e5d09.dd5c4254.js => 2ece5d09.31114042.js} | 2 +- assets/js/2fa7fbb9.3732a372.js | 1 + assets/js/2fa7fbb9.96de13a2.js | 1 - ...3cb5b.673ac379.js => 30c3cb5b.2acd37db.js} | 2 +- ...9f580.15649ff4.js => 3149f580.e6982776.js} | 2 +- ...fbd12.6bda35be.js => 321fbd12.d336d4cd.js} | 2 +- assets/js/327389ac.7cc3ec04.js | 1 - assets/js/327389ac.e67cd381.js | 1 + ...aa04a.af50d9c6.js => 327aa04a.83f660dd.js} | 2 +- assets/js/33fd58a6.3dd68c23.js | 1 + assets/js/33fd58a6.511ceca8.js | 1 - ...0d364.c3008327.js => 3410d364.a61f3488.js} | 2 +- ...4631c.7336bedd.js => 3834631c.cf5fd2b7.js} | 2 +- assets/js/3c01549e.ddfe6095.js | 1 + assets/js/3c01549e.f014327e.js | 1 - ...0fb45.ccc99aeb.js => 3c40fb45.41f170f4.js} | 2 +- ...1a119.946285fc.js => 3fb1a119.f6129bd0.js} | 2 +- ...a1cae.0fb7c312.js => 418a1cae.6b6e7b4f.js} | 2 +- ...e0be8.4691a86f.js => 42be0be8.e3fa45ca.js} | 2 +- ...e6e8a.81a75bcb.js => 435e6e8a.1d935d45.js} | 2 +- ...f4fdc.722ddd03.js => 44cf4fdc.612616ca.js} | 2 +- ...185c2.0c2d3f18.js => 45e185c2.63608b5e.js} | 2 +- ...e744b.ed649d5e.js => 46be744b.bdda4ad4.js} | 2 +- ...a916d.b5a087a9.js => 487a916d.15af49b2.js} | 2 +- ...92cf8.e87ea8f3.js => 48d92cf8.a49855c9.js} | 2 +- ...a096e.13b4462b.js => 48fa096e.cdd47197.js} | 2 +- ...7765f.4046c2eb.js => 4a07765f.4748f13d.js} | 2 +- assets/js/4cabad03.2e5596af.js | 1 - assets/js/4cabad03.c656339c.js | 1 + ...af51b.dce70658.js => 4d5af51b.3941b57c.js} | 2 +- assets/js/506f4e3c.658a0cc9.js | 1 + assets/js/506f4e3c.ca93b674.js | 1 - assets/js/50f70a8b.bedec8c9.js | 1 - assets/js/50f70a8b.ec019fa8.js | 1 + ...a1f42.4b6d24e5.js => 525a1f42.ea3cdf69.js} | 2 +- assets/js/53ddc8eb.3b8ed8d9.js | 1 - assets/js/53ddc8eb.f29181d2.js | 1 + ...1ed5c.5ce40059.js => 5401ed5c.9f454b85.js} | 2 +- assets/js/54d95e21.683f3f34.js | 1 - assets/js/54d95e21.c72266d4.js | 1 + assets/js/54f60d95.45d832a1.js | 1 - assets/js/54f60d95.e2c8813a.js | 1 + ...22005.e075217d.js => 56922005.c4932a8f.js} | 2 +- ...07ec0.27b7f0dc.js => 57a07ec0.e77f78fa.js} | 2 +- assets/js/585f1245.7df33555.js | 1 - assets/js/585f1245.c6ddb575.js | 1 + ...9decf.43156a1e.js => 59e9decf.5ad5b88a.js} | 2 +- ...5c8af.e551b971.js => 5dc5c8af.9b9a07f3.js} | 2 +- ...d82a6.e3a4b031.js => 5e7d82a6.8a35a5ca.js} | 2 +- ...9708e.5089e196.js => 6089708e.cd36eb4f.js} | 2 +- ...14e81.5f223598.js => 61e14e81.2c11cc29.js} | 2 +- ...ed45c.aadc8c8d.js => 63ced45c.6bd46436.js} | 2 +- ...0cedf.e553d3f7.js => 6520cedf.e3955084.js} | 2 +- assets/js/6527a706.42feaa25.js | 1 - assets/js/6527a706.996bb45c.js | 1 + assets/js/658a263b.1845f8fd.js | 1 - assets/js/658a263b.a93587ee.js | 1 + ...9b354.fca1844f.js => 6669b354.279b8b2d.js} | 2 +- ...e0ef1.bd758e92.js => 67be0ef1.29f3a83b.js} | 2 +- ...04688.eb709352.js => 67f04688.bd2f6982.js} | 2 +- assets/js/68d1a169.737dba9a.js | 1 + assets/js/68d1a169.76c1479b.js | 1 - assets/js/6a7c6930.a23f34b6.js | 1 - assets/js/6a7c6930.b12b30c7.js | 1 + assets/js/6ae61f9d.80f6873b.js | 1 + assets/js/6ae61f9d.fdceacc4.js | 1 - ...56cb1.6ad8921b.js => 6af56cb1.51ec6bfd.js} | 2 +- ...b427d.96926ed3.js => 6b2b427d.6fd5bdca.js} | 2 +- ...f6b59.08bd78f4.js => 6bff6b59.fd55ee21.js} | 2 +- ...adff3.e0932500.js => 6dfadff3.e0a2cb88.js} | 2 +- ...688a7.05272363.js => 6f7688a7.58c3cf80.js} | 2 +- ...b71fd.ac85b9a4.js => 70db71fd.3f42cee8.js} | 2 +- ...9fb71.ad008919.js => 70e9fb71.63a0463a.js} | 2 +- assets/js/7132be39.223fa34d.js | 1 + assets/js/7132be39.75943184.js | 1 - ...309aa.5a866c6d.js => 72a309aa.289cc65b.js} | 2 +- assets/js/7325f36b.3933ab78.js | 1 + ...0682d.f1fd3bff.js => 7500682d.d1b80397.js} | 2 +- ...ee4a1.7e07f0a2.js => 755ee4a1.cf8516d9.js} | 2 +- assets/js/798d67f4.3bfadcb8.js | 1 - assets/js/798d67f4.855e0730.js | 1 + ...7958b.99fb7d72.js => 7af7958b.ab54fed9.js} | 2 +- ...f5bb0.d687c0f2.js => 7c2f5bb0.7ee300fd.js} | 2 +- ...b2b4a.b6ef231e.js => 7dab2b4a.4b37efc6.js} | 2 +- ...384b8.aa7306b1.js => 805384b8.fde80979.js} | 2 +- ...07132.0926249b.js => 81d07132.a9c78b95.js} | 2 +- assets/js/82fa5401.395962b1.js | 1 + assets/js/82fa5401.e7a88ca3.js | 1 - assets/js/83bd1dfb.1212c8d9.js | 1 + assets/js/83bd1dfb.6ef31379.js | 1 - ...0a767.a14868fe.js => 83e0a767.1937aef5.js} | 2 +- assets/js/87f53564.1f8e568e.js | 1 - assets/js/87f53564.35a9b178.js | 1 + ...bb129.e96cd6a1.js => 8c1bb129.9f8766d0.js} | 2 +- assets/js/8ec7ae24.1bb8d0e3.js | 1 + assets/js/8ec7ae24.ebbae217.js | 1 - ...4501f.783040e2.js => 8ed4501f.0b38d67b.js} | 2 +- ...1837b.20626775.js => 91f1837b.f17785e3.js} | 2 +- ...4f473.9a9d1c31.js => 9294f473.2312e4a8.js} | 2 +- assets/js/934bc43e.0e91f059.js | 1 + assets/js/934bc43e.9d6d2382.js | 1 - assets/js/935f2afb.6e61465d.js | 1 - assets/js/935f2afb.c21cef50.js | 1 + ...ace71.ee03054e.js => 94bace71.1f28a720.js} | 2 +- ...740e1.e7ceecc2.js => 968740e1.24901aa2.js} | 2 +- ...90be4.36af652c.js => 98990be4.5c830325.js} | 2 +- ...ba269.9c58411e.js => 9c0ba269.9de69f7a.js} | 2 +- assets/js/9e3f3c76.7189b824.js | 1 + assets/js/9e3f3c76.9bed117e.js | 1 - ...a7547.7460355e.js => 9e4a7547.bbe407c5.js} | 2 +- ...fc27e.1ed93307.js => 9fdfc27e.b7043e50.js} | 2 +- assets/js/a1fa3683.532b158f.js | 1 - assets/js/a1fa3683.d83799bd.js | 1 + ...3b390.64da824c.js => a2c3b390.00ad6c39.js} | 2 +- assets/js/a3814d4a.1fe83683.js | 1 + assets/js/a3814d4a.9700f520.js | 1 - ...4c21d.b4caf5fb.js => a394c21d.44535ce3.js} | 2 +- ...0e4e4.5639f4eb.js => a570e4e4.bcdef16e.js} | 2 +- ...d7f05.11d541f7.js => a59d7f05.3c8a170c.js} | 2 +- ...c8c5f.12d40a5b.js => a5ac8c5f.153abe7b.js} | 2 +- ...e5842.468bd920.js => ab2e5842.dc31e566.js} | 2 +- ...eb8ed.b8cc6101.js => abceb8ed.28652aad.js} | 2 +- ...ebe99.b61abc2e.js => ac0ebe99.869c0ad0.js} | 2 +- ...b1cf0.cc4c6cdc.js => ac1b1cf0.30b9d6bb.js} | 2 +- ...c0c3a.54eec631.js => aefc0c3a.b96b9bc6.js} | 2 +- assets/js/b03cb8d5.183ed2cb.js | 1 + assets/js/b03cb8d5.aabb79fb.js | 1 - assets/js/b40f4eed.2e86e5e3.js | 1 + assets/js/b40f4eed.8d2c59ee.js | 1 - assets/js/bcef1ffa.ebf18654.js | 1 + ...c20a2.dcf65b12.js => bffc20a2.14e9a284.js} | 2 +- ...8042e.53ae16d6.js => c0d8042e.7bd8c3a2.js} | 2 +- ...312c2.7eb3d3fb.js => c69312c2.7c51add5.js} | 2 +- ...16711.e8797ee7.js => c6f16711.43f59918.js} | 2 +- assets/js/c7fb0ffe.34bf5cf2.js | 1 + assets/js/c7fb0ffe.9c5fdc64.js | 1 - ...a3e0f.dbcb292d.js => cd0a3e0f.9899b78e.js} | 2 +- ...4e9bf.f37fde30.js => cd24e9bf.7cb548b3.js} | 2 +- assets/js/cd4295eb.bee2ec03.js | 1 - assets/js/cd4295eb.cb6bb5ee.js | 1 + ...a063f.19aad09d.js => cdea063f.5e1ea585.js} | 2 +- ...cb426.847c783c.js => cf9cb426.f38fb910.js} | 2 +- assets/js/d0063a96.3e329b28.js | 1 - assets/js/d0063a96.fa3ea921.js | 1 + assets/js/d0a2dc9c.be27c4a3.js | 1 + assets/js/d0a2dc9c.ffb78092.js | 1 - ...37276.857905e4.js => d3f37276.13d506cf.js} | 2 +- ...d36e5.1c10b7ba.js => d5dd36e5.ccb16afd.js} | 2 +- ...67a67.4bc3a2c6.js => d9f67a67.839bb442.js} | 2 +- assets/js/da5c5c21.4f9ae001.js | 1 + assets/js/da5c5c21.c47f7258.js | 1 - ...4485c.06c8cbfd.js => db94485c.01b9de16.js} | 2 +- ...901fe.34086712.js => dc7901fe.550fb9de.js} | 2 +- ...892ed.1e87d7ed.js => deb892ed.cda40341.js} | 2 +- ...953e7.f50bc5e7.js => e06953e7.af028058.js} | 2 +- ...de693.f5de8579.js => e19de693.944f17ad.js} | 2 +- ...ffe8c.bd7e491a.js => e25ffe8c.76fc99c6.js} | 2 +- ...793d2.35eed53c.js => e28793d2.9fde8c18.js} | 2 +- ...4481e.c960d1d5.js => eb04481e.0f2b43d2.js} | 2 +- ...413e1.19f4df4a.js => ec3413e1.f758025a.js} | 2 +- ...e905a.4481c5fa.js => ecde905a.06f64c9a.js} | 2 +- ...b9f24.b570950c.js => f20b9f24.bc75fbac.js} | 2 +- ...9100a.028bc0ee.js => f219100a.a8a5ecef.js} | 2 +- assets/js/f2d0b182.35207f97.js | 1 - assets/js/f2d0b182.f58c2044.js | 1 + assets/js/f33aa945.82c1fc09.js | 1 - assets/js/f33aa945.e9f65453.js | 1 + ...c0fbd.fc0027df.js => f3bc0fbd.fcea1131.js} | 2 +- assets/js/f42f2945.42367e9c.js | 1 - assets/js/f42f2945.d27b6a28.js | 1 + ...95e20.43818b5e.js => f4795e20.11c7c3dc.js} | 2 +- ...7c071.003d498f.js => f747c071.5092de10.js} | 2 +- assets/js/fc65f0be.08654d1e.js | 1 + assets/js/fc65f0be.7b5a0dd7.js | 1 - assets/js/fe1eb9bc.2e278a3f.js | 1 - assets/js/fe1eb9bc.a5c8b6f1.js | 1 + assets/js/main.e3b9e2d2.js | 2 + ...CENSE.txt => main.e3b9e2d2.js.LICENSE.txt} | 0 assets/js/main.f2283cb0.js | 2 - assets/js/runtime~main.0fdc1f96.js | 1 - assets/js/runtime~main.c48c2b2c.js | 1 + .../controller-lifecycle/index.html | 10 +-- basic-features/data-fetching/index.html | 10 +-- basic-features/dictionary/index.html | 10 +-- basic-features/error-handling/index.html | 10 +-- basic-features/events/index.html | 10 +-- basic-features/extensions/index.html | 10 +-- .../handling-scripts-and-styles/index.html | 10 +-- basic-features/object-container/index.html | 10 +-- basic-features/page-manager/index.html | 10 +-- basic-features/page-state/index.html | 10 +-- basic-features/rendering-process/index.html | 10 +-- .../routing/async-routing/index.html | 10 +-- .../routing/dynamic-routes/index.html | 10 +-- .../routing/introduction/index.html | 10 +-- basic-features/routing/middlewares/index.html | 10 +-- .../seo-and-meta-manager/index.html | 10 +-- basic-features/testing/index.html | 10 +-- basic-features/typescript/index.html | 10 +-- .../views-and-components/index.html | 10 +-- cli/additional-features/index.html | 10 +-- cli/advanced-features/index.html | 10 +-- cli/cli-plugins-api/index.html | 10 +-- cli/compiler-features/index.html | 10 +-- cli/ima-config-js/index.html | 10 +-- cli/index.html | 10 +-- cli/plugins/analyze-plugin/index.html | 10 +-- cli/plugins/less-constants-plugin/index.html | 10 +-- cli/plugins/scramble-css-plugin/index.html | 10 +-- contributing/how-to-contribute/index.html | 10 +-- devtools/devtools-introduction/index.html | 10 +-- devtools/devtools-options/index.html | 10 +-- devtools/devtools-ui/index.html | 10 +-- index.html | 10 +-- introduction/configuration/index.html | 10 +-- introduction/getting-started/index.html | 10 +-- migration/migration-0.14.0/index.html | 10 +-- migration/migration-0.15.0/index.html | 10 +-- migration/migration-0.16.0/index.html | 10 +-- migration/migration-17.0.0/index.html | 10 +-- migration/migration-18.0.0/index.html | 10 +-- migration/migration-19.0.0/index.html | 10 +-- plugins/available-plugins/index.html | 10 +-- plugins/plugin-api/index.html | 10 +-- search/index.html | 10 +-- sitemap.xml | 2 +- tutorial/adding-some-state/index.html | 10 +-- tutorial/fetching-data/index.html | 10 +-- tutorial/final-polish/index.html | 10 +-- tutorial/introduction/index.html | 10 +-- tutorial/static-view/index.html | 10 +-- tutorial/writing-posts/index.html | 10 +-- 412 files changed, 1760 insertions(+), 1713 deletions(-) create mode 100644 api/classes/ima_core.Observable/index.html create mode 100644 api/classes/ima_core.ObservableImpl/index.html rename assets/js/{01fc3ad9.48e89701.js => 01fc3ad9.f7b373ff.js} (95%) delete mode 100644 assets/js/046a2c8d.83c92fd3.js create mode 100644 assets/js/046a2c8d.9dd7210f.js rename assets/js/{087d9a97.91f20180.js => 087d9a97.5f47faf8.js} (96%) rename assets/js/{0915269d.4e8a62e3.js => 0915269d.619b7005.js} (96%) rename assets/js/{094a494b.68e30ef0.js => 094a494b.8af801ae.js} (98%) rename assets/js/{0b304565.4dbe4cf2.js => 0b304565.7e3685a6.js} (90%) rename assets/js/{0b497735.12154425.js => 0b497735.bdb9f3e1.js} (99%) rename assets/js/{0f7684f2.d0a36e5f.js => 0f7684f2.b3f4ca86.js} (95%) rename assets/js/{106127c8.b47ef8b0.js => 106127c8.d7e5cf06.js} (95%) rename assets/js/{10617864.29d82948.js => 10617864.d4dee5d5.js} (57%) rename assets/js/{10a88b42.8d994eab.js => 10a88b42.0008582e.js} (97%) rename assets/js/{10f85a35.a093f164.js => 10f85a35.67d5e5e7.js} (97%) rename assets/js/{12a940f3.236d91f1.js => 12a940f3.f34f637c.js} (96%) rename assets/js/{13512aaf.8b0a566a.js => 13512aaf.777e67b4.js} (95%) rename assets/js/{1352a5d9.054768ad.js => 1352a5d9.72cae4f2.js} (60%) rename assets/js/{151b6e84.76752e5e.js => 151b6e84.0ef63d71.js} (99%) rename assets/js/{153c616c.1d743e4a.js => 153c616c.133e907a.js} (98%) delete mode 100644 assets/js/162a65f7.6823923a.js create mode 100644 assets/js/162a65f7.820b695f.js rename assets/js/{16feba69.e08cb02b.js => 16feba69.1f2318be.js} (96%) rename assets/js/{18ba1c5e.e9f7e908.js => 18ba1c5e.cfbb1091.js} (90%) rename assets/js/{192c90c3.4fa629f3.js => 192c90c3.9b854362.js} (96%) rename assets/js/{1ae6f9c3.58897fdb.js => 1ae6f9c3.24aef780.js} (96%) rename assets/js/{1ae9d490.8f656932.js => 1ae9d490.bb87d518.js} (96%) create mode 100644 assets/js/1ba2ef78.82dfcd56.js delete mode 100644 assets/js/1ba2ef78.c2c21164.js delete mode 100644 assets/js/1bd618df.8213e9cc.js create mode 100644 assets/js/1bd618df.b8c27984.js rename assets/js/{1d150b43.57f1a0a4.js => 1d150b43.f5fd4582.js} (96%) delete mode 100644 assets/js/201713f2.0b71da4d.js create mode 100644 assets/js/201713f2.aa2aab5e.js rename assets/js/{212e3b5d.3bf9aa05.js => 212e3b5d.ef391f40.js} (98%) rename assets/js/{214956d8.30cf7083.js => 214956d8.8187daa0.js} (99%) create mode 100644 assets/js/21ee5e18.5389ec9a.js delete mode 100644 assets/js/21ee5e18.743c6d14.js create mode 100644 assets/js/23f47465.3c0d0cae.js delete mode 100644 assets/js/23f47465.ce7fea0c.js create mode 100644 assets/js/25accc40.713a0f48.js delete mode 100644 assets/js/25accc40.8b4714d2.js delete mode 100644 assets/js/25aeb21c.4e3c9f61.js create mode 100644 assets/js/25aeb21c.d3bd7fbb.js rename assets/js/{27a3d74a.7f770a40.js => 27a3d74a.c2f94954.js} (88%) rename assets/js/{27b4c996.db5c3515.js => 27b4c996.895ab122.js} (98%) delete mode 100644 assets/js/284c0bdc.2ec5055e.js create mode 100644 assets/js/284c0bdc.5087c7c5.js rename assets/js/{2c83167a.5f8dadf2.js => 2c83167a.7ad9c4f6.js} (97%) rename assets/js/{2ca52c80.3343b3e4.js => 2ca52c80.39f587d7.js} (96%) rename assets/js/{2e35e39d.2fd20775.js => 2e35e39d.e0cea43d.js} (95%) rename assets/js/{2ece5d09.dd5c4254.js => 2ece5d09.31114042.js} (59%) create mode 100644 assets/js/2fa7fbb9.3732a372.js delete mode 100644 assets/js/2fa7fbb9.96de13a2.js rename assets/js/{30c3cb5b.673ac379.js => 30c3cb5b.2acd37db.js} (98%) rename assets/js/{3149f580.15649ff4.js => 3149f580.e6982776.js} (96%) rename assets/js/{321fbd12.6bda35be.js => 321fbd12.d336d4cd.js} (95%) delete mode 100644 assets/js/327389ac.7cc3ec04.js create mode 100644 assets/js/327389ac.e67cd381.js rename assets/js/{327aa04a.af50d9c6.js => 327aa04a.83f660dd.js} (99%) create mode 100644 assets/js/33fd58a6.3dd68c23.js delete mode 100644 assets/js/33fd58a6.511ceca8.js rename assets/js/{3410d364.c3008327.js => 3410d364.a61f3488.js} (98%) rename assets/js/{3834631c.7336bedd.js => 3834631c.cf5fd2b7.js} (97%) create mode 100644 assets/js/3c01549e.ddfe6095.js delete mode 100644 assets/js/3c01549e.f014327e.js rename assets/js/{3c40fb45.ccc99aeb.js => 3c40fb45.41f170f4.js} (96%) rename assets/js/{3fb1a119.946285fc.js => 3fb1a119.f6129bd0.js} (96%) rename assets/js/{418a1cae.0fb7c312.js => 418a1cae.6b6e7b4f.js} (99%) rename assets/js/{42be0be8.4691a86f.js => 42be0be8.e3fa45ca.js} (95%) rename assets/js/{435e6e8a.81a75bcb.js => 435e6e8a.1d935d45.js} (99%) rename assets/js/{44cf4fdc.722ddd03.js => 44cf4fdc.612616ca.js} (94%) rename assets/js/{45e185c2.0c2d3f18.js => 45e185c2.63608b5e.js} (97%) rename assets/js/{46be744b.ed649d5e.js => 46be744b.bdda4ad4.js} (96%) rename assets/js/{487a916d.b5a087a9.js => 487a916d.15af49b2.js} (66%) rename assets/js/{48d92cf8.e87ea8f3.js => 48d92cf8.a49855c9.js} (98%) rename assets/js/{48fa096e.13b4462b.js => 48fa096e.cdd47197.js} (97%) rename assets/js/{4a07765f.4046c2eb.js => 4a07765f.4748f13d.js} (95%) delete mode 100644 assets/js/4cabad03.2e5596af.js create mode 100644 assets/js/4cabad03.c656339c.js rename assets/js/{4d5af51b.dce70658.js => 4d5af51b.3941b57c.js} (96%) create mode 100644 assets/js/506f4e3c.658a0cc9.js delete mode 100644 assets/js/506f4e3c.ca93b674.js delete mode 100644 assets/js/50f70a8b.bedec8c9.js create mode 100644 assets/js/50f70a8b.ec019fa8.js rename assets/js/{525a1f42.4b6d24e5.js => 525a1f42.ea3cdf69.js} (96%) delete mode 100644 assets/js/53ddc8eb.3b8ed8d9.js create mode 100644 assets/js/53ddc8eb.f29181d2.js rename assets/js/{5401ed5c.5ce40059.js => 5401ed5c.9f454b85.js} (95%) delete mode 100644 assets/js/54d95e21.683f3f34.js create mode 100644 assets/js/54d95e21.c72266d4.js delete mode 100644 assets/js/54f60d95.45d832a1.js create mode 100644 assets/js/54f60d95.e2c8813a.js rename assets/js/{56922005.e075217d.js => 56922005.c4932a8f.js} (93%) rename assets/js/{57a07ec0.27b7f0dc.js => 57a07ec0.e77f78fa.js} (95%) delete mode 100644 assets/js/585f1245.7df33555.js create mode 100644 assets/js/585f1245.c6ddb575.js rename assets/js/{59e9decf.43156a1e.js => 59e9decf.5ad5b88a.js} (94%) rename assets/js/{5dc5c8af.e551b971.js => 5dc5c8af.9b9a07f3.js} (95%) rename assets/js/{5e7d82a6.e3a4b031.js => 5e7d82a6.8a35a5ca.js} (92%) rename assets/js/{6089708e.5089e196.js => 6089708e.cd36eb4f.js} (97%) rename assets/js/{61e14e81.5f223598.js => 61e14e81.2c11cc29.js} (95%) rename assets/js/{63ced45c.aadc8c8d.js => 63ced45c.6bd46436.js} (97%) rename assets/js/{6520cedf.e553d3f7.js => 6520cedf.e3955084.js} (96%) delete mode 100644 assets/js/6527a706.42feaa25.js create mode 100644 assets/js/6527a706.996bb45c.js delete mode 100644 assets/js/658a263b.1845f8fd.js create mode 100644 assets/js/658a263b.a93587ee.js rename assets/js/{6669b354.fca1844f.js => 6669b354.279b8b2d.js} (97%) rename assets/js/{67be0ef1.bd758e92.js => 67be0ef1.29f3a83b.js} (98%) rename assets/js/{67f04688.eb709352.js => 67f04688.bd2f6982.js} (94%) create mode 100644 assets/js/68d1a169.737dba9a.js delete mode 100644 assets/js/68d1a169.76c1479b.js delete mode 100644 assets/js/6a7c6930.a23f34b6.js create mode 100644 assets/js/6a7c6930.b12b30c7.js create mode 100644 assets/js/6ae61f9d.80f6873b.js delete mode 100644 assets/js/6ae61f9d.fdceacc4.js rename assets/js/{6af56cb1.6ad8921b.js => 6af56cb1.51ec6bfd.js} (96%) rename assets/js/{6b2b427d.96926ed3.js => 6b2b427d.6fd5bdca.js} (97%) rename assets/js/{6bff6b59.08bd78f4.js => 6bff6b59.fd55ee21.js} (96%) rename assets/js/{6dfadff3.e0932500.js => 6dfadff3.e0a2cb88.js} (98%) rename assets/js/{6f7688a7.05272363.js => 6f7688a7.58c3cf80.js} (94%) rename assets/js/{70db71fd.ac85b9a4.js => 70db71fd.3f42cee8.js} (99%) rename assets/js/{70e9fb71.ad008919.js => 70e9fb71.63a0463a.js} (96%) create mode 100644 assets/js/7132be39.223fa34d.js delete mode 100644 assets/js/7132be39.75943184.js rename assets/js/{72a309aa.5a866c6d.js => 72a309aa.289cc65b.js} (97%) create mode 100644 assets/js/7325f36b.3933ab78.js rename assets/js/{7500682d.f1fd3bff.js => 7500682d.d1b80397.js} (98%) rename assets/js/{755ee4a1.7e07f0a2.js => 755ee4a1.cf8516d9.js} (96%) delete mode 100644 assets/js/798d67f4.3bfadcb8.js create mode 100644 assets/js/798d67f4.855e0730.js rename assets/js/{7af7958b.99fb7d72.js => 7af7958b.ab54fed9.js} (87%) rename assets/js/{7c2f5bb0.d687c0f2.js => 7c2f5bb0.7ee300fd.js} (97%) rename assets/js/{7dab2b4a.b6ef231e.js => 7dab2b4a.4b37efc6.js} (81%) rename assets/js/{805384b8.aa7306b1.js => 805384b8.fde80979.js} (92%) rename assets/js/{81d07132.0926249b.js => 81d07132.a9c78b95.js} (96%) create mode 100644 assets/js/82fa5401.395962b1.js delete mode 100644 assets/js/82fa5401.e7a88ca3.js create mode 100644 assets/js/83bd1dfb.1212c8d9.js delete mode 100644 assets/js/83bd1dfb.6ef31379.js rename assets/js/{83e0a767.a14868fe.js => 83e0a767.1937aef5.js} (90%) delete mode 100644 assets/js/87f53564.1f8e568e.js create mode 100644 assets/js/87f53564.35a9b178.js rename assets/js/{8c1bb129.e96cd6a1.js => 8c1bb129.9f8766d0.js} (97%) create mode 100644 assets/js/8ec7ae24.1bb8d0e3.js delete mode 100644 assets/js/8ec7ae24.ebbae217.js rename assets/js/{8ed4501f.783040e2.js => 8ed4501f.0b38d67b.js} (96%) rename assets/js/{91f1837b.20626775.js => 91f1837b.f17785e3.js} (98%) rename assets/js/{9294f473.9a9d1c31.js => 9294f473.2312e4a8.js} (96%) create mode 100644 assets/js/934bc43e.0e91f059.js delete mode 100644 assets/js/934bc43e.9d6d2382.js delete mode 100644 assets/js/935f2afb.6e61465d.js create mode 100644 assets/js/935f2afb.c21cef50.js rename assets/js/{94bace71.ee03054e.js => 94bace71.1f28a720.js} (95%) rename assets/js/{968740e1.e7ceecc2.js => 968740e1.24901aa2.js} (97%) rename assets/js/{98990be4.36af652c.js => 98990be4.5c830325.js} (95%) rename assets/js/{9c0ba269.9c58411e.js => 9c0ba269.9de69f7a.js} (96%) create mode 100644 assets/js/9e3f3c76.7189b824.js delete mode 100644 assets/js/9e3f3c76.9bed117e.js rename assets/js/{9e4a7547.7460355e.js => 9e4a7547.bbe407c5.js} (76%) rename assets/js/{9fdfc27e.1ed93307.js => 9fdfc27e.b7043e50.js} (97%) delete mode 100644 assets/js/a1fa3683.532b158f.js create mode 100644 assets/js/a1fa3683.d83799bd.js rename assets/js/{a2c3b390.64da824c.js => a2c3b390.00ad6c39.js} (97%) create mode 100644 assets/js/a3814d4a.1fe83683.js delete mode 100644 assets/js/a3814d4a.9700f520.js rename assets/js/{a394c21d.b4caf5fb.js => a394c21d.44535ce3.js} (96%) rename assets/js/{a570e4e4.5639f4eb.js => a570e4e4.bcdef16e.js} (94%) rename assets/js/{a59d7f05.11d541f7.js => a59d7f05.3c8a170c.js} (96%) rename assets/js/{a5ac8c5f.12d40a5b.js => a5ac8c5f.153abe7b.js} (96%) rename assets/js/{ab2e5842.468bd920.js => ab2e5842.dc31e566.js} (97%) rename assets/js/{abceb8ed.b8cc6101.js => abceb8ed.28652aad.js} (96%) rename assets/js/{ac0ebe99.b61abc2e.js => ac0ebe99.869c0ad0.js} (96%) rename assets/js/{ac1b1cf0.cc4c6cdc.js => ac1b1cf0.30b9d6bb.js} (96%) rename assets/js/{aefc0c3a.54eec631.js => aefc0c3a.b96b9bc6.js} (99%) create mode 100644 assets/js/b03cb8d5.183ed2cb.js delete mode 100644 assets/js/b03cb8d5.aabb79fb.js create mode 100644 assets/js/b40f4eed.2e86e5e3.js delete mode 100644 assets/js/b40f4eed.8d2c59ee.js create mode 100644 assets/js/bcef1ffa.ebf18654.js rename assets/js/{bffc20a2.dcf65b12.js => bffc20a2.14e9a284.js} (97%) rename assets/js/{c0d8042e.53ae16d6.js => c0d8042e.7bd8c3a2.js} (96%) rename assets/js/{c69312c2.7eb3d3fb.js => c69312c2.7c51add5.js} (97%) rename assets/js/{c6f16711.e8797ee7.js => c6f16711.43f59918.js} (88%) create mode 100644 assets/js/c7fb0ffe.34bf5cf2.js delete mode 100644 assets/js/c7fb0ffe.9c5fdc64.js rename assets/js/{cd0a3e0f.dbcb292d.js => cd0a3e0f.9899b78e.js} (95%) rename assets/js/{cd24e9bf.f37fde30.js => cd24e9bf.7cb548b3.js} (96%) delete mode 100644 assets/js/cd4295eb.bee2ec03.js create mode 100644 assets/js/cd4295eb.cb6bb5ee.js rename assets/js/{cdea063f.19aad09d.js => cdea063f.5e1ea585.js} (97%) rename assets/js/{cf9cb426.847c783c.js => cf9cb426.f38fb910.js} (97%) delete mode 100644 assets/js/d0063a96.3e329b28.js create mode 100644 assets/js/d0063a96.fa3ea921.js create mode 100644 assets/js/d0a2dc9c.be27c4a3.js delete mode 100644 assets/js/d0a2dc9c.ffb78092.js rename assets/js/{d3f37276.857905e4.js => d3f37276.13d506cf.js} (95%) rename assets/js/{d5dd36e5.1c10b7ba.js => d5dd36e5.ccb16afd.js} (96%) rename assets/js/{d9f67a67.4bc3a2c6.js => d9f67a67.839bb442.js} (98%) create mode 100644 assets/js/da5c5c21.4f9ae001.js delete mode 100644 assets/js/da5c5c21.c47f7258.js rename assets/js/{db94485c.06c8cbfd.js => db94485c.01b9de16.js} (96%) rename assets/js/{dc7901fe.34086712.js => dc7901fe.550fb9de.js} (96%) rename assets/js/{deb892ed.1e87d7ed.js => deb892ed.cda40341.js} (96%) rename assets/js/{e06953e7.f50bc5e7.js => e06953e7.af028058.js} (96%) rename assets/js/{e19de693.f5de8579.js => e19de693.944f17ad.js} (94%) rename assets/js/{e25ffe8c.bd7e491a.js => e25ffe8c.76fc99c6.js} (62%) rename assets/js/{e28793d2.35eed53c.js => e28793d2.9fde8c18.js} (96%) rename assets/js/{eb04481e.c960d1d5.js => eb04481e.0f2b43d2.js} (98%) rename assets/js/{ec3413e1.19f4df4a.js => ec3413e1.f758025a.js} (96%) rename assets/js/{ecde905a.4481c5fa.js => ecde905a.06f64c9a.js} (98%) rename assets/js/{f20b9f24.b570950c.js => f20b9f24.bc75fbac.js} (96%) rename assets/js/{f219100a.028bc0ee.js => f219100a.a8a5ecef.js} (92%) delete mode 100644 assets/js/f2d0b182.35207f97.js create mode 100644 assets/js/f2d0b182.f58c2044.js delete mode 100644 assets/js/f33aa945.82c1fc09.js create mode 100644 assets/js/f33aa945.e9f65453.js rename assets/js/{f3bc0fbd.fc0027df.js => f3bc0fbd.fcea1131.js} (97%) delete mode 100644 assets/js/f42f2945.42367e9c.js create mode 100644 assets/js/f42f2945.d27b6a28.js rename assets/js/{f4795e20.43818b5e.js => f4795e20.11c7c3dc.js} (96%) rename assets/js/{f747c071.003d498f.js => f747c071.5092de10.js} (61%) create mode 100644 assets/js/fc65f0be.08654d1e.js delete mode 100644 assets/js/fc65f0be.7b5a0dd7.js delete mode 100644 assets/js/fe1eb9bc.2e278a3f.js create mode 100644 assets/js/fe1eb9bc.a5c8b6f1.js create mode 100644 assets/js/main.e3b9e2d2.js rename assets/js/{main.f2283cb0.js.LICENSE.txt => main.e3b9e2d2.js.LICENSE.txt} (100%) delete mode 100644 assets/js/main.f2283cb0.js delete mode 100644 assets/js/runtime~main.0fdc1f96.js create mode 100644 assets/js/runtime~main.c48c2b2c.js diff --git a/404.html b/404.html index 66d311e6d7..acd3b865b2 100644 --- a/404.html +++ b/404.html @@ -4,13 +4,13 @@ Page Not Found | IMA.js - - + +
-
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

+ + \ No newline at end of file diff --git a/advanced-features/dynamic-imports/index.html b/advanced-features/dynamic-imports/index.html index 902c85d205..87a6b54eb2 100644 --- a/advanced-features/dynamic-imports/index.html +++ b/advanced-features/dynamic-imports/index.html @@ -4,13 +4,13 @@ Dynamic imports | IMA.js - - + +
-
Skip to main content

Dynamic imports

Dynamic imports

Preloading and prefetching

Since we're using webpack, to built the application, it already has support for inline directives for preloading and prefetching. Using this comment:

import(/* webpackPrefetch: true */ './path/to/LoginModal.js');

will result in<link rel="prefetch" href="login-modal-chunk.js"> being appended in the head of the page. For more information about

React suspense

Suspense currently doesn't support SSR. However you can use it to load client-side react components. Don't forget to add proper handlers so it only gets rendered on client, since SSR will result in an hydratation error.

- - +
Skip to main content

Dynamic imports

Dynamic imports

Preloading and prefetching

Since we're using webpack, to built the application, it already has support for inline directives for preloading and prefetching. Using this comment:

import(/* webpackPrefetch: true */ './path/to/LoginModal.js');

will result in<link rel="prefetch" href="login-modal-chunk.js"> being appended in the head of the page. For more information about

React suspense

Suspense currently doesn't support SSR. However you can use it to load client-side react components. Don't forget to add proper handlers so it only gets rendered on client, since SSR will result in an hydratation error.

+ + \ No newline at end of file diff --git a/api/classes/ima_core.AbstractController/index.html b/api/classes/ima_core.AbstractController/index.html index c882fa2b3c..9642b09a34 100644 --- a/api/classes/ima_core.AbstractController/index.html +++ b/api/classes/ima_core.AbstractController/index.html @@ -4,38 +4,38 @@ Class: AbstractController<S, R, SS> | IMA.js - - + +
-
Skip to main content

Class: AbstractController<S, R, SS>

@ima/core.AbstractController

Basic implementation of the Controller interface, providing the -default implementation of the most of the API.

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends S = S

Hierarchy

Constructors

constructor

new AbstractController<S, R, SS>()

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends PageState = S

Overrides

Controller.constructor

Defined in

packages/core/src/controller/AbstractController.ts:41

Properties

_extensions

Protected _extensions: Map<keyof OCAliasMap | Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>>, Extension<PageState, RouteParams, PageState>>

Defined in

packages/core/src/controller/AbstractController.ts:20


_pageStateManager

Protected Optional _pageStateManager: PageStateManager<SS>

Defined in

packages/core/src/controller/AbstractController.ts:19


params

params: R

The route parameters extracted from the current route. This field is +

Class: AbstractController<S, R, SS>

@ima/core.AbstractController

Basic implementation of the Controller interface, providing the +default implementation of the most of the API.

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends S = S

Hierarchy

Constructors

constructor

new AbstractController<S, R, SS>()

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends PageState = S

Overrides

Controller.constructor

Defined in

packages/core/src/controller/AbstractController.ts:41

Properties

_extensions

Protected _extensions: Map<keyof OCAliasMap | Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>>, Extension<PageState, RouteParams, PageState>>

Defined in

packages/core/src/controller/AbstractController.ts:20


_pageStateManager

Protected Optional _pageStateManager: PageStateManager<SS>

Defined in

packages/core/src/controller/AbstractController.ts:19


params

params: R

The route parameters extracted from the current route. This field is set externally by IMA right before the init or the -update method is called.

Defined in

packages/core/src/controller/AbstractController.ts:35


status

status: number = 200

The HTTP response code to send to the client.

Defined in

packages/core/src/controller/AbstractController.ts:29


$dependencies

Static $dependencies: Dependencies

Overrides

Controller.$dependencies

Defined in

packages/core/src/controller/AbstractController.ts:38


$extensions

Static Optional $extensions: Dependencies<Extension<any, any, any>>

Overrides

Controller.$extensions

Defined in

packages/core/src/controller/AbstractController.ts:39


$name

Static Optional $name: string

Overrides

Controller.$name

Defined in

packages/core/src/controller/AbstractController.ts:37

Methods

activate

activate(): void | Promise<void>

Callback for activating the controller in the UI. This is the last +update method is called.

Defined in

packages/core/src/controller/AbstractController.ts:35


status

status: number = 200

The HTTP response code to send to the client.

Defined in

packages/core/src/controller/AbstractController.ts:29


$dependencies

Static $dependencies: Dependencies

Overrides

Controller.$dependencies

Defined in

packages/core/src/controller/AbstractController.ts:38


$extensions

Static Optional $extensions: Dependencies<Extension<any, any, any>>

Overrides

Controller.$extensions

Defined in

packages/core/src/controller/AbstractController.ts:39


$name

Static Optional $name: string

Overrides

Controller.$name

Defined in

packages/core/src/controller/AbstractController.ts:37

Methods

activate

activate(): void | Promise<void>

Callback for activating the controller in the UI. This is the last method invoked during controller initialization, called after all the promises returned from the load method have been resolved and the controller has configured the meta manager.

The controller may register any React and DOM event listeners in this method. The controller may start receiving event bus event after this -method completes.

Returns

void | Promise<void>

Inherited from

Controller.activate

Defined in

packages/core/src/controller/Controller.ts:84


addExtension

addExtension(extension, extensionInstance?): void

Adds the provided extension to this controller. All extensions should be +method completes.

Returns

void | Promise<void>

Inherited from

Controller.activate

Defined in

packages/core/src/controller/Controller.ts:84


addExtension

addExtension(extension, extensionInstance?): void

Adds the provided extension to this controller. All extensions should be added to the controller before the init method is -invoked.

Parameters

NameType
extensionkeyof OCAliasMap | Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>> | Extension<PageState, RouteParams, PageState>
extensionInstance?Extension<PageState, RouteParams, PageState>

Returns

void

Overrides

Controller.addExtension

Defined in

packages/core/src/controller/AbstractController.ts:95


beginStateTransaction

beginStateTransaction(): void

Starts queueing state patches off the controller state. While the transaction +invoked.

Parameters

NameType
extensionkeyof OCAliasMap | Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>> | Extension<PageState, RouteParams, PageState>
extensionInstance?Extension<PageState, RouteParams, PageState>

Returns

void

Overrides

Controller.addExtension

Defined in

packages/core/src/controller/AbstractController.ts:95


beginStateTransaction

beginStateTransaction(): void

Starts queueing state patches off the controller state. While the transaction is active every setState call has no effect on the current state.

Note that call to getState after the transaction has begun will -return state as it was before the transaction.

Returns

void

Overrides

Controller.beginStateTransaction

Defined in

packages/core/src/controller/AbstractController.ts:68


cancelStateTransaction

cancelStateTransaction(): void

Cancels ongoing state transaction. Uncommitted state changes are lost.

Returns

void

Overrides

Controller.cancelStateTransaction

Defined in

packages/core/src/controller/AbstractController.ts:86


commitStateTransaction

commitStateTransaction(): void

Applies queued state patches to the controller state. All patches are squashed -and applied with one setState call.

Returns

void

Overrides

Controller.commitStateTransaction

Defined in

packages/core/src/controller/AbstractController.ts:77


deactivate

deactivate(): void | Promise<void>

Callback for deactivating the controller in the UI. This is the first +return state as it was before the transaction.

Returns

void

Overrides

Controller.beginStateTransaction

Defined in

packages/core/src/controller/AbstractController.ts:68


cancelStateTransaction

cancelStateTransaction(): void

Cancels ongoing state transaction. Uncommitted state changes are lost.

Returns

void

Overrides

Controller.cancelStateTransaction

Defined in

packages/core/src/controller/AbstractController.ts:86


commitStateTransaction

commitStateTransaction(): void

Applies queued state patches to the controller state. All patches are squashed +and applied with one setState call.

Returns

void

Overrides

Controller.commitStateTransaction

Defined in

packages/core/src/controller/AbstractController.ts:77


deactivate

deactivate(): void | Promise<void>

Callback for deactivating the controller in the UI. This is the first method invoked during controller deinitialization. This usually happens when the user navigates to a different URL.

This method is the lifecycle counterpart of the activate method.

The controller should deregister listeners registered and release all -resources obtained in the activate method.

Returns

void | Promise<void>

Inherited from

Controller.deactivate

Defined in

packages/core/src/controller/Controller.ts:99


destroy

destroy(): void | Promise<void>

Finalization callback, called when the controller is being discarded by +resources obtained in the activate method.

Returns

void | Promise<void>

Inherited from

Controller.deactivate

Defined in

packages/core/src/controller/Controller.ts:99


destroy

destroy(): void | Promise<void>

Finalization callback, called when the controller is being discarded by the application. This usually happens when the user navigates to a different URL.

This method is the lifecycle counterpart of the init method.

The controller should release all resources obtained in the init method. The controller must release any resources that might not be released automatically when the controller's instance -is destroyed by the garbage collector.

Returns

void | Promise<void>

Inherited from

Controller.destroy

Defined in

packages/core/src/controller/Controller.ts:70


getExtension

getExtension(extension): undefined | Extension<PageState, RouteParams, PageState>

Returns extension instance defined by it's class constructor -from controller's extension intance map.

Parameters

NameType
extensiontypeof Extension

Returns

undefined | Extension<PageState, RouteParams, PageState>

Overrides

Controller.getExtension

Defined in

packages/core/src/controller/AbstractController.ts:129


getExtensions

getExtensions(): Extension<{}, {}, {}>[]

Returns the controller's extensions.

Returns

Extension<{}, {}, {}>[]

The extensions added to this controller.

Overrides

Controller.getExtensions

Defined in

packages/core/src/controller/AbstractController.ts:138


getHttpStatus

getHttpStatus(): number

Returns the HTTP status code to send to the client, should the -controller be used at the server-side.

Returns

number

The HTTP status code to send to the client.

Overrides

Controller.getHttpStatus

Defined in

packages/core/src/controller/AbstractController.ts:166


getRouteParams

getRouteParams(): R

Returns the current route parameters.

Returns

R

The current route parameters.

Overrides

Controller.getRouteParams

Defined in

packages/core/src/controller/AbstractController.ts:152


getState

getState(): SS

Returns the controller's current state.

Returns

SS

The current state of this controller.

Overrides

Controller.getState

Defined in

packages/core/src/controller/AbstractController.ts:57


init

init(): void | Promise<void>

Callback for initializing the controller after the route parameters have -been set on this controller.

Returns

void | Promise<void>

Inherited from

Controller.init

Defined in

packages/core/src/controller/Controller.ts:53


load

load(): S | Promise<S>

Callback the controller uses to request the resources it needs to render +is destroyed by the garbage collector.

Returns

void | Promise<void>

Inherited from

Controller.destroy

Defined in

packages/core/src/controller/Controller.ts:70


getExtension

getExtension(extension): undefined | Extension<PageState, RouteParams, PageState>

Returns extension instance defined by it's class constructor +from controller's extension intance map.

Parameters

NameType
extensiontypeof Extension

Returns

undefined | Extension<PageState, RouteParams, PageState>

Overrides

Controller.getExtension

Defined in

packages/core/src/controller/AbstractController.ts:129


getExtensions

getExtensions(): Extension<{}, {}, {}>[]

Returns the controller's extensions.

Returns

Extension<{}, {}, {}>[]

The extensions added to this controller.

Overrides

Controller.getExtensions

Defined in

packages/core/src/controller/AbstractController.ts:138


getHttpStatus

getHttpStatus(): number

Returns the HTTP status code to send to the client, should the +controller be used at the server-side.

Returns

number

The HTTP status code to send to the client.

Overrides

Controller.getHttpStatus

Defined in

packages/core/src/controller/AbstractController.ts:166


getRouteParams

getRouteParams(): R

Returns the current route parameters.

Returns

R

The current route parameters.

Overrides

Controller.getRouteParams

Defined in

packages/core/src/controller/AbstractController.ts:152


getState

getState(): SS

Returns the controller's current state.

Returns

SS

The current state of this controller.

Overrides

Controller.getState

Defined in

packages/core/src/controller/AbstractController.ts:57


init

init(): void | Promise<void>

Callback for initializing the controller after the route parameters have +been set on this controller.

Returns

void | Promise<void>

Inherited from

Controller.init

Defined in

packages/core/src/controller/Controller.ts:53


load

load(): S | Promise<S>

Callback the controller uses to request the resources it needs to render its view. This method is invoked after the init method.

The controller should request all resources it needs in this method, and represent each resource request as a promise that will resolve once the @@ -53,14 +53,14 @@ the error page. The error page that will be used depends on the status code of the error.

Returns

S | Promise<S>

A map object of promises resolved when all resources the controller requires are ready. The resolved values will be pushed to the -controller's state.

Inherited from

Controller.load

Defined in

packages/core/src/controller/Controller.ts:138


setMetaParams

setMetaParams(loadedResources, metaManager, router, dictionary, settings): void

Callback used to configure the meta attribute manager. The method is +controller's state.

Inherited from

Controller.load

Defined in

packages/core/src/controller/Controller.ts:138


setMetaParams

setMetaParams(loadedResources, metaManager, router, dictionary, settings): void

Callback used to configure the meta attribute manager. The method is called after the the controller's state has been patched with the all -loaded resources and the view has been rendered.

Parameters

NameTypeDescription
loadedResourcesIntersection<Partial<Pick<SS, Matching<SS, Promise<any>>>>, Required<Pick<SS, NonMatching<SS, Promise<any>>>>>A plain object representing a map of resource names to resources loaded by the load method. This is the same object as the one passed to the setState method.
metaManagerMetaManagerMeta attributes manager to configure.
routerRouterThe current application router.
dictionaryDictionaryThe current localization dictionary.
settingsSettingsThe application settings for the current application environment.

Returns

void

Inherited from

Controller.setMetaParams

Defined in

packages/core/src/controller/Controller.ts:280


setPageStateManager

setPageStateManager(pageStateManager?): void

Sets the page state manager. The page state manager manages the +loaded resources and the view has been rendered.

Parameters

NameTypeDescription
loadedResourcesIntersection<Partial<Pick<SS, Matching<SS, Promise<any>>>>, Required<Pick<SS, NonMatching<SS, Promise<any>>>>>A plain object representing a map of resource names to resources loaded by the load method. This is the same object as the one passed to the setState method.
metaManagerMetaManagerMeta attributes manager to configure.
routerRouterThe current application router.
dictionaryDictionaryThe current localization dictionary.
settingsSettingsThe application settings for the current application environment.

Returns

void

Inherited from

Controller.setMetaParams

Defined in

packages/core/src/controller/Controller.ts:280


setPageStateManager

setPageStateManager(pageStateManager?): void

Sets the page state manager. The page state manager manages the controller's state. The state manager can be set to null if this controller loses the right to modify the state of the current page (e.g. the user has navigated to a different route using a different -controller).

Parameters

NameTypeDescription
pageStateManager?PageStateManager<SS>The current state manager to use.

Returns

void

Overrides

Controller.setPageStateManager

Defined in

packages/core/src/controller/AbstractController.ts:159


setRouteParams

setRouteParams(params?): void

Sets the current route parameters. This method is invoked before the -init method.

Parameters

NameTypeDescription
paramsRThe current route parameters.

Returns

void

Overrides

Controller.setRouteParams

Defined in

packages/core/src/controller/AbstractController.ts:145


setState

setState<K>(statePatch): void

Patches the state of this controller using the provided object by +controller).

Parameters

NameTypeDescription
pageStateManager?PageStateManager<SS>The current state manager to use.

Returns

void

Overrides

Controller.setPageStateManager

Defined in

packages/core/src/controller/AbstractController.ts:159


setRouteParams

setRouteParams(params?): void

Sets the current route parameters. This method is invoked before the +init method.

Parameters

NameTypeDescription
paramsRThe current route parameters.

Returns

void

Overrides

Controller.setRouteParams

Defined in

packages/core/src/controller/AbstractController.ts:145


setState

setState<K>(statePatch): void

Patches the state of this controller using the provided object by copying the provided patch object fields to the controller's state object.

You can use this method to modify the state partially or add new fields to the state object.

Note that the state is not patched recursively but by replacing the @@ -68,7 +68,7 @@ resolved, this method is called with the an object containing the resolved values. The field names of the passed object will match the field names in the object returned from the load -method.

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameTypeDescription
statePatchnull | S | Pick<S, K>Patch of the controller's state to apply.

Returns

void

Overrides

Controller.setState

Defined in

packages/core/src/controller/AbstractController.ts:48


update

update(prevParams?): S | Promise<S>

Callback for updating the controller after a route update. This method +method.

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameTypeDescription
statePatchnull | S | Pick<S, K>Patch of the controller's state to apply.

Returns

void

Overrides

Controller.setState

Defined in

packages/core/src/controller/AbstractController.ts:48


update

update(prevParams?): S | Promise<S>

Callback for updating the controller after a route update. This method is invoked if the current route has the onlyUpdate flag set to true and the current controller and view match those used by the previously active route, or, the onlyUpdate option of the current route is a callback and @@ -79,8 +79,8 @@ deactivate, Controller#deinit) are not call in case this method is used.

Parameters

NameTypeDescription
prevParamsRPrevious route parameters.

Returns

S | Promise<S>

A map object of promises resolved when all resources the controller requires are ready. The resolved values will be pushed to the -controller's state.

Inherited from

Controller.update

Defined in

packages/core/src/controller/Controller.ts:164

- - +controller's state.

Inherited from

Controller.update

Defined in

packages/core/src/controller/Controller.ts:164

+ + \ No newline at end of file diff --git a/api/classes/ima_core.AbstractExecution/index.html b/api/classes/ima_core.AbstractExecution/index.html index 18912afdc9..24ce7d3faf 100644 --- a/api/classes/ima_core.AbstractExecution/index.html +++ b/api/classes/ima_core.AbstractExecution/index.html @@ -4,17 +4,17 @@ Class: AbstractExecution | IMA.js - - + +
-
Skip to main content

Class: AbstractExecution

@ima/core.AbstractExecution

Basic implementation of the Execution interface. Provides the basic -functionality for appending and validating jobs.

Hierarchy

Constructors

constructor

new AbstractExecution(jobs?)

Parameters

NameTypeDefault value
jobsExecutionJob[][]

Overrides

Execution.constructor

Defined in

packages/core/src/execution/AbstractExecution.ts:13

Properties

_jobs

Protected _jobs: ExecutionJob[]

Defined in

packages/core/src/execution/AbstractExecution.ts:11

Methods

_validateJob

_validateJob(job): boolean

Return true if the given job can be executed

Parameters

NameType
jobExecutionJob

Returns

boolean

Defined in

packages/core/src/execution/AbstractExecution.ts:44


append

append(jobs): void

Adds a new job to be executed. The job is appended at the end of the -list of current jobs therefore is executed last.

Parameters

NameTypeDescription
jobsExecutionJob | ExecutionJob[]The jobs to be executed.

Returns

void

Overrides

Execution.append

Defined in

packages/core/src/execution/AbstractExecution.ts:22


execute

execute(...args): Promise<unknown>

Start executing collected jobs. In the end a Promise is returned +

Class: AbstractExecution

@ima/core.AbstractExecution

Basic implementation of the Execution interface. Provides the basic +functionality for appending and validating jobs.

Hierarchy

Constructors

constructor

new AbstractExecution(jobs?)

Parameters

NameTypeDefault value
jobsExecutionJob[][]

Overrides

Execution.constructor

Defined in

packages/core/src/execution/AbstractExecution.ts:13

Properties

_jobs

Protected _jobs: ExecutionJob[]

Defined in

packages/core/src/execution/AbstractExecution.ts:11

Methods

_validateJob

_validateJob(job): boolean

Return true if the given job can be executed

Parameters

NameType
jobExecutionJob

Returns

boolean

Defined in

packages/core/src/execution/AbstractExecution.ts:44


append

append(jobs): void

Adds a new job to be executed. The job is appended at the end of the +list of current jobs therefore is executed last.

Parameters

NameTypeDescription
jobsExecutionJob | ExecutionJob[]The jobs to be executed.

Returns

void

Overrides

Execution.append

Defined in

packages/core/src/execution/AbstractExecution.ts:22


execute

execute(...args): Promise<unknown>

Start executing collected jobs. In the end a Promise is returned with a resulting value. On the returned Promise a catch -method can be called to prevent any unwanted interruption.

Parameters

NameTypeDescription
...argsunknown[]Arguments to be passed when executing jobs

Returns

Promise<unknown>

Overrides

Execution.execute

Defined in

packages/core/src/execution/AbstractExecution.ts:33

- - +method can be called to prevent any unwanted interruption.

Parameters

NameTypeDescription
...argsunknown[]Arguments to be passed when executing jobs

Returns

Promise<unknown>

Overrides

Execution.execute

Defined in

packages/core/src/execution/AbstractExecution.ts:33

+ + \ No newline at end of file diff --git a/api/classes/ima_core.AbstractExtension/index.html b/api/classes/ima_core.AbstractExtension/index.html index 49b1b0a925..0eb6edb00a 100644 --- a/api/classes/ima_core.AbstractExtension/index.html +++ b/api/classes/ima_core.AbstractExtension/index.html @@ -4,32 +4,32 @@ Class: AbstractExtension<S, R, SS> | IMA.js - - + +
-
Skip to main content

Class: AbstractExtension<S, R, SS>

@ima/core.AbstractExtension

Abstract extension

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends S = S

Hierarchy

Indexable

[key: PropertyKey]: any | EventBusEventHandler

Constructors

constructor

new AbstractExtension<S, R, SS>()

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends PageState = S

Inherited from

Extension.constructor

Properties

_pageStateManager

Protected Optional _pageStateManager: PageStateManager<SS>

State manager.

Defined in

packages/core/src/extension/AbstractExtension.ts:24


_partialStateSymbol

Protected _partialStateSymbol: symbol

Defined in

packages/core/src/extension/AbstractExtension.ts:30


_usingStateManager

Protected _usingStateManager: boolean = false

Flag indicating whether the PageStateManager should be used instead -of partial state.

Defined in

packages/core/src/extension/AbstractExtension.ts:29


params

params: R

The route parameters extracted from the current route.

Defined in

packages/core/src/extension/AbstractExtension.ts:39


status

status: number = 200

The HTTP response code to send to the client.

Defined in

packages/core/src/extension/AbstractExtension.ts:35


$dependencies

Static $dependencies: Dependencies

Overrides

Extension.$dependencies

Defined in

packages/core/src/extension/AbstractExtension.ts:17


$name

Static Optional $name: string

Overrides

Extension.$name

Defined in

packages/core/src/extension/AbstractExtension.ts:16

Methods

activate

activate(): void | Promise<void>

Callback for activating the extension in the UI. This is the last +

Class: AbstractExtension<S, R, SS>

@ima/core.AbstractExtension

Abstract extension

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends S = S

Hierarchy

Indexable

[key: PropertyKey]: any | EventBusEventHandler

Constructors

constructor

new AbstractExtension<S, R, SS>()

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends PageState = S

Inherited from

Extension.constructor

Properties

_pageStateManager

Protected Optional _pageStateManager: PageStateManager<SS>

State manager.

Defined in

packages/core/src/extension/AbstractExtension.ts:24


_partialStateSymbol

Protected _partialStateSymbol: symbol

Defined in

packages/core/src/extension/AbstractExtension.ts:30


_usingStateManager

Protected _usingStateManager: boolean = false

Flag indicating whether the PageStateManager should be used instead +of partial state.

Defined in

packages/core/src/extension/AbstractExtension.ts:29


params

params: R

The route parameters extracted from the current route.

Defined in

packages/core/src/extension/AbstractExtension.ts:39


status

status: number = 200

The HTTP response code to send to the client.

Defined in

packages/core/src/extension/AbstractExtension.ts:35


$dependencies

Static $dependencies: Dependencies

Overrides

Extension.$dependencies

Defined in

packages/core/src/extension/AbstractExtension.ts:17


$name

Static Optional $name: string

Overrides

Extension.$name

Defined in

packages/core/src/extension/AbstractExtension.ts:16

Methods

activate

activate(): void | Promise<void>

Callback for activating the extension in the UI. This is the last method invoked during controller (and extensions) initialization, called after all the promises returned from the load method have been resolved and the controller has configured the meta manager.

The extension may register any React and DOM event listeners in this method. The extension may start receiving event bus event after this -method completes.

Returns

void | Promise<void>

Overrides

Extension.activate

Defined in

packages/core/src/extension/AbstractExtension.ts:58


beginStateTransaction

beginStateTransaction(): void

Starts queueing state patches off the controller state. While the transaction +method completes.

Returns

void | Promise<void>

Overrides

Extension.activate

Defined in

packages/core/src/extension/AbstractExtension.ts:58


beginStateTransaction

beginStateTransaction(): void

Starts queueing state patches off the controller state. While the transaction is active every setState call has no effect on the current state.

Note that call to getState after the transaction has begun will -return state as it was before the transaction.

Returns

void

Overrides

Extension.beginStateTransaction

Defined in

packages/core/src/extension/AbstractExtension.ts:109


cancelStateTransaction

cancelStateTransaction(): void

Cancels ongoing state transaction. Uncommitted state changes are lost.

Returns

void

Overrides

Extension.cancelStateTransaction

Defined in

packages/core/src/extension/AbstractExtension.ts:127


clearPartialState

clearPartialState(): void

Clears the current partial state of the extension and sets it value to empty object.

Returns

void

Overrides

Extension.clearPartialState

Defined in

packages/core/src/extension/AbstractExtension.ts:155


commitStateTransaction

commitStateTransaction(): void

Applies queued state patches to the controller state. All patches are squashed -and applied with one setState call.

Returns

void

Overrides

Extension.commitStateTransaction

Defined in

packages/core/src/extension/AbstractExtension.ts:118


deactivate

deactivate(): void | Promise<void>

Callback for deactivating the extension in the UI. This is the first +return state as it was before the transaction.

Returns

void

Overrides

Extension.beginStateTransaction

Defined in

packages/core/src/extension/AbstractExtension.ts:109


cancelStateTransaction

cancelStateTransaction(): void

Cancels ongoing state transaction. Uncommitted state changes are lost.

Returns

void

Overrides

Extension.cancelStateTransaction

Defined in

packages/core/src/extension/AbstractExtension.ts:127


clearPartialState

clearPartialState(): void

Clears the current partial state of the extension and sets it value to empty object.

Returns

void

Overrides

Extension.clearPartialState

Defined in

packages/core/src/extension/AbstractExtension.ts:155


commitStateTransaction

commitStateTransaction(): void

Applies queued state patches to the controller state. All patches are squashed +and applied with one setState call.

Returns

void

Overrides

Extension.commitStateTransaction

Defined in

packages/core/src/extension/AbstractExtension.ts:118


deactivate

deactivate(): void | Promise<void>

Callback for deactivating the extension in the UI. This is the first method invoked during extension deinitialization. This usually happens when the user navigates to a different URL.

This method is the lifecycle counterpart of the activate method.

The extension should deregister listeners registered and release all -resources obtained in the activate method.

Returns

void | Promise<void>

Overrides

Extension.deactivate

Defined in

packages/core/src/extension/AbstractExtension.ts:65


destroy

destroy(): void | Promise<void>

Finalization callback, called when the controller is being discarded by +resources obtained in the activate method.

Returns

void | Promise<void>

Overrides

Extension.deactivate

Defined in

packages/core/src/extension/AbstractExtension.ts:65


destroy

destroy(): void | Promise<void>

Finalization callback, called when the controller is being discarded by the application. This usually happens when the user navigates to a different URL.

This method is the lifecycle counterpart of the init method.

The extension should release all resources obtained in the init method. The extension must release any resources that might not be released automatically when the extensions's instance -is destroyed by the garbage collector.

Returns

void | Promise<void>

Overrides

Extension.destroy

Defined in

packages/core/src/extension/AbstractExtension.ts:51


getAllowedStateKeys

getAllowedStateKeys(): keyof S[]

Returns array of allowed state keys for extension.

Returns

keyof S[]

Overrides

Extension.getAllowedStateKeys

Defined in

packages/core/src/extension/AbstractExtension.ts:204


getHttpStatus

getHttpStatus(): number

Returns

number

Inherit Doc

Defined in

packages/core/src/extension/AbstractExtension.ts:197


getPartialState

getPartialState(): Partial<SS>

Returns the current partial state of the extension.

Returns

Partial<SS>

The current partial state of the extension.

Overrides

Extension.getPartialState

Defined in

packages/core/src/extension/AbstractExtension.ts:148


getRouteParams

getRouteParams(): R

Returns the current route parameters.

Returns

R

The current route parameters.

Overrides

Extension.getRouteParams

Defined in

packages/core/src/extension/AbstractExtension.ts:169


getState

getState(): SS

Returns the current state of the controller using this extension.

Returns

SS

The current state of the controller.

Overrides

Extension.getState

Defined in

packages/core/src/extension/AbstractExtension.ts:98


init

init(): void | Promise<void>

Callback for initializing the controller extension after the route -parameters have been set on this extension.

Returns

void | Promise<void>

Overrides

Extension.init

Defined in

packages/core/src/extension/AbstractExtension.ts:44


load

load(): S | Promise<S>

Callback the extension uses to request the resources it needs to render +is destroyed by the garbage collector.

Returns

void | Promise<void>

Overrides

Extension.destroy

Defined in

packages/core/src/extension/AbstractExtension.ts:51


getAllowedStateKeys

getAllowedStateKeys(): keyof S[]

Returns array of allowed state keys for extension.

Returns

keyof S[]

Overrides

Extension.getAllowedStateKeys

Defined in

packages/core/src/extension/AbstractExtension.ts:204


getHttpStatus

getHttpStatus(): number

Returns

number

Inherit Doc

Defined in

packages/core/src/extension/AbstractExtension.ts:197


getPartialState

getPartialState(): Partial<SS>

Returns the current partial state of the extension.

Returns

Partial<SS>

The current partial state of the extension.

Overrides

Extension.getPartialState

Defined in

packages/core/src/extension/AbstractExtension.ts:148


getRouteParams

getRouteParams(): R

Returns the current route parameters.

Returns

R

The current route parameters.

Overrides

Extension.getRouteParams

Defined in

packages/core/src/extension/AbstractExtension.ts:169


getState

getState(): SS

Returns the current state of the controller using this extension.

Returns

SS

The current state of the controller.

Overrides

Extension.getState

Defined in

packages/core/src/extension/AbstractExtension.ts:98


init

init(): void | Promise<void>

Callback for initializing the controller extension after the route +parameters have been set on this extension.

Returns

void | Promise<void>

Overrides

Extension.init

Defined in

packages/core/src/extension/AbstractExtension.ts:44


load

load(): S | Promise<S>

Callback the extension uses to request the resources it needs to render its related parts of the view. This method is invoked after the init method.

The extension should request all resources it needs in this method, and represent each resource request as a promise that will resolve once the @@ -41,14 +41,14 @@ the error page. The error page that will be used depends on the status code of the error.

Returns

S | Promise<S>

A map object of promises resolved when all resources the controller requires are ready. The resolved values will be pushed to the -controller's state.

Overrides

Extension.load

Defined in

packages/core/src/extension/AbstractExtension.ts:72


setPageStateManager

setPageStateManager(pageStateManager?): void

Sets the state manager used to manage the controller's state..

Parameters

NameTypeDescription
pageStateManager?PageStateManager<SS>The current state manager to use.

Returns

void

Overrides

Extension.setPageStateManager

Defined in

packages/core/src/extension/AbstractExtension.ts:176


setPartialState

setPartialState(partialStatePatch): void

Patches the partial state of the extension. The extension is able +controller's state.

Overrides

Extension.load

Defined in

packages/core/src/extension/AbstractExtension.ts:72


setPageStateManager

setPageStateManager(pageStateManager?): void

Sets the state manager used to manage the controller's state..

Parameters

NameTypeDescription
pageStateManager?PageStateManager<SS>The current state manager to use.

Returns

void

Overrides

Extension.setPageStateManager

Defined in

packages/core/src/extension/AbstractExtension.ts:176


setPartialState

setPartialState(partialStatePatch): void

Patches the partial state of the extension. The extension is able during its load and update phase receive state from active controller -using this extension and from previously loaded/updated extensions.

Parameters

NameTypeDescription
partialStatePatchSPatch of the controller's state to apply.

Returns

void

Overrides

Extension.setPartialState

Defined in

packages/core/src/extension/AbstractExtension.ts:136


setRouteParams

setRouteParams(params?): void

Sets the current route parameters. This method is invoked before the -init method.

Parameters

NameTypeDescription
paramsRThe current route parameters.

Returns

void

Overrides

Extension.setRouteParams

Defined in

packages/core/src/extension/AbstractExtension.ts:162


setState

setState<K>(statePatch): void

Patches the state of the controller using this extension by using the +using this extension and from previously loaded/updated extensions.

Parameters

NameTypeDescription
partialStatePatchSPatch of the controller's state to apply.

Returns

void

Overrides

Extension.setPartialState

Defined in

packages/core/src/extension/AbstractExtension.ts:136


setRouteParams

setRouteParams(params?): void

Sets the current route parameters. This method is invoked before the +init method.

Parameters

NameTypeDescription
paramsRThe current route parameters.

Returns

void

Overrides

Extension.setRouteParams

Defined in

packages/core/src/extension/AbstractExtension.ts:162


setState

setState<K>(statePatch): void

Patches the state of the controller using this extension by using the provided object by copying the provided patch object fields to the controller's state object.

Note that the state is not patched recursively but by replacing the values of the top-level fields of the state object.

Note that the extension may modify only the fields of the state that it -has specified by its getAllowedStateKeys method.

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameTypeDescription
statePatchnull | S | Pick<S, K>Patch of the controller's state to apply.

Returns

void

Overrides

Extension.setState

Defined in

packages/core/src/extension/AbstractExtension.ts:89


switchToPartialState

switchToPartialState(): void

Disables using PageStateManager for getting state.

Returns

void

Overrides

Extension.switchToPartialState

Defined in

packages/core/src/extension/AbstractExtension.ts:190


switchToStateManager

switchToStateManager(): void

Enables using PageStateManager for getting state.

Returns

void

Overrides

Extension.switchToStateManager

Defined in

packages/core/src/extension/AbstractExtension.ts:183


update

update(prevParams?): S | Promise<S>

Callback for updating the extension after a route update. This method +has specified by its getAllowedStateKeys method.

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameTypeDescription
statePatchnull | S | Pick<S, K>Patch of the controller's state to apply.

Returns

void

Overrides

Extension.setState

Defined in

packages/core/src/extension/AbstractExtension.ts:89


switchToPartialState

switchToPartialState(): void

Disables using PageStateManager for getting state.

Returns

void

Overrides

Extension.switchToPartialState

Defined in

packages/core/src/extension/AbstractExtension.ts:190


switchToStateManager

switchToStateManager(): void

Enables using PageStateManager for getting state.

Returns

void

Overrides

Extension.switchToStateManager

Defined in

packages/core/src/extension/AbstractExtension.ts:183


update

update(prevParams?): S | Promise<S>

Callback for updating the extension after a route update. This method is invoked if the current route has the onlyUpdate flag set to true and the current controller and view match those used by the previously active route, or, the onlyUpdate option of the current route is a callback and @@ -59,8 +59,8 @@ deactivate, Extension#deinit) are not call in case this method is used.

Parameters

NameTypeDescription
prevParamsRPrevious route parameters.

Returns

S | Promise<S>

A map object of promises resolved when all resources the controller requires are ready. The resolved values will be pushed to the -controller's state.

Overrides

Extension.update

Defined in

packages/core/src/extension/AbstractExtension.ts:82

- - +controller's state.

Overrides

Extension.update

Defined in

packages/core/src/extension/AbstractExtension.ts:82

+ + \ No newline at end of file diff --git a/api/classes/ima_core.AbstractPageManager/index.html b/api/classes/ima_core.AbstractPageManager/index.html index 959e952d22..9beacb7c08 100644 --- a/api/classes/ima_core.AbstractPageManager/index.html +++ b/api/classes/ima_core.AbstractPageManager/index.html @@ -4,41 +4,41 @@ Class: AbstractPageManager | IMA.js - - + +
-
Skip to main content

Class: AbstractPageManager

@ima/core.AbstractPageManager

Page manager for controller.

Hierarchy

Constructors

constructor

new AbstractPageManager(pageFactory, pageRenderer, pageStateManager, pageHandlerRegistry, dispatcher)

Initializes the page manager.

Parameters

NameTypeDescription
pageFactoryPageFactoryFactory used by the page manager to create instances of the controller for the current route, and decorate the controllers and page state managers.
pageRendererPageRendererThe current renderer of the page.
pageStateManagerPageStateManager<{}>The current page state manager.
pageHandlerRegistryPageHandlerRegistryInstance of HandlerRegistry that holds a list of pre-manage and post-manage handlers.
dispatcherDispatcher-

Overrides

PageManager.constructor

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:95

Properties

_dispatcher

Protected _dispatcher: Dispatcher

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:81


_managedPage

Protected _managedPage: ManagedPage

Details of the currently managed page.

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:68


_pageFactory

Protected _pageFactory: PageFactory

Factory used by the page manager to create instances of the +

Class: AbstractPageManager

@ima/core.AbstractPageManager

Page manager for controller.

Hierarchy

Constructors

constructor

new AbstractPageManager(pageFactory, pageRenderer, pageStateManager, pageHandlerRegistry, dispatcher)

Initializes the page manager.

Parameters

NameTypeDescription
pageFactoryPageFactoryFactory used by the page manager to create instances of the controller for the current route, and decorate the controllers and page state managers.
pageRendererPageRendererThe current renderer of the page.
pageStateManagerPageStateManager<{}>The current page state manager.
pageHandlerRegistryPageHandlerRegistryInstance of HandlerRegistry that holds a list of pre-manage and post-manage handlers.
dispatcherDispatcher-

Overrides

PageManager.constructor

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:95

Properties

_dispatcher

Protected _dispatcher: Dispatcher

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:81


_managedPage

Protected _managedPage: ManagedPage

Details of the currently managed page.

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:68


_pageFactory

Protected _pageFactory: PageFactory

Factory used by the page manager to create instances of the controller for the current route, and decorate the controllers and -page state managers.

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:63


_pageHandlerRegistry

Protected _pageHandlerRegistry: PageHandlerRegistry

A registry that holds a list of pre-manage and post-manage handlers.

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:80


_pageRenderer

Protected _pageRenderer: PageRenderer

The current renderer of the page.

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:72


_pageStateManager

Protected _pageStateManager: PageStateManager<{}>

The current page state manager.

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:76


_previousManagedPage

Protected _previousManagedPage: ManagedPage

Snapshot of the previously managed page before it was replaced with -a new one

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:57

Methods

#cancelable

Private #cancelable<T>(promise): Promise<T>

Type parameters

Name
T

Parameters

NameType
promiseT

Returns

Promise<T>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:845


_activateController

Protected _activateController(): Promise<void>

Activate managed instance of controller.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:549


_activateExtensions

Protected _activateExtensions(): Promise<void>

Activate extensions for managed instance of controller.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:563


_activatePageSource

Protected _activatePageSource(): Promise<void>

Activate page source so call activate method on controller and his -extensions.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:529


_clearComponentState

_clearComponentState(options): void

The method clear state on current rendered component to DOM.

Parameters

NameTypeDescription
optionsRouteOptionsThe current route options.

Returns

void

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:753


_constructManagedPageValue

Protected _constructManagedPageValue(controller, view, route, options, params, controllerInstance, decoratedController, viewInstance): ManagedPage

Parameters

NameType
controllerRouteController
viewunknown
routeAbstractRoute<string | RoutePathExpression>
optionsRouteOptions
paramsRouteParams
controllerInstanceController<PageState, RouteParams, PageState>
decoratedControllerControllerDecorator<{}, {}, {}>
viewInstanceunknown

Returns

ManagedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:245


_deactivateController

Protected _deactivateController(): Promise<void>

Deactivate last managed instance of controller only If controller was -activated.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:691


_deactivateExtensions

Protected _deactivateExtensions(): Promise<void>

Deactivate extensions for last managed instance of controller only if -they were activated.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:702


_deactivatePageSource

Protected _deactivatePageSource(): Promise<void>

Deactivate page source so call deactivate method on controller and his -extensions.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:677


_destroyController

Protected _destroyController(): Promise<void>

Destroy last managed instance of controller.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:726


_destroyExtensions

Protected _destroyExtensions(): Promise<void>

Destroy extensions for last managed instance of controller.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:739


_destroyPageSource

Protected _destroyPageSource(): Promise<void>

Destroy page source so call destroy method on controller and his -extensions.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:714


_getInitialManagedPage

Protected _getInitialManagedPage(): ManagedPage

Clear value from managed page.

Returns

ManagedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:302


_getLoadedControllerState

Protected _getLoadedControllerState(): Promise<{}>

Load controller state from managed instance of controller.

Returns

Promise<{}>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:485


_getLoadedExtensionsState

Protected _getLoadedExtensionsState(controllerState?): Promise<UnknownParameters>

Load extensions state from managed instance of controller.

Parameters

NameType
controllerState?UnknownParameters

Returns

Promise<UnknownParameters>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:501


_getUpdatedControllerState

Protected _getUpdatedControllerState(): {} | Promise<{}>

Return updated controller state for current page controller.

Returns

{} | Promise<{}>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:621


_getUpdatedExtensionsState

Protected _getUpdatedExtensionsState(controllerState?): Promise<UnknownParameters>

Return updated extensions state for current page controller.

Parameters

NameType
controllerState?UnknownParameters

Returns

Promise<UnknownParameters>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:637


_hasOnlyUpdate

Protected _hasOnlyUpdate(controller, view, options): boolean

Return true if manager has to update last managed controller and view.

Parameters

NameType
controllerRouteController
viewunknown
optionsRouteOptions

Returns

boolean

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:769


_initController

Protected _initController(): Promise<void>

Initializes managed instance of controller with the provided parameters.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:398


_initExtensions

Protected _initExtensions(): Promise<void>

Initialize extensions for managed instance of controller with the -provided parameters.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:413


_initPageSource

Protected _initPageSource(): Promise<void>

Initialize page source so call init method on controller and his -extensions.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:383


_loadPageSource

Protected _loadPageSource(): Promise<void | PageData>

Load page source so call load method on controller and his extensions. -Merge loaded state and render it.

Returns

Promise<void | PageData>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:443


_runPostManageHandlers

Protected _runPostManageHandlers(previousManagedPage, action): Promise<unknown>

Parameters

NameType
previousManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:809


_runPreManageHandlers

Protected _runPreManageHandlers(actualManagedPage, action): Promise<unknown>

Parameters

NameType
actualManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:788


_setRestrictedPageStateManager

_setRestrictedPageStateManager(extension, extensionState): void

Set page state manager to extension which has restricted rights to set -global state.

Parameters

NameType
extensionExtension<{}, {}, {}>
extensionStateUnknownParameters

Returns

void

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:342


_storeManagedPageSnapshot

Protected _storeManagedPageSnapshot(): void

Creates a cloned version of currently managed page and stores it in +page state managers.

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:63


_pageHandlerRegistry

Protected _pageHandlerRegistry: PageHandlerRegistry

A registry that holds a list of pre-manage and post-manage handlers.

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:80


_pageRenderer

Protected _pageRenderer: PageRenderer

The current renderer of the page.

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:72


_pageStateManager

Protected _pageStateManager: PageStateManager<{}>

The current page state manager.

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:76


_previousManagedPage

Protected _previousManagedPage: ManagedPage

Snapshot of the previously managed page before it was replaced with +a new one

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:57

Methods

#cancelable

Private #cancelable<T>(promise): Promise<T>

Type parameters

Name
T

Parameters

NameType
promiseT

Returns

Promise<T>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:845


_activateController

Protected _activateController(): Promise<void>

Activate managed instance of controller.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:549


_activateExtensions

Protected _activateExtensions(): Promise<void>

Activate extensions for managed instance of controller.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:563


_activatePageSource

Protected _activatePageSource(): Promise<void>

Activate page source so call activate method on controller and his +extensions.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:529


_clearComponentState

_clearComponentState(options): void

The method clear state on current rendered component to DOM.

Parameters

NameTypeDescription
optionsRouteOptionsThe current route options.

Returns

void

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:753


_constructManagedPageValue

Protected _constructManagedPageValue(controller, view, route, options, params, controllerInstance, decoratedController, viewInstance): ManagedPage

Parameters

NameType
controllerRouteController
viewunknown
routeAbstractRoute<string | RoutePathExpression>
optionsRouteOptions
paramsRouteParams
controllerInstanceController<PageState, RouteParams, PageState>
decoratedControllerControllerDecorator<{}, {}, {}>
viewInstanceunknown

Returns

ManagedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:245


_deactivateController

Protected _deactivateController(): Promise<void>

Deactivate last managed instance of controller only If controller was +activated.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:691


_deactivateExtensions

Protected _deactivateExtensions(): Promise<void>

Deactivate extensions for last managed instance of controller only if +they were activated.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:702


_deactivatePageSource

Protected _deactivatePageSource(): Promise<void>

Deactivate page source so call deactivate method on controller and his +extensions.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:677


_destroyController

Protected _destroyController(): Promise<void>

Destroy last managed instance of controller.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:726


_destroyExtensions

Protected _destroyExtensions(): Promise<void>

Destroy extensions for last managed instance of controller.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:739


_destroyPageSource

Protected _destroyPageSource(): Promise<void>

Destroy page source so call destroy method on controller and his +extensions.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:714


_getInitialManagedPage

Protected _getInitialManagedPage(): ManagedPage

Clear value from managed page.

Returns

ManagedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:302


_getLoadedControllerState

Protected _getLoadedControllerState(): Promise<{}>

Load controller state from managed instance of controller.

Returns

Promise<{}>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:485


_getLoadedExtensionsState

Protected _getLoadedExtensionsState(controllerState?): Promise<UnknownParameters>

Load extensions state from managed instance of controller.

Parameters

NameType
controllerState?UnknownParameters

Returns

Promise<UnknownParameters>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:501


_getUpdatedControllerState

Protected _getUpdatedControllerState(): {} | Promise<{}>

Return updated controller state for current page controller.

Returns

{} | Promise<{}>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:621


_getUpdatedExtensionsState

Protected _getUpdatedExtensionsState(controllerState?): Promise<UnknownParameters>

Return updated extensions state for current page controller.

Parameters

NameType
controllerState?UnknownParameters

Returns

Promise<UnknownParameters>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:637


_hasOnlyUpdate

Protected _hasOnlyUpdate(controller, view, options): boolean

Return true if manager has to update last managed controller and view.

Parameters

NameType
controllerRouteController
viewunknown
optionsRouteOptions

Returns

boolean

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:769


_initController

Protected _initController(): Promise<void>

Initializes managed instance of controller with the provided parameters.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:398


_initExtensions

Protected _initExtensions(): Promise<void>

Initialize extensions for managed instance of controller with the +provided parameters.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:413


_initPageSource

Protected _initPageSource(): Promise<void>

Initialize page source so call init method on controller and his +extensions.

Returns

Promise<void>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:383


_loadPageSource

Protected _loadPageSource(): Promise<void | PageData>

Load page source so call load method on controller and his extensions. +Merge loaded state and render it.

Returns

Promise<void | PageData>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:443


_runPostManageHandlers

Protected _runPostManageHandlers(previousManagedPage, action): Promise<unknown>

Parameters

NameType
previousManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:809


_runPreManageHandlers

Protected _runPreManageHandlers(actualManagedPage, action): Promise<unknown>

Parameters

NameType
actualManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:788


_setRestrictedPageStateManager

_setRestrictedPageStateManager(extension, extensionState): void

Set page state manager to extension which has restricted rights to set +global state.

Parameters

NameType
extensionExtension<{}, {}, {}>
extensionStateUnknownParameters

Returns

void

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:342


_storeManagedPageSnapshot

Protected _storeManagedPageSnapshot(): void

Creates a cloned version of currently managed page and stores it in a helper property. Snapshot is used in manager handlers to easily determine differences -between the current and the previous state.

Returns

void

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:281


_stripManagedPageValueForPublic

Protected _stripManagedPageValueForPublic(value): Object

Removes properties we do not want to propagate outside of the page manager

Parameters

NameTypeDescription
valueManagedPageThe managed page object to strip down

Returns

Object

NameType
controllerRouteController
optionsRouteOptions
paramsRouteParams
routeAbstractRoute<string | RoutePathExpression>
viewunknown

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:332


_switchToPageStateManager

Protected _switchToPageStateManager(): void

Iterates over extensions of current controller and switches each one to -pageStateManager and clears their partial state.

Returns

void

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:430


_switchToPageStateManagerAfterLoaded

_switchToPageStateManagerAfterLoaded(extension, extensionState): void

For defined extension switches to pageStageManager and clears partial state -after extension state is loaded.

Parameters

NameType
extensionExtension<{}, {}, {}>
extensionStateUnknownParameters

Returns

void

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:363


_updatePageSource

Protected _updatePageSource(): Promise<void | PageData>

Update page source so call update method on controller and his -extensions. Merge updated state and render it.

Returns

Promise<void | PageData>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:580


destroy

destroy(): Promise<void>

Finalization callback, called when the page manager is being discarded. -This usually happens when the page is hot-reloaded at the client side.

Returns

Promise<void>

Overrides

PageManager.destroy

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:232


getViewController

Protected getViewController(route): Promise<{ controller: RouteController ; view: RouteView }>

Parameters

NameType
routeAbstractRoute<string | RoutePathExpression>

Returns

Promise<{ controller: RouteController ; view: RouteView }>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:833


init

init(): void

Initializes the page manager.

Returns

void

Overrides

PageManager.init

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:114


manage

manage(«destructured»): Promise<void | PageData>

Starts to manage the provided controller and its view. The manager +between the current and the previous state.

Returns

void

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:281


_stripManagedPageValueForPublic

Protected _stripManagedPageValueForPublic(value): Object

Removes properties we do not want to propagate outside of the page manager

Parameters

NameTypeDescription
valueManagedPageThe managed page object to strip down

Returns

Object

NameType
controllerRouteController
optionsRouteOptions
paramsRouteParams
routeAbstractRoute<string | RoutePathExpression>
viewunknown

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:332


_switchToPageStateManager

Protected _switchToPageStateManager(): void

Iterates over extensions of current controller and switches each one to +pageStateManager and clears their partial state.

Returns

void

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:430


_switchToPageStateManagerAfterLoaded

_switchToPageStateManagerAfterLoaded(extension, extensionState): void

For defined extension switches to pageStageManager and clears partial state +after extension state is loaded.

Parameters

NameType
extensionExtension<{}, {}, {}>
extensionStateUnknownParameters

Returns

void

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:363


_updatePageSource

Protected _updatePageSource(): Promise<void | PageData>

Update page source so call update method on controller and his +extensions. Merge updated state and render it.

Returns

Promise<void | PageData>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:580


destroy

destroy(): Promise<void>

Finalization callback, called when the page manager is being discarded. +This usually happens when the page is hot-reloaded at the client side.

Returns

Promise<void>

Overrides

PageManager.destroy

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:232


getViewController

Protected getViewController(route): Promise<{ controller: RouteController ; view: RouteView }>

Parameters

NameType
routeAbstractRoute<string | RoutePathExpression>

Returns

Promise<{ controller: RouteController ; view: RouteView }>

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:833


init

init(): void

Initializes the page manager.

Returns

void

Overrides

PageManager.init

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:114


manage

manage(«destructured»): Promise<void | PageData>

Starts to manage the provided controller and its view. The manager stops the management of any previously managed controller and view.

The controller and view will be initialized and rendered either into the UI (at the client-side) or to the response to send to the client (at the server-side).

Parameters

NameType
«destructured»ManageArgs

Returns

Promise<void | PageData>

A promise that will resolve to information about the rendered page. The status will contain the HTTP status code to send to the client (at the server side) or determine the type of error page -to navigate to (at the client side).

Overrides

PageManager.manage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:133


postManage

postManage(): void

Called by router after currently managed route is resolved.

Returns

void

Overrides

PageManager.postManage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:223


preManage

preManage(): Promise<void>

Pre manage handler, should be called and awaited before tryint to handle +to navigate to (at the client side).

Overrides

PageManager.manage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:133


postManage

postManage(): void

Called by router after currently managed route is resolved.

Returns

void

Overrides

PageManager.postManage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:223


preManage

preManage(): Promise<void>

Pre manage handler, should be called and awaited before tryint to handle new route handler. This pre manage takes care of canceling any currently executed route handlers and returns promise which is resolved when previous -page finished loading (even if it got canceled).

Returns

Promise<void>

Overrides

PageManager.preManage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:123

- - +page finished loading (even if it got canceled).

Returns

Promise<void>

Overrides

PageManager.preManage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:123

+ + \ No newline at end of file diff --git a/api/classes/ima_core.AbstractRoute/index.html b/api/classes/ima_core.AbstractRoute/index.html index 04af002c24..c88a4790f8 100644 --- a/api/classes/ima_core.AbstractRoute/index.html +++ b/api/classes/ima_core.AbstractRoute/index.html @@ -4,36 +4,36 @@ Class: AbstractRoute<T> | IMA.js - - + +
-
Skip to main content

Class: AbstractRoute<T>

@ima/core.AbstractRoute

Utility for representing and manipulating a single route in the router's -configuration.

Type parameters

NameType
Textends string | RoutePathExpression

Hierarchy

Constructors

constructor

new AbstractRoute<T>(name, pathExpression, controller, view, options?)

Initializes the route.

Type parameters

NameType
Textends string | RoutePathExpression

Parameters

NameTypeDescription
namestringThe unique name of this route, identifying it among the rest of the routes in the application.
pathExpressionTPath expression used in route matching, to generate valid path with provided params and parsing params from current path.
controllerAsyncRouteControllerThe full name of Object Container alias identifying the controller associated with this route.
viewAsyncRouteViewThe full name or Object Container alias identifying the view class associated with this route.
options?Partial<RouteFactoryOptions>The route additional options.

Defined in

packages/core/src/router/AbstractRoute.ts:91

Properties

_controller

Protected _controller: Object

The full name of Object Container alias identifying the controller -associated with this route.

Type declaration

NameType
cachednull | RouteController | Promise<RouteController>
controllerAsyncRouteController
resolvedboolean

Defined in

packages/core/src/router/AbstractRoute.ts:58


_name

Protected _name: string

The unique name of this route, identifying it among the rest of the -routes in the application.

Defined in

packages/core/src/router/AbstractRoute.ts:48


_options

Protected _options: RouteFactoryOptions

The route additional options.

Defined in

packages/core/src/router/AbstractRoute.ts:76


_pathExpression

Protected _pathExpression: T

Path expression used in route matching, to generate valid path with -provided params and parsing params from current path.

Defined in

packages/core/src/router/AbstractRoute.ts:53


_view

Protected _view: Object

The full name or Object Container alias identifying the view class -associated with this route.

Type declaration

NameType
cachednull | RouteView | Promise<RouteView>
resolvedboolean
viewAsyncRouteView

Defined in

packages/core/src/router/AbstractRoute.ts:67

Methods

extractParameters

extractParameters(path, baseUrl): RouteParams<{}>

Extracts the parameter values from the provided path. The method +

Class: AbstractRoute<T>

@ima/core.AbstractRoute

Utility for representing and manipulating a single route in the router's +configuration.

Type parameters

NameType
Textends string | RoutePathExpression

Hierarchy

Constructors

constructor

new AbstractRoute<T>(name, pathExpression, controller, view, options?)

Initializes the route.

Type parameters

NameType
Textends string | RoutePathExpression

Parameters

NameTypeDescription
namestringThe unique name of this route, identifying it among the rest of the routes in the application.
pathExpressionTPath expression used in route matching, to generate valid path with provided params and parsing params from current path.
controllerAsyncRouteControllerThe full name of Object Container alias identifying the controller associated with this route.
viewAsyncRouteViewThe full name or Object Container alias identifying the view class associated with this route.
options?Partial<RouteFactoryOptions>The route additional options.

Defined in

packages/core/src/router/AbstractRoute.ts:91

Properties

_controller

Protected _controller: Object

The full name of Object Container alias identifying the controller +associated with this route.

Type declaration

NameType
cachednull | RouteController | Promise<RouteController>
controllerAsyncRouteController
resolvedboolean

Defined in

packages/core/src/router/AbstractRoute.ts:58


_name

Protected _name: string

The unique name of this route, identifying it among the rest of the +routes in the application.

Defined in

packages/core/src/router/AbstractRoute.ts:48


_options

Protected _options: RouteFactoryOptions

The route additional options.

Defined in

packages/core/src/router/AbstractRoute.ts:76


_pathExpression

Protected _pathExpression: T

Path expression used in route matching, to generate valid path with +provided params and parsing params from current path.

Defined in

packages/core/src/router/AbstractRoute.ts:53


_view

Protected _view: Object

The full name or Object Container alias identifying the view class +associated with this route.

Type declaration

NameType
cachednull | RouteView | Promise<RouteView>
resolvedboolean
viewAsyncRouteView

Defined in

packages/core/src/router/AbstractRoute.ts:67

Methods

extractParameters

extractParameters(path, baseUrl): RouteParams<{}>

Extracts the parameter values from the provided path. The method extracts both the in-path parameters and parses the query, allowing the query parameters to override the in-path parameters.

The method returns an empty hash object if the path does not match this route.

Parameters

NameTypeDescription
pathstringCurrently routed path.
baseUrlstringCurrently routed baseUrl.

Returns

RouteParams<{}>

Map of parameter names to parameter -values.

Defined in

packages/core/src/router/AbstractRoute.ts:292


getController

getController(): RouteController | Promise<RouteController>

Returns Controller class/alias/constant associated with this route. +values.

Defined in

packages/core/src/router/AbstractRoute.ts:292


getController

getController(): RouteController | Promise<RouteController>

Returns Controller class/alias/constant associated with this route. Internally caches async calls for dynamically imported controllers, meaning that once they're loaded, you get the same promise for -subsequent calls.

Returns

RouteController | Promise<RouteController>

The Controller class/alias/constant.

Defined in

packages/core/src/router/AbstractRoute.ts:153


getName

getName(): string

Returns the unique identifying name of this route.

Returns

string

The name of the route, identifying it.

Defined in

packages/core/src/router/AbstractRoute.ts:132


getOptions

getOptions(): RouteFactoryOptions

Return route additional options.

Returns

RouteFactoryOptions

Defined in

packages/core/src/router/AbstractRoute.ts:210


getPathExpression

getPathExpression(): T

Path expression used in route matching, to generate valid path with -provided params and parsing params from current path.

Returns

T

The path expression.

Defined in

packages/core/src/router/AbstractRoute.ts:220


getTrimmedPath

getTrimmedPath(path): string

Trims the trailing forward slash from the provided URL path.

Parameters

NameTypeDescription
pathstringThe path to trim.

Returns

string

Trimmed path.

Defined in

packages/core/src/router/AbstractRoute.ts:230


getView

getView(): RouteView | Promise<RouteView>

Returns View class/alias/constant associated with this route. +subsequent calls.

Returns

RouteController | Promise<RouteController>

The Controller class/alias/constant.

Defined in

packages/core/src/router/AbstractRoute.ts:153


getName

getName(): string

Returns the unique identifying name of this route.

Returns

string

The name of the route, identifying it.

Defined in

packages/core/src/router/AbstractRoute.ts:132


getOptions

getOptions(): RouteFactoryOptions

Return route additional options.

Returns

RouteFactoryOptions

Defined in

packages/core/src/router/AbstractRoute.ts:210


getPathExpression

getPathExpression(): T

Path expression used in route matching, to generate valid path with +provided params and parsing params from current path.

Returns

T

The path expression.

Defined in

packages/core/src/router/AbstractRoute.ts:220


getTrimmedPath

getTrimmedPath(path): string

Trims the trailing forward slash from the provided URL path.

Parameters

NameTypeDescription
pathstringThe path to trim.

Returns

string

Trimmed path.

Defined in

packages/core/src/router/AbstractRoute.ts:230


getView

getView(): RouteView | Promise<RouteView>

Returns View class/alias/constant associated with this route. Internally caches async calls for dynamically imported views, meaning that once they're loaded, you get the same promise for -subsequent calls.

Returns

RouteView | Promise<RouteView>

The View class/alias/constant.

Defined in

packages/core/src/router/AbstractRoute.ts:185


isAsync

isAsync(module): boolean

Checks if given argument is an async handler.

Parameters

NameType
moduleunknown

Returns

boolean

Defined in

packages/core/src/router/AbstractRoute.ts:139


isControllerResolved

isControllerResolved(): boolean

Returns true for resolved controller. This is always true -for sync route views.

Returns

boolean

Defined in

packages/core/src/router/AbstractRoute.ts:173


isViewResolved

isViewResolved(): boolean

Returns true for resolved view. This is always true -for sync route views.

Returns

boolean

Defined in

packages/core/src/router/AbstractRoute.ts:203


matches

matches(path): boolean

Tests whether the provided URL path matches this route. The provided -path may contain the query.

Parameters

NameTypeDescription
pathstringThe URL path.

Returns

boolean

true if the provided path matches this route.

Defined in

packages/core/src/router/AbstractRoute.ts:271


preload

preload(): Promise<[RouteController, RouteView]>

Preloads dynamically imported view and controller.

Returns

Promise<[RouteController, RouteView]>

Promise.All resolving to [view, controller] tuple.

Defined in

packages/core/src/router/AbstractRoute.ts:239


toPath

toPath(params): string

Creates the URL and query parts of a URL by substituting the route's +subsequent calls.

Returns

RouteView | Promise<RouteView>

The View class/alias/constant.

Defined in

packages/core/src/router/AbstractRoute.ts:185


isAsync

isAsync(module): boolean

Checks if given argument is an async handler.

Parameters

NameType
moduleunknown

Returns

boolean

Defined in

packages/core/src/router/AbstractRoute.ts:139


isControllerResolved

isControllerResolved(): boolean

Returns true for resolved controller. This is always true +for sync route views.

Returns

boolean

Defined in

packages/core/src/router/AbstractRoute.ts:173


isViewResolved

isViewResolved(): boolean

Returns true for resolved view. This is always true +for sync route views.

Returns

boolean

Defined in

packages/core/src/router/AbstractRoute.ts:203


matches

matches(path): boolean

Tests whether the provided URL path matches this route. The provided +path may contain the query.

Parameters

NameTypeDescription
pathstringThe URL path.

Returns

boolean

true if the provided path matches this route.

Defined in

packages/core/src/router/AbstractRoute.ts:271


preload

preload(): Promise<[RouteController, RouteView]>

Preloads dynamically imported view and controller.

Returns

Promise<[RouteController, RouteView]>

Promise.All resolving to [view, controller] tuple.

Defined in

packages/core/src/router/AbstractRoute.ts:239


toPath

toPath(params): string

Creates the URL and query parts of a URL by substituting the route's parameter placeholders by the provided parameter value.

The extraneous parameters that do not match any of the route's placeholders will be appended as the query string.

Parameters

NameTypeDescription
paramsRouteParams<{}>The route parameter values.

Returns

string

Path and, if necessary, query parts of the URL representing this route with its parameters replaced by the -provided parameter values.

Defined in

packages/core/src/router/AbstractRoute.ts:256

- - +provided parameter values.

Defined in

packages/core/src/router/AbstractRoute.ts:256

+ + \ No newline at end of file diff --git a/api/classes/ima_core.AbstractRouter/index.html b/api/classes/ima_core.AbstractRouter/index.html index 7232c81436..baa8a39c25 100644 --- a/api/classes/ima_core.AbstractRouter/index.html +++ b/api/classes/ima_core.AbstractRouter/index.html @@ -4,67 +4,67 @@ Class: AbstractRouter | IMA.js - - + +
-
Skip to main content

Class: AbstractRouter

@ima/core.AbstractRouter

The basic implementation of the Router interface, providing the -common or default functionality for parts of the API.

Hierarchy

Constructors

constructor

new AbstractRouter(pageManager, factory, dispatcher, settings)

Initializes the router.

Parameters

NameTypeDescription
pageManagerPageManagerThe page manager handling UI rendering, and transitions between pages if at the client side.
factoryRouteFactoryFactory for routes.
dispatcherDispatcherDispatcher fires events to app.
settingsundefined | number | { isSPARouted?: (url: string, action?: RouteAction) => boolean ; middlewareTimeout?: number }-

Example

router.link('article', {articleId: 1});

Example

router.redirect('http://www.example.com/web');

Example

router.add(
'home',
'/',
ns.app.page.home.Controller,
ns.app.page.home.View,
{
onlyUpdate: false,
autoScroll: true,
documentView: null,
managedRootView: null,
viewAdapter: null
}
);

Overrides

Router.constructor

Defined in

packages/core/src/router/AbstractRouter.ts:125

Properties

_currentMiddlewareId

Protected _currentMiddlewareId: number = 0

Middleware ID counter which is used to auto-generate unique middleware -names when adding them to routeHandlers map.

Defined in

packages/core/src/router/AbstractRouter.ts:92


_currentlyRoutedPath

Protected _currentlyRoutedPath: string = ''

Defined in

packages/core/src/router/AbstractRouter.ts:93


_dispatcher

Protected _dispatcher: Dispatcher

Dispatcher fires events to app.

Defined in

packages/core/src/router/AbstractRouter.ts:62


_factory

Protected _factory: RouteFactory

Factory for routes.

Defined in

packages/core/src/router/AbstractRouter.ts:58


_host

Protected _host: string = ''

The application's host.

Defined in

packages/core/src/router/AbstractRouter.ts:71


_isSPARouted

Protected _isSPARouted: undefined | (url: string, action?: RouteAction) => boolean

Defined in

packages/core/src/router/AbstractRouter.ts:95


_languagePartPath

Protected _languagePartPath: string = ''

The URL path fragment used as a suffix to the _root field -that specifies the current language.

Defined in

packages/core/src/router/AbstractRouter.ts:80


_middlewareTimeout

Protected _middlewareTimeout: number

Defined in

packages/core/src/router/AbstractRouter.ts:94


_pageManager

Protected _pageManager: PageManager

The page manager handling UI rendering, and transitions between -pages if at the client side.

Defined in

packages/core/src/router/AbstractRouter.ts:54


_protocol

Protected _protocol: string = ''

The current protocol used to access the application, terminated by a -colon (for example https:).

Defined in

packages/core/src/router/AbstractRouter.ts:67


_root

Protected _root: string = ''

The URL path pointing to the application's root.

Defined in

packages/core/src/router/AbstractRouter.ts:75


_routeHandlers

Protected _routeHandlers: Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Storage of all known routes and middlewares. The key are their names.

Defined in

packages/core/src/router/AbstractRouter.ts:84

Methods

#addParamsFromOriginalRoute

Private #addParamsFromOriginalRoute(params): Object

Obtains original route that was handled before not-found / error route +

Class: AbstractRouter

@ima/core.AbstractRouter

The basic implementation of the Router interface, providing the +common or default functionality for parts of the API.

Hierarchy

Constructors

constructor

new AbstractRouter(pageManager, factory, dispatcher, settings)

Initializes the router.

Parameters

NameTypeDescription
pageManagerPageManagerThe page manager handling UI rendering, and transitions between pages if at the client side.
factoryRouteFactoryFactory for routes.
dispatcherDispatcherDispatcher fires events to app.
settingsundefined | number | { isSPARouted?: (url: string, action?: RouteAction) => boolean ; middlewareTimeout?: number }-

Example

router.link('article', {articleId: 1});

Example

router.redirect('http://www.example.com/web');

Example

router.add(
'home',
'/',
ns.app.page.home.Controller,
ns.app.page.home.View,
{
onlyUpdate: false,
autoScroll: true,
documentView: null,
managedRootView: null,
viewAdapter: null
}
);

Overrides

Router.constructor

Defined in

packages/core/src/router/AbstractRouter.ts:125

Properties

_currentMiddlewareId

Protected _currentMiddlewareId: number = 0

Middleware ID counter which is used to auto-generate unique middleware +names when adding them to routeHandlers map.

Defined in

packages/core/src/router/AbstractRouter.ts:92


_currentlyRoutedPath

Protected _currentlyRoutedPath: string = ''

Defined in

packages/core/src/router/AbstractRouter.ts:93


_dispatcher

Protected _dispatcher: Dispatcher

Dispatcher fires events to app.

Defined in

packages/core/src/router/AbstractRouter.ts:62


_factory

Protected _factory: RouteFactory

Factory for routes.

Defined in

packages/core/src/router/AbstractRouter.ts:58


_host

Protected _host: string = ''

The application's host.

Defined in

packages/core/src/router/AbstractRouter.ts:71


_isSPARouted

Protected _isSPARouted: undefined | (url: string, action?: RouteAction) => boolean

Defined in

packages/core/src/router/AbstractRouter.ts:95


_languagePartPath

Protected _languagePartPath: string = ''

The URL path fragment used as a suffix to the _root field +that specifies the current language.

Defined in

packages/core/src/router/AbstractRouter.ts:80


_middlewareTimeout

Protected _middlewareTimeout: number

Defined in

packages/core/src/router/AbstractRouter.ts:94


_pageManager

Protected _pageManager: PageManager

The page manager handling UI rendering, and transitions between +pages if at the client side.

Defined in

packages/core/src/router/AbstractRouter.ts:54


_protocol

Protected _protocol: string = ''

The current protocol used to access the application, terminated by a +colon (for example https:).

Defined in

packages/core/src/router/AbstractRouter.ts:67


_root

Protected _root: string = ''

The URL path pointing to the application's root.

Defined in

packages/core/src/router/AbstractRouter.ts:75


_routeHandlers

Protected _routeHandlers: Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Storage of all known routes and middlewares. The key are their names.

Defined in

packages/core/src/router/AbstractRouter.ts:84

Methods

#addParamsFromOriginalRoute

Private #addParamsFromOriginalRoute(params): Object

Obtains original route that was handled before not-found / error route and assigns its params to current params

Parameters

NameTypeDescription
paramsRouteParamsRoute params for not-found or error page

Returns

Object

Provided params merged with params -from original route

Defined in

packages/core/src/router/AbstractRouter.ts:733


_extractRoutePath

Protected _extractRoutePath(path): string

Strips the URL path part that points to the application's root (base -URL) from the provided path.

Parameters

NameTypeDescription
pathstringRelative or absolute URL path.

Returns

string

URL path relative to the application's base URL.

Defined in

packages/core/src/router/AbstractRouter.ts:526


_getCurrentlyRoutedPath

_getCurrentlyRoutedPath(): string

Returns path that is stored in private property when a route -method is called.

Returns

string

Defined in

packages/core/src/router/AbstractRouter.ts:664


_getMiddlewaresForRoute

_getMiddlewaresForRoute(routeName): RouterMiddleware[]

Returns middlewares preceding given route name.

Parameters

NameType
routeNamestring

Returns

RouterMiddleware[]

Defined in

packages/core/src/router/AbstractRouter.ts:642


_handle

_handle(route, params, options?, action?): Promise<void | UnknownParameters>

Handles the provided route and parameters by initializing the route's +from original route

Defined in

packages/core/src/router/AbstractRouter.ts:733


_extractRoutePath

Protected _extractRoutePath(path): string

Strips the URL path part that points to the application's root (base +URL) from the provided path.

Parameters

NameTypeDescription
pathstringRelative or absolute URL path.

Returns

string

URL path relative to the application's base URL.

Defined in

packages/core/src/router/AbstractRouter.ts:526


_getCurrentlyRoutedPath

_getCurrentlyRoutedPath(): string

Returns path that is stored in private property when a route +method is called.

Returns

string

Defined in

packages/core/src/router/AbstractRouter.ts:664


_getMiddlewaresForRoute

_getMiddlewaresForRoute(routeName): RouterMiddleware[]

Returns middlewares preceding given route name.

Parameters

NameType
routeNamestring

Returns

RouterMiddleware[]

Defined in

packages/core/src/router/AbstractRouter.ts:642


_handle

_handle(route, params, options?, action?): Promise<void | UnknownParameters>

Handles the provided route and parameters by initializing the route's controller and rendering its state via the route's view.

The result is then sent to the client if used at the server side, or displayed if used as the client side.

Parameters

NameTypeDescription
routeAbstractRoute<string | RoutePathExpression>The route that should have its associated controller rendered via the associated view.
paramsRouteParamsParameters extracted from the URL path and query.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
action?RouteActionAn action object describing what triggered this routing.

Returns

Promise<void | UnknownParameters>

A promise that resolves when the page is rendered and the result is sent to the client, or -displayed if used at the client side.

Defined in

packages/core/src/router/AbstractRouter.ts:549


_runMiddlewares

_runMiddlewares(middlewares, params, locals): Promise<void>

Runs provided middlewares in sequence.

Parameters

NameTypeDescription
middlewaresundefined | RouterMiddleware[]Array of middlewares.
paramsRouteParamsRouter params that can be mutated by middlewares.
localsRouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void>

Defined in

packages/core/src/router/AbstractRouter.ts:677


add

add(name, pathExpression, controller, view, options?): AbstractRouter

Adds a new route to router.

Parameters

NameTypeDescription
namestringThe unique name of this route, identifying it among the rest of the routes in the application.
pathExpressionstringA path expression specifying the URL path part matching this route (must not contain a query string), optionally containing named parameter placeholders specified as :parameterName. The name of the parameter is terminated by a forward slash (/) or the end of the path expression string. The path expression may also contain optional parameters, which are specified as :?parameterName. It is recommended to specify the optional parameters at the end of the path expression.
controllerAsyncRouteControllerThe full name of Object Container alias identifying the controller associated with this route.
viewAsyncRouteViewThe full name or Object Container alias identifying the view class associated with this route.
options?Partial<RouteOptions>Additional route options, specified how the navigation to the route will be handled. The onlyUpdate can be either a flag signalling whether the current controller and view instances should be kept if they match the ones used by the previous route; or a callback function that will receive the previous controller and view identifiers used in the previously matching route, and returns a boolean representing the value of the flag. This flag is disabled by default. The autoScroll flag signals whether the page should be scrolled to the top when the navigation takes place. This flag is enabled by default.

Returns

AbstractRouter

This router.

Throws

Thrown if a route with the same name already exists.

Overrides

Router.add

Defined in

packages/core/src/router/AbstractRouter.ts:167


getBaseUrl

getBaseUrl(): string

Returns the application's absolute base URL, pointing to the public root -of the application.

Returns

string

The application's base URL.

Overrides

Router.getBaseUrl

Defined in

packages/core/src/router/AbstractRouter.ts:243


getCurrentRouteInfo

getCurrentRouteInfo(): Object

Returns the information about the currently active route.

Returns

Object

NameType
paramsRouteParams<{}>
pathstring
routeAbstractRoute<string | RoutePathExpression>

Throws

Thrown if a route is not define for current path.

Overrides

Router.getCurrentRouteInfo

Defined in

packages/core/src/router/AbstractRouter.ts:271


getDomain

getDomain(): string

Returns the application's domain in the following form -${protocol}//${host}.

Returns

string

The current application's domain.

Overrides

Router.getDomain

Defined in

packages/core/src/router/AbstractRouter.ts:250


getHost

getHost(): string

Returns application's host (domain and, if necessary, the port number).

Returns

string

The current application's host.

Overrides

Router.getHost

Defined in

packages/core/src/router/AbstractRouter.ts:257


getPath

getPath(): string

Returns the current path part of the current URL, including the query -string (if any).

Returns

string

The path and query parts of the current URL.

Overrides

Router.getPath

Defined in

packages/core/src/router/AbstractRouter.ts:227


getProtocol

getProtocol(): string

Returns the current protocol used to access the application, terminated +displayed if used at the client side.

Defined in

packages/core/src/router/AbstractRouter.ts:549


_runMiddlewares

_runMiddlewares(middlewares, params, locals): Promise<void>

Runs provided middlewares in sequence.

Parameters

NameTypeDescription
middlewaresundefined | RouterMiddleware[]Array of middlewares.
paramsRouteParamsRouter params that can be mutated by middlewares.
localsRouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void>

Defined in

packages/core/src/router/AbstractRouter.ts:677


add

add(name, pathExpression, controller, view, options?): AbstractRouter

Adds a new route to router.

Parameters

NameTypeDescription
namestringThe unique name of this route, identifying it among the rest of the routes in the application.
pathExpressionstringA path expression specifying the URL path part matching this route (must not contain a query string), optionally containing named parameter placeholders specified as :parameterName. The name of the parameter is terminated by a forward slash (/) or the end of the path expression string. The path expression may also contain optional parameters, which are specified as :?parameterName. It is recommended to specify the optional parameters at the end of the path expression.
controllerAsyncRouteControllerThe full name of Object Container alias identifying the controller associated with this route.
viewAsyncRouteViewThe full name or Object Container alias identifying the view class associated with this route.
options?Partial<RouteOptions>Additional route options, specified how the navigation to the route will be handled. The onlyUpdate can be either a flag signalling whether the current controller and view instances should be kept if they match the ones used by the previous route; or a callback function that will receive the previous controller and view identifiers used in the previously matching route, and returns a boolean representing the value of the flag. This flag is disabled by default. The autoScroll flag signals whether the page should be scrolled to the top when the navigation takes place. This flag is enabled by default.

Returns

AbstractRouter

This router.

Throws

Thrown if a route with the same name already exists.

Overrides

Router.add

Defined in

packages/core/src/router/AbstractRouter.ts:167


getBaseUrl

getBaseUrl(): string

Returns the application's absolute base URL, pointing to the public root +of the application.

Returns

string

The application's base URL.

Overrides

Router.getBaseUrl

Defined in

packages/core/src/router/AbstractRouter.ts:243


getCurrentRouteInfo

getCurrentRouteInfo(): Object

Returns the information about the currently active route.

Returns

Object

NameType
paramsRouteParams<{}>
pathstring
routeAbstractRoute<string | RoutePathExpression>

Throws

Thrown if a route is not define for current path.

Overrides

Router.getCurrentRouteInfo

Defined in

packages/core/src/router/AbstractRouter.ts:271


getDomain

getDomain(): string

Returns the application's domain in the following form +${protocol}//${host}.

Returns

string

The current application's domain.

Overrides

Router.getDomain

Defined in

packages/core/src/router/AbstractRouter.ts:250


getHost

getHost(): string

Returns application's host (domain and, if necessary, the port number).

Returns

string

The current application's host.

Overrides

Router.getHost

Defined in

packages/core/src/router/AbstractRouter.ts:257


getPath

getPath(): string

Returns the current path part of the current URL, including the query +string (if any).

Returns

string

The path and query parts of the current URL.

Overrides

Router.getPath

Defined in

packages/core/src/router/AbstractRouter.ts:227


getProtocol

getProtocol(): string

Returns the current protocol used to access the application, terminated by a colon (for example https:).

Returns

string

The current application protocol used to access the -application.

Overrides

Router.getProtocol

Defined in

packages/core/src/router/AbstractRouter.ts:264


getRouteHandler

getRouteHandler(name): undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Returns specified handler from registered route handlers.

Parameters

NameTypeDescription
namestringThe route's unique name.

Returns

undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Route with given name or undefined.

Overrides

Router.getRouteHandler

Defined in

packages/core/src/router/AbstractRouter.ts:220


getRouteHandlers

getRouteHandlers(): Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Returns

Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Inherit Doc

Defined in

packages/core/src/router/AbstractRouter.ts:297


getRouteHandlersByPath

getRouteHandlersByPath(path): Object

Returns the route matching the provided URL path part (the path may +application.

Overrides

Router.getProtocol

Defined in

packages/core/src/router/AbstractRouter.ts:264


getRouteHandler

getRouteHandler(name): undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Returns specified handler from registered route handlers.

Parameters

NameTypeDescription
namestringThe route's unique name.

Returns

undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Route with given name or undefined.

Overrides

Router.getRouteHandler

Defined in

packages/core/src/router/AbstractRouter.ts:220


getRouteHandlers

getRouteHandlers(): Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Returns

Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Inherit Doc

Defined in

packages/core/src/router/AbstractRouter.ts:297


getRouteHandlersByPath

getRouteHandlersByPath(path): Object

Returns the route matching the provided URL path part (the path may contain a query) and all middlewares preceding this route definition.

Parameters

NameTypeDescription
pathstringThe URL path.

Returns

Object

The route matching the path and middlewares preceding it or {} -(empty object) if no such route exists.

NameType
middlewaresRouterMiddleware[]
route?AbstractRoute<string | RoutePathExpression>

Defined in

packages/core/src/router/AbstractRouter.ts:615


getUrl

getUrl(): string

Returns the current absolute URL (including protocol, host, query, etc).

Returns

string

The current absolute URL.

Overrides

Router.getUrl

Defined in

packages/core/src/router/AbstractRouter.ts:236


handleError

handleError(params, options?, locals?): Promise<void | UnknownParameters>

Handles an internal server error by responding with the appropriate +(empty object) if no such route exists.

NameType
middlewaresRouterMiddleware[]
route?AbstractRoute<string | RoutePathExpression>

Defined in

packages/core/src/router/AbstractRouter.ts:615


getUrl

getUrl(): string

Returns the current absolute URL (including protocol, host, query, etc).

Returns

string

The current absolute URL.

Overrides

Router.getUrl

Defined in

packages/core/src/router/AbstractRouter.ts:236


handleError

handleError(params, options?, locals?): Promise<void | UnknownParameters>

Handles an internal server error by responding with the appropriate "internal server error" error page.

Parameters

NameTypeDescription
paramsRouteParamsParameters extracted from the current URL path and query.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void | UnknownParameters>

A promise resolved when the error has been handled and the response has been sent to the client, -or displayed if used at the client side.

Overrides

Router.handleError

Defined in

packages/core/src/router/AbstractRouter.ts:402


handleNotFound

handleNotFound(params, options?, locals?): Promise<void | UnknownParameters>

Handles a "not found" error by responding with the appropriate "not +or displayed if used at the client side.

Overrides

Router.handleError

Defined in

packages/core/src/router/AbstractRouter.ts:402


handleNotFound

handleNotFound(params, options?, locals?): Promise<void | UnknownParameters>

Handles a "not found" error by responding with the appropriate "not found" error page.

Parameters

NameTypeDescription
paramsRouteParamsParameters extracted from the current URL path and query.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void | UnknownParameters>

A promise resolved when the error has been handled and the response has been sent -to the client, or displayed if used at the client side.

Overrides

Router.handleNotFound

Defined in

packages/core/src/router/AbstractRouter.ts:454


init

init(config): void

Initializes the router with the provided configuration.

Parameters

NameTypeDescription
configObjectRouter configuration. The $Protocol field must be the current protocol used to access the application, terminated by a colon (for example https:). The $Root field must specify the URL path pointing to the application's root. The $LanguagePartPath field must be the URL path fragment used as a suffix to the $Root field that specifies the current language. The $Host field must be the application's domain (and the port number if other than the default is used) in the following form: ${protocol}//${host}.
config.$Hoststring-
config.$LanguagePartPath?string-
config.$Protocol?string-
config.$Root?string-

Returns

void

Overrides

Router.init

Defined in

packages/core/src/router/AbstractRouter.ts:151


isClientError

isClientError(reason): boolean

Tests, if possible, whether the specified error was caused by the +to the client, or displayed if used at the client side.

Overrides

Router.handleNotFound

Defined in

packages/core/src/router/AbstractRouter.ts:454


init

init(config): void

Initializes the router with the provided configuration.

Parameters

NameTypeDescription
configObjectRouter configuration. The $Protocol field must be the current protocol used to access the application, terminated by a colon (for example https:). The $Root field must specify the URL path pointing to the application's root. The $LanguagePartPath field must be the URL path fragment used as a suffix to the $Root field that specifies the current language. The $Host field must be the application's domain (and the port number if other than the default is used) in the following form: ${protocol}//${host}.
config.$Hoststring-
config.$LanguagePartPath?string-
config.$Protocol?string-
config.$Root?string-

Returns

void

Overrides

Router.init

Defined in

packages/core/src/router/AbstractRouter.ts:151


isClientError

isClientError(reason): boolean

Tests, if possible, whether the specified error was caused by the client's action (for example wrong URL or request encoding) or by a failure at the server side.

Parameters

NameTypeDescription
reasonError | ErrorThe encountered error.

Returns

boolean

true if the error was caused the action of the -client.

Overrides

Router.isClientError

Defined in

packages/core/src/router/AbstractRouter.ts:507


isRedirection

isRedirection(reason): boolean

Tests, if possible, whether the specified error lead to redirection.

Parameters

NameTypeDescription
reasonError | ErrorThe encountered error.

Returns

boolean

true if the error was caused the action of the -redirection.

Overrides

Router.isRedirection

Defined in

packages/core/src/router/AbstractRouter.ts:514


link(routeName, params): string

Generates an absolute URL (including protocol, domain, etc) for the +client.

Overrides

Router.isClientError

Defined in

packages/core/src/router/AbstractRouter.ts:507


isRedirection

isRedirection(reason): boolean

Tests, if possible, whether the specified error lead to redirection.

Parameters

NameTypeDescription
reasonError | ErrorThe encountered error.

Returns

boolean

true if the error was caused the action of the +redirection.

Overrides

Router.isRedirection

Defined in

packages/core/src/router/AbstractRouter.ts:514


link(routeName, params): string

Generates an absolute URL (including protocol, domain, etc) for the specified route by substituting the route's parameter placeholders with -the provided parameter values.

Parameters

NameTypeDescription
routeNamestringThe unique name of the route, identifying the route to use.
paramsRouteParamsParameter values for the route's parameter placeholders. Extraneous parameters will be added as URL query.

Returns

string

An absolute URL for the specified route and parameters.

Overrides

Router.link

Defined in

packages/core/src/router/AbstractRouter.ts:338


listen

listen(): AbstractRouter

Registers event listeners at the client side window object allowing the +the provided parameter values.

Parameters

NameTypeDescription
routeNamestringThe unique name of the route, identifying the route to use.
paramsRouteParamsParameter values for the route's parameter placeholders. Extraneous parameters will be added as URL query.

Returns

string

An absolute URL for the specified route and parameters.

Overrides

Router.link

Defined in

packages/core/src/router/AbstractRouter.ts:338


listen

listen(): AbstractRouter

Registers event listeners at the client side window object allowing the router to capture user's history (history pop state - going "back") and page (clicking links) navigation.

The router will start processing the navigation internally, handling the user's navigation to display the page related to the URL resulting from the user's action.

Note that the router will not prevent forms from being submitted to the server.

The effects of this method can be reverted with unlisten. This -method has no effect at the server side.

Returns

AbstractRouter

This router.

Overrides

Router.listen

Defined in

packages/core/src/router/AbstractRouter.ts:305


redirect

redirect(url, options?, action?, locals?): void

Redirects the client to the specified location.

At the server side the method results in responding to the client with a +method has no effect at the server side.

Returns

AbstractRouter

This router.

Overrides

Router.listen

Defined in

packages/core/src/router/AbstractRouter.ts:305


redirect

redirect(url, options?, action?, locals?): void

Redirects the client to the specified location.

At the server side the method results in responding to the client with a redirect HTTP status code and the Location header.

At the client side the method updates the current URL by manipulating the browser history (if the target URL is at the same domain and protocol as the current one) or performs a hard redirect (if the target URL points to a different protocol or domain).

The method will result in the router handling the new URL and routing the client to the related page if the URL is set at the client side and -points to the same domain and protocol.

Parameters

NameTypeDescription
urlstringThe URL to which the client should be redirected.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
action?RouteActionAn action object describing what triggered this routing.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

void

Overrides

Router.redirect

Defined in

packages/core/src/router/AbstractRouter.ts:323


remove

remove(name): AbstractRouter

Removes the specified route from the router's known routes.

Parameters

NameTypeDescription
namestringThe route's unique name, identifying the route to remove.

Returns

AbstractRouter

This router.

Overrides

Router.remove

Defined in

packages/core/src/router/AbstractRouter.ts:211


route

route(path, options?, action?, locals?): Promise<void | UnknownParameters>

Routes the application to the route matching the providing path, renders +points to the same domain and protocol.

Parameters

NameTypeDescription
urlstringThe URL to which the client should be redirected.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
action?RouteActionAn action object describing what triggered this routing.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

void

Overrides

Router.redirect

Defined in

packages/core/src/router/AbstractRouter.ts:323


remove

remove(name): AbstractRouter

Removes the specified route from the router's known routes.

Parameters

NameTypeDescription
namestringThe route's unique name, identifying the route to remove.

Returns

AbstractRouter

This router.

Overrides

Router.remove

Defined in

packages/core/src/router/AbstractRouter.ts:211


route

route(path, options?, action?, locals?): Promise<void | UnknownParameters>

Routes the application to the route matching the providing path, renders the route page and sends the result to the client.

Parameters

NameTypeDescription
pathstringThe URL path part received from the client, with optional query.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
action?RouteActionAn action object describing what triggered this routing.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void | UnknownParameters>

A promise resolved when the error has been handled and the response has been sent -to the client, or displayed if used at the client side.

Overrides

Router.route

Defined in

packages/core/src/router/AbstractRouter.ts:363


unlisten

unlisten(): AbstractRouter

Unregisters event listeners at the client side window object allowing the +to the client, or displayed if used at the client side.

Overrides

Router.route

Defined in

packages/core/src/router/AbstractRouter.ts:363


unlisten

unlisten(): AbstractRouter

Unregisters event listeners at the client side window object allowing the router to capture user's history (history pop state - going "back") and page (clicking links) navigation.

The router will stop processing the navigation internally, handling the user's navigation to display the page related to the URL resulting from the user's action.

Note that the router will not prevent forms from being submitted to the server.

The effects of this method can be reverted with unlisten. This method has no effect -at the server side.

Returns

AbstractRouter

This router.

Overrides

Router.unlisten

Defined in

packages/core/src/router/AbstractRouter.ts:314


use

use(middleware): AbstractRouter

Adds a new middleware to router.

Parameters

NameTypeDescription
middlewareRouterMiddlewareMiddleware function accepting routeParams as a first argument, which can be mutated and locals object as second argument. This can be used to pass data between middlewares.

Returns

AbstractRouter

This router.

Throws

Thrown if a middleware with the same name already exists.

Overrides

Router.use

Defined in

packages/core/src/router/AbstractRouter.ts:199

- - +at the server side.

Returns

AbstractRouter

This router.

Overrides

Router.unlisten

Defined in

packages/core/src/router/AbstractRouter.ts:314


use

use(middleware): AbstractRouter

Adds a new middleware to router.

Parameters

NameTypeDescription
middlewareRouterMiddlewareMiddleware function accepting routeParams as a first argument, which can be mutated and locals object as second argument. This can be used to pass data between middlewares.

Returns

AbstractRouter

This router.

Throws

Thrown if a middleware with the same name already exists.

Overrides

Router.use

Defined in

packages/core/src/router/AbstractRouter.ts:199

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Bootstrap/index.html b/api/classes/ima_core.Bootstrap/index.html index 3aa90d1c81..ea500a1d57 100644 --- a/api/classes/ima_core.Bootstrap/index.html +++ b/api/classes/ima_core.Bootstrap/index.html @@ -4,24 +4,24 @@ Class: Bootstrap | IMA.js - - + +
-
Skip to main content

Class: Bootstrap

@ima/core.Bootstrap

Application bootstrap used to initialize the environment and the application -itself.

Constructors

constructor

new Bootstrap(oc)

Initializes the bootstrap.

Parameters

NameTypeDescription
ocObjectContainerThe application's object container to use for managing dependencies.

Defined in

packages/core/src/Bootstrap.ts:133

Properties

_config

Protected _config: BootConfig

Defined in

packages/core/src/Bootstrap.ts:125


_oc

Protected _oc: ObjectContainer

Defined in

packages/core/src/Bootstrap.ts:124

Methods

_bindDependencies

_bindDependencies(): void

Binds the constants, service providers and class dependencies to the -object container.

Returns

void

Defined in

packages/core/src/Bootstrap.ts:266


_bindPluginDependencies

_bindPluginDependencies(name, plugin): void

Binds the constants, service providers and class dependencies to the -object container for dynamically imported plugins.

Parameters

NameTypeDescription
namestringPlugin name.
pluginInitPluginConfigPlugin interface (object with init functions).

Returns

void

Defined in

packages/core/src/Bootstrap.ts:298


_initPluginServices

_initPluginServices(plugin): void

Service initialization for the dynamically loaded plugins.

Parameters

NameTypeDescription
pluginInitPluginConfigPlugin interface (object with init functions).

Returns

void

Defined in

packages/core/src/Bootstrap.ts:336


_initPluginSettings

_initPluginSettings(name, plugin): void

Initializes dynamically loaded plugin settings (if the init +

Class: Bootstrap

@ima/core.Bootstrap

Application bootstrap used to initialize the environment and the application +itself.

Constructors

constructor

new Bootstrap(oc)

Initializes the bootstrap.

Parameters

NameTypeDescription
ocObjectContainerThe application's object container to use for managing dependencies.

Defined in

packages/core/src/Bootstrap.ts:133

Properties

_config

Protected _config: BootConfig

Defined in

packages/core/src/Bootstrap.ts:125


_oc

Protected _oc: ObjectContainer

Defined in

packages/core/src/Bootstrap.ts:124

Methods

_bindDependencies

_bindDependencies(): void

Binds the constants, service providers and class dependencies to the +object container.

Returns

void

Defined in

packages/core/src/Bootstrap.ts:266


_bindPluginDependencies

_bindPluginDependencies(name, plugin): void

Binds the constants, service providers and class dependencies to the +object container for dynamically imported plugins.

Parameters

NameTypeDescription
namestringPlugin name.
pluginInitPluginConfigPlugin interface (object with init functions).

Returns

void

Defined in

packages/core/src/Bootstrap.ts:298


_initPluginServices

_initPluginServices(plugin): void

Service initialization for the dynamically loaded plugins.

Parameters

NameTypeDescription
pluginInitPluginConfigPlugin interface (object with init functions).

Returns

void

Defined in

packages/core/src/Bootstrap.ts:336


_initPluginSettings

_initPluginSettings(name, plugin): void

Initializes dynamically loaded plugin settings (if the init function is provided). The settings are merged into the application the same way as with non-dynamic import, meaning the app setting overrides -are prioritized over the default plugin settings.

Parameters

NameTypeDescription
namestringPlugin name.
pluginInitPluginConfigPlugin interface (object with init functions).

Returns

void

Defined in

packages/core/src/Bootstrap.ts:230


_initRoutes

_initRoutes(): void

Initializes the routes.

Returns

void

Defined in

packages/core/src/Bootstrap.ts:311


_initServices

_initServices(): void

Initializes the basic application services.

Returns

void

Defined in

packages/core/src/Bootstrap.ts:319


_initSettings

_initSettings(): void

Initializes the application settings. The method loads the settings for +are prioritized over the default plugin settings.

Parameters

NameTypeDescription
namestringPlugin name.
pluginInitPluginConfigPlugin interface (object with init functions).

Returns

void

Defined in

packages/core/src/Bootstrap.ts:230


_initRoutes

_initRoutes(): void

Initializes the routes.

Returns

void

Defined in

packages/core/src/Bootstrap.ts:311


_initServices

_initServices(): void

Initializes the basic application services.

Returns

void

Defined in

packages/core/src/Bootstrap.ts:319


_initSettings

_initSettings(): void

Initializes the application settings. The method loads the settings for all environments and then picks the settings for the current environment.

The method also handles using the values in the production environment -as default values for configuration items in other environments.

Returns

void

Defined in

packages/core/src/Bootstrap.ts:186


initPlugin

initPlugin(name, plugin?): void

Initializes dynamically loaded plugin. This is explicitly called from -within the Plugin Loader instance.

Parameters

NameTypeDescription
namestringPlugin name.
plugin?InitPluginConfigPlugin interface (object with init functions).

Returns

void

Defined in

packages/core/src/Bootstrap.ts:169


run

run(config): void

Initializes the application by running the bootstrap sequence. The +as default values for configuration items in other environments.

Returns

void

Defined in

packages/core/src/Bootstrap.ts:186


initPlugin

initPlugin(name, plugin?): void

Initializes dynamically loaded plugin. This is explicitly called from +within the Plugin Loader instance.

Parameters

NameTypeDescription
namestringPlugin name.
plugin?InitPluginConfigPlugin interface (object with init functions).

Returns

void

Defined in

packages/core/src/Bootstrap.ts:169


run

run(config): void

Initializes the application by running the bootstrap sequence. The sequence initializes the components of the application in the following -order:

  • application settings
  • constants, service providers and class dependencies configuration
  • services
  • UI components
  • routing

Parameters

NameTypeDescription
configBootConfigThe application environment configuration for the current environment.

Returns

void

Defined in

packages/core/src/Bootstrap.ts:153

- - +order:

  • application settings
  • constants, service providers and class dependencies configuration
  • services
  • UI components
  • routing

Parameters

NameTypeDescription
configBootConfigThe application environment configuration for the current environment.

Returns

void

Defined in

packages/core/src/Bootstrap.ts:153

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Cache/index.html b/api/classes/ima_core.Cache/index.html index 586ac1b839..240b76415a 100644 --- a/api/classes/ima_core.Cache/index.html +++ b/api/classes/ima_core.Cache/index.html @@ -4,30 +4,30 @@ Class: Cache<V> | IMA.js - - + +
-
Skip to main content

Class: Cache<V>

@ima/core.Cache

The cache provides a temporary storage for expirable information. The +

Class: Cache<V>

@ima/core.Cache

The cache provides a temporary storage for expirable information. The primary use of a cache is caching information obtained via costly means (CPU-heavy computation or networking) to speed up the application's -performance when the same information needs to be retrieved multiple times.

Type parameters

NameType
Vunknown

Hierarchy

Constructors

constructor

new Cache<V>()

Type parameters

NameType
Vunknown

Methods

clear

clear(): void

Clears the cache by deleting all entries.

Returns

void

Defined in

packages/core/src/cache/Cache.ts:15


delete

delete(key): void

Deletes the specified cache entry. The method has no effect if the entry -does not exist.

Parameters

NameTypeDescription
keystringThe identifier of the cache entry.

Returns

void

Defined in

packages/core/src/cache/Cache.ts:69


deserialize

deserialize(serializedData): void

Loads the provided serialized cache data into this cache. Entries +performance when the same information needs to be retrieved multiple times.

Type parameters

NameType
Vunknown

Hierarchy

Constructors

constructor

new Cache<V>()

Type parameters

NameType
Vunknown

Methods

clear

clear(): void

Clears the cache by deleting all entries.

Returns

void

Defined in

packages/core/src/cache/Cache.ts:15


delete

delete(key): void

Deletes the specified cache entry. The method has no effect if the entry +does not exist.

Parameters

NameTypeDescription
keystringThe identifier of the cache entry.

Returns

void

Defined in

packages/core/src/cache/Cache.ts:69


deserialize

deserialize(serializedData): void

Loads the provided serialized cache data into this cache. Entries present in this cache but not specified in the provided data will remain -in this cache intact.

Parameters

NameTypeDescription
serializedDataSerializedData<V>An object representing the state of the cache to load, obtained by parsing the JSON string returned by the serialize method.

Returns

void

Defined in

packages/core/src/cache/Cache.ts:118


disable

disable(): void

Disables the cache, preventing the retrieval of any cached entries and +in this cache intact.

Parameters

NameTypeDescription
serializedDataSerializedData<V>An object representing the state of the cache to load, obtained by parsing the JSON string returned by the serialize method.

Returns

void

Defined in

packages/core/src/cache/Cache.ts:118


disable

disable(): void

Disables the cache, preventing the retrieval of any cached entries and reporting all cache entries as non-existing. Disabling the cache does not however prevent modifying the existing or creating new cache -entries.

Disabling the cache also clears all of its current entries.

The method has no effect if the cache is already disabled.

Returns

void

Defined in

packages/core/src/cache/Cache.ts:83


enable

enable(): void

Enables the cache, allowing the retrieval of cache entries.

The method has no effect if the cache is already enabled.

Returns

void

Defined in

packages/core/src/cache/Cache.ts:92


get

get(key): null | V

Returns the value of the entry identified by the specified key.

The method returns null if the specified entry does not exist, has +entries.

Disabling the cache also clears all of its current entries.

The method has no effect if the cache is already disabled.

Returns

void

Defined in

packages/core/src/cache/Cache.ts:83


enable

enable(): void

Enables the cache, allowing the retrieval of cache entries.

The method has no effect if the cache is already enabled.

Returns

void

Defined in

packages/core/src/cache/Cache.ts:92


get

get(key): null | V

Returns the value of the entry identified by the specified key.

The method returns null if the specified entry does not exist, has already expired, or the cache is currently disabled.

Parameters

NameTypeDescription
keystringThe identifier of the cache entry.

Returns

null | V

The value of the specified cache entry, or null if the entry -is not available.

Defined in

packages/core/src/cache/Cache.ts:43


has

has(key): boolean

Tests whether the cache contains a fresh entry for the specified key. A +is not available.

Defined in

packages/core/src/cache/Cache.ts:43


has

has(key): boolean

Tests whether the cache contains a fresh entry for the specified key. A cache entry is fresh if the has not expired its TTL (time to live).

The method always returns false if the cache is currently disabled.

Parameters

NameTypeDescription
keystringThe identifier of the cache entry.

Returns

boolean

true if the cache is enabled, the entry exists and has -not expired yet.

Defined in

packages/core/src/cache/Cache.ts:29


serialize

serialize(): string

Exports the state of this cache to an HTML-safe JSON string. The data +not expired yet.

Defined in

packages/core/src/cache/Cache.ts:29


serialize

serialize(): string

Exports the state of this cache to an HTML-safe JSON string. The data obtained by parsing the result of this method are compatible with the deserialize method.

Returns

string

A JSON string containing an object representing of the -current state of this cache.

Defined in

packages/core/src/cache/Cache.ts:104


set

set(key, value, ttl?): void

Sets the cache entry identified by the specified key to the provided -value. The entry is created if it does not exist yet.

The method has no effect if the cache is currently disabled.

Parameters

NameTypeDescription
keystringThe identifier of the cache entry.
valueVThe cache entry value.
ttl?string | numberCache entry time to live in milliseconds. The entry will expire after the specified amount of milliseconds. Use null or omit the parameter to use the default TTL of this cache.

Returns

void

Defined in

packages/core/src/cache/Cache.ts:59

- - +current state of this cache.

Defined in

packages/core/src/cache/Cache.ts:104


set

set(key, value, ttl?): void

Sets the cache entry identified by the specified key to the provided +value. The entry is created if it does not exist yet.

The method has no effect if the cache is currently disabled.

Parameters

NameTypeDescription
keystringThe identifier of the cache entry.
valueVThe cache entry value.
ttl?string | numberCache entry time to live in milliseconds. The entry will expire after the specified amount of milliseconds. Use null or omit the parameter to use the default TTL of this cache.

Returns

void

Defined in

packages/core/src/cache/Cache.ts:59

+ + \ No newline at end of file diff --git a/api/classes/ima_core.CacheEntry/index.html b/api/classes/ima_core.CacheEntry/index.html index 60c6585023..5474d5520f 100644 --- a/api/classes/ima_core.CacheEntry/index.html +++ b/api/classes/ima_core.CacheEntry/index.html @@ -4,16 +4,16 @@ Class: CacheEntry<V> | IMA.js - - + +
-
Skip to main content

Class: CacheEntry<V>

@ima/core.CacheEntry

The cache entry is a typed container of cache data used to track the -creation and expiration of cache entries.

Type parameters

Name
V

Constructors

constructor

new CacheEntry<V>(value, ttl)

Initializes the cache entry.

Type parameters

Name
V

Parameters

NameTypeDescription
valueVThe cache entry value.
ttlstring | numberThe time to live in milliseconds.

Defined in

packages/core/src/cache/CacheEntry.ts:33

Properties

_created

Protected _created: number

The timestamp of creation of this cache entry.

Defined in

packages/core/src/cache/CacheEntry.ts:25


_ttl

Protected _ttl: string | number

The time to live in milliseconds. The cache entry is considered -expired after this time.

Defined in

packages/core/src/cache/CacheEntry.ts:20


_value

Protected _value: V

Cache entry value.

Defined in

packages/core/src/cache/CacheEntry.ts:14

Methods

getValue

getValue(): V

Returns the entry value.

Returns

V

Defined in

packages/core/src/cache/CacheEntry.ts:61


isExpired

isExpired(): boolean

Returns true if this entry has expired.

Returns

boolean

true if this entry has expired.

Defined in

packages/core/src/cache/CacheEntry.ts:43


serialize

serialize(): SerializedCacheEntry<V>

Exports this cache entry into a JSON-serializable object.

This entry exported to a -JSON-serializable object.

Returns

SerializedCacheEntry<V>

Defined in

packages/core/src/cache/CacheEntry.ts:54

- - +
Skip to main content

Class: CacheEntry<V>

@ima/core.CacheEntry

The cache entry is a typed container of cache data used to track the +creation and expiration of cache entries.

Type parameters

Name
V

Constructors

constructor

new CacheEntry<V>(value, ttl)

Initializes the cache entry.

Type parameters

Name
V

Parameters

NameTypeDescription
valueVThe cache entry value.
ttlstring | numberThe time to live in milliseconds.

Defined in

packages/core/src/cache/CacheEntry.ts:33

Properties

_created

Protected _created: number

The timestamp of creation of this cache entry.

Defined in

packages/core/src/cache/CacheEntry.ts:25


_ttl

Protected _ttl: string | number

The time to live in milliseconds. The cache entry is considered +expired after this time.

Defined in

packages/core/src/cache/CacheEntry.ts:20


_value

Protected _value: V

Cache entry value.

Defined in

packages/core/src/cache/CacheEntry.ts:14

Methods

getValue

getValue(): V

Returns the entry value.

Returns

V

Defined in

packages/core/src/cache/CacheEntry.ts:61


isExpired

isExpired(): boolean

Returns true if this entry has expired.

Returns

boolean

true if this entry has expired.

Defined in

packages/core/src/cache/CacheEntry.ts:43


serialize

serialize(): SerializedCacheEntry<V>

Exports this cache entry into a JSON-serializable object.

This entry exported to a +JSON-serializable object.

Returns

SerializedCacheEntry<V>

Defined in

packages/core/src/cache/CacheEntry.ts:54

+ + \ No newline at end of file diff --git a/api/classes/ima_core.CacheFactory/index.html b/api/classes/ima_core.CacheFactory/index.html index 7aea9bc804..ebc1b291c7 100644 --- a/api/classes/ima_core.CacheFactory/index.html +++ b/api/classes/ima_core.CacheFactory/index.html @@ -4,13 +4,13 @@ Class: CacheFactory<V> | IMA.js - - + +
-
Skip to main content

Class: CacheFactory<V>

@ima/core.CacheFactory

Factory for creating instances of CacheEntry.

Type parameters

Name
V

Constructors

constructor

new CacheFactory<V>()

Type parameters

Name
V

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/cache/CacheFactory.ts:8

Methods

createCacheEntry

createCacheEntry(value, ttl): CacheEntry<V>

Create a new instance of CacheEntry with value and ttl.

Parameters

NameTypeDescription
valueVThe cache entry value.
ttlstring | numberCache entry time to live in milliseconds. The entry will expire after the specified amount of milliseconds.

Returns

CacheEntry<V>

The created cache entry.

Defined in

packages/core/src/cache/CacheFactory.ts:21

- - +
Skip to main content

Class: CacheFactory<V>

@ima/core.CacheFactory

Factory for creating instances of CacheEntry.

Type parameters

Name
V

Constructors

constructor

new CacheFactory<V>()

Type parameters

Name
V

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/cache/CacheFactory.ts:8

Methods

createCacheEntry

createCacheEntry(value, ttl): CacheEntry<V>

Create a new instance of CacheEntry with value and ttl.

Parameters

NameTypeDescription
valueVThe cache entry value.
ttlstring | numberCache entry time to live in milliseconds. The entry will expire after the specified amount of milliseconds.

Returns

CacheEntry<V>

The created cache entry.

Defined in

packages/core/src/cache/CacheFactory.ts:21

+ + \ No newline at end of file diff --git a/api/classes/ima_core.CacheImpl/index.html b/api/classes/ima_core.CacheImpl/index.html index 30c20a9026..d617f11f2c 100644 --- a/api/classes/ima_core.CacheImpl/index.html +++ b/api/classes/ima_core.CacheImpl/index.html @@ -4,30 +4,30 @@ Class: CacheImpl<V> | IMA.js - - + +
-
Skip to main content

Class: CacheImpl<V>

@ima/core.CacheImpl

Configurable generic implementation of the Cache interface.

Example

if (cache.has('model.articles')) {
return cache.get('model.articles');
} else {
let articles = getArticlesFromStorage();
// cache for an hour
cache.set('model.articles', articles, 60 * 60 * 1000);
}

Type parameters

Name
V

Hierarchy

Constructors

constructor

new CacheImpl<V>(cacheStorage, factory, Helper, config)

Initializes the cache.

Type parameters

Name
V

Parameters

NameTypeDescription
cacheStorageStorage<CacheEntry<V>>The cache entry storage to use.
factoryCacheFactory<V>Which create new instance of cache entry.
Helper__moduleThe IMA.js helper methods.
configObjectThe cache configuration.

Overrides

Cache.constructor

Defined in

packages/core/src/cache/CacheImpl.ts:36

Properties

_Helper

Protected _Helper: __module

Defined in

packages/core/src/cache/CacheImpl.ts:24


_cache

Protected _cache: Storage<CacheEntry<V>>

Defined in

packages/core/src/cache/CacheImpl.ts:22


_enabled

Protected _enabled: boolean

Defined in

packages/core/src/cache/CacheImpl.ts:26


_factory

Protected _factory: CacheFactory<V>

Defined in

packages/core/src/cache/CacheImpl.ts:23


_ttl

Protected _ttl: number

Defined in

packages/core/src/cache/CacheImpl.ts:25

Methods

_canSerializeValue

Private _canSerializeValue(value): boolean

Tests whether the provided value can be serialized into JSON.

Parameters

NameTypeDescription
valueunknownThe value to test whether or not it can be serialized.

Returns

boolean

true if the provided value can be serialized into JSON, -false otherwise.

Defined in

packages/core/src/cache/CacheImpl.ts:202


_clone

Private _clone(value): V

Attempts to clone the provided value, if possible. Values that cannot be +

Class: CacheImpl<V>

@ima/core.CacheImpl

Configurable generic implementation of the Cache interface.

Example

if (cache.has('model.articles')) {
return cache.get('model.articles');
} else {
let articles = getArticlesFromStorage();
// cache for an hour
cache.set('model.articles', articles, 60 * 60 * 1000);
}

Type parameters

Name
V

Hierarchy

Constructors

constructor

new CacheImpl<V>(cacheStorage, factory, Helper, config)

Initializes the cache.

Type parameters

Name
V

Parameters

NameTypeDescription
cacheStorageStorage<CacheEntry<V>>The cache entry storage to use.
factoryCacheFactory<V>Which create new instance of cache entry.
Helper__moduleThe IMA.js helper methods.
configObjectThe cache configuration.

Overrides

Cache.constructor

Defined in

packages/core/src/cache/CacheImpl.ts:36

Properties

_Helper

Protected _Helper: __module

Defined in

packages/core/src/cache/CacheImpl.ts:24


_cache

Protected _cache: Storage<CacheEntry<V>>

Defined in

packages/core/src/cache/CacheImpl.ts:22


_enabled

Protected _enabled: boolean

Defined in

packages/core/src/cache/CacheImpl.ts:26


_factory

Protected _factory: CacheFactory<V>

Defined in

packages/core/src/cache/CacheImpl.ts:23


_ttl

Protected _ttl: number

Defined in

packages/core/src/cache/CacheImpl.ts:25

Methods

_canSerializeValue

Private _canSerializeValue(value): boolean

Tests whether the provided value can be serialized into JSON.

Parameters

NameTypeDescription
valueunknownThe value to test whether or not it can be serialized.

Returns

boolean

true if the provided value can be serialized into JSON, +false otherwise.

Defined in

packages/core/src/cache/CacheImpl.ts:202


_clone

Private _clone(value): V

Attempts to clone the provided value, if possible. Values that cannot be cloned (e.g. promises) will be simply returned.

Parameters

NameTypeDescription
valueVThe value to clone.

Returns

V

The created clone, or the provided value if the value cannot be -cloned.

Defined in

packages/core/src/cache/CacheImpl.ts:256


clear

clear(): void

Clears the cache by deleting all entries.

Returns

void

Overrides

Cache.clear

Defined in

packages/core/src/cache/CacheImpl.ts:66


delete

delete(key): void

Deletes the specified cache entry. The method has no effect if the entry -does not exist.

Parameters

NameTypeDescription
keystringThe identifier of the cache entry.

Returns

void

Overrides

Cache.delete

Defined in

packages/core/src/cache/CacheImpl.ts:122


deserialize

deserialize(serializedData): void

Loads the provided serialized cache data into this cache. Entries +cloned.

Defined in

packages/core/src/cache/CacheImpl.ts:256


clear

clear(): void

Clears the cache by deleting all entries.

Returns

void

Overrides

Cache.clear

Defined in

packages/core/src/cache/CacheImpl.ts:66


delete

delete(key): void

Deletes the specified cache entry. The method has no effect if the entry +does not exist.

Parameters

NameTypeDescription
keystringThe identifier of the cache entry.

Returns

void

Overrides

Cache.delete

Defined in

packages/core/src/cache/CacheImpl.ts:122


deserialize

deserialize(serializedData): void

Loads the provided serialized cache data into this cache. Entries present in this cache but not specified in the provided data will remain -in this cache intact.

Parameters

NameTypeDescription
serializedDataObjectAn object representing the state of the cache to load, obtained by parsing the JSON string returned by the serialize method.

Returns

void

Overrides

Cache.deserialize

Defined in

packages/core/src/cache/CacheImpl.ts:181


disable

disable(): void

Disables the cache, preventing the retrieval of any cached entries and +in this cache intact.

Parameters

NameTypeDescription
serializedDataObjectAn object representing the state of the cache to load, obtained by parsing the JSON string returned by the serialize method.

Returns

void

Overrides

Cache.deserialize

Defined in

packages/core/src/cache/CacheImpl.ts:181


disable

disable(): void

Disables the cache, preventing the retrieval of any cached entries and reporting all cache entries as non-existing. Disabling the cache does not however prevent modifying the existing or creating new cache -entries.

Disabling the cache also clears all of its current entries.

The method has no effect if the cache is already disabled.

Returns

void

Overrides

Cache.disable

Defined in

packages/core/src/cache/CacheImpl.ts:129


enable

enable(): void

Enables the cache, allowing the retrieval of cache entries.

The method has no effect if the cache is already enabled.

Returns

void

Overrides

Cache.enable

Defined in

packages/core/src/cache/CacheImpl.ts:137


get

get(key): null | V

Returns the value of the entry identified by the specified key.

The method returns null if the specified entry does not exist, has +entries.

Disabling the cache also clears all of its current entries.

The method has no effect if the cache is already disabled.

Returns

void

Overrides

Cache.disable

Defined in

packages/core/src/cache/CacheImpl.ts:129


enable

enable(): void

Enables the cache, allowing the retrieval of cache entries.

The method has no effect if the cache is already enabled.

Returns

void

Overrides

Cache.enable

Defined in

packages/core/src/cache/CacheImpl.ts:137


get

get(key): null | V

Returns the value of the entry identified by the specified key.

The method returns null if the specified entry does not exist, has already expired, or the cache is currently disabled.

Parameters

NameTypeDescription
keystringThe identifier of the cache entry.

Returns

null | V

The value of the specified cache entry, or null if the entry -is not available.

Overrides

Cache.get

Defined in

packages/core/src/cache/CacheImpl.ts:92


has

has(key): boolean

Tests whether the cache contains a fresh entry for the specified key. A +is not available.

Overrides

Cache.get

Defined in

packages/core/src/cache/CacheImpl.ts:92


has

has(key): boolean

Tests whether the cache contains a fresh entry for the specified key. A cache entry is fresh if the has not expired its TTL (time to live).

The method always returns false if the cache is currently disabled.

Parameters

NameTypeDescription
keystringThe identifier of the cache entry.

Returns

boolean

true if the cache is enabled, the entry exists and has -not expired yet.

Overrides

Cache.has

Defined in

packages/core/src/cache/CacheImpl.ts:73


serialize

serialize(): string

Exports the state of this cache to an HTML-safe JSON string. The data +not expired yet.

Overrides

Cache.has

Defined in

packages/core/src/cache/CacheImpl.ts:73


serialize

serialize(): string

Exports the state of this cache to an HTML-safe JSON string. The data obtained by parsing the result of this method are compatible with the deserialize method.

Returns

string

A JSON string containing an object representing of the -current state of this cache.

Overrides

Cache.serialize

Defined in

packages/core/src/cache/CacheImpl.ts:144


set

set(key, value, ttl?): void

Sets the cache entry identified by the specified key to the provided -value. The entry is created if it does not exist yet.

The method has no effect if the cache is currently disabled.

Parameters

NameTypeDefault valueDescription
keystringundefinedThe identifier of the cache entry.
valueVundefinedThe cache entry value.
ttlstring | number0Cache entry time to live in milliseconds. The entry will expire after the specified amount of milliseconds. Use null or omit the parameter to use the default TTL of this cache.

Returns

void

Overrides

Cache.set

Defined in

packages/core/src/cache/CacheImpl.ts:106

- - +current state of this cache.

Overrides

Cache.serialize

Defined in

packages/core/src/cache/CacheImpl.ts:144


set

set(key, value, ttl?): void

Sets the cache entry identified by the specified key to the provided +value. The entry is created if it does not exist yet.

The method has no effect if the cache is currently disabled.

Parameters

NameTypeDefault valueDescription
keystringundefinedThe identifier of the cache entry.
valueVundefinedThe cache entry value.
ttlstring | number0Cache entry time to live in milliseconds. The entry will expire after the specified amount of milliseconds. Use null or omit the parameter to use the default TTL of this cache.

Returns

void

Overrides

Cache.set

Defined in

packages/core/src/cache/CacheImpl.ts:106

+ + \ No newline at end of file diff --git a/api/classes/ima_core.CancelError/index.html b/api/classes/ima_core.CancelError/index.html index 414dcb562f..84d25e8dde 100644 --- a/api/classes/ima_core.CancelError/index.html +++ b/api/classes/ima_core.CancelError/index.html @@ -4,23 +4,23 @@ Class: CancelError | IMA.js - - + +
-
Skip to main content

Class: CancelError

@ima/core.CancelError

Extension of GenericError which is used in route handling ot cancel -currently managed route before proceeding with execution with new one.

Hierarchy

Constructors

constructor

new CancelError(message?)

Parameters

NameTypeDefault value
messagestring'Canceled'

Overrides

GenericError.constructor

Defined in

packages/core/src/error/CancelError.ts:8

Properties

_params

Protected _params: { status: 409 } & GenericErrorParams

Inherited from

GenericError._params

Defined in

packages/core/src/error/GenericError.ts:16


cause

Optional cause: unknown

Inherited from

GenericError.cause

Defined in

node_modules/typescript/lib/lib.es2022.error.d.ts:24


message

message: string

Inherited from

GenericError.message

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1068


name

name: string

Inherited from

GenericError.name

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1067


stack

Optional stack: string

Inherited from

GenericError.stack

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1069


prepareStackTrace

Static Optional prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any

Type declaration

▸ (err, stackTraces): any

Optional override for formatting stack traces

Parameters
NameType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

GenericError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:11


stackTraceLimit

Static stackTraceLimit: number

Inherited from

GenericError.stackTraceLimit

Defined in

node_modules/@types/node/globals.d.ts:13

Methods

getHttpStatus

getHttpStatus(): number

Returns the HTTP status to send to the client.

If the error has occurred at the client-side, the status code is used to +

Class: CancelError

@ima/core.CancelError

Extension of GenericError which is used in route handling ot cancel +currently managed route before proceeding with execution with new one.

Hierarchy

Constructors

constructor

new CancelError(message?)

Parameters

NameTypeDefault value
messagestring'Canceled'

Overrides

GenericError.constructor

Defined in

packages/core/src/error/CancelError.ts:8

Properties

_params

Protected _params: { status: 409 } & GenericErrorParams

Inherited from

GenericError._params

Defined in

packages/core/src/error/GenericError.ts:16


cause

Optional cause: unknown

Inherited from

GenericError.cause

Defined in

node_modules/typescript/lib/lib.es2022.error.d.ts:24


message

message: string

Inherited from

GenericError.message

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1068


name

name: string

Inherited from

GenericError.name

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1067


stack

Optional stack: string

Inherited from

GenericError.stack

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1069


prepareStackTrace

Static Optional prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any

Type declaration

▸ (err, stackTraces): any

Optional override for formatting stack traces

Parameters
NameType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

GenericError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:11


stackTraceLimit

Static stackTraceLimit: number

Inherited from

GenericError.stackTraceLimit

Defined in

node_modules/@types/node/globals.d.ts:13

Methods

getHttpStatus

getHttpStatus(): number

Returns the HTTP status to send to the client.

If the error has occurred at the client-side, the status code is used to determine the error page to show to the user.

This method is a shorthand for the following code snippet: -this.getParams().status || 500.

Returns

number

The HTTP status to send to the client.

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Inherited from

GenericError.getHttpStatus

Defined in

packages/core/src/error/GenericError.ts:39


getParams

getParams(): { status: 409 } & GenericErrorParams

Returns the error parameters providing additional details about the +this.getParams().status || 500.

Returns

number

The HTTP status to send to the client.

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Inherited from

GenericError.getHttpStatus

Defined in

packages/core/src/error/GenericError.ts:39


getParams

getParams(): { status: 409 } & GenericErrorParams

Returns the error parameters providing additional details about the error. The structure of the returned object is always situation-dependent, but the returned object usually contains the status: number field which represents the HTTP status to send to the client.

Returns

{ status: 409 } & GenericErrorParams

The route parameters of the route at which -the error has occurred.

See

Error#getHttpStatus

Inherited from

GenericError.getParams

Defined in

packages/core/src/error/GenericError.ts:46


isClientError

isClientError(): boolean

Tests, whether the specified error was caused by the +the error has occurred.

See

Error#getHttpStatus

Inherited from

GenericError.getParams

Defined in

packages/core/src/error/GenericError.ts:46


isClientError

isClientError(): boolean

Tests, whether the specified error was caused by the client's action (for example wrong URL or request encoding).

Returns

boolean

true if the error was caused the action of the -client.

Inherited from

GenericError.isClientError

Defined in

packages/core/src/error/GenericError.ts:53


isRedirection

isRedirection(): boolean

Tests, whether the specified error should lead to a redirect.

Returns

boolean

true if the error should cause a redirect.

Inherited from

GenericError.isRedirection

Defined in

packages/core/src/error/GenericError.ts:60


captureStackTrace

Static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

NameType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

GenericError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:4

- - +client.

Inherited from

GenericError.isClientError

Defined in

packages/core/src/error/GenericError.ts:53


isRedirection

isRedirection(): boolean

Tests, whether the specified error should lead to a redirect.

Returns

boolean

true if the error should cause a redirect.

Inherited from

GenericError.isRedirection

Defined in

packages/core/src/error/GenericError.ts:60


captureStackTrace

Static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

NameType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

GenericError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:4

+ + \ No newline at end of file diff --git a/api/classes/ima_core.ClientPageManager/index.html b/api/classes/ima_core.ClientPageManager/index.html index 80ec2d47e6..a435043fd5 100644 --- a/api/classes/ima_core.ClientPageManager/index.html +++ b/api/classes/ima_core.ClientPageManager/index.html @@ -4,60 +4,60 @@ Class: ClientPageManager | IMA.js - - + +
-
Skip to main content

Class: ClientPageManager

@ima/core.ClientPageManager

Page manager for controller on the client side.

Hierarchy

Constructors

constructor

new ClientPageManager(pageFactory, pageRenderer, pageStateManager, handlerRegistry, dispatcher, window, eventBus)

Initializes the client-side page manager.

Parameters

NameTypeDescription
pageFactoryPageFactoryFactory used by the page manager to create instances of the controller for the current route, and decorate the controllers and page state managers.
pageRendererPageRendererThe current renderer of the page.
pageStateManagerPageStateManager<{}>-
handlerRegistryPageHandlerRegistryInstance of HandlerRegistry that holds a list of pre-manage and post-manage handlers.
dispatcherDispatcherIMA Dispatcher.
windowWindowThe utility for manipulating the global context and global client-side-specific APIs.
eventBusEventBusThe event bus for dispatching and listening for custom IMA events propagated through the DOM.

Overrides

AbstractPageManager.constructor

Defined in

packages/core/src/page/manager/ClientPageManager.ts:70

Properties

_dispatcher

Protected _dispatcher: Dispatcher

Inherited from

AbstractPageManager._dispatcher

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:81


_eventBus

Private _eventBus: EventBus

The event bus for dispatching and listening for custom IMA events -propagated through the DOM.

Defined in

packages/core/src/page/manager/ClientPageManager.ts:33


_managedPage

Protected _managedPage: ManagedPage

Details of the currently managed page.

Inherited from

AbstractPageManager._managedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:68


_pageFactory

Protected _pageFactory: PageFactory

Factory used by the page manager to create instances of the +

Class: ClientPageManager

@ima/core.ClientPageManager

Page manager for controller on the client side.

Hierarchy

Constructors

constructor

new ClientPageManager(pageFactory, pageRenderer, pageStateManager, handlerRegistry, dispatcher, window, eventBus)

Initializes the client-side page manager.

Parameters

NameTypeDescription
pageFactoryPageFactoryFactory used by the page manager to create instances of the controller for the current route, and decorate the controllers and page state managers.
pageRendererPageRendererThe current renderer of the page.
pageStateManagerPageStateManager<{}>-
handlerRegistryPageHandlerRegistryInstance of HandlerRegistry that holds a list of pre-manage and post-manage handlers.
dispatcherDispatcherIMA Dispatcher.
windowWindowThe utility for manipulating the global context and global client-side-specific APIs.
eventBusEventBusThe event bus for dispatching and listening for custom IMA events propagated through the DOM.

Overrides

AbstractPageManager.constructor

Defined in

packages/core/src/page/manager/ClientPageManager.ts:70

Properties

_dispatcher

Protected _dispatcher: Dispatcher

Inherited from

AbstractPageManager._dispatcher

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:81


_eventBus

Private _eventBus: EventBus

The event bus for dispatching and listening for custom IMA events +propagated through the DOM.

Defined in

packages/core/src/page/manager/ClientPageManager.ts:33


_managedPage

Protected _managedPage: ManagedPage

Details of the currently managed page.

Inherited from

AbstractPageManager._managedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:68


_pageFactory

Protected _pageFactory: PageFactory

Factory used by the page manager to create instances of the controller for the current route, and decorate the controllers and -page state managers.

Inherited from

AbstractPageManager._pageFactory

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:63


_pageHandlerRegistry

Protected _pageHandlerRegistry: PageHandlerRegistry

A registry that holds a list of pre-manage and post-manage handlers.

Inherited from

AbstractPageManager._pageHandlerRegistry

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:80


_pageRenderer

Protected _pageRenderer: PageRenderer

The current renderer of the page.

Inherited from

AbstractPageManager._pageRenderer

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:72


_pageStateManager

Protected _pageStateManager: PageStateManager<{}>

The current page state manager.

Inherited from

AbstractPageManager._pageStateManager

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:76


_previousManagedPage

Protected _previousManagedPage: ManagedPage

Snapshot of the previously managed page before it was replaced with -a new one

Inherited from

AbstractPageManager._previousManagedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:57


_window

Private _window: Window

The utility for manipulating the global context and global -client-side-specific APIs.

Defined in

packages/core/src/page/manager/ClientPageManager.ts:28

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/page/manager/ClientPageManager.ts:42

Methods

#cancelable

Private #cancelable<T>(promise): Promise<T>

Type parameters

Name
T

Parameters

NameType
promiseT

Returns

Promise<T>

Inherited from

AbstractPageManager.#cancelable

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:845


_activateController

Protected _activateController(): Promise<void>

Activate managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._activateController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:549


_activateExtensions

Protected _activateExtensions(): Promise<void>

Activate extensions for managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._activateExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:563


_activatePageSource

Protected _activatePageSource(): Promise<void>

Activate page source so call activate method on controller and his -extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._activatePageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:529


_boundOnCustomEventHandler

Private _boundOnCustomEventHandler(event): void

Event listener for the custom DOM events used by the event bus, -bound to this instance.

Parameters

NameType
eventCustomEvent<any>

Returns

void

Defined in

packages/core/src/page/manager/ClientPageManager.ts:38


_clearComponentState

_clearComponentState(options): void

The method clear state on current rendered component to DOM.

Parameters

NameTypeDescription
optionsRouteOptionsThe current route options.

Returns

void

Inherited from

AbstractPageManager._clearComponentState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:753


_constructManagedPageValue

Protected _constructManagedPageValue(controller, view, route, options, params, controllerInstance, decoratedController, viewInstance): ManagedPage

Parameters

NameType
controllerRouteController
viewunknown
routeAbstractRoute<string | RoutePathExpression>
optionsRouteOptions
paramsRouteParams
controllerInstanceController<PageState, RouteParams, PageState>
decoratedControllerControllerDecorator<{}, {}, {}>
viewInstanceunknown

Returns

ManagedPage

Inherited from

AbstractPageManager._constructManagedPageValue

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:245


_deactivateController

Protected _deactivateController(): Promise<void>

Deactivate last managed instance of controller only If controller was -activated.

Returns

Promise<void>

Inherited from

AbstractPageManager._deactivateController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:691


_deactivateExtensions

Protected _deactivateExtensions(): Promise<void>

Deactivate extensions for last managed instance of controller only if -they were activated.

Returns

Promise<void>

Inherited from

AbstractPageManager._deactivateExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:702


_deactivatePageSource

Protected _deactivatePageSource(): Promise<void>

Deactivate page source so call deactivate method on controller and his -extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._deactivatePageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:677


_destroyController

Protected _destroyController(): Promise<void>

Destroy last managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._destroyController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:726


_destroyExtensions

Protected _destroyExtensions(): Promise<void>

Destroy extensions for last managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._destroyExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:739


_destroyPageSource

Protected _destroyPageSource(): Promise<void>

Destroy page source so call destroy method on controller and his -extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._destroyPageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:714


_getInitialManagedPage

Protected _getInitialManagedPage(): ManagedPage

Clear value from managed page.

Returns

ManagedPage

Inherited from

AbstractPageManager._getInitialManagedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:302


_getLoadedControllerState

Protected _getLoadedControllerState(): Promise<{}>

Load controller state from managed instance of controller.

Returns

Promise<{}>

Inherited from

AbstractPageManager._getLoadedControllerState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:485


_getLoadedExtensionsState

Protected _getLoadedExtensionsState(controllerState?): Promise<UnknownParameters>

Load extensions state from managed instance of controller.

Parameters

NameType
controllerState?UnknownParameters

Returns

Promise<UnknownParameters>

Inherited from

AbstractPageManager._getLoadedExtensionsState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:501


_getUpdatedControllerState

Protected _getUpdatedControllerState(): {} | Promise<{}>

Return updated controller state for current page controller.

Returns

{} | Promise<{}>

Inherited from

AbstractPageManager._getUpdatedControllerState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:621


_getUpdatedExtensionsState

Protected _getUpdatedExtensionsState(controllerState?): Promise<UnknownParameters>

Return updated extensions state for current page controller.

Parameters

NameType
controllerState?UnknownParameters

Returns

Promise<UnknownParameters>

Inherited from

AbstractPageManager._getUpdatedExtensionsState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:637


_handleEventWithController

_handleEventWithController(prefix, method, data): boolean

Attempts to handle the currently processed event bus custom DOM event +page state managers.

Inherited from

AbstractPageManager._pageFactory

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:63


_pageHandlerRegistry

Protected _pageHandlerRegistry: PageHandlerRegistry

A registry that holds a list of pre-manage and post-manage handlers.

Inherited from

AbstractPageManager._pageHandlerRegistry

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:80


_pageRenderer

Protected _pageRenderer: PageRenderer

The current renderer of the page.

Inherited from

AbstractPageManager._pageRenderer

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:72


_pageStateManager

Protected _pageStateManager: PageStateManager<{}>

The current page state manager.

Inherited from

AbstractPageManager._pageStateManager

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:76


_previousManagedPage

Protected _previousManagedPage: ManagedPage

Snapshot of the previously managed page before it was replaced with +a new one

Inherited from

AbstractPageManager._previousManagedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:57


_window

Private _window: Window

The utility for manipulating the global context and global +client-side-specific APIs.

Defined in

packages/core/src/page/manager/ClientPageManager.ts:28

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/page/manager/ClientPageManager.ts:42

Methods

#cancelable

Private #cancelable<T>(promise): Promise<T>

Type parameters

Name
T

Parameters

NameType
promiseT

Returns

Promise<T>

Inherited from

AbstractPageManager.#cancelable

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:845


_activateController

Protected _activateController(): Promise<void>

Activate managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._activateController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:549


_activateExtensions

Protected _activateExtensions(): Promise<void>

Activate extensions for managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._activateExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:563


_activatePageSource

Protected _activatePageSource(): Promise<void>

Activate page source so call activate method on controller and his +extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._activatePageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:529


_boundOnCustomEventHandler

Private _boundOnCustomEventHandler(event): void

Event listener for the custom DOM events used by the event bus, +bound to this instance.

Parameters

NameType
eventCustomEvent<any>

Returns

void

Defined in

packages/core/src/page/manager/ClientPageManager.ts:38


_clearComponentState

_clearComponentState(options): void

The method clear state on current rendered component to DOM.

Parameters

NameTypeDescription
optionsRouteOptionsThe current route options.

Returns

void

Inherited from

AbstractPageManager._clearComponentState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:753


_constructManagedPageValue

Protected _constructManagedPageValue(controller, view, route, options, params, controllerInstance, decoratedController, viewInstance): ManagedPage

Parameters

NameType
controllerRouteController
viewunknown
routeAbstractRoute<string | RoutePathExpression>
optionsRouteOptions
paramsRouteParams
controllerInstanceController<PageState, RouteParams, PageState>
decoratedControllerControllerDecorator<{}, {}, {}>
viewInstanceunknown

Returns

ManagedPage

Inherited from

AbstractPageManager._constructManagedPageValue

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:245


_deactivateController

Protected _deactivateController(): Promise<void>

Deactivate last managed instance of controller only If controller was +activated.

Returns

Promise<void>

Inherited from

AbstractPageManager._deactivateController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:691


_deactivateExtensions

Protected _deactivateExtensions(): Promise<void>

Deactivate extensions for last managed instance of controller only if +they were activated.

Returns

Promise<void>

Inherited from

AbstractPageManager._deactivateExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:702


_deactivatePageSource

Protected _deactivatePageSource(): Promise<void>

Deactivate page source so call deactivate method on controller and his +extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._deactivatePageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:677


_destroyController

Protected _destroyController(): Promise<void>

Destroy last managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._destroyController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:726


_destroyExtensions

Protected _destroyExtensions(): Promise<void>

Destroy extensions for last managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._destroyExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:739


_destroyPageSource

Protected _destroyPageSource(): Promise<void>

Destroy page source so call destroy method on controller and his +extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._destroyPageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:714


_getInitialManagedPage

Protected _getInitialManagedPage(): ManagedPage

Clear value from managed page.

Returns

ManagedPage

Inherited from

AbstractPageManager._getInitialManagedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:302


_getLoadedControllerState

Protected _getLoadedControllerState(): Promise<{}>

Load controller state from managed instance of controller.

Returns

Promise<{}>

Inherited from

AbstractPageManager._getLoadedControllerState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:485


_getLoadedExtensionsState

Protected _getLoadedExtensionsState(controllerState?): Promise<UnknownParameters>

Load extensions state from managed instance of controller.

Parameters

NameType
controllerState?UnknownParameters

Returns

Promise<UnknownParameters>

Inherited from

AbstractPageManager._getLoadedExtensionsState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:501


_getUpdatedControllerState

Protected _getUpdatedControllerState(): {} | Promise<{}>

Return updated controller state for current page controller.

Returns

{} | Promise<{}>

Inherited from

AbstractPageManager._getUpdatedControllerState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:621


_getUpdatedExtensionsState

Protected _getUpdatedExtensionsState(controllerState?): Promise<UnknownParameters>

Return updated extensions state for current page controller.

Parameters

NameType
controllerState?UnknownParameters

Returns

Promise<UnknownParameters>

Inherited from

AbstractPageManager._getUpdatedExtensionsState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:637


_handleEventWithController

_handleEventWithController(prefix, method, data): boolean

Attempts to handle the currently processed event bus custom DOM event using the current controller. The method returns true if the event is handled by the controller.

Parameters

NameTypeDescription
prefixstring-
methodstringThe name of the method the current controller should use to process the currently processed event bus custom DOM event.
dataUnknownParametersThe custom event's data.

Returns

boolean

true if the event has been handled by the controller, false if the controller does not have a -method for processing the event.

Defined in

packages/core/src/page/manager/ClientPageManager.ts:215


_handleEventWithExtensions

_handleEventWithExtensions(prefix, method, data): boolean

Attempts to handle the currently processed event bus custom DOM event +method for processing the event.

Defined in

packages/core/src/page/manager/ClientPageManager.ts:215


_handleEventWithExtensions

_handleEventWithExtensions(prefix, method, data): boolean

Attempts to handle the currently processed event bus custom DOM event using the registered extensions of the current controller. The method returns true if the event is handled by the controller.

Parameters

NameTypeDescription
prefixstring-
methodstringThe name of the method the current controller should use to process the currently processed event bus custom DOM event.
dataUnknownParametersThe custom event's data.

Returns

boolean

true if the event has been handled by one of the controller's extensions, false if none of the -controller's extensions has a method for processing the event.

Defined in

packages/core/src/page/manager/ClientPageManager.ts:251


_hasOnlyUpdate

Protected _hasOnlyUpdate(controller, view, options): boolean

Return true if manager has to update last managed controller and view.

Parameters

NameType
controllerRouteController
viewunknown
optionsRouteOptions

Returns

boolean

Inherited from

AbstractPageManager._hasOnlyUpdate

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:769


_initController

Protected _initController(): Promise<void>

Initializes managed instance of controller with the provided parameters.

Returns

Promise<void>

Inherited from

AbstractPageManager._initController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:398


_initExtensions

Protected _initExtensions(): Promise<void>

Initialize extensions for managed instance of controller with the -provided parameters.

Returns

Promise<void>

Inherited from

AbstractPageManager._initExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:413


_initPageSource

Protected _initPageSource(): Promise<void>

Initialize page source so call init method on controller and his -extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._initPageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:383


_loadPageSource

Protected _loadPageSource(): Promise<void | PageData>

Load page source so call load method on controller and his extensions. -Merge loaded state and render it.

Returns

Promise<void | PageData>

Inherited from

AbstractPageManager._loadPageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:443


_onChangeStateHandler

_onChangeStateHandler(state): void

On change event handler set state to view.

Parameters

NameType
stateUnknownParameters

Returns

void

Defined in

packages/core/src/page/manager/ClientPageManager.ts:276


_onCustomEventHandler

_onCustomEventHandler(event): void

Custom DOM event handler.

The handler invokes the event listener in the active controller, if such +controller's extensions has a method for processing the event.

Defined in

packages/core/src/page/manager/ClientPageManager.ts:251


_hasOnlyUpdate

Protected _hasOnlyUpdate(controller, view, options): boolean

Return true if manager has to update last managed controller and view.

Parameters

NameType
controllerRouteController
viewunknown
optionsRouteOptions

Returns

boolean

Inherited from

AbstractPageManager._hasOnlyUpdate

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:769


_initController

Protected _initController(): Promise<void>

Initializes managed instance of controller with the provided parameters.

Returns

Promise<void>

Inherited from

AbstractPageManager._initController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:398


_initExtensions

Protected _initExtensions(): Promise<void>

Initialize extensions for managed instance of controller with the +provided parameters.

Returns

Promise<void>

Inherited from

AbstractPageManager._initExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:413


_initPageSource

Protected _initPageSource(): Promise<void>

Initialize page source so call init method on controller and his +extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._initPageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:383


_loadPageSource

Protected _loadPageSource(): Promise<void | PageData>

Load page source so call load method on controller and his extensions. +Merge loaded state and render it.

Returns

Promise<void | PageData>

Inherited from

AbstractPageManager._loadPageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:443


_onChangeStateHandler

_onChangeStateHandler(state): void

On change event handler set state to view.

Parameters

NameType
stateUnknownParameters

Returns

void

Defined in

packages/core/src/page/manager/ClientPageManager.ts:276


_onCustomEventHandler

_onCustomEventHandler(event): void

Custom DOM event handler.

The handler invokes the event listener in the active controller, if such listener is present. The name of the controller's listener method is created by turning the first symbol of the event's name to upper case, and then prefixing the result with the 'on' prefix.

For example: for an event named 'toggle' the controller's listener would be named 'onToggle'.

The controller's listener will be invoked with the event's data as an -argument.

Parameters

NameTypeDescription
eventCustomEvent<any>The encountered event bus DOM event.

Returns

void

Defined in

packages/core/src/page/manager/ClientPageManager.ts:151


_parseCustomEvent

_parseCustomEvent(event): Object

Extracts the details of the provided event bus custom DOM event, along +argument.

Parameters

NameTypeDescription
eventCustomEvent<any>The encountered event bus DOM event.

Returns

void

Defined in

packages/core/src/page/manager/ClientPageManager.ts:151


_parseCustomEvent

_parseCustomEvent(event): Object

Extracts the details of the provided event bus custom DOM event, along with the expected name of the current controller's method for intercepting the event.

Parameters

NameTypeDescription
eventCustomEvent<any>The encountered event bus custom DOM event.

Returns

Object

The event's -details.

NameType
dataany
eventNamestring
methodstring
prefixstring

Defined in

packages/core/src/page/manager/ClientPageManager.ts:188


_runPostManageHandlers

Protected _runPostManageHandlers(previousManagedPage, action): Promise<unknown>

Parameters

NameType
previousManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Inherited from

AbstractPageManager._runPostManageHandlers

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:809


_runPreManageHandlers

Protected _runPreManageHandlers(actualManagedPage, action): Promise<unknown>

Parameters

NameType
actualManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Inherited from

AbstractPageManager._runPreManageHandlers

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:788


_setRestrictedPageStateManager

_setRestrictedPageStateManager(extension, extensionState): void

Set page state manager to extension which has restricted rights to set -global state.

Parameters

NameType
extensionExtension<{}, {}, {}>
extensionStateUnknownParameters

Returns

void

Inherited from

AbstractPageManager._setRestrictedPageStateManager

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:342


_storeManagedPageSnapshot

Protected _storeManagedPageSnapshot(): void

Creates a cloned version of currently managed page and stores it in +details.

NameType
dataany
eventNamestring
methodstring
prefixstring

Defined in

packages/core/src/page/manager/ClientPageManager.ts:188


_runPostManageHandlers

Protected _runPostManageHandlers(previousManagedPage, action): Promise<unknown>

Parameters

NameType
previousManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Inherited from

AbstractPageManager._runPostManageHandlers

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:809


_runPreManageHandlers

Protected _runPreManageHandlers(actualManagedPage, action): Promise<unknown>

Parameters

NameType
actualManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Inherited from

AbstractPageManager._runPreManageHandlers

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:788


_setRestrictedPageStateManager

_setRestrictedPageStateManager(extension, extensionState): void

Set page state manager to extension which has restricted rights to set +global state.

Parameters

NameType
extensionExtension<{}, {}, {}>
extensionStateUnknownParameters

Returns

void

Inherited from

AbstractPageManager._setRestrictedPageStateManager

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:342


_storeManagedPageSnapshot

Protected _storeManagedPageSnapshot(): void

Creates a cloned version of currently managed page and stores it in a helper property. Snapshot is used in manager handlers to easily determine differences -between the current and the previous state.

Returns

void

Inherited from

AbstractPageManager._storeManagedPageSnapshot

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:281


_stripManagedPageValueForPublic

Protected _stripManagedPageValueForPublic(value): Object

Removes properties we do not want to propagate outside of the page manager

Parameters

NameTypeDescription
valueManagedPageThe managed page object to strip down

Returns

Object

NameType
controllerRouteController
optionsRouteOptions
paramsRouteParams
routeAbstractRoute<string | RoutePathExpression>
viewunknown

Inherited from

AbstractPageManager._stripManagedPageValueForPublic

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:332


_switchToPageStateManager

Protected _switchToPageStateManager(): void

Iterates over extensions of current controller and switches each one to -pageStateManager and clears their partial state.

Returns

void

Inherited from

AbstractPageManager._switchToPageStateManager

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:430


_switchToPageStateManagerAfterLoaded

_switchToPageStateManagerAfterLoaded(extension, extensionState): void

For defined extension switches to pageStageManager and clears partial state -after extension state is loaded.

Parameters

NameType
extensionExtension<{}, {}, {}>
extensionStateUnknownParameters

Returns

void

Inherited from

AbstractPageManager._switchToPageStateManagerAfterLoaded

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:363


_updatePageSource

Protected _updatePageSource(): Promise<void | PageData>

Update page source so call update method on controller and his -extensions. Merge updated state and render it.

Returns

Promise<void | PageData>

Inherited from

AbstractPageManager._updatePageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:580


destroy

destroy(): Promise<void>

Finalization callback, called when the page manager is being discarded. -This usually happens when the page is hot-reloaded at the client side.

Returns

Promise<void>

Overrides

AbstractPageManager.destroy

Defined in

packages/core/src/page/manager/ClientPageManager.ts:126


getViewController

Protected getViewController(route): Promise<{ controller: RouteController ; view: RouteView }>

Parameters

NameType
routeAbstractRoute<string | RoutePathExpression>

Returns

Promise<{ controller: RouteController ; view: RouteView }>

Inherited from

AbstractPageManager.getViewController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:833


init

init(): void

Initializes the page manager.

Returns

void

Overrides

AbstractPageManager.init

Defined in

packages/core/src/page/manager/ClientPageManager.ts:95


manage

manage(«destructured»): Promise<void | PageData>

Starts to manage the provided controller and its view. The manager +between the current and the previous state.

Returns

void

Inherited from

AbstractPageManager._storeManagedPageSnapshot

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:281


_stripManagedPageValueForPublic

Protected _stripManagedPageValueForPublic(value): Object

Removes properties we do not want to propagate outside of the page manager

Parameters

NameTypeDescription
valueManagedPageThe managed page object to strip down

Returns

Object

NameType
controllerRouteController
optionsRouteOptions
paramsRouteParams
routeAbstractRoute<string | RoutePathExpression>
viewunknown

Inherited from

AbstractPageManager._stripManagedPageValueForPublic

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:332


_switchToPageStateManager

Protected _switchToPageStateManager(): void

Iterates over extensions of current controller and switches each one to +pageStateManager and clears their partial state.

Returns

void

Inherited from

AbstractPageManager._switchToPageStateManager

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:430


_switchToPageStateManagerAfterLoaded

_switchToPageStateManagerAfterLoaded(extension, extensionState): void

For defined extension switches to pageStageManager and clears partial state +after extension state is loaded.

Parameters

NameType
extensionExtension<{}, {}, {}>
extensionStateUnknownParameters

Returns

void

Inherited from

AbstractPageManager._switchToPageStateManagerAfterLoaded

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:363


_updatePageSource

Protected _updatePageSource(): Promise<void | PageData>

Update page source so call update method on controller and his +extensions. Merge updated state and render it.

Returns

Promise<void | PageData>

Inherited from

AbstractPageManager._updatePageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:580


destroy

destroy(): Promise<void>

Finalization callback, called when the page manager is being discarded. +This usually happens when the page is hot-reloaded at the client side.

Returns

Promise<void>

Overrides

AbstractPageManager.destroy

Defined in

packages/core/src/page/manager/ClientPageManager.ts:126


getViewController

Protected getViewController(route): Promise<{ controller: RouteController ; view: RouteView }>

Parameters

NameType
routeAbstractRoute<string | RoutePathExpression>

Returns

Promise<{ controller: RouteController ; view: RouteView }>

Inherited from

AbstractPageManager.getViewController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:833


init

init(): void

Initializes the page manager.

Returns

void

Overrides

AbstractPageManager.init

Defined in

packages/core/src/page/manager/ClientPageManager.ts:95


manage

manage(«destructured»): Promise<void | PageData>

Starts to manage the provided controller and its view. The manager stops the management of any previously managed controller and view.

The controller and view will be initialized and rendered either into the UI (at the client-side) or to the response to send to the client (at the server-side).

Parameters

NameType
«destructured»ManageArgs

Returns

Promise<void | PageData>

A promise that will resolve to information about the rendered page. The status will contain the HTTP status code to send to the client (at the server side) or determine the type of error page -to navigate to (at the client side).

Overrides

AbstractPageManager.manage

Defined in

packages/core/src/page/manager/ClientPageManager.ts:109


postManage

postManage(): void

Called by router after currently managed route is resolved.

Returns

void

Inherited from

AbstractPageManager.postManage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:223


preManage

preManage(): Promise<void>

Pre manage handler, should be called and awaited before tryint to handle +to navigate to (at the client side).

Overrides

AbstractPageManager.manage

Defined in

packages/core/src/page/manager/ClientPageManager.ts:109


postManage

postManage(): void

Called by router after currently managed route is resolved.

Returns

void

Inherited from

AbstractPageManager.postManage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:223


preManage

preManage(): Promise<void>

Pre manage handler, should be called and awaited before tryint to handle new route handler. This pre manage takes care of canceling any currently executed route handlers and returns promise which is resolved when previous -page finished loading (even if it got canceled).

Returns

Promise<void>

Inherited from

AbstractPageManager.preManage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:123

- - +page finished loading (even if it got canceled).

Returns

Promise<void>

Inherited from

AbstractPageManager.preManage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:123

+ + \ No newline at end of file diff --git a/api/classes/ima_core.ClientRouter/index.html b/api/classes/ima_core.ClientRouter/index.html index 5e1f44156d..b462df8fa0 100644 --- a/api/classes/ima_core.ClientRouter/index.html +++ b/api/classes/ima_core.ClientRouter/index.html @@ -4,81 +4,81 @@ Class: ClientRouter | IMA.js - - + +
-
Skip to main content

Class: ClientRouter

@ima/core.ClientRouter

The client-side implementation of the Router interface.

Hierarchy

Constructors

constructor

new ClientRouter(pageManager, factory, dispatcher, window, settings)

Initializes the client-side router.

Parameters

NameTypeDescription
pageManagerPageManagerThe page manager handling UI rendering, and transitions between pages if at the client side.
factoryRouteFactoryFactory for routes.
dispatcherDispatcherDispatcher fires events to app.
windowWindowThe current global client-side APIs provider.
settingsundefined | number | { isSPARouted?: (url: string, action?: RouteAction) => boolean ; middlewareTimeout?: number }$Router settings.

Overrides

AbstractRouter.constructor

Defined in

packages/core/src/router/ClientRouter.ts:79

Properties

_currentMiddlewareId

Protected _currentMiddlewareId: number = 0

Middleware ID counter which is used to auto-generate unique middleware -names when adding them to routeHandlers map.

Inherited from

AbstractRouter._currentMiddlewareId

Defined in

packages/core/src/router/AbstractRouter.ts:92


_currentlyRoutedPath

Protected _currentlyRoutedPath: string = ''

Inherited from

AbstractRouter._currentlyRoutedPath

Defined in

packages/core/src/router/AbstractRouter.ts:93


_dispatcher

Protected _dispatcher: Dispatcher

Dispatcher fires events to app.

Inherited from

AbstractRouter._dispatcher

Defined in

packages/core/src/router/AbstractRouter.ts:62


_factory

Protected _factory: RouteFactory

Factory for routes.

Inherited from

AbstractRouter._factory

Defined in

packages/core/src/router/AbstractRouter.ts:58


_host

Protected _host: string = ''

The application's host.

Inherited from

AbstractRouter._host

Defined in

packages/core/src/router/AbstractRouter.ts:71


_isSPARouted

Protected _isSPARouted: undefined | (url: string, action?: RouteAction) => boolean

Inherited from

AbstractRouter._isSPARouted

Defined in

packages/core/src/router/AbstractRouter.ts:95


_languagePartPath

Protected _languagePartPath: string = ''

The URL path fragment used as a suffix to the _root field -that specifies the current language.

Inherited from

AbstractRouter._languagePartPath

Defined in

packages/core/src/router/AbstractRouter.ts:80


_middlewareTimeout

Protected _middlewareTimeout: number

Inherited from

AbstractRouter._middlewareTimeout

Defined in

packages/core/src/router/AbstractRouter.ts:94


_mountedPromise

Protected _mountedPromise: null | { promise: Promise<void> ; reject: () => void ; resolve: () => void } = null

Mounted promise to prevent routing until app is fully mounted.

Defined in

packages/core/src/router/ClientRouter.ts:53


_pageManager

Protected _pageManager: PageManager

The page manager handling UI rendering, and transitions between -pages if at the client side.

Inherited from

AbstractRouter._pageManager

Defined in

packages/core/src/router/AbstractRouter.ts:54


_protocol

Protected _protocol: string = ''

The current protocol used to access the application, terminated by a -colon (for example https:).

Inherited from

AbstractRouter._protocol

Defined in

packages/core/src/router/AbstractRouter.ts:67


_root

Protected _root: string = ''

The URL path pointing to the application's root.

Inherited from

AbstractRouter._root

Defined in

packages/core/src/router/AbstractRouter.ts:75


_routeHandlers

Protected _routeHandlers: Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Storage of all known routes and middlewares. The key are their names.

Inherited from

AbstractRouter._routeHandlers

Defined in

packages/core/src/router/AbstractRouter.ts:84


_window

Protected _window: Window

Defined in

packages/core/src/router/ClientRouter.ts:44

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/router/ClientRouter.ts:59

Methods

#addParamsFromOriginalRoute

Private #addParamsFromOriginalRoute(params): Object

Obtains original route that was handled before not-found / error route +

Class: ClientRouter

@ima/core.ClientRouter

The client-side implementation of the Router interface.

Hierarchy

Constructors

constructor

new ClientRouter(pageManager, factory, dispatcher, window, settings)

Initializes the client-side router.

Parameters

NameTypeDescription
pageManagerPageManagerThe page manager handling UI rendering, and transitions between pages if at the client side.
factoryRouteFactoryFactory for routes.
dispatcherDispatcherDispatcher fires events to app.
windowWindowThe current global client-side APIs provider.
settingsundefined | number | { isSPARouted?: (url: string, action?: RouteAction) => boolean ; middlewareTimeout?: number }$Router settings.

Overrides

AbstractRouter.constructor

Defined in

packages/core/src/router/ClientRouter.ts:79

Properties

_currentMiddlewareId

Protected _currentMiddlewareId: number = 0

Middleware ID counter which is used to auto-generate unique middleware +names when adding them to routeHandlers map.

Inherited from

AbstractRouter._currentMiddlewareId

Defined in

packages/core/src/router/AbstractRouter.ts:92


_currentlyRoutedPath

Protected _currentlyRoutedPath: string = ''

Inherited from

AbstractRouter._currentlyRoutedPath

Defined in

packages/core/src/router/AbstractRouter.ts:93


_dispatcher

Protected _dispatcher: Dispatcher

Dispatcher fires events to app.

Inherited from

AbstractRouter._dispatcher

Defined in

packages/core/src/router/AbstractRouter.ts:62


_factory

Protected _factory: RouteFactory

Factory for routes.

Inherited from

AbstractRouter._factory

Defined in

packages/core/src/router/AbstractRouter.ts:58


_host

Protected _host: string = ''

The application's host.

Inherited from

AbstractRouter._host

Defined in

packages/core/src/router/AbstractRouter.ts:71


_isSPARouted

Protected _isSPARouted: undefined | (url: string, action?: RouteAction) => boolean

Inherited from

AbstractRouter._isSPARouted

Defined in

packages/core/src/router/AbstractRouter.ts:95


_languagePartPath

Protected _languagePartPath: string = ''

The URL path fragment used as a suffix to the _root field +that specifies the current language.

Inherited from

AbstractRouter._languagePartPath

Defined in

packages/core/src/router/AbstractRouter.ts:80


_middlewareTimeout

Protected _middlewareTimeout: number

Inherited from

AbstractRouter._middlewareTimeout

Defined in

packages/core/src/router/AbstractRouter.ts:94


_mountedPromise

Protected _mountedPromise: null | { promise: Promise<void> ; reject: () => void ; resolve: () => void } = null

Mounted promise to prevent routing until app is fully mounted.

Defined in

packages/core/src/router/ClientRouter.ts:53


_pageManager

Protected _pageManager: PageManager

The page manager handling UI rendering, and transitions between +pages if at the client side.

Inherited from

AbstractRouter._pageManager

Defined in

packages/core/src/router/AbstractRouter.ts:54


_protocol

Protected _protocol: string = ''

The current protocol used to access the application, terminated by a +colon (for example https:).

Inherited from

AbstractRouter._protocol

Defined in

packages/core/src/router/AbstractRouter.ts:67


_root

Protected _root: string = ''

The URL path pointing to the application's root.

Inherited from

AbstractRouter._root

Defined in

packages/core/src/router/AbstractRouter.ts:75


_routeHandlers

Protected _routeHandlers: Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Storage of all known routes and middlewares. The key are their names.

Inherited from

AbstractRouter._routeHandlers

Defined in

packages/core/src/router/AbstractRouter.ts:84


_window

Protected _window: Window

Defined in

packages/core/src/router/ClientRouter.ts:44

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/router/ClientRouter.ts:59

Methods

#addParamsFromOriginalRoute

Private #addParamsFromOriginalRoute(params): Object

Obtains original route that was handled before not-found / error route and assigns its params to current params

Parameters

NameTypeDescription
paramsRouteParamsRoute params for not-found or error page

Returns

Object

Provided params merged with params -from original route

Inherited from

AbstractRouter.#addParamsFromOriginalRoute

Defined in

packages/core/src/router/AbstractRouter.ts:733


#handleMounted

Private #handleMounted(): void

Returns

void

Defined in

packages/core/src/router/ClientRouter.ts:476


#isSPARouted

Private #isSPARouted(url?, action?): boolean

This option allows user to override how certain URLs are handled +from original route

Inherited from

AbstractRouter.#addParamsFromOriginalRoute

Defined in

packages/core/src/router/AbstractRouter.ts:733


#handleMounted

Private #handleMounted(): void

Returns

void

Defined in

packages/core/src/router/ClientRouter.ts:476


#isSPARouted

Private #isSPARouted(url?, action?): boolean

This option allows user to override how certain URLs are handled during SPA (client) routing. This adds possibility to opt-out of SPA routing for specific URLs and let them be handled by browser -natively.

Parameters

NameTypeDefault valueDescription
url?string''The URL.
action?RouteActionundefined-

Returns

boolean

true if url routing should be handled by IMA.

Defined in

packages/core/src/router/ClientRouter.ts:472


_boundHandleClick

Protected _boundHandleClick(event): void

Parameters

NameType
eventEvent

Returns

void

Defined in

packages/core/src/router/ClientRouter.ts:45


_boundHandlePopState

Protected _boundHandlePopState(event): void

Parameters

NameType
eventEvent

Returns

void

Defined in

packages/core/src/router/ClientRouter.ts:47


_extractRoutePath

Protected _extractRoutePath(path): string

Strips the URL path part that points to the application's root (base -URL) from the provided path.

Parameters

NameTypeDescription
pathstringRelative or absolute URL path.

Returns

string

URL path relative to the application's base URL.

Inherited from

AbstractRouter._extractRoutePath

Defined in

packages/core/src/router/AbstractRouter.ts:526


_getAnchorElement

_getAnchorElement(target): Node

The method determines whether an anchor element or a child of an anchor +natively.

Parameters

NameTypeDefault valueDescription
url?string''The URL.
action?RouteActionundefined-

Returns

boolean

true if url routing should be handled by IMA.

Defined in

packages/core/src/router/ClientRouter.ts:472


_boundHandleClick

Protected _boundHandleClick(event): void

Parameters

NameType
eventEvent

Returns

void

Defined in

packages/core/src/router/ClientRouter.ts:45


_boundHandlePopState

Protected _boundHandlePopState(event): void

Parameters

NameType
eventEvent

Returns

void

Defined in

packages/core/src/router/ClientRouter.ts:47


_extractRoutePath

Protected _extractRoutePath(path): string

Strips the URL path part that points to the application's root (base +URL) from the provided path.

Parameters

NameTypeDescription
pathstringRelative or absolute URL path.

Returns

string

URL path relative to the application's base URL.

Inherited from

AbstractRouter._extractRoutePath

Defined in

packages/core/src/router/AbstractRouter.ts:526


_getAnchorElement

_getAnchorElement(target): Node

The method determines whether an anchor element or a child of an anchor element has been clicked, and if it was, the method returns anchor -element else null.

Parameters

NameType
targetNode

Returns

Node

Defined in

packages/core/src/router/ClientRouter.ts:408


_getCurrentlyRoutedPath

_getCurrentlyRoutedPath(): string

Returns path that is stored in private property when a route -method is called.

Returns

string

Inherited from

AbstractRouter._getCurrentlyRoutedPath

Defined in

packages/core/src/router/AbstractRouter.ts:664


_getMiddlewaresForRoute

_getMiddlewaresForRoute(routeName): RouterMiddleware[]

Returns middlewares preceding given route name.

Parameters

NameType
routeNamestring

Returns

RouterMiddleware[]

Inherited from

AbstractRouter._getMiddlewaresForRoute

Defined in

packages/core/src/router/AbstractRouter.ts:642


_handle

_handle(route, params, options?, action?): Promise<void | UnknownParameters>

Handles the provided route and parameters by initializing the route's +element else null.

Parameters

NameType
targetNode

Returns

Node

Defined in

packages/core/src/router/ClientRouter.ts:408


_getCurrentlyRoutedPath

_getCurrentlyRoutedPath(): string

Returns path that is stored in private property when a route +method is called.

Returns

string

Inherited from

AbstractRouter._getCurrentlyRoutedPath

Defined in

packages/core/src/router/AbstractRouter.ts:664


_getMiddlewaresForRoute

_getMiddlewaresForRoute(routeName): RouterMiddleware[]

Returns middlewares preceding given route name.

Parameters

NameType
routeNamestring

Returns

RouterMiddleware[]

Inherited from

AbstractRouter._getMiddlewaresForRoute

Defined in

packages/core/src/router/AbstractRouter.ts:642


_handle

_handle(route, params, options?, action?): Promise<void | UnknownParameters>

Handles the provided route and parameters by initializing the route's controller and rendering its state via the route's view.

The result is then sent to the client if used at the server side, or displayed if used as the client side.

Parameters

NameTypeDescription
routeAbstractRoute<string | RoutePathExpression>The route that should have its associated controller rendered via the associated view.
paramsRouteParamsParameters extracted from the URL path and query.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
action?RouteActionAn action object describing what triggered this routing.

Returns

Promise<void | UnknownParameters>

A promise that resolves when the page is rendered and the result is sent to the client, or -displayed if used at the client side.

Inherited from

AbstractRouter._handle

Defined in

packages/core/src/router/AbstractRouter.ts:549


_handleClick

_handleClick(event): void

Handles a click event. The method performs navigation to the target +displayed if used at the client side.

Inherited from

AbstractRouter._handle

Defined in

packages/core/src/router/AbstractRouter.ts:549


_handleClick

_handleClick(event): void

Handles a click event. The method performs navigation to the target location of the anchor (if it has one).

The navigation will be handled by the router if the protocol and domain of the anchor's target location (href) is the same as the current, -otherwise the method results in a hard redirect.

Parameters

NameTypeDescription
eventMouseEventThe click event.

Returns

void

Defined in

packages/core/src/router/ClientRouter.ts:350


_handleFatalError

_handleFatalError(error): void

Handle a fatal error application state. IMA handle fatal error when IMA -handle error.

Parameters

NameType
errorError

Returns

void

Defined in

packages/core/src/router/ClientRouter.ts:305


_handlePopState

_handlePopState(event): void

Handles a popstate event. The method is performed when the active history +otherwise the method results in a hard redirect.

Parameters

NameTypeDescription
eventMouseEventThe click event.

Returns

void

Defined in

packages/core/src/router/ClientRouter.ts:350


_handleFatalError

_handleFatalError(error): void

Handle a fatal error application state. IMA handle fatal error when IMA +handle error.

Parameters

NameType
errorError

Returns

void

Defined in

packages/core/src/router/ClientRouter.ts:305


_handlePopState

_handlePopState(event): void

Handles a popstate event. The method is performed when the active history entry changes.

The navigation will be handled by the router if the event state is defined -and event is not defaultPrevented.

Parameters

NameTypeDescription
eventPopStateEventThe popstate event.

Returns

void

Defined in

packages/core/src/router/ClientRouter.ts:326


_isHashLink(targetUrl): boolean

Tests whether the provided target URL contains only an update of the +and event is not defaultPrevented.

Parameters

NameTypeDescription
eventPopStateEventThe popstate event.

Returns

void

Defined in

packages/core/src/router/ClientRouter.ts:326


_isHashLink(targetUrl): boolean

Tests whether the provided target URL contains only an update of the hash fragment of the current URL.

Parameters

NameTypeDescription
targetUrlstringThe target URL.

Returns

boolean

true if the navigation to target URL would -result only in updating the hash fragment of the current URL.

Defined in

packages/core/src/router/ClientRouter.ts:436


_isSameDomain

_isSameDomain(url?): boolean

Tests whether the the protocol and domain of the provided URL are the +result only in updating the hash fragment of the current URL.

Defined in

packages/core/src/router/ClientRouter.ts:436


_isSameDomain

_isSameDomain(url?): boolean

Tests whether the the protocol and domain of the provided URL are the same as the current.

Parameters

NameTypeDefault valueDescription
url?string''The URL.

Returns

boolean

true if the protocol and domain of the -provided URL are the same as the current.

Defined in

packages/core/src/router/ClientRouter.ts:459


_runMiddlewares

_runMiddlewares(middlewares, params, locals): Promise<void>

Runs provided middlewares in sequence.

Parameters

NameTypeDescription
middlewaresundefined | RouterMiddleware[]Array of middlewares.
paramsRouteParamsRouter params that can be mutated by middlewares.
localsRouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void>

Inherited from

AbstractRouter._runMiddlewares

Defined in

packages/core/src/router/AbstractRouter.ts:677


add

add(name, pathExpression, controller, view, options?): ClientRouter

Adds a new route to router.

Parameters

NameTypeDescription
namestringThe unique name of this route, identifying it among the rest of the routes in the application.
pathExpressionstringA path expression specifying the URL path part matching this route (must not contain a query string), optionally containing named parameter placeholders specified as :parameterName. The name of the parameter is terminated by a forward slash (/) or the end of the path expression string. The path expression may also contain optional parameters, which are specified as :?parameterName. It is recommended to specify the optional parameters at the end of the path expression.
controllerAsyncRouteControllerThe full name of Object Container alias identifying the controller associated with this route.
viewAsyncRouteViewThe full name or Object Container alias identifying the view class associated with this route.
options?Partial<RouteOptions>Additional route options, specified how the navigation to the route will be handled. The onlyUpdate can be either a flag signalling whether the current controller and view instances should be kept if they match the ones used by the previous route; or a callback function that will receive the previous controller and view identifiers used in the previously matching route, and returns a boolean representing the value of the flag. This flag is disabled by default. The autoScroll flag signals whether the page should be scrolled to the top when the navigation takes place. This flag is enabled by default.

Returns

ClientRouter

This router.

Throws

Thrown if a route with the same name already exists.

Inherited from

AbstractRouter.add

Defined in

packages/core/src/router/AbstractRouter.ts:167


getBaseUrl

getBaseUrl(): string

Returns the application's absolute base URL, pointing to the public root -of the application.

Returns

string

The application's base URL.

Inherited from

AbstractRouter.getBaseUrl

Defined in

packages/core/src/router/AbstractRouter.ts:243


getCurrentRouteInfo

getCurrentRouteInfo(): Object

Returns the information about the currently active route.

Returns

Object

NameType
paramsRouteParams<{}>
pathstring
routeAbstractRoute<string | RoutePathExpression>

Throws

Thrown if a route is not define for current path.

Inherited from

AbstractRouter.getCurrentRouteInfo

Defined in

packages/core/src/router/AbstractRouter.ts:271


getDomain

getDomain(): string

Returns the application's domain in the following form -${protocol}//${host}.

Returns

string

The current application's domain.

Inherited from

AbstractRouter.getDomain

Defined in

packages/core/src/router/AbstractRouter.ts:250


getHost

getHost(): string

Returns application's host (domain and, if necessary, the port number).

Returns

string

The current application's host.

Inherited from

AbstractRouter.getHost

Defined in

packages/core/src/router/AbstractRouter.ts:257


getPath

getPath(): string

Returns the current path part of the current URL, including the query -string (if any).

Returns

string

The path and query parts of the current URL.

Overrides

AbstractRouter.getPath

Defined in

packages/core/src/router/ClientRouter.ts:120


getProtocol

getProtocol(): string

Returns the current protocol used to access the application, terminated +provided URL are the same as the current.

Defined in

packages/core/src/router/ClientRouter.ts:459


_runMiddlewares

_runMiddlewares(middlewares, params, locals): Promise<void>

Runs provided middlewares in sequence.

Parameters

NameTypeDescription
middlewaresundefined | RouterMiddleware[]Array of middlewares.
paramsRouteParamsRouter params that can be mutated by middlewares.
localsRouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void>

Inherited from

AbstractRouter._runMiddlewares

Defined in

packages/core/src/router/AbstractRouter.ts:677


add

add(name, pathExpression, controller, view, options?): ClientRouter

Adds a new route to router.

Parameters

NameTypeDescription
namestringThe unique name of this route, identifying it among the rest of the routes in the application.
pathExpressionstringA path expression specifying the URL path part matching this route (must not contain a query string), optionally containing named parameter placeholders specified as :parameterName. The name of the parameter is terminated by a forward slash (/) or the end of the path expression string. The path expression may also contain optional parameters, which are specified as :?parameterName. It is recommended to specify the optional parameters at the end of the path expression.
controllerAsyncRouteControllerThe full name of Object Container alias identifying the controller associated with this route.
viewAsyncRouteViewThe full name or Object Container alias identifying the view class associated with this route.
options?Partial<RouteOptions>Additional route options, specified how the navigation to the route will be handled. The onlyUpdate can be either a flag signalling whether the current controller and view instances should be kept if they match the ones used by the previous route; or a callback function that will receive the previous controller and view identifiers used in the previously matching route, and returns a boolean representing the value of the flag. This flag is disabled by default. The autoScroll flag signals whether the page should be scrolled to the top when the navigation takes place. This flag is enabled by default.

Returns

ClientRouter

This router.

Throws

Thrown if a route with the same name already exists.

Inherited from

AbstractRouter.add

Defined in

packages/core/src/router/AbstractRouter.ts:167


getBaseUrl

getBaseUrl(): string

Returns the application's absolute base URL, pointing to the public root +of the application.

Returns

string

The application's base URL.

Inherited from

AbstractRouter.getBaseUrl

Defined in

packages/core/src/router/AbstractRouter.ts:243


getCurrentRouteInfo

getCurrentRouteInfo(): Object

Returns the information about the currently active route.

Returns

Object

NameType
paramsRouteParams<{}>
pathstring
routeAbstractRoute<string | RoutePathExpression>

Throws

Thrown if a route is not define for current path.

Inherited from

AbstractRouter.getCurrentRouteInfo

Defined in

packages/core/src/router/AbstractRouter.ts:271


getDomain

getDomain(): string

Returns the application's domain in the following form +${protocol}//${host}.

Returns

string

The current application's domain.

Inherited from

AbstractRouter.getDomain

Defined in

packages/core/src/router/AbstractRouter.ts:250


getHost

getHost(): string

Returns application's host (domain and, if necessary, the port number).

Returns

string

The current application's host.

Inherited from

AbstractRouter.getHost

Defined in

packages/core/src/router/AbstractRouter.ts:257


getPath

getPath(): string

Returns the current path part of the current URL, including the query +string (if any).

Returns

string

The path and query parts of the current URL.

Overrides

AbstractRouter.getPath

Defined in

packages/core/src/router/ClientRouter.ts:120


getProtocol

getProtocol(): string

Returns the current protocol used to access the application, terminated by a colon (for example https:).

Returns

string

The current application protocol used to access the -application.

Inherited from

AbstractRouter.getProtocol

Defined in

packages/core/src/router/AbstractRouter.ts:264


getRouteHandler

getRouteHandler(name): undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Returns specified handler from registered route handlers.

Parameters

NameTypeDescription
namestringThe route's unique name.

Returns

undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Route with given name or undefined.

Inherited from

AbstractRouter.getRouteHandler

Defined in

packages/core/src/router/AbstractRouter.ts:220


getRouteHandlers

getRouteHandlers(): Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Returns

Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Inherit Doc

Inherited from

AbstractRouter.getRouteHandlers

Defined in

packages/core/src/router/AbstractRouter.ts:297


getRouteHandlersByPath

getRouteHandlersByPath(path): Object

Returns the route matching the provided URL path part (the path may +application.

Inherited from

AbstractRouter.getProtocol

Defined in

packages/core/src/router/AbstractRouter.ts:264


getRouteHandler

getRouteHandler(name): undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Returns specified handler from registered route handlers.

Parameters

NameTypeDescription
namestringThe route's unique name.

Returns

undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Route with given name or undefined.

Inherited from

AbstractRouter.getRouteHandler

Defined in

packages/core/src/router/AbstractRouter.ts:220


getRouteHandlers

getRouteHandlers(): Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Returns

Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Inherit Doc

Inherited from

AbstractRouter.getRouteHandlers

Defined in

packages/core/src/router/AbstractRouter.ts:297


getRouteHandlersByPath

getRouteHandlersByPath(path): Object

Returns the route matching the provided URL path part (the path may contain a query) and all middlewares preceding this route definition.

Parameters

NameTypeDescription
pathstringThe URL path.

Returns

Object

The route matching the path and middlewares preceding it or {} -(empty object) if no such route exists.

NameType
middlewaresRouterMiddleware[]
route?AbstractRoute<string | RoutePathExpression>

Inherited from

AbstractRouter.getRouteHandlersByPath

Defined in

packages/core/src/router/AbstractRouter.ts:615


getUrl

getUrl(): string

Returns the current absolute URL (including protocol, host, query, etc).

Returns

string

The current absolute URL.

Overrides

AbstractRouter.getUrl

Defined in

packages/core/src/router/ClientRouter.ts:113


handleError

handleError(params, options?, locals?): Promise<void | UnknownParameters>

Handles an internal server error by responding with the appropriate +(empty object) if no such route exists.

NameType
middlewaresRouterMiddleware[]
route?AbstractRoute<string | RoutePathExpression>

Inherited from

AbstractRouter.getRouteHandlersByPath

Defined in

packages/core/src/router/AbstractRouter.ts:615


getUrl

getUrl(): string

Returns the current absolute URL (including protocol, host, query, etc).

Returns

string

The current absolute URL.

Overrides

AbstractRouter.getUrl

Defined in

packages/core/src/router/ClientRouter.ts:113


handleError

handleError(params, options?, locals?): Promise<void | UnknownParameters>

Handles an internal server error by responding with the appropriate "internal server error" error page.

Parameters

NameTypeDescription
paramsRouteParamsParameters extracted from the current URL path and query.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void | UnknownParameters>

A promise resolved when the error has been handled and the response has been sent to the client, -or displayed if used at the client side.

Overrides

AbstractRouter.handleError

Defined in

packages/core/src/router/ClientRouter.ts:233


handleNotFound

handleNotFound(params, options?, locals?): Promise<void | UnknownParameters>

Handles a "not found" error by responding with the appropriate "not +or displayed if used at the client side.

Overrides

AbstractRouter.handleError

Defined in

packages/core/src/router/ClientRouter.ts:233


handleNotFound

handleNotFound(params, options?, locals?): Promise<void | UnknownParameters>

Handles a "not found" error by responding with the appropriate "not found" error page.

Parameters

NameTypeDescription
paramsStringParametersParameters extracted from the current URL path and query.
optionsObjectThe options overrides route options defined in the routes.js configuration file.
localsObjectThe locals param is used to pass local data between middlewares.

Returns

Promise<void | UnknownParameters>

A promise resolved when the error has been handled and the response has been sent -to the client, or displayed if used at the client side.

Overrides

AbstractRouter.handleNotFound

Defined in

packages/core/src/router/ClientRouter.ts:293


init

init(config): ClientRouter

Initializes the router with the provided configuration.

Parameters

NameTypeDescription
configObjectRouter configuration. The $Protocol field must be the current protocol used to access the application, terminated by a colon (for example https:). The $Root field must specify the URL path pointing to the application's root. The $LanguagePartPath field must be the URL path fragment used as a suffix to the $Root field that specifies the current language. The $Host field must be the application's domain (and the port number if other than the default is used) in the following form: ${protocol}//${host}.
config.$Hoststring-
config.$LanguagePartPathstring-
config.$Protocolstring-
config.$Rootstring-

Returns

ClientRouter

Overrides

AbstractRouter.init

Defined in

packages/core/src/router/ClientRouter.ts:97


isClientError

isClientError(reason): boolean

Tests, if possible, whether the specified error was caused by the +to the client, or displayed if used at the client side.

Overrides

AbstractRouter.handleNotFound

Defined in

packages/core/src/router/ClientRouter.ts:293


init

init(config): ClientRouter

Initializes the router with the provided configuration.

Parameters

NameTypeDescription
configObjectRouter configuration. The $Protocol field must be the current protocol used to access the application, terminated by a colon (for example https:). The $Root field must specify the URL path pointing to the application's root. The $LanguagePartPath field must be the URL path fragment used as a suffix to the $Root field that specifies the current language. The $Host field must be the application's domain (and the port number if other than the default is used) in the following form: ${protocol}//${host}.
config.$Hoststring-
config.$LanguagePartPathstring-
config.$Protocolstring-
config.$Rootstring-

Returns

ClientRouter

Overrides

AbstractRouter.init

Defined in

packages/core/src/router/ClientRouter.ts:97


isClientError

isClientError(reason): boolean

Tests, if possible, whether the specified error was caused by the client's action (for example wrong URL or request encoding) or by a failure at the server side.

Parameters

NameTypeDescription
reasonError | ErrorThe encountered error.

Returns

boolean

true if the error was caused the action of the -client.

Inherited from

AbstractRouter.isClientError

Defined in

packages/core/src/router/AbstractRouter.ts:507


isRedirection

isRedirection(reason): boolean

Tests, if possible, whether the specified error lead to redirection.

Parameters

NameTypeDescription
reasonError | ErrorThe encountered error.

Returns

boolean

true if the error was caused the action of the -redirection.

Inherited from

AbstractRouter.isRedirection

Defined in

packages/core/src/router/AbstractRouter.ts:514


link(routeName, params): string

Generates an absolute URL (including protocol, domain, etc) for the +client.

Inherited from

AbstractRouter.isClientError

Defined in

packages/core/src/router/AbstractRouter.ts:507


isRedirection

isRedirection(reason): boolean

Tests, if possible, whether the specified error lead to redirection.

Parameters

NameTypeDescription
reasonError | ErrorThe encountered error.

Returns

boolean

true if the error was caused the action of the +redirection.

Inherited from

AbstractRouter.isRedirection

Defined in

packages/core/src/router/AbstractRouter.ts:514


link(routeName, params): string

Generates an absolute URL (including protocol, domain, etc) for the specified route by substituting the route's parameter placeholders with -the provided parameter values.

Parameters

NameTypeDescription
routeNamestringThe unique name of the route, identifying the route to use.
paramsRouteParamsParameter values for the route's parameter placeholders. Extraneous parameters will be added as URL query.

Returns

string

An absolute URL for the specified route and parameters.

Inherited from

AbstractRouter.link

Defined in

packages/core/src/router/AbstractRouter.ts:338


listen

listen(): ClientRouter

Registers event listeners at the client side window object allowing the +the provided parameter values.

Parameters

NameTypeDescription
routeNamestringThe unique name of the route, identifying the route to use.
paramsRouteParamsParameter values for the route's parameter placeholders. Extraneous parameters will be added as URL query.

Returns

string

An absolute URL for the specified route and parameters.

Inherited from

AbstractRouter.link

Defined in

packages/core/src/router/AbstractRouter.ts:338


listen

listen(): ClientRouter

Registers event listeners at the client side window object allowing the router to capture user's history (history pop state - going "back") and page (clicking links) navigation.

The router will start processing the navigation internally, handling the user's navigation to display the page related to the URL resulting from the user's action.

Note that the router will not prevent forms from being submitted to the server.

The effects of this method can be reverted with unlisten. This -method has no effect at the server side.

Returns

ClientRouter

This router.

Overrides

AbstractRouter.listen

Defined in

packages/core/src/router/ClientRouter.ts:127


redirect

redirect(url, options?, action?, locals?): void

Redirects the client to the specified location.

At the server side the method results in responding to the client with a +method has no effect at the server side.

Returns

ClientRouter

This router.

Overrides

AbstractRouter.listen

Defined in

packages/core/src/router/ClientRouter.ts:127


redirect

redirect(url, options?, action?, locals?): void

Redirects the client to the specified location.

At the server side the method results in responding to the client with a redirect HTTP status code and the Location header.

At the client side the method updates the current URL by manipulating the browser history (if the target URL is at the same domain and protocol as the current one) or performs a hard redirect (if the target URL points to a different protocol or domain).

The method will result in the router handling the new URL and routing the client to the related page if the URL is set at the client side and -points to the same domain and protocol.

Parameters

NameTypeDescription
urlstringThe URL to which the client should be redirected.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
action?RouteActionAn action object describing what triggered this routing.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

void

Overrides

AbstractRouter.redirect

Defined in

packages/core/src/router/ClientRouter.ts:169


remove

remove(name): ClientRouter

Removes the specified route from the router's known routes.

Parameters

NameTypeDescription
namestringThe route's unique name, identifying the route to remove.

Returns

ClientRouter

This router.

Inherited from

AbstractRouter.remove

Defined in

packages/core/src/router/AbstractRouter.ts:211


route

route(path, options?, action?, locals?): Promise<void | UnknownParameters>

Routes the application to the route matching the providing path, renders +points to the same domain and protocol.

Parameters

NameTypeDescription
urlstringThe URL to which the client should be redirected.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
action?RouteActionAn action object describing what triggered this routing.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

void

Overrides

AbstractRouter.redirect

Defined in

packages/core/src/router/ClientRouter.ts:169


remove

remove(name): ClientRouter

Removes the specified route from the router's known routes.

Parameters

NameTypeDescription
namestringThe route's unique name, identifying the route to remove.

Returns

ClientRouter

This router.

Inherited from

AbstractRouter.remove

Defined in

packages/core/src/router/AbstractRouter.ts:211


route

route(path, options?, action?, locals?): Promise<void | UnknownParameters>

Routes the application to the route matching the providing path, renders the route page and sends the result to the client.

Parameters

NameTypeDescription
pathstringThe URL path part received from the client, with optional query.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
action?RouteActionAn action object describing what triggered this routing.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void | UnknownParameters>

A promise resolved when the error has been handled and the response has been sent -to the client, or displayed if used at the client side.

Overrides

AbstractRouter.route

Defined in

packages/core/src/router/ClientRouter.ts:198


unlisten

unlisten(): ClientRouter

Unregisters event listeners at the client side window object allowing the +to the client, or displayed if used at the client side.

Overrides

AbstractRouter.route

Defined in

packages/core/src/router/ClientRouter.ts:198


unlisten

unlisten(): ClientRouter

Unregisters event listeners at the client side window object allowing the router to capture user's history (history pop state - going "back") and page (clicking links) navigation.

The router will stop processing the navigation internally, handling the user's navigation to display the page related to the URL resulting from the user's action.

Note that the router will not prevent forms from being submitted to the server.

The effects of this method can be reverted with unlisten. This method has no effect -at the server side.

Returns

ClientRouter

This router.

Overrides

AbstractRouter.unlisten

Defined in

packages/core/src/router/ClientRouter.ts:148


use

use(middleware): ClientRouter

Adds a new middleware to router.

Parameters

NameTypeDescription
middlewareRouterMiddlewareMiddleware function accepting routeParams as a first argument, which can be mutated and locals object as second argument. This can be used to pass data between middlewares.

Returns

ClientRouter

This router.

Throws

Thrown if a middleware with the same name already exists.

Inherited from

AbstractRouter.use

Defined in

packages/core/src/router/AbstractRouter.ts:199

- - +at the server side.

Returns

ClientRouter

This router.

Overrides

AbstractRouter.unlisten

Defined in

packages/core/src/router/ClientRouter.ts:148


use

use(middleware): ClientRouter

Adds a new middleware to router.

Parameters

NameTypeDescription
middlewareRouterMiddlewareMiddleware function accepting routeParams as a first argument, which can be mutated and locals object as second argument. This can be used to pass data between middlewares.

Returns

ClientRouter

This router.

Throws

Thrown if a middleware with the same name already exists.

Inherited from

AbstractRouter.use

Defined in

packages/core/src/router/AbstractRouter.ts:199

+ + \ No newline at end of file diff --git a/api/classes/ima_core.ClientWindow/index.html b/api/classes/ima_core.ClientWindow/index.html index 866f6b20f5..7909392f84 100644 --- a/api/classes/ima_core.ClientWindow/index.html +++ b/api/classes/ima_core.ClientWindow/index.html @@ -4,40 +4,40 @@ Class: ClientWindow | IMA.js - - + +
-
Skip to main content

Class: ClientWindow

@ima/core.ClientWindow

Client-side implementation of the Window utility API.

Hierarchy

Constructors

constructor

new ClientWindow()

Inherited from

Window.constructor

Properties

#scopedListeners

Private #scopedListeners: WeakMap<object, any>

Defined in

packages/core/src/window/ClientWindow.ts:10

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/window/ClientWindow.ts:12

Methods

_findScopedListener

Private _findScopedListener<T, E, S>(eventTarget, event, listener, options, scope, remove?): any

Type parameters

NameType
Textends EventTarget
Eextends Event
SS

Parameters

NameTypeDefault value
eventTargetTundefined
eventstringundefined
listener(event: E) => voidundefined
optionsboolean | AddEventListenerOptionsundefined
scopeSundefined
removebooleanfalse

Returns

any

Defined in

packages/core/src/window/ClientWindow.ts:297


bindEventListener

bindEventListener<T, E, S>(eventTarget, event, listener, options?, scope?): void

Registers the provided event listener to be executed when the specified +

Class: ClientWindow

@ima/core.ClientWindow

Client-side implementation of the Window utility API.

Hierarchy

Constructors

constructor

new ClientWindow()

Inherited from

Window.constructor

Properties

#scopedListeners

Private #scopedListeners: WeakMap<object, any>

Defined in

packages/core/src/window/ClientWindow.ts:10

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/window/ClientWindow.ts:12

Methods

_findScopedListener

Private _findScopedListener<T, E, S>(eventTarget, event, listener, options, scope, remove?): any

Type parameters

NameType
Textends EventTarget
Eextends Event
SS

Parameters

NameTypeDefault value
eventTargetTundefined
eventstringundefined
listener(event: E) => voidundefined
optionsboolean | AddEventListenerOptionsundefined
scopeSundefined
removebooleanfalse

Returns

any

Defined in

packages/core/src/window/ClientWindow.ts:297


bindEventListener

bindEventListener<T, E, S>(eventTarget, event, listener, options?, scope?): void

Registers the provided event listener to be executed when the specified event occurs on the specified event target.

Registering the same event listener for the same event on the same event target with the same useCapture flag value repeatedly has no -effect.

Type parameters

NameType
Textends EventTarget
Eextends Event
SS

Parameters

NameTypeDefault valueDescription
eventTargetTundefinedThe event target.
eventstringundefinedThe name of the event.
listener(event: E) => voidundefinedThe event listener.
optionsboolean | EventListenerOptionsfalse-
scope?Sundefined-

Returns

void

Overrides

Window.bindEventListener

Defined in

packages/core/src/window/ClientWindow.ts:213


createCustomEvent

createCustomEvent<T>(name, options): CustomEvent<T>

Create new instance of CustomEvent of the specified name and using the -provided options.

Type parameters

Name
T

Parameters

NameTypeDescription
namestringCustom event's name (sometimes referred to as the event's type).
optionsCustomEventInit<T>The custom event's options.

Returns

CustomEvent<T>

The created custom event.

See

https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent

Overrides

Window.createCustomEvent

Defined in

packages/core/src/window/ClientWindow.ts:203


getBody

getBody(): undefined | HTMLElement

Returns the document's body element. The method returns +effect.

Type parameters

NameType
Textends EventTarget
Eextends Event
SS

Parameters

NameTypeDefault valueDescription
eventTargetTundefinedThe event target.
eventstringundefinedThe name of the event.
listener(event: E) => voidundefinedThe event listener.
optionsboolean | EventListenerOptionsfalse-
scope?Sundefined-

Returns

void

Overrides

Window.bindEventListener

Defined in

packages/core/src/window/ClientWindow.ts:213


createCustomEvent

createCustomEvent<T>(name, options): CustomEvent<T>

Create new instance of CustomEvent of the specified name and using the +provided options.

Type parameters

Name
T

Parameters

NameTypeDescription
namestringCustom event's name (sometimes referred to as the event's type).
optionsCustomEventInit<T>The custom event's options.

Returns

CustomEvent<T>

The created custom event.

See

https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent

Overrides

Window.createCustomEvent

Defined in

packages/core/src/window/ClientWindow.ts:203


getBody

getBody(): undefined | HTMLElement

Returns the document's body element. The method returns undefined if invoked at the server-side.

Returns

undefined | HTMLElement

The document's body element, or -undefined if invoked at the server side.

Overrides

Window.getBody

Defined in

packages/core/src/window/ClientWindow.ts:141


getDocument

getDocument(): Document

Returns the native document object representing any web page loaded +undefined if invoked at the server side.

Overrides

Window.getBody

Defined in

packages/core/src/window/ClientWindow.ts:141


getDocument

getDocument(): Document

Returns the native document object representing any web page loaded in the browser and serves as an entry point into the web page's content which is the DOM tree at the client-side. The method returns undefined if used at the server-side.

Returns

Document

The document object at the -client-side, or undefined at the server-side.

Overrides

Window.getDocument

Defined in

packages/core/src/window/ClientWindow.ts:69


getDomain

getDomain(): string

Returns the domain of the current document's URL as -${protocol}://${host}.

Returns

string

The current domain.

Overrides

Window.getDomain

Defined in

packages/core/src/window/ClientWindow.ts:113


getElementById

getElementById(id): null | HTMLElement

Returns the HTML element with the specified id attribute value.

Parameters

NameTypeDescription
idstringThe value of the id attribute to look for.

Returns

null | HTMLElement

The element with the specified id, or -null if no such element exists.

Overrides

Window.getElementById

Defined in

packages/core/src/window/ClientWindow.ts:148


getHistoryState

getHistoryState(): any

Returns the history state.

Returns

any

The current history state

Overrides

Window.getHistoryState

Defined in

packages/core/src/window/ClientWindow.ts:155


getHost

getHost(): string

Returns

string

The current host.

Overrides

Window.getHost

Defined in

packages/core/src/window/ClientWindow.ts:120


getPath

getPath(): string

Returns the path part of the current URL, including the query string.

Returns

string

The path and query string parts of the current URL.

Overrides

Window.getPath

Defined in

packages/core/src/window/ClientWindow.ts:127


getScrollX

getScrollX(): number

Returns the number of pixels the viewport is scrolled horizontally.

Returns

number

The number of pixels the viewport is scrolled -horizontally.

Overrides

Window.getScrollX

Defined in

packages/core/src/window/ClientWindow.ts:76


getScrollY

getScrollY(): number

Returns the number of pixels the document is scrolled vertically.

Returns

number

The number of pixels the document is scrolled -vertically.

Overrides

Window.getScrollY

Defined in

packages/core/src/window/ClientWindow.ts:91


getUrl

getUrl(): string

Returns

string

The current document's URL.

Overrides

Window.getUrl

Defined in

packages/core/src/window/ClientWindow.ts:134


getWindow

getWindow(): Window

Returns the native window object representing the global context +client-side, or undefined at the server-side.

Overrides

Window.getDocument

Defined in

packages/core/src/window/ClientWindow.ts:69


getDomain

getDomain(): string

Returns the domain of the current document's URL as +${protocol}://${host}.

Returns

string

The current domain.

Overrides

Window.getDomain

Defined in

packages/core/src/window/ClientWindow.ts:113


getElementById

getElementById(id): null | HTMLElement

Returns the HTML element with the specified id attribute value.

Parameters

NameTypeDescription
idstringThe value of the id attribute to look for.

Returns

null | HTMLElement

The element with the specified id, or +null if no such element exists.

Overrides

Window.getElementById

Defined in

packages/core/src/window/ClientWindow.ts:148


getHistoryState

getHistoryState(): any

Returns the history state.

Returns

any

The current history state

Overrides

Window.getHistoryState

Defined in

packages/core/src/window/ClientWindow.ts:155


getHost

getHost(): string

Returns

string

The current host.

Overrides

Window.getHost

Defined in

packages/core/src/window/ClientWindow.ts:120


getPath

getPath(): string

Returns the path part of the current URL, including the query string.

Returns

string

The path and query string parts of the current URL.

Overrides

Window.getPath

Defined in

packages/core/src/window/ClientWindow.ts:127


getScrollX

getScrollX(): number

Returns the number of pixels the viewport is scrolled horizontally.

Returns

number

The number of pixels the viewport is scrolled +horizontally.

Overrides

Window.getScrollX

Defined in

packages/core/src/window/ClientWindow.ts:76


getScrollY

getScrollY(): number

Returns the number of pixels the document is scrolled vertically.

Returns

number

The number of pixels the document is scrolled +vertically.

Overrides

Window.getScrollY

Defined in

packages/core/src/window/ClientWindow.ts:91


getUrl

getUrl(): string

Returns

string

The current document's URL.

Overrides

Window.getUrl

Defined in

packages/core/src/window/ClientWindow.ts:134


getWindow

getWindow(): Window

Returns the native window object representing the global context at the client-side. The method returns undefined if used at the server-side.

Returns

Window

The window object at the -client-side, or undefined at the server-side.

Overrides

Window.getWindow

Defined in

packages/core/src/window/ClientWindow.ts:62


hasSessionStorage

hasSessionStorage(): boolean

Returns true if the session storage is supported.

Returns

boolean

true if the session storage is supported.

Overrides

Window.hasSessionStorage

Defined in

packages/core/src/window/ClientWindow.ts:33


isClient

isClient(): boolean

Returns

boolean

true if invoked at the client side.

Overrides

Window.isClient

Defined in

packages/core/src/window/ClientWindow.ts:19


isCookieEnabled

isCookieEnabled(): boolean

Returns true if the cookies are set and processed with every +client-side, or undefined at the server-side.

Overrides

Window.getWindow

Defined in

packages/core/src/window/ClientWindow.ts:62


hasSessionStorage

hasSessionStorage(): boolean

Returns true if the session storage is supported.

Returns

boolean

true if the session storage is supported.

Overrides

Window.hasSessionStorage

Defined in

packages/core/src/window/ClientWindow.ts:33


isClient

isClient(): boolean

Returns

boolean

true if invoked at the client side.

Overrides

Window.isClient

Defined in

packages/core/src/window/ClientWindow.ts:19


isCookieEnabled

isCookieEnabled(): boolean

Returns true if the cookies are set and processed with every HTTP request and response automatically by the environment.

Returns

boolean

true if cookies are handled automatically by -the environment.

Overrides

Window.isCookieEnabled

Defined in

packages/core/src/window/ClientWindow.ts:26


pushState

pushState<T>(state, title, url?): void

Pushes a new state to the browser history. The method has no effect if -the current browser does not support the history API (IE9).

Type parameters

Name
T

Parameters

NameTypeDescription
stateTA state object associated with the history item, preferably representing the page state.
titlestringThe page title related to the state. Note that this parameter is ignored by some browsers.
url?stringThe new URL at which the state is available.

Returns

void

Overrides

Window.pushState

Defined in

packages/core/src/window/ClientWindow.ts:185


querySelector

querySelector<E>(selector): null | E

Returns the first element matching the specified CSS 3 selector.

Type parameters

NameType
Eextends Element = Element

Parameters

NameTypeDescription
selectorstringThe CSS selector.

Returns

null | E

The first element matching the CSS selector or -null if no such element exists.

Overrides

Window.querySelector

Defined in

packages/core/src/window/ClientWindow.ts:162


querySelectorAll

querySelectorAll<E>(selector): NodeListOf<E>

Returns a node list of all elements matching the specified CSS 3 +the environment.

Overrides

Window.isCookieEnabled

Defined in

packages/core/src/window/ClientWindow.ts:26


pushState

pushState<T>(state, title, url?): void

Pushes a new state to the browser history. The method has no effect if +the current browser does not support the history API (IE9).

Type parameters

Name
T

Parameters

NameTypeDescription
stateTA state object associated with the history item, preferably representing the page state.
titlestringThe page title related to the state. Note that this parameter is ignored by some browsers.
url?stringThe new URL at which the state is available.

Returns

void

Overrides

Window.pushState

Defined in

packages/core/src/window/ClientWindow.ts:185


querySelector

querySelector<E>(selector): null | E

Returns the first element matching the specified CSS 3 selector.

Type parameters

NameType
Eextends Element = Element

Parameters

NameTypeDescription
selectorstringThe CSS selector.

Returns

null | E

The first element matching the CSS selector or +null if no such element exists.

Overrides

Window.querySelector

Defined in

packages/core/src/window/ClientWindow.ts:162


querySelectorAll

querySelectorAll<E>(selector): NodeListOf<E>

Returns a node list of all elements matching the specified CSS 3 selector.

Type parameters

NameType
Eextends Element = Element

Parameters

NameTypeDescription
selectorstringThe CSS selector.

Returns

NodeListOf<E>

A node list containing all elements matching the -specified CSS selector.

Overrides

Window.querySelectorAll

Defined in

packages/core/src/window/ClientWindow.ts:169


redirect

redirect(url): void

Performs a hard redirect (discarding the current JavaScript state) to -the specified URL.

Parameters

NameTypeDescription
urlstringThe URL to which the browser will be redirected.

Returns

void

Overrides

Window.redirect

Defined in

packages/core/src/window/ClientWindow.ts:178


replaceState

replaceState<T>(state, title, url?): void

Replaces the current history entry. The method has no effect if the -current browser does not support the history API (IE9).

Type parameters

Name
T

Parameters

NameTypeDescription
stateTA state object associated with the history item, preferably representing the page state.
titlestringThe page title related to the state. Note that this parameter is ignored by some browsers.
url?stringThe new URL at which the state is available.

Returns

void

Overrides

Window.replaceState

Defined in

packages/core/src/window/ClientWindow.ts:194


scrollTo

scrollTo(x, y): void

Scrolls the viewport to the specified location (if possible).

Parameters

NameTypeDescription
xnumberHorizontal scroll offset in pixels.
ynumberVertical scroll offset in pixels.

Returns

void

Overrides

Window.scrollTo

Defined in

packages/core/src/window/ClientWindow.ts:106


setTitle

setTitle(title): void

Sets the new page title of the document.

Parameters

NameTypeDescription
titlestringThe new page title.

Returns

void

Overrides

Window.setTitle

Defined in

packages/core/src/window/ClientWindow.ts:55


unbindEventListener

unbindEventListener<T, E, S>(eventTarget, event, listener, options?, scope?): void

Deregister the provided event listener, so it will no longer we +specified CSS selector.

Overrides

Window.querySelectorAll

Defined in

packages/core/src/window/ClientWindow.ts:169


redirect

redirect(url): void

Performs a hard redirect (discarding the current JavaScript state) to +the specified URL.

Parameters

NameTypeDescription
urlstringThe URL to which the browser will be redirected.

Returns

void

Overrides

Window.redirect

Defined in

packages/core/src/window/ClientWindow.ts:178


replaceState

replaceState<T>(state, title, url?): void

Replaces the current history entry. The method has no effect if the +current browser does not support the history API (IE9).

Type parameters

Name
T

Parameters

NameTypeDescription
stateTA state object associated with the history item, preferably representing the page state.
titlestringThe page title related to the state. Note that this parameter is ignored by some browsers.
url?stringThe new URL at which the state is available.

Returns

void

Overrides

Window.replaceState

Defined in

packages/core/src/window/ClientWindow.ts:194


scrollTo

scrollTo(x, y): void

Scrolls the viewport to the specified location (if possible).

Parameters

NameTypeDescription
xnumberHorizontal scroll offset in pixels.
ynumberVertical scroll offset in pixels.

Returns

void

Overrides

Window.scrollTo

Defined in

packages/core/src/window/ClientWindow.ts:106


setTitle

setTitle(title): void

Sets the new page title of the document.

Parameters

NameTypeDescription
titlestringThe new page title.

Returns

void

Overrides

Window.setTitle

Defined in

packages/core/src/window/ClientWindow.ts:55


unbindEventListener

unbindEventListener<T, E, S>(eventTarget, event, listener, options?, scope?): void

Deregister the provided event listener, so it will no longer we executed when the specified event occurs on the specified event target.

The method has no effect if the provided event listener is not -registered to be executed at the specified event.

Type parameters

NameType
Textends EventTarget
Eextends Event = Event
Sany

Parameters

NameTypeDefault valueDescription
eventTargetTundefinedThe event target.
eventstringundefinedThe name of the event.
listener(event: E) => voidundefinedThe event listener.
optionsboolean | EventListenerOptionsfalseThe useCapture flag value that was used when the listener was registered, or provide capture option through object options.
scope?Sundefined-

Returns

void

Overrides

Window.unbindEventListener

Defined in

packages/core/src/window/ClientWindow.ts:254

- - +registered to be executed at the specified event.

Type parameters

NameType
Textends EventTarget
Eextends Event = Event
Sany

Parameters

NameTypeDefault valueDescription
eventTargetTundefinedThe event target.
eventstringundefinedThe name of the event.
listener(event: E) => voidundefinedThe event listener.
optionsboolean | EventListenerOptionsfalseThe useCapture flag value that was used when the listener was registered, or provide capture option through object options.
scope?Sundefined-

Returns

void

Overrides

Window.unbindEventListener

Defined in

packages/core/src/window/ClientWindow.ts:254

+ + \ No newline at end of file diff --git a/api/classes/ima_core.ComponentUtils/index.html b/api/classes/ima_core.ComponentUtils/index.html index 8ec8549206..95e56a9d7a 100644 --- a/api/classes/ima_core.ComponentUtils/index.html +++ b/api/classes/ima_core.ComponentUtils/index.html @@ -4,13 +4,13 @@ Class: ComponentUtils | IMA.js - - + +
-
Skip to main content

Class: ComponentUtils

@ima/core.ComponentUtils

Constructors

constructor

new ComponentUtils(oc)

Initializes the registry used for managing component utils.

Parameters

NameTypeDescription
ocObjectContainerThe application's dependency injector - the object container.

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:31

Properties

_oc

Private _oc: ObjectContainer

The application's dependency injector - the object container.

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:8


_utilities

Private Optional _utilities: Utils

Map of instantiated utilities

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:18


_utilityClasses

Private _utilityClasses: Object = {}

Map of registered utilities.

Index signature

[key: string]: Dependency<any>

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:12


_utilityReferrers

Private _utilityReferrers: StringParameters = {}

Map of referrers to utilities

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:23

Methods

_createUtilityInstance

_createUtilityInstance(alias, utilityClass): any

Parameters

NameType
aliasstring
utilityClassDependency<any>

Returns

any

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:104


getReferrers

getReferrers(): StringParameters

Returns

StringParameters

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:100


getUtils

getUtils(): Utils

Returns object containing all registered utilities

Returns

Utils

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:80


register

register<T>(name, componentUtilityClass?, referrer?): void

Registers single utility class or multiple classes in alias->class mapping.

Type parameters

Name
T

Parameters

NameType
namestring | { [key: string]: string | Dependency<any>; } | Constructor<T> & WithDependencies | AbstractConstructor<T> & Partial<WithDependencies> | Function & { prototype: T } & Partial<WithDependencies> | [OCInjectable<T>, { optional: boolean }]
componentUtilityClass?Dependency<any>
referrer?string

Returns

void

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:38

- - +
Skip to main content

Class: ComponentUtils

@ima/core.ComponentUtils

Constructors

constructor

new ComponentUtils(oc)

Initializes the registry used for managing component utils.

Parameters

NameTypeDescription
ocObjectContainerThe application's dependency injector - the object container.

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:31

Properties

_oc

Private _oc: ObjectContainer

The application's dependency injector - the object container.

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:8


_utilities

Private Optional _utilities: Utils

Map of instantiated utilities

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:18


_utilityClasses

Private _utilityClasses: Object = {}

Map of registered utilities.

Index signature

[key: string]: Dependency<any>

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:12


_utilityReferrers

Private _utilityReferrers: StringParameters = {}

Map of referrers to utilities

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:23

Methods

_createUtilityInstance

_createUtilityInstance(alias, utilityClass): any

Parameters

NameType
aliasstring
utilityClassDependency<any>

Returns

any

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:104


getReferrers

getReferrers(): StringParameters

Returns

StringParameters

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:100


getUtils

getUtils(): Utils

Returns object containing all registered utilities

Returns

Utils

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:80


register

register<T>(name, componentUtilityClass?, referrer?): void

Registers single utility class or multiple classes in alias->class mapping.

Type parameters

Name
T

Parameters

NameType
namestring | { [key: string]: string | Dependency<any>; } | Constructor<T> & WithDependencies | AbstractConstructor<T> & Partial<WithDependencies> | Function & { prototype: T } & Partial<WithDependencies> | [OCInjectable<T>, { optional: boolean }]
componentUtilityClass?Dependency<any>
referrer?string

Returns

void

Defined in

packages/core/src/page/renderer/ComponentUtils.ts:38

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Controller/index.html b/api/classes/ima_core.Controller/index.html index d5232e9d65..88f6dc0527 100644 --- a/api/classes/ima_core.Controller/index.html +++ b/api/classes/ima_core.Controller/index.html @@ -4,38 +4,38 @@ Class: Controller<S, R, SS> | IMA.js - - + +
-
Skip to main content

Class: Controller<S, R, SS>

@ima/core.Controller

Interface defining the common API of page controllers. A page controller is +

Class: Controller<S, R, SS>

@ima/core.Controller

Interface defining the common API of page controllers. A page controller is used to manage the overall state and view of a single application page, and updates the page state according to the events submitted to it by components -on the page (or other input).

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends S = S

Hierarchy

Indexable

[key: PropertyKey]: any | EventBusEventHandler

Constructors

constructor

new Controller<S, R, SS>()

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends PageState = S

Properties

$dependencies

Static $dependencies: Dependencies

Defined in

packages/core/src/controller/Controller.ts:44


$extensions

Static Optional $extensions: Dependencies<Extension<{}, {}, {}>>

Defined in

packages/core/src/controller/Controller.ts:45


$name

Static Optional $name: string

Defined in

packages/core/src/controller/Controller.ts:43

Methods

activate

activate(): void | Promise<void>

Callback for activating the controller in the UI. This is the last +on the page (or other input).

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends S = S

Hierarchy

Indexable

[key: PropertyKey]: any | EventBusEventHandler

Constructors

constructor

new Controller<S, R, SS>()

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends PageState = S

Properties

$dependencies

Static $dependencies: Dependencies

Defined in

packages/core/src/controller/Controller.ts:44


$extensions

Static Optional $extensions: Dependencies<Extension<{}, {}, {}>>

Defined in

packages/core/src/controller/Controller.ts:45


$name

Static Optional $name: string

Defined in

packages/core/src/controller/Controller.ts:43

Methods

activate

activate(): void | Promise<void>

Callback for activating the controller in the UI. This is the last method invoked during controller initialization, called after all the promises returned from the load method have been resolved and the controller has configured the meta manager.

The controller may register any React and DOM event listeners in this method. The controller may start receiving event bus event after this -method completes.

Returns

void | Promise<void>

Defined in

packages/core/src/controller/Controller.ts:84


addExtension

addExtension(extension, extensionInstance?): void

Adds the provided extension to this controller. All extensions should be +method completes.

Returns

void | Promise<void>

Defined in

packages/core/src/controller/Controller.ts:84


addExtension

addExtension(extension, extensionInstance?): void

Adds the provided extension to this controller. All extensions should be added to the controller before the init method is -invoked.

Parameters

NameType
extensionkeyof OCAliasMap | Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>> | Extension<PageState, RouteParams, PageState>
extensionInstance?Extension<PageState, RouteParams, PageState>

Returns

void

Defined in

packages/core/src/controller/Controller.ts:232


beginStateTransaction

beginStateTransaction(): void

Starts queueing state patches off the controller state. While the transaction +invoked.

Parameters

NameType
extensionkeyof OCAliasMap | Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>> | Extension<PageState, RouteParams, PageState>
extensionInstance?Extension<PageState, RouteParams, PageState>

Returns

void

Defined in

packages/core/src/controller/Controller.ts:232


beginStateTransaction

beginStateTransaction(): void

Starts queueing state patches off the controller state. While the transaction is active every setState call has no effect on the current state.

Note that call to getState after the transaction has begun will -return state as it was before the transaction.

Returns

void

Defined in

packages/core/src/controller/Controller.ts:208


cancelStateTransaction

cancelStateTransaction(): void

Cancels ongoing state transaction. Uncommitted state changes are lost.

Returns

void

Defined in

packages/core/src/controller/Controller.ts:223


commitStateTransaction

commitStateTransaction(): void

Applies queued state patches to the controller state. All patches are squashed -and applied with one setState call.

Returns

void

Defined in

packages/core/src/controller/Controller.ts:216


deactivate

deactivate(): void | Promise<void>

Callback for deactivating the controller in the UI. This is the first +return state as it was before the transaction.

Returns

void

Defined in

packages/core/src/controller/Controller.ts:208


cancelStateTransaction

cancelStateTransaction(): void

Cancels ongoing state transaction. Uncommitted state changes are lost.

Returns

void

Defined in

packages/core/src/controller/Controller.ts:223


commitStateTransaction

commitStateTransaction(): void

Applies queued state patches to the controller state. All patches are squashed +and applied with one setState call.

Returns

void

Defined in

packages/core/src/controller/Controller.ts:216


deactivate

deactivate(): void | Promise<void>

Callback for deactivating the controller in the UI. This is the first method invoked during controller deinitialization. This usually happens when the user navigates to a different URL.

This method is the lifecycle counterpart of the activate method.

The controller should deregister listeners registered and release all -resources obtained in the activate method.

Returns

void | Promise<void>

Defined in

packages/core/src/controller/Controller.ts:99


destroy

destroy(): void | Promise<void>

Finalization callback, called when the controller is being discarded by +resources obtained in the activate method.

Returns

void | Promise<void>

Defined in

packages/core/src/controller/Controller.ts:99


destroy

destroy(): void | Promise<void>

Finalization callback, called when the controller is being discarded by the application. This usually happens when the user navigates to a different URL.

This method is the lifecycle counterpart of the init method.

The controller should release all resources obtained in the init method. The controller must release any resources that might not be released automatically when the controller's instance -is destroyed by the garbage collector.

Returns

void | Promise<void>

Defined in

packages/core/src/controller/Controller.ts:70


getExtension

getExtension(extension): undefined | Extension<PageState, RouteParams, PageState>

Returns extension instance defined by it's class constructor -from controller's extension intance map.

Parameters

NameType
extensiontypeof Extension

Returns

undefined | Extension<PageState, RouteParams, PageState>

Defined in

packages/core/src/controller/Controller.ts:247


getExtensions

getExtensions(): Extension<{}, {}, {}>[]

Returns the controller's extensions.

Returns

Extension<{}, {}, {}>[]

The extensions added to this controller.

Defined in

packages/core/src/controller/Controller.ts:261


getHttpStatus

getHttpStatus(): number

Returns the HTTP status code to send to the client, should the -controller be used at the server-side.

Returns

number

The HTTP status code to send to the client.

Defined in

packages/core/src/controller/Controller.ts:329


getRouteParams

getRouteParams(): R

Returns the current route parameters.

Returns

R

The current route parameters.

Defined in

packages/core/src/controller/Controller.ts:305


getState

getState(): SS

Returns the controller's current state.

Returns

SS

The current state of this controller.

Defined in

packages/core/src/controller/Controller.ts:197


init

init(): void | Promise<void>

Callback for initializing the controller after the route parameters have -been set on this controller.

Returns

void | Promise<void>

Defined in

packages/core/src/controller/Controller.ts:53


load

load(): S | Promise<S>

Callback the controller uses to request the resources it needs to render +is destroyed by the garbage collector.

Returns

void | Promise<void>

Defined in

packages/core/src/controller/Controller.ts:70


getExtension

getExtension(extension): undefined | Extension<PageState, RouteParams, PageState>

Returns extension instance defined by it's class constructor +from controller's extension intance map.

Parameters

NameType
extensiontypeof Extension

Returns

undefined | Extension<PageState, RouteParams, PageState>

Defined in

packages/core/src/controller/Controller.ts:247


getExtensions

getExtensions(): Extension<{}, {}, {}>[]

Returns the controller's extensions.

Returns

Extension<{}, {}, {}>[]

The extensions added to this controller.

Defined in

packages/core/src/controller/Controller.ts:261


getHttpStatus

getHttpStatus(): number

Returns the HTTP status code to send to the client, should the +controller be used at the server-side.

Returns

number

The HTTP status code to send to the client.

Defined in

packages/core/src/controller/Controller.ts:329


getRouteParams

getRouteParams(): R

Returns the current route parameters.

Returns

R

The current route parameters.

Defined in

packages/core/src/controller/Controller.ts:305


getState

getState(): SS

Returns the controller's current state.

Returns

SS

The current state of this controller.

Defined in

packages/core/src/controller/Controller.ts:197


init

init(): void | Promise<void>

Callback for initializing the controller after the route parameters have +been set on this controller.

Returns

void | Promise<void>

Defined in

packages/core/src/controller/Controller.ts:53


load

load(): S | Promise<S>

Callback the controller uses to request the resources it needs to render its view. This method is invoked after the init method.

The controller should request all resources it needs in this method, and represent each resource request as a promise that will resolve once the @@ -53,14 +53,14 @@ the error page. The error page that will be used depends on the status code of the error.

Returns

S | Promise<S>

A map object of promises resolved when all resources the controller requires are ready. The resolved values will be pushed to the -controller's state.

Defined in

packages/core/src/controller/Controller.ts:138


setMetaParams

setMetaParams(loadedResources, metaManager, router, dictionary, settings): void

Callback used to configure the meta attribute manager. The method is +controller's state.

Defined in

packages/core/src/controller/Controller.ts:138


setMetaParams

setMetaParams(loadedResources, metaManager, router, dictionary, settings): void

Callback used to configure the meta attribute manager. The method is called after the the controller's state has been patched with the all -loaded resources and the view has been rendered.

Parameters

NameTypeDescription
loadedResourcesIntersection<Partial<Pick<SS, Matching<SS, Promise<any>>>>, Required<Pick<SS, NonMatching<SS, Promise<any>>>>>A plain object representing a map of resource names to resources loaded by the load method. This is the same object as the one passed to the setState method.
metaManagerMetaManagerMeta attributes manager to configure.
routerRouterThe current application router.
dictionaryDictionaryThe current localization dictionary.
settingsSettingsThe application settings for the current application environment.

Returns

void

Defined in

packages/core/src/controller/Controller.ts:280


setPageStateManager

setPageStateManager(pageStateManager?): void

Sets the page state manager. The page state manager manages the +loaded resources and the view has been rendered.

Parameters

NameTypeDescription
loadedResourcesIntersection<Partial<Pick<SS, Matching<SS, Promise<any>>>>, Required<Pick<SS, NonMatching<SS, Promise<any>>>>>A plain object representing a map of resource names to resources loaded by the load method. This is the same object as the one passed to the setState method.
metaManagerMetaManagerMeta attributes manager to configure.
routerRouterThe current application router.
dictionaryDictionaryThe current localization dictionary.
settingsSettingsThe application settings for the current application environment.

Returns

void

Defined in

packages/core/src/controller/Controller.ts:280


setPageStateManager

setPageStateManager(pageStateManager?): void

Sets the page state manager. The page state manager manages the controller's state. The state manager can be set to null if this controller loses the right to modify the state of the current page (e.g. the user has navigated to a different route using a different -controller).

Parameters

NameTypeDescription
pageStateManager?PageStateManager<SS>The current state manager to use.

Returns

void

Defined in

packages/core/src/controller/Controller.ts:319


setRouteParams

setRouteParams(params?): void

Sets the current route parameters. This method is invoked before the -init method.

Parameters

NameTypeDescription
paramsRThe current route parameters.

Returns

void

Defined in

packages/core/src/controller/Controller.ts:296


setState

setState<K>(statePatch): void

Patches the state of this controller using the provided object by +controller).

Parameters

NameTypeDescription
pageStateManager?PageStateManager<SS>The current state manager to use.

Returns

void

Defined in

packages/core/src/controller/Controller.ts:319


setRouteParams

setRouteParams(params?): void

Sets the current route parameters. This method is invoked before the +init method.

Parameters

NameTypeDescription
paramsRThe current route parameters.

Returns

void

Defined in

packages/core/src/controller/Controller.ts:296


setState

setState<K>(statePatch): void

Patches the state of this controller using the provided object by copying the provided patch object fields to the controller's state object.

You can use this method to modify the state partially or add new fields to the state object.

Note that the state is not patched recursively but by replacing the @@ -68,7 +68,7 @@ resolved, this method is called with the an object containing the resolved values. The field names of the passed object will match the field names in the object returned from the load -method.

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameTypeDescription
statePatchnull | S | Pick<S, K>Patch of the controller's state to apply.

Returns

void

Defined in

packages/core/src/controller/Controller.ts:188


update

update(prevParams?): S | Promise<S>

Callback for updating the controller after a route update. This method +method.

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameTypeDescription
statePatchnull | S | Pick<S, K>Patch of the controller's state to apply.

Returns

void

Defined in

packages/core/src/controller/Controller.ts:188


update

update(prevParams?): S | Promise<S>

Callback for updating the controller after a route update. This method is invoked if the current route has the onlyUpdate flag set to true and the current controller and view match those used by the previously active route, or, the onlyUpdate option of the current route is a callback and @@ -79,8 +79,8 @@ deactivate, Controller#deinit) are not call in case this method is used.

Parameters

NameTypeDescription
prevParamsRPrevious route parameters.

Returns

S | Promise<S>

A map object of promises resolved when all resources the controller requires are ready. The resolved values will be pushed to the -controller's state.

Defined in

packages/core/src/controller/Controller.ts:164

- - +controller's state.

Defined in

packages/core/src/controller/Controller.ts:164

+ + \ No newline at end of file diff --git a/api/classes/ima_core.ControllerDecorator/index.html b/api/classes/ima_core.ControllerDecorator/index.html index 1fb5a08411..ac4b28b176 100644 --- a/api/classes/ima_core.ControllerDecorator/index.html +++ b/api/classes/ima_core.ControllerDecorator/index.html @@ -4,39 +4,39 @@ Class: ControllerDecorator<S, R, SS> | IMA.js - - + +
-
Skip to main content

Class: ControllerDecorator<S, R, SS>

@ima/core.ControllerDecorator

Decorator for page controllers. The decorator manages references to the meta +

Class: ControllerDecorator<S, R, SS>

@ima/core.ControllerDecorator

Decorator for page controllers. The decorator manages references to the meta attributes manager and other utilities so these can be easily provided to -the decorated page controller when needed.

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends S = S

Hierarchy

Constructors

constructor

new ControllerDecorator<S, R, SS>(controller, metaManager, router, dictionary, settings)

Initializes the controller decorator.

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends PageState = S

Parameters

NameTypeDescription
controllerController<S, R, SS>The controller being decorated.
metaManagerMetaManagerThe meta page attributes manager.
routerRouterThe application router.
dictionaryDictionaryLocalization phrases dictionary.
settingsSettingsApplication settings for the current application environment.

Overrides

Controller.constructor

Defined in

packages/core/src/controller/ControllerDecorator.ts:54

Properties

_controller

Protected _controller: Controller<S, R, SS>

The controller being decorated.

Defined in

packages/core/src/controller/ControllerDecorator.ts:26


_dictionary

Protected _dictionary: Dictionary

Localization phrases dictionary.

Defined in

packages/core/src/controller/ControllerDecorator.ts:38


_metaManager

Protected _metaManager: MetaManager

The meta page attributes manager.

Defined in

packages/core/src/controller/ControllerDecorator.ts:30


_router

Protected _router: Router

The application router.

Defined in

packages/core/src/controller/ControllerDecorator.ts:34


_settings

Protected _settings: Settings

Application settings for the current application environment.

Defined in

packages/core/src/controller/ControllerDecorator.ts:42


$dependencies

Static $dependencies: Dependencies

Inherited from

Controller.$dependencies

Defined in

packages/core/src/controller/Controller.ts:44


$extensions

Static Optional $extensions: Dependencies<Extension<{}, {}, {}>>

Inherited from

Controller.$extensions

Defined in

packages/core/src/controller/Controller.ts:45


$name

Static Optional $name: string

Inherited from

Controller.$name

Defined in

packages/core/src/controller/Controller.ts:43

Methods

activate

activate(): void | Promise<void>

Callback for activating the controller in the UI. This is the last +the decorated page controller when needed.

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends S = S

Hierarchy

Constructors

constructor

new ControllerDecorator<S, R, SS>(controller, metaManager, router, dictionary, settings)

Initializes the controller decorator.

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends PageState = S

Parameters

NameTypeDescription
controllerController<S, R, SS>The controller being decorated.
metaManagerMetaManagerThe meta page attributes manager.
routerRouterThe application router.
dictionaryDictionaryLocalization phrases dictionary.
settingsSettingsApplication settings for the current application environment.

Overrides

Controller.constructor

Defined in

packages/core/src/controller/ControllerDecorator.ts:54

Properties

_controller

Protected _controller: Controller<S, R, SS>

The controller being decorated.

Defined in

packages/core/src/controller/ControllerDecorator.ts:26


_dictionary

Protected _dictionary: Dictionary

Localization phrases dictionary.

Defined in

packages/core/src/controller/ControllerDecorator.ts:38


_metaManager

Protected _metaManager: MetaManager

The meta page attributes manager.

Defined in

packages/core/src/controller/ControllerDecorator.ts:30


_router

Protected _router: Router

The application router.

Defined in

packages/core/src/controller/ControllerDecorator.ts:34


_settings

Protected _settings: Settings

Application settings for the current application environment.

Defined in

packages/core/src/controller/ControllerDecorator.ts:42


$dependencies

Static $dependencies: Dependencies

Inherited from

Controller.$dependencies

Defined in

packages/core/src/controller/Controller.ts:44


$extensions

Static Optional $extensions: Dependencies<Extension<{}, {}, {}>>

Inherited from

Controller.$extensions

Defined in

packages/core/src/controller/Controller.ts:45


$name

Static Optional $name: string

Inherited from

Controller.$name

Defined in

packages/core/src/controller/Controller.ts:43

Methods

activate

activate(): void | Promise<void>

Callback for activating the controller in the UI. This is the last method invoked during controller initialization, called after all the promises returned from the load method have been resolved and the controller has configured the meta manager.

The controller may register any React and DOM event listeners in this method. The controller may start receiving event bus event after this -method completes.

Returns

void | Promise<void>

Overrides

Controller.activate

Defined in

packages/core/src/controller/ControllerDecorator.ts:87


addExtension

addExtension(extension, extensionInstance?): void

Adds the provided extension to this controller. All extensions should be +method completes.

Returns

void | Promise<void>

Overrides

Controller.activate

Defined in

packages/core/src/controller/ControllerDecorator.ts:87


addExtension

addExtension(extension, extensionInstance?): void

Adds the provided extension to this controller. All extensions should be added to the controller before the init method is -invoked.

Parameters

NameType
extensionkeyof OCAliasMap | Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>> | Extension<PageState, RouteParams, PageState>
extensionInstance?Extension<PageState, RouteParams, PageState>

Returns

void

Overrides

Controller.addExtension

Defined in

packages/core/src/controller/ControllerDecorator.ts:150


beginStateTransaction

beginStateTransaction(): void

Starts queueing state patches off the controller state. While the transaction +invoked.

Parameters

NameType
extensionkeyof OCAliasMap | Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>> | Extension<PageState, RouteParams, PageState>
extensionInstance?Extension<PageState, RouteParams, PageState>

Returns

void

Overrides

Controller.addExtension

Defined in

packages/core/src/controller/ControllerDecorator.ts:150


beginStateTransaction

beginStateTransaction(): void

Starts queueing state patches off the controller state. While the transaction is active every setState call has no effect on the current state.

Note that call to getState after the transaction has begun will -return state as it was before the transaction.

Returns

void

Overrides

Controller.beginStateTransaction

Defined in

packages/core/src/controller/ControllerDecorator.ts:129


cancelStateTransaction

cancelStateTransaction(): void

Cancels ongoing state transaction. Uncommitted state changes are lost.

Returns

void

Overrides

Controller.cancelStateTransaction

Defined in

packages/core/src/controller/ControllerDecorator.ts:143


commitStateTransaction

commitStateTransaction(): void

Applies queued state patches to the controller state. All patches are squashed -and applied with one setState call.

Returns

void

Overrides

Controller.commitStateTransaction

Defined in

packages/core/src/controller/ControllerDecorator.ts:136


deactivate

deactivate(): void | Promise<void>

Callback for deactivating the controller in the UI. This is the first +return state as it was before the transaction.

Returns

void

Overrides

Controller.beginStateTransaction

Defined in

packages/core/src/controller/ControllerDecorator.ts:129


cancelStateTransaction

cancelStateTransaction(): void

Cancels ongoing state transaction. Uncommitted state changes are lost.

Returns

void

Overrides

Controller.cancelStateTransaction

Defined in

packages/core/src/controller/ControllerDecorator.ts:143


commitStateTransaction

commitStateTransaction(): void

Applies queued state patches to the controller state. All patches are squashed +and applied with one setState call.

Returns

void

Overrides

Controller.commitStateTransaction

Defined in

packages/core/src/controller/ControllerDecorator.ts:136


deactivate

deactivate(): void | Promise<void>

Callback for deactivating the controller in the UI. This is the first method invoked during controller deinitialization. This usually happens when the user navigates to a different URL.

This method is the lifecycle counterpart of the activate method.

The controller should deregister listeners registered and release all -resources obtained in the activate method.

Returns

void | Promise<void>

Overrides

Controller.deactivate

Defined in

packages/core/src/controller/ControllerDecorator.ts:94


destroy

destroy(): void | Promise<void>

Finalization callback, called when the controller is being discarded by +resources obtained in the activate method.

Returns

void | Promise<void>

Overrides

Controller.deactivate

Defined in

packages/core/src/controller/ControllerDecorator.ts:94


destroy

destroy(): void | Promise<void>

Finalization callback, called when the controller is being discarded by the application. This usually happens when the user navigates to a different URL.

This method is the lifecycle counterpart of the init method.

The controller should release all resources obtained in the init method. The controller must release any resources that might not be released automatically when the controller's instance -is destroyed by the garbage collector.

Returns

void | Promise<void>

Overrides

Controller.destroy

Defined in

packages/core/src/controller/ControllerDecorator.ts:80


getExtension

getExtension(extension): undefined | Extension<PageState, RouteParams, PageState>

Returns extension instance defined by it's class constructor -from controller's extension intance map.

Parameters

NameType
extensiontypeof Extension

Returns

undefined | Extension<PageState, RouteParams, PageState>

Overrides

Controller.getExtension

Defined in

packages/core/src/controller/ControllerDecorator.ts:164


getExtensions

getExtensions(): Extension<{}, {}, {}>[]

Returns the controller's extensions.

Returns

Extension<{}, {}, {}>[]

The extensions added to this controller.

Overrides

Controller.getExtensions

Defined in

packages/core/src/controller/ControllerDecorator.ts:173


getHttpStatus

getHttpStatus(): number

Returns the HTTP status code to send to the client, should the -controller be used at the server-side.

Returns

number

The HTTP status code to send to the client.

Overrides

Controller.getHttpStatus

Defined in

packages/core/src/controller/ControllerDecorator.ts:214


getMetaManager

getMetaManager(): MetaManager

Returns the meta attributes manager configured by the decorated +is destroyed by the garbage collector.

Returns

void | Promise<void>

Overrides

Controller.destroy

Defined in

packages/core/src/controller/ControllerDecorator.ts:80


getExtension

getExtension(extension): undefined | Extension<PageState, RouteParams, PageState>

Returns extension instance defined by it's class constructor +from controller's extension intance map.

Parameters

NameType
extensiontypeof Extension

Returns

undefined | Extension<PageState, RouteParams, PageState>

Overrides

Controller.getExtension

Defined in

packages/core/src/controller/ControllerDecorator.ts:164


getExtensions

getExtensions(): Extension<{}, {}, {}>[]

Returns the controller's extensions.

Returns

Extension<{}, {}, {}>[]

The extensions added to this controller.

Overrides

Controller.getExtensions

Defined in

packages/core/src/controller/ControllerDecorator.ts:173


getHttpStatus

getHttpStatus(): number

Returns the HTTP status code to send to the client, should the +controller be used at the server-side.

Returns

number

The HTTP status code to send to the client.

Overrides

Controller.getHttpStatus

Defined in

packages/core/src/controller/ControllerDecorator.ts:214


getMetaManager

getMetaManager(): MetaManager

Returns the meta attributes manager configured by the decorated controller.

Returns

MetaManager

The Meta attributes manager configured by the -decorated controller.

Defined in

packages/core/src/controller/ControllerDecorator.ts:225


getRouteParams

getRouteParams(): R

Returns the current route parameters.

Returns

R

The current route parameters.

Overrides

Controller.getRouteParams

Defined in

packages/core/src/controller/ControllerDecorator.ts:200


getState

getState(): SS

Returns the controller's current state.

Returns

SS

The current state of this controller.

Overrides

Controller.getState

Defined in

packages/core/src/controller/ControllerDecorator.ts:122


init

init(): void | Promise<void>

Callback for initializing the controller after the route parameters have -been set on this controller.

Returns

void | Promise<void>

Overrides

Controller.init

Defined in

packages/core/src/controller/ControllerDecorator.ts:73


load

load(): S | Promise<S>

Callback the controller uses to request the resources it needs to render +decorated controller.

Defined in

packages/core/src/controller/ControllerDecorator.ts:225


getRouteParams

getRouteParams(): R

Returns the current route parameters.

Returns

R

The current route parameters.

Overrides

Controller.getRouteParams

Defined in

packages/core/src/controller/ControllerDecorator.ts:200


getState

getState(): SS

Returns the controller's current state.

Returns

SS

The current state of this controller.

Overrides

Controller.getState

Defined in

packages/core/src/controller/ControllerDecorator.ts:122


init

init(): void | Promise<void>

Callback for initializing the controller after the route parameters have +been set on this controller.

Returns

void | Promise<void>

Overrides

Controller.init

Defined in

packages/core/src/controller/ControllerDecorator.ts:73


load

load(): S | Promise<S>

Callback the controller uses to request the resources it needs to render its view. This method is invoked after the init method.

The controller should request all resources it needs in this method, and represent each resource request as a promise that will resolve once the @@ -54,14 +54,14 @@ the error page. The error page that will be used depends on the status code of the error.

Returns

S | Promise<S>

A map object of promises resolved when all resources the controller requires are ready. The resolved values will be pushed to the -controller's state.

Overrides

Controller.load

Defined in

packages/core/src/controller/ControllerDecorator.ts:101


setMetaParams

setMetaParams(loadedResources): void

Callback used to configure the meta attribute manager. The method is +controller's state.

Overrides

Controller.load

Defined in

packages/core/src/controller/ControllerDecorator.ts:101


setMetaParams

setMetaParams(loadedResources): void

Callback used to configure the meta attribute manager. The method is called after the the controller's state has been patched with the all -loaded resources and the view has been rendered.

Parameters

NameTypeDescription
loadedResourcesIntersection<Partial<Pick<SS, Matching<SS, Promise<any>>>>, Required<Pick<SS, NonMatching<SS, Promise<any>>>>>A plain object representing a map of resource names to resources loaded by the load method. This is the same object as the one passed to the setState method.

Returns

void

Overrides

Controller.setMetaParams

Defined in

packages/core/src/controller/ControllerDecorator.ts:180


setPageStateManager

setPageStateManager(pageStateManager?): void

Sets the page state manager. The page state manager manages the +loaded resources and the view has been rendered.

Parameters

NameTypeDescription
loadedResourcesIntersection<Partial<Pick<SS, Matching<SS, Promise<any>>>>, Required<Pick<SS, NonMatching<SS, Promise<any>>>>>A plain object representing a map of resource names to resources loaded by the load method. This is the same object as the one passed to the setState method.

Returns

void

Overrides

Controller.setMetaParams

Defined in

packages/core/src/controller/ControllerDecorator.ts:180


setPageStateManager

setPageStateManager(pageStateManager?): void

Sets the page state manager. The page state manager manages the controller's state. The state manager can be set to null if this controller loses the right to modify the state of the current page (e.g. the user has navigated to a different route using a different -controller).

Parameters

NameTypeDescription
pageStateManager?PageStateManager<SS>The current state manager to use.

Returns

void

Overrides

Controller.setPageStateManager

Defined in

packages/core/src/controller/ControllerDecorator.ts:207


setRouteParams

setRouteParams(params?): void

Sets the current route parameters. This method is invoked before the -init method.

Parameters

NameTypeDescription
paramsRThe current route parameters.

Returns

void

Overrides

Controller.setRouteParams

Defined in

packages/core/src/controller/ControllerDecorator.ts:193


setState

setState<K>(statePatch): void

Patches the state of this controller using the provided object by +controller).

Parameters

NameTypeDescription
pageStateManager?PageStateManager<SS>The current state manager to use.

Returns

void

Overrides

Controller.setPageStateManager

Defined in

packages/core/src/controller/ControllerDecorator.ts:207


setRouteParams

setRouteParams(params?): void

Sets the current route parameters. This method is invoked before the +init method.

Parameters

NameTypeDescription
paramsRThe current route parameters.

Returns

void

Overrides

Controller.setRouteParams

Defined in

packages/core/src/controller/ControllerDecorator.ts:193


setState

setState<K>(statePatch): void

Patches the state of this controller using the provided object by copying the provided patch object fields to the controller's state object.

You can use this method to modify the state partially or add new fields to the state object.

Note that the state is not patched recursively but by replacing the @@ -69,7 +69,7 @@ resolved, this method is called with the an object containing the resolved values. The field names of the passed object will match the field names in the object returned from the load -method.

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameTypeDescription
statePatchnull | S | Pick<S, K>Patch of the controller's state to apply.

Returns

void

Overrides

Controller.setState

Defined in

packages/core/src/controller/ControllerDecorator.ts:115


update

update(prevParams?): S | Promise<S>

Callback for updating the controller after a route update. This method +method.

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameTypeDescription
statePatchnull | S | Pick<S, K>Patch of the controller's state to apply.

Returns

void

Overrides

Controller.setState

Defined in

packages/core/src/controller/ControllerDecorator.ts:115


update

update(prevParams?): S | Promise<S>

Callback for updating the controller after a route update. This method is invoked if the current route has the onlyUpdate flag set to true and the current controller and view match those used by the previously active route, or, the onlyUpdate option of the current route is a callback and @@ -80,8 +80,8 @@ deactivate, Controller#deinit) are not call in case this method is used.

Parameters

NameTypeDescription
prevParamsRPrevious route parameters.

Returns

S | Promise<S>

A map object of promises resolved when all resources the controller requires are ready. The resolved values will be pushed to the -controller's state.

Overrides

Controller.update

Defined in

packages/core/src/controller/ControllerDecorator.ts:108

- - +controller's state.

Overrides

Controller.update

Defined in

packages/core/src/controller/ControllerDecorator.ts:108

+ + \ No newline at end of file diff --git a/api/classes/ima_core.CookieStorage/index.html b/api/classes/ima_core.CookieStorage/index.html index 61af8c2bfb..2c5f8f43cb 100644 --- a/api/classes/ima_core.CookieStorage/index.html +++ b/api/classes/ima_core.CookieStorage/index.html @@ -4,47 +4,47 @@ Class: CookieStorage | IMA.js - - + +
-
Skip to main content

Class: CookieStorage

@ima/core.CookieStorage

Storage of cookies, mirroring the cookies to the current request / response +

Class: CookieStorage

@ima/core.CookieStorage

Storage of cookies, mirroring the cookies to the current request / response at the server side and the document.cookie property at the client -side. The storage caches the cookies internally.

Hierarchy

Constructors

constructor

new CookieStorage(window, request, response)

Initializes the cookie storage.

Parameters

NameTypeDescription
windowWindowThe window utility.
requestRequestThe current HTTP request.
responseResponseThe current HTTP response.

Example

cookie.set('cookie', 'value', { expires: 10 }); // cookie expires
// after 10s
cookie.set('cookie'); // delete cookie

Overrides

Storage.constructor

Defined in

packages/core/src/storage/CookieStorage.ts:182

Properties

#memoParseRawCookies

Private #memoParseRawCookies: MemoizedFn<(rawCookies: undefined | string) => string[]>

Memoized function of private parseRawCookies function

Defined in

packages/core/src/storage/CookieStorage.ts:93


_options

Private _options: CookieOptions

The overriding cookie attribute values.

Defined in

packages/core/src/storage/CookieStorage.ts:68


_request

Private _request: Request

The current HTTP request. This field is used at the server side.

Defined in

packages/core/src/storage/CookieStorage.ts:53


_response

Private _response: Response

The current HTTP response. This field is used at the server side.

Defined in

packages/core/src/storage/CookieStorage.ts:58


_storage

Private _storage: Map<string, Cookie>

The internal storage of entries.

Defined in

packages/core/src/storage/CookieStorage.ts:63


_transformFunction

Private _transformFunction: Object

Transform encode and decode functions for cookie value.

Type declaration

NameType
decode(value: string) => string
encode(value: string) => string

Defined in

packages/core/src/storage/CookieStorage.ts:82


_window

Private _window: Window

The window utility used to determine whether the IMA is being run -at the client or at the server.

Defined in

packages/core/src/storage/CookieStorage.ts:48

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/storage/CookieStorage.ts:95

Methods

#extractCookie

Private #extractCookie(cookieString): Cookie & { name?: string }

Extract cookie name, value and options from cookie string.

Parameters

NameTypeDescription
cookieStringstringThe value of the Set-Cookie HTTP header.

Returns

Cookie & { name?: string }

Defined in

packages/core/src/storage/CookieStorage.ts:590


#extractNameAndValue

Private #extractNameAndValue(pair, pairIndex): [null | string, undefined | null | string | number | boolean | Date]

Extract name and value for defined pair and pair index.

Parameters

NameType
pairstring
pairIndexnumber

Returns

[null | string, undefined | null | string | number | boolean | Date]

Defined in

packages/core/src/storage/CookieStorage.ts:620


#firstLetterToLowerCase

Private #firstLetterToLowerCase(word): string

Creates a copy of the provided word (or text) that has its first +side. The storage caches the cookies internally.

Hierarchy

Constructors

constructor

new CookieStorage(window, request, response)

Initializes the cookie storage.

Parameters

NameTypeDescription
windowWindowThe window utility.
requestRequestThe current HTTP request.
responseResponseThe current HTTP response.

Example

cookie.set('cookie', 'value', { expires: 10 }); // cookie expires
// after 10s
cookie.set('cookie'); // delete cookie

Overrides

Storage.constructor

Defined in

packages/core/src/storage/CookieStorage.ts:182

Properties

#memoParseRawCookies

Private #memoParseRawCookies: MemoizedFn<(rawCookies: undefined | string) => string[]>

Memoized function of private parseRawCookies function

Defined in

packages/core/src/storage/CookieStorage.ts:93


_options

Private _options: CookieOptions

The overriding cookie attribute values.

Defined in

packages/core/src/storage/CookieStorage.ts:68


_request

Private _request: Request

The current HTTP request. This field is used at the server side.

Defined in

packages/core/src/storage/CookieStorage.ts:53


_response

Private _response: Response

The current HTTP response. This field is used at the server side.

Defined in

packages/core/src/storage/CookieStorage.ts:58


_storage

Private _storage: Map<string, Cookie>

The internal storage of entries.

Defined in

packages/core/src/storage/CookieStorage.ts:63


_transformFunction

Private _transformFunction: Object

Transform encode and decode functions for cookie value.

Type declaration

NameType
decode(value: string) => string
encode(value: string) => string

Defined in

packages/core/src/storage/CookieStorage.ts:82


_window

Private _window: Window

The window utility used to determine whether the IMA is being run +at the client or at the server.

Defined in

packages/core/src/storage/CookieStorage.ts:48

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/storage/CookieStorage.ts:95

Methods

#extractCookie

Private #extractCookie(cookieString): Cookie & { name?: string }

Extract cookie name, value and options from cookie string.

Parameters

NameTypeDescription
cookieStringstringThe value of the Set-Cookie HTTP header.

Returns

Cookie & { name?: string }

Defined in

packages/core/src/storage/CookieStorage.ts:590


#extractNameAndValue

Private #extractNameAndValue(pair, pairIndex): [null | string, undefined | null | string | number | boolean | Date]

Extract name and value for defined pair and pair index.

Parameters

NameType
pairstring
pairIndexnumber

Returns

[null | string, undefined | null | string | number | boolean | Date]

Defined in

packages/core/src/storage/CookieStorage.ts:620


#firstLetterToLowerCase

Private #firstLetterToLowerCase(word): string

Creates a copy of the provided word (or text) that has its first character converted to lower case.

Parameters

NameTypeDescription
wordstringThe word (or any text) that should have its first character converted to lower case.

Returns

string

A copy of the provided string with its first character -converted to lower case.

Defined in

packages/core/src/storage/CookieStorage.ts:539


#generateCookieString

Private #generateCookieString(name, value, options): string

Generates a string representing the specified cookie, usable either +converted to lower case.

Defined in

packages/core/src/storage/CookieStorage.ts:539


#generateCookieString

Private #generateCookieString(name, value, options): string

Generates a string representing the specified cookie, usable either with the document.cookie property or the Set-Cookie HTTP header.

(Note that the Cookie HTTP header uses a slightly different syntax.)

Parameters

NameTypeDescription
namestringThe cookie name.
valueundefined | string | number | boolean | DateThe cookie value, will be converted to string.
optionsCookieOptionsCookie attributes. Only the attributes listed in the type annotation of this field are supported. For documentation and full list of cookie attributes see http://tools.ietf.org/html/rfc2965#page-5

Returns

string

A string representing the cookie. Setting this string to the document.cookie property will set the cookie to -the browser's cookie storage.

Defined in

packages/core/src/storage/CookieStorage.ts:562


#parseRawCookies

Private #parseRawCookies(rawCookies): string[]

Parameters

NameType
rawCookiesundefined | string

Returns

string[]

Defined in

packages/core/src/storage/CookieStorage.ts:495


clear

clear(): CookieStorage

Clears the storage of all entries.

Returns

CookieStorage

This storage.

Overrides

Storage.clear

Defined in

packages/core/src/storage/CookieStorage.ts:280


delete

delete(name, options?): CookieStorage

Deletes the cookie identified by the specified name.

Parameters

NameTypeDescription
namestringName identifying the cookie.
optionsCookieOptionsThe cookie options. The domain and path specify the cookie's domain and path. The httpOnly and secure flags set the flags of the same name of the cookie.

Returns

CookieStorage

This storage.

Overrides

Storage.delete

Defined in

packages/core/src/storage/CookieStorage.ts:268


get

get(name): undefined | string | number | boolean | Date

Retrieves the value of the entry identified by the specified . The +the browser's cookie storage.

Defined in

packages/core/src/storage/CookieStorage.ts:562


#parseRawCookies

Private #parseRawCookies(rawCookies): string[]

Parameters

NameType
rawCookiesundefined | string

Returns

string[]

Defined in

packages/core/src/storage/CookieStorage.ts:495


clear

clear(): CookieStorage

Clears the storage of all entries.

Returns

CookieStorage

This storage.

Overrides

Storage.clear

Defined in

packages/core/src/storage/CookieStorage.ts:280


delete

delete(name, options?): CookieStorage

Deletes the cookie identified by the specified name.

Parameters

NameTypeDescription
namestringName identifying the cookie.
optionsCookieOptionsThe cookie options. The domain and path specify the cookie's domain and path. The httpOnly and secure flags set the flags of the same name of the cookie.

Returns

CookieStorage

This storage.

Overrides

Storage.delete

Defined in

packages/core/src/storage/CookieStorage.ts:268


get

get(name): undefined | string | number | boolean | Date

Retrieves the value of the entry identified by the specified . The method returns undefined if the entry does not exists.

Entries set to the undefined value can be tested for existence -using the link has method.

Parameters

NameTypeDescription
namestringThe key identifying the storage entry.

Returns

undefined | string | number | boolean | Date

The value of the storage entry.

Overrides

Storage.get

Defined in

packages/core/src/storage/CookieStorage.ts:216


getCookiesStringForCookieHeader

getCookiesStringForCookieHeader(url?): string

Returns all cookies in this storage serialized to a string compatible +using the link has method.

Parameters

NameTypeDescription
namestringThe key identifying the storage entry.

Returns

undefined | string | number | boolean | Date

The value of the storage entry.

Overrides

Storage.get

Defined in

packages/core/src/storage/CookieStorage.ts:216


getCookiesStringForCookieHeader

getCookiesStringForCookieHeader(url?): string

Returns all cookies in this storage serialized to a string compatible with the Cookie HTTP header.

When url is provided, the method validates the cookie security based on the url and the cookie's domain, path, and secure attributes.

Parameters

NameType
url?string

Returns

string

All cookies in this storage serialized to a string -compatible with the Cookie HTTP header.

Defined in

packages/core/src/storage/CookieStorage.ts:318


getExpirationAsDate

getExpirationAsDate(expiration): Date

Converts the provided cookie expiration to a Date instance.

Parameters

NameTypeDescription
expirationstring | number | DateCookie expiration in seconds from now, or as a string compatible with the Date constructor.

Returns

Date

Cookie expiration as a Date instance.

Defined in

packages/core/src/storage/CookieStorage.ts:481


has

has(name): boolean

Returns true if the entry identified by the specified key exists -in this storage.

Parameters

NameTypeDescription
namestringThe key identifying the storage entry.

Returns

boolean

true if the storage entry exists.

Overrides

Storage.has

Defined in

packages/core/src/storage/CookieStorage.ts:207


init

init(options?, transformFunction?): CookieStorage

This method is used to finalize the initialization of the storage after +compatible with the Cookie HTTP header.

Defined in

packages/core/src/storage/CookieStorage.ts:318


getExpirationAsDate

getExpirationAsDate(expiration): Date

Converts the provided cookie expiration to a Date instance.

Parameters

NameTypeDescription
expirationstring | number | DateCookie expiration in seconds from now, or as a string compatible with the Date constructor.

Returns

Date

Cookie expiration as a Date instance.

Defined in

packages/core/src/storage/CookieStorage.ts:481


has

has(name): boolean

Returns true if the entry identified by the specified key exists +in this storage.

Parameters

NameTypeDescription
namestringThe key identifying the storage entry.

Returns

boolean

true if the storage entry exists.

Overrides

Storage.has

Defined in

packages/core/src/storage/CookieStorage.ts:207


init

init(options?, transformFunction?): CookieStorage

This method is used to finalize the initialization of the storage after the dependencies provided through the constructor have been prepared for use.

This method must be invoked only once and it must be the first method -invoked on this instance.

Parameters

NameType
optionsCookieOptions
transformFunctionObject

Returns

CookieStorage

This storage.

Overrides

Storage.init

Defined in

packages/core/src/storage/CookieStorage.ts:193


keys

keys(): Iterable<string>

Returns an iterator for traversing the keys in this storage. The order +invoked on this instance.

Parameters

NameType
optionsCookieOptions
transformFunctionObject

Returns

CookieStorage

This storage.

Overrides

Storage.init

Defined in

packages/core/src/storage/CookieStorage.ts:193


keys

keys(): Iterable<string>

Returns an iterator for traversing the keys in this storage. The order in which the keys are traversed is undefined.

Returns

Iterable<string>

An iterator for traversing the keys in this storage. The iterator also implements the iterable protocol, returning itself as its own iterator, allowing it to be used in -a for..of loop.

Overrides

Storage.keys

Defined in

packages/core/src/storage/CookieStorage.ts:293


parse

parse(): void

Parses cookies from a cookie string and sets the parsed cookies to the +a for..of loop.

Overrides

Storage.keys

Defined in

packages/core/src/storage/CookieStorage.ts:293


parse

parse(): void

Parses cookies from a cookie string and sets the parsed cookies to the internal storage.

The method obtains the cookie string from the request's Cookie HTTP header when used at the server side, and the document.cookie -property at the client side.

Returns

void

Defined in

packages/core/src/storage/CookieStorage.ts:393


parseFromSetCookieHeader

parseFromSetCookieHeader(cookiesString, url?): void

Parses cookies from the provided Set-Cookie HTTP header value.

When url is provided, the method validates the cookie security based on +property at the client side.

Returns

void

Defined in

packages/core/src/storage/CookieStorage.ts:393


parseFromSetCookieHeader

parseFromSetCookieHeader(cookiesString, url?): void

Parses cookies from the provided Set-Cookie HTTP header value.

When url is provided, the method validates the cookie security based on the url and the cookie's domain, path, and secure attributes.

The parsed cookies will be set to the internal storage, and the current HTTP response (via the Set-Cookie HTTP header) if at the server -side, or the browser (via the document.cookie property).

Parameters

NameTypeDescription
cookiesStringstring | string[]The value of the Set-Cookie HTTP header. When there are multiple cookies, the value can be provided as an array of strings.
url?string-

Returns

void

Defined in

packages/core/src/storage/CookieStorage.ts:357


recomputeCookieMaxAgeAndExpires

recomputeCookieMaxAgeAndExpires(options): void

Recomputes cookie's attributes maxAge and expires between each other.

Parameters

NameTypeDescription
optionsCookieOptionsCookie attributes. Only the attributes listed in the type annotation of this field are supported. For documentation and full list of cookie attributes see http://tools.ietf.org/html/rfc2965#page-5

Returns

void

Defined in

packages/core/src/storage/CookieStorage.ts:459


sanitizeCookieValue

sanitizeCookieValue(value): string

Sanitize cookie value by rules in +side, or the browser (via the document.cookie property).

Parameters

NameTypeDescription
cookiesStringstring | string[]The value of the Set-Cookie HTTP header. When there are multiple cookies, the value can be provided as an array of strings.
url?string-

Returns

void

Defined in

packages/core/src/storage/CookieStorage.ts:357


recomputeCookieMaxAgeAndExpires

recomputeCookieMaxAgeAndExpires(options): void

Recomputes cookie's attributes maxAge and expires between each other.

Parameters

NameTypeDescription
optionsCookieOptionsCookie attributes. Only the attributes listed in the type annotation of this field are supported. For documentation and full list of cookie attributes see http://tools.ietf.org/html/rfc2965#page-5

Returns

void

Defined in

packages/core/src/storage/CookieStorage.ts:459


sanitizeCookieValue

sanitizeCookieValue(value): string

Sanitize cookie value by rules in (@see http://tools.ietf.org/html/rfc6265#section-4r.1.1). Erase all -invalid characters from cookie value.

Parameters

NameTypeDescription
valueundefined | string | number | boolean | DateCookie value

Returns

string

Sanitized value

Defined in

packages/core/src/storage/CookieStorage.ts:417


set

set(name, value, options?): CookieStorage

Sets the storage entry identified by the specified key to the provided -value. The method creates the entry if it does not exist already.

Parameters

NameTypeDescription
namestringThe key identifying the storage entry.
valueundefined | string | number | boolean | DateThe storage entry value.
optionsCookieOptionsThe cookie options. The maxAge is the maximum age in seconds of the cookie before it will be deleted, the expires is an alternative to that, specifying the moment at which the cookie will be discarded. The domain and path specify the cookie's domain and path. The httpOnly and secure flags set the flags of the same name of the cookie.

Returns

CookieStorage

This storage.

Overrides

Storage.set

Defined in

packages/core/src/storage/CookieStorage.ts:234


size

size(): number

Returns the number of entries in this storage.

Returns

number

The number of entries in this storage.

Overrides

Storage.size

Defined in

packages/core/src/storage/CookieStorage.ts:302


validateCookieSecurity

Static validateCookieSecurity(cookie, url): boolean

Filters invalid cookies based on the provided url. +invalid characters from cookie value.

Parameters

NameTypeDescription
valueundefined | string | number | boolean | DateCookie value

Returns

string

Sanitized value

Defined in

packages/core/src/storage/CookieStorage.ts:417


set

set(name, value, options?): CookieStorage

Sets the storage entry identified by the specified key to the provided +value. The method creates the entry if it does not exist already.

Parameters

NameTypeDescription
namestringThe key identifying the storage entry.
valueundefined | string | number | boolean | DateThe storage entry value.
optionsCookieOptionsThe cookie options. The maxAge is the maximum age in seconds of the cookie before it will be deleted, the expires is an alternative to that, specifying the moment at which the cookie will be discarded. The domain and path specify the cookie's domain and path. The httpOnly and secure flags set the flags of the same name of the cookie.

Returns

CookieStorage

This storage.

Overrides

Storage.set

Defined in

packages/core/src/storage/CookieStorage.ts:234


size

size(): number

Returns the number of entries in this storage.

Returns

number

The number of entries in this storage.

Overrides

Storage.size

Defined in

packages/core/src/storage/CookieStorage.ts:302


validateCookieSecurity

Static validateCookieSecurity(cookie, url): boolean

Filters invalid cookies based on the provided url. We try to check validity of the domain based on secure, path and -domain definitions.

Parameters

NameType
cookieCookie
urlstring

Returns

boolean

Defined in

packages/core/src/storage/CookieStorage.ts:104

- - +domain definitions.

Parameters

NameType
cookieCookie
urlstring

Returns

boolean

Defined in

packages/core/src/storage/CookieStorage.ts:104

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Dictionary/index.html b/api/classes/ima_core.Dictionary/index.html index 26eba92043..1f8230d4c2 100644 --- a/api/classes/ima_core.Dictionary/index.html +++ b/api/classes/ima_core.Dictionary/index.html @@ -4,22 +4,22 @@ Class: Dictionary | IMA.js - - + +
-
Skip to main content

Class: Dictionary

@ima/core.Dictionary

The Dictionary is a manager and preprocessor of localization phrases for a +

Class: Dictionary

@ima/core.Dictionary

The Dictionary is a manager and preprocessor of localization phrases for a single language. The format of the localization phrases depends on the implementation of this interface.

Hierarchy

Constructors

constructor

new Dictionary()

Methods

get

get(key, parameters?): string

Retrieves the localization phrase identified by the specified key, evaluates the phrase's placeholder expressions using the provided parameters and returns the result.

Parameters

NameTypeDescription
keyneverThe key identifying the localization phrase.
parameters?ObjectParametersThe map of parameter names to the parameter values to use. Defaults to an empty plain object.

Returns

string

The specified localization phrase with its placeholders -evaluated using the provided parameters.

Defined in

packages/core/src/dictionary/Dictionary.ts:60


getLanguage

getLanguage(): string

Returns the ISO 639-1 language code of the language this dictionary was +evaluated using the provided parameters.

Defined in

packages/core/src/dictionary/Dictionary.ts:60


getLanguage

getLanguage(): string

Returns the ISO 639-1 language code of the language this dictionary was initialized with.

Returns

string

The language code representing the language of the -localization phrases in this dictionary.

Defined in

packages/core/src/dictionary/Dictionary.ts:44


has

has(key): boolean

Tests whether the specified localization phrase exists in the -dictionary.

Parameters

NameTypeDescription
keystringThe key identifying the localization phrase. @returntrue if the key exists and denotes a single localization phrase, otherwise false.

Returns

boolean

Defined in

packages/core/src/dictionary/Dictionary.ts:72


init

init(config): void

Initializes this dictionary with the provided language and localization -phrases.

Parameters

NameTypeDescription
configDictionaryConfigThe dictionary configuration.

Returns

void

Defined in

packages/core/src/dictionary/Dictionary.ts:33

- - +localization phrases in this dictionary.

Defined in

packages/core/src/dictionary/Dictionary.ts:44


has

has(key): boolean

Tests whether the specified localization phrase exists in the +dictionary.

Parameters

NameTypeDescription
keystringThe key identifying the localization phrase. @returntrue if the key exists and denotes a single localization phrase, otherwise false.

Returns

boolean

Defined in

packages/core/src/dictionary/Dictionary.ts:72


init

init(config): void

Initializes this dictionary with the provided language and localization +phrases.

Parameters

NameTypeDescription
configDictionaryConfigThe dictionary configuration.

Returns

void

Defined in

packages/core/src/dictionary/Dictionary.ts:33

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Dispatcher/index.html b/api/classes/ima_core.Dispatcher/index.html index de1b2da2b6..db4fab6708 100644 --- a/api/classes/ima_core.Dispatcher/index.html +++ b/api/classes/ima_core.Dispatcher/index.html @@ -4,32 +4,32 @@ Class: Dispatcher | IMA.js - - + +
-
Skip to main content

Class: Dispatcher

@ima/core.Dispatcher

A Dispatcher is a utility that manager event listeners registered for events +

Class: Dispatcher

@ima/core.Dispatcher

A Dispatcher is a utility that manager event listeners registered for events and allows distributing (firing) events to the listeners registered for the given event.

The dispatcher provides a single-node event bus and is usually used to propagate events from controllers to UI components when modifying/passing the state is impractical for any reason.

Hierarchy

Constructors

constructor

new Dispatcher()

Methods

clear

clear(): Dispatcher

Deregisters all event listeners currently registered with this -dispatcher.

Returns

Dispatcher

Defined in

packages/core/src/event/Dispatcher.ts:32


fire

fire<E>(event, data): Dispatcher

Fires a new event of the specified name, carrying the provided data.

The method will synchronously execute all event listeners registered for +dispatcher.

Returns

Dispatcher

Defined in

packages/core/src/event/Dispatcher.ts:32


fire

fire<E>(event, data): Dispatcher

Fires a new event of the specified name, carrying the provided data.

The method will synchronously execute all event listeners registered for the specified event, passing the provided data to them as the first argument.

It will also execute all event listeners registered to listen to all events.

Note that this method does not prevent the event listeners to modify the data in any way. The order in which the event listeners will be executed -is unspecified and should not be relied upon.

Type parameters

NameType
Eextends keyof DispatcherEventsMap

Parameters

NameTypeDescription
eventEThe name of the event to fire.
dataDispatcherEventsMap[E]The data to pass to the event listeners.

Returns

Dispatcher

This dispatcher.

Defined in

packages/core/src/event/Dispatcher.ts:159

fire(event, data): Dispatcher

Parameters

NameType
eventstring
dataany

Returns

Dispatcher

Defined in

packages/core/src/event/Dispatcher.ts:163


listen

listen<E>(event, listener, scope?): Dispatcher

Registers the provided event listener to be executed when the specified +is unspecified and should not be relied upon.

Type parameters

NameType
Eextends keyof DispatcherEventsMap

Parameters

NameTypeDescription
eventEThe name of the event to fire.
dataDispatcherEventsMap[E]The data to pass to the event listeners.

Returns

Dispatcher

This dispatcher.

Defined in

packages/core/src/event/Dispatcher.ts:159

fire(event, data): Dispatcher

Parameters

NameType
eventstring
dataany

Returns

Dispatcher

Defined in

packages/core/src/event/Dispatcher.ts:163


listen

listen<E>(event, listener, scope?): Dispatcher

Registers the provided event listener to be executed when the specified event is fired on this dispatcher.

When the specified event is fired, the event listener will be executed with the data passed with the event as the first argument.

The order in which the event listeners will be executed is unspecified and should not be relied upon. Registering the same listener for the -same event and with the same scope multiple times has no effect.

Type parameters

NameType
Eextends keyof DispatcherEventsMap

Parameters

NameTypeDescription
eventEThe name of the event to listen for.
listenerDispatcherListener<DispatcherEventsMap[E]>The event listener to register.
scope?unknownThe object to which the this keyword will be bound in the event listener.

Returns

Dispatcher

This dispatcher.

Defined in

packages/core/src/event/Dispatcher.ts:53

listen(event, listener, scope?): Dispatcher

Parameters

NameType
eventstring
listenerDispatcherListener<any>
scope?unknown

Returns

Dispatcher

Defined in

packages/core/src/event/Dispatcher.ts:58


listenAll

listenAll<E>(listener, scope?): Dispatcher

Registers the provided event listener to be executed when any event is fired +same event and with the same scope multiple times has no effect.

Type parameters

NameType
Eextends keyof DispatcherEventsMap

Parameters

NameTypeDescription
eventEThe name of the event to listen for.
listenerDispatcherListener<DispatcherEventsMap[E]>The event listener to register.
scope?unknownThe object to which the this keyword will be bound in the event listener.

Returns

Dispatcher

This dispatcher.

Defined in

packages/core/src/event/Dispatcher.ts:53

listen(event, listener, scope?): Dispatcher

Parameters

NameType
eventstring
listenerDispatcherListener<any>
scope?unknown

Returns

Dispatcher

Defined in

packages/core/src/event/Dispatcher.ts:58


listenAll

listenAll<E>(listener, scope?): Dispatcher

Registers the provided event listener to be executed when any event is fired on this dispatcher.

When any event is fired, the event listener will be executed with the data passed with the event as the first argument.

The order in which the event listeners will be executed is unspecified and should not be relied upon. Registering the same listener with the same -scope multiple times has no effect.

Type parameters

NameType
Eextends keyof DispatcherEventsMap

Parameters

NameTypeDescription
listenerDispatcherListenerAll<DispatcherEventsMap[E]>The event listener to register.
scope?unknownThe object to which the this keyword will be bound in the event listener.

Returns

Dispatcher

This dispatcher.

Defined in

packages/core/src/event/Dispatcher.ts:87

listenAll(listener, scope?): Dispatcher

Parameters

NameType
listenerDispatcherListenerAll<any>
scope?unknown

Returns

Dispatcher

Defined in

packages/core/src/event/Dispatcher.ts:91


unlisten

unlisten<E>(event, listener, scope?): Dispatcher

Deregisters the provided event listener, so it will no longer be -executed with the specified scope when the specified event is fired.

Type parameters

NameType
Eextends keyof DispatcherEventsMap

Parameters

NameTypeDescription
eventEThe name of the event for which the listener should be deregistered.
listenerDispatcherListener<DispatcherEventsMap[E]>The event listener to deregister.
scope?unknownThe object to which the this keyword would be bound in the event listener.

Returns

Dispatcher

This dispatcher.

Defined in

packages/core/src/event/Dispatcher.ts:107

unlisten(event, listener, scope?): Dispatcher

Parameters

NameType
eventstring
listenerDispatcherListener<any>
scope?unknown

Returns

Dispatcher

Defined in

packages/core/src/event/Dispatcher.ts:112


unlistenAll

unlistenAll<E>(listener, scope?): Dispatcher

Deregisters the provided event listener, so it will no longer be -executed when any event is fired.

Type parameters

NameType
Eextends keyof DispatcherEventsMap

Parameters

NameTypeDescription
listenerDispatcherListenerAll<DispatcherEventsMap[E]>The event listener function to deregister for all events.
scope?unknownOptional. The object to which the this keyword would be bound in the event listener.

Returns

Dispatcher

This dispatcher instance.

Defined in

packages/core/src/event/Dispatcher.ts:133

unlistenAll(listener, scope?): Dispatcher

Parameters

NameType
listenerDispatcherListenerAll<any>
scope?unknown

Returns

Dispatcher

Defined in

packages/core/src/event/Dispatcher.ts:137

- - +scope multiple times has no effect.

Type parameters

NameType
Eextends keyof DispatcherEventsMap

Parameters

NameTypeDescription
listenerDispatcherListenerAll<DispatcherEventsMap[E]>The event listener to register.
scope?unknownThe object to which the this keyword will be bound in the event listener.

Returns

Dispatcher

This dispatcher.

Defined in

packages/core/src/event/Dispatcher.ts:87

listenAll(listener, scope?): Dispatcher

Parameters

NameType
listenerDispatcherListenerAll<any>
scope?unknown

Returns

Dispatcher

Defined in

packages/core/src/event/Dispatcher.ts:91


unlisten

unlisten<E>(event, listener, scope?): Dispatcher

Deregisters the provided event listener, so it will no longer be +executed with the specified scope when the specified event is fired.

Type parameters

NameType
Eextends keyof DispatcherEventsMap

Parameters

NameTypeDescription
eventEThe name of the event for which the listener should be deregistered.
listenerDispatcherListener<DispatcherEventsMap[E]>The event listener to deregister.
scope?unknownThe object to which the this keyword would be bound in the event listener.

Returns

Dispatcher

This dispatcher.

Defined in

packages/core/src/event/Dispatcher.ts:107

unlisten(event, listener, scope?): Dispatcher

Parameters

NameType
eventstring
listenerDispatcherListener<any>
scope?unknown

Returns

Dispatcher

Defined in

packages/core/src/event/Dispatcher.ts:112


unlistenAll

unlistenAll<E>(listener, scope?): Dispatcher

Deregisters the provided event listener, so it will no longer be +executed when any event is fired.

Type parameters

NameType
Eextends keyof DispatcherEventsMap

Parameters

NameTypeDescription
listenerDispatcherListenerAll<DispatcherEventsMap[E]>The event listener function to deregister for all events.
scope?unknownOptional. The object to which the this keyword would be bound in the event listener.

Returns

Dispatcher

This dispatcher instance.

Defined in

packages/core/src/event/Dispatcher.ts:133

unlistenAll(listener, scope?): Dispatcher

Parameters

NameType
listenerDispatcherListenerAll<any>
scope?unknown

Returns

Dispatcher

Defined in

packages/core/src/event/Dispatcher.ts:137

+ + \ No newline at end of file diff --git a/api/classes/ima_core.DispatcherImpl/index.html b/api/classes/ima_core.DispatcherImpl/index.html index 0b170ab012..3c05341fa9 100644 --- a/api/classes/ima_core.DispatcherImpl/index.html +++ b/api/classes/ima_core.DispatcherImpl/index.html @@ -4,35 +4,35 @@ Class: DispatcherImpl | IMA.js - - + +
-
Skip to main content

Class: DispatcherImpl

@ima/core.DispatcherImpl

Default implementation of the Dispatcher interface.

Hierarchy

Constructors

constructor

new DispatcherImpl()

Initializes the dispatcher.

Overrides

Dispatcher.constructor

Defined in

packages/core/src/event/DispatcherImpl.ts:39

Properties

_eventListeners

Protected _eventListeners: Map<string, Map<DispatcherListener<any>, Set<unknown>>>

Defined in

packages/core/src/event/DispatcherImpl.ts:27


_eventListenersAll

Protected _eventListenersAll: Map<DispatcherListenerAll<any>, Set<unknown>>

Defined in

packages/core/src/event/DispatcherImpl.ts:32


$dependencies

Static $dependencies: Dependencies = []

Defined in

packages/core/src/event/DispatcherImpl.ts:34

Methods

_createNewEvent

_createNewEvent(event): void

Create new Map storage of listeners for the specified event.

Parameters

NameTypeDescription
eventstringThe name of the event.

Returns

void

Defined in

packages/core/src/event/DispatcherImpl.ts:210


_createNewListener

_createNewListener<L>(event, listener): void

Create new Set storage of scopes for the specified event and listener.

Type parameters

NameType
Lextends DispatcherListener<any>

Parameters

NameTypeDescription
eventstringThe name of the event.
listenerLThe event listener.

Returns

void

Defined in

packages/core/src/event/DispatcherImpl.ts:221


_getListenersOf

_getListenersOf(event): Readonly<Map<DispatcherListener<any>, Set<unknown>>>

Retrieves the map of event listeners to scopes they are bound to.

Parameters

NameTypeDescription
eventstringThe name of the event.

Returns

Readonly<Map<DispatcherListener<any>, Set<unknown>>>

A map of event listeners to the +

Class: DispatcherImpl

@ima/core.DispatcherImpl

Default implementation of the Dispatcher interface.

Hierarchy

Constructors

constructor

new DispatcherImpl()

Initializes the dispatcher.

Overrides

Dispatcher.constructor

Defined in

packages/core/src/event/DispatcherImpl.ts:39

Properties

_eventListeners

Protected _eventListeners: Map<string, Map<DispatcherListener<any>, Set<unknown>>>

Defined in

packages/core/src/event/DispatcherImpl.ts:27


_eventListenersAll

Protected _eventListenersAll: Map<DispatcherListenerAll<any>, Set<unknown>>

Defined in

packages/core/src/event/DispatcherImpl.ts:32


$dependencies

Static $dependencies: Dependencies = []

Defined in

packages/core/src/event/DispatcherImpl.ts:34

Methods

_createNewEvent

_createNewEvent(event): void

Create new Map storage of listeners for the specified event.

Parameters

NameTypeDescription
eventstringThe name of the event.

Returns

void

Defined in

packages/core/src/event/DispatcherImpl.ts:210


_createNewListener

_createNewListener<L>(event, listener): void

Create new Set storage of scopes for the specified event and listener.

Type parameters

NameType
Lextends DispatcherListener<any>

Parameters

NameTypeDescription
eventstringThe name of the event.
listenerLThe event listener.

Returns

void

Defined in

packages/core/src/event/DispatcherImpl.ts:221


_getListenersOf

_getListenersOf(event): Readonly<Map<DispatcherListener<any>, Set<unknown>>>

Retrieves the map of event listeners to scopes they are bound to.

Parameters

NameTypeDescription
eventstringThe name of the event.

Returns

Readonly<Map<DispatcherListener<any>, Set<unknown>>>

A map of event listeners to the scopes in which they should be executed. The returned map is an unmodifiable empty map if no listeners are registered for the -event.

Defined in

packages/core/src/event/DispatcherImpl.ts:266


_getScopesOf

_getScopesOf<L>(event, listener): Readonly<Set<unknown>>

Retrieves the scopes in which the specified event listener should be +event.

Defined in

packages/core/src/event/DispatcherImpl.ts:266


_getScopesOf

_getScopesOf<L>(event, listener): Readonly<Set<unknown>>

Retrieves the scopes in which the specified event listener should be executed for the specified event.

Type parameters

NameType
Lextends DispatcherListener<any>

Parameters

NameTypeDescription
eventstringThe name of the event.
listenerLThe event listener.

Returns

Readonly<Set<unknown>>

The scopes in which the specified listeners should be executed in case of the specified event. The returned set is an unmodifiable empty set if no listeners are registered -for the event.

Defined in

packages/core/src/event/DispatcherImpl.ts:244


clear

clear(): DispatcherImpl

Deregisters all event listeners currently registered with this -dispatcher.

Returns

DispatcherImpl

Overrides

Dispatcher.clear

Defined in

packages/core/src/event/DispatcherImpl.ts:54


fire

fire<E>(event, data): DispatcherImpl

Fires a new event of the specified name, carrying the provided data.

The method will synchronously execute all event listeners registered for +for the event.

Defined in

packages/core/src/event/DispatcherImpl.ts:244


clear

clear(): DispatcherImpl

Deregisters all event listeners currently registered with this +dispatcher.

Returns

DispatcherImpl

Overrides

Dispatcher.clear

Defined in

packages/core/src/event/DispatcherImpl.ts:54


fire

fire<E>(event, data): DispatcherImpl

Fires a new event of the specified name, carrying the provided data.

The method will synchronously execute all event listeners registered for the specified event, passing the provided data to them as the first argument.

It will also execute all event listeners registered to listen to all events.

Note that this method does not prevent the event listeners to modify the data in any way. The order in which the event listeners will be executed -is unspecified and should not be relied upon.

Type parameters

NameType
Eextends string

Parameters

NameTypeDescription
eventEThe name of the event to fire.
dataanyThe data to pass to the event listeners.

Returns

DispatcherImpl

This dispatcher.

Overrides

Dispatcher.fire

Defined in

packages/core/src/event/DispatcherImpl.ts:184


listen

listen(event, listener, scope?): DispatcherImpl

Registers the provided event listener to be executed when the specified +is unspecified and should not be relied upon.

Type parameters

NameType
Eextends string

Parameters

NameTypeDescription
eventEThe name of the event to fire.
dataanyThe data to pass to the event listeners.

Returns

DispatcherImpl

This dispatcher.

Overrides

Dispatcher.fire

Defined in

packages/core/src/event/DispatcherImpl.ts:184


listen

listen(event, listener, scope?): DispatcherImpl

Registers the provided event listener to be executed when the specified event is fired on this dispatcher.

When the specified event is fired, the event listener will be executed with the data passed with the event as the first argument.

The order in which the event listeners will be executed is unspecified and should not be relied upon. Registering the same listener for the -same event and with the same scope multiple times has no effect.

Parameters

NameTypeDescription
eventstringThe name of the event to listen for.
listenerDispatcherListener<any>The event listener to register.
scope?unknownThe object to which the this keyword will be bound in the event listener.

Returns

DispatcherImpl

This dispatcher.

Overrides

Dispatcher.listen

Defined in

packages/core/src/event/DispatcherImpl.ts:63


listenAll

listenAll(listener, scope?): DispatcherImpl

Registers the provided event listener to be executed when any event is fired +same event and with the same scope multiple times has no effect.

Parameters

NameTypeDescription
eventstringThe name of the event to listen for.
listenerDispatcherListener<any>The event listener to register.
scope?unknownThe object to which the this keyword will be bound in the event listener.

Returns

DispatcherImpl

This dispatcher.

Overrides

Dispatcher.listen

Defined in

packages/core/src/event/DispatcherImpl.ts:63


listenAll

listenAll(listener, scope?): DispatcherImpl

Registers the provided event listener to be executed when any event is fired on this dispatcher.

When any event is fired, the event listener will be executed with the data passed with the event as the first argument.

The order in which the event listeners will be executed is unspecified and should not be relied upon. Registering the same listener with the same -scope multiple times has no effect.

Parameters

NameTypeDescription
listenerDispatcherListenerAll<any>The event listener to register.
scope?unknownThe object to which the this keyword will be bound in the event listener.

Returns

DispatcherImpl

This dispatcher.

Overrides

Dispatcher.listenAll

Defined in

packages/core/src/event/DispatcherImpl.ts:94


unlisten

unlisten(event, listener, scope?): DispatcherImpl

Deregisters the provided event listener, so it will no longer be -executed with the specified scope when the specified event is fired.

Parameters

NameTypeDescription
eventstringThe name of the event for which the listener should be deregistered.
listenerDispatcherListener<any>The event listener to deregister.
scope?unknownThe object to which the this keyword would be bound in the event listener.

Returns

DispatcherImpl

This dispatcher.

Overrides

Dispatcher.unlisten

Defined in

packages/core/src/event/DispatcherImpl.ts:117


unlistenAll

unlistenAll(listener, scope?): DispatcherImpl

Deregisters the provided event listener, so it will no longer be -executed when any event is fired.

Parameters

NameTypeDescription
listenerDispatcherListenerAll<any>The event listener function to deregister for all events.
scope?unknownOptional. The object to which the this keyword would be bound in the event listener.

Returns

DispatcherImpl

This dispatcher instance.

Overrides

Dispatcher.unlistenAll

Defined in

packages/core/src/event/DispatcherImpl.ts:154

- - +scope multiple times has no effect.

Parameters

NameTypeDescription
listenerDispatcherListenerAll<any>The event listener to register.
scope?unknownThe object to which the this keyword will be bound in the event listener.

Returns

DispatcherImpl

This dispatcher.

Overrides

Dispatcher.listenAll

Defined in

packages/core/src/event/DispatcherImpl.ts:94


unlisten

unlisten(event, listener, scope?): DispatcherImpl

Deregisters the provided event listener, so it will no longer be +executed with the specified scope when the specified event is fired.

Parameters

NameTypeDescription
eventstringThe name of the event for which the listener should be deregistered.
listenerDispatcherListener<any>The event listener to deregister.
scope?unknownThe object to which the this keyword would be bound in the event listener.

Returns

DispatcherImpl

This dispatcher.

Overrides

Dispatcher.unlisten

Defined in

packages/core/src/event/DispatcherImpl.ts:117


unlistenAll

unlistenAll(listener, scope?): DispatcherImpl

Deregisters the provided event listener, so it will no longer be +executed when any event is fired.

Parameters

NameTypeDescription
listenerDispatcherListenerAll<any>The event listener function to deregister for all events.
scope?unknownOptional. The object to which the this keyword would be bound in the event listener.

Returns

DispatcherImpl

This dispatcher instance.

Overrides

Dispatcher.unlistenAll

Defined in

packages/core/src/event/DispatcherImpl.ts:154

+ + \ No newline at end of file diff --git a/api/classes/ima_core.DynamicRoute/index.html b/api/classes/ima_core.DynamicRoute/index.html index f5e09a78d8..669b28937c 100644 --- a/api/classes/ima_core.DynamicRoute/index.html +++ b/api/classes/ima_core.DynamicRoute/index.html @@ -4,38 +4,38 @@ Class: DynamicRoute | IMA.js - - + +
-
Skip to main content

Class: DynamicRoute

@ima/core.DynamicRoute

Utility for representing and manipulating a single dynamic route in the +

Class: DynamicRoute

@ima/core.DynamicRoute

Utility for representing and manipulating a single dynamic route in the router's configuration. Dynamic route is defined by regExp used for route matching and overrides for toPath and extractParameters functions to generate -and put together valid path.

Hierarchy

Constructors

constructor

new DynamicRoute(name, pathExpression, controller, view, options?)

Initializes the route.

Parameters

NameTypeDescription
namestring-
pathExpressionRoutePathExpressionPath expression used in route matching, to generate valid path with provided params and parsing params from current path.
controllerAsyncRouteController-
viewAsyncRouteView-
options?Partial<RouteFactoryOptions>-

Overrides

AbstractRoute.constructor

Defined in

packages/core/src/router/DynamicRoute.ts:58

Properties

_controller

Protected _controller: Object

The full name of Object Container alias identifying the controller -associated with this route.

Type declaration

NameType
cachednull | RouteController | Promise<RouteController>
controllerAsyncRouteController
resolvedboolean

Inherited from

AbstractRoute._controller

Defined in

packages/core/src/router/AbstractRoute.ts:58


_name

Protected _name: string

The unique name of this route, identifying it among the rest of the -routes in the application.

Inherited from

AbstractRoute._name

Defined in

packages/core/src/router/AbstractRoute.ts:48


_options

Protected _options: RouteFactoryOptions

The route additional options.

Inherited from

AbstractRoute._options

Defined in

packages/core/src/router/AbstractRoute.ts:76


_pathExpression

Protected _pathExpression: RoutePathExpression

Path expression used in route matching, to generate valid path with -provided params and parsing params from current path.

Inherited from

AbstractRoute._pathExpression

Defined in

packages/core/src/router/AbstractRoute.ts:53


_view

Protected _view: Object

The full name or Object Container alias identifying the view class -associated with this route.

Type declaration

NameType
cachednull | RouteView | Promise<RouteView>
resolvedboolean
viewAsyncRouteView

Inherited from

AbstractRoute._view

Defined in

packages/core/src/router/AbstractRoute.ts:67

Methods

extractParameters

extractParameters(path, baseUrl): RouteParams

Extracts the parameter values from the provided path. The method +and put together valid path.

Hierarchy

Constructors

constructor

new DynamicRoute(name, pathExpression, controller, view, options?)

Initializes the route.

Parameters

NameTypeDescription
namestring-
pathExpressionRoutePathExpressionPath expression used in route matching, to generate valid path with provided params and parsing params from current path.
controllerAsyncRouteController-
viewAsyncRouteView-
options?Partial<RouteFactoryOptions>-

Overrides

AbstractRoute.constructor

Defined in

packages/core/src/router/DynamicRoute.ts:58

Properties

_controller

Protected _controller: Object

The full name of Object Container alias identifying the controller +associated with this route.

Type declaration

NameType
cachednull | RouteController | Promise<RouteController>
controllerAsyncRouteController
resolvedboolean

Inherited from

AbstractRoute._controller

Defined in

packages/core/src/router/AbstractRoute.ts:58


_name

Protected _name: string

The unique name of this route, identifying it among the rest of the +routes in the application.

Inherited from

AbstractRoute._name

Defined in

packages/core/src/router/AbstractRoute.ts:48


_options

Protected _options: RouteFactoryOptions

The route additional options.

Inherited from

AbstractRoute._options

Defined in

packages/core/src/router/AbstractRoute.ts:76


_pathExpression

Protected _pathExpression: RoutePathExpression

Path expression used in route matching, to generate valid path with +provided params and parsing params from current path.

Inherited from

AbstractRoute._pathExpression

Defined in

packages/core/src/router/AbstractRoute.ts:53


_view

Protected _view: Object

The full name or Object Container alias identifying the view class +associated with this route.

Type declaration

NameType
cachednull | RouteView | Promise<RouteView>
resolvedboolean
viewAsyncRouteView

Inherited from

AbstractRoute._view

Defined in

packages/core/src/router/AbstractRoute.ts:67

Methods

extractParameters

extractParameters(path, baseUrl): RouteParams

Extracts the parameter values from the provided path. The method extracts both the in-path parameters and parses the query, allowing the query parameters to override the in-path parameters.

The method returns an empty hash object if the path does not match this route.

Parameters

NameTypeDescription
pathstringCurrently routed path.
baseUrlstringCurrently routed baseUrl.

Returns

RouteParams

Map of parameter names to parameter -values.

Overrides

AbstractRoute.extractParameters

Defined in

packages/core/src/router/DynamicRoute.ts:112


getController

getController(): RouteController | Promise<RouteController>

Returns Controller class/alias/constant associated with this route. +values.

Overrides

AbstractRoute.extractParameters

Defined in

packages/core/src/router/DynamicRoute.ts:112


getController

getController(): RouteController | Promise<RouteController>

Returns Controller class/alias/constant associated with this route. Internally caches async calls for dynamically imported controllers, meaning that once they're loaded, you get the same promise for -subsequent calls.

Returns

RouteController | Promise<RouteController>

The Controller class/alias/constant.

Inherited from

AbstractRoute.getController

Defined in

packages/core/src/router/AbstractRoute.ts:153


getName

getName(): string

Returns the unique identifying name of this route.

Returns

string

The name of the route, identifying it.

Inherited from

AbstractRoute.getName

Defined in

packages/core/src/router/AbstractRoute.ts:132


getOptions

getOptions(): RouteFactoryOptions

Return route additional options.

Returns

RouteFactoryOptions

Inherited from

AbstractRoute.getOptions

Defined in

packages/core/src/router/AbstractRoute.ts:210


getPathExpression

getPathExpression(): RoutePathExpression

Path expression used in route matching, to generate valid path with -provided params and parsing params from current path.

Returns

RoutePathExpression

The path expression.

Inherited from

AbstractRoute.getPathExpression

Defined in

packages/core/src/router/AbstractRoute.ts:220


getTrimmedPath

getTrimmedPath(path): string

Trims the trailing forward slash from the provided URL path.

Parameters

NameTypeDescription
pathstringThe path to trim.

Returns

string

Trimmed path.

Inherited from

AbstractRoute.getTrimmedPath

Defined in

packages/core/src/router/AbstractRoute.ts:230


getView

getView(): RouteView | Promise<RouteView>

Returns View class/alias/constant associated with this route. +subsequent calls.

Returns

RouteController | Promise<RouteController>

The Controller class/alias/constant.

Inherited from

AbstractRoute.getController

Defined in

packages/core/src/router/AbstractRoute.ts:153


getName

getName(): string

Returns the unique identifying name of this route.

Returns

string

The name of the route, identifying it.

Inherited from

AbstractRoute.getName

Defined in

packages/core/src/router/AbstractRoute.ts:132


getOptions

getOptions(): RouteFactoryOptions

Return route additional options.

Returns

RouteFactoryOptions

Inherited from

AbstractRoute.getOptions

Defined in

packages/core/src/router/AbstractRoute.ts:210


getPathExpression

getPathExpression(): RoutePathExpression

Path expression used in route matching, to generate valid path with +provided params and parsing params from current path.

Returns

RoutePathExpression

The path expression.

Inherited from

AbstractRoute.getPathExpression

Defined in

packages/core/src/router/AbstractRoute.ts:220


getTrimmedPath

getTrimmedPath(path): string

Trims the trailing forward slash from the provided URL path.

Parameters

NameTypeDescription
pathstringThe path to trim.

Returns

string

Trimmed path.

Inherited from

AbstractRoute.getTrimmedPath

Defined in

packages/core/src/router/AbstractRoute.ts:230


getView

getView(): RouteView | Promise<RouteView>

Returns View class/alias/constant associated with this route. Internally caches async calls for dynamically imported views, meaning that once they're loaded, you get the same promise for -subsequent calls.

Returns

RouteView | Promise<RouteView>

The View class/alias/constant.

Inherited from

AbstractRoute.getView

Defined in

packages/core/src/router/AbstractRoute.ts:185


isAsync

isAsync(module): boolean

Checks if given argument is an async handler.

Parameters

NameType
moduleunknown

Returns

boolean

Inherited from

AbstractRoute.isAsync

Defined in

packages/core/src/router/AbstractRoute.ts:139


isControllerResolved

isControllerResolved(): boolean

Returns true for resolved controller. This is always true -for sync route views.

Returns

boolean

Inherited from

AbstractRoute.isControllerResolved

Defined in

packages/core/src/router/AbstractRoute.ts:173


isViewResolved

isViewResolved(): boolean

Returns true for resolved view. This is always true -for sync route views.

Returns

boolean

Inherited from

AbstractRoute.isViewResolved

Defined in

packages/core/src/router/AbstractRoute.ts:203


matches

matches(path): boolean

Tests whether the provided URL path matches this route. The provided -path may contain the query.

Parameters

NameTypeDescription
pathstringThe URL path.

Returns

boolean

true if the provided path matches this route.

Overrides

AbstractRoute.matches

Defined in

packages/core/src/router/DynamicRoute.ts:105


preload

preload(): Promise<[RouteController, RouteView]>

Preloads dynamically imported view and controller.

Returns

Promise<[RouteController, RouteView]>

Promise.All resolving to [view, controller] tuple.

Inherited from

AbstractRoute.preload

Defined in

packages/core/src/router/AbstractRoute.ts:239


toPath

toPath(params?): string

Creates the URL and query parts of a URL by substituting the route's +subsequent calls.

Returns

RouteView | Promise<RouteView>

The View class/alias/constant.

Inherited from

AbstractRoute.getView

Defined in

packages/core/src/router/AbstractRoute.ts:185


isAsync

isAsync(module): boolean

Checks if given argument is an async handler.

Parameters

NameType
moduleunknown

Returns

boolean

Inherited from

AbstractRoute.isAsync

Defined in

packages/core/src/router/AbstractRoute.ts:139


isControllerResolved

isControllerResolved(): boolean

Returns true for resolved controller. This is always true +for sync route views.

Returns

boolean

Inherited from

AbstractRoute.isControllerResolved

Defined in

packages/core/src/router/AbstractRoute.ts:173


isViewResolved

isViewResolved(): boolean

Returns true for resolved view. This is always true +for sync route views.

Returns

boolean

Inherited from

AbstractRoute.isViewResolved

Defined in

packages/core/src/router/AbstractRoute.ts:203


matches

matches(path): boolean

Tests whether the provided URL path matches this route. The provided +path may contain the query.

Parameters

NameTypeDescription
pathstringThe URL path.

Returns

boolean

true if the provided path matches this route.

Overrides

AbstractRoute.matches

Defined in

packages/core/src/router/DynamicRoute.ts:105


preload

preload(): Promise<[RouteController, RouteView]>

Preloads dynamically imported view and controller.

Returns

Promise<[RouteController, RouteView]>

Promise.All resolving to [view, controller] tuple.

Inherited from

AbstractRoute.preload

Defined in

packages/core/src/router/AbstractRoute.ts:239


toPath

toPath(params?): string

Creates the URL and query parts of a URL by substituting the route's parameter placeholders by the provided parameter value.

The extraneous parameters that do not match any of the route's placeholders will be appended as the query string.

Parameters

NameTypeDescription
paramsObjectThe route parameter values.

Returns

string

Path and, if necessary, query parts of the URL representing this route with its parameters replaced by the -provided parameter values.

Overrides

AbstractRoute.toPath

Defined in

packages/core/src/router/DynamicRoute.ts:98

- - +provided parameter values.

Overrides

AbstractRoute.toPath

Defined in

packages/core/src/router/DynamicRoute.ts:98

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Entry/index.html b/api/classes/ima_core.Entry/index.html index 0270dcfaa6..02391770dd 100644 --- a/api/classes/ima_core.Entry/index.html +++ b/api/classes/ima_core.Entry/index.html @@ -4,17 +4,17 @@ Class: Entry<T> | IMA.js - - + +
-
Skip to main content

Class: Entry<T>

@ima/core.Entry

Object container entry, representing either a class, interface, constant or -an alias.

Type parameters

NameType
Tany

Constructors

constructor

new Entry<T>(classConstructor, dependencies?, referrer?, options?)

Initializes the entry.

Type parameters

NameType
Tany

Parameters

NameTypeDescription
classConstructorEntryConstructor<T>The class constructor or constant value getter.
dependencies?any[]The dependencies to pass into the constructor function.
referrer?stringReference to part of application that created this entry.
options?EntryOptionsThe Entry options.

Defined in

packages/core/src/oc/Entry.ts:60

Properties

#dependencies

Private #dependencies: any[]

Dependencies of the class constructor of the class represented by -this entry.

Defined in

packages/core/src/oc/Entry.ts:31


#options

Private #options: EntryOptions

The Entry options.

Defined in

packages/core/src/oc/Entry.ts:36


#overrideCounter

Private #overrideCounter: number = 0

The override counter

Defined in

packages/core/src/oc/Entry.ts:41


#referrer

Private Optional #referrer: string

Reference to part of application that created -this entry.

Defined in

packages/core/src/oc/Entry.ts:47


classConstructor

classConstructor: EntryConstructor<T>

The constructor of the class represented by this entry, or the -getter of the value of the constant represented by this entry.

Defined in

packages/core/src/oc/Entry.ts:20


sharedInstance

sharedInstance: null | EntrySharedInstance<T> = null

The shared instance of the class represented by this entry.

Defined in

packages/core/src/oc/Entry.ts:25

Accessors

dependencies

get dependencies(): any[]

Returns

any[]

Defined in

packages/core/src/oc/Entry.ts:95

set dependencies(dependencies): void

Parameters

NameType
dependenciesany[]

Returns

void

Defined in

packages/core/src/oc/Entry.ts:74


options

get options(): EntryOptions

Returns

EntryOptions

Defined in

packages/core/src/oc/Entry.ts:107


referrer

get referrer(): undefined | string

Returns

undefined | string

Defined in

packages/core/src/oc/Entry.ts:99


writeable

get writeable(): boolean

Returns

boolean

Defined in

packages/core/src/oc/Entry.ts:103

Methods

from

Static from<TInfer>(entry): Entry<TInfer>

Type parameters

Name
TInfer

Parameters

NameType
entryEntry<TInfer>

Returns

Entry<TInfer>

Defined in

packages/core/src/oc/Entry.ts:111

- - +
Skip to main content

Class: Entry<T>

@ima/core.Entry

Object container entry, representing either a class, interface, constant or +an alias.

Type parameters

NameType
Tany

Constructors

constructor

new Entry<T>(classConstructor, dependencies?, referrer?, options?)

Initializes the entry.

Type parameters

NameType
Tany

Parameters

NameTypeDescription
classConstructorEntryConstructor<T>The class constructor or constant value getter.
dependencies?any[]The dependencies to pass into the constructor function.
referrer?stringReference to part of application that created this entry.
options?EntryOptionsThe Entry options.

Defined in

packages/core/src/oc/Entry.ts:60

Properties

#dependencies

Private #dependencies: any[]

Dependencies of the class constructor of the class represented by +this entry.

Defined in

packages/core/src/oc/Entry.ts:31


#options

Private #options: EntryOptions

The Entry options.

Defined in

packages/core/src/oc/Entry.ts:36


#overrideCounter

Private #overrideCounter: number = 0

The override counter

Defined in

packages/core/src/oc/Entry.ts:41


#referrer

Private Optional #referrer: string

Reference to part of application that created +this entry.

Defined in

packages/core/src/oc/Entry.ts:47


classConstructor

classConstructor: EntryConstructor<T>

The constructor of the class represented by this entry, or the +getter of the value of the constant represented by this entry.

Defined in

packages/core/src/oc/Entry.ts:20


sharedInstance

sharedInstance: null | EntrySharedInstance<T> = null

The shared instance of the class represented by this entry.

Defined in

packages/core/src/oc/Entry.ts:25

Accessors

dependencies

get dependencies(): any[]

Returns

any[]

Defined in

packages/core/src/oc/Entry.ts:95

set dependencies(dependencies): void

Parameters

NameType
dependenciesany[]

Returns

void

Defined in

packages/core/src/oc/Entry.ts:74


options

get options(): EntryOptions

Returns

EntryOptions

Defined in

packages/core/src/oc/Entry.ts:107


referrer

get referrer(): undefined | string

Returns

undefined | string

Defined in

packages/core/src/oc/Entry.ts:99


writeable

get writeable(): boolean

Returns

boolean

Defined in

packages/core/src/oc/Entry.ts:103

Methods

from

Static from<TInfer>(entry): Entry<TInfer>

Type parameters

Name
TInfer

Parameters

NameType
entryEntry<TInfer>

Returns

Entry<TInfer>

Defined in

packages/core/src/oc/Entry.ts:111

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Error/index.html b/api/classes/ima_core.Error/index.html index 7fb5e6afa5..edf129fe3e 100644 --- a/api/classes/ima_core.Error/index.html +++ b/api/classes/ima_core.Error/index.html @@ -4,23 +4,23 @@ Class: Error | IMA.js - - + +
-
Skip to main content

Class: Error

@ima/core.Error

The IMA application error extends the native Error with additional details -that lead to the error and the HTTP status code to send to the client.

Hierarchy

Constructors

constructor

new Error(message, params?)

Parameters

NameType
messagestring
params?Object
params.cause?string | Error

Overrides

Error.constructor

Defined in

packages/core/src/error/Error.ts:8

Properties

cause

Optional cause: unknown

Inherited from

Error.cause

Defined in

node_modules/typescript/lib/lib.es2022.error.d.ts:24


message

message: string

Inherited from

Error.message

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1068


name

name: string

Inherited from

Error.name

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1067


stack

Optional stack: string

Inherited from

Error.stack

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1069


prepareStackTrace

Static Optional prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any

Type declaration

▸ (err, stackTraces): any

Optional override for formatting stack traces

Parameters
NameType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

Error.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:11


stackTraceLimit

Static stackTraceLimit: number

Inherited from

Error.stackTraceLimit

Defined in

node_modules/@types/node/globals.d.ts:13

Methods

getHttpStatus

getHttpStatus(): number

Returns the HTTP status to send to the client.

If the error has occurred at the client-side, the status code is used to +

Class: Error

@ima/core.Error

The IMA application error extends the native Error with additional details +that lead to the error and the HTTP status code to send to the client.

Hierarchy

Constructors

constructor

new Error(message, params?)

Parameters

NameType
messagestring
params?Object
params.cause?string | Error

Overrides

Error.constructor

Defined in

packages/core/src/error/Error.ts:8

Properties

cause

Optional cause: unknown

Inherited from

Error.cause

Defined in

node_modules/typescript/lib/lib.es2022.error.d.ts:24


message

message: string

Inherited from

Error.message

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1068


name

name: string

Inherited from

Error.name

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1067


stack

Optional stack: string

Inherited from

Error.stack

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1069


prepareStackTrace

Static Optional prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any

Type declaration

▸ (err, stackTraces): any

Optional override for formatting stack traces

Parameters
NameType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

Error.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:11


stackTraceLimit

Static stackTraceLimit: number

Inherited from

Error.stackTraceLimit

Defined in

node_modules/@types/node/globals.d.ts:13

Methods

getHttpStatus

getHttpStatus(): number

Returns the HTTP status to send to the client.

If the error has occurred at the client-side, the status code is used to determine the error page to show to the user.

This method is a shorthand for the following code snippet: -this.getParams().status || 500.

Returns

number

The HTTP status to send to the client.

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Defined in

packages/core/src/error/Error.ts:24


getParams

getParams(): UnknownParameters

Returns the error parameters providing additional details about the +this.getParams().status || 500.

Returns

number

The HTTP status to send to the client.

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Defined in

packages/core/src/error/Error.ts:24


getParams

getParams(): UnknownParameters

Returns the error parameters providing additional details about the error. The structure of the returned object is always situation-dependent, but the returned object usually contains the status: number field which represents the HTTP status to send to the client.

Returns

UnknownParameters

The route parameters of the route at which -the error has occurred.

See

Error#getHttpStatus

Defined in

packages/core/src/error/Error.ts:39


isClientError

isClientError(): boolean

Tests, whether the specified error was caused by the +the error has occurred.

See

Error#getHttpStatus

Defined in

packages/core/src/error/Error.ts:39


isClientError

isClientError(): boolean

Tests, whether the specified error was caused by the client's action (for example wrong URL or request encoding).

Returns

boolean

true if the error was caused the action of the -client.

Defined in

packages/core/src/error/Error.ts:50


isRedirection

isRedirection(): boolean

Tests, whether the specified error should lead to a redirect.

Returns

boolean

true if the error should cause a redirect.

Defined in

packages/core/src/error/Error.ts:59


captureStackTrace

Static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

NameType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

Error.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:4

- - +client.

Defined in

packages/core/src/error/Error.ts:50


isRedirection

isRedirection(): boolean

Tests, whether the specified error should lead to a redirect.

Returns

boolean

true if the error should cause a redirect.

Defined in

packages/core/src/error/Error.ts:59


captureStackTrace

Static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

NameType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

Error.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:4

+ + \ No newline at end of file diff --git a/api/classes/ima_core.EventBus/index.html b/api/classes/ima_core.EventBus/index.html index 2a05437c6e..b90d737edb 100644 --- a/api/classes/ima_core.EventBus/index.html +++ b/api/classes/ima_core.EventBus/index.html @@ -4,12 +4,12 @@ Class: EventBus | IMA.js - - + +
-
Skip to main content

Class: EventBus

@ima/core.EventBus

Utility for sending and intercepting wrapped custom DOM events on the DOM or +

Class: EventBus

@ima/core.EventBus

Utility for sending and intercepting wrapped custom DOM events on the DOM or propagating them to the current controller.

As with native events, the event fired by this event bus always propagate up the DOM tree until they reach the window.

Note that the events fired by this event bus are wrapped in custom DOM events which always bear an obscure name set by the implementation of this @@ -22,22 +22,22 @@ { bubbles: true, cancelable: true }, which is different from the default values used in the native custom events ({ bubbles: false, cancelable: false }).

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the event will be dispatched (e.g. element/document/window).
eventNamestringThe name of the event to fire.
data?anyThe data to pass to the event listeners.
options?EventBusOptionsThe override of the default options passed to the constructor of the custom event fired by this event bus. The default options passed to the custom event constructor are { bubbles: true, cancelable: true }.

Returns

EventBus

This custom event bus.

Throws

Thrown if the provided event target cannot be used to -fire the event.

See

https://developer.mozilla.org/en-US/docs/Web/API/Event/Event

Defined in

packages/core/src/event/EventBus.ts:56


listen

listen(eventTarget, eventName, listener): EventBus

Registers the provided event listener to be executed when the specific +fire the event.

See

https://developer.mozilla.org/en-US/docs/Web/API/Event/Event

Defined in

packages/core/src/event/EventBus.ts:56


listen

listen(eventTarget, eventName, listener): EventBus

Registers the provided event listener to be executed when the specific custom event is fired by the same implementation of the event bus and passes through the specified event target.

When the specified event is fired, the event listener will be executed with the event passed as the first argument.

The order in which the event listeners will be executed is unspecified -and should not be relied upon.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the listener should listen for the specified event.
eventNamestringThe name of the event to listen for.
listenerEventBusListenerThe event listener to register.

Returns

EventBus

This event bus.

Defined in

packages/core/src/event/EventBus.ts:104


listenAll

listenAll(eventTarget, listener): EventBus

Registers the provided event listener to be executed when any custom +and should not be relied upon.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the listener should listen for the specified event.
eventNamestringThe name of the event to listen for.
listenerEventBusListenerThe event listener to register.

Returns

EventBus

This event bus.

Defined in

packages/core/src/event/EventBus.ts:104


listenAll

listenAll(eventTarget, listener): EventBus

Registers the provided event listener to be executed when any custom event is fired using the same implementation of the event bus and passes through the specified event target.

When the specified event is fired, the event listener will be executed with the event passed as the first argument.

The order in which the event listeners will be executed is unspecified -and should not be relied upon.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the listener should listen for all event bus events.
listenerEventBusListenerThe event listener to register.

Returns

EventBus

This event bus.

Defined in

packages/core/src/event/EventBus.ts:82


unlisten

unlisten(eventTarget, eventName, listener): EventBus

Removes the provided event listener from the set of event listeners +and should not be relied upon.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the listener should listen for all event bus events.
listenerEventBusListenerThe event listener to register.

Returns

EventBus

This event bus.

Defined in

packages/core/src/event/EventBus.ts:82


unlisten

unlisten(eventTarget, eventName, listener): EventBus

Removes the provided event listener from the set of event listeners executed when the specified custom event fired by the same implementation passes through the specified event target.

The method has no effect if the listener is not registered for the -specified event at the specified event target.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the listener is listening for the event.
eventNamestringThe name of the event listened for.
listenerEventBusListenerThe event listener to deregister.

Returns

EventBus

This event bus.

Defined in

packages/core/src/event/EventBus.ts:145


unlistenAll

unlistenAll(eventTarget, listener): EventBus

Removes the provided event listener from the set of event listeners +specified event at the specified event target.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the listener is listening for the event.
eventNamestringThe name of the event listened for.
listenerEventBusListenerThe event listener to deregister.

Returns

EventBus

This event bus.

Defined in

packages/core/src/event/EventBus.ts:145


unlistenAll

unlistenAll(eventTarget, listener): EventBus

Removes the provided event listener from the set of event listeners executed when the any custom event fired by the same implementation passes through the specified event target.

The method has no effect if the listener is not registered at the -specified event target.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the event listener listens for events.
listenerEventBusListenerThe event listener to deregister.

Returns

EventBus

This event bus.

Defined in

packages/core/src/event/EventBus.ts:126

- - +specified event target.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the event listener listens for events.
listenerEventBusListenerThe event listener to deregister.

Returns

EventBus

This event bus.

Defined in

packages/core/src/event/EventBus.ts:126

+ + \ No newline at end of file diff --git a/api/classes/ima_core.EventBusImpl/index.html b/api/classes/ima_core.EventBusImpl/index.html index b45b100697..44565af00e 100644 --- a/api/classes/ima_core.EventBusImpl/index.html +++ b/api/classes/ima_core.EventBusImpl/index.html @@ -4,38 +4,38 @@ Class: EventBusImpl | IMA.js - - + +
-
Skip to main content

Class: EventBusImpl

@ima/core.EventBusImpl

Helper for custom events.

It offers public methods for firing custom events and two methods for -catching events (e.g. inside view components).

Hierarchy

Constructors

constructor

new EventBusImpl(window)

Initializes the custom event helper.

Parameters

NameTypeDescription
windowWindowThe IMA window helper.

Overrides

EventBus.constructor

Defined in

packages/core/src/event/EventBusImpl.ts:54

Properties

_allListenersTargets

Private _allListenersTargets: WeakMap<EventTarget, AllListenersWeakMap>

Map of event targets to listeners executed on all IMA.js event bus -events.

Defined in

packages/core/src/event/EventBusImpl.ts:42


_listeners

Private _listeners: WeakMap<EventBusListener, ListenersWeakMap>

Map of listeners provided to the public API of this event bus to a +

Class: EventBusImpl

@ima/core.EventBusImpl

Helper for custom events.

It offers public methods for firing custom events and two methods for +catching events (e.g. inside view components).

Hierarchy

Constructors

constructor

new EventBusImpl(window)

Initializes the custom event helper.

Parameters

NameTypeDescription
windowWindowThe IMA window helper.

Overrides

EventBus.constructor

Defined in

packages/core/src/event/EventBusImpl.ts:54

Properties

_allListenersTargets

Private _allListenersTargets: WeakMap<EventTarget, AllListenersWeakMap>

Map of event targets to listeners executed on all IMA.js event bus +events.

Defined in

packages/core/src/event/EventBusImpl.ts:42


_listeners

Private _listeners: WeakMap<EventBusListener, ListenersWeakMap>

Map of listeners provided to the public API of this event bus to a map of event targets to a map of event names to actual listeners -bound to the native API.

The "listen all" event listeners are not registered in this map.

Defined in

packages/core/src/event/EventBusImpl.ts:36


_window

Private _window: Window

Defined in

packages/core/src/event/EventBusImpl.ts:28

Accessors

$dependencies

Static get $dependencies(): typeof Window[]

Returns

typeof Window[]

Defined in

packages/core/src/event/EventBusImpl.ts:45

Methods

fire

fire(eventTarget, eventName, data, options?): EventBusImpl

Fires a new custom event of the specified name, carrying the provided +bound to the native API.

The "listen all" event listeners are not registered in this map.

Defined in

packages/core/src/event/EventBusImpl.ts:36


_window

Private _window: Window

Defined in

packages/core/src/event/EventBusImpl.ts:28

Accessors

$dependencies

Static get $dependencies(): typeof Window[]

Returns

typeof Window[]

Defined in

packages/core/src/event/EventBusImpl.ts:45

Methods

fire

fire(eventTarget, eventName, data, options?): EventBusImpl

Fires a new custom event of the specified name, carrying the provided data.

Note that this method does not prevent the event listeners to modify the data in any way. The order in which the event listeners will be executed is unspecified and should not be relied upon.

Note that the default options are { bubbles: true, cancelable: true }, which is different from the default values used in the native custom events ({ bubbles: false, cancelable: false }).

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the event will be dispatched (e.g. element/document/window).
eventNamestringThe name of the event to fire.
dataanyThe data to pass to the event listeners.
optionsEventBusOptionsThe override of the default options passed to the constructor of the custom event fired by this event bus. The default options passed to the custom event constructor are { bubbles: true, cancelable: true }.

Returns

EventBusImpl

This custom event bus.

Throws

Thrown if the provided event target cannot be used to -fire the event.

See

https://developer.mozilla.org/en-US/docs/Web/API/Event/Event

Overrides

EventBus.fire

Defined in

packages/core/src/event/EventBusImpl.ts:66


listen

listen(eventTarget, eventName, listener): EventBusImpl

Registers the provided event listener to be executed when the specific +fire the event.

See

https://developer.mozilla.org/en-US/docs/Web/API/Event/Event

Overrides

EventBus.fire

Defined in

packages/core/src/event/EventBusImpl.ts:66


listen

listen(eventTarget, eventName, listener): EventBusImpl

Registers the provided event listener to be executed when the specific custom event is fired by the same implementation of the event bus and passes through the specified event target.

When the specified event is fired, the event listener will be executed with the event passed as the first argument.

The order in which the event listeners will be executed is unspecified -and should not be relied upon.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the listener should listen for the specified event.
eventNamestringThe name of the event to listen for.
listenerEventBusListenerThe event listener to register.

Returns

EventBusImpl

This event bus.

Overrides

EventBus.listen

Defined in

packages/core/src/event/EventBusImpl.ts:127


listenAll

listenAll(eventTarget, listener): EventBusImpl

Registers the provided event listener to be executed when any custom +and should not be relied upon.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the listener should listen for the specified event.
eventNamestringThe name of the event to listen for.
listenerEventBusListenerThe event listener to register.

Returns

EventBusImpl

This event bus.

Overrides

EventBus.listen

Defined in

packages/core/src/event/EventBusImpl.ts:127


listenAll

listenAll(eventTarget, listener): EventBusImpl

Registers the provided event listener to be executed when any custom event is fired using the same implementation of the event bus and passes through the specified event target.

When the specified event is fired, the event listener will be executed with the event passed as the first argument.

The order in which the event listeners will be executed is unspecified -and should not be relied upon.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the listener should listen for all event bus events.
listenerEventBusListenerThe event listener to register.

Returns

EventBusImpl

This event bus.

Overrides

EventBus.listenAll

Defined in

packages/core/src/event/EventBusImpl.ts:99


unlisten

unlisten(eventTarget, eventName, listener): EventBusImpl

Removes the provided event listener from the set of event listeners +and should not be relied upon.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the listener should listen for all event bus events.
listenerEventBusListenerThe event listener to register.

Returns

EventBusImpl

This event bus.

Overrides

EventBus.listenAll

Defined in

packages/core/src/event/EventBusImpl.ts:99


unlisten

unlisten(eventTarget, eventName, listener): EventBusImpl

Removes the provided event listener from the set of event listeners executed when the specified custom event fired by the same implementation passes through the specified event target.

The method has no effect if the listener is not registered for the -specified event at the specified event target.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the listener is listening for the event.
eventNamestringThe name of the event listened for.
listenerEventBusListenerThe event listener to deregister.

Returns

EventBusImpl

This event bus.

Overrides

EventBus.unlisten

Defined in

packages/core/src/event/EventBusImpl.ts:222


unlistenAll

unlistenAll(eventTarget, listener): EventBusImpl

Removes the provided event listener from the set of event listeners +specified event at the specified event target.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the listener is listening for the event.
eventNamestringThe name of the event listened for.
listenerEventBusListenerThe event listener to deregister.

Returns

EventBusImpl

This event bus.

Overrides

EventBus.unlisten

Defined in

packages/core/src/event/EventBusImpl.ts:222


unlistenAll

unlistenAll(eventTarget, listener): EventBusImpl

Removes the provided event listener from the set of event listeners executed when the any custom event fired by the same implementation passes through the specified event target.

The method has no effect if the listener is not registered at the -specified event target.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the event listener listens for events.
listenerEventBusListenerThe event listener to deregister.

Returns

EventBusImpl

This event bus.

Overrides

EventBus.unlistenAll

Defined in

packages/core/src/event/EventBusImpl.ts:181

- - +specified event target.

Parameters

NameTypeDescription
eventTargetEventTargetThe event target at which the event listener listens for events.
listenerEventBusListenerThe event listener to deregister.

Returns

EventBusImpl

This event bus.

Overrides

EventBus.unlistenAll

Defined in

packages/core/src/event/EventBusImpl.ts:181

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Execution/index.html b/api/classes/ima_core.Execution/index.html index 8f2e5c2c74..d63666731b 100644 --- a/api/classes/ima_core.Execution/index.html +++ b/api/classes/ima_core.Execution/index.html @@ -4,12 +4,12 @@ Class: Execution | IMA.js - - + +
-
Skip to main content

Class: Execution

@ima/core.Execution

Execution is an abstract class that defines a standard for executing jobs. +

Class: Execution

@ima/core.Execution

Execution is an abstract class that defines a standard for executing jobs. The execution can be either done in serial or in parallel way.

When executing jobs in parallel an option should define how to deal with a result of each individual job execution. One option would be to return the result of a job that completes first. Second option is to return result of @@ -18,10 +18,10 @@ supplied to each job individually (thus meaning one job's mutation won't affect another job) or they could be supplied to the first job and then piped through other jobs.

Hierarchy

Constructors

constructor

new Execution()

Methods

append

append(jobs): void

Adds a new job to be executed. The job is appended at the end of the -list of current jobs therefore is executed last.

Parameters

NameTypeDescription
jobsExecutionJob[]The jobs to be executed.

Returns

void

Defined in

packages/core/src/execution/Execution.ts:25


execute

execute(...args): Promise<unknown>

Start executing collected jobs. In the end a Promise is returned +list of current jobs therefore is executed last.

Parameters

NameTypeDescription
jobsExecutionJob[]The jobs to be executed.

Returns

void

Defined in

packages/core/src/execution/Execution.ts:25


execute

execute(...args): Promise<unknown>

Start executing collected jobs. In the end a Promise is returned with a resulting value. On the returned Promise a catch -method can be called to prevent any unwanted interruption.

Parameters

NameTypeDescription
...argsunknown[]Arguments to be passed when executing jobs

Returns

Promise<unknown>

Defined in

packages/core/src/execution/Execution.ts:36

- - +method can be called to prevent any unwanted interruption.

Parameters

NameTypeDescription
...argsunknown[]Arguments to be passed when executing jobs

Returns

Promise<unknown>

Defined in

packages/core/src/execution/Execution.ts:36

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Extension/index.html b/api/classes/ima_core.Extension/index.html index 8139bf9bd7..4fd9934bd4 100644 --- a/api/classes/ima_core.Extension/index.html +++ b/api/classes/ima_core.Extension/index.html @@ -4,12 +4,12 @@ Class: Extension<S, R, SS> | IMA.js - - + +
-
Skip to main content

Class: Extension<S, R, SS>

@ima/core.Extension

Extensions provide means of extending the page controllers with additional +

Class: Extension<S, R, SS>

@ima/core.Extension

Extensions provide means of extending the page controllers with additional managed state and logic.

An extension has access to the current route parameters, specify the resources to load when the page is loading or being updated, may intercept event bus events and modify the state of the page just like an ordinary @@ -17,28 +17,28 @@ which the extension explicitly specifies using its getAllowedStateKeys method.

All extensions to be used on a page must be added to the current controller before the controller is initialized. After that, the extensions will go -through the same lifecycle as the controller.

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends S = S

Hierarchy

Indexable

[key: PropertyKey]: any | EventBusEventHandler

Constructors

constructor

new Extension<S, R, SS>()

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends PageState = S

Properties

$dependencies

Static $dependencies: Dependencies

Defined in

packages/core/src/extension/Extension.ts:27


$name

Static Optional $name: string

Defined in

packages/core/src/extension/Extension.ts:26

Methods

activate

activate(): void | Promise<void>

Callback for activating the extension in the UI. This is the last +through the same lifecycle as the controller.

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends S = S

Hierarchy

Indexable

[key: PropertyKey]: any | EventBusEventHandler

Constructors

constructor

new Extension<S, R, SS>()

Type parameters

NameType
Sextends PageState = {}
Rextends RouteParams = {}
SSextends PageState = S

Properties

$dependencies

Static $dependencies: Dependencies

Defined in

packages/core/src/extension/Extension.ts:27


$name

Static Optional $name: string

Defined in

packages/core/src/extension/Extension.ts:26

Methods

activate

activate(): void | Promise<void>

Callback for activating the extension in the UI. This is the last method invoked during controller (and extensions) initialization, called after all the promises returned from the load method have been resolved and the controller has configured the meta manager.

The extension may register any React and DOM event listeners in this method. The extension may start receiving event bus event after this -method completes.

Returns

void | Promise<void>

Defined in

packages/core/src/extension/Extension.ts:66


beginStateTransaction

beginStateTransaction(): void

Starts queueing state patches off the controller state. While the transaction +method completes.

Returns

void | Promise<void>

Defined in

packages/core/src/extension/Extension.ts:66


beginStateTransaction

beginStateTransaction(): void

Starts queueing state patches off the controller state. While the transaction is active every setState call has no effect on the current state.

Note that call to getState after the transaction has begun will -return state as it was before the transaction.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:173


cancelStateTransaction

cancelStateTransaction(): void

Cancels ongoing state transaction. Uncommitted state changes are lost.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:188


clearPartialState

clearPartialState(): void

Clears the current partial state of the extension and sets it value to empty object.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:215


commitStateTransaction

commitStateTransaction(): void

Applies queued state patches to the controller state. All patches are squashed -and applied with one setState call.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:181


deactivate

deactivate(): void | Promise<void>

Callback for deactivating the extension in the UI. This is the first +return state as it was before the transaction.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:173


cancelStateTransaction

cancelStateTransaction(): void

Cancels ongoing state transaction. Uncommitted state changes are lost.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:188


clearPartialState

clearPartialState(): void

Clears the current partial state of the extension and sets it value to empty object.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:215


commitStateTransaction

commitStateTransaction(): void

Applies queued state patches to the controller state. All patches are squashed +and applied with one setState call.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:181


deactivate

deactivate(): void | Promise<void>

Callback for deactivating the extension in the UI. This is the first method invoked during extension deinitialization. This usually happens when the user navigates to a different URL.

This method is the lifecycle counterpart of the activate method.

The extension should deregister listeners registered and release all -resources obtained in the activate method.

Returns

void | Promise<void>

Defined in

packages/core/src/extension/Extension.ts:81


destroy

destroy(): void | Promise<void>

Finalization callback, called when the controller is being discarded by +resources obtained in the activate method.

Returns

void | Promise<void>

Defined in

packages/core/src/extension/Extension.ts:81


destroy

destroy(): void | Promise<void>

Finalization callback, called when the controller is being discarded by the application. This usually happens when the user navigates to a different URL.

This method is the lifecycle counterpart of the init method.

The extension should release all resources obtained in the init method. The extension must release any resources that might not be released automatically when the extensions's instance -is destroyed by the garbage collector.

Returns

void | Promise<void>

Defined in

packages/core/src/extension/Extension.ts:52


getAllowedStateKeys

getAllowedStateKeys(): keyof S[]

Returns the names of the state fields that may be manipulated by this +is destroyed by the garbage collector.

Returns

void | Promise<void>

Defined in

packages/core/src/extension/Extension.ts:52


getAllowedStateKeys

getAllowedStateKeys(): keyof S[]

Returns the names of the state fields that may be manipulated by this extension. Manipulations of other fields of the state will be ignored.

Returns

keyof S[]

The names of the state fields that may be manipulated -by this extension.

Defined in

packages/core/src/extension/Extension.ts:269


getPartialState

getPartialState(): Partial<S>

Returns the current partial state of the extension.

Returns

Partial<S>

The current partial state of the extension.

Defined in

packages/core/src/extension/Extension.ts:208


getRouteParams

getRouteParams(): R

Returns the current route parameters.

Returns

R

The current route parameters.

Defined in

packages/core/src/extension/Extension.ts:258


getState

getState(): SS

Returns the current state of the controller using this extension.

Returns

SS

The current state of the controller.

Defined in

packages/core/src/extension/Extension.ts:162


init

init(): void | Promise<void>

Callback for initializing the controller extension after the route -parameters have been set on this extension.

Returns

void | Promise<void>

Defined in

packages/core/src/extension/Extension.ts:35


load

load(): S | Promise<S>

Callback the extension uses to request the resources it needs to render +by this extension.

Defined in

packages/core/src/extension/Extension.ts:269


getPartialState

getPartialState(): Partial<S>

Returns the current partial state of the extension.

Returns

Partial<S>

The current partial state of the extension.

Defined in

packages/core/src/extension/Extension.ts:208


getRouteParams

getRouteParams(): R

Returns the current route parameters.

Returns

R

The current route parameters.

Defined in

packages/core/src/extension/Extension.ts:258


getState

getState(): SS

Returns the current state of the controller using this extension.

Returns

SS

The current state of the controller.

Defined in

packages/core/src/extension/Extension.ts:162


init

init(): void | Promise<void>

Callback for initializing the controller extension after the route +parameters have been set on this extension.

Returns

void | Promise<void>

Defined in

packages/core/src/extension/Extension.ts:35


load

load(): S | Promise<S>

Callback the extension uses to request the resources it needs to render its related parts of the view. This method is invoked after the init method.

The extension should request all resources it needs in this method, and represent each resource request as a promise that will resolve once the @@ -50,14 +50,14 @@ the error page. The error page that will be used depends on the status code of the error.

Returns

S | Promise<S>

A map object of promises resolved when all resources the controller requires are ready. The resolved values will be pushed to the -controller's state.

Defined in

packages/core/src/extension/Extension.ts:110


setPageStateManager

setPageStateManager(pageStateManager?): void

Sets the state manager used to manage the controller's state..

Parameters

NameTypeDescription
pageStateManager?PageStateManager<SS>The current state manager to use.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:225


setPartialState

setPartialState(partialStatePatch): void

Patches the partial state of the extension. The extension is able +controller's state.

Defined in

packages/core/src/extension/Extension.ts:110


setPageStateManager

setPageStateManager(pageStateManager?): void

Sets the state manager used to manage the controller's state..

Parameters

NameTypeDescription
pageStateManager?PageStateManager<SS>The current state manager to use.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:225


setPartialState

setPartialState(partialStatePatch): void

Patches the partial state of the extension. The extension is able during its load and update phase receive state from active controller -using this extension and from previously loaded/updated extensions.

Parameters

NameTypeDescription
partialStatePatchSPatch of the controller's state to apply.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:199


setRouteParams

setRouteParams(params): void

Sets the current route parameters. This method is invoked before the -init method.

Parameters

NameTypeDescription
paramsRThe current route parameters.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:249


setState

setState<K>(statePatch): void

Patches the state of the controller using this extension by using the +using this extension and from previously loaded/updated extensions.

Parameters

NameTypeDescription
partialStatePatchSPatch of the controller's state to apply.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:199


setRouteParams

setRouteParams(params): void

Sets the current route parameters. This method is invoked before the +init method.

Parameters

NameTypeDescription
paramsRThe current route parameters.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:249


setState

setState<K>(statePatch): void

Patches the state of the controller using this extension by using the provided object by copying the provided patch object fields to the controller's state object.

Note that the state is not patched recursively but by replacing the values of the top-level fields of the state object.

Note that the extension may modify only the fields of the state that it -has specified by its getAllowedStateKeys method.

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameTypeDescription
statePatchnull | S | Pick<S, K>Patch of the controller's state to apply.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:153


switchToPartialState

switchToPartialState(): void

Disables using PageStateManager for getting state.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:239


switchToStateManager

switchToStateManager(): void

Enables using PageStateManager for getting state.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:232


update

update(prevParams?): S | Promise<S>

Callback for updating the extension after a route update. This method +has specified by its getAllowedStateKeys method.

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameTypeDescription
statePatchnull | S | Pick<S, K>Patch of the controller's state to apply.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:153


switchToPartialState

switchToPartialState(): void

Disables using PageStateManager for getting state.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:239


switchToStateManager

switchToStateManager(): void

Enables using PageStateManager for getting state.

Returns

void

Defined in

packages/core/src/extension/Extension.ts:232


update

update(prevParams?): S | Promise<S>

Callback for updating the extension after a route update. This method is invoked if the current route has the onlyUpdate flag set to true and the current controller and view match those used by the previously active route, or, the onlyUpdate option of the current route is a callback and @@ -68,8 +68,8 @@ deactivate, Extension#deinit) are not call in case this method is used.

Parameters

NameTypeDescription
prevParamsRPrevious route parameters.

Returns

S | Promise<S>

A map object of promises resolved when all resources the controller requires are ready. The resolved values will be pushed to the -controller's state.

Defined in

packages/core/src/extension/Extension.ts:136

- - +controller's state.

Defined in

packages/core/src/extension/Extension.ts:136

+ + \ No newline at end of file diff --git a/api/classes/ima_core.GenericError/index.html b/api/classes/ima_core.GenericError/index.html index 1df6ec2dbc..c8c7db8432 100644 --- a/api/classes/ima_core.GenericError/index.html +++ b/api/classes/ima_core.GenericError/index.html @@ -4,23 +4,23 @@ Class: GenericError<T> | IMA.js - - + +
-
Skip to main content

Class: GenericError<T>

@ima/core.GenericError

Implementation of the Error interface, providing more advanced -error API.

Type parameters

NameType
Tunknown

Hierarchy

Constructors

constructor

new GenericError<T>(message, params?)

Initializes the generic IMA error.

Type parameters

NameType
Tunknown

Parameters

NameTypeDescription
messagestringThe message describing the cause of the error.
params?T & GenericErrorParamsA data map providing additional details related to the error. It is recommended to set the status field to the HTTP response code that should be sent to the client.

Overrides

Error.constructor

Defined in

packages/core/src/error/GenericError.ts:27

Properties

_params

Protected _params: T & GenericErrorParams

Defined in

packages/core/src/error/GenericError.ts:16


cause

Optional cause: unknown

Inherited from

Error.cause

Defined in

node_modules/typescript/lib/lib.es2022.error.d.ts:24


message

message: string

Inherited from

Error.message

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1068


name

name: string

Inherited from

Error.name

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1067


stack

Optional stack: string

Inherited from

Error.stack

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1069


prepareStackTrace

Static Optional prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any

Type declaration

▸ (err, stackTraces): any

Optional override for formatting stack traces

Parameters
NameType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

Error.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:11


stackTraceLimit

Static stackTraceLimit: number

Inherited from

Error.stackTraceLimit

Defined in

node_modules/@types/node/globals.d.ts:13

Methods

getHttpStatus

getHttpStatus(): number

Returns the HTTP status to send to the client.

If the error has occurred at the client-side, the status code is used to +

Class: GenericError<T>

@ima/core.GenericError

Implementation of the Error interface, providing more advanced +error API.

Type parameters

NameType
Tunknown

Hierarchy

Constructors

constructor

new GenericError<T>(message, params?)

Initializes the generic IMA error.

Type parameters

NameType
Tunknown

Parameters

NameTypeDescription
messagestringThe message describing the cause of the error.
params?T & GenericErrorParamsA data map providing additional details related to the error. It is recommended to set the status field to the HTTP response code that should be sent to the client.

Overrides

Error.constructor

Defined in

packages/core/src/error/GenericError.ts:27

Properties

_params

Protected _params: T & GenericErrorParams

Defined in

packages/core/src/error/GenericError.ts:16


cause

Optional cause: unknown

Inherited from

Error.cause

Defined in

node_modules/typescript/lib/lib.es2022.error.d.ts:24


message

message: string

Inherited from

Error.message

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1068


name

name: string

Inherited from

Error.name

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1067


stack

Optional stack: string

Inherited from

Error.stack

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1069


prepareStackTrace

Static Optional prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any

Type declaration

▸ (err, stackTraces): any

Optional override for formatting stack traces

Parameters
NameType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

Error.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:11


stackTraceLimit

Static stackTraceLimit: number

Inherited from

Error.stackTraceLimit

Defined in

node_modules/@types/node/globals.d.ts:13

Methods

getHttpStatus

getHttpStatus(): number

Returns the HTTP status to send to the client.

If the error has occurred at the client-side, the status code is used to determine the error page to show to the user.

This method is a shorthand for the following code snippet: -this.getParams().status || 500.

Returns

number

The HTTP status to send to the client.

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Overrides

Error.getHttpStatus

Defined in

packages/core/src/error/GenericError.ts:39


getParams

getParams(): T & GenericErrorParams

Returns the error parameters providing additional details about the +this.getParams().status || 500.

Returns

number

The HTTP status to send to the client.

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Overrides

Error.getHttpStatus

Defined in

packages/core/src/error/GenericError.ts:39


getParams

getParams(): T & GenericErrorParams

Returns the error parameters providing additional details about the error. The structure of the returned object is always situation-dependent, but the returned object usually contains the status: number field which represents the HTTP status to send to the client.

Returns

T & GenericErrorParams

The route parameters of the route at which -the error has occurred.

See

Error#getHttpStatus

Overrides

Error.getParams

Defined in

packages/core/src/error/GenericError.ts:46


isClientError

isClientError(): boolean

Tests, whether the specified error was caused by the +the error has occurred.

See

Error#getHttpStatus

Overrides

Error.getParams

Defined in

packages/core/src/error/GenericError.ts:46


isClientError

isClientError(): boolean

Tests, whether the specified error was caused by the client's action (for example wrong URL or request encoding).

Returns

boolean

true if the error was caused the action of the -client.

Overrides

Error.isClientError

Defined in

packages/core/src/error/GenericError.ts:53


isRedirection

isRedirection(): boolean

Tests, whether the specified error should lead to a redirect.

Returns

boolean

true if the error should cause a redirect.

Overrides

Error.isRedirection

Defined in

packages/core/src/error/GenericError.ts:60


captureStackTrace

Static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

NameType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

Error.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:4

- - +client.

Overrides

Error.isClientError

Defined in

packages/core/src/error/GenericError.ts:53


isRedirection

isRedirection(): boolean

Tests, whether the specified error should lead to a redirect.

Returns

boolean

true if the error should cause a redirect.

Overrides

Error.isRedirection

Defined in

packages/core/src/error/GenericError.ts:60


captureStackTrace

Static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

NameType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

Error.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:4

+ + \ No newline at end of file diff --git a/api/classes/ima_core.HttpAgent/index.html b/api/classes/ima_core.HttpAgent/index.html index b21125ebdb..8c34902e2a 100644 --- a/api/classes/ima_core.HttpAgent/index.html +++ b/api/classes/ima_core.HttpAgent/index.html @@ -4,35 +4,35 @@ Class: HttpAgent | IMA.js - - + +
-
Skip to main content

Class: HttpAgent

@ima/core.HttpAgent

The HttpAgent defines unifying API for sending HTTP requests at -both client-side and server-side.

Hierarchy

Constructors

constructor

new HttpAgent()

Methods

clearDefaultHeaders

clearDefaultHeaders(): HttpAgent

Clears all configured default headers.

Returns

HttpAgent

This HTTP agent.

Defined in

packages/core/src/http/HttpAgent.ts:214


delete

delete<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP DELETE request to the specified URL, sending the provided +

Class: HttpAgent

@ima/core.HttpAgent

The HttpAgent defines unifying API for sending HTTP requests at +both client-side and server-side.

Hierarchy

Constructors

constructor

new HttpAgent()

Methods

clearDefaultHeaders

clearDefaultHeaders(): HttpAgent

Clears all configured default headers.

Returns

HttpAgent

This HTTP agent.

Defined in

packages/core/src/http/HttpAgent.ts:214


delete

delete<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP DELETE request to the specified URL, sending the provided data as the request body. If an object is provided as the request data, the data will be JSON-encoded. Sending other primitive non-string values as the request body is not supported.

Type parameters

NameType
Bunknown

Parameters

NameTypeDescription
urlstringThe URL to which the request should be made.
data?UnknownParametersThe data to send to the server as the request body.
options?Partial<HttpAgentRequestOptions>Optional request options.

Returns

Promise<HttpAgentResponse<B>>

A promise that resolves to the -response.

Defined in

packages/core/src/http/HttpAgent.ts:164


get

get<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP GET request to the specified URL, sending the provided +response.

Defined in

packages/core/src/http/HttpAgent.ts:164


get

get<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP GET request to the specified URL, sending the provided data as query parameters.

Type parameters

NameType
Bunknown

Parameters

NameTypeDescription
urlstringThe URL to which the request should be made.
data?UnknownParametersThe data to send to the server as query parameters.
options?Partial<HttpAgentRequestOptions>Optional request options.

Returns

Promise<HttpAgentResponse<B>>

A promise that resolves to the -response.

Defined in

packages/core/src/http/HttpAgent.ts:80


getCacheKey

getCacheKey(method, url, data): string

Generates a cache key to use for identifying a request to the specified +response.

Defined in

packages/core/src/http/HttpAgent.ts:80


getCacheKey

getCacheKey(method, url, data): string

Generates a cache key to use for identifying a request to the specified URL using the specified HTTP method, submitting the provided data.

Parameters

NameTypeDescription
methodstringThe HTTP method used by the request.
urlstringThe URL to which the request is sent.
dataUnknownParametersThe data associated with the request. These can be either the query parameters or request body data.

Returns

string

The key to use for identifying such a request in the -cache.

Defined in

packages/core/src/http/HttpAgent.ts:184


invalidateCache

invalidateCache(method, url, data): void

Method invalidate cache for given params

Parameters

NameType
methodstring
urlstring
dataUnknownParameters

Returns

void

Defined in

packages/core/src/http/HttpAgent.ts:191


patch

patch<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP PATCH request to the specified URL, sending the provided +cache.

Defined in

packages/core/src/http/HttpAgent.ts:184


invalidateCache

invalidateCache(method, url, data): void

Method invalidate cache for given params

Parameters

NameType
methodstring
urlstring
dataUnknownParameters

Returns

void

Defined in

packages/core/src/http/HttpAgent.ts:191


patch

patch<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP PATCH request to the specified URL, sending the provided data as the request body. If an object is provided as the request data, the data will be JSON-encoded. Sending other primitive non-string values as the request body is not supported.

Type parameters

NameType
Bunknown

Parameters

NameTypeDescription
urlstringThe URL to which the request should be made.
data?UnknownParametersThe data to send to the server as the request body.
options?Partial<HttpAgentRequestOptions>Optional request options.

Returns

Promise<HttpAgentResponse<B>>

A promise that resolves to the -response.

Defined in

packages/core/src/http/HttpAgent.ts:143


post

post<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP POST request to the specified URL, sending the provided +response.

Defined in

packages/core/src/http/HttpAgent.ts:143


post

post<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP POST request to the specified URL, sending the provided data as the request body. If an object is provided as the request data, the data will be JSON-encoded. Sending other primitive non-string values as the request body is not supported.

Type parameters

NameType
Bunknown

Parameters

NameTypeDescription
urlstringThe URL to which the request should be made.
data?UnknownParametersThe data to send to the server as the request body.
options?Partial<HttpAgentRequestOptions>Optional request options.

Returns

Promise<HttpAgentResponse<B>>

A promise that resolves to the -response.

Defined in

packages/core/src/http/HttpAgent.ts:101


put

put<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP PUT request to the specified URL, sending the provided +response.

Defined in

packages/core/src/http/HttpAgent.ts:101


put

put<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP PUT request to the specified URL, sending the provided data as the request body. If an object is provided as the request data, the data will be JSON-encoded. Sending other primitive non-string values as the request body is not supported.

Type parameters

NameType
Bunknown

Parameters

NameTypeDescription
urlstringThe URL to which the request should be made.
data?UnknownParametersThe data to send to the server as the request body.
options?Partial<HttpAgentRequestOptions>Optional request options.

Returns

Promise<HttpAgentResponse<B>>

A promise that resolves to the -response.

Defined in

packages/core/src/http/HttpAgent.ts:122


setDefaultHeader

setDefaultHeader(header, value): HttpAgent

Sets the specified header to be sent with every subsequent HTTP request, -unless explicitly overridden by request options.

Parameters

NameTypeDescription
headerstringThe name of the header.
valuestringThe header value. To provide multiple values, separate them with commas (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2).

Returns

HttpAgent

This HTTP agent.

Defined in

packages/core/src/http/HttpAgent.ts:205

- - +response.

Defined in

packages/core/src/http/HttpAgent.ts:122


setDefaultHeader

setDefaultHeader(header, value): HttpAgent

Sets the specified header to be sent with every subsequent HTTP request, +unless explicitly overridden by request options.

Parameters

NameTypeDescription
headerstringThe name of the header.
valuestringThe header value. To provide multiple values, separate them with commas (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2).

Returns

HttpAgent

This HTTP agent.

Defined in

packages/core/src/http/HttpAgent.ts:205

+ + \ No newline at end of file diff --git a/api/classes/ima_core.HttpAgentImpl/index.html b/api/classes/ima_core.HttpAgentImpl/index.html index fee34555b9..1cf5e630bb 100644 --- a/api/classes/ima_core.HttpAgentImpl/index.html +++ b/api/classes/ima_core.HttpAgentImpl/index.html @@ -4,63 +4,63 @@ Class: HttpAgentImpl | IMA.js - - + +
-
Skip to main content

Class: HttpAgentImpl

@ima/core.HttpAgentImpl

Implementation of the HttpAgent interface with internal caching -of completed and ongoing HTTP requests and cookie storage.

Hierarchy

Constructors

constructor

new HttpAgentImpl(proxy, cache, cookie, config, Helper)

Initializes the HTTP handler.

Parameters

NameTypeDescription
proxyHttpProxyThe low-level HTTP proxy for sending the HTTP requests.
cacheCache<HttpAgentResponse<unknown>>Cache to use for caching ongoing and completed requests.
cookieCookieStorageThe cookie storage to use internally.
configHttpAgentImplConfigConfiguration of the HTTP handler for the current application environment, specifying the various default request option values and cache option values.
Helper__moduleThe IMA.js helper methods.

Example

http
.get('url', { data: data }, {
ttl: 2000,
repeatRequest: 1,
withCredentials: true,
timeout: 2000,
accept: 'application/json',
language: 'en'
})
.then((response) => {
//resolve
}
.catch((error) => {
//catch
});

Example

http
.setDefaultHeader('Accept-Language', 'en')
.clearDefaultHeaders();

Overrides

HttpAgent.constructor

Defined in

packages/core/src/http/HttpAgentImpl.ts:69

Properties

_Helper

Protected _Helper: __module

Defined in

packages/core/src/http/HttpAgentImpl.ts:33


_cache

Protected _cache: Cache<HttpAgentResponse<unknown>>

Defined in

packages/core/src/http/HttpAgentImpl.ts:29


_cacheOptions

Protected _cacheOptions: HttpAgentImplCacheOptions

Defined in

packages/core/src/http/HttpAgentImpl.ts:31


Protected _cookie: CookieStorage

Defined in

packages/core/src/http/HttpAgentImpl.ts:30


_defaultRequestOptions

Protected _defaultRequestOptions: HttpAgentRequestOptions

Defined in

packages/core/src/http/HttpAgentImpl.ts:32


_internalCacheOfPromises

Protected _internalCacheOfPromises: Map<any, any>

Defined in

packages/core/src/http/HttpAgentImpl.ts:34


_proxy

Protected _proxy: HttpProxy

Defined in

packages/core/src/http/HttpAgentImpl.ts:28

Methods

_cleanResponse

_cleanResponse<B>(response): HttpAgentResponse<B>

Cleans cache response from data (abort controller, postProcessors), that cannot be persisted, -before saving the data to the cache.

Type parameters

Name
B

Parameters

NameType
responseHttpAgentResponse<B>

Returns

HttpAgentResponse<B>

Defined in

packages/core/src/http/HttpAgentImpl.ts:541


_clone

_clone<V>(value): V

Attempts to clone the provided value, if possible. Values that cannot be +

Class: HttpAgentImpl

@ima/core.HttpAgentImpl

Implementation of the HttpAgent interface with internal caching +of completed and ongoing HTTP requests and cookie storage.

Hierarchy

Constructors

constructor

new HttpAgentImpl(proxy, cache, cookie, config, Helper)

Initializes the HTTP handler.

Parameters

NameTypeDescription
proxyHttpProxyThe low-level HTTP proxy for sending the HTTP requests.
cacheCache<HttpAgentResponse<unknown>>Cache to use for caching ongoing and completed requests.
cookieCookieStorageThe cookie storage to use internally.
configHttpAgentImplConfigConfiguration of the HTTP handler for the current application environment, specifying the various default request option values and cache option values.
Helper__moduleThe IMA.js helper methods.

Example

http
.get('url', { data: data }, {
ttl: 2000,
repeatRequest: 1,
withCredentials: true,
timeout: 2000,
accept: 'application/json',
language: 'en'
})
.then((response) => {
//resolve
}
.catch((error) => {
//catch
});

Example

http
.setDefaultHeader('Accept-Language', 'en')
.clearDefaultHeaders();

Overrides

HttpAgent.constructor

Defined in

packages/core/src/http/HttpAgentImpl.ts:69

Properties

_Helper

Protected _Helper: __module

Defined in

packages/core/src/http/HttpAgentImpl.ts:33


_cache

Protected _cache: Cache<HttpAgentResponse<unknown>>

Defined in

packages/core/src/http/HttpAgentImpl.ts:29


_cacheOptions

Protected _cacheOptions: HttpAgentImplCacheOptions

Defined in

packages/core/src/http/HttpAgentImpl.ts:31


Protected _cookie: CookieStorage

Defined in

packages/core/src/http/HttpAgentImpl.ts:30


_defaultRequestOptions

Protected _defaultRequestOptions: HttpAgentRequestOptions

Defined in

packages/core/src/http/HttpAgentImpl.ts:32


_internalCacheOfPromises

Protected _internalCacheOfPromises: Map<any, any>

Defined in

packages/core/src/http/HttpAgentImpl.ts:34


_proxy

Protected _proxy: HttpProxy

Defined in

packages/core/src/http/HttpAgentImpl.ts:28

Methods

_cleanResponse

_cleanResponse<B>(response): HttpAgentResponse<B>

Cleans cache response from data (abort controller, postProcessors), that cannot be persisted, +before saving the data to the cache.

Type parameters

Name
B

Parameters

NameType
responseHttpAgentResponse<B>

Returns

HttpAgentResponse<B>

Defined in

packages/core/src/http/HttpAgentImpl.ts:541


_clone

_clone<V>(value): V

Attempts to clone the provided value, if possible. Values that cannot be cloned (e.g. promises) will be simply returned.

Type parameters

Name
V

Parameters

NameTypeDescription
valueVThe value to clone.

Returns

V

The created clone, or the provided value if the value cannot be -cloned.

Defined in

packages/core/src/http/HttpAgentImpl.ts:221


_getCacheKeySuffix

_getCacheKeySuffix(method, url, data?): string

Generates cache key suffix for an HTTP request to the specified URL with +cloned.

Defined in

packages/core/src/http/HttpAgentImpl.ts:221


_getCacheKeySuffix

_getCacheKeySuffix(method, url, data?): string

Generates cache key suffix for an HTTP request to the specified URL with the specified data.

Parameters

NameTypeDescription
methodstringThe HTTP method used by the request.
urlstringThe URL to which the request is sent.
data?UnknownParametersThe data sent with the request.

Returns

string

The suffix of a cache key to use for a request to the -specified URL, carrying the specified data.

Defined in

packages/core/src/http/HttpAgentImpl.ts:478


_getCachedData

_getCachedData<B>(method, url, data?): null | Promise<HttpAgentResponse<B>>

Tests whether an ongoing or completed HTTP request for the specified URL +specified URL, carrying the specified data.

Defined in

packages/core/src/http/HttpAgentImpl.ts:478


_getCachedData

_getCachedData<B>(method, url, data?): null | Promise<HttpAgentResponse<B>>

Tests whether an ongoing or completed HTTP request for the specified URL and data is present in the internal cache and, if it is, the method returns a promise that resolves to the response body parsed as JSON.

The method returns null if no such request is present in the cache.

Type parameters

Name
B

Parameters

NameTypeDescription
methodstringThe HTTP method used by the request.
urlstringThe URL to which the request was made.
data?UnknownParametersThe data sent to the server with the request.

Returns

null | Promise<HttpAgentResponse<B>>

A promise that will resolve to the server response with the body parsed as JSON, or null if -no such request is present in the cache.

Defined in

packages/core/src/http/HttpAgentImpl.ts:278


_prepareOptions

_prepareOptions(options?, url): HttpAgentRequestOptions

Prepares the provided request options object by filling in missing +no such request is present in the cache.

Defined in

packages/core/src/http/HttpAgentImpl.ts:278


_prepareOptions

_prepareOptions(options?, url): HttpAgentRequestOptions

Prepares the provided request options object by filling in missing options with default values and adding extra options used internally.

Parameters

NameTypeDescription
optionsPartial<HttpAgentRequestOptions>Optional request options.
urlstring-

Returns

HttpAgentRequestOptions

Request options with set filled-in default values for missing fields, and extra options used -internally.

Defined in

packages/core/src/http/HttpAgentImpl.ts:435


_proxyRejected

_proxyRejected<B>(error): Promise<HttpAgentResponse<B>>

Handles rejection of the HTTP request by the HTTP proxy. The method +internally.

Defined in

packages/core/src/http/HttpAgentImpl.ts:435


_proxyRejected

_proxyRejected<B>(error): Promise<HttpAgentResponse<B>>

Handles rejection of the HTTP request by the HTTP proxy. The method tests whether there are any remaining tries for the request, and if there are any, it attempts re-send the request.

The method rejects the internal request promise if there are no tries left.

Type parameters

Name
B

Parameters

NameTypeDescription
errorGenericError<HttpProxyErrorParams>The error provided by the HttpProxy, carrying the error parameters, such as the request url, data, method, options and other useful data.

Returns

Promise<HttpAgentResponse<B>>

A promise that will either resolve to a server's response (with the body parsed as JSON) if there are any tries left and the re-tried request succeeds, or rejects with an error containing details of the cause of the request's -failure.

Defined in

packages/core/src/http/HttpAgentImpl.ts:398


_proxyResolved

_proxyResolved<B>(response): HttpAgentResponse<B>

Handles successful completion of an HTTP request by the HTTP proxy.

The method also updates the internal cookie storage with the cookies -received from the server.

Type parameters

Name
B

Parameters

NameTypeDescription
responseHttpAgentResponse<B>Server response.

Returns

HttpAgentResponse<B>

The post-processed server response.

Defined in

packages/core/src/http/HttpAgentImpl.ts:343


_request

_request<B>(method, url, data, options): Promise<HttpAgentResponse<B>>

Sends a new HTTP request using the specified method to the specified +failure.

Defined in

packages/core/src/http/HttpAgentImpl.ts:398


_proxyResolved

_proxyResolved<B>(response): HttpAgentResponse<B>

Handles successful completion of an HTTP request by the HTTP proxy.

The method also updates the internal cookie storage with the cookies +received from the server.

Type parameters

Name
B

Parameters

NameTypeDescription
responseHttpAgentResponse<B>Server response.

Returns

HttpAgentResponse<B>

The post-processed server response.

Defined in

packages/core/src/http/HttpAgentImpl.ts:343


_request

_request<B>(method, url, data, options): Promise<HttpAgentResponse<B>>

Sends a new HTTP request using the specified method to the specified url. The request will carry the provided data as query parameters if the HTTP method is GET, but the data will be sent as request body for any other request method.

Type parameters

Name
B

Parameters

NameTypeDescription
methodstringHTTP method to use.
urlstringThe URL to which the request is sent.
dataundefined | UnknownParametersThe data sent with the request.
optionsHttpAgentRequestOptionsOptional request options.

Returns

Promise<HttpAgentResponse<B>>

A promise that resolves to the response -with the body parsed as JSON.

Defined in

packages/core/src/http/HttpAgentImpl.ts:314


_requestWithCheckCache

_requestWithCheckCache<B>(method, url, data?, options?): Promise<HttpAgentResponse<B>>

Check cache and if data isn’t available then make real request.

Type parameters

Name
B

Parameters

NameTypeDescription
methodstringThe HTTP method to use.
urlstringThe URL to which the request should be sent.
data?UnknownParametersThe data to send with the request.
options?Partial<HttpAgentRequestOptions>Optional request options.

Returns

Promise<HttpAgentResponse<B>>

A promise that resolves to the response -with body parsed as JSON.

Defined in

packages/core/src/http/HttpAgentImpl.ts:243


_saveAgentResponseToCache

_saveAgentResponseToCache<B>(agentResponse): void

Saves the server response to the cache to be used as the result of the -next request of the same properties.

Type parameters

Name
B

Parameters

NameTypeDescription
agentResponseHttpAgentResponse<B>The response of the server.

Returns

void

Defined in

packages/core/src/http/HttpAgentImpl.ts:523


_setCookiesFromResponse

_setCookiesFromResponse<B>(agentResponse): void

Sets all cookies from the Set-Cookie response header to the -cookie storage.

Type parameters

Name
B

Parameters

NameTypeDescription
agentResponseHttpAgentResponse<B>The response of the server.

Returns

void

Defined in

packages/core/src/http/HttpAgentImpl.ts:501


clearDefaultHeaders

clearDefaultHeaders(): HttpAgentImpl

Clears all configured default headers.

Returns

HttpAgentImpl

This HTTP agent.

Overrides

HttpAgent.clearDefaultHeaders

Defined in

packages/core/src/http/HttpAgentImpl.ts:207


delete

delete<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP DELETE request to the specified URL, sending the provided +with the body parsed as JSON.

Defined in

packages/core/src/http/HttpAgentImpl.ts:314


_requestWithCheckCache

_requestWithCheckCache<B>(method, url, data?, options?): Promise<HttpAgentResponse<B>>

Check cache and if data isn’t available then make real request.

Type parameters

Name
B

Parameters

NameTypeDescription
methodstringThe HTTP method to use.
urlstringThe URL to which the request should be sent.
data?UnknownParametersThe data to send with the request.
options?Partial<HttpAgentRequestOptions>Optional request options.

Returns

Promise<HttpAgentResponse<B>>

A promise that resolves to the response +with body parsed as JSON.

Defined in

packages/core/src/http/HttpAgentImpl.ts:243


_saveAgentResponseToCache

_saveAgentResponseToCache<B>(agentResponse): void

Saves the server response to the cache to be used as the result of the +next request of the same properties.

Type parameters

Name
B

Parameters

NameTypeDescription
agentResponseHttpAgentResponse<B>The response of the server.

Returns

void

Defined in

packages/core/src/http/HttpAgentImpl.ts:523


_setCookiesFromResponse

_setCookiesFromResponse<B>(agentResponse): void

Sets all cookies from the Set-Cookie response header to the +cookie storage.

Type parameters

Name
B

Parameters

NameTypeDescription
agentResponseHttpAgentResponse<B>The response of the server.

Returns

void

Defined in

packages/core/src/http/HttpAgentImpl.ts:501


clearDefaultHeaders

clearDefaultHeaders(): HttpAgentImpl

Clears all configured default headers.

Returns

HttpAgentImpl

This HTTP agent.

Overrides

HttpAgent.clearDefaultHeaders

Defined in

packages/core/src/http/HttpAgentImpl.ts:207


delete

delete<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP DELETE request to the specified URL, sending the provided data as the request body. If an object is provided as the request data, the data will be JSON-encoded. Sending other primitive non-string values as the request body is not supported.

Type parameters

NameType
Bunknown

Parameters

NameTypeDescription
urlstringThe URL to which the request should be made.
data?UnknownParametersThe data to send to the server as the request body.
options?Partial<HttpAgentRequestOptions>Optional request options.

Returns

Promise<HttpAgentResponse<B>>

A promise that resolves to the -response.

Overrides

HttpAgent.delete

Defined in

packages/core/src/http/HttpAgentImpl.ts:164


get

get<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP GET request to the specified URL, sending the provided +response.

Overrides

HttpAgent.delete

Defined in

packages/core/src/http/HttpAgentImpl.ts:164


get

get<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP GET request to the specified URL, sending the provided data as query parameters.

Type parameters

NameType
Bunknown

Parameters

NameTypeDescription
urlstringThe URL to which the request should be made.
data?UnknownParametersThe data to send to the server as query parameters.
options?Partial<HttpAgentRequestOptions>Optional request options.

Returns

Promise<HttpAgentResponse<B>>

A promise that resolves to the -response.

Overrides

HttpAgent.get

Defined in

packages/core/src/http/HttpAgentImpl.ts:105


getCacheKey

getCacheKey(method, url, data?): string

Generates a cache key to use for identifying a request to the specified +response.

Overrides

HttpAgent.get

Defined in

packages/core/src/http/HttpAgentImpl.ts:105


getCacheKey

getCacheKey(method, url, data?): string

Generates a cache key to use for identifying a request to the specified URL using the specified HTTP method, submitting the provided data.

Parameters

NameTypeDescription
methodstringThe HTTP method used by the request.
urlstringThe URL to which the request is sent.
data?UnknownParametersThe data associated with the request. These can be either the query parameters or request body data.

Returns

string

The key to use for identifying such a request in the -cache.

Overrides

HttpAgent.getCacheKey

Defined in

packages/core/src/http/HttpAgentImpl.ts:180


invalidateCache

invalidateCache(method, url, data?): void

Method invalidate cache for given params

Parameters

NameType
methodstring
urlstring
data?UnknownParameters

Returns

void

Overrides

HttpAgent.invalidateCache

Defined in

packages/core/src/http/HttpAgentImpl.ts:189


patch

patch<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP PATCH request to the specified URL, sending the provided +cache.

Overrides

HttpAgent.getCacheKey

Defined in

packages/core/src/http/HttpAgentImpl.ts:180


invalidateCache

invalidateCache(method, url, data?): void

Method invalidate cache for given params

Parameters

NameType
methodstring
urlstring
data?UnknownParameters

Returns

void

Overrides

HttpAgent.invalidateCache

Defined in

packages/core/src/http/HttpAgentImpl.ts:189


patch

patch<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP PATCH request to the specified URL, sending the provided data as the request body. If an object is provided as the request data, the data will be JSON-encoded. Sending other primitive non-string values as the request body is not supported.

Type parameters

NameType
Bunknown

Parameters

NameTypeDescription
urlstringThe URL to which the request should be made.
data?UnknownParametersThe data to send to the server as the request body.
options?Partial<HttpAgentRequestOptions>Optional request options.

Returns

Promise<HttpAgentResponse<B>>

A promise that resolves to the -response.

Overrides

HttpAgent.patch

Defined in

packages/core/src/http/HttpAgentImpl.ts:148


post

post<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP POST request to the specified URL, sending the provided +response.

Overrides

HttpAgent.patch

Defined in

packages/core/src/http/HttpAgentImpl.ts:148


post

post<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP POST request to the specified URL, sending the provided data as the request body. If an object is provided as the request data, the data will be JSON-encoded. Sending other primitive non-string values as the request body is not supported.

Type parameters

NameType
Bunknown

Parameters

NameTypeDescription
urlstringThe URL to which the request should be made.
data?UnknownParametersThe data to send to the server as the request body.
options?Partial<HttpAgentRequestOptions>Optional request options.

Returns

Promise<HttpAgentResponse<B>>

A promise that resolves to the -response.

Overrides

HttpAgent.post

Defined in

packages/core/src/http/HttpAgentImpl.ts:116


put

put<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP PUT request to the specified URL, sending the provided +response.

Overrides

HttpAgent.post

Defined in

packages/core/src/http/HttpAgentImpl.ts:116


put

put<B>(url, data?, options?): Promise<HttpAgentResponse<B>>

Sends an HTTP PUT request to the specified URL, sending the provided data as the request body. If an object is provided as the request data, the data will be JSON-encoded. Sending other primitive non-string values as the request body is not supported.

Type parameters

NameType
Bunknown

Parameters

NameTypeDescription
urlstringThe URL to which the request should be made.
data?UnknownParametersThe data to send to the server as the request body.
options?Partial<HttpAgentRequestOptions>Optional request options.

Returns

Promise<HttpAgentResponse<B>>

A promise that resolves to the -response.

Overrides

HttpAgent.put

Defined in

packages/core/src/http/HttpAgentImpl.ts:132


setDefaultHeader

setDefaultHeader(header, value): HttpAgentImpl

Sets the specified header to be sent with every subsequent HTTP request, -unless explicitly overridden by request options.

Parameters

NameTypeDescription
headerstringThe name of the header.
valuestringThe header value. To provide multiple values, separate them with commas (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2).

Returns

HttpAgentImpl

This HTTP agent.

Overrides

HttpAgent.setDefaultHeader

Defined in

packages/core/src/http/HttpAgentImpl.ts:198

- - +response.

Overrides

HttpAgent.put

Defined in

packages/core/src/http/HttpAgentImpl.ts:132


setDefaultHeader

setDefaultHeader(header, value): HttpAgentImpl

Sets the specified header to be sent with every subsequent HTTP request, +unless explicitly overridden by request options.

Parameters

NameTypeDescription
headerstringThe name of the header.
valuestringThe header value. To provide multiple values, separate them with commas (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2).

Returns

HttpAgentImpl

This HTTP agent.

Overrides

HttpAgent.setDefaultHeader

Defined in

packages/core/src/http/HttpAgentImpl.ts:198

+ + \ No newline at end of file diff --git a/api/classes/ima_core.HttpProxy/index.html b/api/classes/ima_core.HttpProxy/index.html index bae2cea238..ff23e1b6d3 100644 --- a/api/classes/ima_core.HttpProxy/index.html +++ b/api/classes/ima_core.HttpProxy/index.html @@ -4,28 +4,28 @@ Class: HttpProxy | IMA.js - - + +
-
Skip to main content

Class: HttpProxy

@ima/core.HttpProxy

Middleware proxy between HttpAgent implementations and the +

Class: HttpProxy

@ima/core.HttpProxy

Middleware proxy between HttpAgent implementations and the Fetch API, -providing a Promise-oriented API for sending requests.

Constructors

constructor

new HttpProxy(transformer, window)

Initializes the HTTP proxy.

Parameters

NameTypeDescription
transformerUrlTransformerA transformer of URLs to which requests are made.
windowWindowHelper for manipulating the global object window regardless of the client/server-side environment.

Defined in

packages/core/src/http/HttpProxy.ts:76

Properties

_defaultHeaders

Protected _defaultHeaders: Map<string, string>

Defined in

packages/core/src/http/HttpProxy.ts:66


_transformer

Protected _transformer: UrlTransformer

Defined in

packages/core/src/http/HttpProxy.ts:64


_window

Protected _window: Window

Defined in

packages/core/src/http/HttpProxy.ts:65

Methods

_composeRequestInit

_composeRequestInit(method, data, options): ImaRequestInit

Composes an init object, which can be used as a second argument of -window.fetch method.

Parameters

NameTypeDescription
methodstringThe HTTP method to use.
dataundefined | UnknownParametersThe data to be send with a request.
optionsHttpAgentRequestOptionsOptions provided by the HTTP agent.

Returns

ImaRequestInit

An ImaRequestInit object (extended from RequestInit of the Fetch API).

Defined in

packages/core/src/http/HttpProxy.ts:459


_composeRequestParams

_composeRequestParams(method, url, data, options): HttpProxyRequestParams

Composes an object representing the HTTP request parameters from the +providing a Promise-oriented API for sending requests.

Constructors

constructor

new HttpProxy(transformer, window)

Initializes the HTTP proxy.

Parameters

NameTypeDescription
transformerUrlTransformerA transformer of URLs to which requests are made.
windowWindowHelper for manipulating the global object window regardless of the client/server-side environment.

Defined in

packages/core/src/http/HttpProxy.ts:76

Properties

_defaultHeaders

Protected _defaultHeaders: Map<string, string>

Defined in

packages/core/src/http/HttpProxy.ts:66


_transformer

Protected _transformer: UrlTransformer

Defined in

packages/core/src/http/HttpProxy.ts:64


_window

Protected _window: Window

Defined in

packages/core/src/http/HttpProxy.ts:65

Methods

_composeRequestInit

_composeRequestInit(method, data, options): ImaRequestInit

Composes an init object, which can be used as a second argument of +window.fetch method.

Parameters

NameTypeDescription
methodstringThe HTTP method to use.
dataundefined | UnknownParametersThe data to be send with a request.
optionsHttpAgentRequestOptionsOptions provided by the HTTP agent.

Returns

ImaRequestInit

An ImaRequestInit object (extended from RequestInit of the Fetch API).

Defined in

packages/core/src/http/HttpProxy.ts:459


_composeRequestParams

_composeRequestParams(method, url, data, options): HttpProxyRequestParams

Composes an object representing the HTTP request parameters from the provided arguments.

Parameters

NameTypeDescription
methodstringThe HTTP method to use.
urlstringThe URL to which the request should be sent.
dataundefined | UnknownParametersThe data to send with the request.
optionsHttpAgentRequestOptionsOptional request options.

Returns

HttpProxyRequestParams

An object representing the complete request parameters used to create and -send the HTTP request.

Defined in

packages/core/src/http/HttpProxy.ts:433


_composeRequestUrl

_composeRequestUrl(url, data): string

Transforms the provided URL using the current URL transformer and adds +send the HTTP request.

Defined in

packages/core/src/http/HttpProxy.ts:433


_composeRequestUrl

_composeRequestUrl(url, data): string

Transforms the provided URL using the current URL transformer and adds the provided data to the URL's query string.

Parameters

NameTypeDescription
urlstringThe URL to prepare for use with the fetch API.
dataundefined | StringParametersThe data to be attached to the query string.

Returns

string

The transformed URL with the provided data attached to -its query string.

Defined in

packages/core/src/http/HttpProxy.ts:540


_convertObjectToFormData

Private _convertObjectToFormData<T>(object): undefined | FormData | T

Converts given data to FormData object. -If FormData object is not supported by the browser the original object is returned.

Type parameters

NameType
Textends Record<string, string | Blob>

Parameters

NameTypeDescription
objectundefined | TThe object to be converted

Returns

undefined | FormData | T

Defined in

packages/core/src/http/HttpProxy.ts:631


_convertObjectToQueryString

Private _convertObjectToQueryString<T>(object): undefined | string

Returns query string representation of the data parameter. -(Returned string does not contain ? at the beginning)

Type parameters

NameType
Textends Record<string, string | number | boolean>

Parameters

NameTypeDescription
objectundefined | TThe object to be converted

Returns

undefined | string

Query string representation of the given object

Defined in

packages/core/src/http/HttpProxy.ts:605


_createError

_createError(cause, requestParams, status, responseBody?): GenericError<unknown>

Creates an error that represents a failed HTTP request.

Parameters

NameTypeDefault valueDescription
causeError | GenericError<unknown>undefinedThe error's message.
requestParamsHttpProxyRequestParamsundefinedAn object representing the complete request parameters used to create and send the HTTP request.
statusnumberundefinedServer's response HTTP status code.
responseBodyunknownnullThe body of the server's response, if any.

Returns

GenericError<unknown>

The error representing a failed HTTP request.

Defined in

packages/core/src/http/HttpProxy.ts:401


_getContentType

_getContentType(method, data, headers): null | string

Gets a Content-Type header value for defined method, data and options.

Parameters

NameTypeDescription
methodstringThe HTTP method to use.
dataundefined | UnknownParametersThe data to be send with a request.
headersRecord<string, string>-

Returns

null | string

A Content-Type header value, null for requests -with no body.

Defined in

packages/core/src/http/HttpProxy.ts:512


_headersToPlainObject

_headersToPlainObject(headers): StringParameters

Converts the provided Fetch API's Headers object to a plain object.

Parameters

NameTypeDescription
headersHeadersThe headers to convert.

Returns

StringParameters

Converted headers.

Defined in

packages/core/src/http/HttpProxy.ts:355


_processError

_processError(fetchError, requestParams): GenericError<unknown>

Processes the provided Fetch API or internal error and creates an error -to expose to the calling API.

Parameters

NameTypeDescription
fetchErrorError | GenericError<unknown>The internal error to process.
requestParamsHttpProxyRequestParamsAn object representing the complete request parameters used to create and send the HTTP request.

Returns

GenericError<unknown>

The error to provide to the calling API.

Defined in

packages/core/src/http/HttpProxy.ts:375


_processResponse

_processResponse<B>(requestParams, response, responseBody): HttpAgentResponse<B>

Processes the response received from the server.

Type parameters

Name
B

Parameters

NameTypeDescription
requestParamsHttpProxyRequestParamsThe original request's parameters.
responseResponseThe Fetch API's Response object representing the server's response.
responseBodyBThe server's response body.

Returns

HttpAgentResponse<B>

The server's response along with all related -metadata.

Defined in

packages/core/src/http/HttpProxy.ts:326


_shouldRequestHaveBody

_shouldRequestHaveBody(method, data): boolean

Checks if a request should have a body (GET and HEAD requests don't -have a body).

Parameters

NameTypeDescription
methodstringThe HTTP method.
dataundefined | UnknownParametersThe data to be send with a request.

Returns

boolean

true if a request has a body, otherwise false.

Defined in

packages/core/src/http/HttpProxy.ts:561


_transformRequestBody

Private _transformRequestBody(data, headers): undefined | string | UnknownParameters | FormData

Formats request body according to request headers.

Parameters

NameTypeDescription
dataundefined | UnknownParametersThe data to be send with a request.
headersRecord<string, string>Headers object from options provided by the HTTP agent.

Returns

undefined | string | UnknownParameters | FormData

Defined in

packages/core/src/http/HttpProxy.ts:581


clearDefaultHeaders

clearDefaultHeaders(): HttpProxy

Clears all defaults headers sent with all requests.

Returns

HttpProxy

this

Defined in

packages/core/src/http/HttpProxy.ts:228


getErrorParams

getErrorParams<B>(method, url, data, options, status, body, cause): HttpProxyErrorParams<B>

Gets an object that describes a failed HTTP request, providing +its query string.

Defined in

packages/core/src/http/HttpProxy.ts:540


_convertObjectToFormData

Private _convertObjectToFormData<T>(object): undefined | FormData | T

Converts given data to FormData object. +If FormData object is not supported by the browser the original object is returned.

Type parameters

NameType
Textends Record<string, string | Blob>

Parameters

NameTypeDescription
objectundefined | TThe object to be converted

Returns

undefined | FormData | T

Defined in

packages/core/src/http/HttpProxy.ts:631


_convertObjectToQueryString

Private _convertObjectToQueryString<T>(object): undefined | string

Returns query string representation of the data parameter. +(Returned string does not contain ? at the beginning)

Type parameters

NameType
Textends Record<string, string | number | boolean>

Parameters

NameTypeDescription
objectundefined | TThe object to be converted

Returns

undefined | string

Query string representation of the given object

Defined in

packages/core/src/http/HttpProxy.ts:605


_createError

_createError(cause, requestParams, status, responseBody?): GenericError<unknown>

Creates an error that represents a failed HTTP request.

Parameters

NameTypeDefault valueDescription
causeError | GenericError<unknown>undefinedThe error's message.
requestParamsHttpProxyRequestParamsundefinedAn object representing the complete request parameters used to create and send the HTTP request.
statusnumberundefinedServer's response HTTP status code.
responseBodyunknownnullThe body of the server's response, if any.

Returns

GenericError<unknown>

The error representing a failed HTTP request.

Defined in

packages/core/src/http/HttpProxy.ts:401


_getContentType

_getContentType(method, data, headers): null | string

Gets a Content-Type header value for defined method, data and options.

Parameters

NameTypeDescription
methodstringThe HTTP method to use.
dataundefined | UnknownParametersThe data to be send with a request.
headersRecord<string, string>-

Returns

null | string

A Content-Type header value, null for requests +with no body.

Defined in

packages/core/src/http/HttpProxy.ts:512


_headersToPlainObject

_headersToPlainObject(headers): StringParameters

Converts the provided Fetch API's Headers object to a plain object.

Parameters

NameTypeDescription
headersHeadersThe headers to convert.

Returns

StringParameters

Converted headers.

Defined in

packages/core/src/http/HttpProxy.ts:355


_processError

_processError(fetchError, requestParams): GenericError<unknown>

Processes the provided Fetch API or internal error and creates an error +to expose to the calling API.

Parameters

NameTypeDescription
fetchErrorError | GenericError<unknown>The internal error to process.
requestParamsHttpProxyRequestParamsAn object representing the complete request parameters used to create and send the HTTP request.

Returns

GenericError<unknown>

The error to provide to the calling API.

Defined in

packages/core/src/http/HttpProxy.ts:375


_processResponse

_processResponse<B>(requestParams, response, responseBody): HttpAgentResponse<B>

Processes the response received from the server.

Type parameters

Name
B

Parameters

NameTypeDescription
requestParamsHttpProxyRequestParamsThe original request's parameters.
responseResponseThe Fetch API's Response object representing the server's response.
responseBodyBThe server's response body.

Returns

HttpAgentResponse<B>

The server's response along with all related +metadata.

Defined in

packages/core/src/http/HttpProxy.ts:326


_shouldRequestHaveBody

_shouldRequestHaveBody(method, data): boolean

Checks if a request should have a body (GET and HEAD requests don't +have a body).

Parameters

NameTypeDescription
methodstringThe HTTP method.
dataundefined | UnknownParametersThe data to be send with a request.

Returns

boolean

true if a request has a body, otherwise false.

Defined in

packages/core/src/http/HttpProxy.ts:561


_transformRequestBody

Private _transformRequestBody(data, headers): undefined | string | UnknownParameters | FormData

Formats request body according to request headers.

Parameters

NameTypeDescription
dataundefined | UnknownParametersThe data to be send with a request.
headersRecord<string, string>Headers object from options provided by the HTTP agent.

Returns

undefined | string | UnknownParameters | FormData

Defined in

packages/core/src/http/HttpProxy.ts:581


clearDefaultHeaders

clearDefaultHeaders(): HttpProxy

Clears all defaults headers sent with all requests.

Returns

HttpProxy

this

Defined in

packages/core/src/http/HttpProxy.ts:228


getErrorParams

getErrorParams<B>(method, url, data, options, status, body, cause): HttpProxyErrorParams<B>

Gets an object that describes a failed HTTP request, providing information about both the failure reported by the server and how the request has been sent to the server.

Type parameters

NameType
Bunknown

Parameters

NameTypeDescription
methodstringThe HTTP method used to make the request.
urlstringThe URL to which the request has been made.
dataundefined | UnknownParametersThe data sent with the request.
optionsHttpAgentRequestOptionsOptional request options.
statusnumberThe HTTP response status code send by the server.
bodyundefined | BThe body of HTTP error response (detailed information).
causeErrorThe low-level cause error.

Returns

HttpProxyErrorParams<B>

An object containing both the details of -the error and the request that lead to it.

Defined in

packages/core/src/http/HttpProxy.ts:251


haveToSetCookiesManually

haveToSetCookiesManually(): boolean

Returns true if cookies have to be processed manually by setting +the error and the request that lead to it.

Defined in

packages/core/src/http/HttpProxy.ts:251


haveToSetCookiesManually

haveToSetCookiesManually(): boolean

Returns true if cookies have to be processed manually by setting Cookie HTTP header on requests and parsing the Set-Cookie HTTP response header.

The result of this method depends on the current application environment, the client-side usually handles cookie processing @@ -33,13 +33,13 @@ enabled (which results in cookies being automatically processed by the browser), and returns true or false accordingly.

true if cookies are not processed automatically by the environment and have to be handled manually by parsing -response headers and setting request headers, otherwise false.

Returns

boolean

Defined in

packages/core/src/http/HttpProxy.ts:311


request

request<B>(method, url, data, options): Promise<HttpAgentResponse<B>>

Executes a HTTP request to the specified URL using the specified HTTP +response headers and setting request headers, otherwise false.

Returns

boolean

Defined in

packages/core/src/http/HttpProxy.ts:311


request

request<B>(method, url, data, options): Promise<HttpAgentResponse<B>>

Executes a HTTP request to the specified URL using the specified HTTP method, carrying the provided data.

Type parameters

Name
B

Parameters

NameTypeDescription
methodstringThe HTTP method to use.
urlstringThe URL to which the request should be made.
dataundefined | UnknownParametersThe data to be send to the server. The data will be included as query parameters if the request method is GET or HEAD, and as a request body for any other request method.
optionsHttpAgentRequestOptionsOptional request options.

Returns

Promise<HttpAgentResponse<B>>

A promise that resolves to the server -response.

Defined in

packages/core/src/http/HttpProxy.ts:109


setDefaultHeader

setDefaultHeader(header, value): HttpProxy

Sets the specified default HTTP header. The header will be sent with all +response.

Defined in

packages/core/src/http/HttpProxy.ts:109


setDefaultHeader

setDefaultHeader(header, value): HttpProxy

Sets the specified default HTTP header. The header will be sent with all subsequent HTTP requests unless reconfigured using this method, overridden by request options, or cleared by -clearDefaultHeaders method.

Parameters

NameTypeDescription
headerstringA header name.
valuestringA header value.

Returns

HttpProxy

this

Defined in

packages/core/src/http/HttpProxy.ts:217

- - +clearDefaultHeaders method.

Parameters

NameTypeDescription
headerstringA header name.
valuestringA header value.

Returns

HttpProxy

this

Defined in

packages/core/src/http/HttpProxy.ts:217

+ + \ No newline at end of file diff --git a/api/classes/ima_core.MapStorage/index.html b/api/classes/ima_core.MapStorage/index.html index 1fd59d8632..dee6cd6e71 100644 --- a/api/classes/ima_core.MapStorage/index.html +++ b/api/classes/ima_core.MapStorage/index.html @@ -4,25 +4,25 @@ Class: MapStorage<V> | IMA.js - - + +
-
Skip to main content

Class: MapStorage<V>

@ima/core.MapStorage

Implementation of the link Storage interface that relies on the -native Map for storage.

Type parameters

Name
V

Hierarchy

Constructors

constructor

new MapStorage<V>()

Type parameters

Name
V

Inherited from

Storage.constructor

Properties

_storage

Private _storage: Map<string, V>

The internal storage of entries.

Defined in

packages/core/src/storage/MapStorage.ts:12

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/storage/MapStorage.ts:14

Methods

clear

clear(): MapStorage<V>

Clears the storage of all entries.

Returns

MapStorage<V>

This storage.

Overrides

Storage.clear

Defined in

packages/core/src/storage/MapStorage.ts:60


delete

delete(key): MapStorage<V>

Deletes the entry identified by the specified key from this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

MapStorage<V>

This storage.

Overrides

Storage.delete

Defined in

packages/core/src/storage/MapStorage.ts:51


get

get(key): undefined | V

Retrieves the value of the entry identified by the specified . The +

Class: MapStorage<V>

@ima/core.MapStorage

Implementation of the link Storage interface that relies on the +native Map for storage.

Type parameters

Name
V

Hierarchy

Constructors

constructor

new MapStorage<V>()

Type parameters

Name
V

Inherited from

Storage.constructor

Properties

_storage

Private _storage: Map<string, V>

The internal storage of entries.

Defined in

packages/core/src/storage/MapStorage.ts:12

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/storage/MapStorage.ts:14

Methods

clear

clear(): MapStorage<V>

Clears the storage of all entries.

Returns

MapStorage<V>

This storage.

Overrides

Storage.clear

Defined in

packages/core/src/storage/MapStorage.ts:60


delete

delete(key): MapStorage<V>

Deletes the entry identified by the specified key from this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

MapStorage<V>

This storage.

Overrides

Storage.delete

Defined in

packages/core/src/storage/MapStorage.ts:51


get

get(key): undefined | V

Retrieves the value of the entry identified by the specified . The method returns undefined if the entry does not exists.

Entries set to the undefined value can be tested for existence -using the link has method.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

undefined | V

The value of the storage entry.

Overrides

Storage.get

Defined in

packages/core/src/storage/MapStorage.ts:35


has

has(key): boolean

Returns true if the entry identified by the specified key exists -in this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

boolean

true if the storage entry exists.

Overrides

Storage.has

Defined in

packages/core/src/storage/MapStorage.ts:28


init

init(): MapStorage<V>

This method is used to finalize the initialization of the storage after +using the link has method.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

undefined | V

The value of the storage entry.

Overrides

Storage.get

Defined in

packages/core/src/storage/MapStorage.ts:35


has

has(key): boolean

Returns true if the entry identified by the specified key exists +in this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

boolean

true if the storage entry exists.

Overrides

Storage.has

Defined in

packages/core/src/storage/MapStorage.ts:28


init

init(): MapStorage<V>

This method is used to finalize the initialization of the storage after the dependencies provided through the constructor have been prepared for use.

This method must be invoked only once and it must be the first method -invoked on this instance.

Returns

MapStorage<V>

This storage.

Overrides

Storage.init

Defined in

packages/core/src/storage/MapStorage.ts:21


keys

keys(): Iterable<string>

Returns an iterator for traversing the keys in this storage. The order +invoked on this instance.

Returns

MapStorage<V>

This storage.

Overrides

Storage.init

Defined in

packages/core/src/storage/MapStorage.ts:21


keys

keys(): Iterable<string>

Returns an iterator for traversing the keys in this storage. The order in which the keys are traversed is undefined.

Returns

Iterable<string>

An iterator for traversing the keys in this storage. The iterator also implements the iterable protocol, returning itself as its own iterator, allowing it to be used in -a for..of loop.

Overrides

Storage.keys

Defined in

packages/core/src/storage/MapStorage.ts:69


set

set(key, value): MapStorage<V>

Sets the storage entry identified by the specified key to the provided -value. The method creates the entry if it does not exist already.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.
valueVThe storage entry value.

Returns

MapStorage<V>

This storage.

Overrides

Storage.set

Defined in

packages/core/src/storage/MapStorage.ts:42


size

size(): number

Returns the number of entries in this storage.

Returns

number

The number of entries in this storage.

Overrides

Storage.size

Defined in

packages/core/src/storage/MapStorage.ts:76

- - +a for..of loop.

Overrides

Storage.keys

Defined in

packages/core/src/storage/MapStorage.ts:69


set

set(key, value): MapStorage<V>

Sets the storage entry identified by the specified key to the provided +value. The method creates the entry if it does not exist already.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.
valueVThe storage entry value.

Returns

MapStorage<V>

This storage.

Overrides

Storage.set

Defined in

packages/core/src/storage/MapStorage.ts:42


size

size(): number

Returns the number of entries in this storage.

Returns

number

The number of entries in this storage.

Overrides

Storage.size

Defined in

packages/core/src/storage/MapStorage.ts:76

+ + \ No newline at end of file diff --git a/api/classes/ima_core.MessageFormatDictionary/index.html b/api/classes/ima_core.MessageFormatDictionary/index.html index 2465421d65..60c5099ae7 100644 --- a/api/classes/ima_core.MessageFormatDictionary/index.html +++ b/api/classes/ima_core.MessageFormatDictionary/index.html @@ -4,26 +4,26 @@ Class: MessageFormatDictionary | IMA.js - - + +
-
Skip to main content

Class: MessageFormatDictionary

@ima/core.MessageFormatDictionary

Implementation of the Dictionary interface that relies on -compiled MessageFormat localization messages for its dictionary.

Hierarchy

Constructors

constructor

new MessageFormatDictionary()

Initializes the dictionary.

Example

dictionary.get('home.hello', {GENDER: 'UNSPECIFIED'});

Overrides

Dictionary.constructor

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:30

Properties

_dictionary

Protected _dictionary: DictionaryData

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:18


_language

Protected _language: string

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:17

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:20

Methods

_getScope

Private _getScope(key): null | LocalizationFunction

Retrieves the localization scope denoted by the provided partial key. +

Class: MessageFormatDictionary

@ima/core.MessageFormatDictionary

Implementation of the Dictionary interface that relies on +compiled MessageFormat localization messages for its dictionary.

Hierarchy

Constructors

constructor

new MessageFormatDictionary()

Initializes the dictionary.

Example

dictionary.get('home.hello', {GENDER: 'UNSPECIFIED'});

Overrides

Dictionary.constructor

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:30

Properties

_dictionary

Protected _dictionary: DictionaryData

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:18


_language

Protected _language: string

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:17

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:20

Methods

_getScope

Private _getScope(key): null | LocalizationFunction

Retrieves the localization scope denoted by the provided partial key. This may be either an object representing a sub-group of location phrase generators, or a single generator if the provided keys denotes a single localization phrase

Parameters

NameTypeDescription
keystringThe key identifying the localization phrase. The key consists of at least two parts separated by dots. The first part denotes the name of the source JSON localization file, while the rest denote a field path within the localization object within the given localization file.

Returns

null | LocalizationFunction

The requested localization scope, or null if the specified -scope does not exist.

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:141


get

get(key, parameters?): string

Retrieves the localization phrase identified by the specified key, +scope does not exist.

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:141


get

get(key, parameters?): string

Retrieves the localization phrase identified by the specified key, evaluates the phrase's placeholder expressions using the provided parameters and returns the result.

Parameters

NameTypeDescription
keystringThe key identifying the localization phrase. The key consists of at least two parts separated by dots. The first part denotes the name of the source JSON localization file, while the rest denote a field path within the localization object within the given localization file.
parameters?ObjectParametersThe map of parameter names to the parameter values to use. Defaults to an empty plain object.

Returns

string

The specified localization phrase with its placeholders -evaluated using the provided parameters.

Overrides

Dictionary.get

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:89


getLanguage

getLanguage(): string

Returns the ISO 639-1 language code of the language this dictionary was +evaluated using the provided parameters.

Overrides

Dictionary.get

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:89


getLanguage

getLanguage(): string

Returns the ISO 639-1 language code of the language this dictionary was initialized with.

Returns

string

The language code representing the language of the -localization phrases in this dictionary.

Overrides

Dictionary.getLanguage

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:69


has

has(key): boolean

Tests whether the specified localization phrase exists in the +localization phrases in this dictionary.

Overrides

Dictionary.getLanguage

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:69


has

has(key): boolean

Tests whether the specified localization phrase exists in the dictionary.

Parameters

NameTypeDescription
keystringThe key identifying the localization phrase. The key consists of at least two parts separated by dots. The first part denotes the name of the source JSON localization file, while the rest denote a field path within the localization object within the given localization file.

Returns

boolean

true if the key exists and denotes a single -localization phrase, otherwise false.

Overrides

Dictionary.has

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:115


init

init(config): void

Initializes this dictionary with the provided language and localization -phrases.

Parameters

NameTypeDescription
configDictionaryConfigThe dictionary configuration.

Returns

void

Overrides

Dictionary.init

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:61

- - +localization phrase, otherwise false.

Overrides

Dictionary.has

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:115


init

init(config): void

Initializes this dictionary with the provided language and localization +phrases.

Parameters

NameTypeDescription
configDictionaryConfigThe dictionary configuration.

Returns

void

Overrides

Dictionary.init

Defined in

packages/core/src/dictionary/MessageFormatDictionary.ts:61

+ + \ No newline at end of file diff --git a/api/classes/ima_core.MetaManager/index.html b/api/classes/ima_core.MetaManager/index.html index eea130b481..8a37ea896f 100644 --- a/api/classes/ima_core.MetaManager/index.html +++ b/api/classes/ima_core.MetaManager/index.html @@ -4,35 +4,35 @@ Class: MetaManager | IMA.js - - + +
-
Skip to main content

Class: MetaManager

@ima/core.MetaManager

The Meta manager is a utility for managing various page attributes related +

Class: MetaManager

@ima/core.MetaManager

The Meta manager is a utility for managing various page attributes related to the SEO (search engine optimization) and social network integration.

The Meta manager is used to manage the following:

  • page title, set using the contents of the &lt;title&gt; element
  • page links, linking related documents and meta-information, added to the using &lt;link&gt; elements
  • page meta information:
    • the generic named meta information added to the page via &lt;meta&gt;} elements with the nameattribute, for example thekeywords`.
    • specialized meta information added to the page via &lt;meta&gt; elements with the property attribute, for example the OG meta -tags (og:type, og:image, etc.).

Hierarchy

Constructors

constructor

new MetaManager()

Methods

clearMetaAttributes

clearMetaAttributes(): void

Resets the stored meta names, properties and links.

Returns

void

Defined in

packages/core/src/meta/MetaManager.ts:195


getLink(relation): MetaManagerRecord<"href">

Return the reference to the specified related linked document. The +tags (og:type, og:image, etc.).

Hierarchy

Constructors

constructor

new MetaManager()

Methods

clearMetaAttributes

clearMetaAttributes(): void

Resets the stored meta names, properties and links.

Returns

void

Defined in

packages/core/src/meta/MetaManager.ts:195


getLink(relation): MetaManagerRecord<"href">

Return the reference to the specified related linked document. The method returns an empty string for missing meta information (to make the returned value React-friendly).

Parameters

NameTypeDescription
relationstringThe relation of the link target to the current page.

Returns

MetaManagerRecord<"href">

The reference to the location of the related document, -e.g. a URL.

Defined in

packages/core/src/meta/MetaManager.ts:169


getLinks(): string[]

Returns the relations of the currently set related documents linked to -the current page.

Returns

string[]

Defined in

packages/core/src/meta/MetaManager.ts:177


getLinksIterator

getLinksIterator(): never[] | IterableIterator<[string, MetaManagerRecord<"href">]>

Return [key, value] pairs of currently set links.

Returns

never[] | IterableIterator<[string, MetaManagerRecord<"href">]>

[key, value] pairs of currently set links.

Defined in

packages/core/src/meta/MetaManager.ts:186


getMetaName

getMetaName(name): MetaManagerRecord<"content">

Returns the value of the specified named meta information property. The +e.g. a URL.

Defined in

packages/core/src/meta/MetaManager.ts:169


getLinks(): string[]

Returns the relations of the currently set related documents linked to +the current page.

Returns

string[]

Defined in

packages/core/src/meta/MetaManager.ts:177


getLinksIterator

getLinksIterator(): never[] | IterableIterator<[string, MetaManagerRecord<"href">]>

Return [key, value] pairs of currently set links.

Returns

never[] | IterableIterator<[string, MetaManagerRecord<"href">]>

[key, value] pairs of currently set links.

Defined in

packages/core/src/meta/MetaManager.ts:186


getMetaName

getMetaName(name): MetaManagerRecord<"content">

Returns the value of the specified named meta information property. The method returns an empty string for missing meta information (to make the -returned value React-friendly).

Parameters

NameTypeDescription
namestringThe name of the named meta information property.

Returns

MetaManagerRecord<"content">

The value of the generic meta information, or an empty string.

Defined in

packages/core/src/meta/MetaManager.ts:69


getMetaNames

getMetaNames(): string[]

Returns the names of the currently specified named meta information +returned value React-friendly).

Parameters

NameTypeDescription
namestringThe name of the named meta information property.

Returns

MetaManagerRecord<"content">

The value of the generic meta information, or an empty string.

Defined in

packages/core/src/meta/MetaManager.ts:69


getMetaNames

getMetaNames(): string[]

Returns the names of the currently specified named meta information properties.

Returns

string[]

The names of the currently specified named meta -information properties.

Defined in

packages/core/src/meta/MetaManager.ts:80


getMetaNamesIterator

getMetaNamesIterator(): never[] | IterableIterator<[string, MetaManagerRecord<"content">]>

Return [key, value] pairs of named meta information.

Returns

never[] | IterableIterator<[string, MetaManagerRecord<"content">]>

[key, value] pairs of named meta information.

Defined in

packages/core/src/meta/MetaManager.ts:89


getMetaProperties

getMetaProperties(): string[]

Returns the names of the currently specified specialized meta +information properties.

Defined in

packages/core/src/meta/MetaManager.ts:80


getMetaNamesIterator

getMetaNamesIterator(): never[] | IterableIterator<[string, MetaManagerRecord<"content">]>

Return [key, value] pairs of named meta information.

Returns

never[] | IterableIterator<[string, MetaManagerRecord<"content">]>

[key, value] pairs of named meta information.

Defined in

packages/core/src/meta/MetaManager.ts:89


getMetaProperties

getMetaProperties(): string[]

Returns the names of the currently specified specialized meta information properties.

Returns

string[]

The names of the currently specified specialized meta -information properties.

Defined in

packages/core/src/meta/MetaManager.ts:131


getMetaPropertiesIterator

getMetaPropertiesIterator(): never[] | IterableIterator<[string, MetaManagerRecord<"content">]>

Return [key, value] pairs of meta information properties.

Returns

never[] | IterableIterator<[string, MetaManagerRecord<"content">]>

[key, value] pairs of meta information properties.

Defined in

packages/core/src/meta/MetaManager.ts:140


getMetaProperty

getMetaProperty(property): MetaManagerRecord<"content">

Returns the value of the specified specialized meta information +information properties.

Defined in

packages/core/src/meta/MetaManager.ts:131


getMetaPropertiesIterator

getMetaPropertiesIterator(): never[] | IterableIterator<[string, MetaManagerRecord<"content">]>

Return [key, value] pairs of meta information properties.

Returns

never[] | IterableIterator<[string, MetaManagerRecord<"content">]>

[key, value] pairs of meta information properties.

Defined in

packages/core/src/meta/MetaManager.ts:140


getMetaProperty

getMetaProperty(property): MetaManagerRecord<"content">

Returns the value of the specified specialized meta information property. The method returns an empty string for missing meta information (to make the returned value React-friendly).

Parameters

NameType
propertystring

Returns

MetaManagerRecord<"content">

The value of the specified meta information, or an -empty string.

Defined in

packages/core/src/meta/MetaManager.ts:120


getTitle

getTitle(): string

Returns the page title. The method returns an empty string if no page +empty string.

Defined in

packages/core/src/meta/MetaManager.ts:120


getTitle

getTitle(): string

Returns the page title. The method returns an empty string if no page title has been set yet.

Note that the page title is cached internally by the meta manager and may therefore differ from the current document title if it has been -modified by a 3rd party code.

Returns

string

The current page title.

Defined in

packages/core/src/meta/MetaManager.ts:45


setLink(relation, href, attr?): MetaManager

Sets the specified specialized link information.

Parameters

NameTypeDescription
relationstringThe relation of the link target to the current page.
hrefMetaValueThe reference to the location of the related document, e.g. a URL.
attr?MetaAttributes-

Returns

MetaManager

Parram

attr Additional optional link attributes.

Defined in

packages/core/src/meta/MetaManager.ts:155


setMetaName

setMetaName(name, content, attr?): MetaManager

Set the specified named meta information property.

Parameters

NameTypeDescription
namestringMeta information property name, for example keywords.
contentMetaValueThe meta information content.
attr?MetaAttributes-

Returns

MetaManager

Parram

attr Additional optional meta attributes.

Defined in

packages/core/src/meta/MetaManager.ts:57


setMetaProperty

setMetaProperty(property, content, attr?): MetaManager

Sets the specified specialized meta information property.

Parameters

NameTypeDescription
propertystringThe value of the meta information property.
contentMetaValue-
attr?MetaAttributes-

Returns

MetaManager

Parram

attr Additional optional meta attributes.

Defined in

packages/core/src/meta/MetaManager.ts:102


setTitle

setTitle(title): MetaManager

Sets the page title.

Parameters

NameTypeDescription
titlestringThe new page title.

Returns

MetaManager

Defined in

packages/core/src/meta/MetaManager.ts:31

- - +modified by a 3rd party code.

Returns

string

The current page title.

Defined in

packages/core/src/meta/MetaManager.ts:45


setLink(relation, href, attr?): MetaManager

Sets the specified specialized link information.

Parameters

NameTypeDescription
relationstringThe relation of the link target to the current page.
hrefMetaValueThe reference to the location of the related document, e.g. a URL.
attr?MetaAttributes-

Returns

MetaManager

Parram

attr Additional optional link attributes.

Defined in

packages/core/src/meta/MetaManager.ts:155


setMetaName

setMetaName(name, content, attr?): MetaManager

Set the specified named meta information property.

Parameters

NameTypeDescription
namestringMeta information property name, for example keywords.
contentMetaValueThe meta information content.
attr?MetaAttributes-

Returns

MetaManager

Parram

attr Additional optional meta attributes.

Defined in

packages/core/src/meta/MetaManager.ts:57


setMetaProperty

setMetaProperty(property, content, attr?): MetaManager

Sets the specified specialized meta information property.

Parameters

NameTypeDescription
propertystringThe value of the meta information property.
contentMetaValue-
attr?MetaAttributes-

Returns

MetaManager

Parram

attr Additional optional meta attributes.

Defined in

packages/core/src/meta/MetaManager.ts:102


setTitle

setTitle(title): MetaManager

Sets the page title.

Parameters

NameTypeDescription
titlestringThe new page title.

Returns

MetaManager

Defined in

packages/core/src/meta/MetaManager.ts:31

+ + \ No newline at end of file diff --git a/api/classes/ima_core.MetaManagerImpl/index.html b/api/classes/ima_core.MetaManagerImpl/index.html index 41bed1923c..1ce8bf18f5 100644 --- a/api/classes/ima_core.MetaManagerImpl/index.html +++ b/api/classes/ima_core.MetaManagerImpl/index.html @@ -4,29 +4,29 @@ Class: MetaManagerImpl | IMA.js - - + +
-
Skip to main content

Class: MetaManagerImpl

@ima/core.MetaManagerImpl

Default implementation of the MetaManager interface.

Hierarchy

Constructors

constructor

new MetaManagerImpl()

Initializes the meta page attributes manager.

Overrides

MetaManager.constructor

Defined in

packages/core/src/meta/MetaManagerImpl.ts:24

Properties

Protected _link: Map<string, MetaManagerRecord<"href">>

Defined in

packages/core/src/meta/MetaManagerImpl.ts:15


_metaName

Protected _metaName: Map<string, MetaManagerRecord<"content">>

Defined in

packages/core/src/meta/MetaManagerImpl.ts:13


_metaProperty

Protected _metaProperty: Map<string, MetaManagerRecord<"content">>

Defined in

packages/core/src/meta/MetaManagerImpl.ts:14


_title

Protected _title: string

Defined in

packages/core/src/meta/MetaManagerImpl.ts:12

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/meta/MetaManagerImpl.ts:17

Methods

clearMetaAttributes

clearMetaAttributes(): void

Resets the stored meta names, properties and links.

Returns

void

Overrides

MetaManager.clearMetaAttributes

Defined in

packages/core/src/meta/MetaManagerImpl.ts:166


getLink(relation): MetaManagerRecord<"href">

Return the reference to the specified related linked document. The +

Class: MetaManagerImpl

@ima/core.MetaManagerImpl

Default implementation of the MetaManager interface.

Hierarchy

Constructors

constructor

new MetaManagerImpl()

Initializes the meta page attributes manager.

Overrides

MetaManager.constructor

Defined in

packages/core/src/meta/MetaManagerImpl.ts:24

Properties

Protected _link: Map<string, MetaManagerRecord<"href">>

Defined in

packages/core/src/meta/MetaManagerImpl.ts:15


_metaName

Protected _metaName: Map<string, MetaManagerRecord<"content">>

Defined in

packages/core/src/meta/MetaManagerImpl.ts:13


_metaProperty

Protected _metaProperty: Map<string, MetaManagerRecord<"content">>

Defined in

packages/core/src/meta/MetaManagerImpl.ts:14


_title

Protected _title: string

Defined in

packages/core/src/meta/MetaManagerImpl.ts:12

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/meta/MetaManagerImpl.ts:17

Methods

clearMetaAttributes

clearMetaAttributes(): void

Resets the stored meta names, properties and links.

Returns

void

Overrides

MetaManager.clearMetaAttributes

Defined in

packages/core/src/meta/MetaManagerImpl.ts:166


getLink(relation): MetaManagerRecord<"href">

Return the reference to the specified related linked document. The method returns an empty string for missing meta information (to make the returned value React-friendly).

Parameters

NameTypeDescription
relationstringThe relation of the link target to the current page.

Returns

MetaManagerRecord<"href">

The reference to the location of the related document, -e.g. a URL.

Overrides

MetaManager.getLink

Defined in

packages/core/src/meta/MetaManagerImpl.ts:145


getLinks(): string[]

Returns the relations of the currently set related documents linked to -the current page.

Returns

string[]

Overrides

MetaManager.getLinks

Defined in

packages/core/src/meta/MetaManagerImpl.ts:152


getLinksIterator

getLinksIterator(): IterableIterator<[string, MetaManagerRecord<"href">]>

Return [key, value] pairs of currently set links.

Returns

IterableIterator<[string, MetaManagerRecord<"href">]>

[key, value] pairs of currently set links.

Overrides

MetaManager.getLinksIterator

Defined in

packages/core/src/meta/MetaManagerImpl.ts:159


getMetaName

getMetaName(name): MetaManagerRecord<"content">

Returns the value of the specified named meta information property. The +e.g. a URL.

Overrides

MetaManager.getLink

Defined in

packages/core/src/meta/MetaManagerImpl.ts:145


getLinks(): string[]

Returns the relations of the currently set related documents linked to +the current page.

Returns

string[]

Overrides

MetaManager.getLinks

Defined in

packages/core/src/meta/MetaManagerImpl.ts:152


getLinksIterator

getLinksIterator(): IterableIterator<[string, MetaManagerRecord<"href">]>

Return [key, value] pairs of currently set links.

Returns

IterableIterator<[string, MetaManagerRecord<"href">]>

[key, value] pairs of currently set links.

Overrides

MetaManager.getLinksIterator

Defined in

packages/core/src/meta/MetaManagerImpl.ts:159


getMetaName

getMetaName(name): MetaManagerRecord<"content">

Returns the value of the specified named meta information property. The method returns an empty string for missing meta information (to make the -returned value React-friendly).

Parameters

NameTypeDescription
namestringThe name of the named meta information property.

Returns

MetaManagerRecord<"content">

The value of the generic meta information, or an empty string.

Overrides

MetaManager.getMetaName

Defined in

packages/core/src/meta/MetaManagerImpl.ts:76


getMetaNames

getMetaNames(): string[]

Returns the names of the currently specified named meta information +returned value React-friendly).

Parameters

NameTypeDescription
namestringThe name of the named meta information property.

Returns

MetaManagerRecord<"content">

The value of the generic meta information, or an empty string.

Overrides

MetaManager.getMetaName

Defined in

packages/core/src/meta/MetaManagerImpl.ts:76


getMetaNames

getMetaNames(): string[]

Returns the names of the currently specified named meta information properties.

Returns

string[]

The names of the currently specified named meta -information properties.

Overrides

MetaManager.getMetaNames

Defined in

packages/core/src/meta/MetaManagerImpl.ts:83


getMetaNamesIterator

getMetaNamesIterator(): IterableIterator<[string, MetaManagerRecord<"content">]>

Return [key, value] pairs of named meta information.

Returns

IterableIterator<[string, MetaManagerRecord<"content">]>

[key, value] pairs of named meta information.

Overrides

MetaManager.getMetaNamesIterator

Defined in

packages/core/src/meta/MetaManagerImpl.ts:90


getMetaProperties

getMetaProperties(): string[]

Returns the names of the currently specified specialized meta +information properties.

Overrides

MetaManager.getMetaNames

Defined in

packages/core/src/meta/MetaManagerImpl.ts:83


getMetaNamesIterator

getMetaNamesIterator(): IterableIterator<[string, MetaManagerRecord<"content">]>

Return [key, value] pairs of named meta information.

Returns

IterableIterator<[string, MetaManagerRecord<"content">]>

[key, value] pairs of named meta information.

Overrides

MetaManager.getMetaNamesIterator

Defined in

packages/core/src/meta/MetaManagerImpl.ts:90


getMetaProperties

getMetaProperties(): string[]

Returns the names of the currently specified specialized meta information properties.

Returns

string[]

The names of the currently specified specialized meta -information properties.

Overrides

MetaManager.getMetaProperties

Defined in

packages/core/src/meta/MetaManagerImpl.ts:120


getMetaPropertiesIterator

getMetaPropertiesIterator(): IterableIterator<[string, MetaManagerRecord<"content">]>

Return [key, value] pairs of meta information properties.

Returns

IterableIterator<[string, MetaManagerRecord<"content">]>

[key, value] pairs of meta information properties.

Overrides

MetaManager.getMetaPropertiesIterator

Defined in

packages/core/src/meta/MetaManagerImpl.ts:127


getMetaProperty

getMetaProperty(property): MetaManagerRecord<"content">

Returns the value of the specified specialized meta information +information properties.

Overrides

MetaManager.getMetaProperties

Defined in

packages/core/src/meta/MetaManagerImpl.ts:120


getMetaPropertiesIterator

getMetaPropertiesIterator(): IterableIterator<[string, MetaManagerRecord<"content">]>

Return [key, value] pairs of meta information properties.

Returns

IterableIterator<[string, MetaManagerRecord<"content">]>

[key, value] pairs of meta information properties.

Overrides

MetaManager.getMetaPropertiesIterator

Defined in

packages/core/src/meta/MetaManagerImpl.ts:127


getMetaProperty

getMetaProperty(property): MetaManagerRecord<"content">

Returns the value of the specified specialized meta information property. The method returns an empty string for missing meta information (to make the returned value React-friendly).

Parameters

NameType
propertystring

Returns

MetaManagerRecord<"content">

The value of the specified meta information, or an -empty string.

Overrides

MetaManager.getMetaProperty

Defined in

packages/core/src/meta/MetaManagerImpl.ts:112


getTitle

getTitle(): string

Returns the page title. The method returns an empty string if no page +empty string.

Overrides

MetaManager.getMetaProperty

Defined in

packages/core/src/meta/MetaManagerImpl.ts:112


getTitle

getTitle(): string

Returns the page title. The method returns an empty string if no page title has been set yet.

Note that the page title is cached internally by the meta manager and may therefore differ from the current document title if it has been -modified by a 3rd party code.

Returns

string

The current page title.

Overrides

MetaManager.getTitle

Defined in

packages/core/src/meta/MetaManagerImpl.ts:60


setLink(relation, href, attr?): MetaManagerImpl

Sets the specified specialized link information.

Parameters

NameTypeDescription
relationstringThe relation of the link target to the current page.
hrefMetaValueThe reference to the location of the related document, e.g. a URL.
attr?MetaAttributes-

Returns

MetaManagerImpl

Parram

attr Additional optional link attributes.

Overrides

MetaManager.setLink

Defined in

packages/core/src/meta/MetaManagerImpl.ts:136


setMetaName

setMetaName(name, content, attr?): MetaManagerImpl

Set the specified named meta information property.

Parameters

NameTypeDescription
namestringMeta information property name, for example keywords.
contentMetaValueThe meta information content.
attr?MetaAttributes-

Returns

MetaManagerImpl

Parram

attr Additional optional meta attributes.

Overrides

MetaManager.setMetaName

Defined in

packages/core/src/meta/MetaManagerImpl.ts:67


setMetaProperty

setMetaProperty(property, content, attr?): MetaManagerImpl

Sets the specified specialized meta information property.

Parameters

NameTypeDescription
propertystringThe value of the meta information property.
contentMetaValue-
attr?MetaAttributes-

Returns

MetaManagerImpl

Parram

attr Additional optional meta attributes.

Overrides

MetaManager.setMetaProperty

Defined in

packages/core/src/meta/MetaManagerImpl.ts:99


setTitle

setTitle(title): MetaManagerImpl

Sets the page title.

Parameters

NameTypeDescription
titlestringThe new page title.

Returns

MetaManagerImpl

Overrides

MetaManager.setTitle

Defined in

packages/core/src/meta/MetaManagerImpl.ts:51

- - +modified by a 3rd party code.

Returns

string

The current page title.

Overrides

MetaManager.getTitle

Defined in

packages/core/src/meta/MetaManagerImpl.ts:60


setLink(relation, href, attr?): MetaManagerImpl

Sets the specified specialized link information.

Parameters

NameTypeDescription
relationstringThe relation of the link target to the current page.
hrefMetaValueThe reference to the location of the related document, e.g. a URL.
attr?MetaAttributes-

Returns

MetaManagerImpl

Parram

attr Additional optional link attributes.

Overrides

MetaManager.setLink

Defined in

packages/core/src/meta/MetaManagerImpl.ts:136


setMetaName

setMetaName(name, content, attr?): MetaManagerImpl

Set the specified named meta information property.

Parameters

NameTypeDescription
namestringMeta information property name, for example keywords.
contentMetaValueThe meta information content.
attr?MetaAttributes-

Returns

MetaManagerImpl

Parram

attr Additional optional meta attributes.

Overrides

MetaManager.setMetaName

Defined in

packages/core/src/meta/MetaManagerImpl.ts:67


setMetaProperty

setMetaProperty(property, content, attr?): MetaManagerImpl

Sets the specified specialized meta information property.

Parameters

NameTypeDescription
propertystringThe value of the meta information property.
contentMetaValue-
attr?MetaAttributes-

Returns

MetaManagerImpl

Parram

attr Additional optional meta attributes.

Overrides

MetaManager.setMetaProperty

Defined in

packages/core/src/meta/MetaManagerImpl.ts:99


setTitle

setTitle(title): MetaManagerImpl

Sets the page title.

Parameters

NameTypeDescription
titlestringThe new page title.

Returns

MetaManagerImpl

Overrides

MetaManager.setTitle

Defined in

packages/core/src/meta/MetaManagerImpl.ts:51

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Namespace/index.html b/api/classes/ima_core.Namespace/index.html index 363d330bb8..37db2e4c8b 100644 --- a/api/classes/ima_core.Namespace/index.html +++ b/api/classes/ima_core.Namespace/index.html @@ -4,23 +4,23 @@ Class: Namespace | IMA.js - - + +
-
Skip to main content

Class: Namespace

@ima/core.Namespace

Namespace creation, manipulation and traversal utility. This utility is used +

Class: Namespace

@ima/core.Namespace

Namespace creation, manipulation and traversal utility. This utility is used to create semi-global shared namespaces for registering references to interfaces, classes and constants of the application to provide access to -each other more easily than by using the ES6 import/export mechanism.

Indexable

[key: PropertyKey]: any

Constructors

constructor

new Namespace()

Methods

#resolvePathLevels

Private #resolvePathLevels(path): string[]

Resolve path levels from string

Parameters

NameTypeDescription
pathstringThe namespace path.

Returns

string[]

Defined in

packages/core/src/Namespace.ts:114


get

get<V>(path): undefined | V

Return value for the specified namespace path point or undefined if path is not type of string

Type parameters

NameType
Vany

Parameters

NameTypeDescription
pathstringThe namespace path to get.

Returns

undefined | V

The value at the specified path in the namespace or undefined for any non-string path

Defined in

packages/core/src/Namespace.ts:77


has

has(path): boolean

Verifies that the specified namespace path point to an existing +each other more easily than by using the ES6 import/export mechanism.

Indexable

[key: PropertyKey]: any

Constructors

constructor

new Namespace()

Methods

#resolvePathLevels

Private #resolvePathLevels(path): string[]

Resolve path levels from string

Parameters

NameTypeDescription
pathstringThe namespace path.

Returns

string[]

Defined in

packages/core/src/Namespace.ts:114


get

get<V>(path): undefined | V

Return value for the specified namespace path point or undefined if path is not type of string

Type parameters

NameType
Vany

Parameters

NameTypeDescription
pathstringThe namespace path to get.

Returns

undefined | V

The value at the specified path in the namespace or undefined for any non-string path

Defined in

packages/core/src/Namespace.ts:77


has

has(path): boolean

Verifies that the specified namespace path point to an existing namespace or terminal value.

Parameters

NameTypeDescription
pathstringThe namespace path to test.

Returns

boolean

true if the namespace or terminal value exists -at the specified path.

Defined in

packages/core/src/Namespace.ts:60


namespace

namespace<V>(path): V

Verifies that the specified path in namespace exists, creates it if it +at the specified path.

Defined in

packages/core/src/Namespace.ts:60


namespace

namespace<V>(path): V

Verifies that the specified path in namespace exists, creates it if it does not, and returns the value at the specified path in the namespace.

The method recursively creates all path parts in the namespaces as empty plain objects for all path parts that do not exist yet, including the last one. This means, that if called with a non-existing namespace path as an argument, the return value will be the last created namespace -object.

Type parameters

NameType
Vany

Parameters

NameTypeDescription
pathstringThe namespace path.

Returns

V

The value at the specified path in the namespace.

Defined in

packages/core/src/Namespace.ts:36


set

set<V>(path, value): void

Set value for the specified namespace path point.

Type parameters

Name
V

Parameters

NameTypeDescription
pathstringThe namespace path to set.
valueV-

Returns

void

Defined in

packages/core/src/Namespace.ts:99

- - +object.

Type parameters

NameType
Vany

Parameters

NameTypeDescription
pathstringThe namespace path.

Returns

V

The value at the specified path in the namespace.

Defined in

packages/core/src/Namespace.ts:36


set

set<V>(path, value): void

Set value for the specified namespace path point.

Type parameters

Name
V

Parameters

NameTypeDescription
pathstringThe namespace path to set.
valueV-

Returns

void

Defined in

packages/core/src/Namespace.ts:99

+ + \ No newline at end of file diff --git a/api/classes/ima_core.ObjectContainer/index.html b/api/classes/ima_core.ObjectContainer/index.html index 7288dfada8..8bef6d4645 100644 --- a/api/classes/ima_core.ObjectContainer/index.html +++ b/api/classes/ima_core.ObjectContainer/index.html @@ -4,22 +4,22 @@ Class: ObjectContainer | IMA.js - - + +
-
Skip to main content

Class: ObjectContainer

@ima/core.ObjectContainer

The Object Container is an enhanced dependency injector with support for +

Class: ObjectContainer

@ima/core.ObjectContainer

The Object Container is an enhanced dependency injector with support for aliases and constants, and allowing to reference classes in the application -namespace by specifying their fully qualified names.

Constructors

constructor

new ObjectContainer(namespace)

Initializes the object container.

Parameters

NameTypeDescription
namespaceNamespaceThe namespace container, used to access classes and values using their fully qualified names.

Defined in

packages/core/src/oc/ObjectContainer.ts:90

Properties

_bindingPlugin

Private Optional _bindingPlugin: string

The current plugin binding to OC.

The () method may be called for changing -object container binding state only by the bootstrap script.

Defined in

packages/core/src/oc/ObjectContainer.ts:75


_bindingState

Private Optional _bindingState: BindingState

The current binding state.

The () method may be called for changing -object container binding state only by the bootstrap script.

Defined in

packages/core/src/oc/ObjectContainer.ts:67


_entries

Private _entries: Map<Dependency<any>, Entry<any>>

Defined in

packages/core/src/oc/ObjectContainer.ts:76


_namespace

Private _namespace: Namespace

The namespace container, used to access classes and values using -their fully qualified names.

Defined in

packages/core/src/oc/ObjectContainer.ts:82

Methods

#getDebugName

Private #getDebugName(name): string

Formats name, function, class constructor to more compact -name/message to allow for cleaner debug Error messages.

Parameters

NameType
nameany

Returns

string

Defined in

packages/core/src/oc/ObjectContainer.ts:874


_createEntry

_createEntry<T>(classConstructor, dependencies?, options?): Entry<T>

Creates a new entry for the provided class or factory function, the -provided dependencies and entry options.

Type parameters

Name
T

Parameters

NameTypeDescription
classConstructorEntryConstructor<T>The class constructor or factory function.
dependencies?any[]The dependencies to pass into the constructor or factory function.
options?EntryOptions-

Returns

Entry<T>

Created instance or generated value.

Defined in

packages/core/src/oc/ObjectContainer.ts:647


_createInstanceFromEntry

_createInstanceFromEntry<T, E>(entry, dependencies?): T

Creates a new instance of the class or retrieves the value generated by +namespace by specifying their fully qualified names.

Constructors

constructor

new ObjectContainer(namespace)

Initializes the object container.

Parameters

NameTypeDescription
namespaceNamespaceThe namespace container, used to access classes and values using their fully qualified names.

Defined in

packages/core/src/oc/ObjectContainer.ts:90

Properties

_bindingPlugin

Private Optional _bindingPlugin: string

The current plugin binding to OC.

The () method may be called for changing +object container binding state only by the bootstrap script.

Defined in

packages/core/src/oc/ObjectContainer.ts:75


_bindingState

Private Optional _bindingState: BindingState

The current binding state.

The () method may be called for changing +object container binding state only by the bootstrap script.

Defined in

packages/core/src/oc/ObjectContainer.ts:67


_entries

Private _entries: Map<Dependency<any>, Entry<any>>

Defined in

packages/core/src/oc/ObjectContainer.ts:76


_namespace

Private _namespace: Namespace

The namespace container, used to access classes and values using +their fully qualified names.

Defined in

packages/core/src/oc/ObjectContainer.ts:82

Methods

#getDebugName

Private #getDebugName(name): string

Formats name, function, class constructor to more compact +name/message to allow for cleaner debug Error messages.

Parameters

NameType
nameany

Returns

string

Defined in

packages/core/src/oc/ObjectContainer.ts:874


_createEntry

_createEntry<T>(classConstructor, dependencies?, options?): Entry<T>

Creates a new entry for the provided class or factory function, the +provided dependencies and entry options.

Type parameters

Name
T

Parameters

NameTypeDescription
classConstructorEntryConstructor<T>The class constructor or factory function.
dependencies?any[]The dependencies to pass into the constructor or factory function.
options?EntryOptions-

Returns

Entry<T>

Created instance or generated value.

Defined in

packages/core/src/oc/ObjectContainer.ts:647


_createInstanceFromEntry

_createInstanceFromEntry<T, E>(entry, dependencies?): T

Creates a new instance of the class or retrieves the value generated by the factory function represented by the provided entry, passing in the provided dependencies.

The method uses the dependencies specified by the entry if no custom -dependencies are provided.

Type parameters

NameType
TT
Eextends Entry<T>

Parameters

NameTypeDefault valueDescription
entryEundefinedThe entry representing the class that should have its instance created or factory faction to use to create a value.
dependenciesany[][]The dependencies to pass into the constructor or factory function.

Returns

T

Created instance or generated value.

Defined in

packages/core/src/oc/ObjectContainer.ts:686


_getEntry

_getEntry<T>(name): null | Entry<T>

Retrieves the entry for the specified constant, alias, class or factory +dependencies are provided.

Type parameters

NameType
TT
Eextends Entry<T>

Parameters

NameTypeDefault valueDescription
entryEundefinedThe entry representing the class that should have its instance created or factory faction to use to create a value.
dependenciesany[][]The dependencies to pass into the constructor or factory function.

Returns

T

Created instance or generated value.

Defined in

packages/core/src/oc/ObjectContainer.ts:686


_getEntry

_getEntry<T>(name): null | Entry<T>

Retrieves the entry for the specified constant, alias, class or factory function, interface, or fully qualified namespace path (the method checks these in this order in case of a name clash).

The method retrieves an existing entry even if a qualified namespace path is provided (if the target class or interface has been configured @@ -27,19 +27,19 @@ registry, interface implementation is known to this object container and the provided identifier is not a valid namespace path specifying an existing class, interface or value.

Type parameters

Name
T

Parameters

NameTypeDescription
nameDependency<T>Name of a constant or alias, factory function, class or interface constructor, or a fully qualified namespace path.

Returns

null | Entry<T>

The retrieved entry.

Throws

If no such constant, alias, registry, interface -implementation is known to this object container.

Defined in

packages/core/src/oc/ObjectContainer.ts:535


_getEntryFromClassConstructor

_getEntryFromClassConstructor<T>(classConstructor): null | Entry<T>

Retrieves the class denoted by the provided class constructor.

The method then checks whether there are defined $dependencies +implementation is known to this object container.

Defined in

packages/core/src/oc/ObjectContainer.ts:535


_getEntryFromClassConstructor

_getEntryFromClassConstructor<T>(classConstructor): null | Entry<T>

Retrieves the class denoted by the provided class constructor.

The method then checks whether there are defined $dependencies property for class. Then the class is registered to this object container.

The method returns the entry for the class if the specified class does not have defined $dependencies property return null.

Type parameters

Name
T

Parameters

NameType
classConstructorOCInjectable<T>

Returns

null | Entry<T>

An entry representing the value at the specified classConstructor. The method returns null if the specified classConstructor does not have defined -$dependencies.

Defined in

packages/core/src/oc/ObjectContainer.ts:841


_getEntryFromConstant

_getEntryFromConstant<T>(compositionName): null | Entry<() => T>

Retrieves the constant value denoted by the provided fully qualified +$dependencies.

Defined in

packages/core/src/oc/ObjectContainer.ts:841


_getEntryFromConstant

_getEntryFromConstant<T>(compositionName): null | Entry<() => T>

Retrieves the constant value denoted by the provided fully qualified composition name.

The method returns the entry for the constant if the constant is registered with this object container, otherwise return null.

Finally, if the constant composition name does not resolve to value, the method return null.

Type parameters

Name
T

Parameters

NameType
compositionNamestring

Returns

null | Entry<() => T>

An entry representing the value at the specified composition name in the constants. The method returns null -if the specified composition name does not exist in the constants.

Defined in

packages/core/src/oc/ObjectContainer.ts:747


_getEntryFromNamespace

_getEntryFromNamespace<T>(path): null | Entry<T>

Retrieves the class denoted by the provided fully qualified name within +if the specified composition name does not exist in the constants.

Defined in

packages/core/src/oc/ObjectContainer.ts:747


_getEntryFromNamespace

_getEntryFromNamespace<T>(path): null | Entry<T>

Retrieves the class denoted by the provided fully qualified name within the application namespace.

The method then checks whether there are dependencies configured for the class, no matter whether the class is an implementation class or an "interface" class.

The method returns the entry for the class if the class is registered @@ -49,35 +49,35 @@ namespace path.

Alternatively, if a constructor function is passed in instead of a namespace path, the method returns null.

Type parameters

Name
T

Parameters

NameTypeDescription
pathstringNamespace path pointing to a class or a value in the application namespace, or a constructor function.

Returns

null | Entry<T>

An entry representing the value or class at the specified path in the namespace. The method returns null -if the specified path does not exist in the namespace.

Defined in

packages/core/src/oc/ObjectContainer.ts:803


_isOptional

_isOptional<T>(name): boolean

Checks whether the name is marked as optional.

Type parameters

Name
T

Parameters

NameTypeDescription
nameDependency<T>Name of a constant or alias, factory function, class or interface constructor, or a fully qualified namespace path.

Returns

boolean

Defined in

packages/core/src/oc/ObjectContainer.ts:593


_isSpread

_isSpread<T>(name): boolean

Checks whether the name is marked as spread.

Type parameters

Name
T

Parameters

NameTypeDescription
nameDependency<T>Name of a constant or alias, factory function, class or interface constructor, or a fully qualified namespace path.

Returns

boolean

Defined in

packages/core/src/oc/ObjectContainer.ts:607


_updateEntryValues

_updateEntryValues<T, E>(entry, classConstructor, dependencies): void

The method update classConstructor and dependencies for defined entry. +if the specified path does not exist in the namespace.

Defined in

packages/core/src/oc/ObjectContainer.ts:803


_isOptional

_isOptional<T>(name): boolean

Checks whether the name is marked as optional.

Type parameters

Name
T

Parameters

NameTypeDescription
nameDependency<T>Name of a constant or alias, factory function, class or interface constructor, or a fully qualified namespace path.

Returns

boolean

Defined in

packages/core/src/oc/ObjectContainer.ts:593


_isSpread

_isSpread<T>(name): boolean

Checks whether the name is marked as spread.

Type parameters

Name
T

Parameters

NameTypeDescription
nameDependency<T>Name of a constant or alias, factory function, class or interface constructor, or a fully qualified namespace path.

Returns

boolean

Defined in

packages/core/src/oc/ObjectContainer.ts:607


_updateEntryValues

_updateEntryValues<T, E>(entry, classConstructor, dependencies): void

The method update classConstructor and dependencies for defined entry. The entry throw Error for constants and if you try override dependencies -more than once.

Type parameters

NameType
TT
Eextends Entry<T>

Parameters

NameTypeDescription
entryEThe entry representing the class that should have its instance created or factory faction to use to create a value.
classConstructorOCInjectable<T>The class constructor or factory function.
dependenciesany[]The dependencies to pass into the constructor or factory function.

Returns

void

Defined in

packages/core/src/oc/ObjectContainer.ts:626


bind

bind<T, C>(name, classConstructor, dependencies?): ObjectContainer

Binds the specified class or factory function and dependencies to the +more than once.

Type parameters

NameType
TT
Eextends Entry<T>

Parameters

NameTypeDescription
entryEThe entry representing the class that should have its instance created or factory faction to use to create a value.
classConstructorOCInjectable<T>The class constructor or factory function.
dependenciesany[]The dependencies to pass into the constructor or factory function.

Returns

void

Defined in

packages/core/src/oc/ObjectContainer.ts:626


bind

bind<T, C>(name, classConstructor, dependencies?): ObjectContainer

Binds the specified class or factory function and dependencies to the specified alias. Binding a class or factory function to an alias allows the class or function to be specified as a dependency by specifying the alias and creating new instances by referring to the class or function by the alias.

Also note that the same class or function may be bound to several aliases and each may use different dependencies.

The alias will use the default dependencies bound for the class if no -dependencies are provided.

Type parameters

NameType
Textends keyof OCAliasMap
CC

Parameters

NameTypeDescription
nameTAlias name.
classConstructorOCInjectable<C>The class constructor or a factory function.
dependencies?any[]The dependencies to pass into the constructor or factory function.

Returns

ObjectContainer

This object container.

Defined in

packages/core/src/oc/ObjectContainer.ts:114


clear

clear(): ObjectContainer

Clears all entries from this object container and resets the locking -mechanism of this object container.

Returns

ObjectContainer

This object container.

Defined in

packages/core/src/oc/ObjectContainer.ts:485


constant

constant<T, V>(name, value): ObjectContainer

Defines a new constant registered with this object container. Note that +dependencies are provided.

Type parameters

NameType
Textends keyof OCAliasMap
CC

Parameters

NameTypeDescription
nameTAlias name.
classConstructorOCInjectable<C>The class constructor or a factory function.
dependencies?any[]The dependencies to pass into the constructor or factory function.

Returns

ObjectContainer

This object container.

Defined in

packages/core/src/oc/ObjectContainer.ts:114


clear

clear(): ObjectContainer

Clears all entries from this object container and resets the locking +mechanism of this object container.

Returns

ObjectContainer

This object container.

Defined in

packages/core/src/oc/ObjectContainer.ts:485


constant

constant<T, V>(name, value): ObjectContainer

Defines a new constant registered with this object container. Note that this is the only way of passing string values to constructors because the object container treats strings as class, interface, alias -or constant names.

Type parameters

NameType
Textends keyof OCAliasMap
VV

Parameters

NameTypeDescription
nameTThe constant name.
valueVThe constant value.

Returns

ObjectContainer

This object container.

Defined in

packages/core/src/oc/ObjectContainer.ts:200


create

create<T>(name, dependencies?): OCInstance<T>

Creates a new instance of the class or retrieves the value generated by +or constant names.

Type parameters

NameType
Textends keyof OCAliasMap
VV

Parameters

NameTypeDescription
nameTThe constant name.
valueVThe constant value.

Returns

ObjectContainer

This object container.

Defined in

packages/core/src/oc/ObjectContainer.ts:200


create

create<T>(name, dependencies?): OCInstance<T>

Creates a new instance of the class or retrieves the value generated by the factory function identified by the provided name, class, interface, or factory function, passing in the provided dependencies.

The method uses the dependencies specified when the class, interface or factory function has been registered with the object container if no -custom dependencies are provided.

Type parameters

NameType
Textends OCInstanceConstrain<any>

Parameters

NameTypeDefault valueDescription
nameTundefinedThe name of the alias, class, interface, or the class, interface or a factory function to use.
dependenciesany[][]The dependencies to pass into the constructor or factory function.

Returns

OCInstance<T>

Created instance or generated value.

Defined in

packages/core/src/oc/ObjectContainer.ts:463


get

get<T>(name): OCInstance<T>

Retrieves the shared instance or value of the specified constant, alias, +custom dependencies are provided.

Type parameters

NameType
Textends OCInstanceConstrain<any>

Parameters

NameTypeDefault valueDescription
nameTundefinedThe name of the alias, class, interface, or the class, interface or a factory function to use.
dependenciesany[][]The dependencies to pass into the constructor or factory function.

Returns

OCInstance<T>

Created instance or generated value.

Defined in

packages/core/src/oc/ObjectContainer.ts:463


get

get<T>(name): OCInstance<T>

Retrieves the shared instance or value of the specified constant, alias, class or factory function, interface, or fully qualified namespace path -(the method checks these in this order in case of a name clash).

The instance or value is created lazily the first time it is requested.

Type parameters

NameType
Textends OCInstanceConstrain<any>

Parameters

NameTypeDescription
nameTThe name of the alias, class, interface, or the class, interface or a factory function.

Returns

OCInstance<T>

The shared instance or value.

Defined in

packages/core/src/oc/ObjectContainer.ts:400


getConstructorOf

getConstructorOf<T>(name): null | Constructor<T>

Returns the class constructor function of the specified class.

Type parameters

NameType
Textends keyof OCAliasMap | Constructor<any>

Parameters

NameTypeDescription
nameTThe name by which the class is registered with this object container.

Returns

null | Constructor<T>

The constructor function.

Defined in

packages/core/src/oc/ObjectContainer.ts:418


has

has<T>(name): boolean

Returns true if the specified object, class or resource is +(the method checks these in this order in case of a name clash).

The instance or value is created lazily the first time it is requested.

Type parameters

NameType
Textends OCInstanceConstrain<any>

Parameters

NameTypeDescription
nameTThe name of the alias, class, interface, or the class, interface or a factory function.

Returns

OCInstance<T>

The shared instance or value.

Defined in

packages/core/src/oc/ObjectContainer.ts:400


getConstructorOf

getConstructorOf<T>(name): null | Constructor<T>

Returns the class constructor function of the specified class.

Type parameters

NameType
Textends keyof OCAliasMap | Constructor<any>

Parameters

NameTypeDescription
nameTThe name by which the class is registered with this object container.

Returns

null | Constructor<T>

The constructor function.

Defined in

packages/core/src/oc/ObjectContainer.ts:418


has

has<T>(name): boolean

Returns true if the specified object, class or resource is registered with this object container.

Type parameters

Name
T

Parameters

NameTypeDescription
namekeyof OCAliasMap | OCInjectable<T>The resource name.

Returns

boolean

true if the specified object, class or -resource is registered with this object container.

Defined in

packages/core/src/oc/ObjectContainer.ts:438


inject

inject<T>(classConstructor, dependencies): ObjectContainer

Configures the object loader with the specified default dependencies for +resource is registered with this object container.

Defined in

packages/core/src/oc/ObjectContainer.ts:438


inject

inject<T>(classConstructor, dependencies): ObjectContainer

Configures the object loader with the specified default dependencies for the specified class.

New instances of the class created by this object container will receive the provided dependencies into constructor unless custom dependencies -are provided.

Type parameters

Name
T

Parameters

NameTypeDescription
classConstructorConstructor<T>The class constructor.
dependenciesany[]The dependencies to pass into the constructor function.

Returns

ObjectContainer

This object container.

Defined in

packages/core/src/oc/ObjectContainer.ts:244


provide

provide<T, I>(interfaceConstructor, implementationConstructor, dependencies?): ObjectContainer

Configures the default implementation of the specified interface to use +are provided.

Type parameters

Name
T

Parameters

NameTypeDescription
classConstructorConstructor<T>The class constructor.
dependenciesany[]The dependencies to pass into the constructor function.

Returns

ObjectContainer

This object container.

Defined in

packages/core/src/oc/ObjectContainer.ts:244


provide

provide<T, I>(interfaceConstructor, implementationConstructor, dependencies?): ObjectContainer

Configures the default implementation of the specified interface to use when an implementation provider of the specified interface is requested from this object container.

The implementation constructor will obtain the provided default dependencies or the dependencies provided to the () -method.

Type parameters

Name
T
I

Parameters

NameTypeDescription
interfaceConstructorConstructor<I> | AbstractConstructor<I>The constructor of the interface representing the service.
implementationConstructorConstructor<T>The constructor of the class implementing the service interface.
dependencies?any[]The dependencies to pass into the constructor function.

Returns

ObjectContainer

This object container.

Defined in

packages/core/src/oc/ObjectContainer.ts:319


setBindingState

setBindingState(bindingState, bindingPluginName?): void

Parameters

NameType
bindingStateBindingState
bindingPluginName?string

Returns

void

Defined in

packages/core/src/oc/ObjectContainer.ts:493

- - +method.

Type parameters

Name
T
I

Parameters

NameTypeDescription
interfaceConstructorConstructor<I> | AbstractConstructor<I>The constructor of the interface representing the service.
implementationConstructorConstructor<T>The constructor of the class implementing the service interface.
dependencies?any[]The dependencies to pass into the constructor function.

Returns

ObjectContainer

This object container.

Defined in

packages/core/src/oc/ObjectContainer.ts:319


setBindingState

setBindingState(bindingState, bindingPluginName?): void

Parameters

NameType
bindingStateBindingState
bindingPluginName?string

Returns

void

Defined in

packages/core/src/oc/ObjectContainer.ts:493

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Observable/index.html b/api/classes/ima_core.Observable/index.html new file mode 100644 index 0000000000..732a00acf1 --- /dev/null +++ b/api/classes/ima_core.Observable/index.html @@ -0,0 +1,22 @@ + + + + + +Class: Observable | IMA.js + + + + +
+
Skip to main content

Class: Observable

@ima/core.Observable

An Observable is a class that manages event listeners and allows distributing +events to the registered listeners. It maintains a history of events and supports +persistent events that are not cleared during route changes.

Hierarchy

Constructors

constructor

new Observable()

Methods

clear

clear(): Observable

Clears all persistent events, observers, and activity history from the observable.

This method will remove all stored events, registered observers, and any recorded +activity history, effectively resetting the observable to its initial state.

Returns

Observable

The instance of the Observable for chaining.

Defined in

packages/core/src/event/Observable.ts:35


destroy

destroy(): Observable

Destroys the observable by clearing its internal state and removing all event listeners.

Returns

Observable

The instance of the Observable for chaining.

Defined in

packages/core/src/event/Observable.ts:23


init

init(): Observable

Initializes the observable.

Returns

Observable

The instance of the Observable for chaining.

Defined in

packages/core/src/event/Observable.ts:14


registerPersistenEvent

registerPersistenEvent<E>(event): Observable

Registers an event as persistent, meaning its history won't be cleared upon calling the clear method (route change).

Type parameters

NameType
Eextends keyof DispatcherEventsMap

Parameters

NameTypeDescription
eventEThe name of the event to be registered as persistent. This can be a key from the DispatcherEventsMap or any string.

Returns

Observable

The instance of the Observable for chaining.

Defined in

packages/core/src/event/Observable.ts:45


subscribe

subscribe<E>(event, observer, scope?): Observable

Subscribes an observer to a specific event. When the event is dispatched, +the observer will be notified and executed within the provided scope. +If the event has already occurred, the observer will be immediately +invoked with the historical data.

Type parameters

NameType
Eextends keyof DispatcherEventsMap

Parameters

NameTypeDescription
eventEThe event to subscribe to.
observerDispatcherListener<any>The observer function to be called when the event is dispatched.
scope?unknownThe scope in which the observer function should be executed. This is optional.

Returns

Observable

The instance of the Observable for chaining.

Defined in

packages/core/src/event/Observable.ts:63


unsubscribe

unsubscribe<E>(event, observer, scope?): Observable

Unsubscribes an observer from a specific event.

Type parameters

NameType
Eextends keyof DispatcherEventsMap

Parameters

NameTypeDescription
eventEThe event name or key from the DispatcherEventsMap.
observerDispatcherListener<any>The observer (listener) to be unsubscribed.
scope?unknownOptional scope to be used for the observer.

Returns

Observable

The current instance for chaining.

Defined in

packages/core/src/event/Observable.ts:80

+ + + + \ No newline at end of file diff --git a/api/classes/ima_core.ObservableImpl/index.html b/api/classes/ima_core.ObservableImpl/index.html new file mode 100644 index 0000000000..1a0afe88d5 --- /dev/null +++ b/api/classes/ima_core.ObservableImpl/index.html @@ -0,0 +1,23 @@ + + + + + +Class: ObservableImpl | IMA.js + + + + +
+
Skip to main content

Class: ObservableImpl

@ima/core.ObservableImpl

An Observable is a class that manages event listeners and allows distributing +events to the registered listeners. It maintains a history of events and supports +persistent events that are not cleared during route changes.

Remarks

  • The Observable class relies on a Dispatcher to handle the actual event distribution.
  • It maintains a history of events, which can be limited by a maximum history length.

Hierarchy

Constructors

constructor

new ObservableImpl(dispatcher, settings?)

Creates an instance of Observable.

Parameters

NameTypeDescription
dispatcherDispatcherThe dispatcher responsible for managing event listeners.
settings?ObjectOptional settings for the Observable instance.
settings.maxHistoryLength?number-

Overrides

Observable.constructor

Defined in

packages/core/src/event/ObservableImpl.ts:40

Properties

_activityHistory

Protected _activityHistory: Map<string, unknown[]>

Defined in

packages/core/src/event/ObservableImpl.ts:25


_dispatcher

Protected _dispatcher: Dispatcher

Defined in

packages/core/src/event/ObservableImpl.ts:23


_observers

Protected _observers: Map<string, Map<DispatcherListener<any>, Set<unknown>>>

Defined in

packages/core/src/event/ObservableImpl.ts:24


_persistentEvents

Protected _persistentEvents: Set<string>

Defined in

packages/core/src/event/ObservableImpl.ts:26


_settings

Protected _settings: undefined | { maxHistoryLength?: number }

Defined in

packages/core/src/event/ObservableImpl.ts:27


$dependencies

Static $dependencies: Dependencies

Defined in

packages/core/src/event/ObservableImpl.ts:29

Methods

_handleDispatcherEvent

_handleDispatcherEvent(event, data): void

Handles dispatcher events by updating the activity history and notifying observers. +It also resets the activity history for non-persistent events on BEFORE_HANDLE_ROUTE ecvent.

Parameters

NameTypeDescription
eventstringThe name of the event being dispatched.
dataanyThe data associated with the event.

Returns

void

Defined in

packages/core/src/event/ObservableImpl.ts:148


clear

clear(): ObservableImpl

Clears all persistent events, observers, and activity history from the observable.

This method will remove all stored events, registered observers, and any recorded +activity history, effectively resetting the observable to its initial state.

Returns

ObservableImpl

The instance of the Observable for chaining.

Overrides

Observable.clear

Defined in

packages/core/src/event/ObservableImpl.ts:72


destroy

destroy(): ObservableImpl

Destroys the observable by clearing its internal state and removing all event listeners.

Returns

ObservableImpl

The instance of the Observable for chaining.

Overrides

Observable.destroy

Defined in

packages/core/src/event/ObservableImpl.ts:62


init

init(): ObservableImpl

Initializes the observable.

Returns

ObservableImpl

The instance of the Observable for chaining.

Overrides

Observable.init

Defined in

packages/core/src/event/ObservableImpl.ts:52


registerPersistenEvent

registerPersistenEvent(event): ObservableImpl

Registers an event as persistent, meaning its history won't be cleared upon calling the clear method (route change).

Parameters

NameTypeDescription
eventstringThe name of the event to be registered as persistent. This can be a key from the DispatcherEventsMap or any string.

Returns

ObservableImpl

The instance of the Observable for chaining.

Overrides

Observable.registerPersistenEvent

Defined in

packages/core/src/event/ObservableImpl.ts:83


subscribe

subscribe(event, observer, scope?): ObservableImpl

Subscribes an observer to a specific event. When the event is dispatched, +the observer will be notified and executed within the provided scope. +If the event has already occurred, the observer will be immediately +invoked with the historical data.

Parameters

NameTypeDescription
eventstringThe event to subscribe to.
observerDispatcherListener<any>The observer function to be called when the event is dispatched.
scope?unknownThe scope in which the observer function should be executed. This is optional.

Returns

ObservableImpl

The instance of the Observable for chaining.

Overrides

Observable.subscribe

Defined in

packages/core/src/event/ObservableImpl.ts:92


unsubscribe

unsubscribe(event, observer, scope?): ObservableImpl

Unsubscribes an observer from a specific event.

Parameters

NameTypeDescription
eventstringThe event name or key from the DispatcherEventsMap.
observerDispatcherListener<any>The observer (listener) to be unsubscribed.
scope?unknownOptional scope to be used for the observer.

Returns

ObservableImpl

The current instance for chaining.

Overrides

Observable.unsubscribe

Defined in

packages/core/src/event/ObservableImpl.ts:119

+ + + + \ No newline at end of file diff --git a/api/classes/ima_core.PageFactory/index.html b/api/classes/ima_core.PageFactory/index.html index 7dcbe02d9c..88ca212cf9 100644 --- a/api/classes/ima_core.PageFactory/index.html +++ b/api/classes/ima_core.PageFactory/index.html @@ -4,14 +4,14 @@ Class: PageFactory | IMA.js - - + +
-
Skip to main content

Class: PageFactory

@ima/core.PageFactory

Factory for page.

Constructors

constructor

new PageFactory(oc)

Factory used by page management classes.

Parameters

NameType
ocObjectContainer

Defined in

packages/core/src/page/PageFactory.ts:24

Properties

_oc

_oc: ObjectContainer

The current application object container.

Defined in

packages/core/src/page/PageFactory.ts:19

Methods

createController

createController(controller, options): Controller<{}, {}, {}>

Create new instance of Controller.

Parameters

NameType
controllerRouteController
optionsRouteOptions

Returns

Controller<{}, {}, {}>

Defined in

packages/core/src/page/PageFactory.ts:31


createView

createView<V>(view): Constructor<keyof OCAliasMap | Constructor<any>> | V & Function

Retrieves the specified react component class.

Type parameters

NameType
Vextends keyof OCAliasMap | Constructor<any> | (...args: any[]) => any

Parameters

NameTypeDescription
viewVThe namespace referring to a react component class, or a react component class constructor.

Returns

Constructor<keyof OCAliasMap | Constructor<any>> | V & Function

The react component class -constructor.

Defined in

packages/core/src/page/PageFactory.ts:84


decorateController

decorateController(controller): ControllerDecorator<{}, {}, {}>

Returns decorated controller for ease setting seo params in controller.

Parameters

NameType
controllerController<{}, {}, {}>

Returns

ControllerDecorator<{}, {}, {}>

Defined in

packages/core/src/page/PageFactory.ts:105


decoratePageStateManager

decoratePageStateManager(pageStateManager, allowedStateKeys): PageStateManagerDecorator

Returns decorated page state manager for extension.

Parameters

NameType
pageStateManagerPageStateManager<{}>
allowedStateKeysstring[]

Returns

PageStateManagerDecorator

Defined in

packages/core/src/page/PageFactory.ts:124

- - +
Skip to main content

Class: PageFactory

@ima/core.PageFactory

Factory for page.

Constructors

constructor

new PageFactory(oc)

Factory used by page management classes.

Parameters

NameType
ocObjectContainer

Defined in

packages/core/src/page/PageFactory.ts:24

Properties

_oc

_oc: ObjectContainer

The current application object container.

Defined in

packages/core/src/page/PageFactory.ts:19

Methods

createController

createController(controller, options): Controller<{}, {}, {}>

Create new instance of Controller.

Parameters

NameType
controllerRouteController
optionsRouteOptions

Returns

Controller<{}, {}, {}>

Defined in

packages/core/src/page/PageFactory.ts:31


createView

createView<V>(view): Constructor<keyof OCAliasMap | Constructor<any>> | V & Function

Retrieves the specified react component class.

Type parameters

NameType
Vextends keyof OCAliasMap | Constructor<any> | (...args: any[]) => any

Parameters

NameTypeDescription
viewVThe namespace referring to a react component class, or a react component class constructor.

Returns

Constructor<keyof OCAliasMap | Constructor<any>> | V & Function

The react component class +constructor.

Defined in

packages/core/src/page/PageFactory.ts:84


decorateController

decorateController(controller): ControllerDecorator<{}, {}, {}>

Returns decorated controller for ease setting seo params in controller.

Parameters

NameType
controllerController<{}, {}, {}>

Returns

ControllerDecorator<{}, {}, {}>

Defined in

packages/core/src/page/PageFactory.ts:105


decoratePageStateManager

decoratePageStateManager(pageStateManager, allowedStateKeys): PageStateManagerDecorator

Returns decorated page state manager for extension.

Parameters

NameType
pageStateManagerPageStateManager<{}>
allowedStateKeysstring[]

Returns

PageStateManagerDecorator

Defined in

packages/core/src/page/PageFactory.ts:124

+ + \ No newline at end of file diff --git a/api/classes/ima_core.PageHandler/index.html b/api/classes/ima_core.PageHandler/index.html index 4aa4829fec..60c67481e4 100644 --- a/api/classes/ima_core.PageHandler/index.html +++ b/api/classes/ima_core.PageHandler/index.html @@ -4,16 +4,16 @@ Class: PageHandler | IMA.js - - + +
-
Skip to main content

Class: PageHandler

@ima/core.PageHandler

Hierarchy

Constructors

constructor

new PageHandler()

Methods

destroy

destroy(): void

Finalization callback, called when the page manager is being discarded. -This usually happens when the page is hot-reloaded at the client side.

Returns

void

Defined in

packages/core/src/page/handler/PageHandler.ts:50


handlePostManagedState

handlePostManagedState(managedPage, previousManagedPage, action): void

Called after a PageManager finishes transition from previous page to -a new one.

Parameters

NameTypeDescription
managedPagenull | ManagedPageThe currently managed page.
previousManagedPageManagedPageThe data of the page that was previously managed.
actionPageActionAn action object describing what triggered the routing.

Returns

void

Defined in

packages/core/src/page/handler/PageHandler.ts:38


handlePreManagedState

handlePreManagedState(managedPage, nextManagedPage, action): void

Called before a PageManager starts to transition from previous page to -a new one.

Parameters

NameTypeDescription
managedPagenull | ManagedPageThe currently managed page - soon-to-be previously managed page.
nextManagedPageManagedPageThe data of the page that's about to be managed.
actionPageActionAn action object describing what triggered the routing.

Returns

void

Defined in

packages/core/src/page/handler/PageHandler.ts:21


init

init(): void

Initializes the page handler.

Returns

void

Defined in

packages/core/src/page/handler/PageHandler.ts:7

- - +
Skip to main content

Class: PageHandler

@ima/core.PageHandler

Hierarchy

Constructors

constructor

new PageHandler()

Methods

destroy

destroy(): void

Finalization callback, called when the page manager is being discarded. +This usually happens when the page is hot-reloaded at the client side.

Returns

void

Defined in

packages/core/src/page/handler/PageHandler.ts:50


handlePostManagedState

handlePostManagedState(managedPage, previousManagedPage, action): void

Called after a PageManager finishes transition from previous page to +a new one.

Parameters

NameTypeDescription
managedPagenull | ManagedPageThe currently managed page.
previousManagedPageManagedPageThe data of the page that was previously managed.
actionPageActionAn action object describing what triggered the routing.

Returns

void

Defined in

packages/core/src/page/handler/PageHandler.ts:38


handlePreManagedState

handlePreManagedState(managedPage, nextManagedPage, action): void

Called before a PageManager starts to transition from previous page to +a new one.

Parameters

NameTypeDescription
managedPagenull | ManagedPageThe currently managed page - soon-to-be previously managed page.
nextManagedPageManagedPageThe data of the page that's about to be managed.
actionPageActionAn action object describing what triggered the routing.

Returns

void

Defined in

packages/core/src/page/handler/PageHandler.ts:21


init

init(): void

Initializes the page handler.

Returns

void

Defined in

packages/core/src/page/handler/PageHandler.ts:7

+ + \ No newline at end of file diff --git a/api/classes/ima_core.PageHandlerRegistry/index.html b/api/classes/ima_core.PageHandlerRegistry/index.html index 16c9d2317f..c2296e9654 100644 --- a/api/classes/ima_core.PageHandlerRegistry/index.html +++ b/api/classes/ima_core.PageHandlerRegistry/index.html @@ -4,15 +4,15 @@ Class: PageHandlerRegistry | IMA.js - - + +
-
Skip to main content

Class: PageHandlerRegistry

@ima/core.PageHandlerRegistry

Hierarchy

Constructors

constructor

new PageHandlerRegistry(...pageHandlers)

Creates an instance of HandlerRegistry and creates SerialBatch -instance for pre-handlers and post-handlers.

Parameters

NameType
...pageHandlersPageHandler[]

Memberof

HandlerRegistry

Overrides

PageHandler.constructor

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:19

Properties

_pageHandlers

Protected _pageHandlers: PageHandler[]

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:8


_postManageHandlers

Protected Optional _postManageHandlers: Execution

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:10


_preManageHandlers

Protected Optional _preManageHandlers: Execution

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:9


ExecutionMethod

Static ExecutionMethod: typeof SerialBatch = SerialBatch

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:12

Methods

destroy

destroy(): void

Finalization callback, called when the page manager is being discarded. -This usually happens when the page is hot-reloaded at the client side.

Returns

void

Overrides

PageHandler.destroy

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:87


handlePostManagedState

handlePostManagedState(managedPage, previousManagedPage, action): Promise<unknown>

Executes the post-manage handlers with given arguments

Parameters

NameType
managedPagenull | ManagedPage
previousManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Overrides

PageHandler.handlePostManagedState

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:72


handlePreManagedState

handlePreManagedState(managedPage, nextManagedPage, action): Promise<unknown>

Executes the pre-manage handlers with given arguments

Parameters

NameType
managedPagenull | ManagedPage
nextManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Overrides

PageHandler.handlePreManagedState

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:53


init

init(): void

Initializes the page handler.

Returns

void

Overrides

PageHandler.init

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:28

- - +
Skip to main content

Class: PageHandlerRegistry

@ima/core.PageHandlerRegistry

Hierarchy

Constructors

constructor

new PageHandlerRegistry(...pageHandlers)

Creates an instance of HandlerRegistry and creates SerialBatch +instance for pre-handlers and post-handlers.

Parameters

NameType
...pageHandlersPageHandler[]

Memberof

HandlerRegistry

Overrides

PageHandler.constructor

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:19

Properties

_pageHandlers

Protected _pageHandlers: PageHandler[]

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:8


_postManageHandlers

Protected Optional _postManageHandlers: Execution

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:10


_preManageHandlers

Protected Optional _preManageHandlers: Execution

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:9


ExecutionMethod

Static ExecutionMethod: typeof SerialBatch = SerialBatch

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:12

Methods

destroy

destroy(): void

Finalization callback, called when the page manager is being discarded. +This usually happens when the page is hot-reloaded at the client side.

Returns

void

Overrides

PageHandler.destroy

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:87


handlePostManagedState

handlePostManagedState(managedPage, previousManagedPage, action): Promise<unknown>

Executes the post-manage handlers with given arguments

Parameters

NameType
managedPagenull | ManagedPage
previousManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Overrides

PageHandler.handlePostManagedState

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:72


handlePreManagedState

handlePreManagedState(managedPage, nextManagedPage, action): Promise<unknown>

Executes the pre-manage handlers with given arguments

Parameters

NameType
managedPagenull | ManagedPage
nextManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Overrides

PageHandler.handlePreManagedState

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:53


init

init(): void

Initializes the page handler.

Returns

void

Overrides

PageHandler.init

Defined in

packages/core/src/page/handler/PageHandlerRegistry.ts:28

+ + \ No newline at end of file diff --git a/api/classes/ima_core.PageManager/index.html b/api/classes/ima_core.PageManager/index.html index d9d4632df4..da614605c1 100644 --- a/api/classes/ima_core.PageManager/index.html +++ b/api/classes/ima_core.PageManager/index.html @@ -4,24 +4,24 @@ Class: PageManager | IMA.js - - + +
-
Skip to main content

Class: PageManager

@ima/core.PageManager

The page manager is a utility for managing the current controller and its +

Class: PageManager

@ima/core.PageManager

The page manager is a utility for managing the current controller and its view.

Hierarchy

Constructors

constructor

new PageManager()

Methods

destroy

destroy(): Promise<unknown>

Finalization callback, called when the page manager is being discarded. -This usually happens when the page is hot-reloaded at the client side.

Returns

Promise<unknown>

Defined in

packages/core/src/page/manager/PageManager.ts:68


init

init(): void

Initializes the page manager.

Returns

void

Defined in

packages/core/src/page/manager/PageManager.ts:20


manage

manage(args): Promise<unknown>

Starts to manage the provided controller and its view. The manager +This usually happens when the page is hot-reloaded at the client side.

Returns

Promise<unknown>

Defined in

packages/core/src/page/manager/PageManager.ts:68


init

init(): void

Initializes the page manager.

Returns

void

Defined in

packages/core/src/page/manager/PageManager.ts:20


manage

manage(args): Promise<unknown>

Starts to manage the provided controller and its view. The manager stops the management of any previously managed controller and view.

The controller and view will be initialized and rendered either into the UI (at the client-side) or to the response to send to the client (at the server-side).

Parameters

NameType
argsManageArgs

Returns

Promise<unknown>

A promise that will resolve to information about the rendered page. The status will contain the HTTP status code to send to the client (at the server side) or determine the type of error page -to navigate to (at the client side).

Defined in

packages/core/src/page/manager/PageManager.ts:53


postManage

postManage(): void

Called by router after currently managed route is resolved.

Returns

void

Defined in

packages/core/src/page/manager/PageManager.ts:60


preManage

preManage(): Promise<void>

Pre manage handler, should be called and awaited before tryint to handle +to navigate to (at the client side).

Defined in

packages/core/src/page/manager/PageManager.ts:53


postManage

postManage(): void

Called by router after currently managed route is resolved.

Returns

void

Defined in

packages/core/src/page/manager/PageManager.ts:60


preManage

preManage(): Promise<void>

Pre manage handler, should be called and awaited before tryint to handle new route handler. This pre manage takes care of canceling any currently executed route handlers and returns promise which is resolved when previous -page finished loading (even if it got canceled).

Returns

Promise<void>

Defined in

packages/core/src/page/manager/PageManager.ts:30

- - +page finished loading (even if it got canceled).

Returns

Promise<void>

Defined in

packages/core/src/page/manager/PageManager.ts:30

+ + \ No newline at end of file diff --git a/api/classes/ima_core.PageMetaHandler/index.html b/api/classes/ima_core.PageMetaHandler/index.html index b0a8bac6b3..169f856956 100644 --- a/api/classes/ima_core.PageMetaHandler/index.html +++ b/api/classes/ima_core.PageMetaHandler/index.html @@ -4,16 +4,16 @@ Class: PageMetaHandler | IMA.js - - + +
-
Skip to main content

Class: PageMetaHandler

@ima/core.PageMetaHandler

Hierarchy

Constructors

constructor

new PageMetaHandler(window, metaManager)

Parameters

NameType
windowWindow
metaManagerMetaManager

Overrides

PageHandler.constructor

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:21

Properties

#managed

Private #managed: boolean = false

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:15


#metaManager

Private #metaManager: MetaManager

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:14


#window

Private #window: Window

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:13

Accessors

$dependencies

Static get $dependencies(): (typeof Window | typeof MetaManager)[]

Returns

(typeof Window | typeof MetaManager)[]

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:17

Methods

#sanitizeValue

Private #sanitizeValue(value): null | string

Parameters

NameType
valueMetaValue

Returns

null | string

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:124


#selectMetaTags

Private #selectMetaTags(): NodeList

Returns

NodeList

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:128


#updateMetaAttributes

Private #updateMetaAttributes(): void

Update specified meta or link tags in DOM.

Returns

void

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:59


#updateMetaTag

Private #updateMetaTag<K>(iterator, tagName, keyName): void

Helper to update specific meta tags in page document.

Type parameters

NameType
Kextends MetaManagerRecordKeys

Parameters

NameTypeDescription
iteratornever[] | IterableIterator<[string, MetaManagerRecord<K>]>Collection of meta records to update.
tagName"link" | "meta"Tag name for the given collection.
keyName"name" | "rel" | "property"-

Returns

void

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:93


destroy

destroy(): void

Finalization callback, called when the page manager is being discarded. -This usually happens when the page is hot-reloaded at the client side.

Returns

void

Inherited from

PageHandler.destroy

Defined in

packages/core/src/page/handler/PageHandler.ts:50


handlePostManagedState

handlePostManagedState(): void

Called after a PageManager finishes transition from previous page to -a new one.

Returns

void

Overrides

PageHandler.handlePostManagedState

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:38


handlePreManagedState

handlePreManagedState(): void

Called before a PageManager starts to transition from previous page to -a new one.

Returns

void

Overrides

PageHandler.handlePreManagedState

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:31


init

init(): void

Initializes the page handler.

Returns

void

Inherited from

PageHandler.init

Defined in

packages/core/src/page/handler/PageHandler.ts:7

- - +
Skip to main content

Class: PageMetaHandler

@ima/core.PageMetaHandler

Hierarchy

Constructors

constructor

new PageMetaHandler(window, metaManager)

Parameters

NameType
windowWindow
metaManagerMetaManager

Overrides

PageHandler.constructor

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:21

Properties

#managed

Private #managed: boolean = false

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:15


#metaManager

Private #metaManager: MetaManager

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:14


#window

Private #window: Window

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:13

Accessors

$dependencies

Static get $dependencies(): (typeof Window | typeof MetaManager)[]

Returns

(typeof Window | typeof MetaManager)[]

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:17

Methods

#sanitizeValue

Private #sanitizeValue(value): null | string

Parameters

NameType
valueMetaValue

Returns

null | string

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:124


#selectMetaTags

Private #selectMetaTags(): NodeList

Returns

NodeList

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:128


#updateMetaAttributes

Private #updateMetaAttributes(): void

Update specified meta or link tags in DOM.

Returns

void

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:59


#updateMetaTag

Private #updateMetaTag<K>(iterator, tagName, keyName): void

Helper to update specific meta tags in page document.

Type parameters

NameType
Kextends MetaManagerRecordKeys

Parameters

NameTypeDescription
iteratornever[] | IterableIterator<[string, MetaManagerRecord<K>]>Collection of meta records to update.
tagName"link" | "meta"Tag name for the given collection.
keyName"name" | "rel" | "property"-

Returns

void

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:93


destroy

destroy(): void

Finalization callback, called when the page manager is being discarded. +This usually happens when the page is hot-reloaded at the client side.

Returns

void

Inherited from

PageHandler.destroy

Defined in

packages/core/src/page/handler/PageHandler.ts:50


handlePostManagedState

handlePostManagedState(): void

Called after a PageManager finishes transition from previous page to +a new one.

Returns

void

Overrides

PageHandler.handlePostManagedState

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:38


handlePreManagedState

handlePreManagedState(): void

Called before a PageManager starts to transition from previous page to +a new one.

Returns

void

Overrides

PageHandler.handlePreManagedState

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:31


init

init(): void

Initializes the page handler.

Returns

void

Inherited from

PageHandler.init

Defined in

packages/core/src/page/handler/PageHandler.ts:7

+ + \ No newline at end of file diff --git a/api/classes/ima_core.PageNavigationHandler/index.html b/api/classes/ima_core.PageNavigationHandler/index.html index 519ad4a380..5153723e0f 100644 --- a/api/classes/ima_core.PageNavigationHandler/index.html +++ b/api/classes/ima_core.PageNavigationHandler/index.html @@ -4,20 +4,20 @@ Class: PageNavigationHandler | IMA.js - - + +
-
Skip to main content

Class: PageNavigationHandler

@ima/core.PageNavigationHandler

Hierarchy

Constructors

constructor

new PageNavigationHandler(window)

Parameters

NameTypeDescription
windowWindowThe utility for manipulating the global context and global client-side-specific APIs.

Overrides

PageHandler.constructor

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:18

Properties

#preManaged

Private #preManaged: boolean = false

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:10


_window

Protected _window: Window

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:8


$dependencies

Static $dependencies: Dependencies

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:12

Methods

_saveScrollHistory

_saveScrollHistory(): void

Save user's scroll state to history.

Replace scroll values in current state for actual scroll values in -document.

Returns

void

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:104


_scrollTo

_scrollTo(«destructured»): void

Scrolls to give coordinates on a page.

Parameters

NameType
«destructured»Object

Returns

void

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:121


_setAddressBar

_setAddressBar(url, isRedirection): void

Sets the provided URL to the browser's address bar by pushing or replacing a new +

Class: PageNavigationHandler

@ima/core.PageNavigationHandler

Hierarchy

Constructors

constructor

new PageNavigationHandler(window)

Parameters

NameTypeDescription
windowWindowThe utility for manipulating the global context and global client-side-specific APIs.

Overrides

PageHandler.constructor

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:18

Properties

#preManaged

Private #preManaged: boolean = false

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:10


_window

Protected _window: Window

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:8


$dependencies

Static $dependencies: Dependencies

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:12

Methods

_saveScrollHistory

_saveScrollHistory(): void

Save user's scroll state to history.

Replace scroll values in current state for actual scroll values in +document.

Returns

void

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:104


_scrollTo

_scrollTo(«destructured»): void

Scrolls to give coordinates on a page.

Parameters

NameType
«destructured»Object

Returns

void

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:121


_setAddressBar

_setAddressBar(url, isRedirection): void

Sets the provided URL to the browser's address bar by pushing or replacing a new state to the history.

The state object pushed to or replaced in the history will be an object with the following structure: {url: string}. The url field will -be set to the provided URL.

Parameters

NameTypeDescription
urlstringThe URL.
isRedirectionbooleanIf replaceState should be used instead of pushState.

Returns

void

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:138


destroy

destroy(): void

Finalization callback, called when the page manager is being discarded. -This usually happens when the page is hot-reloaded at the client side.

Returns

void

Inherited from

PageHandler.destroy

Defined in

packages/core/src/page/handler/PageHandler.ts:50


handlePostManagedState

handlePostManagedState(managedPage, previousManagedPage, action): void

Called after a PageManager finishes transition from previous page to -a new one.

Parameters

NameTypeDescription
managedPageManagedPageThe currently managed page.
previousManagedPageManagedPageThe data of the page that was previously managed.
actionPageActionAn action object describing what triggered the routing.

Returns

void

Overrides

PageHandler.handlePostManagedState

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:84


handlePreManagedState

handlePreManagedState(managedPage, nextManagedPage, action): void

Called before a PageManager starts to transition from previous page to -a new one.

Parameters

NameTypeDescription
managedPageManagedPageThe currently managed page - soon-to-be previously managed page.
nextManagedPageManagedPageThe data of the page that's about to be managed.
actionPageActionAn action object describing what triggered the routing.

Returns

void

Overrides

PageHandler.handlePreManagedState

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:43


init

init(): void

Initializes the page handler.

Returns

void

Overrides

PageHandler.init

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:31

- - +be set to the provided URL.

Parameters

NameTypeDescription
urlstringThe URL.
isRedirectionbooleanIf replaceState should be used instead of pushState.

Returns

void

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:138


destroy

destroy(): void

Finalization callback, called when the page manager is being discarded. +This usually happens when the page is hot-reloaded at the client side.

Returns

void

Inherited from

PageHandler.destroy

Defined in

packages/core/src/page/handler/PageHandler.ts:50


handlePostManagedState

handlePostManagedState(managedPage, previousManagedPage, action): void

Called after a PageManager finishes transition from previous page to +a new one.

Parameters

NameTypeDescription
managedPageManagedPageThe currently managed page.
previousManagedPageManagedPageThe data of the page that was previously managed.
actionPageActionAn action object describing what triggered the routing.

Returns

void

Overrides

PageHandler.handlePostManagedState

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:84


handlePreManagedState

handlePreManagedState(managedPage, nextManagedPage, action): void

Called before a PageManager starts to transition from previous page to +a new one.

Parameters

NameTypeDescription
managedPageManagedPageThe currently managed page - soon-to-be previously managed page.
nextManagedPageManagedPageThe data of the page that's about to be managed.
actionPageActionAn action object describing what triggered the routing.

Returns

void

Overrides

PageHandler.handlePreManagedState

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:43


init

init(): void

Initializes the page handler.

Returns

void

Overrides

PageHandler.init

Defined in

packages/core/src/page/handler/PageNavigationHandler.ts:31

+ + \ No newline at end of file diff --git a/api/classes/ima_core.PageRenderer/index.html b/api/classes/ima_core.PageRenderer/index.html index 158efba05e..0e309c2277 100644 --- a/api/classes/ima_core.PageRenderer/index.html +++ b/api/classes/ima_core.PageRenderer/index.html @@ -4,12 +4,12 @@ Class: PageRenderer | IMA.js - - + +
-
Skip to main content

Class: PageRenderer

@ima/core.PageRenderer

The page renderer is a utility for rendering the page at either the +

Class: PageRenderer

@ima/core.PageRenderer

The page renderer is a utility for rendering the page at either the client-side or the server-side, handling the differences in the environment.

Constructors

constructor

new PageRenderer()

Methods

mount

mount(controller, view, pageResources, routeOptions): Promise<void | PageData>

Renders the page using the provided controller and view. The actual behavior of this method differs at the client-side and the at server-side in the following way:

At the server, the method first waits for all the resources to load, and @@ -23,7 +23,7 @@ invoked at the client.

Parameters

NameTypeDescription
controllerController<{}, {}, {}>The current page controller.
viewunknownThe page's view.
pageResourcesUnknownPromiseParametersThe resources for the view loaded by the controller.
routeOptionsRouteOptionsThe current route options.

Returns

Promise<void | PageData>

A promise that will resolve to information about the rendered page. The status will contain the HTTP status code to send to the client (at the server side) or determine the -type of error page to navigate to (at the client side).

Defined in

packages/core/src/page/renderer/PageRenderer.ts:62


setState

setState(state): Promise<void>

Sets the provided state to the currently rendered view.

This method has no effect at the server-side.

Parameters

NameTypeDescription
stateUnknownParametersThe state to set to the currently rendered view.

Returns

Promise<void>

Defined in

packages/core/src/page/renderer/PageRenderer.ts:119


unmount

unmount(): void

Unmounts the view from the DOM.

This method has no effect at the server-side.

Returns

void

Defined in

packages/core/src/page/renderer/PageRenderer.ts:107


update

update(controller, view, resourcesUpdate, routeOptions): Promise<void | PageData>

Handles update of the current route that does not replace the current +type of error page to navigate to (at the client side).

Defined in

packages/core/src/page/renderer/PageRenderer.ts:62


setState

setState(state): Promise<void>

Sets the provided state to the currently rendered view.

This method has no effect at the server-side.

Parameters

NameTypeDescription
stateUnknownParametersThe state to set to the currently rendered view.

Returns

Promise<void>

Defined in

packages/core/src/page/renderer/PageRenderer.ts:119


unmount

unmount(): void

Unmounts the view from the DOM.

This method has no effect at the server-side.

Returns

void

Defined in

packages/core/src/page/renderer/PageRenderer.ts:107


update

update(controller, view, resourcesUpdate, routeOptions): Promise<void | PageData>

Handles update of the current route that does not replace the current controller and view.

The method will use the already available resource to update the controller's state and the view immediately. After that, the method will update the controller's state and view with every resource that becomes @@ -32,8 +32,8 @@ code to send to the client (at the server side) or determine the type of error page to navigate to (at the client side). The content field will contain the rendered markup of -the page at the server-side, or null at the client-side.

Defined in

packages/core/src/page/renderer/PageRenderer.ts:93

- - +the page at the server-side, or null at the client-side.

Defined in

packages/core/src/page/renderer/PageRenderer.ts:93

+ + \ No newline at end of file diff --git a/api/classes/ima_core.PageStateManager/index.html b/api/classes/ima_core.PageStateManager/index.html index 732f638412..e661447e53 100644 --- a/api/classes/ima_core.PageStateManager/index.html +++ b/api/classes/ima_core.PageStateManager/index.html @@ -4,19 +4,19 @@ Class: PageStateManager<S> | IMA.js - - + +
-
Skip to main content

Class: PageStateManager<S>

@ima/core.PageStateManager

Manager of the current page state and state history.

Type parameters

NameType
Sextends PageState = {}

Hierarchy

Constructors

constructor

new PageStateManager<S>()

Type parameters

NameType
Sextends PageState = {}

Properties

onChange

Optional onChange: (newState: S) => void

Type declaration

▸ (newState): void

Parameters
NameType
newStateS
Returns

void

Defined in

packages/core/src/page/state/PageStateManager.ts:7

Methods

beginTransaction

beginTransaction(): void

Starts queueing state patches off the main state. While the transaction +

Class: PageStateManager<S>

@ima/core.PageStateManager

Manager of the current page state and state history.

Type parameters

NameType
Sextends PageState = {}

Hierarchy

Constructors

constructor

new PageStateManager<S>()

Type parameters

NameType
Sextends PageState = {}

Properties

onChange

Optional onChange: (newState: S) => void

Type declaration

▸ (newState): void

Parameters
NameType
newStateS
Returns

void

Defined in

packages/core/src/page/state/PageStateManager.ts:7

Methods

beginTransaction

beginTransaction(): void

Starts queueing state patches off the main state. While the transaction is active every setState call has no effect on the current state.

Note that call to getState after the transaction has begun will -return state as it was before the transaction.

Returns

void

Defined in

packages/core/src/page/state/PageStateManager.ts:64


cancelTransaction

cancelTransaction(): void

Cancels ongoing transaction. Uncommitted state changes are lost.

Returns

void

Defined in

packages/core/src/page/state/PageStateManager.ts:79


clear

clear(): void

Clears the state history.

Returns

void

Defined in

packages/core/src/page/state/PageStateManager.ts:12


commitTransaction

commitTransaction(): void

Applies queued state patches to the main state. All patches are squashed -and applied with one setState call.

Returns

void

Defined in

packages/core/src/page/state/PageStateManager.ts:72


getAllStates

getAllStates(): S[]

Returns the recorded history of page states. The states will be +return state as it was before the transaction.

Returns

void

Defined in

packages/core/src/page/state/PageStateManager.ts:64


cancelTransaction

cancelTransaction(): void

Cancels ongoing transaction. Uncommitted state changes are lost.

Returns

void

Defined in

packages/core/src/page/state/PageStateManager.ts:79


clear

clear(): void

Clears the state history.

Returns

void

Defined in

packages/core/src/page/state/PageStateManager.ts:12


commitTransaction

commitTransaction(): void

Applies queued state patches to the main state. All patches are squashed +and applied with one setState call.

Returns

void

Defined in

packages/core/src/page/state/PageStateManager.ts:72


getAllStates

getAllStates(): S[]

Returns the recorded history of page states. The states will be chronologically sorted from the oldest to the newest.

Note that the implementation may limit the size of the recorded history, -therefore the complete history may not be available.

Returns

S[]

The recorded history of page states.

Defined in

packages/core/src/page/state/PageStateManager.ts:44


getState

getState(): S

Returns the current page state.

Returns

S

The current page state.

Defined in

packages/core/src/page/state/PageStateManager.ts:31


getTransactionStatePatches

getTransactionStatePatches(): (null | S | Pick<S, any>)[]

Returns queueing state patches off the main state from the begin of transaction.

Returns

(null | S | Pick<S, any>)[]

State patches from the begin of transaction.

Defined in

packages/core/src/page/state/PageStateManager.ts:53


setState

setState<K>(patchState): void

Sets a new page state by applying the provided patch to the current -state.

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
patchStatenull | S | Pick<S, K>

Returns

void

Defined in

packages/core/src/page/state/PageStateManager.ts:22

- - +therefore the complete history may not be available.

Returns

S[]

The recorded history of page states.

Defined in

packages/core/src/page/state/PageStateManager.ts:44


getState

getState(): S

Returns the current page state.

Returns

S

The current page state.

Defined in

packages/core/src/page/state/PageStateManager.ts:31


getTransactionStatePatches

getTransactionStatePatches(): (null | S | Pick<S, any>)[]

Returns queueing state patches off the main state from the begin of transaction.

Returns

(null | S | Pick<S, any>)[]

State patches from the begin of transaction.

Defined in

packages/core/src/page/state/PageStateManager.ts:53


setState

setState<K>(patchState): void

Sets a new page state by applying the provided patch to the current +state.

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
patchStatenull | S | Pick<S, K>

Returns

void

Defined in

packages/core/src/page/state/PageStateManager.ts:22

+ + \ No newline at end of file diff --git a/api/classes/ima_core.PageStateManagerDecorator/index.html b/api/classes/ima_core.PageStateManagerDecorator/index.html index 343505a008..e8e49dcb72 100644 --- a/api/classes/ima_core.PageStateManagerDecorator/index.html +++ b/api/classes/ima_core.PageStateManagerDecorator/index.html @@ -4,20 +4,20 @@ Class: PageStateManagerDecorator | IMA.js - - + +
-
Skip to main content

Class: PageStateManagerDecorator

@ima/core.PageStateManagerDecorator

Decorator for page state manager, which add logic for limiting Extension -competence.

Hierarchy

Constructors

constructor

new PageStateManagerDecorator(pageStateManager, allowedStateKeys)

Initializes the page state manager decorator.

Parameters

NameType
pageStateManagerPageStateManager<{}>
allowedStateKeysstring[]

Overrides

PageStateManager.constructor

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:25

Properties

_allowedStateKeys

Private _allowedStateKeys: string[]

Array of access keys for state.

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:17


_pageStateManager

Private _pageStateManager: PageStateManager<{}>

The current page state manager.

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:13


onChange

Optional onChange: (newState: {}) => void

Type declaration

▸ (newState): void

Parameters
NameType
newStateObject
Returns

void

Inherited from

PageStateManager.onChange

Defined in

packages/core/src/page/state/PageStateManager.ts:7

Methods

beginTransaction

beginTransaction(): void

Starts queueing state patches off the main state. While the transaction +

Class: PageStateManagerDecorator

@ima/core.PageStateManagerDecorator

Decorator for page state manager, which add logic for limiting Extension +competence.

Hierarchy

Constructors

constructor

new PageStateManagerDecorator(pageStateManager, allowedStateKeys)

Initializes the page state manager decorator.

Parameters

NameType
pageStateManagerPageStateManager<{}>
allowedStateKeysstring[]

Overrides

PageStateManager.constructor

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:25

Properties

_allowedStateKeys

Private _allowedStateKeys: string[]

Array of access keys for state.

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:17


_pageStateManager

Private _pageStateManager: PageStateManager<{}>

The current page state manager.

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:13


onChange

Optional onChange: (newState: {}) => void

Type declaration

▸ (newState): void

Parameters
NameType
newStateObject
Returns

void

Inherited from

PageStateManager.onChange

Defined in

packages/core/src/page/state/PageStateManager.ts:7

Methods

beginTransaction

beginTransaction(): void

Starts queueing state patches off the main state. While the transaction is active every setState call has no effect on the current state.

Note that call to getState after the transaction has begun will -return state as it was before the transaction.

Returns

void

Overrides

PageStateManager.beginTransaction

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:89


cancelTransaction

cancelTransaction(): void

Cancels ongoing transaction. Uncommitted state changes are lost.

Returns

void

Overrides

PageStateManager.cancelTransaction

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:103


clear

clear(): void

Clears the state history.

Returns

void

Overrides

PageStateManager.clear

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:39


commitTransaction

commitTransaction(): void

Applies queued state patches to the main state. All patches are squashed -and applied with one setState call.

Returns

void

Overrides

PageStateManager.commitTransaction

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:96


getAllStates

getAllStates(): {}[]

Returns the recorded history of page states. The states will be +return state as it was before the transaction.

Returns

void

Overrides

PageStateManager.beginTransaction

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:89


cancelTransaction

cancelTransaction(): void

Cancels ongoing transaction. Uncommitted state changes are lost.

Returns

void

Overrides

PageStateManager.cancelTransaction

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:103


clear

clear(): void

Clears the state history.

Returns

void

Overrides

PageStateManager.clear

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:39


commitTransaction

commitTransaction(): void

Applies queued state patches to the main state. All patches are squashed +and applied with one setState call.

Returns

void

Overrides

PageStateManager.commitTransaction

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:96


getAllStates

getAllStates(): {}[]

Returns the recorded history of page states. The states will be chronologically sorted from the oldest to the newest.

Note that the implementation may limit the size of the recorded history, -therefore the complete history may not be available.

Returns

{}[]

The recorded history of page states.

Overrides

PageStateManager.getAllStates

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:75


getState

getState(): Object

Returns the current page state.

Returns

Object

The current page state.

Overrides

PageStateManager.getState

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:68


getTransactionStatePatches

getTransactionStatePatches(): (null | {} | Pick<{}, any>)[]

Returns queueing state patches off the main state from the begin of transaction.

Returns

(null | {} | Pick<{}, any>)[]

State patches from the begin of transaction.

Overrides

PageStateManager.getTransactionStatePatches

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:82


setState

setState(statePatch): void

Sets a new page state by applying the provided patch to the current -state.

Parameters

NameType
statePatchUnknownParameters

Returns

void

Overrides

PageStateManager.setState

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:46

- - +therefore the complete history may not be available.

Returns

{}[]

The recorded history of page states.

Overrides

PageStateManager.getAllStates

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:75


getState

getState(): Object

Returns the current page state.

Returns

Object

The current page state.

Overrides

PageStateManager.getState

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:68


getTransactionStatePatches

getTransactionStatePatches(): (null | {} | Pick<{}, any>)[]

Returns queueing state patches off the main state from the begin of transaction.

Returns

(null | {} | Pick<{}, any>)[]

State patches from the begin of transaction.

Overrides

PageStateManager.getTransactionStatePatches

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:82


setState

setState(statePatch): void

Sets a new page state by applying the provided patch to the current +state.

Parameters

NameType
statePatchUnknownParameters

Returns

void

Overrides

PageStateManager.setState

Defined in

packages/core/src/page/state/PageStateManagerDecorator.ts:46

+ + \ No newline at end of file diff --git a/api/classes/ima_core.PageStateManagerImpl/index.html b/api/classes/ima_core.PageStateManagerImpl/index.html index dc35504159..d001b34798 100644 --- a/api/classes/ima_core.PageStateManagerImpl/index.html +++ b/api/classes/ima_core.PageStateManagerImpl/index.html @@ -4,20 +4,20 @@ Class: PageStateManagerImpl<S> | IMA.js - - + +
-
Skip to main content

Class: PageStateManagerImpl<S>

@ima/core.PageStateManagerImpl

The implementation of the PageStateManager interface.

Type parameters

NameType
Sextends PageState = {}

Hierarchy

Constructors

constructor

new PageStateManagerImpl<S>(dispatcher)

Initializes the page state manager.

Type parameters

NameType
Sextends PageState = {}

Parameters

NameTypeDescription
dispatcherDispatcherDispatcher fires events to app.

Overrides

PageStateManager.constructor

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:40

Properties

_cursor

Private _cursor: number = -1

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:25


_dispatcher

Private _dispatcher: Dispatcher

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:26


_ongoingTransaction

Private _ongoingTransaction: boolean = false

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:27


_statePatchQueue

Private _statePatchQueue: (null | S | Pick<S, any>)[] = []

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:28


_states

Private _states: S[] = []

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:29


onChange

Optional onChange: (newState: S) => void

Type declaration

▸ (newState): void

Parameters
NameType
newStateS
Returns

void

Inherited from

PageStateManager.onChange

Defined in

packages/core/src/page/state/PageStateManager.ts:7

Accessors

$dependencies

Static get $dependencies(): typeof Dispatcher[]

Returns

typeof Dispatcher[]

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:31

Methods

_callOnChangeCallback

_callOnChangeCallback(newState): void

Call registered callback function on (@link onChange) with newState.

Parameters

NameType
newStateS

Returns

void

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:175


_eraseExcessHistory

_eraseExcessHistory(): void

Erase the oldest state from storage only if it exceed max -defined size of history.

Returns

void

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:157


_pushToHistory

_pushToHistory(newState): void

Push new state to history storage.

Parameters

NameType
newStateS

Returns

void

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:167


beginTransaction

beginTransaction(): void

Starts queueing state patches off the main state. While the transaction +

Class: PageStateManagerImpl<S>

@ima/core.PageStateManagerImpl

The implementation of the PageStateManager interface.

Type parameters

NameType
Sextends PageState = {}

Hierarchy

Constructors

constructor

new PageStateManagerImpl<S>(dispatcher)

Initializes the page state manager.

Type parameters

NameType
Sextends PageState = {}

Parameters

NameTypeDescription
dispatcherDispatcherDispatcher fires events to app.

Overrides

PageStateManager.constructor

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:40

Properties

_cursor

Private _cursor: number = -1

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:25


_dispatcher

Private _dispatcher: Dispatcher

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:26


_ongoingTransaction

Private _ongoingTransaction: boolean = false

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:27


_statePatchQueue

Private _statePatchQueue: (null | S | Pick<S, any>)[] = []

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:28


_states

Private _states: S[] = []

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:29


onChange

Optional onChange: (newState: S) => void

Type declaration

▸ (newState): void

Parameters
NameType
newStateS
Returns

void

Inherited from

PageStateManager.onChange

Defined in

packages/core/src/page/state/PageStateManager.ts:7

Accessors

$dependencies

Static get $dependencies(): typeof Dispatcher[]

Returns

typeof Dispatcher[]

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:31

Methods

_callOnChangeCallback

_callOnChangeCallback(newState): void

Call registered callback function on (@link onChange) with newState.

Parameters

NameType
newStateS

Returns

void

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:175


_eraseExcessHistory

_eraseExcessHistory(): void

Erase the oldest state from storage only if it exceed max +defined size of history.

Returns

void

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:157


_pushToHistory

_pushToHistory(newState): void

Push new state to history storage.

Parameters

NameType
newStateS

Returns

void

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:167


beginTransaction

beginTransaction(): void

Starts queueing state patches off the main state. While the transaction is active every setState call has no effect on the current state.

Note that call to getState after the transaction has begun will -return state as it was before the transaction.

Returns

void

Overrides

PageStateManager.beginTransaction

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:106


cancelTransaction

cancelTransaction(): void

Cancels ongoing transaction. Uncommitted state changes are lost.

Returns

void

Overrides

PageStateManager.cancelTransaction

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:148


clear

clear(): void

Clears the state history.

Returns

void

Overrides

PageStateManager.clear

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:49


commitTransaction

commitTransaction(): void

Applies queued state patches to the main state. All patches are squashed -and applied with one setState call.

Returns

void

Overrides

PageStateManager.commitTransaction

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:123


getAllStates

getAllStates(): S[]

Returns the recorded history of page states. The states will be +return state as it was before the transaction.

Returns

void

Overrides

PageStateManager.beginTransaction

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:106


cancelTransaction

cancelTransaction(): void

Cancels ongoing transaction. Uncommitted state changes are lost.

Returns

void

Overrides

PageStateManager.cancelTransaction

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:148


clear

clear(): void

Clears the state history.

Returns

void

Overrides

PageStateManager.clear

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:49


commitTransaction

commitTransaction(): void

Applies queued state patches to the main state. All patches are squashed +and applied with one setState call.

Returns

void

Overrides

PageStateManager.commitTransaction

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:123


getAllStates

getAllStates(): S[]

Returns the recorded history of page states. The states will be chronologically sorted from the oldest to the newest.

Note that the implementation may limit the size of the recorded history, -therefore the complete history may not be available.

Returns

S[]

The recorded history of page states.

Overrides

PageStateManager.getAllStates

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:92


getState

getState(): S

Returns the current page state.

Returns

S

The current page state.

Overrides

PageStateManager.getState

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:85


getTransactionStatePatches

getTransactionStatePatches(): (null | S | Pick<S, any>)[]

Returns queueing state patches off the main state from the begin of transaction.

Returns

(null | S | Pick<S, any>)[]

State patches from the begin of transaction.

Overrides

PageStateManager.getTransactionStatePatches

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:99


setState

setState<K>(patchState): number | void

Sets a new page state by applying the provided patch to the current -state.

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
patchStatenull | S | Pick<S, K>

Returns

number | void

Overrides

PageStateManager.setState

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:59

- - +therefore the complete history may not be available.

Returns

S[]

The recorded history of page states.

Overrides

PageStateManager.getAllStates

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:92


getState

getState(): S

Returns the current page state.

Returns

S

The current page state.

Overrides

PageStateManager.getState

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:85


getTransactionStatePatches

getTransactionStatePatches(): (null | S | Pick<S, any>)[]

Returns queueing state patches off the main state from the begin of transaction.

Returns

(null | S | Pick<S, any>)[]

State patches from the begin of transaction.

Overrides

PageStateManager.getTransactionStatePatches

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:99


setState

setState<K>(patchState): number | void

Sets a new page state by applying the provided patch to the current +state.

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
patchStatenull | S | Pick<S, K>

Returns

number | void

Overrides

PageStateManager.setState

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:59

+ + \ No newline at end of file diff --git a/api/classes/ima_core.PluginLoader/index.html b/api/classes/ima_core.PluginLoader/index.html index 8f5eed50e8..bf5753e1f8 100644 --- a/api/classes/ima_core.PluginLoader/index.html +++ b/api/classes/ima_core.PluginLoader/index.html @@ -4,17 +4,17 @@ Class: PluginLoader | IMA.js - - + +
-
Skip to main content

Class: PluginLoader

@ima/core.PluginLoader

Plugin loader utility used to register external IMA.js plugins. This +

Class: PluginLoader

@ima/core.PluginLoader

Plugin loader utility used to register external IMA.js plugins. This adds ability for external packages to automatically hook into several IMA.js application parts and automatically bootstrap certain settings.

Constructors

constructor

Private new PluginLoader()

Initializes the plugin loader.

This is private constructor and should not be used outside of this file. -You should use the exported instance to register ima.js plugins.

Example

import { pluginLoader } from '@ima/core';

@private

Defined in

packages/core/src/pluginLoader.ts:26

Properties

_bootstrap

Protected Optional _bootstrap: Bootstrap

Defined in

packages/core/src/pluginLoader.ts:14


_plugins

Protected _plugins: Record<string, { name: string ; plugin: InitPluginConfig }>

Defined in

packages/core/src/pluginLoader.ts:10

Methods

getPlugins

getPlugins(): { name: string ; plugin: InitPluginConfig }[]

Returns array of registered IMA.js plugins.

Returns

{ name: string ; plugin: InitPluginConfig }[]

Array of IMA.js plugins.

Defined in

packages/core/src/pluginLoader.ts:88


init

init(bootstrap): void

Initializes the plugin loader with bootstrap instance. Which is later used -to handle dynamically loaded IMA.js plugins.

Parameters

NameTypeDescription
bootstrapBootstrapApp bootstrap instance.

Returns

void

Defined in

packages/core/src/pluginLoader.ts:36


register

register(name, registerFn): void

Registers plugin into IMA.js bootstrap sequence.

Parameters

NameTypeDescription
namestringPlugin name.
registerFn(ns: Namespace) => void | InitPluginConfigPlugin initialization function.

Returns

void

Example

pluginLoader.register('@ima/plugin-logger', ns => {
ns.set('ima.plugin.logger', logger);

return {
initSettings,
initServices,
initBind,
};
});

Defined in

packages/core/src/pluginLoader.ts:57

- - +You should use the exported instance to register ima.js plugins.

Example

import { pluginLoader } from '@ima/core';

@private

Defined in

packages/core/src/pluginLoader.ts:26

Properties

_bootstrap

Protected Optional _bootstrap: Bootstrap

Defined in

packages/core/src/pluginLoader.ts:14


_plugins

Protected _plugins: Record<string, { name: string ; plugin: InitPluginConfig }>

Defined in

packages/core/src/pluginLoader.ts:10

Methods

getPlugins

getPlugins(): { name: string ; plugin: InitPluginConfig }[]

Returns array of registered IMA.js plugins.

Returns

{ name: string ; plugin: InitPluginConfig }[]

Array of IMA.js plugins.

Defined in

packages/core/src/pluginLoader.ts:88


init

init(bootstrap): void

Initializes the plugin loader with bootstrap instance. Which is later used +to handle dynamically loaded IMA.js plugins.

Parameters

NameTypeDescription
bootstrapBootstrapApp bootstrap instance.

Returns

void

Defined in

packages/core/src/pluginLoader.ts:36


register

register(name, registerFn): void

Registers plugin into IMA.js bootstrap sequence.

Parameters

NameTypeDescription
namestringPlugin name.
registerFn(ns: Namespace) => void | InitPluginConfigPlugin initialization function.

Returns

void

Example

pluginLoader.register('@ima/plugin-logger', ns => {
ns.set('ima.plugin.logger', logger);

return {
initSettings,
initServices,
initBind,
};
});

Defined in

packages/core/src/pluginLoader.ts:57

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Request/index.html b/api/classes/ima_core.Request/index.html index 94aa160133..cf1a524969 100644 --- a/api/classes/ima_core.Request/index.html +++ b/api/classes/ima_core.Request/index.html @@ -4,15 +4,15 @@ Class: Request | IMA.js - - + +
-
Skip to main content

Class: Request

@ima/core.Request

Wrapper for the ExpressJS request, exposing only the necessary minimum.

Constructors

constructor

new Request()

Properties

_request

Protected Optional _request: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

The current ExpressJS request object, or null if running at -the client side.

Defined in

packages/core/src/router/Request.ts:14

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/router/Request.ts:16

Methods

getBody

getBody(): any

Returns body of request.

Returns

any

Defined in

packages/core/src/router/Request.ts:68


getCookieHeader

getCookieHeader(): undefined | string

Returns the Cookie HTTP header value.

Returns

undefined | string

The value of the Cookie header.

Defined in

packages/core/src/router/Request.ts:45


getFile

getFile(): any

Returns uploaded file to server and meta information.

Returns

any

Defined in

packages/core/src/router/Request.ts:52


getFiles

getFiles(): any

Returns uploaded files to server with their meta information.

Returns

any

Defined in

packages/core/src/router/Request.ts:60


getHeader

getHeader(header): null | string

Returns the specified HTTP request header.

Parameters

NameType
headerstring

Returns

null | string

Defined in

packages/core/src/router/Request.ts:75


getIP

getIP(): null | string

Returns the remote IP address of the request.

Returns

null | string

Defined in

packages/core/src/router/Request.ts:82


getIPs

getIPs(): string[]

Returns array of IP addresses specified in the “X-Forwarded-For” -request header.

Returns

string[]

Defined in

packages/core/src/router/Request.ts:90


getMethod

getMethod(): string

Returns

string

Defined in

packages/core/src/router/Request.ts:94


getPath

getPath(): string

Returns the path part of the URL to which the request was made.

Returns

string

The path to which the request was made.

Defined in

packages/core/src/router/Request.ts:36


init

init(request): void

Initializes the request using the provided ExpressJS request object.

Parameters

NameTypeDescription
requestRequest<ParamsDictionary, any, any, ParsedQs, Record<string, any>>The ExpressJS request object representing the current request. Use null at the client side.

Returns

void

Defined in

packages/core/src/router/Request.ts:27

- - +
Skip to main content

Class: Request

@ima/core.Request

Wrapper for the ExpressJS request, exposing only the necessary minimum.

Constructors

constructor

new Request()

Properties

_request

Protected Optional _request: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

The current ExpressJS request object, or null if running at +the client side.

Defined in

packages/core/src/router/Request.ts:14

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/router/Request.ts:16

Methods

getBody

getBody(): any

Returns body of request.

Returns

any

Defined in

packages/core/src/router/Request.ts:68


getCookieHeader

getCookieHeader(): undefined | string

Returns the Cookie HTTP header value.

Returns

undefined | string

The value of the Cookie header.

Defined in

packages/core/src/router/Request.ts:45


getFile

getFile(): any

Returns uploaded file to server and meta information.

Returns

any

Defined in

packages/core/src/router/Request.ts:52


getFiles

getFiles(): any

Returns uploaded files to server with their meta information.

Returns

any

Defined in

packages/core/src/router/Request.ts:60


getHeader

getHeader(header): null | string

Returns the specified HTTP request header.

Parameters

NameType
headerstring

Returns

null | string

Defined in

packages/core/src/router/Request.ts:75


getIP

getIP(): null | string

Returns the remote IP address of the request.

Returns

null | string

Defined in

packages/core/src/router/Request.ts:82


getIPs

getIPs(): string[]

Returns array of IP addresses specified in the “X-Forwarded-For” +request header.

Returns

string[]

Defined in

packages/core/src/router/Request.ts:90


getMethod

getMethod(): string

Returns

string

Defined in

packages/core/src/router/Request.ts:94


getPath

getPath(): string

Returns the path part of the URL to which the request was made.

Returns

string

The path to which the request was made.

Defined in

packages/core/src/router/Request.ts:36


init

init(request): void

Initializes the request using the provided ExpressJS request object.

Parameters

NameTypeDescription
requestRequest<ParamsDictionary, any, any, ParsedQs, Record<string, any>>The ExpressJS request object representing the current request. Use null at the client side.

Returns

void

Defined in

packages/core/src/router/Request.ts:27

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Response/index.html b/api/classes/ima_core.Response/index.html index 04753b6f42..d04fcb790a 100644 --- a/api/classes/ima_core.Response/index.html +++ b/api/classes/ima_core.Response/index.html @@ -4,17 +4,17 @@ Class: Response | IMA.js - - + +
-
Skip to main content

Class: Response

@ima/core.Response

Wrapper for the ExpressJS response, exposing only the necessary minimum.

Constructors

constructor

new Response()

Properties

_cookieTransformFunction

Protected _cookieTransformFunction: CookieTransformFunction

Transform function for cookie value.

Defined in

packages/core/src/router/Response.ts:35


_internalCookieStorage

Protected _internalCookieStorage: Map<string, { options: CookieOptions ; value: string }>

Internal cookie storage for Set-Cookie header.

Defined in

packages/core/src/router/Response.ts:27


_internalHeadersStorage

Protected _internalHeadersStorage: UnknownParameters = {}

Defined in

packages/core/src/router/Response.ts:31


_response

Protected Optional _response: Response<any, Record<string, any>>

The ExpressJS response object, or undefined if running at the -client side.

Defined in

packages/core/src/router/Response.ts:23

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/router/Response.ts:40

Methods

getResponseParams

getResponseParams(): Object

Return object which contains response headers and cookie.

Returns

Object

NameType
cookieMap<string, { options: CookieOptions ; value: string }>
headersUnknownParameters

Defined in

packages/core/src/router/Response.ts:172


init

init(response, cookieTransformFunction?): Response

Initializes this response wrapper with the provided ExpressJS response -object.

Parameters

NameTypeDescription
responseResponse<any, Record<string, any>>The ExpressJS response, or null if the code is running at the client side.
cookieTransformFunctionObject-

Returns

Response

This response.

Defined in

packages/core/src/router/Response.ts:53


redirect

redirect(url, options?): void

Redirects the client to the specified location, with the specified +

Class: Response

@ima/core.Response

Wrapper for the ExpressJS response, exposing only the necessary minimum.

Constructors

constructor

new Response()

Properties

_cookieTransformFunction

Protected _cookieTransformFunction: CookieTransformFunction

Transform function for cookie value.

Defined in

packages/core/src/router/Response.ts:35


_internalCookieStorage

Protected _internalCookieStorage: Map<string, { options: CookieOptions ; value: string }>

Internal cookie storage for Set-Cookie header.

Defined in

packages/core/src/router/Response.ts:27


_internalHeadersStorage

Protected _internalHeadersStorage: UnknownParameters = {}

Defined in

packages/core/src/router/Response.ts:31


_response

Protected Optional _response: Response<any, Record<string, any>>

The ExpressJS response object, or undefined if running at the +client side.

Defined in

packages/core/src/router/Response.ts:23

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/router/Response.ts:40

Methods

getResponseParams

getResponseParams(): Object

Return object which contains response headers and cookie.

Returns

Object

NameType
cookieMap<string, { options: CookieOptions ; value: string }>
headersUnknownParameters

Defined in

packages/core/src/router/Response.ts:172


init

init(response, cookieTransformFunction?): Response

Initializes this response wrapper with the provided ExpressJS response +object.

Parameters

NameTypeDescription
responseResponse<any, Record<string, any>>The ExpressJS response, or null if the code is running at the client side.
cookieTransformFunctionObject-

Returns

Response

This response.

Defined in

packages/core/src/router/Response.ts:53


redirect

redirect(url, options?): void

Redirects the client to the specified location, with the specified redirect HTTP response code.

For full list of HTTP response status codes see -http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Use this method only at the server side.

Parameters

NameTypeDescription
urlstringThe URL to which the client should be redirected. @param[status=302] The HTTP status code to send to the client.
optionsPartial<RouteOptions>-

Returns

void

This response.

Defined in

packages/core/src/router/Response.ts:80


setCookie

setCookie(name, value, options?): Response

Sets a cookie, which will be sent to the client with the response.

Parameters

NameTypeDescription
namestringThe cookie name.
valuestring | number | booleanThe cookie value, will be converted to string.
optionsCookieOptionsCookie attributes. Only the attributes listed in the type annotation of this field are supported. For documentation and full list of cookie attributes see http://tools.ietf.org/html/rfc2965#page-5

Returns

Response

This response.

Defined in

packages/core/src/router/Response.ts:117


setHeader

setHeader(name, value): Response

Sets a header, which will be sent to the client with the response.

Parameters

NameTypeDescription
namestringThe header name.
valueunknownThe header value, will be

Returns

Response

This response.

Defined in

packages/core/src/router/Response.ts:153

- - +http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Use this method only at the server side.

Parameters

NameTypeDescription
urlstringThe URL to which the client should be redirected. @param[status=302] The HTTP status code to send to the client.
optionsPartial<RouteOptions>-

Returns

void

This response.

Defined in

packages/core/src/router/Response.ts:80


setCookie

setCookie(name, value, options?): Response

Sets a cookie, which will be sent to the client with the response.

Parameters

NameTypeDescription
namestringThe cookie name.
valuestring | number | booleanThe cookie value, will be converted to string.
optionsCookieOptionsCookie attributes. Only the attributes listed in the type annotation of this field are supported. For documentation and full list of cookie attributes see http://tools.ietf.org/html/rfc2965#page-5

Returns

Response

This response.

Defined in

packages/core/src/router/Response.ts:117


setHeader

setHeader(name, value): Response

Sets a header, which will be sent to the client with the response.

Parameters

NameTypeDescription
namestringThe header name.
valueunknownThe header value, will be

Returns

Response

This response.

Defined in

packages/core/src/router/Response.ts:153

+ + \ No newline at end of file diff --git a/api/classes/ima_core.RouteFactory/index.html b/api/classes/ima_core.RouteFactory/index.html index 07ddad6fa9..e90e1996ae 100644 --- a/api/classes/ima_core.RouteFactory/index.html +++ b/api/classes/ima_core.RouteFactory/index.html @@ -4,13 +4,13 @@ Class: RouteFactory | IMA.js - - + +
-
Skip to main content

Class: RouteFactory

@ima/core.RouteFactory

Utility factory used by router to create routes.

Constructors

constructor

new RouteFactory()

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/router/RouteFactory.ts:10

Methods

createRoute

createRoute(name, pathExpression, controller, view, options?): DynamicRoute | StaticRoute

Create new instance of ima.core.router.AbstractRoute.

Parameters

NameTypeDescription
namestringThe unique name of this route, identifying it among the rest of the routes in the application.
pathExpressionstring | RoutePathExpressionA path expression specifying either the URL path part matching this route (must not\ contain a query string) with optionally containing named parameter placeholders specified as :parameterName. Or object defining matcher in form of regular expression and toPath and extractParameters function overrides.
controllerAsyncRouteControllerThe full name of Object Container alias identifying the controller associated with this route.
viewAsyncRouteViewThe full name or Object Container alias identifying the view class associated with this route.
options?Partial<RouteFactoryOptions>The route additional options.

Returns

DynamicRoute | StaticRoute

The constructed route.

Defined in

packages/core/src/router/RouteFactory.ts:32

- - +
Skip to main content

Class: RouteFactory

@ima/core.RouteFactory

Utility factory used by router to create routes.

Constructors

constructor

new RouteFactory()

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/router/RouteFactory.ts:10

Methods

createRoute

createRoute(name, pathExpression, controller, view, options?): DynamicRoute | StaticRoute

Create new instance of ima.core.router.AbstractRoute.

Parameters

NameTypeDescription
namestringThe unique name of this route, identifying it among the rest of the routes in the application.
pathExpressionstring | RoutePathExpressionA path expression specifying either the URL path part matching this route (must not\ contain a query string) with optionally containing named parameter placeholders specified as :parameterName. Or object defining matcher in form of regular expression and toPath and extractParameters function overrides.
controllerAsyncRouteControllerThe full name of Object Container alias identifying the controller associated with this route.
viewAsyncRouteViewThe full name or Object Container alias identifying the view class associated with this route.
options?Partial<RouteFactoryOptions>The route additional options.

Returns

DynamicRoute | StaticRoute

The constructed route.

Defined in

packages/core/src/router/RouteFactory.ts:32

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Router/index.html b/api/classes/ima_core.Router/index.html index 03eae130fa..330a902f58 100644 --- a/api/classes/ima_core.Router/index.html +++ b/api/classes/ima_core.Router/index.html @@ -4,52 +4,52 @@ Class: Router | IMA.js - - + +
-
Skip to main content

Class: Router

@ima/core.Router

The router manages the application's routing configuration and dispatches -controllers and views according to the current URL and the route it matches.

Hierarchy

Constructors

constructor

new Router()

Methods

add

add(name, pathExpression, controller, view, options?): Router

Adds a new route to router.

Parameters

NameTypeDescription
namestringThe unique name of this route, identifying it among the rest of the routes in the application.
pathExpressionstringA path expression specifying the URL path part matching this route (must not contain a query string), optionally containing named parameter placeholders specified as :parameterName. The name of the parameter is terminated by a forward slash (/) or the end of the path expression string. The path expression may also contain optional parameters, which are specified as :?parameterName. It is recommended to specify the optional parameters at the end of the path expression.
controllerAsyncRouteControllerThe full name of Object Container alias identifying the controller associated with this route.
viewAsyncRouteViewThe full name or Object Container alias identifying the view class associated with this route.
options?Partial<RouteOptions>Additional route options, specified how the navigation to the route will be handled. The onlyUpdate can be either a flag signalling whether the current controller and view instances should be kept if they match the ones used by the previous route; or a callback function that will receive the previous controller and view identifiers used in the previously matching route, and returns a boolean representing the value of the flag. This flag is disabled by default. The autoScroll flag signals whether the page should be scrolled to the top when the navigation takes place. This flag is enabled by default.

Returns

Router

This router.

Throws

Thrown if a route with the same name already exists.

Defined in

packages/core/src/router/Router.ts:128


getBaseUrl

getBaseUrl(): string

Returns the application's absolute base URL, pointing to the public root -of the application.

Returns

string

The application's base URL.

Defined in

packages/core/src/router/Router.ts:199


getCurrentRouteInfo

getCurrentRouteInfo(): Object

Returns the information about the currently active route.

Returns

Object

NameType
paramsRouteParams
pathstring
routeAbstractRoute<string | RoutePathExpression>

Throws

Thrown if a route is not define for current path.

Defined in

packages/core/src/router/Router.ts:237


getDomain

getDomain(): string

Returns the application's domain in the following form -${protocol}//${host}.

Returns

string

The current application's domain.

Defined in

packages/core/src/router/Router.ts:209


getHost

getHost(): string

Returns application's host (domain and, if necessary, the port number).

Returns

string

The current application's host.

Defined in

packages/core/src/router/Router.ts:218


getPath

getPath(): string

Returns the current path part of the current URL, including the query -string (if any).

Returns

string

The path and query parts of the current URL.

Defined in

packages/core/src/router/Router.ts:180


getProtocol

getProtocol(): string

Returns the current protocol used to access the application, terminated +

Class: Router

@ima/core.Router

The router manages the application's routing configuration and dispatches +controllers and views according to the current URL and the route it matches.

Hierarchy

Constructors

constructor

new Router()

Methods

add

add(name, pathExpression, controller, view, options?): Router

Adds a new route to router.

Parameters

NameTypeDescription
namestringThe unique name of this route, identifying it among the rest of the routes in the application.
pathExpressionstringA path expression specifying the URL path part matching this route (must not contain a query string), optionally containing named parameter placeholders specified as :parameterName. The name of the parameter is terminated by a forward slash (/) or the end of the path expression string. The path expression may also contain optional parameters, which are specified as :?parameterName. It is recommended to specify the optional parameters at the end of the path expression.
controllerAsyncRouteControllerThe full name of Object Container alias identifying the controller associated with this route.
viewAsyncRouteViewThe full name or Object Container alias identifying the view class associated with this route.
options?Partial<RouteOptions>Additional route options, specified how the navigation to the route will be handled. The onlyUpdate can be either a flag signalling whether the current controller and view instances should be kept if they match the ones used by the previous route; or a callback function that will receive the previous controller and view identifiers used in the previously matching route, and returns a boolean representing the value of the flag. This flag is disabled by default. The autoScroll flag signals whether the page should be scrolled to the top when the navigation takes place. This flag is enabled by default.

Returns

Router

This router.

Throws

Thrown if a route with the same name already exists.

Defined in

packages/core/src/router/Router.ts:128


getBaseUrl

getBaseUrl(): string

Returns the application's absolute base URL, pointing to the public root +of the application.

Returns

string

The application's base URL.

Defined in

packages/core/src/router/Router.ts:199


getCurrentRouteInfo

getCurrentRouteInfo(): Object

Returns the information about the currently active route.

Returns

Object

NameType
paramsRouteParams
pathstring
routeAbstractRoute<string | RoutePathExpression>

Throws

Thrown if a route is not define for current path.

Defined in

packages/core/src/router/Router.ts:237


getDomain

getDomain(): string

Returns the application's domain in the following form +${protocol}//${host}.

Returns

string

The current application's domain.

Defined in

packages/core/src/router/Router.ts:209


getHost

getHost(): string

Returns application's host (domain and, if necessary, the port number).

Returns

string

The current application's host.

Defined in

packages/core/src/router/Router.ts:218


getPath

getPath(): string

Returns the current path part of the current URL, including the query +string (if any).

Returns

string

The path and query parts of the current URL.

Defined in

packages/core/src/router/Router.ts:180


getProtocol

getProtocol(): string

Returns the current protocol used to access the application, terminated by a colon (for example https:).

Returns

string

The current application protocol used to access the -application.

Defined in

packages/core/src/router/Router.ts:229


getRouteHandler

getRouteHandler(name): undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Returns specified handler from registered route handlers.

Parameters

NameTypeDescription
namestringThe route's unique name.

Returns

undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Route with given name or undefined.

Defined in

packages/core/src/router/Router.ts:168


getUrl

getUrl(): string

Returns the current absolute URL (including protocol, host, query, etc).

Returns

string

The current absolute URL.

Defined in

packages/core/src/router/Router.ts:189


handleError

handleError(params, options?, locals?): Promise<void | UnknownParameters>

Handles an internal server error by responding with the appropriate +application.

Defined in

packages/core/src/router/Router.ts:229


getRouteHandler

getRouteHandler(name): undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Returns specified handler from registered route handlers.

Parameters

NameTypeDescription
namestringThe route's unique name.

Returns

undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Route with given name or undefined.

Defined in

packages/core/src/router/Router.ts:168


getUrl

getUrl(): string

Returns the current absolute URL (including protocol, host, query, etc).

Returns

string

The current absolute URL.

Defined in

packages/core/src/router/Router.ts:189


handleError

handleError(params, options?, locals?): Promise<void | UnknownParameters>

Handles an internal server error by responding with the appropriate "internal server error" error page.

Parameters

NameTypeDescription
paramsRouteParamsParameters extracted from the current URL path and query.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void | UnknownParameters>

A promise resolved when the error has been handled and the response has been sent to the client, -or displayed if used at the client side.

Defined in

packages/core/src/router/Router.ts:374


handleNotFound

handleNotFound(params, options?, locals?): Promise<void | UnknownParameters>

Handles a "not found" error by responding with the appropriate "not +or displayed if used at the client side.

Defined in

packages/core/src/router/Router.ts:374


handleNotFound

handleNotFound(params, options?, locals?): Promise<void | UnknownParameters>

Handles a "not found" error by responding with the appropriate "not found" error page.

Parameters

NameTypeDescription
paramsRouteParamsParameters extracted from the current URL path and query.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void | UnknownParameters>

A promise resolved when the error has been handled and the response has been sent -to the client, or displayed if used at the client side.

Defined in

packages/core/src/router/Router.ts:396


init

init(config): void

Initializes the router with the provided configuration.

Parameters

NameTypeDescription
configObjectRouter configuration. The $Protocol field must be the current protocol used to access the application, terminated by a colon (for example https:). The $Root field must specify the URL path pointing to the application's root. The $LanguagePartPath field must be the URL path fragment used as a suffix to the $Root field that specifies the current language. The $Host field must be the application's domain (and the port number if other than the default is used) in the following form: ${protocol}//${host}.
config.$Hoststring-
config.$LanguagePartPathstring-
config.$Protocolstring-
config.$Rootstring-

Returns

void

Defined in

packages/core/src/router/Router.ts:84


isClientError

isClientError(reason): boolean

Tests, if possible, whether the specified error was caused by the +to the client, or displayed if used at the client side.

Defined in

packages/core/src/router/Router.ts:396


init

init(config): void

Initializes the router with the provided configuration.

Parameters

NameTypeDescription
configObjectRouter configuration. The $Protocol field must be the current protocol used to access the application, terminated by a colon (for example https:). The $Root field must specify the URL path pointing to the application's root. The $LanguagePartPath field must be the URL path fragment used as a suffix to the $Root field that specifies the current language. The $Host field must be the application's domain (and the port number if other than the default is used) in the following form: ${protocol}//${host}.
config.$Hoststring-
config.$LanguagePartPathstring-
config.$Protocolstring-
config.$Rootstring-

Returns

void

Defined in

packages/core/src/router/Router.ts:84


isClientError

isClientError(reason): boolean

Tests, if possible, whether the specified error was caused by the client's action (for example wrong URL or request encoding) or by a failure at the server side.

Parameters

NameTypeDescription
reasonError | ErrorThe encountered error.

Returns

boolean

true if the error was caused the action of the -client.

Defined in

packages/core/src/router/Router.ts:413


isRedirection

isRedirection(reason): boolean

Tests, if possible, whether the specified error lead to redirection.

Parameters

NameTypeDescription
reasonError | ErrorThe encountered error.

Returns

boolean

true if the error was caused the action of the -redirection.

Defined in

packages/core/src/router/Router.ts:424


link(routeName, params): string

Generates an absolute URL (including protocol, domain, etc) for the +client.

Defined in

packages/core/src/router/Router.ts:413


isRedirection

isRedirection(reason): boolean

Tests, if possible, whether the specified error lead to redirection.

Parameters

NameTypeDescription
reasonError | ErrorThe encountered error.

Returns

boolean

true if the error was caused the action of the +redirection.

Defined in

packages/core/src/router/Router.ts:424


link(routeName, params): string

Generates an absolute URL (including protocol, domain, etc) for the specified route by substituting the route's parameter placeholders with -the provided parameter values.

Parameters

NameTypeDescription
routeNamestringThe unique name of the route, identifying the route to use.
paramsRouteParamsParameter values for the route's parameter placeholders. Extraneous parameters will be added as URL query.

Returns

string

An absolute URL for the specified route and parameters.

Defined in

packages/core/src/router/Router.ts:332


listen

listen(): Router

Registers event listeners at the client side window object allowing the +the provided parameter values.

Parameters

NameTypeDescription
routeNamestringThe unique name of the route, identifying the route to use.
paramsRouteParamsParameter values for the route's parameter placeholders. Extraneous parameters will be added as URL query.

Returns

string

An absolute URL for the specified route and parameters.

Defined in

packages/core/src/router/Router.ts:332


listen

listen(): Router

Registers event listeners at the client side window object allowing the router to capture user's history (history pop state - going "back") and page (clicking links) navigation.

The router will start processing the navigation internally, handling the user's navigation to display the page related to the URL resulting from the user's action.

Note that the router will not prevent forms from being submitted to the server.

The effects of this method can be reverted with unlisten. This -method has no effect at the server side.

Returns

Router

This router.

Defined in

packages/core/src/router/Router.ts:264


redirect

redirect(url, options?, action?, locals?): void

Redirects the client to the specified location.

At the server side the method results in responding to the client with a +method has no effect at the server side.

Returns

Router

This router.

Defined in

packages/core/src/router/Router.ts:264


redirect

redirect(url, options?, action?, locals?): void

Redirects the client to the specified location.

At the server side the method results in responding to the client with a redirect HTTP status code and the Location header.

At the client side the method updates the current URL by manipulating the browser history (if the target URL is at the same domain and protocol as the current one) or performs a hard redirect (if the target URL points to a different protocol or domain).

The method will result in the router handling the new URL and routing the client to the related page if the URL is set at the client side and -points to the same domain and protocol.

Parameters

NameTypeDescription
urlstringThe URL to which the client should be redirected.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
action?RouteActionAn action object describing what triggered this routing.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

void

Defined in

packages/core/src/router/Router.ts:311


remove

remove(name): Router

Removes the specified route from the router's known routes.

Parameters

NameTypeDescription
namestringThe route's unique name, identifying the route to remove.

Returns

Router

This router.

Defined in

packages/core/src/router/Router.ts:158


route

route(path, options?, action?, locals?): Promise<void | UnknownParameters>

Routes the application to the route matching the providing path, renders +points to the same domain and protocol.

Parameters

NameTypeDescription
urlstringThe URL to which the client should be redirected.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
action?RouteActionAn action object describing what triggered this routing.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

void

Defined in

packages/core/src/router/Router.ts:311


remove

remove(name): Router

Removes the specified route from the router's known routes.

Parameters

NameTypeDescription
namestringThe route's unique name, identifying the route to remove.

Returns

Router

This router.

Defined in

packages/core/src/router/Router.ts:158


route

route(path, options?, action?, locals?): Promise<void | UnknownParameters>

Routes the application to the route matching the providing path, renders the route page and sends the result to the client.

Parameters

NameTypeDescription
pathstringThe URL path part received from the client, with optional query.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
action?RouteActionAn action object describing what triggered this routing.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void | UnknownParameters>

A promise resolved when the error has been handled and the response has been sent -to the client, or displayed if used at the client side.

Defined in

packages/core/src/router/Router.ts:351


unlisten

unlisten(): Router

Unregisters event listeners at the client side window object allowing the +to the client, or displayed if used at the client side.

Defined in

packages/core/src/router/Router.ts:351


unlisten

unlisten(): Router

Unregisters event listeners at the client side window object allowing the router to capture user's history (history pop state - going "back") and page (clicking links) navigation.

The router will stop processing the navigation internally, handling the user's navigation to display the page related to the URL resulting from the user's action.

Note that the router will not prevent forms from being submitted to the server.

The effects of this method can be reverted with unlisten. This method has no effect -at the server side.

Returns

Router

This router.

Defined in

packages/core/src/router/Router.ts:285


use

use(middleware): Router

Adds a new middleware to router.

Parameters

NameTypeDescription
middlewareRouterMiddlewareMiddleware function accepting routeParams as a first argument, which can be mutated and locals object as second argument. This can be used to pass data between middlewares.

Returns

Router

This router.

Throws

Thrown if a middleware with the same name already exists.

Defined in

packages/core/src/router/Router.ts:148

- - +at the server side.

Returns

Router

This router.

Defined in

packages/core/src/router/Router.ts:285


use

use(middleware): Router

Adds a new middleware to router.

Parameters

NameTypeDescription
middlewareRouterMiddlewareMiddleware function accepting routeParams as a first argument, which can be mutated and locals object as second argument. This can be used to pass data between middlewares.

Returns

Router

This router.

Throws

Thrown if a middleware with the same name already exists.

Defined in

packages/core/src/router/Router.ts:148

+ + \ No newline at end of file diff --git a/api/classes/ima_core.SerialBatch/index.html b/api/classes/ima_core.SerialBatch/index.html index 70693541b7..27268335a9 100644 --- a/api/classes/ima_core.SerialBatch/index.html +++ b/api/classes/ima_core.SerialBatch/index.html @@ -4,17 +4,17 @@ Class: SerialBatch | IMA.js - - + +
-
Skip to main content

Class: SerialBatch

@ima/core.SerialBatch

Basic implementation of the Execution interface. Provides the basic -functionality for appending and validating jobs.

Hierarchy

Constructors

constructor

new SerialBatch(jobs?)

Parameters

NameTypeDefault value
jobsExecutionJob[][]

Inherited from

AbstractExecution.constructor

Defined in

packages/core/src/execution/AbstractExecution.ts:13

Properties

_jobs

Protected _jobs: ExecutionJob[]

Inherited from

AbstractExecution._jobs

Defined in

packages/core/src/execution/AbstractExecution.ts:11

Methods

_executeJob

_executeJob(stage, args): Promise<unknown>

Parameters

NameType
stageExecutionJob
argsunknown[]

Returns

Promise<unknown>

Defined in

packages/core/src/execution/SerialBatch.ts:22


_validateJob

_validateJob(job): boolean

Return true if the given job can be executed

Parameters

NameType
jobExecutionJob

Returns

boolean

Inherited from

AbstractExecution._validateJob

Defined in

packages/core/src/execution/AbstractExecution.ts:44


append

append(jobs): void

Adds a new job to be executed. The job is appended at the end of the -list of current jobs therefore is executed last.

Parameters

NameTypeDescription
jobsExecutionJob | ExecutionJob[]The jobs to be executed.

Returns

void

Inherited from

AbstractExecution.append

Defined in

packages/core/src/execution/AbstractExecution.ts:22


execute

execute(...args): Promise<unknown>

Start executing collected jobs. In the end a Promise is returned +

Class: SerialBatch

@ima/core.SerialBatch

Basic implementation of the Execution interface. Provides the basic +functionality for appending and validating jobs.

Hierarchy

Constructors

constructor

new SerialBatch(jobs?)

Parameters

NameTypeDefault value
jobsExecutionJob[][]

Inherited from

AbstractExecution.constructor

Defined in

packages/core/src/execution/AbstractExecution.ts:13

Properties

_jobs

Protected _jobs: ExecutionJob[]

Inherited from

AbstractExecution._jobs

Defined in

packages/core/src/execution/AbstractExecution.ts:11

Methods

_executeJob

_executeJob(stage, args): Promise<unknown>

Parameters

NameType
stageExecutionJob
argsunknown[]

Returns

Promise<unknown>

Defined in

packages/core/src/execution/SerialBatch.ts:22


_validateJob

_validateJob(job): boolean

Return true if the given job can be executed

Parameters

NameType
jobExecutionJob

Returns

boolean

Inherited from

AbstractExecution._validateJob

Defined in

packages/core/src/execution/AbstractExecution.ts:44


append

append(jobs): void

Adds a new job to be executed. The job is appended at the end of the +list of current jobs therefore is executed last.

Parameters

NameTypeDescription
jobsExecutionJob | ExecutionJob[]The jobs to be executed.

Returns

void

Inherited from

AbstractExecution.append

Defined in

packages/core/src/execution/AbstractExecution.ts:22


execute

execute(...args): Promise<unknown>

Start executing collected jobs. In the end a Promise is returned with a resulting value. On the returned Promise a catch -method can be called to prevent any unwanted interruption.

Parameters

NameTypeDescription
...argsunknown[]Arguments to be passed when executing jobs

Returns

Promise<unknown>

Overrides

AbstractExecution.execute

Defined in

packages/core/src/execution/SerialBatch.ts:8

- - +method can be called to prevent any unwanted interruption.

Parameters

NameTypeDescription
...argsunknown[]Arguments to be passed when executing jobs

Returns

Promise<unknown>

Overrides

AbstractExecution.execute

Defined in

packages/core/src/execution/SerialBatch.ts:8

+ + \ No newline at end of file diff --git a/api/classes/ima_core.ServerPageManager/index.html b/api/classes/ima_core.ServerPageManager/index.html index 5f8d356a51..19b493db8e 100644 --- a/api/classes/ima_core.ServerPageManager/index.html +++ b/api/classes/ima_core.ServerPageManager/index.html @@ -4,41 +4,41 @@ Class: ServerPageManager | IMA.js - - + +
-
Skip to main content

Class: ServerPageManager

@ima/core.ServerPageManager

Page manager for controller on the server side.

Hierarchy

Constructors

constructor

new ServerPageManager(pageFactory, pageRenderer, pageStateManager, pageHandlerRegistry, dispatcher)

Initializes the page manager.

Parameters

NameTypeDescription
pageFactoryPageFactoryFactory used by the page manager to create instances of the controller for the current route, and decorate the controllers and page state managers.
pageRendererPageRendererThe current renderer of the page.
pageStateManagerPageStateManager<{}>The current page state manager.
pageHandlerRegistryPageHandlerRegistryInstance of HandlerRegistry that holds a list of pre-manage and post-manage handlers.
dispatcherDispatcher-

Inherited from

AbstractPageManager.constructor

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:95

Properties

_dispatcher

Protected _dispatcher: Dispatcher

Inherited from

AbstractPageManager._dispatcher

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:81


_managedPage

Protected _managedPage: ManagedPage

Details of the currently managed page.

Inherited from

AbstractPageManager._managedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:68


_pageFactory

Protected _pageFactory: PageFactory

Factory used by the page manager to create instances of the +

Class: ServerPageManager

@ima/core.ServerPageManager

Page manager for controller on the server side.

Hierarchy

Constructors

constructor

new ServerPageManager(pageFactory, pageRenderer, pageStateManager, pageHandlerRegistry, dispatcher)

Initializes the page manager.

Parameters

NameTypeDescription
pageFactoryPageFactoryFactory used by the page manager to create instances of the controller for the current route, and decorate the controllers and page state managers.
pageRendererPageRendererThe current renderer of the page.
pageStateManagerPageStateManager<{}>The current page state manager.
pageHandlerRegistryPageHandlerRegistryInstance of HandlerRegistry that holds a list of pre-manage and post-manage handlers.
dispatcherDispatcher-

Inherited from

AbstractPageManager.constructor

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:95

Properties

_dispatcher

Protected _dispatcher: Dispatcher

Inherited from

AbstractPageManager._dispatcher

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:81


_managedPage

Protected _managedPage: ManagedPage

Details of the currently managed page.

Inherited from

AbstractPageManager._managedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:68


_pageFactory

Protected _pageFactory: PageFactory

Factory used by the page manager to create instances of the controller for the current route, and decorate the controllers and -page state managers.

Inherited from

AbstractPageManager._pageFactory

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:63


_pageHandlerRegistry

Protected _pageHandlerRegistry: PageHandlerRegistry

A registry that holds a list of pre-manage and post-manage handlers.

Inherited from

AbstractPageManager._pageHandlerRegistry

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:80


_pageRenderer

Protected _pageRenderer: PageRenderer

The current renderer of the page.

Inherited from

AbstractPageManager._pageRenderer

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:72


_pageStateManager

Protected _pageStateManager: PageStateManager<{}>

The current page state manager.

Inherited from

AbstractPageManager._pageStateManager

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:76


_previousManagedPage

Protected _previousManagedPage: ManagedPage

Snapshot of the previously managed page before it was replaced with -a new one

Inherited from

AbstractPageManager._previousManagedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:57

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/page/manager/ServerPageManager.ts:15

Methods

#cancelable

Private #cancelable<T>(promise): Promise<T>

Type parameters

Name
T

Parameters

NameType
promiseT

Returns

Promise<T>

Inherited from

AbstractPageManager.#cancelable

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:845


_activateController

Protected _activateController(): Promise<void>

Activate managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._activateController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:549


_activateExtensions

Protected _activateExtensions(): Promise<void>

Activate extensions for managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._activateExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:563


_activatePageSource

Protected _activatePageSource(): Promise<void>

Activate page source so call activate method on controller and his -extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._activatePageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:529


_clearComponentState

_clearComponentState(options): void

The method clear state on current rendered component to DOM.

Parameters

NameTypeDescription
optionsRouteOptionsThe current route options.

Returns

void

Inherited from

AbstractPageManager._clearComponentState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:753


_constructManagedPageValue

Protected _constructManagedPageValue(controller, view, route, options, params, controllerInstance, decoratedController, viewInstance): ManagedPage

Parameters

NameType
controllerRouteController
viewunknown
routeAbstractRoute<string | RoutePathExpression>
optionsRouteOptions
paramsRouteParams
controllerInstanceController<PageState, RouteParams, PageState>
decoratedControllerControllerDecorator<{}, {}, {}>
viewInstanceunknown

Returns

ManagedPage

Inherited from

AbstractPageManager._constructManagedPageValue

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:245


_deactivateController

Protected _deactivateController(): Promise<void>

Deactivate last managed instance of controller only If controller was -activated.

Returns

Promise<void>

Inherited from

AbstractPageManager._deactivateController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:691


_deactivateExtensions

Protected _deactivateExtensions(): Promise<void>

Deactivate extensions for last managed instance of controller only if -they were activated.

Returns

Promise<void>

Inherited from

AbstractPageManager._deactivateExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:702


_deactivatePageSource

Protected _deactivatePageSource(): Promise<void>

Deactivate page source so call deactivate method on controller and his -extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._deactivatePageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:677


_destroyController

Protected _destroyController(): Promise<void>

Destroy last managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._destroyController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:726


_destroyExtensions

Protected _destroyExtensions(): Promise<void>

Destroy extensions for last managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._destroyExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:739


_destroyPageSource

Protected _destroyPageSource(): Promise<void>

Destroy page source so call destroy method on controller and his -extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._destroyPageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:714


_getInitialManagedPage

Protected _getInitialManagedPage(): ManagedPage

Clear value from managed page.

Returns

ManagedPage

Inherited from

AbstractPageManager._getInitialManagedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:302


_getLoadedControllerState

Protected _getLoadedControllerState(): Promise<{}>

Load controller state from managed instance of controller.

Returns

Promise<{}>

Inherited from

AbstractPageManager._getLoadedControllerState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:485


_getLoadedExtensionsState

Protected _getLoadedExtensionsState(controllerState?): Promise<UnknownParameters>

Load extensions state from managed instance of controller.

Parameters

NameType
controllerState?UnknownParameters

Returns

Promise<UnknownParameters>

Inherited from

AbstractPageManager._getLoadedExtensionsState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:501


_getUpdatedControllerState

Protected _getUpdatedControllerState(): {} | Promise<{}>

Return updated controller state for current page controller.

Returns

{} | Promise<{}>

Inherited from

AbstractPageManager._getUpdatedControllerState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:621


_getUpdatedExtensionsState

Protected _getUpdatedExtensionsState(controllerState?): Promise<UnknownParameters>

Return updated extensions state for current page controller.

Parameters

NameType
controllerState?UnknownParameters

Returns

Promise<UnknownParameters>

Inherited from

AbstractPageManager._getUpdatedExtensionsState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:637


_hasOnlyUpdate

Protected _hasOnlyUpdate(controller, view, options): boolean

Return true if manager has to update last managed controller and view.

Parameters

NameType
controllerRouteController
viewunknown
optionsRouteOptions

Returns

boolean

Inherited from

AbstractPageManager._hasOnlyUpdate

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:769


_initController

Protected _initController(): Promise<void>

Initializes managed instance of controller with the provided parameters.

Returns

Promise<void>

Inherited from

AbstractPageManager._initController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:398


_initExtensions

Protected _initExtensions(): Promise<void>

Initialize extensions for managed instance of controller with the -provided parameters.

Returns

Promise<void>

Inherited from

AbstractPageManager._initExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:413


_initPageSource

Protected _initPageSource(): Promise<void>

Initialize page source so call init method on controller and his -extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._initPageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:383


_loadPageSource

Protected _loadPageSource(): Promise<void | PageData>

Load page source so call load method on controller and his extensions. -Merge loaded state and render it.

Returns

Promise<void | PageData>

Inherited from

AbstractPageManager._loadPageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:443


_runPostManageHandlers

Protected _runPostManageHandlers(previousManagedPage, action): Promise<unknown>

Parameters

NameType
previousManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Inherited from

AbstractPageManager._runPostManageHandlers

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:809


_runPreManageHandlers

Protected _runPreManageHandlers(actualManagedPage, action): Promise<unknown>

Parameters

NameType
actualManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Inherited from

AbstractPageManager._runPreManageHandlers

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:788


_setRestrictedPageStateManager

_setRestrictedPageStateManager(extension, extensionState): void

Set page state manager to extension which has restricted rights to set -global state.

Parameters

NameType
extensionExtension<{}, {}, {}>
extensionStateUnknownParameters

Returns

void

Inherited from

AbstractPageManager._setRestrictedPageStateManager

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:342


_storeManagedPageSnapshot

Protected _storeManagedPageSnapshot(): void

Creates a cloned version of currently managed page and stores it in +page state managers.

Inherited from

AbstractPageManager._pageFactory

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:63


_pageHandlerRegistry

Protected _pageHandlerRegistry: PageHandlerRegistry

A registry that holds a list of pre-manage and post-manage handlers.

Inherited from

AbstractPageManager._pageHandlerRegistry

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:80


_pageRenderer

Protected _pageRenderer: PageRenderer

The current renderer of the page.

Inherited from

AbstractPageManager._pageRenderer

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:72


_pageStateManager

Protected _pageStateManager: PageStateManager<{}>

The current page state manager.

Inherited from

AbstractPageManager._pageStateManager

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:76


_previousManagedPage

Protected _previousManagedPage: ManagedPage

Snapshot of the previously managed page before it was replaced with +a new one

Inherited from

AbstractPageManager._previousManagedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:57

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/page/manager/ServerPageManager.ts:15

Methods

#cancelable

Private #cancelable<T>(promise): Promise<T>

Type parameters

Name
T

Parameters

NameType
promiseT

Returns

Promise<T>

Inherited from

AbstractPageManager.#cancelable

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:845


_activateController

Protected _activateController(): Promise<void>

Activate managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._activateController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:549


_activateExtensions

Protected _activateExtensions(): Promise<void>

Activate extensions for managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._activateExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:563


_activatePageSource

Protected _activatePageSource(): Promise<void>

Activate page source so call activate method on controller and his +extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._activatePageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:529


_clearComponentState

_clearComponentState(options): void

The method clear state on current rendered component to DOM.

Parameters

NameTypeDescription
optionsRouteOptionsThe current route options.

Returns

void

Inherited from

AbstractPageManager._clearComponentState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:753


_constructManagedPageValue

Protected _constructManagedPageValue(controller, view, route, options, params, controllerInstance, decoratedController, viewInstance): ManagedPage

Parameters

NameType
controllerRouteController
viewunknown
routeAbstractRoute<string | RoutePathExpression>
optionsRouteOptions
paramsRouteParams
controllerInstanceController<PageState, RouteParams, PageState>
decoratedControllerControllerDecorator<{}, {}, {}>
viewInstanceunknown

Returns

ManagedPage

Inherited from

AbstractPageManager._constructManagedPageValue

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:245


_deactivateController

Protected _deactivateController(): Promise<void>

Deactivate last managed instance of controller only If controller was +activated.

Returns

Promise<void>

Inherited from

AbstractPageManager._deactivateController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:691


_deactivateExtensions

Protected _deactivateExtensions(): Promise<void>

Deactivate extensions for last managed instance of controller only if +they were activated.

Returns

Promise<void>

Inherited from

AbstractPageManager._deactivateExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:702


_deactivatePageSource

Protected _deactivatePageSource(): Promise<void>

Deactivate page source so call deactivate method on controller and his +extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._deactivatePageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:677


_destroyController

Protected _destroyController(): Promise<void>

Destroy last managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._destroyController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:726


_destroyExtensions

Protected _destroyExtensions(): Promise<void>

Destroy extensions for last managed instance of controller.

Returns

Promise<void>

Inherited from

AbstractPageManager._destroyExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:739


_destroyPageSource

Protected _destroyPageSource(): Promise<void>

Destroy page source so call destroy method on controller and his +extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._destroyPageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:714


_getInitialManagedPage

Protected _getInitialManagedPage(): ManagedPage

Clear value from managed page.

Returns

ManagedPage

Inherited from

AbstractPageManager._getInitialManagedPage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:302


_getLoadedControllerState

Protected _getLoadedControllerState(): Promise<{}>

Load controller state from managed instance of controller.

Returns

Promise<{}>

Inherited from

AbstractPageManager._getLoadedControllerState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:485


_getLoadedExtensionsState

Protected _getLoadedExtensionsState(controllerState?): Promise<UnknownParameters>

Load extensions state from managed instance of controller.

Parameters

NameType
controllerState?UnknownParameters

Returns

Promise<UnknownParameters>

Inherited from

AbstractPageManager._getLoadedExtensionsState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:501


_getUpdatedControllerState

Protected _getUpdatedControllerState(): {} | Promise<{}>

Return updated controller state for current page controller.

Returns

{} | Promise<{}>

Inherited from

AbstractPageManager._getUpdatedControllerState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:621


_getUpdatedExtensionsState

Protected _getUpdatedExtensionsState(controllerState?): Promise<UnknownParameters>

Return updated extensions state for current page controller.

Parameters

NameType
controllerState?UnknownParameters

Returns

Promise<UnknownParameters>

Inherited from

AbstractPageManager._getUpdatedExtensionsState

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:637


_hasOnlyUpdate

Protected _hasOnlyUpdate(controller, view, options): boolean

Return true if manager has to update last managed controller and view.

Parameters

NameType
controllerRouteController
viewunknown
optionsRouteOptions

Returns

boolean

Inherited from

AbstractPageManager._hasOnlyUpdate

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:769


_initController

Protected _initController(): Promise<void>

Initializes managed instance of controller with the provided parameters.

Returns

Promise<void>

Inherited from

AbstractPageManager._initController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:398


_initExtensions

Protected _initExtensions(): Promise<void>

Initialize extensions for managed instance of controller with the +provided parameters.

Returns

Promise<void>

Inherited from

AbstractPageManager._initExtensions

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:413


_initPageSource

Protected _initPageSource(): Promise<void>

Initialize page source so call init method on controller and his +extensions.

Returns

Promise<void>

Inherited from

AbstractPageManager._initPageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:383


_loadPageSource

Protected _loadPageSource(): Promise<void | PageData>

Load page source so call load method on controller and his extensions. +Merge loaded state and render it.

Returns

Promise<void | PageData>

Inherited from

AbstractPageManager._loadPageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:443


_runPostManageHandlers

Protected _runPostManageHandlers(previousManagedPage, action): Promise<unknown>

Parameters

NameType
previousManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Inherited from

AbstractPageManager._runPostManageHandlers

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:809


_runPreManageHandlers

Protected _runPreManageHandlers(actualManagedPage, action): Promise<unknown>

Parameters

NameType
actualManagedPageManagedPage
actionPageAction

Returns

Promise<unknown>

Inherited from

AbstractPageManager._runPreManageHandlers

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:788


_setRestrictedPageStateManager

_setRestrictedPageStateManager(extension, extensionState): void

Set page state manager to extension which has restricted rights to set +global state.

Parameters

NameType
extensionExtension<{}, {}, {}>
extensionStateUnknownParameters

Returns

void

Inherited from

AbstractPageManager._setRestrictedPageStateManager

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:342


_storeManagedPageSnapshot

Protected _storeManagedPageSnapshot(): void

Creates a cloned version of currently managed page and stores it in a helper property. Snapshot is used in manager handlers to easily determine differences -between the current and the previous state.

Returns

void

Inherited from

AbstractPageManager._storeManagedPageSnapshot

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:281


_stripManagedPageValueForPublic

Protected _stripManagedPageValueForPublic(value): Object

Removes properties we do not want to propagate outside of the page manager

Parameters

NameTypeDescription
valueManagedPageThe managed page object to strip down

Returns

Object

NameType
controllerRouteController
optionsRouteOptions
paramsRouteParams
routeAbstractRoute<string | RoutePathExpression>
viewunknown

Inherited from

AbstractPageManager._stripManagedPageValueForPublic

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:332


_switchToPageStateManager

Protected _switchToPageStateManager(): void

Iterates over extensions of current controller and switches each one to -pageStateManager and clears their partial state.

Returns

void

Inherited from

AbstractPageManager._switchToPageStateManager

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:430


_switchToPageStateManagerAfterLoaded

_switchToPageStateManagerAfterLoaded(extension, extensionState): void

For defined extension switches to pageStageManager and clears partial state -after extension state is loaded.

Parameters

NameType
extensionExtension<{}, {}, {}>
extensionStateUnknownParameters

Returns

void

Inherited from

AbstractPageManager._switchToPageStateManagerAfterLoaded

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:363


_updatePageSource

Protected _updatePageSource(): Promise<void | PageData>

Update page source so call update method on controller and his -extensions. Merge updated state and render it.

Returns

Promise<void | PageData>

Inherited from

AbstractPageManager._updatePageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:580


destroy

destroy(): Promise<void>

Finalization callback, called when the page manager is being discarded. -This usually happens when the page is hot-reloaded at the client side.

Returns

Promise<void>

Inherited from

AbstractPageManager.destroy

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:232


getViewController

Protected getViewController(route): Promise<{ controller: RouteController ; view: RouteView }>

Parameters

NameType
routeAbstractRoute<string | RoutePathExpression>

Returns

Promise<{ controller: RouteController ; view: RouteView }>

Inherited from

AbstractPageManager.getViewController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:833


init

init(): void

Initializes the page manager.

Returns

void

Inherited from

AbstractPageManager.init

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:114


manage

manage(«destructured»): Promise<void | PageData>

Starts to manage the provided controller and its view. The manager +between the current and the previous state.

Returns

void

Inherited from

AbstractPageManager._storeManagedPageSnapshot

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:281


_stripManagedPageValueForPublic

Protected _stripManagedPageValueForPublic(value): Object

Removes properties we do not want to propagate outside of the page manager

Parameters

NameTypeDescription
valueManagedPageThe managed page object to strip down

Returns

Object

NameType
controllerRouteController
optionsRouteOptions
paramsRouteParams
routeAbstractRoute<string | RoutePathExpression>
viewunknown

Inherited from

AbstractPageManager._stripManagedPageValueForPublic

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:332


_switchToPageStateManager

Protected _switchToPageStateManager(): void

Iterates over extensions of current controller and switches each one to +pageStateManager and clears their partial state.

Returns

void

Inherited from

AbstractPageManager._switchToPageStateManager

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:430


_switchToPageStateManagerAfterLoaded

_switchToPageStateManagerAfterLoaded(extension, extensionState): void

For defined extension switches to pageStageManager and clears partial state +after extension state is loaded.

Parameters

NameType
extensionExtension<{}, {}, {}>
extensionStateUnknownParameters

Returns

void

Inherited from

AbstractPageManager._switchToPageStateManagerAfterLoaded

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:363


_updatePageSource

Protected _updatePageSource(): Promise<void | PageData>

Update page source so call update method on controller and his +extensions. Merge updated state and render it.

Returns

Promise<void | PageData>

Inherited from

AbstractPageManager._updatePageSource

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:580


destroy

destroy(): Promise<void>

Finalization callback, called when the page manager is being discarded. +This usually happens when the page is hot-reloaded at the client side.

Returns

Promise<void>

Inherited from

AbstractPageManager.destroy

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:232


getViewController

Protected getViewController(route): Promise<{ controller: RouteController ; view: RouteView }>

Parameters

NameType
routeAbstractRoute<string | RoutePathExpression>

Returns

Promise<{ controller: RouteController ; view: RouteView }>

Inherited from

AbstractPageManager.getViewController

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:833


init

init(): void

Initializes the page manager.

Returns

void

Inherited from

AbstractPageManager.init

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:114


manage

manage(«destructured»): Promise<void | PageData>

Starts to manage the provided controller and its view. The manager stops the management of any previously managed controller and view.

The controller and view will be initialized and rendered either into the UI (at the client-side) or to the response to send to the client (at the server-side).

Parameters

NameType
«destructured»ManageArgs

Returns

Promise<void | PageData>

A promise that will resolve to information about the rendered page. The status will contain the HTTP status code to send to the client (at the server side) or determine the type of error page -to navigate to (at the client side).

Inherited from

AbstractPageManager.manage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:133


postManage

postManage(): void

Called by router after currently managed route is resolved.

Returns

void

Inherited from

AbstractPageManager.postManage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:223


preManage

preManage(): Promise<void>

Pre manage handler, should be called and awaited before tryint to handle +to navigate to (at the client side).

Inherited from

AbstractPageManager.manage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:133


postManage

postManage(): void

Called by router after currently managed route is resolved.

Returns

void

Inherited from

AbstractPageManager.postManage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:223


preManage

preManage(): Promise<void>

Pre manage handler, should be called and awaited before tryint to handle new route handler. This pre manage takes care of canceling any currently executed route handlers and returns promise which is resolved when previous -page finished loading (even if it got canceled).

Returns

Promise<void>

Inherited from

AbstractPageManager.preManage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:123

- - +page finished loading (even if it got canceled).

Returns

Promise<void>

Inherited from

AbstractPageManager.preManage

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:123

+ + \ No newline at end of file diff --git a/api/classes/ima_core.ServerRouter/index.html b/api/classes/ima_core.ServerRouter/index.html index 3af86e41bb..428faaa98a 100644 --- a/api/classes/ima_core.ServerRouter/index.html +++ b/api/classes/ima_core.ServerRouter/index.html @@ -4,66 +4,66 @@ Class: ServerRouter | IMA.js - - + +
-
Skip to main content

Class: ServerRouter

@ima/core.ServerRouter

The server-side implementation of the Router interface.

Hierarchy

Constructors

constructor

new ServerRouter(pageManager, factory, dispatcher, request, response, settings)

Initializes the router.

Parameters

NameTypeDescription
pageManagerPageManagerThe current page manager.
factoryRouteFactoryThe router factory used to create routes.
dispatcherDispatcherDispatcher fires events to app.
requestRequestThe current HTTP request.
responseResponseThe current HTTP response.
settingsundefined | number | { isSPARouted?: (url: string, action?: RouteAction) => boolean ; middlewareTimeout?: number }$Router settings.

Overrides

AbstractRouter.constructor

Defined in

packages/core/src/router/ServerRouter.ts:42

Properties

#request

Private #request: Request

Defined in

packages/core/src/router/ServerRouter.ts:18


#response

Private #response: Response

Defined in

packages/core/src/router/ServerRouter.ts:19


_currentMiddlewareId

Protected _currentMiddlewareId: number = 0

Middleware ID counter which is used to auto-generate unique middleware -names when adding them to routeHandlers map.

Inherited from

AbstractRouter._currentMiddlewareId

Defined in

packages/core/src/router/AbstractRouter.ts:92


_currentlyRoutedPath

Protected _currentlyRoutedPath: string = ''

Inherited from

AbstractRouter._currentlyRoutedPath

Defined in

packages/core/src/router/AbstractRouter.ts:93


_dispatcher

Protected _dispatcher: Dispatcher

Dispatcher fires events to app.

Inherited from

AbstractRouter._dispatcher

Defined in

packages/core/src/router/AbstractRouter.ts:62


_factory

Protected _factory: RouteFactory

Factory for routes.

Inherited from

AbstractRouter._factory

Defined in

packages/core/src/router/AbstractRouter.ts:58


_host

Protected _host: string = ''

The application's host.

Inherited from

AbstractRouter._host

Defined in

packages/core/src/router/AbstractRouter.ts:71


_isSPARouted

Protected _isSPARouted: undefined | (url: string, action?: RouteAction) => boolean

Inherited from

AbstractRouter._isSPARouted

Defined in

packages/core/src/router/AbstractRouter.ts:95


_languagePartPath

Protected _languagePartPath: string = ''

The URL path fragment used as a suffix to the _root field -that specifies the current language.

Inherited from

AbstractRouter._languagePartPath

Defined in

packages/core/src/router/AbstractRouter.ts:80


_middlewareTimeout

Protected _middlewareTimeout: number

Inherited from

AbstractRouter._middlewareTimeout

Defined in

packages/core/src/router/AbstractRouter.ts:94


_pageManager

Protected _pageManager: PageManager

The page manager handling UI rendering, and transitions between -pages if at the client side.

Inherited from

AbstractRouter._pageManager

Defined in

packages/core/src/router/AbstractRouter.ts:54


_protocol

Protected _protocol: string = ''

The current protocol used to access the application, terminated by a -colon (for example https:).

Inherited from

AbstractRouter._protocol

Defined in

packages/core/src/router/AbstractRouter.ts:67


_root

Protected _root: string = ''

The URL path pointing to the application's root.

Inherited from

AbstractRouter._root

Defined in

packages/core/src/router/AbstractRouter.ts:75


_routeHandlers

Protected _routeHandlers: Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Storage of all known routes and middlewares. The key are their names.

Inherited from

AbstractRouter._routeHandlers

Defined in

packages/core/src/router/AbstractRouter.ts:84

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/router/ServerRouter.ts:21

Methods

#addParamsFromOriginalRoute

Private #addParamsFromOriginalRoute(params): Object

Obtains original route that was handled before not-found / error route +

Class: ServerRouter

@ima/core.ServerRouter

The server-side implementation of the Router interface.

Hierarchy

Constructors

constructor

new ServerRouter(pageManager, factory, dispatcher, request, response, settings)

Initializes the router.

Parameters

NameTypeDescription
pageManagerPageManagerThe current page manager.
factoryRouteFactoryThe router factory used to create routes.
dispatcherDispatcherDispatcher fires events to app.
requestRequestThe current HTTP request.
responseResponseThe current HTTP response.
settingsundefined | number | { isSPARouted?: (url: string, action?: RouteAction) => boolean ; middlewareTimeout?: number }$Router settings.

Overrides

AbstractRouter.constructor

Defined in

packages/core/src/router/ServerRouter.ts:42

Properties

#request

Private #request: Request

Defined in

packages/core/src/router/ServerRouter.ts:18


#response

Private #response: Response

Defined in

packages/core/src/router/ServerRouter.ts:19


_currentMiddlewareId

Protected _currentMiddlewareId: number = 0

Middleware ID counter which is used to auto-generate unique middleware +names when adding them to routeHandlers map.

Inherited from

AbstractRouter._currentMiddlewareId

Defined in

packages/core/src/router/AbstractRouter.ts:92


_currentlyRoutedPath

Protected _currentlyRoutedPath: string = ''

Inherited from

AbstractRouter._currentlyRoutedPath

Defined in

packages/core/src/router/AbstractRouter.ts:93


_dispatcher

Protected _dispatcher: Dispatcher

Dispatcher fires events to app.

Inherited from

AbstractRouter._dispatcher

Defined in

packages/core/src/router/AbstractRouter.ts:62


_factory

Protected _factory: RouteFactory

Factory for routes.

Inherited from

AbstractRouter._factory

Defined in

packages/core/src/router/AbstractRouter.ts:58


_host

Protected _host: string = ''

The application's host.

Inherited from

AbstractRouter._host

Defined in

packages/core/src/router/AbstractRouter.ts:71


_isSPARouted

Protected _isSPARouted: undefined | (url: string, action?: RouteAction) => boolean

Inherited from

AbstractRouter._isSPARouted

Defined in

packages/core/src/router/AbstractRouter.ts:95


_languagePartPath

Protected _languagePartPath: string = ''

The URL path fragment used as a suffix to the _root field +that specifies the current language.

Inherited from

AbstractRouter._languagePartPath

Defined in

packages/core/src/router/AbstractRouter.ts:80


_middlewareTimeout

Protected _middlewareTimeout: number

Inherited from

AbstractRouter._middlewareTimeout

Defined in

packages/core/src/router/AbstractRouter.ts:94


_pageManager

Protected _pageManager: PageManager

The page manager handling UI rendering, and transitions between +pages if at the client side.

Inherited from

AbstractRouter._pageManager

Defined in

packages/core/src/router/AbstractRouter.ts:54


_protocol

Protected _protocol: string = ''

The current protocol used to access the application, terminated by a +colon (for example https:).

Inherited from

AbstractRouter._protocol

Defined in

packages/core/src/router/AbstractRouter.ts:67


_root

Protected _root: string = ''

The URL path pointing to the application's root.

Inherited from

AbstractRouter._root

Defined in

packages/core/src/router/AbstractRouter.ts:75


_routeHandlers

Protected _routeHandlers: Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Storage of all known routes and middlewares. The key are their names.

Inherited from

AbstractRouter._routeHandlers

Defined in

packages/core/src/router/AbstractRouter.ts:84

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/router/ServerRouter.ts:21

Methods

#addParamsFromOriginalRoute

Private #addParamsFromOriginalRoute(params): Object

Obtains original route that was handled before not-found / error route and assigns its params to current params

Parameters

NameTypeDescription
paramsRouteParamsRoute params for not-found or error page

Returns

Object

Provided params merged with params -from original route

Inherited from

AbstractRouter.#addParamsFromOriginalRoute

Defined in

packages/core/src/router/AbstractRouter.ts:733


_extractRoutePath

Protected _extractRoutePath(path): string

Strips the URL path part that points to the application's root (base -URL) from the provided path.

Parameters

NameTypeDescription
pathstringRelative or absolute URL path.

Returns

string

URL path relative to the application's base URL.

Inherited from

AbstractRouter._extractRoutePath

Defined in

packages/core/src/router/AbstractRouter.ts:526


_getCurrentlyRoutedPath

_getCurrentlyRoutedPath(): string

Returns path that is stored in private property when a route -method is called.

Returns

string

Inherited from

AbstractRouter._getCurrentlyRoutedPath

Defined in

packages/core/src/router/AbstractRouter.ts:664


_getMiddlewaresForRoute

_getMiddlewaresForRoute(routeName): RouterMiddleware[]

Returns middlewares preceding given route name.

Parameters

NameType
routeNamestring

Returns

RouterMiddleware[]

Inherited from

AbstractRouter._getMiddlewaresForRoute

Defined in

packages/core/src/router/AbstractRouter.ts:642


_handle

_handle(route, params, options?, action?): Promise<void | UnknownParameters>

Handles the provided route and parameters by initializing the route's +from original route

Inherited from

AbstractRouter.#addParamsFromOriginalRoute

Defined in

packages/core/src/router/AbstractRouter.ts:733


_extractRoutePath

Protected _extractRoutePath(path): string

Strips the URL path part that points to the application's root (base +URL) from the provided path.

Parameters

NameTypeDescription
pathstringRelative or absolute URL path.

Returns

string

URL path relative to the application's base URL.

Inherited from

AbstractRouter._extractRoutePath

Defined in

packages/core/src/router/AbstractRouter.ts:526


_getCurrentlyRoutedPath

_getCurrentlyRoutedPath(): string

Returns path that is stored in private property when a route +method is called.

Returns

string

Inherited from

AbstractRouter._getCurrentlyRoutedPath

Defined in

packages/core/src/router/AbstractRouter.ts:664


_getMiddlewaresForRoute

_getMiddlewaresForRoute(routeName): RouterMiddleware[]

Returns middlewares preceding given route name.

Parameters

NameType
routeNamestring

Returns

RouterMiddleware[]

Inherited from

AbstractRouter._getMiddlewaresForRoute

Defined in

packages/core/src/router/AbstractRouter.ts:642


_handle

_handle(route, params, options?, action?): Promise<void | UnknownParameters>

Handles the provided route and parameters by initializing the route's controller and rendering its state via the route's view.

The result is then sent to the client if used at the server side, or displayed if used as the client side.

Parameters

NameTypeDescription
routeAbstractRoute<string | RoutePathExpression>The route that should have its associated controller rendered via the associated view.
paramsRouteParamsParameters extracted from the URL path and query.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
action?RouteActionAn action object describing what triggered this routing.

Returns

Promise<void | UnknownParameters>

A promise that resolves when the page is rendered and the result is sent to the client, or -displayed if used at the client side.

Inherited from

AbstractRouter._handle

Defined in

packages/core/src/router/AbstractRouter.ts:549


_runMiddlewares

_runMiddlewares(middlewares, params, locals): Promise<void>

Runs provided middlewares in sequence.

Parameters

NameTypeDescription
middlewaresundefined | RouterMiddleware[]Array of middlewares.
paramsRouteParamsRouter params that can be mutated by middlewares.
localsRouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void>

Inherited from

AbstractRouter._runMiddlewares

Defined in

packages/core/src/router/AbstractRouter.ts:677


add

add(name, pathExpression, controller, view, options?): ServerRouter

Adds a new route to router.

Parameters

NameTypeDescription
namestringThe unique name of this route, identifying it among the rest of the routes in the application.
pathExpressionstringA path expression specifying the URL path part matching this route (must not contain a query string), optionally containing named parameter placeholders specified as :parameterName. The name of the parameter is terminated by a forward slash (/) or the end of the path expression string. The path expression may also contain optional parameters, which are specified as :?parameterName. It is recommended to specify the optional parameters at the end of the path expression.
controllerAsyncRouteControllerThe full name of Object Container alias identifying the controller associated with this route.
viewAsyncRouteViewThe full name or Object Container alias identifying the view class associated with this route.
options?Partial<RouteOptions>Additional route options, specified how the navigation to the route will be handled. The onlyUpdate can be either a flag signalling whether the current controller and view instances should be kept if they match the ones used by the previous route; or a callback function that will receive the previous controller and view identifiers used in the previously matching route, and returns a boolean representing the value of the flag. This flag is disabled by default. The autoScroll flag signals whether the page should be scrolled to the top when the navigation takes place. This flag is enabled by default.

Returns

ServerRouter

This router.

Throws

Thrown if a route with the same name already exists.

Inherited from

AbstractRouter.add

Defined in

packages/core/src/router/AbstractRouter.ts:167


getBaseUrl

getBaseUrl(): string

Returns the application's absolute base URL, pointing to the public root -of the application.

Returns

string

The application's base URL.

Inherited from

AbstractRouter.getBaseUrl

Defined in

packages/core/src/router/AbstractRouter.ts:243


getCurrentRouteInfo

getCurrentRouteInfo(): Object

Returns the information about the currently active route.

Returns

Object

NameType
paramsRouteParams<{}>
pathstring
routeAbstractRoute<string | RoutePathExpression>

Throws

Thrown if a route is not define for current path.

Inherited from

AbstractRouter.getCurrentRouteInfo

Defined in

packages/core/src/router/AbstractRouter.ts:271


getDomain

getDomain(): string

Returns the application's domain in the following form -${protocol}//${host}.

Returns

string

The current application's domain.

Inherited from

AbstractRouter.getDomain

Defined in

packages/core/src/router/AbstractRouter.ts:250


getHost

getHost(): string

Returns application's host (domain and, if necessary, the port number).

Returns

string

The current application's host.

Inherited from

AbstractRouter.getHost

Defined in

packages/core/src/router/AbstractRouter.ts:257


getPath

getPath(): string

Returns the current path part of the current URL, including the query -string (if any).

Returns

string

The path and query parts of the current URL.

Overrides

AbstractRouter.getPath

Defined in

packages/core/src/router/ServerRouter.ts:59


getProtocol

getProtocol(): string

Returns the current protocol used to access the application, terminated +displayed if used at the client side.

Inherited from

AbstractRouter._handle

Defined in

packages/core/src/router/AbstractRouter.ts:549


_runMiddlewares

_runMiddlewares(middlewares, params, locals): Promise<void>

Runs provided middlewares in sequence.

Parameters

NameTypeDescription
middlewaresundefined | RouterMiddleware[]Array of middlewares.
paramsRouteParamsRouter params that can be mutated by middlewares.
localsRouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void>

Inherited from

AbstractRouter._runMiddlewares

Defined in

packages/core/src/router/AbstractRouter.ts:677


add

add(name, pathExpression, controller, view, options?): ServerRouter

Adds a new route to router.

Parameters

NameTypeDescription
namestringThe unique name of this route, identifying it among the rest of the routes in the application.
pathExpressionstringA path expression specifying the URL path part matching this route (must not contain a query string), optionally containing named parameter placeholders specified as :parameterName. The name of the parameter is terminated by a forward slash (/) or the end of the path expression string. The path expression may also contain optional parameters, which are specified as :?parameterName. It is recommended to specify the optional parameters at the end of the path expression.
controllerAsyncRouteControllerThe full name of Object Container alias identifying the controller associated with this route.
viewAsyncRouteViewThe full name or Object Container alias identifying the view class associated with this route.
options?Partial<RouteOptions>Additional route options, specified how the navigation to the route will be handled. The onlyUpdate can be either a flag signalling whether the current controller and view instances should be kept if they match the ones used by the previous route; or a callback function that will receive the previous controller and view identifiers used in the previously matching route, and returns a boolean representing the value of the flag. This flag is disabled by default. The autoScroll flag signals whether the page should be scrolled to the top when the navigation takes place. This flag is enabled by default.

Returns

ServerRouter

This router.

Throws

Thrown if a route with the same name already exists.

Inherited from

AbstractRouter.add

Defined in

packages/core/src/router/AbstractRouter.ts:167


getBaseUrl

getBaseUrl(): string

Returns the application's absolute base URL, pointing to the public root +of the application.

Returns

string

The application's base URL.

Inherited from

AbstractRouter.getBaseUrl

Defined in

packages/core/src/router/AbstractRouter.ts:243


getCurrentRouteInfo

getCurrentRouteInfo(): Object

Returns the information about the currently active route.

Returns

Object

NameType
paramsRouteParams<{}>
pathstring
routeAbstractRoute<string | RoutePathExpression>

Throws

Thrown if a route is not define for current path.

Inherited from

AbstractRouter.getCurrentRouteInfo

Defined in

packages/core/src/router/AbstractRouter.ts:271


getDomain

getDomain(): string

Returns the application's domain in the following form +${protocol}//${host}.

Returns

string

The current application's domain.

Inherited from

AbstractRouter.getDomain

Defined in

packages/core/src/router/AbstractRouter.ts:250


getHost

getHost(): string

Returns application's host (domain and, if necessary, the port number).

Returns

string

The current application's host.

Inherited from

AbstractRouter.getHost

Defined in

packages/core/src/router/AbstractRouter.ts:257


getPath

getPath(): string

Returns the current path part of the current URL, including the query +string (if any).

Returns

string

The path and query parts of the current URL.

Overrides

AbstractRouter.getPath

Defined in

packages/core/src/router/ServerRouter.ts:59


getProtocol

getProtocol(): string

Returns the current protocol used to access the application, terminated by a colon (for example https:).

Returns

string

The current application protocol used to access the -application.

Inherited from

AbstractRouter.getProtocol

Defined in

packages/core/src/router/AbstractRouter.ts:264


getRouteHandler

getRouteHandler(name): undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Returns specified handler from registered route handlers.

Parameters

NameTypeDescription
namestringThe route's unique name.

Returns

undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Route with given name or undefined.

Inherited from

AbstractRouter.getRouteHandler

Defined in

packages/core/src/router/AbstractRouter.ts:220


getRouteHandlers

getRouteHandlers(): Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Returns

Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Inherit Doc

Inherited from

AbstractRouter.getRouteHandlers

Defined in

packages/core/src/router/AbstractRouter.ts:297


getRouteHandlersByPath

getRouteHandlersByPath(path): Object

Returns the route matching the provided URL path part (the path may +application.

Inherited from

AbstractRouter.getProtocol

Defined in

packages/core/src/router/AbstractRouter.ts:264


getRouteHandler

getRouteHandler(name): undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Returns specified handler from registered route handlers.

Parameters

NameTypeDescription
namestringThe route's unique name.

Returns

undefined | AbstractRoute<string | RoutePathExpression> | RouterMiddleware

Route with given name or undefined.

Inherited from

AbstractRouter.getRouteHandler

Defined in

packages/core/src/router/AbstractRouter.ts:220


getRouteHandlers

getRouteHandlers(): Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Returns

Map<string, AbstractRoute<string | RoutePathExpression> | RouterMiddleware>

Inherit Doc

Inherited from

AbstractRouter.getRouteHandlers

Defined in

packages/core/src/router/AbstractRouter.ts:297


getRouteHandlersByPath

getRouteHandlersByPath(path): Object

Returns the route matching the provided URL path part (the path may contain a query) and all middlewares preceding this route definition.

Parameters

NameTypeDescription
pathstringThe URL path.

Returns

Object

The route matching the path and middlewares preceding it or {} -(empty object) if no such route exists.

NameType
middlewaresRouterMiddleware[]
route?AbstractRoute<string | RoutePathExpression>

Inherited from

AbstractRouter.getRouteHandlersByPath

Defined in

packages/core/src/router/AbstractRouter.ts:615


getUrl

getUrl(): string

Returns the current absolute URL (including protocol, host, query, etc).

Returns

string

The current absolute URL.

Inherited from

AbstractRouter.getUrl

Defined in

packages/core/src/router/AbstractRouter.ts:236


handleError

handleError(params, options?, locals?): Promise<void | UnknownParameters>

Handles an internal server error by responding with the appropriate +(empty object) if no such route exists.

NameType
middlewaresRouterMiddleware[]
route?AbstractRoute<string | RoutePathExpression>

Inherited from

AbstractRouter.getRouteHandlersByPath

Defined in

packages/core/src/router/AbstractRouter.ts:615


getUrl

getUrl(): string

Returns the current absolute URL (including protocol, host, query, etc).

Returns

string

The current absolute URL.

Inherited from

AbstractRouter.getUrl

Defined in

packages/core/src/router/AbstractRouter.ts:236


handleError

handleError(params, options?, locals?): Promise<void | UnknownParameters>

Handles an internal server error by responding with the appropriate "internal server error" error page.

Parameters

NameTypeDescription
paramsRouteParamsParameters extracted from the current URL path and query.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void | UnknownParameters>

A promise resolved when the error has been handled and the response has been sent to the client, -or displayed if used at the client side.

Inherited from

AbstractRouter.handleError

Defined in

packages/core/src/router/AbstractRouter.ts:402


handleNotFound

handleNotFound(params, options?, locals?): Promise<void | UnknownParameters>

Handles a "not found" error by responding with the appropriate "not +or displayed if used at the client side.

Inherited from

AbstractRouter.handleError

Defined in

packages/core/src/router/AbstractRouter.ts:402


handleNotFound

handleNotFound(params, options?, locals?): Promise<void | UnknownParameters>

Handles a "not found" error by responding with the appropriate "not found" error page.

Parameters

NameTypeDescription
paramsRouteParamsParameters extracted from the current URL path and query.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void | UnknownParameters>

A promise resolved when the error has been handled and the response has been sent -to the client, or displayed if used at the client side.

Inherited from

AbstractRouter.handleNotFound

Defined in

packages/core/src/router/AbstractRouter.ts:454


init

init(config): void

Initializes the router with the provided configuration.

Parameters

NameTypeDescription
configObjectRouter configuration. The $Protocol field must be the current protocol used to access the application, terminated by a colon (for example https:). The $Root field must specify the URL path pointing to the application's root. The $LanguagePartPath field must be the URL path fragment used as a suffix to the $Root field that specifies the current language. The $Host field must be the application's domain (and the port number if other than the default is used) in the following form: ${protocol}//${host}.
config.$Hoststring-
config.$LanguagePartPath?string-
config.$Protocol?string-
config.$Root?string-

Returns

void

Inherited from

AbstractRouter.init

Defined in

packages/core/src/router/AbstractRouter.ts:151


isClientError

isClientError(reason): boolean

Tests, if possible, whether the specified error was caused by the +to the client, or displayed if used at the client side.

Inherited from

AbstractRouter.handleNotFound

Defined in

packages/core/src/router/AbstractRouter.ts:454


init

init(config): void

Initializes the router with the provided configuration.

Parameters

NameTypeDescription
configObjectRouter configuration. The $Protocol field must be the current protocol used to access the application, terminated by a colon (for example https:). The $Root field must specify the URL path pointing to the application's root. The $LanguagePartPath field must be the URL path fragment used as a suffix to the $Root field that specifies the current language. The $Host field must be the application's domain (and the port number if other than the default is used) in the following form: ${protocol}//${host}.
config.$Hoststring-
config.$LanguagePartPath?string-
config.$Protocol?string-
config.$Root?string-

Returns

void

Inherited from

AbstractRouter.init

Defined in

packages/core/src/router/AbstractRouter.ts:151


isClientError

isClientError(reason): boolean

Tests, if possible, whether the specified error was caused by the client's action (for example wrong URL or request encoding) or by a failure at the server side.

Parameters

NameTypeDescription
reasonError | ErrorThe encountered error.

Returns

boolean

true if the error was caused the action of the -client.

Inherited from

AbstractRouter.isClientError

Defined in

packages/core/src/router/AbstractRouter.ts:507


isRedirection

isRedirection(reason): boolean

Tests, if possible, whether the specified error lead to redirection.

Parameters

NameTypeDescription
reasonError | ErrorThe encountered error.

Returns

boolean

true if the error was caused the action of the -redirection.

Inherited from

AbstractRouter.isRedirection

Defined in

packages/core/src/router/AbstractRouter.ts:514


link(routeName, params): string

Generates an absolute URL (including protocol, domain, etc) for the +client.

Inherited from

AbstractRouter.isClientError

Defined in

packages/core/src/router/AbstractRouter.ts:507


isRedirection

isRedirection(reason): boolean

Tests, if possible, whether the specified error lead to redirection.

Parameters

NameTypeDescription
reasonError | ErrorThe encountered error.

Returns

boolean

true if the error was caused the action of the +redirection.

Inherited from

AbstractRouter.isRedirection

Defined in

packages/core/src/router/AbstractRouter.ts:514


link(routeName, params): string

Generates an absolute URL (including protocol, domain, etc) for the specified route by substituting the route's parameter placeholders with -the provided parameter values.

Parameters

NameTypeDescription
routeNamestringThe unique name of the route, identifying the route to use.
paramsRouteParamsParameter values for the route's parameter placeholders. Extraneous parameters will be added as URL query.

Returns

string

An absolute URL for the specified route and parameters.

Inherited from

AbstractRouter.link

Defined in

packages/core/src/router/AbstractRouter.ts:338


listen

listen(): ServerRouter

Registers event listeners at the client side window object allowing the +the provided parameter values.

Parameters

NameTypeDescription
routeNamestringThe unique name of the route, identifying the route to use.
paramsRouteParamsParameter values for the route's parameter placeholders. Extraneous parameters will be added as URL query.

Returns

string

An absolute URL for the specified route and parameters.

Inherited from

AbstractRouter.link

Defined in

packages/core/src/router/AbstractRouter.ts:338


listen

listen(): ServerRouter

Registers event listeners at the client side window object allowing the router to capture user's history (history pop state - going "back") and page (clicking links) navigation.

The router will start processing the navigation internally, handling the user's navigation to display the page related to the URL resulting from the user's action.

Note that the router will not prevent forms from being submitted to the server.

The effects of this method can be reverted with unlisten. This -method has no effect at the server side.

Returns

ServerRouter

This router.

Overrides

AbstractRouter.listen

Defined in

packages/core/src/router/ServerRouter.ts:66


redirect

redirect(url?, options?): void

Redirects the client to the specified location.

At the server side the method results in responding to the client with a +method has no effect at the server side.

Returns

ServerRouter

This router.

Overrides

AbstractRouter.listen

Defined in

packages/core/src/router/ServerRouter.ts:66


redirect

redirect(url?, options?): void

Redirects the client to the specified location.

At the server side the method results in responding to the client with a redirect HTTP status code and the Location header.

At the client side the method updates the current URL by manipulating the browser history (if the target URL is at the same domain and protocol as the current one) or performs a hard redirect (if the target URL points to a different protocol or domain).

The method will result in the router handling the new URL and routing the client to the related page if the URL is set at the client side and -points to the same domain and protocol.

Parameters

NameTypeDefault valueDescription
urlstring'/'The URL to which the client should be redirected.
options?Partial<RouteOptions>undefinedThe options overrides route options defined in the routes.js configuration file.

Returns

void

Overrides

AbstractRouter.redirect

Defined in

packages/core/src/router/ServerRouter.ts:80


remove

remove(name): ServerRouter

Removes the specified route from the router's known routes.

Parameters

NameTypeDescription
namestringThe route's unique name, identifying the route to remove.

Returns

ServerRouter

This router.

Inherited from

AbstractRouter.remove

Defined in

packages/core/src/router/AbstractRouter.ts:211


route

route(path, options?, action?, locals?): Promise<void | UnknownParameters>

Routes the application to the route matching the providing path, renders +points to the same domain and protocol.

Parameters

NameTypeDefault valueDescription
urlstring'/'The URL to which the client should be redirected.
options?Partial<RouteOptions>undefinedThe options overrides route options defined in the routes.js configuration file.

Returns

void

Overrides

AbstractRouter.redirect

Defined in

packages/core/src/router/ServerRouter.ts:80


remove

remove(name): ServerRouter

Removes the specified route from the router's known routes.

Parameters

NameTypeDescription
namestringThe route's unique name, identifying the route to remove.

Returns

ServerRouter

This router.

Inherited from

AbstractRouter.remove

Defined in

packages/core/src/router/AbstractRouter.ts:211


route

route(path, options?, action?, locals?): Promise<void | UnknownParameters>

Routes the application to the route matching the providing path, renders the route page and sends the result to the client.

Parameters

NameTypeDescription
pathstringThe URL path part received from the client, with optional query.
options?Partial<RouteOptions>The options overrides route options defined in the routes.js configuration file.
action?RouteActionAn action object describing what triggered this routing.
locals?RouteLocalsThe locals param is used to pass local data between middlewares.

Returns

Promise<void | UnknownParameters>

A promise resolved when the error has been handled and the response has been sent -to the client, or displayed if used at the client side.

Inherited from

AbstractRouter.route

Defined in

packages/core/src/router/AbstractRouter.ts:363


unlisten

unlisten(): ServerRouter

Unregisters event listeners at the client side window object allowing the +to the client, or displayed if used at the client side.

Inherited from

AbstractRouter.route

Defined in

packages/core/src/router/AbstractRouter.ts:363


unlisten

unlisten(): ServerRouter

Unregisters event listeners at the client side window object allowing the router to capture user's history (history pop state - going "back") and page (clicking links) navigation.

The router will stop processing the navigation internally, handling the user's navigation to display the page related to the URL resulting from the user's action.

Note that the router will not prevent forms from being submitted to the server.

The effects of this method can be reverted with unlisten. This method has no effect -at the server side.

Returns

ServerRouter

This router.

Overrides

AbstractRouter.unlisten

Defined in

packages/core/src/router/ServerRouter.ts:73


use

use(middleware): ServerRouter

Adds a new middleware to router.

Parameters

NameTypeDescription
middlewareRouterMiddlewareMiddleware function accepting routeParams as a first argument, which can be mutated and locals object as second argument. This can be used to pass data between middlewares.

Returns

ServerRouter

This router.

Throws

Thrown if a middleware with the same name already exists.

Inherited from

AbstractRouter.use

Defined in

packages/core/src/router/AbstractRouter.ts:199

- - +at the server side.

Returns

ServerRouter

This router.

Overrides

AbstractRouter.unlisten

Defined in

packages/core/src/router/ServerRouter.ts:73


use

use(middleware): ServerRouter

Adds a new middleware to router.

Parameters

NameTypeDescription
middlewareRouterMiddlewareMiddleware function accepting routeParams as a first argument, which can be mutated and locals object as second argument. This can be used to pass data between middlewares.

Returns

ServerRouter

This router.

Throws

Thrown if a middleware with the same name already exists.

Inherited from

AbstractRouter.use

Defined in

packages/core/src/router/AbstractRouter.ts:199

+ + \ No newline at end of file diff --git a/api/classes/ima_core.ServerWindow/index.html b/api/classes/ima_core.ServerWindow/index.html index 4759daeb7e..b21f23b3aa 100644 --- a/api/classes/ima_core.ServerWindow/index.html +++ b/api/classes/ima_core.ServerWindow/index.html @@ -4,40 +4,40 @@ Class: ServerWindow | IMA.js - - + +
-
Skip to main content

Class: ServerWindow

@ima/core.ServerWindow

Server-side implementation of the Window utility API.

Hierarchy

Constructors

constructor

new ServerWindow()

Inherited from

Window.constructor

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/window/ServerWindow.ts:11

Methods

bindEventListener

bindEventListener(): void

Registers the provided event listener to be executed when the specified +

Class: ServerWindow

@ima/core.ServerWindow

Server-side implementation of the Window utility API.

Hierarchy

Constructors

constructor

new ServerWindow()

Inherited from

Window.constructor

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/window/ServerWindow.ts:11

Methods

bindEventListener

bindEventListener(): void

Registers the provided event listener to be executed when the specified event occurs on the specified event target.

Registering the same event listener for the same event on the same event target with the same useCapture flag value repeatedly has no -effect.

Returns

void

Overrides

Window.bindEventListener

Defined in

packages/core/src/window/ServerWindow.ts:195


createCustomEvent

createCustomEvent<T>(name, options): CustomEvent<T>

Create new instance of CustomEvent of the specified name and using the -provided options.

Type parameters

Name
T

Parameters

NameTypeDescription
namestringCustom event's name (sometimes referred to as the event's type).
optionsCustomEventInit<T>The custom event's options.

Returns

CustomEvent<T>

The created custom event.

See

https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent

Overrides

Window.createCustomEvent

Defined in

packages/core/src/window/ServerWindow.ts:179


getBody

getBody(): undefined

Returns the document's body element. The method returns +effect.

Returns

void

Overrides

Window.bindEventListener

Defined in

packages/core/src/window/ServerWindow.ts:195


createCustomEvent

createCustomEvent<T>(name, options): CustomEvent<T>

Create new instance of CustomEvent of the specified name and using the +provided options.

Type parameters

Name
T

Parameters

NameTypeDescription
namestringCustom event's name (sometimes referred to as the event's type).
optionsCustomEventInit<T>The custom event's options.

Returns

CustomEvent<T>

The created custom event.

See

https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent

Overrides

Window.createCustomEvent

Defined in

packages/core/src/window/ServerWindow.ts:179


getBody

getBody(): undefined

Returns the document's body element. The method returns undefined if invoked at the server-side.

Returns

undefined

The document's body element, or -undefined if invoked at the server side.

Overrides

Window.getBody

Defined in

packages/core/src/window/ServerWindow.ts:109


getDocument

getDocument(): undefined

Returns the native document object representing any web page loaded +undefined if invoked at the server side.

Overrides

Window.getBody

Defined in

packages/core/src/window/ServerWindow.ts:109


getDocument

getDocument(): undefined

Returns the native document object representing any web page loaded in the browser and serves as an entry point into the web page's content which is the DOM tree at the client-side. The method returns undefined if used at the server-side.

Returns

undefined

The document object at the -client-side, or undefined at the server-side.

Overrides

Window.getDocument

Defined in

packages/core/src/window/ServerWindow.ts:53


getDomain

getDomain(): ""

Returns the domain of the current document's URL as -${protocol}://${host}.

Returns

""

The current domain.

Overrides

Window.getDomain

Defined in

packages/core/src/window/ServerWindow.ts:81


getElementById

getElementById(): null

Returns the HTML element with the specified id attribute value.

Returns

null

The element with the specified id, or -null if no such element exists.

Overrides

Window.getElementById

Defined in

packages/core/src/window/ServerWindow.ts:116


getHistoryState

getHistoryState(): undefined

Returns the history state.

Returns

undefined

The current history state

Overrides

Window.getHistoryState

Defined in

packages/core/src/window/ServerWindow.ts:123


getHost

getHost(): ""

Returns

""

The current host.

Overrides

Window.getHost

Defined in

packages/core/src/window/ServerWindow.ts:88


getPath

getPath(): ""

Returns the path part of the current URL, including the query string.

Returns

""

The path and query string parts of the current URL.

Overrides

Window.getPath

Defined in

packages/core/src/window/ServerWindow.ts:95


getScrollX

getScrollX(): 0

Returns the number of pixels the viewport is scrolled horizontally.

Returns

0

The number of pixels the viewport is scrolled -horizontally.

Overrides

Window.getScrollX

Defined in

packages/core/src/window/ServerWindow.ts:60


getScrollY

getScrollY(): 0

Returns the number of pixels the document is scrolled vertically.

Returns

0

The number of pixels the document is scrolled -vertically.

Overrides

Window.getScrollY

Defined in

packages/core/src/window/ServerWindow.ts:67


getUrl

getUrl(): ""

Returns

""

The current document's URL.

Overrides

Window.getUrl

Defined in

packages/core/src/window/ServerWindow.ts:102


getWindow

getWindow(): undefined

Returns the native window object representing the global context +client-side, or undefined at the server-side.

Overrides

Window.getDocument

Defined in

packages/core/src/window/ServerWindow.ts:53


getDomain

getDomain(): ""

Returns the domain of the current document's URL as +${protocol}://${host}.

Returns

""

The current domain.

Overrides

Window.getDomain

Defined in

packages/core/src/window/ServerWindow.ts:81


getElementById

getElementById(): null

Returns the HTML element with the specified id attribute value.

Returns

null

The element with the specified id, or +null if no such element exists.

Overrides

Window.getElementById

Defined in

packages/core/src/window/ServerWindow.ts:116


getHistoryState

getHistoryState(): undefined

Returns the history state.

Returns

undefined

The current history state

Overrides

Window.getHistoryState

Defined in

packages/core/src/window/ServerWindow.ts:123


getHost

getHost(): ""

Returns

""

The current host.

Overrides

Window.getHost

Defined in

packages/core/src/window/ServerWindow.ts:88


getPath

getPath(): ""

Returns the path part of the current URL, including the query string.

Returns

""

The path and query string parts of the current URL.

Overrides

Window.getPath

Defined in

packages/core/src/window/ServerWindow.ts:95


getScrollX

getScrollX(): 0

Returns the number of pixels the viewport is scrolled horizontally.

Returns

0

The number of pixels the viewport is scrolled +horizontally.

Overrides

Window.getScrollX

Defined in

packages/core/src/window/ServerWindow.ts:60


getScrollY

getScrollY(): 0

Returns the number of pixels the document is scrolled vertically.

Returns

0

The number of pixels the document is scrolled +vertically.

Overrides

Window.getScrollY

Defined in

packages/core/src/window/ServerWindow.ts:67


getUrl

getUrl(): ""

Returns

""

The current document's URL.

Overrides

Window.getUrl

Defined in

packages/core/src/window/ServerWindow.ts:102


getWindow

getWindow(): undefined

Returns the native window object representing the global context at the client-side. The method returns undefined if used at the server-side.

Returns

undefined

The window object at the -client-side, or undefined at the server-side.

Overrides

Window.getWindow

Defined in

packages/core/src/window/ServerWindow.ts:46


hasSessionStorage

hasSessionStorage(): false

Returns true if the session storage is supported.

Returns

false

true if the session storage is supported.

Overrides

Window.hasSessionStorage

Defined in

packages/core/src/window/ServerWindow.ts:32


isClient

isClient(): false

Returns

false

true if invoked at the client side.

Overrides

Window.isClient

Defined in

packages/core/src/window/ServerWindow.ts:18


isCookieEnabled

isCookieEnabled(): false

Returns true if the cookies are set and processed with every +client-side, or undefined at the server-side.

Overrides

Window.getWindow

Defined in

packages/core/src/window/ServerWindow.ts:46


hasSessionStorage

hasSessionStorage(): false

Returns true if the session storage is supported.

Returns

false

true if the session storage is supported.

Overrides

Window.hasSessionStorage

Defined in

packages/core/src/window/ServerWindow.ts:32


isClient

isClient(): false

Returns

false

true if invoked at the client side.

Overrides

Window.isClient

Defined in

packages/core/src/window/ServerWindow.ts:18


isCookieEnabled

isCookieEnabled(): false

Returns true if the cookies are set and processed with every HTTP request and response automatically by the environment.

Returns

false

true if cookies are handled automatically by -the environment.

Overrides

Window.isCookieEnabled

Defined in

packages/core/src/window/ServerWindow.ts:25


pushState

pushState(): void

Pushes a new state to the browser history. The method has no effect if -the current browser does not support the history API (IE9).

Returns

void

Overrides

Window.pushState

Defined in

packages/core/src/window/ServerWindow.ts:165


querySelector

querySelector(): null

Returns the first element matching the specified CSS 3 selector.

Returns

null

The first element matching the CSS selector or -null if no such element exists.

Overrides

Window.querySelector

Defined in

packages/core/src/window/ServerWindow.ts:130


querySelectorAll

querySelectorAll<E>(selector): NodeListOf<E>

Returns a node list of all elements matching the specified CSS 3 +the environment.

Overrides

Window.isCookieEnabled

Defined in

packages/core/src/window/ServerWindow.ts:25


pushState

pushState(): void

Pushes a new state to the browser history. The method has no effect if +the current browser does not support the history API (IE9).

Returns

void

Overrides

Window.pushState

Defined in

packages/core/src/window/ServerWindow.ts:165


querySelector

querySelector(): null

Returns the first element matching the specified CSS 3 selector.

Returns

null

The first element matching the CSS selector or +null if no such element exists.

Overrides

Window.querySelector

Defined in

packages/core/src/window/ServerWindow.ts:130


querySelectorAll

querySelectorAll<E>(selector): NodeListOf<E>

Returns a node list of all elements matching the specified CSS 3 selector.

Type parameters

NameType
Eextends Element = Element

Parameters

NameTypeDescription
selectorstringThe CSS selector.

Returns

NodeListOf<E>

A node list containing all elements matching the -specified CSS selector.

Overrides

Window.querySelectorAll

Defined in

packages/core/src/window/ServerWindow.ts:137


redirect

redirect(): void

Performs a hard redirect (discarding the current JavaScript state) to -the specified URL.

Returns

void

Overrides

Window.redirect

Defined in

packages/core/src/window/ServerWindow.ts:158


replaceState

replaceState(): void

Replaces the current history entry. The method has no effect if the -current browser does not support the history API (IE9).

Returns

void

Overrides

Window.replaceState

Defined in

packages/core/src/window/ServerWindow.ts:172


scrollTo

scrollTo(): void

Scrolls the viewport to the specified location (if possible).

Returns

void

Overrides

Window.scrollTo

Defined in

packages/core/src/window/ServerWindow.ts:74


setTitle

setTitle(): never

Sets the new page title of the document.

Returns

never

Overrides

Window.setTitle

Defined in

packages/core/src/window/ServerWindow.ts:39


unbindEventListener

unbindEventListener(): void

Deregister the provided event listener, so it will no longer we +specified CSS selector.

Overrides

Window.querySelectorAll

Defined in

packages/core/src/window/ServerWindow.ts:137


redirect

redirect(): void

Performs a hard redirect (discarding the current JavaScript state) to +the specified URL.

Returns

void

Overrides

Window.redirect

Defined in

packages/core/src/window/ServerWindow.ts:158


replaceState

replaceState(): void

Replaces the current history entry. The method has no effect if the +current browser does not support the history API (IE9).

Returns

void

Overrides

Window.replaceState

Defined in

packages/core/src/window/ServerWindow.ts:172


scrollTo

scrollTo(): void

Scrolls the viewport to the specified location (if possible).

Returns

void

Overrides

Window.scrollTo

Defined in

packages/core/src/window/ServerWindow.ts:74


setTitle

setTitle(): never

Sets the new page title of the document.

Returns

never

Overrides

Window.setTitle

Defined in

packages/core/src/window/ServerWindow.ts:39


unbindEventListener

unbindEventListener(): void

Deregister the provided event listener, so it will no longer we executed when the specified event occurs on the specified event target.

The method has no effect if the provided event listener is not -registered to be executed at the specified event.

Returns

void

Overrides

Window.unbindEventListener

Defined in

packages/core/src/window/ServerWindow.ts:202

- - +registered to be executed at the specified event.

Returns

void

Overrides

Window.unbindEventListener

Defined in

packages/core/src/window/ServerWindow.ts:202

+ + \ No newline at end of file diff --git a/api/classes/ima_core.SessionMapStorage/index.html b/api/classes/ima_core.SessionMapStorage/index.html index c27bbe682a..6319fa68fc 100644 --- a/api/classes/ima_core.SessionMapStorage/index.html +++ b/api/classes/ima_core.SessionMapStorage/index.html @@ -4,26 +4,26 @@ Class: SessionMapStorage<V> | IMA.js - - + +
-
Skip to main content

Class: SessionMapStorage<V>

@ima/core.SessionMapStorage

The link SessionMap storage is an implementation of the +

Class: SessionMapStorage<V>

@ima/core.SessionMapStorage

The link SessionMap storage is an implementation of the link Storage interface acting as a synchronization proxy between -the underlying map storage and the sessionStorage DOM storage.

Type parameters

Name
V

Hierarchy

Constructors

constructor

new SessionMapStorage<V>(map, session)

Initializes the storage.

Type parameters

Name
V

Parameters

NameTypeDescription
mapMapStorage<V>The map storage to use.
sessionSessionStorage<V>The session storage to use.

Overrides

Storage.constructor

Defined in

packages/core/src/storage/SessionMapStorage.ts:32

Properties

_map

Private _map: MapStorage<V>

The map storage, synced with the session storage.

Defined in

packages/core/src/storage/SessionMapStorage.ts:16


_session

Private _session: SessionStorage<V>

The session storage, synced with the map storage.

Defined in

packages/core/src/storage/SessionMapStorage.ts:20

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/storage/SessionMapStorage.ts:22

Methods

clear

clear(): SessionMapStorage<V>

Clears the storage of all entries.

Returns

SessionMapStorage<V>

This storage.

Overrides

Storage.clear

Defined in

packages/core/src/storage/SessionMapStorage.ts:106


delete

delete(key): SessionMapStorage<V>

Deletes the entry identified by the specified key from this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

SessionMapStorage<V>

This storage.

Overrides

Storage.delete

Defined in

packages/core/src/storage/SessionMapStorage.ts:96


get

get(key): undefined | V

Retrieves the value of the entry identified by the specified . The +the underlying map storage and the sessionStorage DOM storage.

Type parameters

Name
V

Hierarchy

Constructors

constructor

new SessionMapStorage<V>(map, session)

Initializes the storage.

Type parameters

Name
V

Parameters

NameTypeDescription
mapMapStorage<V>The map storage to use.
sessionSessionStorage<V>The session storage to use.

Overrides

Storage.constructor

Defined in

packages/core/src/storage/SessionMapStorage.ts:32

Properties

_map

Private _map: MapStorage<V>

The map storage, synced with the session storage.

Defined in

packages/core/src/storage/SessionMapStorage.ts:16


_session

Private _session: SessionStorage<V>

The session storage, synced with the map storage.

Defined in

packages/core/src/storage/SessionMapStorage.ts:20

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/storage/SessionMapStorage.ts:22

Methods

clear

clear(): SessionMapStorage<V>

Clears the storage of all entries.

Returns

SessionMapStorage<V>

This storage.

Overrides

Storage.clear

Defined in

packages/core/src/storage/SessionMapStorage.ts:106


delete

delete(key): SessionMapStorage<V>

Deletes the entry identified by the specified key from this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

SessionMapStorage<V>

This storage.

Overrides

Storage.delete

Defined in

packages/core/src/storage/SessionMapStorage.ts:96


get

get(key): undefined | V

Retrieves the value of the entry identified by the specified . The method returns undefined if the entry does not exists.

Entries set to the undefined value can be tested for existence -using the link has method.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

undefined | V

The value of the storage entry.

Overrides

Storage.get

Defined in

packages/core/src/storage/SessionMapStorage.ts:71


has

has(key): boolean

Returns true if the entry identified by the specified key exists -in this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

boolean

true if the storage entry exists.

Overrides

Storage.has

Defined in

packages/core/src/storage/SessionMapStorage.ts:64


init

init(): SessionMapStorage<V>

This method is used to finalize the initialization of the storage after +using the link has method.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

undefined | V

The value of the storage entry.

Overrides

Storage.get

Defined in

packages/core/src/storage/SessionMapStorage.ts:71


has

has(key): boolean

Returns true if the entry identified by the specified key exists +in this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

boolean

true if the storage entry exists.

Overrides

Storage.has

Defined in

packages/core/src/storage/SessionMapStorage.ts:64


init

init(): SessionMapStorage<V>

This method is used to finalize the initialization of the storage after the dependencies provided through the constructor have been prepared for use.

This method must be invoked only once and it must be the first method -invoked on this instance.

Returns

SessionMapStorage<V>

This storage.

Overrides

Storage.init

Defined in

packages/core/src/storage/SessionMapStorage.ts:43


keys

keys(): Iterable<string>

Returns an iterator for traversing the keys in this storage. The order +invoked on this instance.

Returns

SessionMapStorage<V>

This storage.

Overrides

Storage.init

Defined in

packages/core/src/storage/SessionMapStorage.ts:43


keys

keys(): Iterable<string>

Returns an iterator for traversing the keys in this storage. The order in which the keys are traversed is undefined.

Returns

Iterable<string>

An iterator for traversing the keys in this storage. The iterator also implements the iterable protocol, returning itself as its own iterator, allowing it to be used in -a for..of loop.

Overrides

Storage.keys

Defined in

packages/core/src/storage/SessionMapStorage.ts:116


set

set(key, value): SessionMapStorage<V>

Sets the storage entry identified by the specified key to the provided -value. The method creates the entry if it does not exist already.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.
valueVThe storage entry value.

Returns

SessionMapStorage<V>

This storage.

Overrides

Storage.set

Defined in

packages/core/src/storage/SessionMapStorage.ts:78


size

size(): number

Returns the number of entries in this storage.

Returns

number

The number of entries in this storage.

Overrides

Storage.size

Defined in

packages/core/src/storage/SessionMapStorage.ts:123

- - +a for..of loop.

Overrides

Storage.keys

Defined in

packages/core/src/storage/SessionMapStorage.ts:116


set

set(key, value): SessionMapStorage<V>

Sets the storage entry identified by the specified key to the provided +value. The method creates the entry if it does not exist already.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.
valueVThe storage entry value.

Returns

SessionMapStorage<V>

This storage.

Overrides

Storage.set

Defined in

packages/core/src/storage/SessionMapStorage.ts:78


size

size(): number

Returns the number of entries in this storage.

Returns

number

The number of entries in this storage.

Overrides

Storage.size

Defined in

packages/core/src/storage/SessionMapStorage.ts:123

+ + \ No newline at end of file diff --git a/api/classes/ima_core.SessionStorage/index.html b/api/classes/ima_core.SessionStorage/index.html index e86fcc1a53..d1736506a3 100644 --- a/api/classes/ima_core.SessionStorage/index.html +++ b/api/classes/ima_core.SessionStorage/index.html @@ -4,25 +4,25 @@ Class: SessionStorage<V> | IMA.js - - + +
-
Skip to main content

Class: SessionStorage<V>

@ima/core.SessionStorage

Implementation of the link Storage interface that relies on the -native sessionStorage DOM storage for storing its entries.

Type parameters

Name
V

Hierarchy

Constructors

constructor

new SessionStorage<V>(window)

Initializes the session storage.

Type parameters

Name
V

Parameters

NameType
windowClientWindow

Overrides

Storage.constructor

Defined in

packages/core/src/storage/SessionStorage.ts:24

Properties

_storage

Private _storage: Storage

The DOM storage providing the actual storage of the entries.

Defined in

packages/core/src/storage/SessionStorage.ts:15

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/storage/SessionStorage.ts:17

Methods

_deleteOldestEntry

_deleteOldestEntry(): void

Deletes the oldest entry in this storage.

Returns

void

Defined in

packages/core/src/storage/SessionStorage.ts:123


clear

clear(): SessionStorage<V>

Clears the storage of all entries.

Returns

SessionStorage<V>

This storage.

Overrides

Storage.clear

Defined in

packages/core/src/storage/SessionStorage.ts:100


delete

delete(key): SessionStorage<V>

Deletes the entry identified by the specified key from this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

SessionStorage<V>

This storage.

Overrides

Storage.delete

Defined in

packages/core/src/storage/SessionStorage.ts:91


get

get(key): undefined | V

Retrieves the value of the entry identified by the specified . The +

Class: SessionStorage<V>

@ima/core.SessionStorage

Implementation of the link Storage interface that relies on the +native sessionStorage DOM storage for storing its entries.

Type parameters

Name
V

Hierarchy

Constructors

constructor

new SessionStorage<V>(window)

Initializes the session storage.

Type parameters

Name
V

Parameters

NameType
windowClientWindow

Overrides

Storage.constructor

Defined in

packages/core/src/storage/SessionStorage.ts:24

Properties

_storage

Private _storage: Storage

The DOM storage providing the actual storage of the entries.

Defined in

packages/core/src/storage/SessionStorage.ts:15

Accessors

$dependencies

Static get $dependencies(): Dependencies

Returns

Dependencies

Defined in

packages/core/src/storage/SessionStorage.ts:17

Methods

_deleteOldestEntry

_deleteOldestEntry(): void

Deletes the oldest entry in this storage.

Returns

void

Defined in

packages/core/src/storage/SessionStorage.ts:123


clear

clear(): SessionStorage<V>

Clears the storage of all entries.

Returns

SessionStorage<V>

This storage.

Overrides

Storage.clear

Defined in

packages/core/src/storage/SessionStorage.ts:100


delete

delete(key): SessionStorage<V>

Deletes the entry identified by the specified key from this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

SessionStorage<V>

This storage.

Overrides

Storage.delete

Defined in

packages/core/src/storage/SessionStorage.ts:91


get

get(key): undefined | V

Retrieves the value of the entry identified by the specified . The method returns undefined if the entry does not exists.

Entries set to the undefined value can be tested for existence -using the link has method.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

undefined | V

The value of the storage entry.

Overrides

Storage.get

Defined in

packages/core/src/storage/SessionStorage.ts:47


has

has(key): boolean

Returns true if the entry identified by the specified key exists -in this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

boolean

true if the storage entry exists.

Overrides

Storage.has

Defined in

packages/core/src/storage/SessionStorage.ts:40


init

init(): SessionStorage<V>

This method is used to finalize the initialization of the storage after +using the link has method.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

undefined | V

The value of the storage entry.

Overrides

Storage.get

Defined in

packages/core/src/storage/SessionStorage.ts:47


has

has(key): boolean

Returns true if the entry identified by the specified key exists +in this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

boolean

true if the storage entry exists.

Overrides

Storage.has

Defined in

packages/core/src/storage/SessionStorage.ts:40


init

init(): SessionStorage<V>

This method is used to finalize the initialization of the storage after the dependencies provided through the constructor have been prepared for use.

This method must be invoked only once and it must be the first method -invoked on this instance.

Returns

SessionStorage<V>

This storage.

Overrides

Storage.init

Defined in

packages/core/src/storage/SessionStorage.ts:33


keys

keys(): Iterable<string>

Returns an iterator for traversing the keys in this storage. The order +invoked on this instance.

Returns

SessionStorage<V>

This storage.

Overrides

Storage.init

Defined in

packages/core/src/storage/SessionStorage.ts:33


keys

keys(): Iterable<string>

Returns an iterator for traversing the keys in this storage. The order in which the keys are traversed is undefined.

Returns

Iterable<string>

An iterator for traversing the keys in this storage. The iterator also implements the iterable protocol, returning itself as its own iterator, allowing it to be used in -a for..of loop.

Overrides

Storage.keys

Defined in

packages/core/src/storage/SessionStorage.ts:109


set

set(key, value): SessionStorage<V>

Sets the storage entry identified by the specified key to the provided -value. The method creates the entry if it does not exist already.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.
valueVThe storage entry value.

Returns

SessionStorage<V>

This storage.

Overrides

Storage.set

Defined in

packages/core/src/storage/SessionStorage.ts:62


size

size(): number

Returns the number of entries in this storage.

Returns

number

The number of entries in this storage.

Overrides

Storage.size

Defined in

packages/core/src/storage/SessionStorage.ts:116

- - +a for..of loop.

Overrides

Storage.keys

Defined in

packages/core/src/storage/SessionStorage.ts:109


set

set(key, value): SessionStorage<V>

Sets the storage entry identified by the specified key to the provided +value. The method creates the entry if it does not exist already.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.
valueVThe storage entry value.

Returns

SessionStorage<V>

This storage.

Overrides

Storage.set

Defined in

packages/core/src/storage/SessionStorage.ts:62


size

size(): number

Returns the number of entries in this storage.

Returns

number

The number of entries in this storage.

Overrides

Storage.size

Defined in

packages/core/src/storage/SessionStorage.ts:116

+ + \ No newline at end of file diff --git a/api/classes/ima_core.StaticRoute/index.html b/api/classes/ima_core.StaticRoute/index.html index 91e4d134d9..80b0b1ee90 100644 --- a/api/classes/ima_core.StaticRoute/index.html +++ b/api/classes/ima_core.StaticRoute/index.html @@ -4,42 +4,42 @@ Class: StaticRoute | IMA.js - - + +
-
Skip to main content

Class: StaticRoute

@ima/core.StaticRoute

Utility for representing and manipulating a single static route in the +

Class: StaticRoute

@ima/core.StaticRoute

Utility for representing and manipulating a single static route in the router's configuration using string representation of the path expression -with special param fields identified by :paramName prefix.

Hierarchy

Constructors

constructor

new StaticRoute(name, pathExpression, controller, view, options?)

Parameters

NameTypeDescription
namestring-
pathExpressionstringA path expression specifying the URL path part matching this route (must not contain a query string), optionally containing named parameter placeholders specified as :parameterName.
controllerAsyncRouteController-
viewAsyncRouteView-
options?Partial<RouteFactoryOptions>-

Inherit Doc

Overrides

AbstractRoute.constructor

Defined in

packages/core/src/router/StaticRoute.ts:97

Properties

_controller

Protected _controller: Object

The full name of Object Container alias identifying the controller -associated with this route.

Type declaration

NameType
cachednull | RouteController | Promise<RouteController>
controllerAsyncRouteController
resolvedboolean

Inherited from

AbstractRoute._controller

Defined in

packages/core/src/router/AbstractRoute.ts:58


_hasParameters

Protected _hasParameters: boolean

Defined in

packages/core/src/router/StaticRoute.ts:87


_matcher

Protected _matcher: RegExp

Defined in

packages/core/src/router/StaticRoute.ts:88


_name

Protected _name: string

The unique name of this route, identifying it among the rest of the -routes in the application.

Inherited from

AbstractRoute._name

Defined in

packages/core/src/router/AbstractRoute.ts:48


_options

Protected _options: RouteFactoryOptions

The route additional options.

Inherited from

AbstractRoute._options

Defined in

packages/core/src/router/AbstractRoute.ts:76


_parameterNames

Protected _parameterNames: string[]

Defined in

packages/core/src/router/StaticRoute.ts:86


_pathExpression

Protected _pathExpression: string

Path expression used in route matching, to generate valid path with -provided params and parsing params from current path.

Inherited from

AbstractRoute._pathExpression

Defined in

packages/core/src/router/AbstractRoute.ts:53


_trimmedPathExpression

Protected _trimmedPathExpression: string

Defined in

packages/core/src/router/StaticRoute.ts:85


_view

Protected _view: Object

The full name or Object Container alias identifying the view class -associated with this route.

Type declaration

NameType
cachednull | RouteView | Promise<RouteView>
resolvedboolean
viewAsyncRouteView

Inherited from

AbstractRoute._view

Defined in

packages/core/src/router/AbstractRoute.ts:67

Methods

_checkOptionalParamsOrder

_checkOptionalParamsOrder(allMainParams): boolean

Check if all optional params are below required ones

Parameters

NameType
allMainParamsstring[]

Returns

boolean

Defined in

packages/core/src/router/StaticRoute.ts:275


_checkParametersOrder

_checkParametersOrder(clearedPathExpr): boolean

Check if main parameters have correct order. -It means that required param cannot follow optional one.

Parameters

NameTypeDescription
clearedPathExprstringThe cleared URL path (removed first and last slash, ...).

Returns

boolean

Returns TRUE if order is correct.

Defined in

packages/core/src/router/StaticRoute.ts:301


_cleanOptParamName

_cleanOptParamName(paramName): string

Returns optional param name without "?"

Parameters

NameTypeDescription
paramNamestringFull param name with "?"

Returns

string

Strict param name without "?"

Defined in

packages/core/src/router/StaticRoute.ts:524


_cleanUnusedOptionalParams

_cleanUnusedOptionalParams(path): string

Remove unused optional param placeholders in path.

Parameters

NameType
pathstring

Returns

string

Defined in

packages/core/src/router/StaticRoute.ts:219


_compileToRegExp

_compileToRegExp(pathExpression): RegExp

Compiles the path expression to a regular expression that can be used +with special param fields identified by :paramName prefix.

Hierarchy

Constructors

constructor

new StaticRoute(name, pathExpression, controller, view, options?)

Parameters

NameTypeDescription
namestring-
pathExpressionstringA path expression specifying the URL path part matching this route (must not contain a query string), optionally containing named parameter placeholders specified as :parameterName.
controllerAsyncRouteController-
viewAsyncRouteView-
options?Partial<RouteFactoryOptions>-

Inherit Doc

Overrides

AbstractRoute.constructor

Defined in

packages/core/src/router/StaticRoute.ts:97

Properties

_controller

Protected _controller: Object

The full name of Object Container alias identifying the controller +associated with this route.

Type declaration

NameType
cachednull | RouteController | Promise<RouteController>
controllerAsyncRouteController
resolvedboolean

Inherited from

AbstractRoute._controller

Defined in

packages/core/src/router/AbstractRoute.ts:58


_hasParameters

Protected _hasParameters: boolean

Defined in

packages/core/src/router/StaticRoute.ts:87


_matcher

Protected _matcher: RegExp

Defined in

packages/core/src/router/StaticRoute.ts:88


_name

Protected _name: string

The unique name of this route, identifying it among the rest of the +routes in the application.

Inherited from

AbstractRoute._name

Defined in

packages/core/src/router/AbstractRoute.ts:48


_options

Protected _options: RouteFactoryOptions

The route additional options.

Inherited from

AbstractRoute._options

Defined in

packages/core/src/router/AbstractRoute.ts:76


_parameterNames

Protected _parameterNames: string[]

Defined in

packages/core/src/router/StaticRoute.ts:86


_pathExpression

Protected _pathExpression: string

Path expression used in route matching, to generate valid path with +provided params and parsing params from current path.

Inherited from

AbstractRoute._pathExpression

Defined in

packages/core/src/router/AbstractRoute.ts:53


_trimmedPathExpression

Protected _trimmedPathExpression: string

Defined in

packages/core/src/router/StaticRoute.ts:85


_view

Protected _view: Object

The full name or Object Container alias identifying the view class +associated with this route.

Type declaration

NameType
cachednull | RouteView | Promise<RouteView>
resolvedboolean
viewAsyncRouteView

Inherited from

AbstractRoute._view

Defined in

packages/core/src/router/AbstractRoute.ts:67

Methods

_checkOptionalParamsOrder

_checkOptionalParamsOrder(allMainParams): boolean

Check if all optional params are below required ones

Parameters

NameType
allMainParamsstring[]

Returns

boolean

Defined in

packages/core/src/router/StaticRoute.ts:275


_checkParametersOrder

_checkParametersOrder(clearedPathExpr): boolean

Check if main parameters have correct order. +It means that required param cannot follow optional one.

Parameters

NameTypeDescription
clearedPathExprstringThe cleared URL path (removed first and last slash, ...).

Returns

boolean

Returns TRUE if order is correct.

Defined in

packages/core/src/router/StaticRoute.ts:301


_cleanOptParamName

_cleanOptParamName(paramName): string

Returns optional param name without "?"

Parameters

NameTypeDescription
paramNamestringFull param name with "?"

Returns

string

Strict param name without "?"

Defined in

packages/core/src/router/StaticRoute.ts:524


_cleanUnusedOptionalParams

_cleanUnusedOptionalParams(path): string

Remove unused optional param placeholders in path.

Parameters

NameType
pathstring

Returns

string

Defined in

packages/core/src/router/StaticRoute.ts:219


_compileToRegExp

_compileToRegExp(pathExpression): RegExp

Compiles the path expression to a regular expression that can be used for easier matching of URL paths against this route, and extracting the -path parameter values from the URL path.

Parameters

NameTypeDescription
pathExpressionstringThe path expression to compile.

Returns

RegExp

The compiled regular expression.

Defined in

packages/core/src/router/StaticRoute.ts:402


_extractParameters

_extractParameters(parameterValues): StringParameters

Extract parameters from given path.

Parameters

NameType
parameterValuesstring[]

Returns

StringParameters

Defined in

packages/core/src/router/StaticRoute.ts:490


_getClearParamName

_getClearParamName(rawParam): string

Extract clear parameter name, e.q. '?name' or 'name'

Parameters

NameType
rawParamstring

Returns

string

Defined in

packages/core/src/router/StaticRoute.ts:255


_getParameterNames

_getParameterNames(pathExpression): string[]

Extracts the parameter names from the provided path expression.

Parameters

NameTypeDescription
pathExpressionstringThe path expression.

Returns

string[]

The names of the parameters defined in the provided -path expression.

Defined in

packages/core/src/router/StaticRoute.ts:545


_getParameters

_getParameters(path): StringParameters

Parses the provided path and extract the in-path parameters. The method -decodes the parameters and returns them in a hash object.

Parameters

NameType
pathstring

Returns

StringParameters

Defined in

packages/core/src/router/StaticRoute.ts:472


_getSubparamPattern

_getSubparamPattern(delimiter): string

Get pattern for subparameter.

Parameters

NameType
delimiterstring

Returns

string

Defined in

packages/core/src/router/StaticRoute.ts:266


_isOptionalParamInPath

_isOptionalParamInPath(path, paramName): boolean

Returns true, if paramName is placed in path.

Parameters

NameType
pathstring
paramNamestring

Returns

boolean

Defined in

packages/core/src/router/StaticRoute.ts:237


_isParamOptional

_isParamOptional(paramName): boolean

Checks if parameter is optional or not.

Parameters

NameType
paramNamestring

Returns

boolean

return true if is optional, otherwise false

Defined in

packages/core/src/router/StaticRoute.ts:534


_isRequiredParamInPath

_isRequiredParamInPath(path, paramName): boolean

Returns true, if paramName is placed in path and it's required.

Parameters

NameType
pathstring
paramNamestring

Returns

boolean

Defined in

packages/core/src/router/StaticRoute.ts:246


_replaceOptionalParametersInPath

_replaceOptionalParametersInPath(path, optionalParams): string

Convert main optional parameters to capture sequences

Parameters

NameTypeDescription
pathstringThe URL path.
optionalParamsstring[]List of main optimal parameter expressions

Returns

string

RegExp pattern.

Defined in

packages/core/src/router/StaticRoute.ts:319


_replaceOptionalSubParametersInPath

_replaceOptionalSubParametersInPath(path, optionalSubparamsOthers, optionalSubparamsLast): string

Convert optional subparameters to capture sequences

Parameters

NameTypeDescription
pathstringThe URL path (route definition).
optionalSubparamsOthersstring[]List of all subparam. expressions but last ones
optionalSubparamsLaststring[]List of last subparam. expressions

Returns

string

RegExp pattern.

Defined in

packages/core/src/router/StaticRoute.ts:370


_replaceRequiredSubParametersInPath

_replaceRequiredSubParametersInPath(path, clearedPathExpr): string

Convert required subparameters to capture sequences

Parameters

NameTypeDescription
pathstringThe URL path (route definition).
clearedPathExprstringThe original cleared URL path.

Returns

string

RegExp pattern.

Defined in

packages/core/src/router/StaticRoute.ts:337


_substituteOptionalParamInPath

_substituteOptionalParamInPath(path, paramName, paramValue): string

Replace optional param placeholder in path with parameter value.

Parameters

NameType
pathstring
paramNamestring
paramValuestring

Returns

string

Defined in

packages/core/src/router/StaticRoute.ts:204


_substituteRequiredParamInPath

_substituteRequiredParamInPath(path, paramName, paramValue): string

Replace required parameter placeholder in path with parameter value.

Parameters

NameType
pathstring
paramNamestring
paramValuestring

Returns

string

Defined in

packages/core/src/router/StaticRoute.ts:190


extractParameters

extractParameters(path, baseUrl): Object

Extracts the parameter values from the provided path. The method +path parameter values from the URL path.

Parameters

NameTypeDescription
pathExpressionstringThe path expression to compile.

Returns

RegExp

The compiled regular expression.

Defined in

packages/core/src/router/StaticRoute.ts:402


_extractParameters

_extractParameters(parameterValues): StringParameters

Extract parameters from given path.

Parameters

NameType
parameterValuesstring[]

Returns

StringParameters

Defined in

packages/core/src/router/StaticRoute.ts:490


_getClearParamName

_getClearParamName(rawParam): string

Extract clear parameter name, e.q. '?name' or 'name'

Parameters

NameType
rawParamstring

Returns

string

Defined in

packages/core/src/router/StaticRoute.ts:255


_getParameterNames

_getParameterNames(pathExpression): string[]

Extracts the parameter names from the provided path expression.

Parameters

NameTypeDescription
pathExpressionstringThe path expression.

Returns

string[]

The names of the parameters defined in the provided +path expression.

Defined in

packages/core/src/router/StaticRoute.ts:545


_getParameters

_getParameters(path): StringParameters

Parses the provided path and extract the in-path parameters. The method +decodes the parameters and returns them in a hash object.

Parameters

NameType
pathstring

Returns

StringParameters

Defined in

packages/core/src/router/StaticRoute.ts:472


_getSubparamPattern

_getSubparamPattern(delimiter): string

Get pattern for subparameter.

Parameters

NameType
delimiterstring

Returns

string

Defined in

packages/core/src/router/StaticRoute.ts:266


_isOptionalParamInPath

_isOptionalParamInPath(path, paramName): boolean

Returns true, if paramName is placed in path.

Parameters

NameType
pathstring
paramNamestring

Returns

boolean

Defined in

packages/core/src/router/StaticRoute.ts:237


_isParamOptional

_isParamOptional(paramName): boolean

Checks if parameter is optional or not.

Parameters

NameType
paramNamestring

Returns

boolean

return true if is optional, otherwise false

Defined in

packages/core/src/router/StaticRoute.ts:534


_isRequiredParamInPath

_isRequiredParamInPath(path, paramName): boolean

Returns true, if paramName is placed in path and it's required.

Parameters

NameType
pathstring
paramNamestring

Returns

boolean

Defined in

packages/core/src/router/StaticRoute.ts:246


_replaceOptionalParametersInPath

_replaceOptionalParametersInPath(path, optionalParams): string

Convert main optional parameters to capture sequences

Parameters

NameTypeDescription
pathstringThe URL path.
optionalParamsstring[]List of main optimal parameter expressions

Returns

string

RegExp pattern.

Defined in

packages/core/src/router/StaticRoute.ts:319


_replaceOptionalSubParametersInPath

_replaceOptionalSubParametersInPath(path, optionalSubparamsOthers, optionalSubparamsLast): string

Convert optional subparameters to capture sequences

Parameters

NameTypeDescription
pathstringThe URL path (route definition).
optionalSubparamsOthersstring[]List of all subparam. expressions but last ones
optionalSubparamsLaststring[]List of last subparam. expressions

Returns

string

RegExp pattern.

Defined in

packages/core/src/router/StaticRoute.ts:370


_replaceRequiredSubParametersInPath

_replaceRequiredSubParametersInPath(path, clearedPathExpr): string

Convert required subparameters to capture sequences

Parameters

NameTypeDescription
pathstringThe URL path (route definition).
clearedPathExprstringThe original cleared URL path.

Returns

string

RegExp pattern.

Defined in

packages/core/src/router/StaticRoute.ts:337


_substituteOptionalParamInPath

_substituteOptionalParamInPath(path, paramName, paramValue): string

Replace optional param placeholder in path with parameter value.

Parameters

NameType
pathstring
paramNamestring
paramValuestring

Returns

string

Defined in

packages/core/src/router/StaticRoute.ts:204


_substituteRequiredParamInPath

_substituteRequiredParamInPath(path, paramName, paramValue): string

Replace required parameter placeholder in path with parameter value.

Parameters

NameType
pathstring
paramNamestring
paramValuestring

Returns

string

Defined in

packages/core/src/router/StaticRoute.ts:190


extractParameters

extractParameters(path, baseUrl): Object

Extracts the parameter values from the provided path. The method extracts both the in-path parameters and parses the query, allowing the query parameters to override the in-path parameters.

The method returns an empty hash object if the path does not match this route.

Parameters

NameTypeDescription
pathstringCurrently routed path.
baseUrlstringCurrently routed baseUrl.

Returns

Object

Map of parameter names to parameter -values.

Overrides

AbstractRoute.extractParameters

Defined in

packages/core/src/router/StaticRoute.ts:177


getController

getController(): RouteController | Promise<RouteController>

Returns Controller class/alias/constant associated with this route. +values.

Overrides

AbstractRoute.extractParameters

Defined in

packages/core/src/router/StaticRoute.ts:177


getController

getController(): RouteController | Promise<RouteController>

Returns Controller class/alias/constant associated with this route. Internally caches async calls for dynamically imported controllers, meaning that once they're loaded, you get the same promise for -subsequent calls.

Returns

RouteController | Promise<RouteController>

The Controller class/alias/constant.

Inherited from

AbstractRoute.getController

Defined in

packages/core/src/router/AbstractRoute.ts:153


getName

getName(): string

Returns the unique identifying name of this route.

Returns

string

The name of the route, identifying it.

Inherited from

AbstractRoute.getName

Defined in

packages/core/src/router/AbstractRoute.ts:132


getOptions

getOptions(): RouteFactoryOptions

Return route additional options.

Returns

RouteFactoryOptions

Inherited from

AbstractRoute.getOptions

Defined in

packages/core/src/router/AbstractRoute.ts:210


getPathExpression

getPathExpression(): string

Path expression used in route matching, to generate valid path with -provided params and parsing params from current path.

Returns

string

The path expression.

Inherited from

AbstractRoute.getPathExpression

Defined in

packages/core/src/router/AbstractRoute.ts:220


getTrimmedPath

getTrimmedPath(path): string

Trims the trailing forward slash from the provided URL path.

Parameters

NameTypeDescription
pathstringThe path to trim.

Returns

string

Trimmed path.

Inherited from

AbstractRoute.getTrimmedPath

Defined in

packages/core/src/router/AbstractRoute.ts:230


getView

getView(): RouteView | Promise<RouteView>

Returns View class/alias/constant associated with this route. +subsequent calls.

Returns

RouteController | Promise<RouteController>

The Controller class/alias/constant.

Inherited from

AbstractRoute.getController

Defined in

packages/core/src/router/AbstractRoute.ts:153


getName

getName(): string

Returns the unique identifying name of this route.

Returns

string

The name of the route, identifying it.

Inherited from

AbstractRoute.getName

Defined in

packages/core/src/router/AbstractRoute.ts:132


getOptions

getOptions(): RouteFactoryOptions

Return route additional options.

Returns

RouteFactoryOptions

Inherited from

AbstractRoute.getOptions

Defined in

packages/core/src/router/AbstractRoute.ts:210


getPathExpression

getPathExpression(): string

Path expression used in route matching, to generate valid path with +provided params and parsing params from current path.

Returns

string

The path expression.

Inherited from

AbstractRoute.getPathExpression

Defined in

packages/core/src/router/AbstractRoute.ts:220


getTrimmedPath

getTrimmedPath(path): string

Trims the trailing forward slash from the provided URL path.

Parameters

NameTypeDescription
pathstringThe path to trim.

Returns

string

Trimmed path.

Inherited from

AbstractRoute.getTrimmedPath

Defined in

packages/core/src/router/AbstractRoute.ts:230


getView

getView(): RouteView | Promise<RouteView>

Returns View class/alias/constant associated with this route. Internally caches async calls for dynamically imported views, meaning that once they're loaded, you get the same promise for -subsequent calls.

Returns

RouteView | Promise<RouteView>

The View class/alias/constant.

Inherited from

AbstractRoute.getView

Defined in

packages/core/src/router/AbstractRoute.ts:185


isAsync

isAsync(module): boolean

Checks if given argument is an async handler.

Parameters

NameType
moduleunknown

Returns

boolean

Inherited from

AbstractRoute.isAsync

Defined in

packages/core/src/router/AbstractRoute.ts:139


isControllerResolved

isControllerResolved(): boolean

Returns true for resolved controller. This is always true -for sync route views.

Returns

boolean

Inherited from

AbstractRoute.isControllerResolved

Defined in

packages/core/src/router/AbstractRoute.ts:173


isViewResolved

isViewResolved(): boolean

Returns true for resolved view. This is always true -for sync route views.

Returns

boolean

Inherited from

AbstractRoute.isViewResolved

Defined in

packages/core/src/router/AbstractRoute.ts:203


matches

matches(path): boolean

Tests whether the provided URL path matches this route. The provided -path may contain the query.

Parameters

NameTypeDescription
pathstringThe URL path.

Returns

boolean

true if the provided path matches this route.

Overrides

AbstractRoute.matches

Defined in

packages/core/src/router/StaticRoute.ts:168


preload

preload(): Promise<[RouteController, RouteView]>

Preloads dynamically imported view and controller.

Returns

Promise<[RouteController, RouteView]>

Promise.All resolving to [view, controller] tuple.

Inherited from

AbstractRoute.preload

Defined in

packages/core/src/router/AbstractRoute.ts:239


toPath

toPath(params?): string

Creates the URL and query parts of a URL by substituting the route's +subsequent calls.

Returns

RouteView | Promise<RouteView>

The View class/alias/constant.

Inherited from

AbstractRoute.getView

Defined in

packages/core/src/router/AbstractRoute.ts:185


isAsync

isAsync(module): boolean

Checks if given argument is an async handler.

Parameters

NameType
moduleunknown

Returns

boolean

Inherited from

AbstractRoute.isAsync

Defined in

packages/core/src/router/AbstractRoute.ts:139


isControllerResolved

isControllerResolved(): boolean

Returns true for resolved controller. This is always true +for sync route views.

Returns

boolean

Inherited from

AbstractRoute.isControllerResolved

Defined in

packages/core/src/router/AbstractRoute.ts:173


isViewResolved

isViewResolved(): boolean

Returns true for resolved view. This is always true +for sync route views.

Returns

boolean

Inherited from

AbstractRoute.isViewResolved

Defined in

packages/core/src/router/AbstractRoute.ts:203


matches

matches(path): boolean

Tests whether the provided URL path matches this route. The provided +path may contain the query.

Parameters

NameTypeDescription
pathstringThe URL path.

Returns

boolean

true if the provided path matches this route.

Overrides

AbstractRoute.matches

Defined in

packages/core/src/router/StaticRoute.ts:168


preload

preload(): Promise<[RouteController, RouteView]>

Preloads dynamically imported view and controller.

Returns

Promise<[RouteController, RouteView]>

Promise.All resolving to [view, controller] tuple.

Inherited from

AbstractRoute.preload

Defined in

packages/core/src/router/AbstractRoute.ts:239


toPath

toPath(params?): string

Creates the URL and query parts of a URL by substituting the route's parameter placeholders by the provided parameter value.

The extraneous parameters that do not match any of the route's placeholders will be appended as the query string.

Parameters

NameTypeDescription
paramsRouteParamsThe route parameter values.

Returns

string

Path and, if necessary, query parts of the URL representing this route with its parameters replaced by the -provided parameter values.

Overrides

AbstractRoute.toPath

Defined in

packages/core/src/router/StaticRoute.ts:132

- - +provided parameter values.

Overrides

AbstractRoute.toPath

Defined in

packages/core/src/router/StaticRoute.ts:132

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Storage/index.html b/api/classes/ima_core.Storage/index.html index 7086088e71..d73396af80 100644 --- a/api/classes/ima_core.Storage/index.html +++ b/api/classes/ima_core.Storage/index.html @@ -4,26 +4,26 @@ Class: Storage<V> | IMA.js - - + +
-
Skip to main content

Class: Storage<V>

@ima/core.Storage

The Storage is an unordered collection of named values of any +

Class: Storage<V>

@ima/core.Storage

The Storage is an unordered collection of named values of any type. Values in the storage are named using string keys. The storage -can be therefore thought of as a Map<string, *>.....

Type parameters

Name
V

Hierarchy

Constructors

constructor

new Storage<V>()

Type parameters

Name
V

Methods

clear

clear(): Storage<V>

Clears the storage of all entries.

Returns

Storage<V>

This storage.

Defined in

packages/core/src/storage/Storage.ts:73


delete

delete(key): Storage<V>

Deletes the entry identified by the specified key from this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

Storage<V>

This storage.

Defined in

packages/core/src/storage/Storage.ts:64


get

get(key): undefined | V

Retrieves the value of the entry identified by the specified . The +can be therefore thought of as a Map<string, *>.....

Type parameters

Name
V

Hierarchy

Constructors

constructor

new Storage<V>()

Type parameters

Name
V

Methods

clear

clear(): Storage<V>

Clears the storage of all entries.

Returns

Storage<V>

This storage.

Defined in

packages/core/src/storage/Storage.ts:73


delete

delete(key): Storage<V>

Deletes the entry identified by the specified key from this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

Storage<V>

This storage.

Defined in

packages/core/src/storage/Storage.ts:64


get

get(key): undefined | V

Retrieves the value of the entry identified by the specified . The method returns undefined if the entry does not exists.

Entries set to the undefined value can be tested for existence -using the link has method.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

undefined | V

The value of the storage entry.

Defined in

packages/core/src/storage/Storage.ts:42


has

has(key): boolean

Returns true if the entry identified by the specified key exists -in this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

boolean

true if the storage entry exists.

Defined in

packages/core/src/storage/Storage.ts:28


init

init(): Storage<V>

This method is used to finalize the initialization of the storage after +using the link has method.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

undefined | V

The value of the storage entry.

Defined in

packages/core/src/storage/Storage.ts:42


has

has(key): boolean

Returns true if the entry identified by the specified key exists +in this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

boolean

true if the storage entry exists.

Defined in

packages/core/src/storage/Storage.ts:28


init

init(): Storage<V>

This method is used to finalize the initialization of the storage after the dependencies provided through the constructor have been prepared for use.

This method must be invoked only once and it must be the first method -invoked on this instance.

Returns

Storage<V>

This storage.

Defined in

packages/core/src/storage/Storage.ts:17


keys

keys(): Iterable<string>

Returns an iterator for traversing the keys in this storage. The order +invoked on this instance.

Returns

Storage<V>

This storage.

Defined in

packages/core/src/storage/Storage.ts:17


keys

keys(): Iterable<string>

Returns an iterator for traversing the keys in this storage. The order in which the keys are traversed is undefined.

Returns

Iterable<string>

An iterator for traversing the keys in this storage. The iterator also implements the iterable protocol, returning itself as its own iterator, allowing it to be used in -a for..of loop.

Defined in

packages/core/src/storage/Storage.ts:86


set

set(key, value): Storage<V>

Sets the storage entry identified by the specified key to the provided -value. The method creates the entry if it does not exist already.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.
valueVThe storage entry value.

Returns

Storage<V>

This storage.

Defined in

packages/core/src/storage/Storage.ts:54


size

size(): number

Returns the number of entries in this storage.

Returns

number

The number of entries in this storage.

Defined in

packages/core/src/storage/Storage.ts:95

- - +a for..of loop.

Defined in

packages/core/src/storage/Storage.ts:86


set

set(key, value): Storage<V>

Sets the storage entry identified by the specified key to the provided +value. The method creates the entry if it does not exist already.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.
valueVThe storage entry value.

Returns

Storage<V>

This storage.

Defined in

packages/core/src/storage/Storage.ts:54


size

size(): number

Returns the number of entries in this storage.

Returns

number

The number of entries in this storage.

Defined in

packages/core/src/storage/Storage.ts:95

+ + \ No newline at end of file diff --git a/api/classes/ima_core.UrlTransformer/index.html b/api/classes/ima_core.UrlTransformer/index.html index 5227779119..3408897838 100644 --- a/api/classes/ima_core.UrlTransformer/index.html +++ b/api/classes/ima_core.UrlTransformer/index.html @@ -4,16 +4,16 @@ Class: UrlTransformer | IMA.js - - + +
-
Skip to main content

Class: UrlTransformer

@ima/core.UrlTransformer

Utility for transforming URLs according to the configured replacement rules.

Constructors

constructor

new UrlTransformer()

Initializes the URL transformer.

Defined in

packages/core/src/http/UrlTransformer.ts:16

Properties

_rules

Protected _rules: StringParameters

Defined in

packages/core/src/http/UrlTransformer.ts:7

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/http/UrlTransformer.ts:9

Methods

addRule

addRule(pattern, replacement): UrlTransformer

Adds the provided replacement rule to the rules used by this URL -transformer.

Parameters

NameTypeDescription
patternstringRegexp patter to look for (must be escaped as if for use in the Regexp constructor).
replacementstringThe replacement of the matched patter in any matched URL.

Returns

UrlTransformer

This transformer.

Defined in

packages/core/src/http/UrlTransformer.ts:30


clear

clear(): UrlTransformer

Clears all rules.

Returns

UrlTransformer

Defined in

packages/core/src/http/UrlTransformer.ts:39


transform

transform(url): string

Applies all rules registered with this URL transformer to the provided +

Class: UrlTransformer

@ima/core.UrlTransformer

Utility for transforming URLs according to the configured replacement rules.

Constructors

constructor

new UrlTransformer()

Initializes the URL transformer.

Defined in

packages/core/src/http/UrlTransformer.ts:16

Properties

_rules

Protected _rules: StringParameters

Defined in

packages/core/src/http/UrlTransformer.ts:7

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/http/UrlTransformer.ts:9

Methods

addRule

addRule(pattern, replacement): UrlTransformer

Adds the provided replacement rule to the rules used by this URL +transformer.

Parameters

NameTypeDescription
patternstringRegexp patter to look for (must be escaped as if for use in the Regexp constructor).
replacementstringThe replacement of the matched patter in any matched URL.

Returns

UrlTransformer

This transformer.

Defined in

packages/core/src/http/UrlTransformer.ts:30


clear

clear(): UrlTransformer

Clears all rules.

Returns

UrlTransformer

Defined in

packages/core/src/http/UrlTransformer.ts:39


transform

transform(url): string

Applies all rules registered with this URL transformer to the provided URL and returns the result. The rules will be applied in the order they -were registered.

Parameters

NameTypeDescription
urlstringThe URL for transformation.

Returns

string

Transformed URL.

Defined in

packages/core/src/http/UrlTransformer.ts:53

- - +were registered.

Parameters

NameTypeDescription
urlstringThe URL for transformation.

Returns

string

Transformed URL.

Defined in

packages/core/src/http/UrlTransformer.ts:53

+ + \ No newline at end of file diff --git a/api/classes/ima_core.WeakMapStorage/index.html b/api/classes/ima_core.WeakMapStorage/index.html index 3041c7b825..680b9ee032 100644 --- a/api/classes/ima_core.WeakMapStorage/index.html +++ b/api/classes/ima_core.WeakMapStorage/index.html @@ -4,26 +4,26 @@ Class: WeakMapStorage<V> | IMA.js - - + +
-
Skip to main content

Class: WeakMapStorage<V>

@ima/core.WeakMapStorage

A specialization of the link MapStorage storage mimicking the native +

Class: WeakMapStorage<V>

@ima/core.WeakMapStorage

A specialization of the link MapStorage storage mimicking the native WeakMap using its internal garbage collector used once the size of -the storage reaches the configured threshold.

Type parameters

NameType
Vobject

Hierarchy

Constructors

constructor

new WeakMapStorage<V>(config)

Initializes the storage.

Type parameters

NameType
Vobject

Parameters

NameTypeDescription
configObjectWeak map storage configuration. The fields have the following meaning: - entryTtl The time-to-live of a storage entry in milliseconds.
config.entryTtlnumber-

Overrides

Storage.constructor

Defined in

packages/core/src/storage/WeakMapStorage.ts:26

Properties

_entryTtl

Private _entryTtl: number

The time-to-live of a storage entry in milliseconds.

Defined in

packages/core/src/storage/WeakMapStorage.ts:12


_storage

Private _storage: Map<string, WeakRef<V>>

The internal storage of entries.

Defined in

packages/core/src/storage/WeakMapStorage.ts:17

Methods

_discardExpiredEntries

_discardExpiredEntries(): void

Deletes all expired entries from this storage.

Returns

void

Defined in

packages/core/src/storage/WeakMapStorage.ts:101


clear

clear(): WeakMapStorage<V>

Clears the storage of all entries.

Returns

WeakMapStorage<V>

This storage.

Overrides

Storage.clear

Defined in

packages/core/src/storage/WeakMapStorage.ts:74


delete

delete(key): WeakMapStorage<V>

Deletes the entry identified by the specified key from this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

WeakMapStorage<V>

This storage.

Overrides

Storage.delete

Defined in

packages/core/src/storage/WeakMapStorage.ts:67


get

get(key): undefined | V

Retrieves the value of the entry identified by the specified . The +the storage reaches the configured threshold.

Type parameters

NameType
Vobject

Hierarchy

Constructors

constructor

new WeakMapStorage<V>(config)

Initializes the storage.

Type parameters

NameType
Vobject

Parameters

NameTypeDescription
configObjectWeak map storage configuration. The fields have the following meaning: - entryTtl The time-to-live of a storage entry in milliseconds.
config.entryTtlnumber-

Overrides

Storage.constructor

Defined in

packages/core/src/storage/WeakMapStorage.ts:26

Properties

_entryTtl

Private _entryTtl: number

The time-to-live of a storage entry in milliseconds.

Defined in

packages/core/src/storage/WeakMapStorage.ts:12


_storage

Private _storage: Map<string, WeakRef<V>>

The internal storage of entries.

Defined in

packages/core/src/storage/WeakMapStorage.ts:17

Methods

_discardExpiredEntries

_discardExpiredEntries(): void

Deletes all expired entries from this storage.

Returns

void

Defined in

packages/core/src/storage/WeakMapStorage.ts:101


clear

clear(): WeakMapStorage<V>

Clears the storage of all entries.

Returns

WeakMapStorage<V>

This storage.

Overrides

Storage.clear

Defined in

packages/core/src/storage/WeakMapStorage.ts:74


delete

delete(key): WeakMapStorage<V>

Deletes the entry identified by the specified key from this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

WeakMapStorage<V>

This storage.

Overrides

Storage.delete

Defined in

packages/core/src/storage/WeakMapStorage.ts:67


get

get(key): undefined | V

Retrieves the value of the entry identified by the specified . The method returns undefined if the entry does not exists.

Entries set to the undefined value can be tested for existence -using the link has method.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

undefined | V

The value of the storage entry.

Overrides

Storage.get

Defined in

packages/core/src/storage/WeakMapStorage.ts:44


has

has(key): boolean

Returns true if the entry identified by the specified key exists -in this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

boolean

true if the storage entry exists.

Overrides

Storage.has

Defined in

packages/core/src/storage/WeakMapStorage.ts:35


init

init(): WeakMapStorage<V>

This method is used to finalize the initialization of the storage after +using the link has method.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

undefined | V

The value of the storage entry.

Overrides

Storage.get

Defined in

packages/core/src/storage/WeakMapStorage.ts:44


has

has(key): boolean

Returns true if the entry identified by the specified key exists +in this storage.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.

Returns

boolean

true if the storage entry exists.

Overrides

Storage.has

Defined in

packages/core/src/storage/WeakMapStorage.ts:35


init

init(): WeakMapStorage<V>

This method is used to finalize the initialization of the storage after the dependencies provided through the constructor have been prepared for use.

This method must be invoked only once and it must be the first method -invoked on this instance.

Returns

WeakMapStorage<V>

This storage.

Inherited from

Storage.init

Defined in

packages/core/src/storage/Storage.ts:17


keys

keys(): Iterable<string>

Returns an iterator for traversing the keys in this storage. The order +invoked on this instance.

Returns

WeakMapStorage<V>

This storage.

Inherited from

Storage.init

Defined in

packages/core/src/storage/Storage.ts:17


keys

keys(): Iterable<string>

Returns an iterator for traversing the keys in this storage. The order in which the keys are traversed is undefined.

Returns

Iterable<string>

An iterator for traversing the keys in this storage. The iterator also implements the iterable protocol, returning itself as its own iterator, allowing it to be used in -a for..of loop.

Overrides

Storage.keys

Defined in

packages/core/src/storage/WeakMapStorage.ts:83


set

set(key, value): WeakMapStorage<V>

Sets the storage entry identified by the specified key to the provided -value. The method creates the entry if it does not exist already.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.
valueVThe storage entry value.

Returns

WeakMapStorage<V>

This storage.

Overrides

Storage.set

Defined in

packages/core/src/storage/WeakMapStorage.ts:57


size

size(): number

Returns the number of entries in this storage.

Returns

number

The number of entries in this storage.

Overrides

Storage.size

Defined in

packages/core/src/storage/WeakMapStorage.ts:92

- - +a for..of loop.

Overrides

Storage.keys

Defined in

packages/core/src/storage/WeakMapStorage.ts:83


set

set(key, value): WeakMapStorage<V>

Sets the storage entry identified by the specified key to the provided +value. The method creates the entry if it does not exist already.

Parameters

NameTypeDescription
keystringThe key identifying the storage entry.
valueVThe storage entry value.

Returns

WeakMapStorage<V>

This storage.

Overrides

Storage.set

Defined in

packages/core/src/storage/WeakMapStorage.ts:57


size

size(): number

Returns the number of entries in this storage.

Returns

number

The number of entries in this storage.

Overrides

Storage.size

Defined in

packages/core/src/storage/WeakMapStorage.ts:92

+ + \ No newline at end of file diff --git a/api/classes/ima_core.Window/index.html b/api/classes/ima_core.Window/index.html index bff287dafd..f6ec7e0390 100644 --- a/api/classes/ima_core.Window/index.html +++ b/api/classes/ima_core.Window/index.html @@ -4,42 +4,42 @@ Class: Window | IMA.js - - + +
-
Skip to main content

Class: Window

@ima/core.Window

The Window interface defines various utility API for easier +

Class: Window

@ima/core.Window

The Window interface defines various utility API for easier cross-environment usage of various low-level client-side JavaScript APIs available through various global objects.

Hierarchy

Constructors

constructor

new Window()

Methods

bindEventListener

bindEventListener<T, K, S>(eventTarget, event, listener, options?, scope?): void

Registers the provided event listener to be executed when the specified event occurs on the specified event target.

Registering the same event listener for the same event on the same event target with the same useCapture flag value repeatedly has no -effect.

Type parameters

NameType
Textends WindowEventTargets
Kextends string | number | symbol
Sany

Parameters

NameTypeDescription
eventTargetTThe event target.
eventKThe name of the event.
listener(event: WindowEventTargetsMap<T>[K]) => voidThe event listener.
options?boolean | EventListenerOptions-
scope?S-

Returns

void

Defined in

packages/core/src/window/Window.ts:311

bindEventListener<T, E, S>(eventTarget, event, listener, options?, scope?): void

Type parameters

NameType
Textends EventTarget
Eextends Event = Event
Sany

Parameters

NameType
eventTargetT
eventstring
listener(event: E) => void
options?boolean | EventListenerOptions
scope?S

Returns

void

Defined in

packages/core/src/window/Window.ts:322


createCustomEvent

createCustomEvent<T>(name, options): CustomEvent<T>

Create new instance of CustomEvent of the specified name and using the -provided options.

Type parameters

Name
T

Parameters

NameTypeDescription
namestringCustom event's name (sometimes referred to as the event's type).
optionsCustomEventInit<T>The custom event's options.

Returns

CustomEvent<T>

The created custom event.

See

https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent

Defined in

packages/core/src/window/Window.ts:266


getBody

getBody(): undefined | HTMLElement

Returns the document's body element. The method returns +effect.

Type parameters

NameType
Textends WindowEventTargets
Kextends string | number | symbol
Sany

Parameters

NameTypeDescription
eventTargetTThe event target.
eventKThe name of the event.
listener(event: WindowEventTargetsMap<T>[K]) => voidThe event listener.
options?boolean | EventListenerOptions-
scope?S-

Returns

void

Defined in

packages/core/src/window/Window.ts:311

bindEventListener<T, E, S>(eventTarget, event, listener, options?, scope?): void

Type parameters

NameType
Textends EventTarget
Eextends Event = Event
Sany

Parameters

NameType
eventTargetT
eventstring
listener(event: E) => void
options?boolean | EventListenerOptions
scope?S

Returns

void

Defined in

packages/core/src/window/Window.ts:322


createCustomEvent

createCustomEvent<T>(name, options): CustomEvent<T>

Create new instance of CustomEvent of the specified name and using the +provided options.

Type parameters

Name
T

Parameters

NameTypeDescription
namestringCustom event's name (sometimes referred to as the event's type).
optionsCustomEventInit<T>The custom event's options.

Returns

CustomEvent<T>

The created custom event.

See

https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent

Defined in

packages/core/src/window/Window.ts:266


getBody

getBody(): undefined | HTMLElement

Returns the document's body element. The method returns undefined if invoked at the server-side.

Returns

undefined | HTMLElement

The document's body element, or -undefined if invoked at the server side.

Defined in

packages/core/src/window/Window.ts:169


getDocument

getDocument(): undefined | Document

Returns the native document object representing any web page loaded +undefined if invoked at the server side.

Defined in

packages/core/src/window/Window.ts:169


getDocument

getDocument(): undefined | Document

Returns the native document object representing any web page loaded in the browser and serves as an entry point into the web page's content which is the DOM tree at the client-side. The method returns undefined if used at the server-side.

Returns

undefined | Document

The document object at the -client-side, or undefined at the server-side.

Defined in

packages/core/src/window/Window.ts:95


getDomain

getDomain(): string

Returns the domain of the current document's URL as -${protocol}://${host}.

Returns

string

The current domain.

Defined in

packages/core/src/window/Window.ts:135


getElementById

getElementById(id): null | HTMLElement

Returns the HTML element with the specified id attribute value.

Parameters

NameTypeDescription
idstringThe value of the id attribute to look for.

Returns

null | HTMLElement

The element with the specified id, or -null if no such element exists.

Defined in

packages/core/src/window/Window.ts:180


getHistoryState

getHistoryState(): any

Returns the history state.

Returns

any

The current history state

Defined in

packages/core/src/window/Window.ts:189


getHost

getHost(): string

Returns

string

The current host.

Defined in

packages/core/src/window/Window.ts:142


getPath

getPath(): string

Returns the path part of the current URL, including the query string.

Returns

string

The path and query string parts of the current URL.

Defined in

packages/core/src/window/Window.ts:151


getScrollX

getScrollX(): number

Returns the number of pixels the viewport is scrolled horizontally.

Returns

number

The number of pixels the viewport is scrolled -horizontally.

Defined in

packages/core/src/window/Window.ts:105


getScrollY

getScrollY(): number

Returns the number of pixels the document is scrolled vertically.

Returns

number

The number of pixels the document is scrolled -vertically.

Defined in

packages/core/src/window/Window.ts:115


getUrl

getUrl(): string

Returns

string

The current document's URL.

Defined in

packages/core/src/window/Window.ts:158


getWindow

getWindow(): undefined | Window

Returns the native window object representing the global context +client-side, or undefined at the server-side.

Defined in

packages/core/src/window/Window.ts:95


getDomain

getDomain(): string

Returns the domain of the current document's URL as +${protocol}://${host}.

Returns

string

The current domain.

Defined in

packages/core/src/window/Window.ts:135


getElementById

getElementById(id): null | HTMLElement

Returns the HTML element with the specified id attribute value.

Parameters

NameTypeDescription
idstringThe value of the id attribute to look for.

Returns

null | HTMLElement

The element with the specified id, or +null if no such element exists.

Defined in

packages/core/src/window/Window.ts:180


getHistoryState

getHistoryState(): any

Returns the history state.

Returns

any

The current history state

Defined in

packages/core/src/window/Window.ts:189


getHost

getHost(): string

Returns

string

The current host.

Defined in

packages/core/src/window/Window.ts:142


getPath

getPath(): string

Returns the path part of the current URL, including the query string.

Returns

string

The path and query string parts of the current URL.

Defined in

packages/core/src/window/Window.ts:151


getScrollX

getScrollX(): number

Returns the number of pixels the viewport is scrolled horizontally.

Returns

number

The number of pixels the viewport is scrolled +horizontally.

Defined in

packages/core/src/window/Window.ts:105


getScrollY

getScrollY(): number

Returns the number of pixels the document is scrolled vertically.

Returns

number

The number of pixels the document is scrolled +vertically.

Defined in

packages/core/src/window/Window.ts:115


getUrl

getUrl(): string

Returns

string

The current document's URL.

Defined in

packages/core/src/window/Window.ts:158


getWindow

getWindow(): undefined | Window

Returns the native window object representing the global context at the client-side. The method returns undefined if used at the server-side.

Returns

undefined | Window

The window object at the -client-side, or undefined at the server-side.

Defined in

packages/core/src/window/Window.ts:82


hasSessionStorage

hasSessionStorage(): boolean

Returns true if the session storage is supported.

Returns

boolean

true if the session storage is supported.

Defined in

packages/core/src/window/Window.ts:61


isClient

isClient(): boolean

Returns

boolean

true if invoked at the client side.

Defined in

packages/core/src/window/Window.ts:41


isCookieEnabled

isCookieEnabled(): boolean

Returns true if the cookies are set and processed with every +client-side, or undefined at the server-side.

Defined in

packages/core/src/window/Window.ts:82


hasSessionStorage

hasSessionStorage(): boolean

Returns true if the session storage is supported.

Returns

boolean

true if the session storage is supported.

Defined in

packages/core/src/window/Window.ts:61


isClient

isClient(): boolean

Returns

boolean

true if invoked at the client side.

Defined in

packages/core/src/window/Window.ts:41


isCookieEnabled

isCookieEnabled(): boolean

Returns true if the cookies are set and processed with every HTTP request and response automatically by the environment.

Returns

boolean

true if cookies are handled automatically by -the environment.

Defined in

packages/core/src/window/Window.ts:52


pushState

pushState<T>(state, title, url?): void

Pushes a new state to the browser history. The method has no effect if -the current browser does not support the history API (IE9).

Type parameters

Name
T

Parameters

NameTypeDescription
stateTA state object associated with the history item, preferably representing the page state.
titlestringThe page title related to the state. Note that this parameter is ignored by some browsers.
url?stringThe new URL at which the state is available.

Returns

void

Defined in

packages/core/src/window/Window.ts:238


querySelector

querySelector<E>(selector): null | E

Returns the first element matching the specified CSS 3 selector.

Type parameters

NameType
Eextends Element = Element

Parameters

NameTypeDescription
selectorstringThe CSS selector.

Returns

null | E

The first element matching the CSS selector or -null if no such element exists.

Defined in

packages/core/src/window/Window.ts:200


querySelectorAll

querySelectorAll<E>(selector): NodeListOf<E>

Returns a node list of all elements matching the specified CSS 3 +the environment.

Defined in

packages/core/src/window/Window.ts:52


pushState

pushState<T>(state, title, url?): void

Pushes a new state to the browser history. The method has no effect if +the current browser does not support the history API (IE9).

Type parameters

Name
T

Parameters

NameTypeDescription
stateTA state object associated with the history item, preferably representing the page state.
titlestringThe page title related to the state. Note that this parameter is ignored by some browsers.
url?stringThe new URL at which the state is available.

Returns

void

Defined in

packages/core/src/window/Window.ts:238


querySelector

querySelector<E>(selector): null | E

Returns the first element matching the specified CSS 3 selector.

Type parameters

NameType
Eextends Element = Element

Parameters

NameTypeDescription
selectorstringThe CSS selector.

Returns

null | E

The first element matching the CSS selector or +null if no such element exists.

Defined in

packages/core/src/window/Window.ts:200


querySelectorAll

querySelectorAll<E>(selector): NodeListOf<E>

Returns a node list of all elements matching the specified CSS 3 selector.

Type parameters

NameType
Eextends Element = Element

Parameters

NameTypeDescription
selectorstringThe CSS selector.

Returns

NodeListOf<E>

A node list containing all elements matching the -specified CSS selector.

Defined in

packages/core/src/window/Window.ts:212


redirect

redirect(url): void

Performs a hard redirect (discarding the current JavaScript state) to -the specified URL.

Parameters

NameTypeDescription
urlstringThe URL to which the browser will be redirected.

Returns

void

Defined in

packages/core/src/window/Window.ts:224


replaceState

replaceState<T>(state, title, url?): void

Replaces the current history entry. The method has no effect if the -current browser does not support the history API (IE9).

Type parameters

Name
T

Parameters

NameTypeDescription
stateTA state object associated with the history item, preferably representing the page state.
titlestringThe page title related to the state. Note that this parameter is ignored by some browsers.
url?stringThe new URL at which the state is available.

Returns

void

Defined in

packages/core/src/window/Window.ts:252


scrollTo

scrollTo(x, y): void

Scrolls the viewport to the specified location (if possible).

Parameters

NameTypeDescription
xnumberHorizontal scroll offset in pixels.
ynumberVertical scroll offset in pixels.

Returns

void

Defined in

packages/core/src/window/Window.ts:125


setTitle

setTitle(title): void

Sets the new page title of the document.

Parameters

NameTypeDescription
titlestringThe new page title.

Returns

void

Defined in

packages/core/src/window/Window.ts:70


unbindEventListener

unbindEventListener<T, K, S>(eventTarget, event, listener, options?, scope?): void

Deregister the provided event listener, so it will no longer we +specified CSS selector.

Defined in

packages/core/src/window/Window.ts:212


redirect

redirect(url): void

Performs a hard redirect (discarding the current JavaScript state) to +the specified URL.

Parameters

NameTypeDescription
urlstringThe URL to which the browser will be redirected.

Returns

void

Defined in

packages/core/src/window/Window.ts:224


replaceState

replaceState<T>(state, title, url?): void

Replaces the current history entry. The method has no effect if the +current browser does not support the history API (IE9).

Type parameters

Name
T

Parameters

NameTypeDescription
stateTA state object associated with the history item, preferably representing the page state.
titlestringThe page title related to the state. Note that this parameter is ignored by some browsers.
url?stringThe new URL at which the state is available.

Returns

void

Defined in

packages/core/src/window/Window.ts:252


scrollTo

scrollTo(x, y): void

Scrolls the viewport to the specified location (if possible).

Parameters

NameTypeDescription
xnumberHorizontal scroll offset in pixels.
ynumberVertical scroll offset in pixels.

Returns

void

Defined in

packages/core/src/window/Window.ts:125


setTitle

setTitle(title): void

Sets the new page title of the document.

Parameters

NameTypeDescription
titlestringThe new page title.

Returns

void

Defined in

packages/core/src/window/Window.ts:70


unbindEventListener

unbindEventListener<T, K, S>(eventTarget, event, listener, options?, scope?): void

Deregister the provided event listener, so it will no longer we executed when the specified event occurs on the specified event target.

The method has no effect if the provided event listener is not -registered to be executed at the specified event.

Type parameters

NameType
Textends WindowEventTargets
Kextends string | number | symbol
SS

Parameters

NameTypeDescription
eventTargetTThe event target.
eventKThe name of the event.
listener(event: WindowEventTargetsMap<T>[K]) => voidThe event listener.
options?boolean | EventListenerOptionsThe useCapture flag value that was used when the listener was registered, or provide capture option through object options.
scope?S-

Returns

void

Defined in

packages/core/src/window/Window.ts:346

unbindEventListener<T, E, S>(eventTarget, event, listener, options?, scope?): void

Type parameters

NameType
Textends EventTarget
Eextends Event = Event
Sany

Parameters

NameType
eventTargetT
eventstring
listener(event: E) => void
options?boolean | EventListenerOptions
scope?S

Returns

void

Defined in

packages/core/src/window/Window.ts:357

- - +registered to be executed at the specified event.

Type parameters

NameType
Textends WindowEventTargets
Kextends string | number | symbol
SS

Parameters

NameTypeDescription
eventTargetTThe event target.
eventKThe name of the event.
listener(event: WindowEventTargetsMap<T>[K]) => voidThe event listener.
options?boolean | EventListenerOptionsThe useCapture flag value that was used when the listener was registered, or provide capture option through object options.
scope?S-

Returns

void

Defined in

packages/core/src/window/Window.ts:346

unbindEventListener<T, E, S>(eventTarget, event, listener, options?, scope?): void

Type parameters

NameType
Textends EventTarget
Eextends Event = Event
Sany

Parameters

NameType
eventTargetT
eventstring
listener(event: E) => void
options?boolean | EventListenerOptions
scope?S

Returns

void

Defined in

packages/core/src/window/Window.ts:357

+ + \ No newline at end of file diff --git a/api/classes/ima_dev_utils.Logger/index.html b/api/classes/ima_dev_utils.Logger/index.html index 481b878c8e..654676e2b4 100644 --- a/api/classes/ima_dev_utils.Logger/index.html +++ b/api/classes/ima_dev_utils.Logger/index.html @@ -4,14 +4,14 @@ Class: Logger | IMA.js - - + +
-
Skip to main content

Class: Logger

@ima/dev-utils.Logger

Constructors

constructor

new Logger(identifier?, globalLogger?)

Parameters

NameType
identifier?string
globalLogger?Logger

Defined in

logger.ts:42

Properties

#globalLogger

Private Optional #globalLogger: Logger

Defined in

logger.ts:37


#identifier

Private Optional #identifier: string

Defined in

logger.ts:36


#isSilent

Private #isSilent: boolean = false

Defined in

logger.ts:38


innerElapsed

Optional innerElapsed: () => string

Type declaration

▸ (): string

Returns time utility function, which when called returns -formatted elapsed time from it's creation.

Returns

string

Callback to return formatted elapsed time.

Defined in

logger.ts:40

Methods

#log

Private #log(prefix, chalkFn, message, «destructured»?): void

Parameters

NameType
prefixstring
chalkFn(input: undefined | null | string | number) => string
messagestring
«destructured»LoggerOptions

Returns

void

Defined in

logger.ts:47


endTracking

endTracking(): void

Returns

void

Defined in

logger.ts:94


error

error(message, options?): void

Parameters

NameType
messagestring | Error
options?LoggerOptions

Returns

void

Defined in

logger.ts:120


info

info(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:112


isSilent

isSilent(): boolean

Returns

boolean

Defined in

logger.ts:164


plugin

plugin(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:148


setSilent

setSilent(isSilent): void

Parameters

NameType
isSilentboolean

Returns

void

Defined in

logger.ts:160


success

success(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:116


sync

sync(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:144


warn

warn(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:140


write

write(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:152


writeElapsed

writeElapsed(elapsed): void

Parameters

NameType
elapsed() => string

Returns

void

Defined in

logger.ts:156

- - +
Skip to main content

Class: Logger

@ima/dev-utils.Logger

Constructors

constructor

new Logger(identifier?, globalLogger?)

Parameters

NameType
identifier?string
globalLogger?Logger

Defined in

logger.ts:42

Properties

#globalLogger

Private Optional #globalLogger: Logger

Defined in

logger.ts:37


#identifier

Private Optional #identifier: string

Defined in

logger.ts:36


#isSilent

Private #isSilent: boolean = false

Defined in

logger.ts:38


innerElapsed

Optional innerElapsed: () => string

Type declaration

▸ (): string

Returns time utility function, which when called returns +formatted elapsed time from it's creation.

Returns

string

Callback to return formatted elapsed time.

Defined in

logger.ts:40

Methods

#log

Private #log(prefix, chalkFn, message, «destructured»?): void

Parameters

NameType
prefixstring
chalkFn(input: undefined | null | string | number) => string
messagestring
«destructured»LoggerOptions

Returns

void

Defined in

logger.ts:47


endTracking

endTracking(): void

Returns

void

Defined in

logger.ts:94


error

error(message, options?): void

Parameters

NameType
messagestring | Error
options?LoggerOptions

Returns

void

Defined in

logger.ts:120


info

info(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:112


isSilent

isSilent(): boolean

Returns

boolean

Defined in

logger.ts:164


plugin

plugin(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:148


setSilent

setSilent(isSilent): void

Parameters

NameType
isSilentboolean

Returns

void

Defined in

logger.ts:160


success

success(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:116


sync

sync(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:144


warn

warn(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:140


write

write(message, options?): void

Parameters

NameType
messagestring
options?LoggerOptions

Returns

void

Defined in

logger.ts:152


writeElapsed

writeElapsed(elapsed): void

Parameters

NameType
elapsed() => string

Returns

void

Defined in

logger.ts:156

+ + \ No newline at end of file diff --git a/api/classes/ima_react_page_renderer.AbstractComponent/index.html b/api/classes/ima_react_page_renderer.AbstractComponent/index.html index 3edfac4347..6fda10b452 100644 --- a/api/classes/ima_react_page_renderer.AbstractComponent/index.html +++ b/api/classes/ima_react_page_renderer.AbstractComponent/index.html @@ -4,13 +4,13 @@ Class: AbstractComponent<P, S, SS> | IMA.js - - + +
-
Skip to main content

Class: AbstractComponent<P, S, SS>

@ima/react-page-renderer.AbstractComponent

The base class for all view components.

Type parameters

NameType
Punknown
Sunknown
SSunknown

Hierarchy

  • Component<P, S, SS>

    AbstractComponent

Constructors

constructor

new AbstractComponent<P, S, SS>(props)

Type parameters

NameType
Punknown
Sunknown
SSunknown

Parameters

NameType
propsP | Readonly<P>

Inherited from

Component<P, S, SS>.constructor

Defined in

node_modules/@types/react/index.d.ts:515

new AbstractComponent<P, S, SS>(props, context)

Type parameters

NameType
Punknown
Sunknown
SSunknown

Parameters

NameType
propsP
contextany

Deprecated

See

https://legacy.reactjs.org/docs/legacy-context.html

Inherited from

Component<P, S, SS>.constructor

Defined in

node_modules/@types/react/index.d.ts:520

Properties

_utils

Private Optional _utils: Utils

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:18


context

context: PageContextType

Overrides

Component.context

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:16


props

Readonly props: Readonly<P>

Inherited from

Component.props

Defined in

node_modules/@types/react/index.d.ts:533


refs

refs: Object

Deprecated

https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs

Index signature

[key: string]: ReactInstance

Inherited from

Component.refs

Defined in

node_modules/@types/react/index.d.ts:539


state

state: Readonly<S>

Inherited from

Component.state

Defined in

node_modules/@types/react/index.d.ts:534


contextType

Static contextType: Context<PageContextType> = PageContext

Overrides

Component.contextType

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:15

Accessors

utils

get utils(): Utils

Returns the utilities for the view components. The returned value is the -value bound to the $Utils object container constant.

Returns

Utils

The utilities for the view components.

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:26

Methods

UNSAFE_componentWillMount

Optional UNSAFE_componentWillMount(): void

Called immediately before mounting occurs, and before Component#render. +

Class: AbstractComponent<P, S, SS>

@ima/react-page-renderer.AbstractComponent

The base class for all view components.

Type parameters

NameType
Punknown
Sunknown
SSunknown

Hierarchy

  • Component<P, S, SS>

    AbstractComponent

Constructors

constructor

new AbstractComponent<P, S, SS>(props)

Type parameters

NameType
Punknown
Sunknown
SSunknown

Parameters

NameType
propsP | Readonly<P>

Inherited from

Component<P, S, SS>.constructor

Defined in

node_modules/@types/react/index.d.ts:515

new AbstractComponent<P, S, SS>(props, context)

Type parameters

NameType
Punknown
Sunknown
SSunknown

Parameters

NameType
propsP
contextany

Deprecated

See

https://legacy.reactjs.org/docs/legacy-context.html

Inherited from

Component<P, S, SS>.constructor

Defined in

node_modules/@types/react/index.d.ts:520

Properties

_utils

Private Optional _utils: Utils

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:18


context

context: PageContextType

Overrides

Component.context

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:16


props

Readonly props: Readonly<P>

Inherited from

Component.props

Defined in

node_modules/@types/react/index.d.ts:533


refs

refs: Object

Deprecated

https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs

Index signature

[key: string]: ReactInstance

Inherited from

Component.refs

Defined in

node_modules/@types/react/index.d.ts:539


state

state: Readonly<S>

Inherited from

Component.state

Defined in

node_modules/@types/react/index.d.ts:534


contextType

Static contextType: Context<PageContextType> = PageContext

Overrides

Component.contextType

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:15

Accessors

utils

get utils(): Utils

Returns the utilities for the view components. The returned value is the +value bound to the $Utils object container constant.

Returns

Utils

The utilities for the view components.

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:26

Methods

UNSAFE_componentWillMount

Optional UNSAFE_componentWillMount(): void

Called immediately before mounting occurs, and before Component#render. Avoid introducing any side-effects or subscriptions in this method.

This method will not stop working in React 17.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps prevents this from being invoked.

Returns

void

Deprecated

16.3, use componentDidMount or the constructor instead

See

Inherited from

Component.UNSAFE_componentWillMount

Defined in

node_modules/@types/react/index.d.ts:730


UNSAFE_componentWillReceiveProps

Optional UNSAFE_componentWillReceiveProps(nextProps, nextContext): void

Called when the component may be receiving new props. React may call this even if props have not changed, so be sure to compare new and existing @@ -26,19 +26,19 @@ cancelled network requests, or cleaning up any DOM elements created in componentDidMount.

Returns

void

Inherited from

Component.componentWillUnmount

Defined in

node_modules/@types/react/index.d.ts:654


componentWillUpdate

Optional componentWillUpdate(nextProps, nextState, nextContext): void

Called immediately before rendering when new props or state is received. Not called for the initial render.

Note: You cannot call Component#setState here.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps prevents this from being invoked.

Parameters

NameType
nextPropsReadonly<P>
nextStateReadonly<S>
nextContextany

Returns

void

Deprecated

16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17

See

Inherited from

Component.componentWillUpdate

Defined in

node_modules/@types/react/index.d.ts:775


cssClasses

cssClasses(classRules, includeComponentClassName?): string

Generate a string of CSS classes from the properties of the passed-in object that resolve to true.

Parameters

NameTypeDefault valueDescription
classRulesstring | { [key: string]: boolean; } | string[]undefinedCSS classes in a string separated by whitespace, or a map of CSS class names to boolean values. The CSS class name will be included in the result only if the value is true.
includeComponentClassNamebooleanfalse-

Returns

string

String of CSS classes that had their property resolved -to true.

Example

this.cssClasses('my-class my-class-modifier', true);

Example

this.cssClasses({
'my-class': true,
'my-class-modifier': this.props.modifier
}, true);

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:86


fire

fire(eventTarget, eventName, data?): void

Creates and sends a new IMA.js DOM custom event from this component.

Parameters

NameTypeDescription
eventTargetEventTargetEventTarget compatible node.
eventNamestringThe name of the event.
data?anyData to send within the event.

Returns

void

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:100


forceUpdate

forceUpdate(callback?): void

Parameters

NameType
callback?() => void

Returns

void

Inherited from

Component.forceUpdate

Defined in

node_modules/@types/react/index.d.ts:530


getSnapshotBeforeUpdate

Optional getSnapshotBeforeUpdate(prevProps, prevState): null | SS

Runs before React applies the result of render to the document, and +to true.

Example

this.cssClasses('my-class my-class-modifier', true);

Example

this.cssClasses({
'my-class': true,
'my-class-modifier': this.props.modifier
}, true);

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:86


fire

fire(eventTarget, eventName, data?): void

Creates and sends a new IMA.js DOM custom event from this component.

Parameters

NameTypeDescription
eventTargetEventTargetEventTarget compatible node.
eventNamestringThe name of the event.
data?anyData to send within the event.

Returns

void

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:100


forceUpdate

forceUpdate(callback?): void

Parameters

NameType
callback?() => void

Returns

void

Inherited from

Component.forceUpdate

Defined in

node_modules/@types/react/index.d.ts:530


getSnapshotBeforeUpdate

Optional getSnapshotBeforeUpdate(prevProps, prevState): null | SS

Runs before React applies the result of render to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before render causes changes to it.

Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated -lifecycle events from running.

Parameters

NameType
prevPropsReadonly<P>
prevStateReadonly<S>

Returns

null | SS

Inherited from

Component.getSnapshotBeforeUpdate

Defined in

node_modules/@types/react/index.d.ts:695


link(name, params?): string

Generates an absolute URL using the provided route name (see the

app/config/routes.js file). The provided parameters will replace the placeholders in the route pattern, while the extraneous parameters will be appended to the generated URL's query string.

Parameters

NameTypeDescription
namestringThe route name.
paramsObjectRouter parameters and extraneous parameters to add to the URL as a query string.

Returns

string

The generated URL.

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:62


listen

listen(eventTarget, eventName, listener): void

Registers the provided event listener for execution whenever an IMA.js +lifecycle events from running.

Parameters

NameType
prevPropsReadonly<P>
prevStateReadonly<S>

Returns

null | SS

Inherited from

Component.getSnapshotBeforeUpdate

Defined in

node_modules/@types/react/index.d.ts:695


link(name, params?): string

Generates an absolute URL using the provided route name (see the

app/config/routes.js file). The provided parameters will replace the placeholders in the route pattern, while the extraneous parameters will be appended to the generated URL's query string.

Parameters

NameTypeDescription
namestringThe route name.
paramsObjectRouter parameters and extraneous parameters to add to the URL as a query string.

Returns

string

The generated URL.

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:62


listen

listen(eventTarget, eventName, listener): void

Registers the provided event listener for execution whenever an IMA.js DOM custom event of the specified name occurs at the specified event -target.

Parameters

NameTypeDescription
eventTargetEventTargetThe react component or event target at which the listener should listen for the event.
eventNamestringThe name of the event for which to listen.
listener(event: Event) => voidThe listener for event to register.

Returns

void

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:114


localize

localize(key, params?): string

Returns the localized phrase identified by the specified key. The +target.

Parameters

NameTypeDescription
eventTargetEventTargetThe react component or event target at which the listener should listen for the event.
eventNamestringThe name of the event for which to listen.
listener(event: Event) => voidThe listener for event to register.

Returns

void

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:114


localize

localize(key, params?): string

Returns the localized phrase identified by the specified key. The placeholders in the localization phrase will be replaced by the provided -values.

Parameters

NameTypeDescription
keyneverLocalization key.
paramsObjectValues for replacing the placeholders in the localization phrase.

Returns

string

Localized phrase.

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:44


render

render(): ReactNode

Returns

ReactNode

Inherited from

Component.render

Defined in

node_modules/@types/react/index.d.ts:531


setState

setState<K>(state, callback?): void

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
statenull | S | (prevState: Readonly<S>, props: Readonly<P>) => null | S | Pick<S, K> | Pick<S, K>
callback?() => void

Returns

void

Inherited from

Component.setState

Defined in

node_modules/@types/react/index.d.ts:525


shouldComponentUpdate

Optional shouldComponentUpdate(nextProps, nextState, nextContext): boolean

Called to determine whether the change in props and state should trigger a re-render.

Component always returns true. +values.

Parameters

NameTypeDescription
keyneverLocalization key.
paramsObjectValues for replacing the placeholders in the localization phrase.

Returns

string

Localized phrase.

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:44


render

render(): ReactNode

Returns

ReactNode

Inherited from

Component.render

Defined in

node_modules/@types/react/index.d.ts:531


setState

setState<K>(state, callback?): void

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
statenull | S | (prevState: Readonly<S>, props: Readonly<P>) => null | S | Pick<S, K> | Pick<S, K>
callback?() => void

Returns

void

Inherited from

Component.setState

Defined in

node_modules/@types/react/index.d.ts:525


shouldComponentUpdate

Optional shouldComponentUpdate(nextProps, nextState, nextContext): boolean

Called to determine whether the change in props and state should trigger a re-render.

Component always returns true. PureComponent implements a shallow comparison on props and state and returns true if any props or states have changed.

If false is returned, Component#render, componentWillUpdate and componentDidUpdate will not be called.

Parameters

NameType
nextPropsReadonly<P>
nextStateReadonly<S>
nextContextany

Returns

boolean

Inherited from

Component.shouldComponentUpdate

Defined in

node_modules/@types/react/index.d.ts:649


unlisten

unlisten(eventTarget, eventName, listener): void

Deregisters the provided event listener for an IMA.js DOM custom event -of the specified name at the specified event target.

Parameters

NameTypeDescription
eventTargetEventTargetThe react component or event target at which the listener should listen for the event.
eventNamestringThe name of the event for which to listen.
listener(event: Event) => voidThe listener for event to register.

Returns

void

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:131

- - +of the specified name at the specified event target.

Parameters

NameTypeDescription
eventTargetEventTargetThe react component or event target at which the listener should listen for the event.
eventNamestringThe name of the event for which to listen.
listener(event: Event) => voidThe listener for event to register.

Returns

void

Defined in

packages/react-page-renderer/src/component/AbstractComponent.ts:131

+ + \ No newline at end of file diff --git a/api/classes/ima_react_page_renderer.AbstractPureComponent/index.html b/api/classes/ima_react_page_renderer.AbstractPureComponent/index.html index 23fe72d929..1d8cc3c73a 100644 --- a/api/classes/ima_react_page_renderer.AbstractPureComponent/index.html +++ b/api/classes/ima_react_page_renderer.AbstractPureComponent/index.html @@ -4,13 +4,13 @@ Class: AbstractPureComponent<P, S, SS> | IMA.js - - + +
-
Skip to main content

Class: AbstractPureComponent<P, S, SS>

@ima/react-page-renderer.AbstractPureComponent

The base class for all view components.

Type parameters

NameType
Punknown
Sunknown
SSunknown

Hierarchy

  • PureComponent<P, S, SS>

    AbstractPureComponent

Constructors

constructor

new AbstractPureComponent<P, S, SS>(props)

Type parameters

NameType
Punknown
Sunknown
SSunknown

Parameters

NameType
propsP | Readonly<P>

Inherited from

PureComponent<P, S, SS>.constructor

Defined in

node_modules/@types/react/index.d.ts:515

new AbstractPureComponent<P, S, SS>(props, context)

Type parameters

NameType
Punknown
Sunknown
SSunknown

Parameters

NameType
propsP
contextany

Deprecated

See

https://legacy.reactjs.org/docs/legacy-context.html

Inherited from

PureComponent<P, S, SS>.constructor

Defined in

node_modules/@types/react/index.d.ts:520

Properties

_utils

Private Optional _utils: Utils

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:18


context

context: PageContextType

Overrides

PureComponent.context

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:16


props

Readonly props: Readonly<P>

Inherited from

PureComponent.props

Defined in

node_modules/@types/react/index.d.ts:533


refs

refs: Object

Deprecated

https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs

Index signature

[key: string]: ReactInstance

Inherited from

PureComponent.refs

Defined in

node_modules/@types/react/index.d.ts:539


state

state: Readonly<S>

Inherited from

PureComponent.state

Defined in

node_modules/@types/react/index.d.ts:534


contextType

Static contextType: Context<PageContextType> = PageContext

Overrides

PureComponent.contextType

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:15

Accessors

utils

get utils(): Utils

Returns the utilities for the view components. The returned value is the -value bound to the $Utils object container constant.

Returns

Utils

The utilities for the view components.

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:26

Methods

UNSAFE_componentWillMount

Optional UNSAFE_componentWillMount(): void

Called immediately before mounting occurs, and before Component#render. +

Class: AbstractPureComponent<P, S, SS>

@ima/react-page-renderer.AbstractPureComponent

The base class for all view components.

Type parameters

NameType
Punknown
Sunknown
SSunknown

Hierarchy

  • PureComponent<P, S, SS>

    AbstractPureComponent

Constructors

constructor

new AbstractPureComponent<P, S, SS>(props)

Type parameters

NameType
Punknown
Sunknown
SSunknown

Parameters

NameType
propsP | Readonly<P>

Inherited from

PureComponent<P, S, SS>.constructor

Defined in

node_modules/@types/react/index.d.ts:515

new AbstractPureComponent<P, S, SS>(props, context)

Type parameters

NameType
Punknown
Sunknown
SSunknown

Parameters

NameType
propsP
contextany

Deprecated

See

https://legacy.reactjs.org/docs/legacy-context.html

Inherited from

PureComponent<P, S, SS>.constructor

Defined in

node_modules/@types/react/index.d.ts:520

Properties

_utils

Private Optional _utils: Utils

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:18


context

context: PageContextType

Overrides

PureComponent.context

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:16


props

Readonly props: Readonly<P>

Inherited from

PureComponent.props

Defined in

node_modules/@types/react/index.d.ts:533


refs

refs: Object

Deprecated

https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs

Index signature

[key: string]: ReactInstance

Inherited from

PureComponent.refs

Defined in

node_modules/@types/react/index.d.ts:539


state

state: Readonly<S>

Inherited from

PureComponent.state

Defined in

node_modules/@types/react/index.d.ts:534


contextType

Static contextType: Context<PageContextType> = PageContext

Overrides

PureComponent.contextType

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:15

Accessors

utils

get utils(): Utils

Returns the utilities for the view components. The returned value is the +value bound to the $Utils object container constant.

Returns

Utils

The utilities for the view components.

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:26

Methods

UNSAFE_componentWillMount

Optional UNSAFE_componentWillMount(): void

Called immediately before mounting occurs, and before Component#render. Avoid introducing any side-effects or subscriptions in this method.

This method will not stop working in React 17.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps prevents this from being invoked.

Returns

void

Deprecated

16.3, use componentDidMount or the constructor instead

See

Inherited from

PureComponent.UNSAFE_componentWillMount

Defined in

node_modules/@types/react/index.d.ts:730


UNSAFE_componentWillReceiveProps

Optional UNSAFE_componentWillReceiveProps(nextProps, nextContext): void

Called when the component may be receiving new props. React may call this even if props have not changed, so be sure to compare new and existing @@ -26,19 +26,19 @@ cancelled network requests, or cleaning up any DOM elements created in componentDidMount.

Returns

void

Inherited from

PureComponent.componentWillUnmount

Defined in

node_modules/@types/react/index.d.ts:654


componentWillUpdate

Optional componentWillUpdate(nextProps, nextState, nextContext): void

Called immediately before rendering when new props or state is received. Not called for the initial render.

Note: You cannot call Component#setState here.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps prevents this from being invoked.

Parameters

NameType
nextPropsReadonly<P>
nextStateReadonly<S>
nextContextany

Returns

void

Deprecated

16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17

See

Inherited from

PureComponent.componentWillUpdate

Defined in

node_modules/@types/react/index.d.ts:775


cssClasses

cssClasses(classRules, includeComponentClassName?): string

Generate a string of CSS classes from the properties of the passed-in object that resolve to true.

Parameters

NameTypeDefault valueDescription
classRulesstring | { [key: string]: boolean; }undefinedCSS classes in a string separated by whitespace, or a map of CSS class names to boolean values. The CSS class name will be included in the result only if the value is true.
includeComponentClassNamebooleanfalse-

Returns

string

String of CSS classes that had their property resolved -to true.

Example

this.cssClasses('my-class my-class-modifier', true);

Example

this.cssClasses({
'my-class': true,
'my-class-modifier': this.props.modifier
}, true);

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:86


fire

fire(eventTarget, eventName, data?): void

Creates and sends a new IMA.js DOM custom event from this component.

Parameters

NameTypeDescription
eventTargetEventTargetEventTarget compatible node.
eventNamestringThe name of the event.
data?anyData to send within the event.

Returns

void

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:100


forceUpdate

forceUpdate(callback?): void

Parameters

NameType
callback?() => void

Returns

void

Inherited from

PureComponent.forceUpdate

Defined in

node_modules/@types/react/index.d.ts:530


getSnapshotBeforeUpdate

Optional getSnapshotBeforeUpdate(prevProps, prevState): null | SS

Runs before React applies the result of render to the document, and +to true.

Example

this.cssClasses('my-class my-class-modifier', true);

Example

this.cssClasses({
'my-class': true,
'my-class-modifier': this.props.modifier
}, true);

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:86


fire

fire(eventTarget, eventName, data?): void

Creates and sends a new IMA.js DOM custom event from this component.

Parameters

NameTypeDescription
eventTargetEventTargetEventTarget compatible node.
eventNamestringThe name of the event.
data?anyData to send within the event.

Returns

void

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:100


forceUpdate

forceUpdate(callback?): void

Parameters

NameType
callback?() => void

Returns

void

Inherited from

PureComponent.forceUpdate

Defined in

node_modules/@types/react/index.d.ts:530


getSnapshotBeforeUpdate

Optional getSnapshotBeforeUpdate(prevProps, prevState): null | SS

Runs before React applies the result of render to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before render causes changes to it.

Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated -lifecycle events from running.

Parameters

NameType
prevPropsReadonly<P>
prevStateReadonly<S>

Returns

null | SS

Inherited from

PureComponent.getSnapshotBeforeUpdate

Defined in

node_modules/@types/react/index.d.ts:695


link(name, params?): string

Generates an absolute URL using the provided route name (see the

app/config/routes.js file). The provided parameters will replace the placeholders in the route pattern, while the extraneous parameters will be appended to the generated URL's query string.

Parameters

NameTypeDescription
namestringThe route name.
paramsObjectRouter parameters and extraneous parameters to add to the URL as a query string.

Returns

string

The generated URL.

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:62


listen

listen(eventTarget, eventName, listener): void

Registers the provided event listener for execution whenever an IMA.js +lifecycle events from running.

Parameters

NameType
prevPropsReadonly<P>
prevStateReadonly<S>

Returns

null | SS

Inherited from

PureComponent.getSnapshotBeforeUpdate

Defined in

node_modules/@types/react/index.d.ts:695


link(name, params?): string

Generates an absolute URL using the provided route name (see the

app/config/routes.js file). The provided parameters will replace the placeholders in the route pattern, while the extraneous parameters will be appended to the generated URL's query string.

Parameters

NameTypeDescription
namestringThe route name.
paramsObjectRouter parameters and extraneous parameters to add to the URL as a query string.

Returns

string

The generated URL.

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:62


listen

listen(eventTarget, eventName, listener): void

Registers the provided event listener for execution whenever an IMA.js DOM custom event of the specified name occurs at the specified event -target.

Parameters

NameTypeDescription
eventTargetEventTargetThe react component or event target at which the listener should listen for the event.
eventNamestringThe name of the event for which to listen.
listener(event: Event) => voidThe listener for event to register.

Returns

void

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:114


localize

localize(key, params?): string

Returns the localized phrase identified by the specified key. The +target.

Parameters

NameTypeDescription
eventTargetEventTargetThe react component or event target at which the listener should listen for the event.
eventNamestringThe name of the event for which to listen.
listener(event: Event) => voidThe listener for event to register.

Returns

void

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:114


localize

localize(key, params?): string

Returns the localized phrase identified by the specified key. The placeholders in the localization phrase will be replaced by the provided -values.

Parameters

NameTypeDescription
keyneverLocalization key.
paramsObjectValues for replacing the placeholders in the localization phrase.

Returns

string

Localized phrase.

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:44


render

render(): ReactNode

Returns

ReactNode

Inherited from

PureComponent.render

Defined in

node_modules/@types/react/index.d.ts:531


setState

setState<K>(state, callback?): void

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
statenull | S | (prevState: Readonly<S>, props: Readonly<P>) => null | S | Pick<S, K> | Pick<S, K>
callback?() => void

Returns

void

Inherited from

PureComponent.setState

Defined in

node_modules/@types/react/index.d.ts:525


shouldComponentUpdate

Optional shouldComponentUpdate(nextProps, nextState, nextContext): boolean

Called to determine whether the change in props and state should trigger a re-render.

Component always returns true. +values.

Parameters

NameTypeDescription
keyneverLocalization key.
paramsObjectValues for replacing the placeholders in the localization phrase.

Returns

string

Localized phrase.

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:44


render

render(): ReactNode

Returns

ReactNode

Inherited from

PureComponent.render

Defined in

node_modules/@types/react/index.d.ts:531


setState

setState<K>(state, callback?): void

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
statenull | S | (prevState: Readonly<S>, props: Readonly<P>) => null | S | Pick<S, K> | Pick<S, K>
callback?() => void

Returns

void

Inherited from

PureComponent.setState

Defined in

node_modules/@types/react/index.d.ts:525


shouldComponentUpdate

Optional shouldComponentUpdate(nextProps, nextState, nextContext): boolean

Called to determine whether the change in props and state should trigger a re-render.

Component always returns true. PureComponent implements a shallow comparison on props and state and returns true if any props or states have changed.

If false is returned, Component#render, componentWillUpdate and componentDidUpdate will not be called.

Parameters

NameType
nextPropsReadonly<P>
nextStateReadonly<S>
nextContextany

Returns

boolean

Inherited from

PureComponent.shouldComponentUpdate

Defined in

node_modules/@types/react/index.d.ts:649


unlisten

unlisten(eventTarget, eventName, listener): void

Deregisters the provided event listener for an IMA.js DOM custom event -of the specified name at the specified event target.

Parameters

NameTypeDescription
eventTargetEventTargetThe react component or event target at which the listener should listen for the event.
eventNamestringThe name of the event for which to listen.
listener(event: Event) => voidThe listener for event to register.

Returns

void

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:131

- - +of the specified name at the specified event target.

Parameters

NameTypeDescription
eventTargetEventTargetThe react component or event target at which the listener should listen for the event.
eventNamestringThe name of the event for which to listen.
listener(event: Event) => voidThe listener for event to register.

Returns

void

Defined in

packages/react-page-renderer/src/component/AbstractPureComponent.ts:131

+ + \ No newline at end of file diff --git a/api/classes/ima_react_page_renderer.BlankManagedRootView/index.html b/api/classes/ima_react_page_renderer.BlankManagedRootView/index.html index 69461c80bb..eadf0c052d 100644 --- a/api/classes/ima_react_page_renderer.BlankManagedRootView/index.html +++ b/api/classes/ima_react_page_renderer.BlankManagedRootView/index.html @@ -4,15 +4,15 @@ Class: BlankManagedRootView<P, S, SS> | IMA.js - - + +
-
Skip to main content

Class: BlankManagedRootView<P, S, SS>

@ima/react-page-renderer.BlankManagedRootView

Blank managed root view does not nothing except for rendering the current +

Class: BlankManagedRootView<P, S, SS>

@ima/react-page-renderer.BlankManagedRootView

Blank managed root view does not nothing except for rendering the current page view.

This is the default managed root view.

Type parameters

NameType
Pextends BlankManagedRootViewProps = BlankManagedRootViewProps
Sunknown
SSunknown

Hierarchy

  • Component<P, S, SS>

    BlankManagedRootView

Constructors

constructor

new BlankManagedRootView<P, S, SS>(props)

Type parameters

NameType
Pextends BlankManagedRootViewProps = BlankManagedRootViewProps
Sunknown
SSunknown

Parameters

NameType
propsP | Readonly<P>

Inherited from

Component<P, S, SS>.constructor

Defined in

node_modules/@types/react/index.d.ts:515

new BlankManagedRootView<P, S, SS>(props, context)

Type parameters

NameType
Pextends BlankManagedRootViewProps = BlankManagedRootViewProps
Sunknown
SSunknown

Parameters

NameType
propsP
contextany

Deprecated

See

https://legacy.reactjs.org/docs/legacy-context.html

Inherited from

Component<P, S, SS>.constructor

Defined in

node_modules/@types/react/index.d.ts:520

Properties

context

context: unknown

If using the new style context, re-declare this in your class to be the React.ContextType of your static contextType. -Should be used with type annotation or static contextType.

static contextType = MyContext
// For TS pre-3.7:
context!: React.ContextType<typeof MyContext>
// For TS 3.7 and above:
declare context: React.ContextType<typeof MyContext>

See

https://react.dev/reference/react/Component#context

Inherited from

Component.context

Defined in

node_modules/@types/react/index.d.ts:513


props

Readonly props: Readonly<P>

Inherited from

Component.props

Defined in

node_modules/@types/react/index.d.ts:533


refs

refs: Object

Deprecated

https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs

Index signature

[key: string]: ReactInstance

Inherited from

Component.refs

Defined in

node_modules/@types/react/index.d.ts:539


state

state: Readonly<S>

Inherited from

Component.state

Defined in

node_modules/@types/react/index.d.ts:534


contextType

Static Optional contextType: Context<any>

If set, this.context will be set at runtime to the current value of the given Context.

Usage:

type MyContext = number
const Ctx = React.createContext<MyContext>(0)

class Foo extends React.Component {
static contextType = Ctx
context!: React.ContextType<typeof Ctx>
render () {
return <>My context's value: {this.context}</>;
}
}

See

https://react.dev/reference/react/Component#static-contexttype

Inherited from

Component.contextType

Defined in

node_modules/@types/react/index.d.ts:496

Accessors

defaultProps

Static get defaultProps(): Object

Returns

Object

NameType
pageViewnull

Defined in

packages/react-page-renderer/src/component/BlankManagedRootView.ts:23

Methods

UNSAFE_componentWillMount

Optional UNSAFE_componentWillMount(): void

Called immediately before mounting occurs, and before Component#render. +Should be used with type annotation or static contextType.

static contextType = MyContext
// For TS pre-3.7:
context!: React.ContextType<typeof MyContext>
// For TS 3.7 and above:
declare context: React.ContextType<typeof MyContext>

See

https://react.dev/reference/react/Component#context

Inherited from

Component.context

Defined in

node_modules/@types/react/index.d.ts:513


props

Readonly props: Readonly<P>

Inherited from

Component.props

Defined in

node_modules/@types/react/index.d.ts:533


refs

refs: Object

Deprecated

https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs

Index signature

[key: string]: ReactInstance

Inherited from

Component.refs

Defined in

node_modules/@types/react/index.d.ts:539


state

state: Readonly<S>

Inherited from

Component.state

Defined in

node_modules/@types/react/index.d.ts:534


contextType

Static Optional contextType: Context<any>

If set, this.context will be set at runtime to the current value of the given Context.

Usage:

type MyContext = number
const Ctx = React.createContext<MyContext>(0)

class Foo extends React.Component {
static contextType = Ctx
context!: React.ContextType<typeof Ctx>
render () {
return <>My context's value: {this.context}</>;
}
}

See

https://react.dev/reference/react/Component#static-contexttype

Inherited from

Component.contextType

Defined in

node_modules/@types/react/index.d.ts:496

Accessors

defaultProps

Static get defaultProps(): Object

Returns

Object

NameType
pageViewnull

Defined in

packages/react-page-renderer/src/component/BlankManagedRootView.ts:23

Methods

UNSAFE_componentWillMount

Optional UNSAFE_componentWillMount(): void

Called immediately before mounting occurs, and before Component#render. Avoid introducing any side-effects or subscriptions in this method.

This method will not stop working in React 17.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps prevents this from being invoked.

Returns

void

Deprecated

16.3, use componentDidMount or the constructor instead

See

Inherited from

Component.UNSAFE_componentWillMount

Defined in

node_modules/@types/react/index.d.ts:730


UNSAFE_componentWillReceiveProps

Optional UNSAFE_componentWillReceiveProps(nextProps, nextContext): void

Called when the component may be receiving new props. React may call this even if props have not changed, so be sure to compare new and existing @@ -29,11 +29,11 @@ prevents this from being invoked.

Parameters

NameType
nextPropsReadonly<P>
nextStateReadonly<S>
nextContextany

Returns

void

Deprecated

16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17

See

Inherited from

Component.componentWillUpdate

Defined in

node_modules/@types/react/index.d.ts:775


forceUpdate

forceUpdate(callback?): void

Parameters

NameType
callback?() => void

Returns

void

Inherited from

Component.forceUpdate

Defined in

node_modules/@types/react/index.d.ts:530


getSnapshotBeforeUpdate

Optional getSnapshotBeforeUpdate(prevProps, prevState): null | SS

Runs before React applies the result of render to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before render causes changes to it.

Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated -lifecycle events from running.

Parameters

NameType
prevPropsReadonly<P>
prevStateReadonly<S>

Returns

null | SS

Inherited from

Component.getSnapshotBeforeUpdate

Defined in

node_modules/@types/react/index.d.ts:695


render

render(): null | ReactElement<{}, string | JSXElementConstructor<any>>

Returns

null | ReactElement<{}, string | JSXElementConstructor<any>>

Inherit Doc

Overrides

Component.render

Defined in

packages/react-page-renderer/src/component/BlankManagedRootView.ts:32


setState

setState<K>(state, callback?): void

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
statenull | S | (prevState: Readonly<S>, props: Readonly<P>) => null | S | Pick<S, K> | Pick<S, K>
callback?() => void

Returns

void

Inherited from

Component.setState

Defined in

node_modules/@types/react/index.d.ts:525


shouldComponentUpdate

Optional shouldComponentUpdate(nextProps, nextState, nextContext): boolean

Called to determine whether the change in props and state should trigger a re-render.

Component always returns true. +lifecycle events from running.

Parameters

NameType
prevPropsReadonly<P>
prevStateReadonly<S>

Returns

null | SS

Inherited from

Component.getSnapshotBeforeUpdate

Defined in

node_modules/@types/react/index.d.ts:695


render

render(): null | ReactElement<{}, string | JSXElementConstructor<any>>

Returns

null | ReactElement<{}, string | JSXElementConstructor<any>>

Inherit Doc

Overrides

Component.render

Defined in

packages/react-page-renderer/src/component/BlankManagedRootView.ts:32


setState

setState<K>(state, callback?): void

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
statenull | S | (prevState: Readonly<S>, props: Readonly<P>) => null | S | Pick<S, K> | Pick<S, K>
callback?() => void

Returns

void

Inherited from

Component.setState

Defined in

node_modules/@types/react/index.d.ts:525


shouldComponentUpdate

Optional shouldComponentUpdate(nextProps, nextState, nextContext): boolean

Called to determine whether the change in props and state should trigger a re-render.

Component always returns true. PureComponent implements a shallow comparison on props and state and returns true if any props or states have changed.

If false is returned, Component#render, componentWillUpdate -and componentDidUpdate will not be called.

Parameters

NameType
nextPropsReadonly<P>
nextStateReadonly<S>
nextContextany

Returns

boolean

Inherited from

Component.shouldComponentUpdate

Defined in

node_modules/@types/react/index.d.ts:649

- - +and componentDidUpdate will not be called.

Parameters

NameType
nextPropsReadonly<P>
nextStateReadonly<S>
nextContextany

Returns

boolean

Inherited from

Component.shouldComponentUpdate

Defined in

node_modules/@types/react/index.d.ts:649

+ + \ No newline at end of file diff --git a/api/classes/ima_react_page_renderer.ErrorBoundary/index.html b/api/classes/ima_react_page_renderer.ErrorBoundary/index.html index 3d769e8932..b1975c6251 100644 --- a/api/classes/ima_react_page_renderer.ErrorBoundary/index.html +++ b/api/classes/ima_react_page_renderer.ErrorBoundary/index.html @@ -4,16 +4,16 @@ Class: ErrorBoundary | IMA.js - - + +
-
Skip to main content

Class: ErrorBoundary

@ima/react-page-renderer.ErrorBoundary

Error boundary wrapper which connects the IMA application to the +

Class: ErrorBoundary

@ima/react-page-renderer.ErrorBoundary

Error boundary wrapper which connects the IMA application to the dev HMR api and handles error reporting.

Hierarchy

  • PureComponent<ErrorBoundaryProps, ErrorBoundaryState>

    ErrorBoundary

Constructors

constructor

new ErrorBoundary(props)

Parameters

NameType
propsErrorBoundaryProps

Overrides

PureComponent< ErrorBoundaryProps, ErrorBoundaryState -\>.constructor

Defined in

packages/react-page-renderer/src/component/ErrorBoundary.ts:19

Properties

context

context: unknown

If using the new style context, re-declare this in your class to be the +\>.constructor

Defined in

packages/react-page-renderer/src/component/ErrorBoundary.ts:19

Properties

context

context: unknown

If using the new style context, re-declare this in your class to be the React.ContextType of your static contextType. Should be used with type annotation or static contextType.

static contextType = MyContext
// For TS pre-3.7:
context!: React.ContextType<typeof MyContext>
// For TS 3.7 and above:
declare context: React.ContextType<typeof MyContext>

See

https://react.dev/reference/react/Component#context

Inherited from

PureComponent.context

Defined in

node_modules/@types/react/index.d.ts:513


props

Readonly props: Readonly<ErrorBoundaryProps>

Inherited from

PureComponent.props

Defined in

node_modules/@types/react/index.d.ts:533


refs

refs: Object

Deprecated

https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs

Index signature

[key: string]: ReactInstance

Inherited from

PureComponent.refs

Defined in

node_modules/@types/react/index.d.ts:539


state

state: Readonly<ErrorBoundaryState>

Inherited from

PureComponent.state

Defined in

node_modules/@types/react/index.d.ts:534


contextType

Static Optional contextType: Context<any>

If set, this.context will be set at runtime to the current value of the given Context.

Usage:

type MyContext = number
const Ctx = React.createContext<MyContext>(0)

class Foo extends React.Component {
static contextType = Ctx
context!: React.ContextType<typeof Ctx>
render () {
return <>My context's value: {this.context}</>;
}
}

See

https://react.dev/reference/react/Component#static-contexttype

Inherited from

PureComponent.contextType

Defined in

node_modules/@types/react/index.d.ts:496

Methods

UNSAFE_componentWillMount

Optional UNSAFE_componentWillMount(): void

Called immediately before mounting occurs, and before Component#render. Avoid introducing any side-effects or subscriptions in this method.

This method will not stop working in React 17.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps @@ -21,7 +21,7 @@ React may call this even if props have not changed, so be sure to compare new and existing props if you only want to handle changes.

Calling Component#setState generally does not trigger this method.

This method will not stop working in React 17.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps prevents this from being invoked.

Parameters

NameType
nextPropsReadonly<ErrorBoundaryProps>
nextContextany

Returns

void

Deprecated

16.3, use static getDerivedStateFromProps instead

See

Inherited from

PureComponent.UNSAFE_componentWillReceiveProps

Defined in

node_modules/@types/react/index.d.ts:762


UNSAFE_componentWillUpdate

Optional UNSAFE_componentWillUpdate(nextProps, nextState, nextContext): void

Called immediately before rendering when new props or state is received. Not called for the initial render.

Note: You cannot call Component#setState here.

This method will not stop working in React 17.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps -prevents this from being invoked.

Parameters

NameType
nextPropsReadonly<ErrorBoundaryProps>
nextStateReadonly<ErrorBoundaryState>
nextContextany

Returns

void

Deprecated

16.3, use getSnapshotBeforeUpdate instead

See

Inherited from

PureComponent.UNSAFE_componentWillUpdate

Defined in

node_modules/@types/react/index.d.ts:790


componentDidCatch

componentDidCatch(error): void

Parameters

NameType
errorError

Returns

void

Overrides

PureComponent.componentDidCatch

Defined in

packages/react-page-renderer/src/component/ErrorBoundary.ts:38


componentDidMount

componentDidMount(): void

Returns

void

Overrides

PureComponent.componentDidMount

Defined in

packages/react-page-renderer/src/component/ErrorBoundary.ts:31


componentDidUpdate

Optional componentDidUpdate(prevProps, prevState, snapshot?): void

Called immediately after updating occurs. Not called for the initial render.

The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null.

Parameters

NameType
prevPropsReadonly<ErrorBoundaryProps>
prevStateReadonly<ErrorBoundaryState>
snapshot?any

Returns

void

Inherited from

PureComponent.componentDidUpdate

Defined in

node_modules/@types/react/index.d.ts:701


componentWillMount

Optional componentWillMount(): void

Called immediately before mounting occurs, and before Component#render. +prevents this from being invoked.

Parameters

NameType
nextPropsReadonly<ErrorBoundaryProps>
nextStateReadonly<ErrorBoundaryState>
nextContextany

Returns

void

Deprecated

16.3, use getSnapshotBeforeUpdate instead

See

Inherited from

PureComponent.UNSAFE_componentWillUpdate

Defined in

node_modules/@types/react/index.d.ts:790


componentDidCatch

componentDidCatch(error): void

Parameters

NameType
errorError

Returns

void

Overrides

PureComponent.componentDidCatch

Defined in

packages/react-page-renderer/src/component/ErrorBoundary.ts:38


componentDidMount

componentDidMount(): void

Returns

void

Overrides

PureComponent.componentDidMount

Defined in

packages/react-page-renderer/src/component/ErrorBoundary.ts:31


componentDidUpdate

Optional componentDidUpdate(prevProps, prevState, snapshot?): void

Called immediately after updating occurs. Not called for the initial render.

The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null.

Parameters

NameType
prevPropsReadonly<ErrorBoundaryProps>
prevStateReadonly<ErrorBoundaryState>
snapshot?any

Returns

void

Inherited from

PureComponent.componentDidUpdate

Defined in

node_modules/@types/react/index.d.ts:701


componentWillMount

Optional componentWillMount(): void

Called immediately before mounting occurs, and before Component#render. Avoid introducing any side-effects or subscriptions in this method.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps prevents this from being invoked.

Returns

void

Deprecated

16.3, use componentDidMount or the constructor instead; will stop working in React 17

See

Inherited from

PureComponent.componentWillMount

Defined in

node_modules/@types/react/index.d.ts:716


componentWillReceiveProps

Optional componentWillReceiveProps(nextProps, nextContext): void

Called when the component may be receiving new props. React may call this even if props have not changed, so be sure to compare new and existing @@ -31,11 +31,11 @@ prevents this from being invoked.

Parameters

NameType
nextPropsReadonly<ErrorBoundaryProps>
nextStateReadonly<ErrorBoundaryState>
nextContextany

Returns

void

Deprecated

16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17

See

Inherited from

PureComponent.componentWillUpdate

Defined in

node_modules/@types/react/index.d.ts:775


forceUpdate

forceUpdate(callback?): void

Parameters

NameType
callback?() => void

Returns

void

Inherited from

PureComponent.forceUpdate

Defined in

node_modules/@types/react/index.d.ts:530


getSnapshotBeforeUpdate

Optional getSnapshotBeforeUpdate(prevProps, prevState): any

Runs before React applies the result of render to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before render causes changes to it.

Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated -lifecycle events from running.

Parameters

NameType
prevPropsReadonly<ErrorBoundaryProps>
prevStateReadonly<ErrorBoundaryState>

Returns

any

Inherited from

PureComponent.getSnapshotBeforeUpdate

Defined in

node_modules/@types/react/index.d.ts:695


render

render(): undefined | null | ReactElement<any, string | JSXElementConstructor<any>>

Returns

undefined | null | ReactElement<any, string | JSXElementConstructor<any>>

Overrides

PureComponent.render

Defined in

packages/react-page-renderer/src/component/ErrorBoundary.ts:45


setState

setState<K>(state, callback?): void

Type parameters

NameType
Kextends "hasError"

Parameters

NameType
statenull | ErrorBoundaryState | (prevState: Readonly<ErrorBoundaryState>, props: Readonly<ErrorBoundaryProps>) => null | ErrorBoundaryState | Pick<ErrorBoundaryState, K> | Pick<ErrorBoundaryState, K>
callback?() => void

Returns

void

Inherited from

PureComponent.setState

Defined in

node_modules/@types/react/index.d.ts:525


shouldComponentUpdate

Optional shouldComponentUpdate(nextProps, nextState, nextContext): boolean

Called to determine whether the change in props and state should trigger a re-render.

Component always returns true. +lifecycle events from running.

Parameters

NameType
prevPropsReadonly<ErrorBoundaryProps>
prevStateReadonly<ErrorBoundaryState>

Returns

any

Inherited from

PureComponent.getSnapshotBeforeUpdate

Defined in

node_modules/@types/react/index.d.ts:695


render

render(): undefined | null | ReactElement<any, string | JSXElementConstructor<any>>

Returns

undefined | null | ReactElement<any, string | JSXElementConstructor<any>>

Overrides

PureComponent.render

Defined in

packages/react-page-renderer/src/component/ErrorBoundary.ts:45


setState

setState<K>(state, callback?): void

Type parameters

NameType
Kextends "hasError"

Parameters

NameType
statenull | ErrorBoundaryState | (prevState: Readonly<ErrorBoundaryState>, props: Readonly<ErrorBoundaryProps>) => null | ErrorBoundaryState | Pick<ErrorBoundaryState, K> | Pick<ErrorBoundaryState, K>
callback?() => void

Returns

void

Inherited from

PureComponent.setState

Defined in

node_modules/@types/react/index.d.ts:525


shouldComponentUpdate

Optional shouldComponentUpdate(nextProps, nextState, nextContext): boolean

Called to determine whether the change in props and state should trigger a re-render.

Component always returns true. PureComponent implements a shallow comparison on props and state and returns true if any props or states have changed.

If false is returned, Component#render, componentWillUpdate -and componentDidUpdate will not be called.

Parameters

NameType
nextPropsReadonly<ErrorBoundaryProps>
nextStateReadonly<ErrorBoundaryState>
nextContextany

Returns

boolean

Inherited from

PureComponent.shouldComponentUpdate

Defined in

node_modules/@types/react/index.d.ts:649


getDerivedStateFromError

Static getDerivedStateFromError(): Object

Returns

Object

NameType
hasErrorboolean

Defined in

packages/react-page-renderer/src/component/ErrorBoundary.ts:27

- - +and componentDidUpdate will not be called.

Parameters

NameType
nextPropsReadonly<ErrorBoundaryProps>
nextStateReadonly<ErrorBoundaryState>
nextContextany

Returns

boolean

Inherited from

PureComponent.shouldComponentUpdate

Defined in

node_modules/@types/react/index.d.ts:649


getDerivedStateFromError

Static getDerivedStateFromError(): Object

Returns

Object

NameType
hasErrorboolean

Defined in

packages/react-page-renderer/src/component/ErrorBoundary.ts:27

+ + \ No newline at end of file diff --git a/api/classes/ima_react_page_renderer.PageRendererFactory/index.html b/api/classes/ima_react_page_renderer.PageRendererFactory/index.html index 759b0f68ec..2f26e5a685 100644 --- a/api/classes/ima_react_page_renderer.PageRendererFactory/index.html +++ b/api/classes/ima_react_page_renderer.PageRendererFactory/index.html @@ -4,19 +4,19 @@ Class: PageRendererFactory | IMA.js - - + +
-
Skip to main content

Class: PageRendererFactory

@ima/react-page-renderer.PageRendererFactory

Factory for page render.

Constructors

constructor

new PageRendererFactory(componentUtils)

Initializes the factory used by the page renderer.

Parameters

NameTypeDescription
componentUtilsComponentUtilsThe registry of component utilities.

Defined in

packages/react-page-renderer/src/renderer/PageRendererFactory.ts:15

Properties

_componentUtils

Private _componentUtils: ComponentUtils

Defined in

packages/react-page-renderer/src/renderer/PageRendererFactory.ts:8

Methods

_isFunctionalComponent

Private _isFunctionalComponent(component): boolean

Parameters

NameType
componentunknown

Returns

boolean

Defined in

packages/react-page-renderer/src/renderer/PageRendererFactory.ts:91


getDocumentView

getDocumentView(documentView): ComponentType

Returns the class constructor of the specified document view component. +

Class: PageRendererFactory

@ima/react-page-renderer.PageRendererFactory

Factory for page render.

Constructors

constructor

new PageRendererFactory(componentUtils)

Initializes the factory used by the page renderer.

Parameters

NameTypeDescription
componentUtilsComponentUtilsThe registry of component utilities.

Defined in

packages/react-page-renderer/src/renderer/PageRendererFactory.ts:15

Properties

_componentUtils

Private _componentUtils: ComponentUtils

Defined in

packages/react-page-renderer/src/renderer/PageRendererFactory.ts:8

Methods

_isFunctionalComponent

Private _isFunctionalComponent(component): boolean

Parameters

NameType
componentunknown

Returns

boolean

Defined in

packages/react-page-renderer/src/renderer/PageRendererFactory.ts:91


getDocumentView

getDocumentView(documentView): ComponentType

Returns the class constructor of the specified document view component. Document view may be specified as a namespace path or as a class constructor.

Parameters

NameTypeDescription
documentViewComponentTypeThe namespace path pointing to the document view component, or the constructor of the document view component.

Returns

ComponentType

The constructor of the document -view component.

Defined in

packages/react-page-renderer/src/renderer/PageRendererFactory.ts:40


getManagedRootView

getManagedRootView(managedRootView): ComponentType

Returns the class constructor of the specified managed root view +view component.

Defined in

packages/react-page-renderer/src/renderer/PageRendererFactory.ts:40


getManagedRootView

getManagedRootView(managedRootView): ComponentType

Returns the class constructor of the specified managed root view component. Managed root view may be specified as a namespace path or as a class constructor.

Parameters

NameTypeDescription
managedRootViewComponentTypeThe namespace path pointing to the managed root view component, or the constructor of the React component.

Returns

ComponentType

The constructor of the managed -root view component.

Defined in

packages/react-page-renderer/src/renderer/PageRendererFactory.ts:71


getUtils

getUtils(): Utils

Return object of services which are defined for alias $Utils.

Returns

Utils

Defined in

packages/react-page-renderer/src/renderer/PageRendererFactory.ts:25

- - +root view component.

Defined in

packages/react-page-renderer/src/renderer/PageRendererFactory.ts:71


getUtils

getUtils(): Utils

Return object of services which are defined for alias $Utils.

Returns

Utils

Defined in

packages/react-page-renderer/src/renderer/PageRendererFactory.ts:25

+ + \ No newline at end of file diff --git a/api/classes/ima_react_page_renderer.ServerPageRenderer/index.html b/api/classes/ima_react_page_renderer.ServerPageRenderer/index.html index 92a838b84c..670159b2fa 100644 --- a/api/classes/ima_react_page_renderer.ServerPageRenderer/index.html +++ b/api/classes/ima_react_page_renderer.ServerPageRenderer/index.html @@ -4,14 +4,14 @@ Class: ServerPageRenderer | IMA.js - - + +
-
Skip to main content

Class: ServerPageRenderer

@ima/react-page-renderer.ServerPageRenderer

Server-side page renderer. The renderer renders the page into the HTML -markup and sends it to the client.

Hierarchy

  • AbstractPageRenderer

    ServerPageRenderer

Constructors

constructor

new ServerPageRenderer(factory, helpers, dispatcher, settings)

Initializes the server-side page renderer.

Parameters

NameTypeDescription
factoryPageRendererFactoryFactory for receive $Utils to view.
helpers__moduleThe IMA.js helper methods.
dispatcherDispatcherDispatcher fires events to app.
settingsSettingsApplication setting for the current application environment.

Overrides

AbstractPageRenderer.constructor

Defined in

packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:34

Properties

_dispatcher

Protected _dispatcher: Dispatcher

Inherited from

AbstractPageRenderer._dispatcher

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:37


_factory

Protected _factory: PageRendererFactory

Inherited from

AbstractPageRenderer._factory

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:38


_helpers

Protected _helpers: __module

Inherited from

AbstractPageRenderer._helpers

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:39


_settings

Protected _settings: Settings

Inherited from

AbstractPageRenderer._settings

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:40


_viewAdapter

Protected Optional _viewAdapter: ComponentType

Inherited from

AbstractPageRenderer._viewAdapter

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:41


_viewAdapterProps

Protected _viewAdapterProps: UnknownParameters = {}

Inherited from

AbstractPageRenderer._viewAdapterProps

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:42

Methods

_generateViewAdapterProps

Protected _generateViewAdapterProps(managedRootView, pageView, state?): ViewAdapterProps

Generate properties for view from state.

Parameters

NameType
managedRootViewComponentType
pageViewComponentType
stateUnknownParameters

Returns

ViewAdapterProps

Inherited from

AbstractPageRenderer._generateViewAdapterProps

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:128


_getDocumentView

Protected _getDocumentView(routeOptions): ComponentType

Returns the class constructor of the specified document view component.

Parameters

NameTypeDescription
routeOptionsRouteOptionsThe current route options.

Returns

ComponentType

The constructor of the document view component.

Inherited from

AbstractPageRenderer._getDocumentView

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:176


_getViewAdapterElement

_getViewAdapterElement(props?): undefined | ReactElement<{}, string | JSXElementConstructor<any>>

Parameters

NameType
propsObject

Returns

undefined | ReactElement<{}, string | JSXElementConstructor<any>>

Inherit Doc

Inherited from

AbstractPageRenderer._getViewAdapterElement

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:115


_prepareViewAdapter

Protected _prepareViewAdapter(controller, pageView, routeOptions): void

Returns wrapped page view component with managed root view and view adapter.

Parameters

NameTypeDescription
controllerController<{}, {}, {}>-
pageViewComponentType-
routeOptionsRouteOptionsThe current route options.

Returns

void

Inherited from

AbstractPageRenderer._prepareViewAdapter

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:148


mount

mount(controller, pageView, pageResources, routeOptions): Promise<void | PageData>

Parameters

NameType
controllerControllerDecorator<{}, {}, {}>
pageViewComponentType<{}>
pageResourcesUnknownPromiseParameters
routeOptionsRouteOptions

Returns

Promise<void | PageData>

Inherit Doc

Overrides

AbstractPageRenderer.mount

Defined in

packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:46


setState

setState(): Promise<void>

Returns

Promise<void>

Overrides

AbstractPageRenderer.setState

Defined in

packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:72


unmount

unmount(): void

Returns

void

Inherit Doc

Overrides

AbstractPageRenderer.unmount

Defined in

packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:88


update

update(): Promise<never>

Returns

Promise<never>

Inherit Doc

Overrides

AbstractPageRenderer.update

Defined in

packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:79

- - +
Skip to main content

Class: ServerPageRenderer

@ima/react-page-renderer.ServerPageRenderer

Server-side page renderer. The renderer renders the page into the HTML +markup and sends it to the client.

Hierarchy

  • AbstractPageRenderer

    ServerPageRenderer

Constructors

constructor

new ServerPageRenderer(factory, helpers, dispatcher, settings)

Initializes the server-side page renderer.

Parameters

NameTypeDescription
factoryPageRendererFactoryFactory for receive $Utils to view.
helpers__moduleThe IMA.js helper methods.
dispatcherDispatcherDispatcher fires events to app.
settingsSettingsApplication setting for the current application environment.

Overrides

AbstractPageRenderer.constructor

Defined in

packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:34

Properties

_dispatcher

Protected _dispatcher: Dispatcher

Inherited from

AbstractPageRenderer._dispatcher

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:37


_factory

Protected _factory: PageRendererFactory

Inherited from

AbstractPageRenderer._factory

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:38


_helpers

Protected _helpers: __module

Inherited from

AbstractPageRenderer._helpers

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:39


_settings

Protected _settings: Settings

Inherited from

AbstractPageRenderer._settings

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:40


_viewAdapter

Protected Optional _viewAdapter: ComponentType

Inherited from

AbstractPageRenderer._viewAdapter

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:41


_viewAdapterProps

Protected _viewAdapterProps: UnknownParameters = {}

Inherited from

AbstractPageRenderer._viewAdapterProps

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:42

Methods

_generateViewAdapterProps

Protected _generateViewAdapterProps(managedRootView, pageView, state?): ViewAdapterProps

Generate properties for view from state.

Parameters

NameType
managedRootViewComponentType
pageViewComponentType
stateUnknownParameters

Returns

ViewAdapterProps

Inherited from

AbstractPageRenderer._generateViewAdapterProps

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:128


_getDocumentView

Protected _getDocumentView(routeOptions): ComponentType

Returns the class constructor of the specified document view component.

Parameters

NameTypeDescription
routeOptionsRouteOptionsThe current route options.

Returns

ComponentType

The constructor of the document view component.

Inherited from

AbstractPageRenderer._getDocumentView

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:176


_getViewAdapterElement

_getViewAdapterElement(props?): undefined | ReactElement<{}, string | JSXElementConstructor<any>>

Parameters

NameType
propsObject

Returns

undefined | ReactElement<{}, string | JSXElementConstructor<any>>

Inherit Doc

Inherited from

AbstractPageRenderer._getViewAdapterElement

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:115


_prepareViewAdapter

Protected _prepareViewAdapter(controller, pageView, routeOptions): void

Returns wrapped page view component with managed root view and view adapter.

Parameters

NameTypeDescription
controllerController<{}, {}, {}>-
pageViewComponentType-
routeOptionsRouteOptionsThe current route options.

Returns

void

Inherited from

AbstractPageRenderer._prepareViewAdapter

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:148


mount

mount(controller, pageView, pageResources, routeOptions): Promise<void | PageData>

Parameters

NameType
controllerControllerDecorator<{}, {}, {}>
pageViewComponentType<{}>
pageResourcesUnknownPromiseParameters
routeOptionsRouteOptions

Returns

Promise<void | PageData>

Inherit Doc

Overrides

AbstractPageRenderer.mount

Defined in

packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:46


setState

setState(): Promise<void>

Returns

Promise<void>

Overrides

AbstractPageRenderer.setState

Defined in

packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:72


unmount

unmount(): void

Returns

void

Inherit Doc

Overrides

AbstractPageRenderer.unmount

Defined in

packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:88


update

update(): Promise<never>

Returns

Promise<never>

Inherit Doc

Overrides

AbstractPageRenderer.update

Defined in

packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:79

+ + \ No newline at end of file diff --git a/api/classes/ima_react_page_renderer.ViewAdapter/index.html b/api/classes/ima_react_page_renderer.ViewAdapter/index.html index 84f09ae4e4..c44b4b0975 100644 --- a/api/classes/ima_react_page_renderer.ViewAdapter/index.html +++ b/api/classes/ima_react_page_renderer.ViewAdapter/index.html @@ -4,15 +4,15 @@ Class: ViewAdapter | IMA.js - - + +
-
Skip to main content

Class: ViewAdapter

@ima/react-page-renderer.ViewAdapter

An adapter component providing the current page controller's state to the -page view component through its properties.

Hierarchy

Constructors

constructor

new ViewAdapter(props)

Initializes the adapter component.

Parameters

NameTypeDescription
propsViewAdapterPropsComponent properties, containing the actual page view and the initial page state to pass to the view.

Overrides

Component<ViewAdapterProps, State\>.constructor

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:42

Properties

_getContextValue

Private _getContextValue: (props: ViewAdapterProps, state: State) => PageContextType

Type declaration

▸ (props, state): PageContextType

Parameters
NameType
propsViewAdapterProps
stateState
Returns

PageContextType

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:26


_managedRootView

Private _managedRootView: ComponentType

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:25


context

context: unknown

If using the new style context, re-declare this in your class to be the +

Class: ViewAdapter

@ima/react-page-renderer.ViewAdapter

An adapter component providing the current page controller's state to the +page view component through its properties.

Hierarchy

Constructors

constructor

new ViewAdapter(props)

Initializes the adapter component.

Parameters

NameTypeDescription
propsViewAdapterPropsComponent properties, containing the actual page view and the initial page state to pass to the view.

Overrides

Component<ViewAdapterProps, State\>.constructor

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:42

Properties

_getContextValue

Private _getContextValue: (props: ViewAdapterProps, state: State) => PageContextType

Type declaration

▸ (props, state): PageContextType

Parameters
NameType
propsViewAdapterProps
stateState
Returns

PageContextType

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:26


_managedRootView

Private _managedRootView: ComponentType

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:25


context

context: unknown

If using the new style context, re-declare this in your class to be the React.ContextType of your static contextType. -Should be used with type annotation or static contextType.

static contextType = MyContext
// For TS pre-3.7:
context!: React.ContextType<typeof MyContext>
// For TS 3.7 and above:
declare context: React.ContextType<typeof MyContext>

See

https://react.dev/reference/react/Component#context

Inherited from

Component.context

Defined in

node_modules/@types/react/index.d.ts:513


contextSelectors

contextSelectors: (props: ViewAdapterProps, state: State) => any[]

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:32


createContext

createContext: MemoizedFn<(...args: any[]) => PageContextType>

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:31


props

Readonly props: Readonly<ViewAdapterProps>

Inherited from

Component.props

Defined in

node_modules/@types/react/index.d.ts:533


refs

refs: Object

Deprecated

https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs

Index signature

[key: string]: ReactInstance

Inherited from

Component.refs

Defined in

node_modules/@types/react/index.d.ts:539


state

state: Readonly<State>

Inherited from

Component.state

Defined in

node_modules/@types/react/index.d.ts:534


contextType

Static Optional contextType: Context<any>

If set, this.context will be set at runtime to the current value of the given Context.

Usage:

type MyContext = number
const Ctx = React.createContext<MyContext>(0)

class Foo extends React.Component {
static contextType = Ctx
context!: React.ContextType<typeof Ctx>
render () {
return <>My context's value: {this.context}</>;
}
}

See

https://react.dev/reference/react/Component#static-contexttype

Inherited from

Component.contextType

Defined in

node_modules/@types/react/index.d.ts:496

Methods

UNSAFE_componentWillMount

Optional UNSAFE_componentWillMount(): void

Called immediately before mounting occurs, and before Component#render. +Should be used with type annotation or static contextType.

static contextType = MyContext
// For TS pre-3.7:
context!: React.ContextType<typeof MyContext>
// For TS 3.7 and above:
declare context: React.ContextType<typeof MyContext>

See

https://react.dev/reference/react/Component#context

Inherited from

Component.context

Defined in

node_modules/@types/react/index.d.ts:513


contextSelectors

contextSelectors: (props: ViewAdapterProps, state: State) => any[]

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:32


createContext

createContext: MemoizedFn<(...args: any[]) => PageContextType>

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:31


props

Readonly props: Readonly<ViewAdapterProps>

Inherited from

Component.props

Defined in

node_modules/@types/react/index.d.ts:533


refs

refs: Object

Deprecated

https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs

Index signature

[key: string]: ReactInstance

Inherited from

Component.refs

Defined in

node_modules/@types/react/index.d.ts:539


state

state: Readonly<State>

Inherited from

Component.state

Defined in

node_modules/@types/react/index.d.ts:534


contextType

Static Optional contextType: Context<any>

If set, this.context will be set at runtime to the current value of the given Context.

Usage:

type MyContext = number
const Ctx = React.createContext<MyContext>(0)

class Foo extends React.Component {
static contextType = Ctx
context!: React.ContextType<typeof Ctx>
render () {
return <>My context's value: {this.context}</>;
}
}

See

https://react.dev/reference/react/Component#static-contexttype

Inherited from

Component.contextType

Defined in

node_modules/@types/react/index.d.ts:496

Methods

UNSAFE_componentWillMount

Optional UNSAFE_componentWillMount(): void

Called immediately before mounting occurs, and before Component#render. Avoid introducing any side-effects or subscriptions in this method.

This method will not stop working in React 17.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps prevents this from being invoked.

Returns

void

Deprecated

16.3, use componentDidMount or the constructor instead

See

Inherited from

Component.UNSAFE_componentWillMount

Defined in

node_modules/@types/react/index.d.ts:730


UNSAFE_componentWillReceiveProps

Optional UNSAFE_componentWillReceiveProps(nextProps, nextContext): void

Called when the component may be receiving new props. React may call this even if props have not changed, so be sure to compare new and existing @@ -26,14 +26,14 @@ props if you only want to handle changes.

Calling Component#setState generally does not trigger this method.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps prevents this from being invoked.

Parameters

NameType
nextPropsReadonly<ViewAdapterProps>
nextContextany

Returns

void

Deprecated

16.3, use static getDerivedStateFromProps instead; will stop working in React 17

See

Inherited from

Component.componentWillReceiveProps

Defined in

node_modules/@types/react/index.d.ts:745


componentWillUnmount

Optional componentWillUnmount(): void

Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as cancelled network requests, or cleaning up any DOM elements created in componentDidMount.

Returns

void

Inherited from

Component.componentWillUnmount

Defined in

node_modules/@types/react/index.d.ts:654


componentWillUpdate

Optional componentWillUpdate(nextProps, nextState, nextContext): void

Called immediately before rendering when new props or state is received. Not called for the initial render.

Note: You cannot call Component#setState here.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps -prevents this from being invoked.

Parameters

NameType
nextPropsReadonly<ViewAdapterProps>
nextStateReadonly<State>
nextContextany

Returns

void

Deprecated

16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17

See

Inherited from

Component.componentWillUpdate

Defined in

node_modules/@types/react/index.d.ts:775


forceUpdate

forceUpdate(callback?): void

Parameters

NameType
callback?() => void

Returns

void

Inherited from

Component.forceUpdate

Defined in

node_modules/@types/react/index.d.ts:530


getContextValue

getContextValue(props, state): PageContextType

Parameters

NameType
propsViewAdapterProps
stateState

Returns

PageContextType

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:89


getSnapshotBeforeUpdate

Optional getSnapshotBeforeUpdate(prevProps, prevState): any

Runs before React applies the result of render to the document, and +prevents this from being invoked.

Parameters

NameType
nextPropsReadonly<ViewAdapterProps>
nextStateReadonly<State>
nextContextany

Returns

void

Deprecated

16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17

See

Inherited from

Component.componentWillUpdate

Defined in

node_modules/@types/react/index.d.ts:775


forceUpdate

forceUpdate(callback?): void

Parameters

NameType
callback?() => void

Returns

void

Inherited from

Component.forceUpdate

Defined in

node_modules/@types/react/index.d.ts:530


getContextValue

getContextValue(props, state): PageContextType

Parameters

NameType
propsViewAdapterProps
stateState

Returns

PageContextType

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:89


getSnapshotBeforeUpdate

Optional getSnapshotBeforeUpdate(prevProps, prevState): any

Runs before React applies the result of render to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before render causes changes to it.

Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated -lifecycle events from running.

Parameters

NameType
prevPropsReadonly<ViewAdapterProps>
prevStateReadonly<State>

Returns

any

Inherited from

Component.getSnapshotBeforeUpdate

Defined in

node_modules/@types/react/index.d.ts:695


render

render(): FunctionComponentElement<ProviderProps<PageContextType>> | CElement<ErrorBoundaryProps, ErrorBoundary>

Returns

FunctionComponentElement<ProviderProps<PageContextType>> | CElement<ErrorBoundaryProps, ErrorBoundary>

Inherit Doc

Overrides

Component.render

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:99


setState

setState<K>(state, callback?): void

Type parameters

NameType
Kextends string | number

Parameters

NameType
statenull | State | (prevState: Readonly<State>, props: Readonly<ViewAdapterProps>) => null | State | Pick<State, K> | Pick<State, K>
callback?() => void

Returns

void

Inherited from

Component.setState

Defined in

node_modules/@types/react/index.d.ts:525


shouldComponentUpdate

Optional shouldComponentUpdate(nextProps, nextState, nextContext): boolean

Called to determine whether the change in props and state should trigger a re-render.

Component always returns true. +lifecycle events from running.

Parameters

NameType
prevPropsReadonly<ViewAdapterProps>
prevStateReadonly<State>

Returns

any

Inherited from

Component.getSnapshotBeforeUpdate

Defined in

node_modules/@types/react/index.d.ts:695


render

render(): FunctionComponentElement<ProviderProps<PageContextType>> | CElement<ErrorBoundaryProps, ErrorBoundary>

Returns

FunctionComponentElement<ProviderProps<PageContextType>> | CElement<ErrorBoundaryProps, ErrorBoundary>

Inherit Doc

Overrides

Component.render

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:99


setState

setState<K>(state, callback?): void

Type parameters

NameType
Kextends string | number

Parameters

NameType
statenull | State | (prevState: Readonly<State>, props: Readonly<ViewAdapterProps>) => null | State | Pick<State, K> | Pick<State, K>
callback?() => void

Returns

void

Inherited from

Component.setState

Defined in

node_modules/@types/react/index.d.ts:525


shouldComponentUpdate

Optional shouldComponentUpdate(nextProps, nextState, nextContext): boolean

Called to determine whether the change in props and state should trigger a re-render.

Component always returns true. PureComponent implements a shallow comparison on props and state and returns true if any props or states have changed.

If false is returned, Component#render, componentWillUpdate -and componentDidUpdate will not be called.

Parameters

NameType
nextPropsReadonly<ViewAdapterProps>
nextStateReadonly<State>
nextContextany

Returns

boolean

Inherited from

Component.shouldComponentUpdate

Defined in

node_modules/@types/react/index.d.ts:649


getDerivedStateFromProps

Static getDerivedStateFromProps(props, state): State

Parameters

NameType
propsViewAdapterProps
stateState

Returns

State

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:71

- - +and componentDidUpdate will not be called.

Parameters

NameType
nextPropsReadonly<ViewAdapterProps>
nextStateReadonly<State>
nextContextany

Returns

boolean

Inherited from

Component.shouldComponentUpdate

Defined in

node_modules/@types/react/index.d.ts:649


getDerivedStateFromProps

Static getDerivedStateFromProps(props, state): State

Parameters

NameType
propsViewAdapterProps
stateState

Returns

State

Defined in

packages/react-page-renderer/src/component/ViewAdapter.ts:71

+ + \ No newline at end of file diff --git a/api/enums/ima_core.ActionTypes/index.html b/api/enums/ima_core.ActionTypes/index.html index b9e93dcf20..3f403599bf 100644 --- a/api/enums/ima_core.ActionTypes/index.html +++ b/api/enums/ima_core.ActionTypes/index.html @@ -4,13 +4,13 @@ Enumeration: ActionTypes | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/enums/ima_core.BindingState/index.html b/api/enums/ima_core.BindingState/index.html index 6b2f5b404e..19f43ecf98 100644 --- a/api/enums/ima_core.BindingState/index.html +++ b/api/enums/ima_core.BindingState/index.html @@ -4,8 +4,8 @@ Enumeration: BindingState | IMA.js - - + +
@@ -15,13 +15,13 @@ default class dependencies of any already-configured class using the inject() method (classes that were not configured yet may be configured using the inject() method or provide() -method).

Defined in

packages/core/src/oc/BindingState.ts:49


IMA

IMA = "ima.core"

Constant for IMA binding state.

When the object container is in ima binding state, it is possible +method).

Defined in

packages/core/src/oc/BindingState.ts:49


IMA

IMA = "ima.core"

Constant for IMA binding state.

When the object container is in ima binding state, it is possible to register new aliases using the bind() method and register new constant using the constant() method, or override the default class dependencies of any already-configured class using the inject() method (classes that were not configured yet may be configured using the inject() method or provide() -method).

Defined in

packages/core/src/oc/BindingState.ts:36


Plugin

Plugin = "plugin"

Constant for plugin binding state.

When the object container is in plugin binding state, it is impossible +method).

Defined in

packages/core/src/oc/BindingState.ts:36


Plugin

Plugin = "plugin"

Constant for plugin binding state.

When the object container is in plugin binding state, it is impossible to register new aliases using the bind() method and register new constant using the constant() method, or override the default class dependencies of any already-configured class using the @@ -31,8 +31,8 @@ overriding the default dependency configuration provided by ima, or overriding the configuration of a 3rd party plugin by another 3rd party plugin.

The application itself has always access to the unlocked object -container.

Defined in

packages/core/src/oc/BindingState.ts:21

- - +container.

Defined in

packages/core/src/oc/BindingState.ts:21

+ + \ No newline at end of file diff --git a/api/enums/ima_core.HttpStatusCode/index.html b/api/enums/ima_core.HttpStatusCode/index.html index 8d34a7c7f4..e2205e72b7 100644 --- a/api/enums/ima_core.HttpStatusCode/index.html +++ b/api/enums/ima_core.HttpStatusCode/index.html @@ -4,14 +4,14 @@ Enumeration: HttpStatusCode | IMA.js - - + +
Skip to main content
- - +and processed by this proxy.

Const

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Enumeration Members

BAD_REQUEST

BAD_REQUEST = 400

Defined in

packages/core/src/http/HttpStatusCode.ts:12


FORBIDDEN

FORBIDDEN = 403

Defined in

packages/core/src/http/HttpStatusCode.ts:14


NOT_FOUND

NOT_FOUND = 404

Defined in

packages/core/src/http/HttpStatusCode.ts:15


NO_CONTENT

NO_CONTENT = 204

Defined in

packages/core/src/http/HttpStatusCode.ts:11


OK

OK = 200

Defined in

packages/core/src/http/HttpStatusCode.ts:10


SERVER_ERROR

SERVER_ERROR = 500

Defined in

packages/core/src/http/HttpStatusCode.ts:17


TIMEOUT

TIMEOUT = 408

Defined in

packages/core/src/http/HttpStatusCode.ts:16


UNAUTHORIZED

UNAUTHORIZED = 401

Defined in

packages/core/src/http/HttpStatusCode.ts:13

+ + \ No newline at end of file diff --git a/api/enums/ima_core.RendererEvents/index.html b/api/enums/ima_core.RendererEvents/index.html index ad1e46ec44..f87540897d 100644 --- a/api/enums/ima_core.RendererEvents/index.html +++ b/api/enums/ima_core.RendererEvents/index.html @@ -4,21 +4,21 @@ Enumeration: RendererEvents | IMA.js - - + +
Skip to main content

Enumeration: RendererEvents

@ima/core.RendererEvents

Events constants, which is firing to app.

Enumeration Members

ERROR

ERROR = "$IMA.$PageRenderer.error"

PageRenderer fires event $IMA.$PageRenderer.error when there is no _viewContainer in _renderToDOM method. Event's data contain -{message: string}.

Defined in

packages/core/src/page/renderer/RendererEvents.ts:31


HYDRATE_ERROR

HYDRATE_ERROR = "$IMA.$PageRenderer.hydrateError"

Fired when problem occurs during hydratation.

Defined in

packages/core/src/page/renderer/RendererEvents.ts:36


MOUNTED

MOUNTED = "$IMA.$PageRenderer.mounted"

PageRenderer fires event $IMA.$PageRenderer.mounted after +{message: string}.

Defined in

packages/core/src/page/renderer/RendererEvents.ts:31


HYDRATE_ERROR

HYDRATE_ERROR = "$IMA.$PageRenderer.hydrateError"

Fired when problem occurs during hydratation.

Defined in

packages/core/src/page/renderer/RendererEvents.ts:36


MOUNTED

MOUNTED = "$IMA.$PageRenderer.mounted"

PageRenderer fires event $IMA.$PageRenderer.mounted after current page view is mounted to the DOM. Event's data contain -{type: string}.

Defined in

packages/core/src/page/renderer/RendererEvents.ts:10


UNMOUNTED

UNMOUNTED = "$IMA.$PageRenderer.unmounted"

PageRenderer fires event $IMA.$PageRenderer.unmounted after current view is +{type: string}.

Defined in

packages/core/src/page/renderer/RendererEvents.ts:10


UNMOUNTED

UNMOUNTED = "$IMA.$PageRenderer.unmounted"

PageRenderer fires event $IMA.$PageRenderer.unmounted after current view is unmounted from the DOM. Event's data contain -{type: string}.

Defined in

packages/core/src/page/renderer/RendererEvents.ts:24


UPDATED

UPDATED = "$IMA.$PageRenderer.updated"

PageRenderer fires event $IMA.$PageRenderer.updated after +{type: string}.

Defined in

packages/core/src/page/renderer/RendererEvents.ts:24


UPDATED

UPDATED = "$IMA.$PageRenderer.updated"

PageRenderer fires event $IMA.$PageRenderer.updated after current state is updated in the DOM. Event's data contain -{state: Object<string, *>}.

Defined in

packages/core/src/page/renderer/RendererEvents.ts:17

- - +{state: Object<string, *>}.

Defined in

packages/core/src/page/renderer/RendererEvents.ts:17

+ + \ No newline at end of file diff --git a/api/enums/ima_core.RendererTypes/index.html b/api/enums/ima_core.RendererTypes/index.html index e5f0095434..f8de196516 100644 --- a/api/enums/ima_core.RendererTypes/index.html +++ b/api/enums/ima_core.RendererTypes/index.html @@ -4,13 +4,13 @@ Enumeration: RendererTypes | IMA.js - - + +
-
Skip to main content

Enumeration: RendererTypes

@ima/core.RendererTypes

Events constants, which is firing to app.

Enumeration Members

HYDRATE

HYDRATE = "$IMA.$PageRenderer.type.hydrate"

The HYDRATE type is set if mounting use React.hydrate method.

Defined in

packages/core/src/page/renderer/RendererTypes.ts:12


RENDER

RENDER = "$IMA.$PageRenderer.type.render"

The RENDER type is set if mounting use React.render method.

Defined in

packages/core/src/page/renderer/RendererTypes.ts:8


UNMOUNT

UNMOUNT = "$IMA.$PageRenderer.type.unmount"

The UNMOUNT type is set if unmounting use React.unmountComponentAtNode method.

Defined in

packages/core/src/page/renderer/RendererTypes.ts:16

- - +
Skip to main content

Enumeration: RendererTypes

@ima/core.RendererTypes

Events constants, which is firing to app.

Enumeration Members

HYDRATE

HYDRATE = "$IMA.$PageRenderer.type.hydrate"

The HYDRATE type is set if mounting use React.hydrate method.

Defined in

packages/core/src/page/renderer/RendererTypes.ts:12


RENDER

RENDER = "$IMA.$PageRenderer.type.render"

The RENDER type is set if mounting use React.render method.

Defined in

packages/core/src/page/renderer/RendererTypes.ts:8


UNMOUNT

UNMOUNT = "$IMA.$PageRenderer.type.unmount"

The UNMOUNT type is set if unmounting use React.unmountComponentAtNode method.

Defined in

packages/core/src/page/renderer/RendererTypes.ts:16

+ + \ No newline at end of file diff --git a/api/enums/ima_core.RouteNames/index.html b/api/enums/ima_core.RouteNames/index.html index b95629ba65..faa8b27c98 100644 --- a/api/enums/ima_core.RouteNames/index.html +++ b/api/enums/ima_core.RouteNames/index.html @@ -4,16 +4,16 @@ Enumeration: RouteNames | IMA.js - - + +
Skip to main content

Enumeration: RouteNames

@ima/core.RouteNames

HTTP status code constants, representing the HTTP status codes recognized and processed by this proxy.

Enumeration Members

ERROR

ERROR = "error"

The internal route name used for the error page (the 5XX HTTP status -code error page).

Defined in

packages/core/src/router/RouteNames.ts:16


NOT_FOUND

NOT_FOUND = "notFound"

The internal route name used for the "not found" error page (the 4XX -HTTP status code error page).

Defined in

packages/core/src/router/RouteNames.ts:10

- - +code error page).

Defined in

packages/core/src/router/RouteNames.ts:16


NOT_FOUND

NOT_FOUND = "notFound"

The internal route name used for the "not found" error page (the 4XX +HTTP status code error page).

Defined in

packages/core/src/router/RouteNames.ts:10

+ + \ No newline at end of file diff --git a/api/enums/ima_core.RouterEvents/index.html b/api/enums/ima_core.RouterEvents/index.html index 7131a0138b..4979d28e6c 100644 --- a/api/enums/ima_core.RouterEvents/index.html +++ b/api/enums/ima_core.RouterEvents/index.html @@ -4,8 +4,8 @@ Enumeration: RouterEvents | IMA.js - - + +
@@ -16,16 +16,16 @@ The response is page render result. The path is current path, the params are params extracted from path, the route is handle route for path and the options is route -additional options.

Defined in

packages/core/src/router/RouterEvents.ts:26


AFTER_LOADING_ASYNC_ROUTE

AFTER_LOADING_ASYNC_ROUTE = "$IMA.$Router.afterLoadingAsyncRoute"

Event fired when router finishes loading of async view -and controller. If both are sync this is never fired.

Defined in

packages/core/src/router/RouterEvents.ts:38


BEFORE_HANDLE_ROUTE

BEFORE_HANDLE_ROUTE = "$IMA.$Router.beforeHandleRoute"

Router fire event $IMA.$Router.beforeHandleRoute before page +additional options.

Defined in

packages/core/src/router/RouterEvents.ts:26


AFTER_LOADING_ASYNC_ROUTE

AFTER_LOADING_ASYNC_ROUTE = "$IMA.$Router.afterLoadingAsyncRoute"

Event fired when router finishes loading of async view +and controller. If both are sync this is never fired.

Defined in

packages/core/src/router/RouterEvents.ts:38


BEFORE_HANDLE_ROUTE

BEFORE_HANDLE_ROUTE = "$IMA.$Router.beforeHandleRoute"

Router fire event $IMA.$Router.beforeHandleRoute before page manager handle the route. Event's data contain { params: Object<string, string>, route: ima.core.router.AbstractRoute, path: string, options: Object<string, *>}}. The path is current path, the params are params extracted from path, the route is handle route for path and the options is route -additional options.

Defined in

packages/core/src/router/RouterEvents.ts:14


BEFORE_LOADING_ASYNC_ROUTE

BEFORE_LOADING_ASYNC_ROUTE = "$IMA.$Router.beforeLoadingAsyncRoute"

Fired right before loading view and controller when either -view or controller is async (or both).

Defined in

packages/core/src/router/RouterEvents.ts:32

- - +additional options.

Defined in

packages/core/src/router/RouterEvents.ts:14


BEFORE_LOADING_ASYNC_ROUTE

BEFORE_LOADING_ASYNC_ROUTE = "$IMA.$Router.beforeLoadingAsyncRoute"

Fired right before loading view and controller when either +view or controller is async (or both).

Defined in

packages/core/src/router/RouterEvents.ts:32

+ + \ No newline at end of file diff --git a/api/enums/ima_core.StateEvents/index.html b/api/enums/ima_core.StateEvents/index.html index 022f98305b..f9256c6fa8 100644 --- a/api/enums/ima_core.StateEvents/index.html +++ b/api/enums/ima_core.StateEvents/index.html @@ -4,17 +4,17 @@ Enumeration: StateEvents | IMA.js - - + +
Skip to main content

Enumeration: StateEvents

@ima/core.StateEvents

Events constants, which is firing to app.

Enumeration Members

AFTER_CHANGE_STATE

AFTER_CHANGE_STATE = "$IMA.$PageStateManager.afterChangeState"

PateStateManager fire event $IMA.$PageStateManager.afterChangeState after state -is patched. Event's data contain {newState: Object<string, *>}.

Defined in

packages/core/src/page/state/StateEvents.ts:17


BEFORE_CHANGE_STATE

BEFORE_CHANGE_STATE = "$IMA.$PageStateManager.beforeChangeState"

PateStateManager fire event $IMA.$PageStateManager.beforeChangeState before +is patched. Event's data contain {newState: Object<string, *>}.

Defined in

packages/core/src/page/state/StateEvents.ts:17


BEFORE_CHANGE_STATE

BEFORE_CHANGE_STATE = "$IMA.$PageStateManager.beforeChangeState"

PateStateManager fire event $IMA.$PageStateManager.beforeChangeState before state is patched. Event's data contain { oldState: Object<string, *>, newState: Object<string, *>, -pathState: Object<string, *> }.

Defined in

packages/core/src/page/state/StateEvents.ts:11

- - +pathState: Object<string, *> }.

Defined in

packages/core/src/page/state/StateEvents.ts:11

+ + \ No newline at end of file diff --git a/api/index.html b/api/index.html index b8a23a55f4..5e7b4b0dca 100644 --- a/api/index.html +++ b/api/index.html @@ -4,13 +4,13 @@ Documentation | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content

Documentation

+ + \ No newline at end of file diff --git a/api/interfaces/ima_cli.ImaCliArgs/index.html b/api/interfaces/ima_cli.ImaCliArgs/index.html index a92f7bea74..2d296bb94e 100644 --- a/api/interfaces/ima_cli.ImaCliArgs/index.html +++ b/api/interfaces/ima_cli.ImaCliArgs/index.html @@ -4,13 +4,13 @@ Interface: ImaCliArgs | IMA.js - - + +
-
Skip to main content

Interface: ImaCliArgs

@ima/cli.ImaCliArgs

Arguments generated from ima CLI commands.

Hierarchy

Properties

clean

clean: boolean

Defined in

types.ts:33


clearCache

Optional clearCache: boolean

Defined in

types.ts:34


command

command: ImaCliCommand

Defined in

types.ts:32


environment

environment: string

Defined in

types.ts:46


forceLegacy

Optional forceLegacy: boolean

Defined in

types.ts:49


forceSPA

Optional forceSPA: boolean

Defined in

types.ts:41


hostname

Optional hostname: string

Defined in

types.ts:44


ignoreWarnings

Optional ignoreWarnings: boolean

Defined in

types.ts:37


inspect

Optional inspect: boolean

Defined in

types.ts:36


lazyServer

Optional lazyServer: boolean

Defined in

types.ts:50


legacy

Optional legacy: boolean

Defined in

types.ts:40


open

Optional open: boolean

Defined in

types.ts:38


openUrl

Optional openUrl: string

Defined in

types.ts:39


port

Optional port: number

Defined in

types.ts:43


profile

Optional profile: boolean

Defined in

types.ts:42


publicUrl

Optional publicUrl: string

Defined in

types.ts:45


reactRefresh

Optional reactRefresh: boolean

Defined in

types.ts:48


rootDir

rootDir: string

Defined in

types.ts:31


verbose

Optional verbose: boolean

Defined in

types.ts:35


writeToDisk

Optional writeToDisk: boolean

Defined in

types.ts:47

- - +
Skip to main content

Interface: ImaCliArgs

@ima/cli.ImaCliArgs

Arguments generated from ima CLI commands.

Hierarchy

Properties

clean

clean: boolean

Defined in

types.ts:33


clearCache

Optional clearCache: boolean

Defined in

types.ts:34


command

command: ImaCliCommand

Defined in

types.ts:32


environment

environment: string

Defined in

types.ts:46


forceLegacy

Optional forceLegacy: boolean

Defined in

types.ts:49


forceSPA

Optional forceSPA: boolean

Defined in

types.ts:41


hostname

Optional hostname: string

Defined in

types.ts:44


ignoreWarnings

Optional ignoreWarnings: boolean

Defined in

types.ts:37


inspect

Optional inspect: boolean

Defined in

types.ts:36


lazyServer

Optional lazyServer: boolean

Defined in

types.ts:50


legacy

Optional legacy: boolean

Defined in

types.ts:40


open

Optional open: boolean

Defined in

types.ts:38


openUrl

Optional openUrl: string

Defined in

types.ts:39


port

Optional port: number

Defined in

types.ts:43


profile

Optional profile: boolean

Defined in

types.ts:42


publicUrl

Optional publicUrl: string

Defined in

types.ts:45


reactRefresh

Optional reactRefresh: boolean

Defined in

types.ts:48


rootDir

rootDir: string

Defined in

types.ts:31


verbose

Optional verbose: boolean

Defined in

types.ts:35


writeToDisk

Optional writeToDisk: boolean

Defined in

types.ts:47

+ + \ No newline at end of file diff --git a/api/interfaces/ima_cli.ImaCliPlugin/index.html b/api/interfaces/ima_cli.ImaCliPlugin/index.html index 5ba43c9cc8..a67bdb2696 100644 --- a/api/interfaces/ima_cli.ImaCliPlugin/index.html +++ b/api/interfaces/ima_cli.ImaCliPlugin/index.html @@ -4,19 +4,19 @@ Interface: ImaCliPlugin | IMA.js - - + +
Skip to main content

Interface: ImaCliPlugin

@ima/cli.ImaCliPlugin

Interface for ima/cli plugins that can be defined in plugins field in ima.conf.js. These can be used -to extend functionality of default CLI with custom cli arguments and webpack config overrides.

Properties

cliArgs

Optional Readonly cliArgs: Partial<Record<ImaCliCommand, CommandBuilder>>

Optional additional CLI arguments to extend the set of existing ones.

Defined in

types.ts:99


name

Readonly name: string

Plugin name, used mainly for better debugging messages.

Defined in

types.ts:94

Methods

postProcess

Optional postProcess(args, imaConfig): Promise<void>

Optional plugin hook to do some custom processing after the compilation has finished. -Attention! This hook runs only for build command.

Parameters

NameType
argsImaCliArgs
imaConfigImaConfig

Returns

Promise<void>

Defined in

types.ts:132


preProcess

Optional preProcess(args, imaConfig): Promise<void>

Optional plugin hook to do some pre processing right after the cli args are processed -and the imaConfig is loaded, before the webpack config creation and compiler run.

Parameters

NameType
argsImaCliArgs
imaConfigImaConfig

Returns

Promise<void>

Defined in

types.ts:105


prepareConfigurations

Optional prepareConfigurations(configurations, imaConfig, args): Promise<ImaConfigurationContext[]>

Called right before creating webpack configurations after preProcess call. +to extend functionality of default CLI with custom cli arguments and webpack config overrides.

Properties

cliArgs

Optional Readonly cliArgs: Partial<Record<ImaCliCommand, CommandBuilder>>

Optional additional CLI arguments to extend the set of existing ones.

Defined in

types.ts:99


name

Readonly name: string

Plugin name, used mainly for better debugging messages.

Defined in

types.ts:94

Methods

postProcess

Optional postProcess(args, imaConfig): Promise<void>

Optional plugin hook to do some custom processing after the compilation has finished. +Attention! This hook runs only for build command.

Parameters

NameType
argsImaCliArgs
imaConfigImaConfig

Returns

Promise<void>

Defined in

types.ts:132


preProcess

Optional preProcess(args, imaConfig): Promise<void>

Optional plugin hook to do some pre processing right after the cli args are processed +and the imaConfig is loaded, before the webpack config creation and compiler run.

Parameters

NameType
argsImaCliArgs
imaConfigImaConfig

Returns

Promise<void>

Defined in

types.ts:105


prepareConfigurations

Optional prepareConfigurations(configurations, imaConfig, args): Promise<ImaConfigurationContext[]>

Called right before creating webpack configurations after preProcess call. This hook lets you customize configuration contexts for each webpack config that will be generated. This is usefull when you need to overrite configuration -contexts for values that are not editable anywhere else (like output folders).

Parameters

NameType
configurationsImaConfigurationContext[]
imaConfigImaConfig
argsImaCliArgs

Returns

Promise<ImaConfigurationContext[]>

Defined in

types.ts:113


webpack

Optional webpack(config, ctx, imaConfig): Promise<Configuration>

Webpack callback function used by plugins to customize/extend ima webpack config before it's run.

Parameters

NameType
configConfiguration
ctxImaConfigurationContext
imaConfigImaConfig

Returns

Promise<Configuration>

Defined in

types.ts:122

- - +contexts for values that are not editable anywhere else (like output folders).

Parameters

NameType
configurationsImaConfigurationContext[]
imaConfigImaConfig
argsImaCliArgs

Returns

Promise<ImaConfigurationContext[]>

Defined in

types.ts:113


webpack

Optional webpack(config, ctx, imaConfig): Promise<Configuration>

Webpack callback function used by plugins to customize/extend ima webpack config before it's run.

Parameters

NameType
configConfiguration
ctxImaConfigurationContext
imaConfigImaConfig

Returns

Promise<Configuration>

Defined in

types.ts:122

+ + \ No newline at end of file diff --git a/api/interfaces/ima_cli.ImaConfigurationContext/index.html b/api/interfaces/ima_cli.ImaConfigurationContext/index.html index e3e61d4ce8..f858f0d92c 100644 --- a/api/interfaces/ima_cli.ImaConfigurationContext/index.html +++ b/api/interfaces/ima_cli.ImaConfigurationContext/index.html @@ -4,13 +4,13 @@ Interface: ImaConfigurationContext | IMA.js - - + +
-
Skip to main content

Interface: ImaConfigurationContext

@ima/cli.ImaConfigurationContext

CLI arguments merged with concrete configuration context.

Hierarchy

Properties

appDir

appDir: string

Defined in

types.ts:74


clean

clean: boolean

Inherited from

ImaCliArgs.clean

Defined in

types.ts:33


clearCache

Optional clearCache: boolean

Inherited from

ImaCliArgs.clearCache

Defined in

types.ts:34


command

command: ImaCliCommand

Inherited from

ImaCliArgs.command

Defined in

types.ts:32


devtool

devtool: undefined | string | false

Defined in

types.ts:81


environment

environment: string

Inherited from

ImaCliArgs.environment

Defined in

types.ts:46


forceLegacy

Optional forceLegacy: boolean

Inherited from

ImaCliArgs.forceLegacy

Defined in

types.ts:49


forceSPA

Optional forceSPA: boolean

Inherited from

ImaCliArgs.forceSPA

Defined in

types.ts:41


hostname

Optional hostname: string

Inherited from

ImaCliArgs.hostname

Defined in

types.ts:44


ignoreWarnings

Optional ignoreWarnings: boolean

Inherited from

ImaCliArgs.ignoreWarnings

Defined in

types.ts:37


imaEnvironment

imaEnvironment: Environment

Defined in

types.ts:73


inspect

Optional inspect: boolean

Inherited from

ImaCliArgs.inspect

Defined in

types.ts:36


isClient

isClient: boolean

Defined in

types.ts:59


isClientES

isClientES: boolean

Defined in

types.ts:60


isDevEnv

isDevEnv: boolean

Defined in

types.ts:79


isServer

isServer: boolean

Defined in

types.ts:58


lazyServer

Optional lazyServer: boolean

Inherited from

ImaCliArgs.lazyServer

Defined in

types.ts:50


legacy

Optional legacy: boolean

Inherited from

ImaCliArgs.legacy

Defined in

types.ts:40


lessGlobalsPath

lessGlobalsPath: string

Defined in

types.ts:75


mode

mode: undefined | "development" | "production" | "none"

Defined in

types.ts:76


name

name: "server" | "client" | "client.es"

Defined in

types.ts:57


open

Optional open: boolean

Inherited from

ImaCliArgs.open

Defined in

types.ts:38


openUrl

Optional openUrl: string

Inherited from

ImaCliArgs.openUrl

Defined in

types.ts:39


outputFolders

outputFolders: Object

Type declaration

NameType
cssstring
hotstring
jsstring
mediastring
publicstring

Defined in

types.ts:62


port

Optional port: number

Inherited from

ImaCliArgs.port

Defined in

types.ts:43


processCss

processCss: boolean

Defined in

types.ts:61


profile

Optional profile: boolean

Inherited from

ImaCliArgs.profile

Defined in

types.ts:42


publicUrl

Optional publicUrl: string

Inherited from

ImaCliArgs.publicUrl

Defined in

types.ts:45


reactRefresh

Optional reactRefresh: boolean

Inherited from

ImaCliArgs.reactRefresh

Defined in

types.ts:48


rootDir

rootDir: string

Inherited from

ImaCliArgs.rootDir

Defined in

types.ts:31


targets

targets: string[]

Defined in

types.ts:80


typescript

typescript: Object

Type declaration

NameType
enabledboolean
tsconfigPathundefined | string

Defined in

types.ts:69


useHMR

useHMR: boolean

Defined in

types.ts:77


useSourceMaps

useSourceMaps: boolean

Defined in

types.ts:78


verbose

Optional verbose: boolean

Inherited from

ImaCliArgs.verbose

Defined in

types.ts:35


writeToDisk

Optional writeToDisk: boolean

Inherited from

ImaCliArgs.writeToDisk

Defined in

types.ts:47

- - +
Skip to main content

Interface: ImaConfigurationContext

@ima/cli.ImaConfigurationContext

CLI arguments merged with concrete configuration context.

Hierarchy

Properties

appDir

appDir: string

Defined in

types.ts:74


clean

clean: boolean

Inherited from

ImaCliArgs.clean

Defined in

types.ts:33


clearCache

Optional clearCache: boolean

Inherited from

ImaCliArgs.clearCache

Defined in

types.ts:34


command

command: ImaCliCommand

Inherited from

ImaCliArgs.command

Defined in

types.ts:32


devtool

devtool: undefined | string | false

Defined in

types.ts:81


environment

environment: string

Inherited from

ImaCliArgs.environment

Defined in

types.ts:46


forceLegacy

Optional forceLegacy: boolean

Inherited from

ImaCliArgs.forceLegacy

Defined in

types.ts:49


forceSPA

Optional forceSPA: boolean

Inherited from

ImaCliArgs.forceSPA

Defined in

types.ts:41


hostname

Optional hostname: string

Inherited from

ImaCliArgs.hostname

Defined in

types.ts:44


ignoreWarnings

Optional ignoreWarnings: boolean

Inherited from

ImaCliArgs.ignoreWarnings

Defined in

types.ts:37


imaEnvironment

imaEnvironment: Environment

Defined in

types.ts:73


inspect

Optional inspect: boolean

Inherited from

ImaCliArgs.inspect

Defined in

types.ts:36


isClient

isClient: boolean

Defined in

types.ts:59


isClientES

isClientES: boolean

Defined in

types.ts:60


isDevEnv

isDevEnv: boolean

Defined in

types.ts:79


isServer

isServer: boolean

Defined in

types.ts:58


lazyServer

Optional lazyServer: boolean

Inherited from

ImaCliArgs.lazyServer

Defined in

types.ts:50


legacy

Optional legacy: boolean

Inherited from

ImaCliArgs.legacy

Defined in

types.ts:40


lessGlobalsPath

lessGlobalsPath: string

Defined in

types.ts:75


mode

mode: undefined | "development" | "production" | "none"

Defined in

types.ts:76


name

name: "server" | "client" | "client.es"

Defined in

types.ts:57


open

Optional open: boolean

Inherited from

ImaCliArgs.open

Defined in

types.ts:38


openUrl

Optional openUrl: string

Inherited from

ImaCliArgs.openUrl

Defined in

types.ts:39


outputFolders

outputFolders: Object

Type declaration

NameType
cssstring
hotstring
jsstring
mediastring
publicstring

Defined in

types.ts:62


port

Optional port: number

Inherited from

ImaCliArgs.port

Defined in

types.ts:43


processCss

processCss: boolean

Defined in

types.ts:61


profile

Optional profile: boolean

Inherited from

ImaCliArgs.profile

Defined in

types.ts:42


publicUrl

Optional publicUrl: string

Inherited from

ImaCliArgs.publicUrl

Defined in

types.ts:45


reactRefresh

Optional reactRefresh: boolean

Inherited from

ImaCliArgs.reactRefresh

Defined in

types.ts:48


rootDir

rootDir: string

Inherited from

ImaCliArgs.rootDir

Defined in

types.ts:31


targets

targets: string[]

Defined in

types.ts:80


typescript

typescript: Object

Type declaration

NameType
enabledboolean
tsconfigPathundefined | string

Defined in

types.ts:69


useHMR

useHMR: boolean

Defined in

types.ts:77


useSourceMaps

useSourceMaps: boolean

Defined in

types.ts:78


verbose

Optional verbose: boolean

Inherited from

ImaCliArgs.verbose

Defined in

types.ts:35


writeToDisk

Optional writeToDisk: boolean

Inherited from

ImaCliArgs.writeToDisk

Defined in

types.ts:47

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.AppEnvironment/index.html b/api/interfaces/ima_core.AppEnvironment/index.html index 660f97f7d8..23bc9a785b 100644 --- a/api/interfaces/ima_core.AppEnvironment/index.html +++ b/api/interfaces/ima_core.AppEnvironment/index.html @@ -4,13 +4,13 @@ Interface: AppEnvironment | IMA.js - - + +
-
Skip to main content

Interface: AppEnvironment

@ima/core.AppEnvironment

App Environment structure, used in ./server/config/environment.js

Properties

dev

Optional dev: PartialObjectDeep<Environment, {}>

Defined in

packages/core/src/boot.ts:118


prod

prod: Environment

Defined in

packages/core/src/boot.ts:117


regression

Optional regression: PartialObjectDeep<Environment, {}>

Defined in

packages/core/src/boot.ts:120


test

Optional test: PartialObjectDeep<Environment, {}>

Defined in

packages/core/src/boot.ts:119

- - +
Skip to main content

Interface: AppEnvironment

@ima/core.AppEnvironment

App Environment structure, used in ./server/config/environment.js

Properties

dev

Optional dev: PartialObjectDeep<Environment, {}>

Defined in

packages/core/src/boot.ts:118


prod

prod: Environment

Defined in

packages/core/src/boot.ts:117


regression

Optional regression: PartialObjectDeep<Environment, {}>

Defined in

packages/core/src/boot.ts:120


test

Optional test: PartialObjectDeep<Environment, {}>

Defined in

packages/core/src/boot.ts:119

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.BootConfig/index.html b/api/interfaces/ima_core.BootConfig/index.html index 7884a38434..168ca256d7 100644 --- a/api/interfaces/ima_core.BootConfig/index.html +++ b/api/interfaces/ima_core.BootConfig/index.html @@ -4,13 +4,13 @@ Interface: BootConfig | IMA.js - - + +
-
Skip to main content

Interface: BootConfig

@ima/core.BootConfig

Hierarchy

Properties

bind

Optional bind: Settings & BootSettings

Defined in

packages/core/src/Bootstrap.ts:113


initBindApp

initBindApp: InitBindFunction

Inherited from

InitAppConfig.initBindApp

Defined in

packages/core/src/Bootstrap.ts:71


initBindIma

initBindIma: InitBindFunction

Inherited from

InitImaConfig.initBindIma

Defined in

packages/core/src/Bootstrap.ts:78


initRoutes

initRoutes: InitRoutesFunction

Inherited from

InitAppConfig.initRoutes

Defined in

packages/core/src/Bootstrap.ts:72


initServicesApp

initServicesApp: InitServicesFunction

Inherited from

InitAppConfig.initServicesApp

Defined in

packages/core/src/Bootstrap.ts:73


initServicesIma

initServicesIma: InitServicesFunction

Inherited from

InitImaConfig.initServicesIma

Defined in

packages/core/src/Bootstrap.ts:79


initSettings

initSettings: InitSettingsFunction

Inherited from

InitAppConfig.initSettings

Defined in

packages/core/src/Bootstrap.ts:74


plugins

plugins: { name: string ; plugin: InitPluginConfig }[]

Defined in

packages/core/src/Bootstrap.ts:114


routes

Optional routes: UnknownParameters

Defined in

packages/core/src/Bootstrap.ts:112


services

services: BootServices

Defined in

packages/core/src/Bootstrap.ts:115


settings

settings: BootSettings

Defined in

packages/core/src/Bootstrap.ts:116

- - +
Skip to main content

Interface: BootConfig

@ima/core.BootConfig

Hierarchy

Properties

bind

Optional bind: Settings & BootSettings

Defined in

packages/core/src/Bootstrap.ts:113


initBindApp

initBindApp: InitBindFunction

Inherited from

InitAppConfig.initBindApp

Defined in

packages/core/src/Bootstrap.ts:71


initBindIma

initBindIma: InitBindFunction

Inherited from

InitImaConfig.initBindIma

Defined in

packages/core/src/Bootstrap.ts:78


initRoutes

initRoutes: InitRoutesFunction

Inherited from

InitAppConfig.initRoutes

Defined in

packages/core/src/Bootstrap.ts:72


initServicesApp

initServicesApp: InitServicesFunction

Inherited from

InitAppConfig.initServicesApp

Defined in

packages/core/src/Bootstrap.ts:73


initServicesIma

initServicesIma: InitServicesFunction

Inherited from

InitImaConfig.initServicesIma

Defined in

packages/core/src/Bootstrap.ts:79


initSettings

initSettings: InitSettingsFunction

Inherited from

InitAppConfig.initSettings

Defined in

packages/core/src/Bootstrap.ts:74


plugins

plugins: { name: string ; plugin: InitPluginConfig }[]

Defined in

packages/core/src/Bootstrap.ts:114


routes

Optional routes: UnknownParameters

Defined in

packages/core/src/Bootstrap.ts:112


services

services: BootServices

Defined in

packages/core/src/Bootstrap.ts:115


settings

settings: BootSettings

Defined in

packages/core/src/Bootstrap.ts:116

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.BootServices/index.html b/api/interfaces/ima_core.BootServices/index.html index e6b9772c39..95d5db5632 100644 --- a/api/interfaces/ima_core.BootServices/index.html +++ b/api/interfaces/ima_core.BootServices/index.html @@ -4,13 +4,13 @@ Interface: BootServices | IMA.js - - + +
-
Skip to main content

Interface: BootServices

@ima/core.BootServices

Properties

$IMA

$IMA: GlobalImaObject

Defined in

packages/core/src/Bootstrap.ts:100


dictionary

dictionary: DictionaryConfig

Defined in

packages/core/src/Bootstrap.ts:101


request

request: null | Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

Defined in

packages/core/src/Bootstrap.ts:99


response

response: null | Response<any, Record<string, any>>

Defined in

packages/core/src/Bootstrap.ts:98


router

router: Object

Type declaration

NameType
$Hoststring
$LanguagePartPathstring
$Pathstring
$Protocol"http:" | "https:"
$Rootstring

Defined in

packages/core/src/Bootstrap.ts:102

- - +
Skip to main content

Interface: BootServices

@ima/core.BootServices

Properties

$IMA

$IMA: GlobalImaObject

Defined in

packages/core/src/Bootstrap.ts:100


dictionary

dictionary: DictionaryConfig

Defined in

packages/core/src/Bootstrap.ts:101


request

request: null | Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

Defined in

packages/core/src/Bootstrap.ts:99


response

response: null | Response<any, Record<string, any>>

Defined in

packages/core/src/Bootstrap.ts:98


router

router: Object

Type declaration

NameType
$Hoststring
$LanguagePartPathstring
$Pathstring
$Protocol"http:" | "https:"
$Rootstring

Defined in

packages/core/src/Bootstrap.ts:102

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.DictionaryMap/index.html b/api/interfaces/ima_core.DictionaryMap/index.html index 9f4a3cf0df..c2fb9e7c16 100644 --- a/api/interfaces/ima_core.DictionaryMap/index.html +++ b/api/interfaces/ima_core.DictionaryMap/index.html @@ -4,13 +4,13 @@ Interface: DictionaryMap | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.DispatcherEventsMap/index.html b/api/interfaces/ima_core.DispatcherEventsMap/index.html index 7730038717..04e934ef08 100644 --- a/api/interfaces/ima_core.DispatcherEventsMap/index.html +++ b/api/interfaces/ima_core.DispatcherEventsMap/index.html @@ -4,13 +4,13 @@ Interface: DispatcherEventsMap | IMA.js - - + +
-
Skip to main content

Interface: DispatcherEventsMap

@ima/core.DispatcherEventsMap

Hierarchy

  • PageStateDispatcherEvents

  • PageManagerDispatcherEvents

  • RouterDispatcherEvents

  • PageRendererDispatcherEvents

    DispatcherEventsMap

Properties

$IMA.$PageRenderer.error

$IMA.$PageRenderer.error: Object

Type declaration

NameType
messagestring

Inherited from

PageRendererDispatcherEvents.$IMA.$PageRenderer.error

Defined in

packages/core/src/page/renderer/PageRenderer.ts:13


$IMA.$PageRenderer.hydrateError

$IMA.$PageRenderer.hydrateError: Object

Type declaration

NameType
clientNodeElement
errorError
serverNodeElement

Inherited from

PageRendererDispatcherEvents.$IMA.$PageRenderer.hydrateError

Defined in

packages/core/src/page/renderer/PageRenderer.ts:14


$IMA.$PageRenderer.mounted

$IMA.$PageRenderer.mounted: Object

Type declaration

NameType
typeRENDER | HYDRATE

Inherited from

PageRendererDispatcherEvents.$IMA.$PageRenderer.mounted

Defined in

packages/core/src/page/renderer/PageRenderer.ts:19


$IMA.$PageRenderer.unmounted

$IMA.$PageRenderer.unmounted: Object

Type declaration

NameType
typeUNMOUNT

Inherited from

PageRendererDispatcherEvents.$IMA.$PageRenderer.unmounted

Defined in

packages/core/src/page/renderer/PageRenderer.ts:22


$IMA.$PageRenderer.updated

$IMA.$PageRenderer.updated: Object

Type declaration

NameType
pageStateAnyParameters

Inherited from

PageRendererDispatcherEvents.$IMA.$PageRenderer.updated

Defined in

packages/core/src/page/renderer/PageRenderer.ts:23


$IMA.$PageStateManager.afterChangeState

$IMA.$PageStateManager.afterChangeState: Object

Type declaration

NameType
newStateAnyParameters

Inherited from

PageStateDispatcherEvents.$IMA.$PageStateManager.afterChangeState

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:9


$IMA.$PageStateManager.beforeChangeState

$IMA.$PageStateManager.beforeChangeState: Object

Type declaration

NameType
newStateAnyParameters
oldStateAnyParameters
patchStatenull | AnyParameters

Inherited from

PageStateDispatcherEvents.$IMA.$PageStateManager.beforeChangeState

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:12


$IMA.$Router.afterHandleRoute

$IMA.$Router.afterHandleRoute: AfterHandleRouteEventData

Inherited from

RouterDispatcherEvents.$IMA.$Router.afterHandleRoute

Defined in

packages/core/src/router/AbstractRouter.ts:41


$IMA.$Router.afterLoadingAsyncRoute

$IMA.$Router.afterLoadingAsyncRoute: Object

Type declaration

NameType
routeAbstractRoute<string | RoutePathExpression>

Inherited from

PageManagerDispatcherEvents.$IMA.$Router.afterLoadingAsyncRoute

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:25


$IMA.$Router.beforeHandleRoute

$IMA.$Router.beforeHandleRoute: BeforeHandleRouteEventData

Inherited from

RouterDispatcherEvents.$IMA.$Router.beforeHandleRoute

Defined in

packages/core/src/router/AbstractRouter.ts:42


$IMA.$Router.beforeLoadingAsyncRoute

$IMA.$Router.beforeLoadingAsyncRoute: Object

Type declaration

NameType
routeAbstractRoute<string | RoutePathExpression>

Inherited from

PageManagerDispatcherEvents.$IMA.$Router.beforeLoadingAsyncRoute

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:28

- - +
Skip to main content

Interface: DispatcherEventsMap

@ima/core.DispatcherEventsMap

Hierarchy

  • PageStateDispatcherEvents

  • PageManagerDispatcherEvents

  • RouterDispatcherEvents

  • PageRendererDispatcherEvents

    DispatcherEventsMap

Properties

$IMA.$PageRenderer.error

$IMA.$PageRenderer.error: Object

Type declaration

NameType
messagestring

Inherited from

PageRendererDispatcherEvents.$IMA.$PageRenderer.error

Defined in

packages/core/src/page/renderer/PageRenderer.ts:13


$IMA.$PageRenderer.hydrateError

$IMA.$PageRenderer.hydrateError: Object

Type declaration

NameType
clientNodeElement
errorError
serverNodeElement

Inherited from

PageRendererDispatcherEvents.$IMA.$PageRenderer.hydrateError

Defined in

packages/core/src/page/renderer/PageRenderer.ts:14


$IMA.$PageRenderer.mounted

$IMA.$PageRenderer.mounted: Object

Type declaration

NameType
typeRENDER | HYDRATE

Inherited from

PageRendererDispatcherEvents.$IMA.$PageRenderer.mounted

Defined in

packages/core/src/page/renderer/PageRenderer.ts:19


$IMA.$PageRenderer.unmounted

$IMA.$PageRenderer.unmounted: Object

Type declaration

NameType
typeUNMOUNT

Inherited from

PageRendererDispatcherEvents.$IMA.$PageRenderer.unmounted

Defined in

packages/core/src/page/renderer/PageRenderer.ts:22


$IMA.$PageRenderer.updated

$IMA.$PageRenderer.updated: Object

Type declaration

NameType
pageStateAnyParameters

Inherited from

PageRendererDispatcherEvents.$IMA.$PageRenderer.updated

Defined in

packages/core/src/page/renderer/PageRenderer.ts:23


$IMA.$PageStateManager.afterChangeState

$IMA.$PageStateManager.afterChangeState: Object

Type declaration

NameType
newStateAnyParameters

Inherited from

PageStateDispatcherEvents.$IMA.$PageStateManager.afterChangeState

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:9


$IMA.$PageStateManager.beforeChangeState

$IMA.$PageStateManager.beforeChangeState: Object

Type declaration

NameType
newStateAnyParameters
oldStateAnyParameters
patchStatenull | AnyParameters

Inherited from

PageStateDispatcherEvents.$IMA.$PageStateManager.beforeChangeState

Defined in

packages/core/src/page/state/PageStateManagerImpl.ts:12


$IMA.$Router.afterHandleRoute

$IMA.$Router.afterHandleRoute: AfterHandleRouteEventData

Inherited from

RouterDispatcherEvents.$IMA.$Router.afterHandleRoute

Defined in

packages/core/src/router/AbstractRouter.ts:41


$IMA.$Router.afterLoadingAsyncRoute

$IMA.$Router.afterLoadingAsyncRoute: Object

Type declaration

NameType
routeAbstractRoute<string | RoutePathExpression>

Inherited from

PageManagerDispatcherEvents.$IMA.$Router.afterLoadingAsyncRoute

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:25


$IMA.$Router.beforeHandleRoute

$IMA.$Router.beforeHandleRoute: BeforeHandleRouteEventData

Inherited from

RouterDispatcherEvents.$IMA.$Router.beforeHandleRoute

Defined in

packages/core/src/router/AbstractRouter.ts:42


$IMA.$Router.beforeLoadingAsyncRoute

$IMA.$Router.beforeLoadingAsyncRoute: Object

Type declaration

NameType
routeAbstractRoute<string | RoutePathExpression>

Inherited from

PageManagerDispatcherEvents.$IMA.$Router.beforeLoadingAsyncRoute

Defined in

packages/core/src/page/manager/AbstractPageManager.ts:28

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.Environment/index.html b/api/interfaces/ima_core.Environment/index.html index 8518a61085..ac3162549c 100644 --- a/api/interfaces/ima_core.Environment/index.html +++ b/api/interfaces/ima_core.Environment/index.html @@ -4,13 +4,13 @@ Interface: Environment | IMA.js - - + +
-
Skip to main content

Interface: Environment

@ima/core.Environment

App environment for single env key.

Indexable

[key: string]: unknown

Properties

$App

Optional $App: $AppSettings

Defined in

packages/core/src/boot.ts:61


$Debug

$Debug: boolean

Defined in

packages/core/src/boot.ts:58


$Language

$Language: Record<string, string>

Defined in

packages/core/src/boot.ts:59


$Resources

Optional $Resources: (response: unknown, manifest: Manifest, defaultResources: Resources) => Resources

Type declaration

▸ (response, manifest, defaultResources): Resources

Parameters
NameType
responseunknown
manifestManifest
defaultResourcesResources
Returns

Resources

Defined in

packages/core/src/boot.ts:62


$Server

$Server: Object

Type declaration

NameType
cache{ cacheKeyGenerator?: (req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>) => string ; enabled: boolean | (req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>) => boolean ; entryTtl: number ; maxEntries: number ; unusedEntryTtl: number }
cache.cacheKeyGenerator?(req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>) => string
cache.enabledboolean | (req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>) => boolean
cache.entryTtlnumber
cache.maxEntriesnumber
cache.unusedEntryTtlnumber
clustersnull | number
concurrencynumber
host?string | (__namedParameters: { environment: Environment ; host: string ; req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>> }) => string
logger{ formatting: "dev" | "simple" | "JSON" }
logger.formatting"dev" | "simple" | "JSON"
overloadConcurrencynumber
portnumber
protocol?"http:" | "https:" | (__namedParameters: { environment: Environment ; protocol: string ; req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>> }) => "http:" | "https:"
serveSPA{ allow: boolean ; blackList?: (userAgent: string) => boolean }
serveSPA.allowboolean
serveSPA.blackList?(userAgent: string) => boolean
staticConcurrencynumber
staticPathstring

Defined in

packages/core/src/boot.ts:67


$Version

$Version: string

Defined in

packages/core/src/boot.ts:60

- - +
Skip to main content

Interface: Environment

@ima/core.Environment

App environment for single env key.

Indexable

[key: string]: unknown

Properties

$App

Optional $App: $AppSettings

Defined in

packages/core/src/boot.ts:61


$Debug

$Debug: boolean

Defined in

packages/core/src/boot.ts:58


$Language

$Language: Record<string, string>

Defined in

packages/core/src/boot.ts:59


$Resources

Optional $Resources: (response: unknown, manifest: Manifest, defaultResources: Resources) => Resources

Type declaration

▸ (response, manifest, defaultResources): Resources

Parameters
NameType
responseunknown
manifestManifest
defaultResourcesResources
Returns

Resources

Defined in

packages/core/src/boot.ts:62


$Server

$Server: Object

Type declaration

NameType
cache{ cacheKeyGenerator?: (req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>) => string ; enabled: boolean | (req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>) => boolean ; entryTtl: number ; maxEntries: number ; unusedEntryTtl: number }
cache.cacheKeyGenerator?(req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>) => string
cache.enabledboolean | (req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>) => boolean
cache.entryTtlnumber
cache.maxEntriesnumber
cache.unusedEntryTtlnumber
clustersnull | number
concurrencynumber
host?string | (__namedParameters: { environment: Environment ; host: string ; req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>> }) => string
logger{ formatting: "dev" | "simple" | "JSON" }
logger.formatting"dev" | "simple" | "JSON"
overloadConcurrencynumber
portnumber
protocol?"http:" | "https:" | (__namedParameters: { environment: Environment ; protocol: string ; req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>> }) => "http:" | "https:"
serveSPA{ allow: boolean ; blackList?: (userAgent: string) => boolean }
serveSPA.allowboolean
serveSPA.blackList?(userAgent: string) => boolean
staticConcurrencynumber
staticPathstring

Defined in

packages/core/src/boot.ts:67


$Version

$Version: string

Defined in

packages/core/src/boot.ts:60

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.GlobalImaObject/index.html b/api/interfaces/ima_core.GlobalImaObject/index.html index 19350f5ce3..1c1f33fd56 100644 --- a/api/interfaces/ima_core.GlobalImaObject/index.html +++ b/api/interfaces/ima_core.GlobalImaObject/index.html @@ -4,13 +4,13 @@ Interface: GlobalImaObject | IMA.js - - + +
-
Skip to main content

Interface: GlobalImaObject

@ima/core.GlobalImaObject

Properties

$App

$App: $AppSettings

Defined in

packages/core/src/types.ts:54


$Debug

$Debug: boolean

Defined in

packages/core/src/types.ts:56


$Env

$Env: keyof AppEnvironment

Defined in

packages/core/src/types.ts:52


$Host

$Host: string

Defined in

packages/core/src/types.ts:58


$IMA

$IMA: GlobalImaObject

Defined in

packages/core/src/types.ts:65


$Language

$Language: string

Defined in

packages/core/src/types.ts:55


$LanguagePartPath

$LanguagePartPath: string

Defined in

packages/core/src/types.ts:61


$Path

$Path: string

Defined in

packages/core/src/types.ts:59


$Protocol

$Protocol: "http:" | "https:"

Defined in

packages/core/src/types.ts:57


$PublicPath

$PublicPath: string

Defined in

packages/core/src/types.ts:67


$RequestID

$RequestID: string

Defined in

packages/core/src/types.ts:66


$Root

$Root: string

Defined in

packages/core/src/types.ts:60


$Version

$Version: string

Defined in

packages/core/src/types.ts:53


Cache

Optional Cache: object

Defined in

packages/core/src/types.ts:70


Runner

Runner: object

Defined in

packages/core/src/types.ts:62


SPA

SPA: boolean

Defined in

packages/core/src/types.ts:64


Test

Test: boolean

Defined in

packages/core/src/types.ts:63


fatalErrorHandler

Optional fatalErrorHandler: (error: Error) => void

Type declaration

▸ (error): void

Parameters
NameType
errorError
Returns

void

Defined in

packages/core/src/types.ts:69


i18n

i18n: DictionaryData

Defined in

packages/core/src/types.ts:68

- - +
Skip to main content

Interface: GlobalImaObject

@ima/core.GlobalImaObject

Properties

$App

$App: $AppSettings

Defined in

packages/core/src/types.ts:54


$Debug

$Debug: boolean

Defined in

packages/core/src/types.ts:56


$Env

$Env: keyof AppEnvironment

Defined in

packages/core/src/types.ts:52


$Host

$Host: string

Defined in

packages/core/src/types.ts:58


$IMA

$IMA: GlobalImaObject

Defined in

packages/core/src/types.ts:65


$Language

$Language: string

Defined in

packages/core/src/types.ts:55


$LanguagePartPath

$LanguagePartPath: string

Defined in

packages/core/src/types.ts:61


$Path

$Path: string

Defined in

packages/core/src/types.ts:59


$Protocol

$Protocol: "http:" | "https:"

Defined in

packages/core/src/types.ts:57


$PublicPath

$PublicPath: string

Defined in

packages/core/src/types.ts:67


$RequestID

$RequestID: string

Defined in

packages/core/src/types.ts:66


$Root

$Root: string

Defined in

packages/core/src/types.ts:60


$Version

$Version: string

Defined in

packages/core/src/types.ts:53


Cache

Optional Cache: object

Defined in

packages/core/src/types.ts:70


Runner

Runner: object

Defined in

packages/core/src/types.ts:62


SPA

SPA: boolean

Defined in

packages/core/src/types.ts:64


Test

Test: boolean

Defined in

packages/core/src/types.ts:63


fatalErrorHandler

Optional fatalErrorHandler: (error: Error) => void

Type declaration

▸ (error): void

Parameters
NameType
errorError
Returns

void

Defined in

packages/core/src/types.ts:69


i18n

i18n: DictionaryData

Defined in

packages/core/src/types.ts:68

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.HttpAgentRequestOptions/index.html b/api/interfaces/ima_core.HttpAgentRequestOptions/index.html index 0a6a45184a..30e7ab7311 100644 --- a/api/interfaces/ima_core.HttpAgentRequestOptions/index.html +++ b/api/interfaces/ima_core.HttpAgentRequestOptions/index.html @@ -4,13 +4,13 @@ Interface: HttpAgentRequestOptions | IMA.js - - + +
-
Skip to main content

Interface: HttpAgentRequestOptions

@ima/core.HttpAgentRequestOptions

Properties

abortController

Optional abortController: AbortController

Defined in

packages/core/src/http/HttpAgent.ts:40


cache

cache: boolean

Defined in

packages/core/src/http/HttpAgent.ts:35


fetchOptions

fetchOptions: ImaRequestInit

Defined in

packages/core/src/http/HttpAgent.ts:34


keepSensitiveHeaders

Optional keepSensitiveHeaders: boolean

Defined in

packages/core/src/http/HttpAgent.ts:41


postProcessors

Optional postProcessors: <B>(response: HttpAgentResponse<B>) => HttpAgentResponse<B>[]

Defined in

packages/core/src/http/HttpAgent.ts:37


repeatRequest

repeatRequest: number

Defined in

packages/core/src/http/HttpAgent.ts:33


responseType

Optional responseType: "json" | "blob" | "text" | "arrayBuffer" | "formData"

Defined in

packages/core/src/http/HttpAgent.ts:36


timeout

timeout: number

Defined in

packages/core/src/http/HttpAgent.ts:31


ttl

ttl: number

Defined in

packages/core/src/http/HttpAgent.ts:32


validateCookies

Optional validateCookies: boolean

Defined in

packages/core/src/http/HttpAgent.ts:42

- - +
Skip to main content

Interface: HttpAgentRequestOptions

@ima/core.HttpAgentRequestOptions

Properties

abortController

Optional abortController: AbortController

Defined in

packages/core/src/http/HttpAgent.ts:40


cache

cache: boolean

Defined in

packages/core/src/http/HttpAgent.ts:35


fetchOptions

fetchOptions: ImaRequestInit

Defined in

packages/core/src/http/HttpAgent.ts:34


keepSensitiveHeaders

Optional keepSensitiveHeaders: boolean

Defined in

packages/core/src/http/HttpAgent.ts:41


postProcessors

Optional postProcessors: <B>(response: HttpAgentResponse<B>) => HttpAgentResponse<B>[]

Defined in

packages/core/src/http/HttpAgent.ts:37


repeatRequest

repeatRequest: number

Defined in

packages/core/src/http/HttpAgent.ts:33


responseType

Optional responseType: "json" | "blob" | "text" | "arrayBuffer" | "formData"

Defined in

packages/core/src/http/HttpAgent.ts:36


timeout

timeout: number

Defined in

packages/core/src/http/HttpAgent.ts:31


ttl

ttl: number

Defined in

packages/core/src/http/HttpAgent.ts:32


validateCookies

Optional validateCookies: boolean

Defined in

packages/core/src/http/HttpAgent.ts:42

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.ImaRequestInit/index.html b/api/interfaces/ima_core.ImaRequestInit/index.html index ba105c6621..d4a692b06b 100644 --- a/api/interfaces/ima_core.ImaRequestInit/index.html +++ b/api/interfaces/ima_core.ImaRequestInit/index.html @@ -4,16 +4,16 @@ Interface: ImaRequestInit | IMA.js - - + +
Skip to main content

Interface: ImaRequestInit

@ima/core.ImaRequestInit

Options for a request sent using the HTTP agent.

Hierarchy

  • Omit<RequestInit, "body">

    ImaRequestInit

Properties

cache

Optional cache: RequestCache

Flag that enables caching the HTTP request (enabled by default, also applies to requests in progress).

Inherited from

Omit.cache

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1676


credentials

Optional credentials: RequestCredentials

A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials.

Inherited from

Omit.credentials

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1678


headers

Optional headers: Record<string, string>

Sets the additional request headers (the keys are case-insensitive header names, the values -are header values).

Overrides

Omit.headers

Defined in

packages/core/src/http/HttpAgent.ts:27


integrity

Optional integrity: string

A cryptographic hash of the resource to be fetched by request. Sets request's integrity.

Inherited from

Omit.integrity

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1682


keepalive

Optional keepalive: boolean

A boolean to set request's keepalive.

Inherited from

Omit.keepalive

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1684


method

Optional method: string

A string to set request's method.

Inherited from

Omit.method

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1686


mode

Optional mode: RequestMode

A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode.

Inherited from

Omit.mode

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1688


redirect

Optional redirect: RequestRedirect

A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.

Inherited from

Omit.redirect

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1690


referrer

Optional referrer: string

A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer.

Inherited from

Omit.referrer

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1692


referrerPolicy

Optional referrerPolicy: ReferrerPolicy

A referrer policy to set request's referrerPolicy.

Inherited from

Omit.referrerPolicy

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1694


signal

Optional signal: null | AbortSignal

An AbortSignal to set request's signal.

Inherited from

Omit.signal

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1696


window

Optional window: null

Can only be null. Used to disassociate request from any Window.

Inherited from

Omit.window

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1698

- - +are header values).

Overrides

Omit.headers

Defined in

packages/core/src/http/HttpAgent.ts:27


integrity

Optional integrity: string

A cryptographic hash of the resource to be fetched by request. Sets request's integrity.

Inherited from

Omit.integrity

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1682


keepalive

Optional keepalive: boolean

A boolean to set request's keepalive.

Inherited from

Omit.keepalive

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1684


method

Optional method: string

A string to set request's method.

Inherited from

Omit.method

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1686


mode

Optional mode: RequestMode

A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode.

Inherited from

Omit.mode

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1688


redirect

Optional redirect: RequestRedirect

A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.

Inherited from

Omit.redirect

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1690


referrer

Optional referrer: string

A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer.

Inherited from

Omit.referrer

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1692


referrerPolicy

Optional referrerPolicy: ReferrerPolicy

A referrer policy to set request's referrerPolicy.

Inherited from

Omit.referrerPolicy

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1694


signal

Optional signal: null | AbortSignal

An AbortSignal to set request's signal.

Inherited from

Omit.signal

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1696


window

Optional window: null

Can only be null. Used to disassociate request from any Window.

Inherited from

Omit.window

Defined in

node_modules/typescript/lib/lib.dom.d.ts:1698

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.InitAppConfig/index.html b/api/interfaces/ima_core.InitAppConfig/index.html index 32a85d80c7..dbad9fc65d 100644 --- a/api/interfaces/ima_core.InitAppConfig/index.html +++ b/api/interfaces/ima_core.InitAppConfig/index.html @@ -4,13 +4,13 @@ Interface: InitAppConfig | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.InitImaConfig/index.html b/api/interfaces/ima_core.InitImaConfig/index.html index 4988bb4956..420634a157 100644 --- a/api/interfaces/ima_core.InitImaConfig/index.html +++ b/api/interfaces/ima_core.InitImaConfig/index.html @@ -4,13 +4,13 @@ Interface: InitImaConfig | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.InitPluginConfig/index.html b/api/interfaces/ima_core.InitPluginConfig/index.html index dae5d173a8..99c0761d74 100644 --- a/api/interfaces/ima_core.InitPluginConfig/index.html +++ b/api/interfaces/ima_core.InitPluginConfig/index.html @@ -4,13 +4,13 @@ Interface: InitPluginConfig | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.Manifest/index.html b/api/interfaces/ima_core.Manifest/index.html index 7db2ba279b..e781403006 100644 --- a/api/interfaces/ima_core.Manifest/index.html +++ b/api/interfaces/ima_core.Manifest/index.html @@ -4,13 +4,13 @@ Interface: Manifest | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.ManifestAsset/index.html b/api/interfaces/ima_core.ManifestAsset/index.html index 096e1e1cb1..dbb790a62e 100644 --- a/api/interfaces/ima_core.ManifestAsset/index.html +++ b/api/interfaces/ima_core.ManifestAsset/index.html @@ -4,13 +4,13 @@ Interface: ManifestAsset | IMA.js - - + +
-
Skip to main content

Interface: ManifestAsset

@ima/core.ManifestAsset

Hierarchy

  • AssetInfo

    ManifestAsset

Properties

chunkhash

Optional chunkhash: string | string[]

the value(s) of the chunk hash used for this asset

Inherited from

AssetInfo.chunkhash

Defined in

node_modules/webpack/types.d.ts:6454


contenthash

Optional contenthash: string | string[]

the value(s) of the content hash used for this asset

Inherited from

AssetInfo.contenthash

Defined in

node_modules/webpack/types.d.ts:6464


development

Optional development: boolean

true, when asset is only used for development and doesn't count towards user-facing assets

Inherited from

AssetInfo.development

Defined in

node_modules/webpack/types.d.ts:6479


fullhash

Optional fullhash: string | string[]

the value(s) of the full hash used for this asset

Inherited from

AssetInfo.fullhash

Defined in

node_modules/webpack/types.d.ts:6449


hotModuleReplacement

Optional hotModuleReplacement: boolean

true, when asset ships data for updating an existing application (HMR)

Inherited from

AssetInfo.hotModuleReplacement

Defined in

node_modules/webpack/types.d.ts:6484


immutable

Optional immutable: boolean

true, if the asset can be long term cached forever (contains a hash)

Inherited from

AssetInfo.immutable

Defined in

node_modules/webpack/types.d.ts:6439


javascriptModule

Optional javascriptModule: boolean

true, when asset is javascript and an ESM

Inherited from

AssetInfo.javascriptModule

Defined in

node_modules/webpack/types.d.ts:6489


minimized

Optional minimized: boolean

whether the asset is minimized

Inherited from

AssetInfo.minimized

Defined in

node_modules/webpack/types.d.ts:6444


modulehash

Optional modulehash: string | string[]

the value(s) of the module hash used for this asset

Inherited from

AssetInfo.modulehash

Defined in

node_modules/webpack/types.d.ts:6459


name

name: string

Defined in

packages/core/src/boot.ts:25


Optional related: Record<string, string | string[]>

object of pointers to other assets, keyed by type of relation (only points from parent to child)

Inherited from

AssetInfo.related

Defined in

node_modules/webpack/types.d.ts:6494


size

Optional size: number

size in bytes, only set after asset has been emitted

Inherited from

AssetInfo.size

Defined in

node_modules/webpack/types.d.ts:6474


sourceFilename

Optional sourceFilename: string

when asset was created from a source file (potentially transformed), the original filename relative to compilation context

Inherited from

AssetInfo.sourceFilename

Defined in

node_modules/webpack/types.d.ts:6469

- - +
Skip to main content

Interface: ManifestAsset

@ima/core.ManifestAsset

Hierarchy

  • AssetInfo

    ManifestAsset

Properties

chunkhash

Optional chunkhash: string | string[]

the value(s) of the chunk hash used for this asset

Inherited from

AssetInfo.chunkhash

Defined in

node_modules/webpack/types.d.ts:6454


contenthash

Optional contenthash: string | string[]

the value(s) of the content hash used for this asset

Inherited from

AssetInfo.contenthash

Defined in

node_modules/webpack/types.d.ts:6464


development

Optional development: boolean

true, when asset is only used for development and doesn't count towards user-facing assets

Inherited from

AssetInfo.development

Defined in

node_modules/webpack/types.d.ts:6479


fullhash

Optional fullhash: string | string[]

the value(s) of the full hash used for this asset

Inherited from

AssetInfo.fullhash

Defined in

node_modules/webpack/types.d.ts:6449


hotModuleReplacement

Optional hotModuleReplacement: boolean

true, when asset ships data for updating an existing application (HMR)

Inherited from

AssetInfo.hotModuleReplacement

Defined in

node_modules/webpack/types.d.ts:6484


immutable

Optional immutable: boolean

true, if the asset can be long term cached forever (contains a hash)

Inherited from

AssetInfo.immutable

Defined in

node_modules/webpack/types.d.ts:6439


javascriptModule

Optional javascriptModule: boolean

true, when asset is javascript and an ESM

Inherited from

AssetInfo.javascriptModule

Defined in

node_modules/webpack/types.d.ts:6489


minimized

Optional minimized: boolean

whether the asset is minimized

Inherited from

AssetInfo.minimized

Defined in

node_modules/webpack/types.d.ts:6444


modulehash

Optional modulehash: string | string[]

the value(s) of the module hash used for this asset

Inherited from

AssetInfo.modulehash

Defined in

node_modules/webpack/types.d.ts:6459


name

name: string

Defined in

packages/core/src/boot.ts:25


Optional related: Record<string, string | string[]>

object of pointers to other assets, keyed by type of relation (only points from parent to child)

Inherited from

AssetInfo.related

Defined in

node_modules/webpack/types.d.ts:6494


size

Optional size: number

size in bytes, only set after asset has been emitted

Inherited from

AssetInfo.size

Defined in

node_modules/webpack/types.d.ts:6474


sourceFilename

Optional sourceFilename: string

when asset was created from a source file (potentially transformed), the original filename relative to compilation context

Inherited from

AssetInfo.sourceFilename

Defined in

node_modules/webpack/types.d.ts:6469

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.OCAliasMap/index.html b/api/interfaces/ima_core.OCAliasMap/index.html index 54420d8632..de72dc4725 100644 --- a/api/interfaces/ima_core.OCAliasMap/index.html +++ b/api/interfaces/ima_core.OCAliasMap/index.html @@ -4,15 +4,15 @@ Interface: OCAliasMap | IMA.js - - + +
Skip to main content

Interface: OCAliasMap

@ima/core.OCAliasMap

Map of IMA default string aliases and constants initialized in the ObjectContainer. This is used for typechecking and type -hinting of string OC arguments.

Properties

$Cache

$Cache: Cache<unknown>

Defined in

packages/core/src/config/bind.ts:103


$CacheFactory

$CacheFactory: CacheFactory<unknown>

Defined in

packages/core/src/config/bind.ts:102


$CacheStorage

$CacheStorage: MapStorage<unknown>

Defined in

packages/core/src/config/bind.ts:101


$ComponentUtils

$ComponentUtils: ComponentUtils

Defined in

packages/core/src/config/bind.ts:109


$ControllerDecorator

$ControllerDecorator: ControllerDecorator<{}, {}, {}>

Defined in

packages/core/src/config/bind.ts:105


$CookieStorage

$CookieStorage: CookieStorage

Defined in

packages/core/src/config/bind.ts:91


$CookieTransformFunction

$CookieTransformFunction: CookieTransformFunction

Defined in

packages/core/src/config/bind.ts:90


$Dictionary

$Dictionary: Dictionary

Defined in

packages/core/src/config/bind.ts:89


$Dispatcher

$Dispatcher: Dispatcher

Defined in

packages/core/src/config/bind.ts:98


$Env

$Env: keyof AppEnvironment

Defined in

packages/core/src/config/bind.ts:82


$Error

$Error: Dispatcher

Defined in

packages/core/src/config/bind.ts:88


$EventBus

$EventBus: EventBus

Defined in

packages/core/src/config/bind.ts:99


$Helper

$Helper: __module

Defined in

packages/core/src/config/bind.ts:79


$Http

$Http: HttpAgent

Defined in

packages/core/src/config/bind.ts:119


$HttpAgentProxy

$HttpAgentProxy: HttpProxy

Defined in

packages/core/src/config/bind.ts:118


$HttpStatusCode

$HttpStatusCode: Readonly<{ BAD_REQUEST: 400 = 400; FORBIDDEN: 403 = 403; NOT_FOUND: 404 = 404; NO_CONTENT: 204 = 204; OK: 200 = 200; SERVER_ERROR: 500 = 500; TIMEOUT: 408 = 408; UNAUTHORIZED: 401 = 401 }>

Defined in

packages/core/src/config/bind.ts:120


$HttpUrlTransformer

$HttpUrlTransformer: UrlTransformer

Defined in

packages/core/src/config/bind.ts:117


$MapStorage

$MapStorage: MapStorage<unknown>

Defined in

packages/core/src/config/bind.ts:95


$MetaManager

$MetaManager: MetaManager

Defined in

packages/core/src/config/bind.ts:104


$Observable

$Observable: Observable

Defined in

packages/core/src/config/bind.ts:100


$PageFactory

$PageFactory: PageFactory

Defined in

packages/core/src/config/bind.ts:108


$PageHandlerRegistry

$PageHandlerRegistry: PageHandlerRegistry

Defined in

packages/core/src/config/bind.ts:111


$PageManager

$PageManager: PageManager

Defined in

packages/core/src/config/bind.ts:112


$PageRenderer

$PageRenderer: PageRenderer

Defined in

packages/core/src/config/bind.ts:121


$PageStateManager

$PageStateManager: PageStateManager<{}>

Defined in

packages/core/src/config/bind.ts:107


$PageStateManagerDecorator

$PageStateManagerDecorator: PageStateManagerDecorator

Defined in

packages/core/src/config/bind.ts:106


$Protocol

$Protocol: "http:" | "https:"

Defined in

packages/core/src/config/bind.ts:83


$Request

$Request: Request

Defined in

packages/core/src/config/bind.ts:85


$Response

$Response: Response

Defined in

packages/core/src/config/bind.ts:86


$RouteFactory

$RouteFactory: RouteFactory

Defined in

packages/core/src/config/bind.ts:113


$RouteNames

$RouteNames: RouteNames

Defined in

packages/core/src/config/bind.ts:115


$Router

$Router: Router

Defined in

packages/core/src/config/bind.ts:114


$RouterEvents

$RouterEvents: RouterEvents

Defined in

packages/core/src/config/bind.ts:116


$Secure

$Secure: boolean

Defined in

packages/core/src/config/bind.ts:84


$SessionMapStorage

$SessionMapStorage: SessionMapStorage<unknown>

Defined in

packages/core/src/config/bind.ts:97


$SessionStorage

$SessionStorage: SessionStorage<unknown> | MapStorage<unknown>

Defined in

packages/core/src/config/bind.ts:92


$Settings

$Settings: Settings & BootSettings & { [key: string]: any; }

Defined in

packages/core/src/config/bind.ts:81


$Utils

$Utils: Utils

Defined in

packages/core/src/config/bind.ts:110


$WeakMapStorage

$WeakMapStorage: WeakMapStorage<object>

Defined in

packages/core/src/config/bind.ts:96


$Window

$Window: Window

Defined in

packages/core/src/config/bind.ts:87


$oc

$oc: ObjectContainer

Defined in

packages/core/src/config/bind.ts:80

- - +hinting of string OC arguments.

Properties

$Cache

$Cache: Cache<unknown>

Defined in

packages/core/src/config/bind.ts:103


$CacheFactory

$CacheFactory: CacheFactory<unknown>

Defined in

packages/core/src/config/bind.ts:102


$CacheStorage

$CacheStorage: MapStorage<unknown>

Defined in

packages/core/src/config/bind.ts:101


$ComponentUtils

$ComponentUtils: ComponentUtils

Defined in

packages/core/src/config/bind.ts:109


$ControllerDecorator

$ControllerDecorator: ControllerDecorator<{}, {}, {}>

Defined in

packages/core/src/config/bind.ts:105


$CookieStorage

$CookieStorage: CookieStorage

Defined in

packages/core/src/config/bind.ts:91


$CookieTransformFunction

$CookieTransformFunction: CookieTransformFunction

Defined in

packages/core/src/config/bind.ts:90


$Dictionary

$Dictionary: Dictionary

Defined in

packages/core/src/config/bind.ts:89


$Dispatcher

$Dispatcher: Dispatcher

Defined in

packages/core/src/config/bind.ts:98


$Env

$Env: keyof AppEnvironment

Defined in

packages/core/src/config/bind.ts:82


$Error

$Error: Dispatcher

Defined in

packages/core/src/config/bind.ts:88


$EventBus

$EventBus: EventBus

Defined in

packages/core/src/config/bind.ts:99


$Helper

$Helper: __module

Defined in

packages/core/src/config/bind.ts:79


$Http

$Http: HttpAgent

Defined in

packages/core/src/config/bind.ts:119


$HttpAgentProxy

$HttpAgentProxy: HttpProxy

Defined in

packages/core/src/config/bind.ts:118


$HttpStatusCode

$HttpStatusCode: Readonly<{ BAD_REQUEST: 400 = 400; FORBIDDEN: 403 = 403; NOT_FOUND: 404 = 404; NO_CONTENT: 204 = 204; OK: 200 = 200; SERVER_ERROR: 500 = 500; TIMEOUT: 408 = 408; UNAUTHORIZED: 401 = 401 }>

Defined in

packages/core/src/config/bind.ts:120


$HttpUrlTransformer

$HttpUrlTransformer: UrlTransformer

Defined in

packages/core/src/config/bind.ts:117


$MapStorage

$MapStorage: MapStorage<unknown>

Defined in

packages/core/src/config/bind.ts:95


$MetaManager

$MetaManager: MetaManager

Defined in

packages/core/src/config/bind.ts:104


$Observable

$Observable: Observable

Defined in

packages/core/src/config/bind.ts:100


$PageFactory

$PageFactory: PageFactory

Defined in

packages/core/src/config/bind.ts:108


$PageHandlerRegistry

$PageHandlerRegistry: PageHandlerRegistry

Defined in

packages/core/src/config/bind.ts:111


$PageManager

$PageManager: PageManager

Defined in

packages/core/src/config/bind.ts:112


$PageRenderer

$PageRenderer: PageRenderer

Defined in

packages/core/src/config/bind.ts:121


$PageStateManager

$PageStateManager: PageStateManager<{}>

Defined in

packages/core/src/config/bind.ts:107


$PageStateManagerDecorator

$PageStateManagerDecorator: PageStateManagerDecorator

Defined in

packages/core/src/config/bind.ts:106


$Protocol

$Protocol: "http:" | "https:"

Defined in

packages/core/src/config/bind.ts:83


$Request

$Request: Request

Defined in

packages/core/src/config/bind.ts:85


$Response

$Response: Response

Defined in

packages/core/src/config/bind.ts:86


$RouteFactory

$RouteFactory: RouteFactory

Defined in

packages/core/src/config/bind.ts:113


$RouteNames

$RouteNames: RouteNames

Defined in

packages/core/src/config/bind.ts:115


$Router

$Router: Router

Defined in

packages/core/src/config/bind.ts:114


$RouterEvents

$RouterEvents: RouterEvents

Defined in

packages/core/src/config/bind.ts:116


$Secure

$Secure: boolean

Defined in

packages/core/src/config/bind.ts:84


$SessionMapStorage

$SessionMapStorage: SessionMapStorage<unknown>

Defined in

packages/core/src/config/bind.ts:97


$SessionStorage

$SessionStorage: SessionStorage<unknown> | MapStorage<unknown>

Defined in

packages/core/src/config/bind.ts:92


$Settings

$Settings: Settings & BootSettings & { [key: string]: any; }

Defined in

packages/core/src/config/bind.ts:81


$Utils

$Utils: Utils

Defined in

packages/core/src/config/bind.ts:110


$WeakMapStorage

$WeakMapStorage: WeakMapStorage<object>

Defined in

packages/core/src/config/bind.ts:96


$Window

$Window: Window

Defined in

packages/core/src/config/bind.ts:87


$oc

$oc: ObjectContainer

Defined in

packages/core/src/config/bind.ts:80

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.PageAction/index.html b/api/interfaces/ima_core.PageAction/index.html index f9f5d45d22..48658ce1cc 100644 --- a/api/interfaces/ima_core.PageAction/index.html +++ b/api/interfaces/ima_core.PageAction/index.html @@ -4,13 +4,13 @@ Interface: PageAction | IMA.js - - + +
-
Skip to main content

Interface: PageAction

@ima/core.PageAction

Hierarchy

Properties

event

Optional event: Event & { state?: { scroll?: { x: number ; y: number } } }

Overrides

RouteAction.event

Defined in

packages/core/src/page/PageTypes.ts:40


type

Optional type: ActionTypes

Inherited from

RouteAction.type

Defined in

packages/core/src/router/Router.ts:18


url

Optional url: string

Inherited from

RouteAction.url

Defined in

packages/core/src/router/Router.ts:20

- - +
Skip to main content

Interface: PageAction

@ima/core.PageAction

Hierarchy

Properties

event

Optional event: Event & { state?: { scroll?: { x: number ; y: number } } }

Overrides

RouteAction.event

Defined in

packages/core/src/page/PageTypes.ts:40


type

Optional type: ActionTypes

Inherited from

RouteAction.type

Defined in

packages/core/src/router/Router.ts:18


url

Optional url: string

Inherited from

RouteAction.url

Defined in

packages/core/src/router/Router.ts:20

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.PageRendererSettings/index.html b/api/interfaces/ima_core.PageRendererSettings/index.html index 8e2c323cf9..c7c8bda56c 100644 --- a/api/interfaces/ima_core.PageRendererSettings/index.html +++ b/api/interfaces/ima_core.PageRendererSettings/index.html @@ -4,13 +4,13 @@ Interface: PageRendererSettings | IMA.js - - + +
-
Skip to main content

Interface: PageRendererSettings

@ima/core.PageRendererSettings

Properties

batchResolve

Optional batchResolve: boolean

Defined in

packages/core/src/boot.ts:124


batchResolveNoTransaction

Optional batchResolveNoTransaction: boolean

Defined in

packages/core/src/boot.ts:125


documentView

documentView: unknown

Defined in

packages/core/src/boot.ts:127


managedRootView

Optional managedRootView: unknown

Defined in

packages/core/src/boot.ts:128


masterElementId

masterElementId: string

Defined in

packages/core/src/boot.ts:126


viewAdapter

Optional viewAdapter: unknown

Defined in

packages/core/src/boot.ts:129

- - +
Skip to main content

Interface: PageRendererSettings

@ima/core.PageRendererSettings

Properties

batchResolve

Optional batchResolve: boolean

Defined in

packages/core/src/boot.ts:124


batchResolveNoTransaction

Optional batchResolveNoTransaction: boolean

Defined in

packages/core/src/boot.ts:125


documentView

documentView: unknown

Defined in

packages/core/src/boot.ts:127


managedRootView

Optional managedRootView: unknown

Defined in

packages/core/src/boot.ts:128


masterElementId

masterElementId: string

Defined in

packages/core/src/boot.ts:126


viewAdapter

Optional viewAdapter: unknown

Defined in

packages/core/src/boot.ts:129

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.Resources/index.html b/api/interfaces/ima_core.Resources/index.html index fb134fb464..af4c5f2479 100644 --- a/api/interfaces/ima_core.Resources/index.html +++ b/api/interfaces/ima_core.Resources/index.html @@ -4,13 +4,13 @@ Interface: Resources | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.RouteAction/index.html b/api/interfaces/ima_core.RouteAction/index.html index 5e28659966..ab9c9d0250 100644 --- a/api/interfaces/ima_core.RouteAction/index.html +++ b/api/interfaces/ima_core.RouteAction/index.html @@ -4,13 +4,13 @@ Interface: RouteAction | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.RouteFactoryOptions/index.html b/api/interfaces/ima_core.RouteFactoryOptions/index.html index b6315bbfc1..aad1db10c4 100644 --- a/api/interfaces/ima_core.RouteFactoryOptions/index.html +++ b/api/interfaces/ima_core.RouteFactoryOptions/index.html @@ -4,13 +4,13 @@ Interface: RouteFactoryOptions | IMA.js - - + +
-
Skip to main content

Interface: RouteFactoryOptions

@ima/core.RouteFactoryOptions

Hierarchy

Properties

autoScroll

autoScroll: boolean

Defined in

packages/core/src/router/Router.ts:36


documentView

documentView: unknown

Defined in

packages/core/src/router/Router.ts:37


extensions

Optional extensions: ("$Helper" | "$oc" | "$Settings" | "$Env" | "$Protocol" | "$Secure" | "$Request" | "$Response" | "$Window" | "$Error" | "$Dictionary" | "$CookieTransformFunction" | "$CookieStorage" | "$SessionStorage" | "$MapStorage" | "$WeakMapStorage" | "$SessionMapStorage" | "$Dispatcher" | "$EventBus" | "$Observable" | "$CacheStorage" | "$CacheFactory" | "$Cache" | "$MetaManager" | "$ControllerDecorator" | "$PageStateManagerDecorator" | "$PageStateManager" | "$PageFactory" | "$ComponentUtils" | "$Utils" | "$PageHandlerRegistry" | "$PageManager" | "$RouteFactory" | "$Router" | "$RouteNames" | "$RouterEvents" | "$HttpUrlTransformer" | "$HttpAgentProxy" | "$Http" | "$HttpStatusCode" | "$PageRenderer" | `$Helper.${string}` | `$oc.${string}` | `$Settings.${string}` | `$Env.${string}` | `$Protocol.${string}` | `$Secure.${string}` | `$Request.${string}` | `$Response.${string}` | `$Window.${string}` | `$Error.${string}` | `$Dictionary.${string}` | `$CookieTransformFunction.${string}` | `$CookieStorage.${string}` | `$SessionStorage.${string}` | `$MapStorage.${string}` | `$WeakMapStorage.${string}` | `$SessionMapStorage.${string}` | `$Dispatcher.${string}` | `$EventBus.${string}` | `$Observable.${string}` | `$CacheStorage.${string}` | `$CacheFactory.${string}` | `$Cache.${string}` | `$MetaManager.${string}` | `$ControllerDecorator.${string}` | `$PageStateManagerDecorator.${string}` | `$PageStateManager.${string}` | `$PageFactory.${string}` | `$ComponentUtils.${string}` | `$Utils.${string}` | `$PageHandlerRegistry.${string}` | `$PageManager.${string}` | `$RouteFactory.${string}` | `$Router.${string}` | `$RouteNames.${string}` | `$RouterEvents.${string}` | `$HttpUrlTransformer.${string}` | `$HttpAgentProxy.${string}` | `$Http.${string}` | `$HttpStatusCode.${string}` | `$PageRenderer.${string}` | "?$Helper" | "?$oc" | "?$Settings" | "?$Env" | "?$Protocol" | "?$Secure" | "?$Request" | "?$Response" | "?$Window" | "?$Error" | "?$Dictionary" | "?$CookieTransformFunction" | "?$CookieStorage" | "?$SessionStorage" | "?$MapStorage" | "?$WeakMapStorage" | "?$SessionMapStorage" | "?$Dispatcher" | "?$EventBus" | "?$Observable" | "?$CacheStorage" | "?$CacheFactory" | "?$Cache" | "?$MetaManager" | "?$ControllerDecorator" | "?$PageStateManagerDecorator" | "?$PageStateManager" | "?$PageFactory" | "?$ComponentUtils" | "?$Utils" | "?$PageHandlerRegistry" | "?$PageManager" | "?$RouteFactory" | "?$Router" | "?$RouteNames" | "?$RouterEvents" | "?$HttpUrlTransformer" | "?$HttpAgentProxy" | "?$Http" | "?$HttpStatusCode" | "?$PageRenderer" | `?$Helper.${string}` | `?$oc.${string}` | `?$Settings.${string}` | `?$Env.${string}` | `?$Protocol.${string}` | `?$Secure.${string}` | `?$Request.${string}` | `?$Response.${string}` | `?$Window.${string}` | `?$Error.${string}` | `?$Dictionary.${string}` | `?$CookieTransformFunction.${string}` | `?$CookieStorage.${string}` | `?$SessionStorage.${string}` | `?$MapStorage.${string}` | `?$WeakMapStorage.${string}` | `?$SessionMapStorage.${string}` | `?$Dispatcher.${string}` | `?$EventBus.${string}` | `?$Observable.${string}` | `?$CacheStorage.${string}` | `?$CacheFactory.${string}` | `?$Cache.${string}` | `?$MetaManager.${string}` | `?$ControllerDecorator.${string}` | `?$PageStateManagerDecorator.${string}` | `?$PageStateManager.${string}` | `?$PageFactory.${string}` | `?$ComponentUtils.${string}` | `?$Utils.${string}` | `?$PageHandlerRegistry.${string}` | `?$PageManager.${string}` | `?$RouteFactory.${string}` | `?$Router.${string}` | `?$RouteNames.${string}` | `?$RouterEvents.${string}` | `?$HttpUrlTransformer.${string}` | `?$HttpAgentProxy.${string}` | `?$Http.${string}` | `?$HttpStatusCode.${string}` | `?$PageRenderer.${string}` | "...?$Helper" | "...?$oc" | "...?$Settings" | "...?$Env" | "...?$Protocol" | "...?$Secure" | "...?$Request" | "...?$Response" | "...?$Window" | "...?$Error" | "...?$Dictionary" | "...?$CookieTransformFunction" | "...?$CookieStorage" | "...?$SessionStorage" | "...?$MapStorage" | "...?$WeakMapStorage" | "...?$SessionMapStorage" | "...?$Dispatcher" | "...?$EventBus" | "...?$Observable" | "...?$CacheStorage" | "...?$CacheFactory" | "...?$Cache" | "...?$MetaManager" | "...?$ControllerDecorator" | "...?$PageStateManagerDecorator" | "...?$PageStateManager" | "...?$PageFactory" | "...?$ComponentUtils" | "...?$Utils" | "...?$PageHandlerRegistry" | "...?$PageManager" | "...?$RouteFactory" | "...?$Router" | "...?$RouteNames" | "...?$RouterEvents" | "...?$HttpUrlTransformer" | "...?$HttpAgentProxy" | "...?$Http" | "...?$HttpStatusCode" | "...?$PageRenderer" | `...?$Helper.${string}` | `...?$oc.${string}` | `...?$Settings.${string}` | `...?$Env.${string}` | `...?$Protocol.${string}` | `...?$Secure.${string}` | `...?$Request.${string}` | `...?$Response.${string}` | `...?$Window.${string}` | `...?$Error.${string}` | `...?$Dictionary.${string}` | `...?$CookieTransformFunction.${string}` | `...?$CookieStorage.${string}` | `...?$SessionStorage.${string}` | `...?$MapStorage.${string}` | `...?$WeakMapStorage.${string}` | `...?$SessionMapStorage.${string}` | `...?$Dispatcher.${string}` | `...?$EventBus.${string}` | `...?$Observable.${string}` | `...?$CacheStorage.${string}` | `...?$CacheFactory.${string}` | `...?$Cache.${string}` | `...?$MetaManager.${string}` | `...?$ControllerDecorator.${string}` | `...?$PageStateManagerDecorator.${string}` | `...?$PageStateManager.${string}` | `...?$PageFactory.${string}` | `...?$ComponentUtils.${string}` | `...?$Utils.${string}` | `...?$PageHandlerRegistry.${string}` | `...?$PageManager.${string}` | `...?$RouteFactory.${string}` | `...?$Router.${string}` | `...?$RouteNames.${string}` | `...?$RouterEvents.${string}` | `...?$HttpUrlTransformer.${string}` | `...?$HttpAgentProxy.${string}` | `...?$Http.${string}` | `...?$HttpStatusCode.${string}` | `...?$PageRenderer.${string}` | "...$Helper" | "...$oc" | "...$Settings" | "...$Env" | "...$Protocol" | "...$Secure" | "...$Request" | "...$Response" | "...$Window" | "...$Error" | "...$Dictionary" | "...$CookieTransformFunction" | "...$CookieStorage" | "...$SessionStorage" | "...$MapStorage" | "...$WeakMapStorage" | "...$SessionMapStorage" | "...$Dispatcher" | "...$EventBus" | "...$Observable" | "...$CacheStorage" | "...$CacheFactory" | "...$Cache" | "...$MetaManager" | "...$ControllerDecorator" | "...$PageStateManagerDecorator" | "...$PageStateManager" | "...$PageFactory" | "...$ComponentUtils" | "...$Utils" | "...$PageHandlerRegistry" | "...$PageManager" | "...$RouteFactory" | "...$Router" | "...$RouteNames" | "...$RouterEvents" | "...$HttpUrlTransformer" | "...$HttpAgentProxy" | "...$Http" | "...$HttpStatusCode" | "...$PageRenderer" | `...$Helper.${string}` | `...$oc.${string}` | `...$Settings.${string}` | `...$Env.${string}` | `...$Protocol.${string}` | `...$Secure.${string}` | `...$Request.${string}` | `...$Response.${string}` | `...$Window.${string}` | `...$Error.${string}` | `...$Dictionary.${string}` | `...$CookieTransformFunction.${string}` | `...$CookieStorage.${string}` | `...$SessionStorage.${string}` | `...$MapStorage.${string}` | `...$WeakMapStorage.${string}` | `...$SessionMapStorage.${string}` | `...$Dispatcher.${string}` | `...$EventBus.${string}` | `...$Observable.${string}` | `...$CacheStorage.${string}` | `...$CacheFactory.${string}` | `...$Cache.${string}` | `...$MetaManager.${string}` | `...$ControllerDecorator.${string}` | `...$PageStateManagerDecorator.${string}` | `...$PageStateManager.${string}` | `...$PageFactory.${string}` | `...$ComponentUtils.${string}` | `...$Utils.${string}` | `...$PageHandlerRegistry.${string}` | `...$PageManager.${string}` | `...$RouteFactory.${string}` | `...$Router.${string}` | `...$RouteNames.${string}` | `...$RouterEvents.${string}` | `...$HttpUrlTransformer.${string}` | `...$HttpAgentProxy.${string}` | `...$Http.${string}` | `...$HttpStatusCode.${string}` | `...$PageRenderer.${string}` | Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>> | [Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>>, { optional: true }])[]

Defined in

packages/core/src/router/Router.ts:44


managedRootView

managedRootView: unknown

Defined in

packages/core/src/router/Router.ts:38


middlewares

middlewares: RouterMiddleware[]

Defined in

packages/core/src/router/Router.ts:43


onlyUpdate

onlyUpdate: boolean | (controller: RouteController, view: unknown) => boolean

Defined in

packages/core/src/router/Router.ts:39


viewAdapter

viewAdapter: unknown

Defined in

packages/core/src/router/Router.ts:42

- - +
Skip to main content

Interface: RouteFactoryOptions

@ima/core.RouteFactoryOptions

Hierarchy

Properties

autoScroll

autoScroll: boolean

Defined in

packages/core/src/router/Router.ts:36


documentView

documentView: unknown

Defined in

packages/core/src/router/Router.ts:37


extensions

Optional extensions: ("$Helper" | "$oc" | "$Settings" | "$Env" | "$Protocol" | "$Secure" | "$Request" | "$Response" | "$Window" | "$Error" | "$Dictionary" | "$CookieTransformFunction" | "$CookieStorage" | "$SessionStorage" | "$MapStorage" | "$WeakMapStorage" | "$SessionMapStorage" | "$Dispatcher" | "$EventBus" | "$Observable" | "$CacheStorage" | "$CacheFactory" | "$Cache" | "$MetaManager" | "$ControllerDecorator" | "$PageStateManagerDecorator" | "$PageStateManager" | "$PageFactory" | "$ComponentUtils" | "$Utils" | "$PageHandlerRegistry" | "$PageManager" | "$RouteFactory" | "$Router" | "$RouteNames" | "$RouterEvents" | "$HttpUrlTransformer" | "$HttpAgentProxy" | "$Http" | "$HttpStatusCode" | "$PageRenderer" | `$Helper.${string}` | `$oc.${string}` | `$Settings.${string}` | `$Env.${string}` | `$Protocol.${string}` | `$Secure.${string}` | `$Request.${string}` | `$Response.${string}` | `$Window.${string}` | `$Error.${string}` | `$Dictionary.${string}` | `$CookieTransformFunction.${string}` | `$CookieStorage.${string}` | `$SessionStorage.${string}` | `$MapStorage.${string}` | `$WeakMapStorage.${string}` | `$SessionMapStorage.${string}` | `$Dispatcher.${string}` | `$EventBus.${string}` | `$Observable.${string}` | `$CacheStorage.${string}` | `$CacheFactory.${string}` | `$Cache.${string}` | `$MetaManager.${string}` | `$ControllerDecorator.${string}` | `$PageStateManagerDecorator.${string}` | `$PageStateManager.${string}` | `$PageFactory.${string}` | `$ComponentUtils.${string}` | `$Utils.${string}` | `$PageHandlerRegistry.${string}` | `$PageManager.${string}` | `$RouteFactory.${string}` | `$Router.${string}` | `$RouteNames.${string}` | `$RouterEvents.${string}` | `$HttpUrlTransformer.${string}` | `$HttpAgentProxy.${string}` | `$Http.${string}` | `$HttpStatusCode.${string}` | `$PageRenderer.${string}` | "?$Helper" | "?$oc" | "?$Settings" | "?$Env" | "?$Protocol" | "?$Secure" | "?$Request" | "?$Response" | "?$Window" | "?$Error" | "?$Dictionary" | "?$CookieTransformFunction" | "?$CookieStorage" | "?$SessionStorage" | "?$MapStorage" | "?$WeakMapStorage" | "?$SessionMapStorage" | "?$Dispatcher" | "?$EventBus" | "?$Observable" | "?$CacheStorage" | "?$CacheFactory" | "?$Cache" | "?$MetaManager" | "?$ControllerDecorator" | "?$PageStateManagerDecorator" | "?$PageStateManager" | "?$PageFactory" | "?$ComponentUtils" | "?$Utils" | "?$PageHandlerRegistry" | "?$PageManager" | "?$RouteFactory" | "?$Router" | "?$RouteNames" | "?$RouterEvents" | "?$HttpUrlTransformer" | "?$HttpAgentProxy" | "?$Http" | "?$HttpStatusCode" | "?$PageRenderer" | `?$Helper.${string}` | `?$oc.${string}` | `?$Settings.${string}` | `?$Env.${string}` | `?$Protocol.${string}` | `?$Secure.${string}` | `?$Request.${string}` | `?$Response.${string}` | `?$Window.${string}` | `?$Error.${string}` | `?$Dictionary.${string}` | `?$CookieTransformFunction.${string}` | `?$CookieStorage.${string}` | `?$SessionStorage.${string}` | `?$MapStorage.${string}` | `?$WeakMapStorage.${string}` | `?$SessionMapStorage.${string}` | `?$Dispatcher.${string}` | `?$EventBus.${string}` | `?$Observable.${string}` | `?$CacheStorage.${string}` | `?$CacheFactory.${string}` | `?$Cache.${string}` | `?$MetaManager.${string}` | `?$ControllerDecorator.${string}` | `?$PageStateManagerDecorator.${string}` | `?$PageStateManager.${string}` | `?$PageFactory.${string}` | `?$ComponentUtils.${string}` | `?$Utils.${string}` | `?$PageHandlerRegistry.${string}` | `?$PageManager.${string}` | `?$RouteFactory.${string}` | `?$Router.${string}` | `?$RouteNames.${string}` | `?$RouterEvents.${string}` | `?$HttpUrlTransformer.${string}` | `?$HttpAgentProxy.${string}` | `?$Http.${string}` | `?$HttpStatusCode.${string}` | `?$PageRenderer.${string}` | "...?$Helper" | "...?$oc" | "...?$Settings" | "...?$Env" | "...?$Protocol" | "...?$Secure" | "...?$Request" | "...?$Response" | "...?$Window" | "...?$Error" | "...?$Dictionary" | "...?$CookieTransformFunction" | "...?$CookieStorage" | "...?$SessionStorage" | "...?$MapStorage" | "...?$WeakMapStorage" | "...?$SessionMapStorage" | "...?$Dispatcher" | "...?$EventBus" | "...?$Observable" | "...?$CacheStorage" | "...?$CacheFactory" | "...?$Cache" | "...?$MetaManager" | "...?$ControllerDecorator" | "...?$PageStateManagerDecorator" | "...?$PageStateManager" | "...?$PageFactory" | "...?$ComponentUtils" | "...?$Utils" | "...?$PageHandlerRegistry" | "...?$PageManager" | "...?$RouteFactory" | "...?$Router" | "...?$RouteNames" | "...?$RouterEvents" | "...?$HttpUrlTransformer" | "...?$HttpAgentProxy" | "...?$Http" | "...?$HttpStatusCode" | "...?$PageRenderer" | `...?$Helper.${string}` | `...?$oc.${string}` | `...?$Settings.${string}` | `...?$Env.${string}` | `...?$Protocol.${string}` | `...?$Secure.${string}` | `...?$Request.${string}` | `...?$Response.${string}` | `...?$Window.${string}` | `...?$Error.${string}` | `...?$Dictionary.${string}` | `...?$CookieTransformFunction.${string}` | `...?$CookieStorage.${string}` | `...?$SessionStorage.${string}` | `...?$MapStorage.${string}` | `...?$WeakMapStorage.${string}` | `...?$SessionMapStorage.${string}` | `...?$Dispatcher.${string}` | `...?$EventBus.${string}` | `...?$Observable.${string}` | `...?$CacheStorage.${string}` | `...?$CacheFactory.${string}` | `...?$Cache.${string}` | `...?$MetaManager.${string}` | `...?$ControllerDecorator.${string}` | `...?$PageStateManagerDecorator.${string}` | `...?$PageStateManager.${string}` | `...?$PageFactory.${string}` | `...?$ComponentUtils.${string}` | `...?$Utils.${string}` | `...?$PageHandlerRegistry.${string}` | `...?$PageManager.${string}` | `...?$RouteFactory.${string}` | `...?$Router.${string}` | `...?$RouteNames.${string}` | `...?$RouterEvents.${string}` | `...?$HttpUrlTransformer.${string}` | `...?$HttpAgentProxy.${string}` | `...?$Http.${string}` | `...?$HttpStatusCode.${string}` | `...?$PageRenderer.${string}` | "...$Helper" | "...$oc" | "...$Settings" | "...$Env" | "...$Protocol" | "...$Secure" | "...$Request" | "...$Response" | "...$Window" | "...$Error" | "...$Dictionary" | "...$CookieTransformFunction" | "...$CookieStorage" | "...$SessionStorage" | "...$MapStorage" | "...$WeakMapStorage" | "...$SessionMapStorage" | "...$Dispatcher" | "...$EventBus" | "...$Observable" | "...$CacheStorage" | "...$CacheFactory" | "...$Cache" | "...$MetaManager" | "...$ControllerDecorator" | "...$PageStateManagerDecorator" | "...$PageStateManager" | "...$PageFactory" | "...$ComponentUtils" | "...$Utils" | "...$PageHandlerRegistry" | "...$PageManager" | "...$RouteFactory" | "...$Router" | "...$RouteNames" | "...$RouterEvents" | "...$HttpUrlTransformer" | "...$HttpAgentProxy" | "...$Http" | "...$HttpStatusCode" | "...$PageRenderer" | `...$Helper.${string}` | `...$oc.${string}` | `...$Settings.${string}` | `...$Env.${string}` | `...$Protocol.${string}` | `...$Secure.${string}` | `...$Request.${string}` | `...$Response.${string}` | `...$Window.${string}` | `...$Error.${string}` | `...$Dictionary.${string}` | `...$CookieTransformFunction.${string}` | `...$CookieStorage.${string}` | `...$SessionStorage.${string}` | `...$MapStorage.${string}` | `...$WeakMapStorage.${string}` | `...$SessionMapStorage.${string}` | `...$Dispatcher.${string}` | `...$EventBus.${string}` | `...$Observable.${string}` | `...$CacheStorage.${string}` | `...$CacheFactory.${string}` | `...$Cache.${string}` | `...$MetaManager.${string}` | `...$ControllerDecorator.${string}` | `...$PageStateManagerDecorator.${string}` | `...$PageStateManager.${string}` | `...$PageFactory.${string}` | `...$ComponentUtils.${string}` | `...$Utils.${string}` | `...$PageHandlerRegistry.${string}` | `...$PageManager.${string}` | `...$RouteFactory.${string}` | `...$Router.${string}` | `...$RouteNames.${string}` | `...$RouterEvents.${string}` | `...$HttpUrlTransformer.${string}` | `...$HttpAgentProxy.${string}` | `...$Http.${string}` | `...$HttpStatusCode.${string}` | `...$PageRenderer.${string}` | Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>> | [Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>>, { optional: true }])[]

Defined in

packages/core/src/router/Router.ts:44


managedRootView

managedRootView: unknown

Defined in

packages/core/src/router/Router.ts:38


middlewares

middlewares: RouterMiddleware[]

Defined in

packages/core/src/router/Router.ts:43


onlyUpdate

onlyUpdate: boolean | (controller: RouteController, view: unknown) => boolean

Defined in

packages/core/src/router/Router.ts:39


viewAdapter

viewAdapter: unknown

Defined in

packages/core/src/router/Router.ts:42

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.RouteLocals/index.html b/api/interfaces/ima_core.RouteLocals/index.html index 2ea51fe7bb..7ed335551b 100644 --- a/api/interfaces/ima_core.RouteLocals/index.html +++ b/api/interfaces/ima_core.RouteLocals/index.html @@ -4,13 +4,13 @@ Interface: RouteLocals | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.RouteOptions/index.html b/api/interfaces/ima_core.RouteOptions/index.html index f533f210e2..7af9d9a50e 100644 --- a/api/interfaces/ima_core.RouteOptions/index.html +++ b/api/interfaces/ima_core.RouteOptions/index.html @@ -4,13 +4,13 @@ Interface: RouteOptions | IMA.js - - + +
-
Skip to main content

Interface: RouteOptions

@ima/core.RouteOptions

Hierarchy

Properties

autoScroll

autoScroll: boolean

Inherited from

RouteFactoryOptions.autoScroll

Defined in

packages/core/src/router/Router.ts:36


documentView

documentView: unknown

Inherited from

RouteFactoryOptions.documentView

Defined in

packages/core/src/router/Router.ts:37


extensions

Optional extensions: ("$Helper" | "$oc" | "$Settings" | "$Env" | "$Protocol" | "$Secure" | "$Request" | "$Response" | "$Window" | "$Error" | "$Dictionary" | "$CookieTransformFunction" | "$CookieStorage" | "$SessionStorage" | "$MapStorage" | "$WeakMapStorage" | "$SessionMapStorage" | "$Dispatcher" | "$EventBus" | "$Observable" | "$CacheStorage" | "$CacheFactory" | "$Cache" | "$MetaManager" | "$ControllerDecorator" | "$PageStateManagerDecorator" | "$PageStateManager" | "$PageFactory" | "$ComponentUtils" | "$Utils" | "$PageHandlerRegistry" | "$PageManager" | "$RouteFactory" | "$Router" | "$RouteNames" | "$RouterEvents" | "$HttpUrlTransformer" | "$HttpAgentProxy" | "$Http" | "$HttpStatusCode" | "$PageRenderer" | `$Helper.${string}` | `$oc.${string}` | `$Settings.${string}` | `$Env.${string}` | `$Protocol.${string}` | `$Secure.${string}` | `$Request.${string}` | `$Response.${string}` | `$Window.${string}` | `$Error.${string}` | `$Dictionary.${string}` | `$CookieTransformFunction.${string}` | `$CookieStorage.${string}` | `$SessionStorage.${string}` | `$MapStorage.${string}` | `$WeakMapStorage.${string}` | `$SessionMapStorage.${string}` | `$Dispatcher.${string}` | `$EventBus.${string}` | `$Observable.${string}` | `$CacheStorage.${string}` | `$CacheFactory.${string}` | `$Cache.${string}` | `$MetaManager.${string}` | `$ControllerDecorator.${string}` | `$PageStateManagerDecorator.${string}` | `$PageStateManager.${string}` | `$PageFactory.${string}` | `$ComponentUtils.${string}` | `$Utils.${string}` | `$PageHandlerRegistry.${string}` | `$PageManager.${string}` | `$RouteFactory.${string}` | `$Router.${string}` | `$RouteNames.${string}` | `$RouterEvents.${string}` | `$HttpUrlTransformer.${string}` | `$HttpAgentProxy.${string}` | `$Http.${string}` | `$HttpStatusCode.${string}` | `$PageRenderer.${string}` | "?$Helper" | "?$oc" | "?$Settings" | "?$Env" | "?$Protocol" | "?$Secure" | "?$Request" | "?$Response" | "?$Window" | "?$Error" | "?$Dictionary" | "?$CookieTransformFunction" | "?$CookieStorage" | "?$SessionStorage" | "?$MapStorage" | "?$WeakMapStorage" | "?$SessionMapStorage" | "?$Dispatcher" | "?$EventBus" | "?$Observable" | "?$CacheStorage" | "?$CacheFactory" | "?$Cache" | "?$MetaManager" | "?$ControllerDecorator" | "?$PageStateManagerDecorator" | "?$PageStateManager" | "?$PageFactory" | "?$ComponentUtils" | "?$Utils" | "?$PageHandlerRegistry" | "?$PageManager" | "?$RouteFactory" | "?$Router" | "?$RouteNames" | "?$RouterEvents" | "?$HttpUrlTransformer" | "?$HttpAgentProxy" | "?$Http" | "?$HttpStatusCode" | "?$PageRenderer" | `?$Helper.${string}` | `?$oc.${string}` | `?$Settings.${string}` | `?$Env.${string}` | `?$Protocol.${string}` | `?$Secure.${string}` | `?$Request.${string}` | `?$Response.${string}` | `?$Window.${string}` | `?$Error.${string}` | `?$Dictionary.${string}` | `?$CookieTransformFunction.${string}` | `?$CookieStorage.${string}` | `?$SessionStorage.${string}` | `?$MapStorage.${string}` | `?$WeakMapStorage.${string}` | `?$SessionMapStorage.${string}` | `?$Dispatcher.${string}` | `?$EventBus.${string}` | `?$Observable.${string}` | `?$CacheStorage.${string}` | `?$CacheFactory.${string}` | `?$Cache.${string}` | `?$MetaManager.${string}` | `?$ControllerDecorator.${string}` | `?$PageStateManagerDecorator.${string}` | `?$PageStateManager.${string}` | `?$PageFactory.${string}` | `?$ComponentUtils.${string}` | `?$Utils.${string}` | `?$PageHandlerRegistry.${string}` | `?$PageManager.${string}` | `?$RouteFactory.${string}` | `?$Router.${string}` | `?$RouteNames.${string}` | `?$RouterEvents.${string}` | `?$HttpUrlTransformer.${string}` | `?$HttpAgentProxy.${string}` | `?$Http.${string}` | `?$HttpStatusCode.${string}` | `?$PageRenderer.${string}` | "...?$Helper" | "...?$oc" | "...?$Settings" | "...?$Env" | "...?$Protocol" | "...?$Secure" | "...?$Request" | "...?$Response" | "...?$Window" | "...?$Error" | "...?$Dictionary" | "...?$CookieTransformFunction" | "...?$CookieStorage" | "...?$SessionStorage" | "...?$MapStorage" | "...?$WeakMapStorage" | "...?$SessionMapStorage" | "...?$Dispatcher" | "...?$EventBus" | "...?$Observable" | "...?$CacheStorage" | "...?$CacheFactory" | "...?$Cache" | "...?$MetaManager" | "...?$ControllerDecorator" | "...?$PageStateManagerDecorator" | "...?$PageStateManager" | "...?$PageFactory" | "...?$ComponentUtils" | "...?$Utils" | "...?$PageHandlerRegistry" | "...?$PageManager" | "...?$RouteFactory" | "...?$Router" | "...?$RouteNames" | "...?$RouterEvents" | "...?$HttpUrlTransformer" | "...?$HttpAgentProxy" | "...?$Http" | "...?$HttpStatusCode" | "...?$PageRenderer" | `...?$Helper.${string}` | `...?$oc.${string}` | `...?$Settings.${string}` | `...?$Env.${string}` | `...?$Protocol.${string}` | `...?$Secure.${string}` | `...?$Request.${string}` | `...?$Response.${string}` | `...?$Window.${string}` | `...?$Error.${string}` | `...?$Dictionary.${string}` | `...?$CookieTransformFunction.${string}` | `...?$CookieStorage.${string}` | `...?$SessionStorage.${string}` | `...?$MapStorage.${string}` | `...?$WeakMapStorage.${string}` | `...?$SessionMapStorage.${string}` | `...?$Dispatcher.${string}` | `...?$EventBus.${string}` | `...?$Observable.${string}` | `...?$CacheStorage.${string}` | `...?$CacheFactory.${string}` | `...?$Cache.${string}` | `...?$MetaManager.${string}` | `...?$ControllerDecorator.${string}` | `...?$PageStateManagerDecorator.${string}` | `...?$PageStateManager.${string}` | `...?$PageFactory.${string}` | `...?$ComponentUtils.${string}` | `...?$Utils.${string}` | `...?$PageHandlerRegistry.${string}` | `...?$PageManager.${string}` | `...?$RouteFactory.${string}` | `...?$Router.${string}` | `...?$RouteNames.${string}` | `...?$RouterEvents.${string}` | `...?$HttpUrlTransformer.${string}` | `...?$HttpAgentProxy.${string}` | `...?$Http.${string}` | `...?$HttpStatusCode.${string}` | `...?$PageRenderer.${string}` | "...$Helper" | "...$oc" | "...$Settings" | "...$Env" | "...$Protocol" | "...$Secure" | "...$Request" | "...$Response" | "...$Window" | "...$Error" | "...$Dictionary" | "...$CookieTransformFunction" | "...$CookieStorage" | "...$SessionStorage" | "...$MapStorage" | "...$WeakMapStorage" | "...$SessionMapStorage" | "...$Dispatcher" | "...$EventBus" | "...$Observable" | "...$CacheStorage" | "...$CacheFactory" | "...$Cache" | "...$MetaManager" | "...$ControllerDecorator" | "...$PageStateManagerDecorator" | "...$PageStateManager" | "...$PageFactory" | "...$ComponentUtils" | "...$Utils" | "...$PageHandlerRegistry" | "...$PageManager" | "...$RouteFactory" | "...$Router" | "...$RouteNames" | "...$RouterEvents" | "...$HttpUrlTransformer" | "...$HttpAgentProxy" | "...$Http" | "...$HttpStatusCode" | "...$PageRenderer" | `...$Helper.${string}` | `...$oc.${string}` | `...$Settings.${string}` | `...$Env.${string}` | `...$Protocol.${string}` | `...$Secure.${string}` | `...$Request.${string}` | `...$Response.${string}` | `...$Window.${string}` | `...$Error.${string}` | `...$Dictionary.${string}` | `...$CookieTransformFunction.${string}` | `...$CookieStorage.${string}` | `...$SessionStorage.${string}` | `...$MapStorage.${string}` | `...$WeakMapStorage.${string}` | `...$SessionMapStorage.${string}` | `...$Dispatcher.${string}` | `...$EventBus.${string}` | `...$Observable.${string}` | `...$CacheStorage.${string}` | `...$CacheFactory.${string}` | `...$Cache.${string}` | `...$MetaManager.${string}` | `...$ControllerDecorator.${string}` | `...$PageStateManagerDecorator.${string}` | `...$PageStateManager.${string}` | `...$PageFactory.${string}` | `...$ComponentUtils.${string}` | `...$Utils.${string}` | `...$PageHandlerRegistry.${string}` | `...$PageManager.${string}` | `...$RouteFactory.${string}` | `...$Router.${string}` | `...$RouteNames.${string}` | `...$RouterEvents.${string}` | `...$HttpUrlTransformer.${string}` | `...$HttpAgentProxy.${string}` | `...$Http.${string}` | `...$HttpStatusCode.${string}` | `...$PageRenderer.${string}` | Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>> | [Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>>, { optional: true }])[]

Inherited from

RouteFactoryOptions.extensions

Defined in

packages/core/src/router/Router.ts:44


headers

Optional headers: UnknownParameters

Defined in

packages/core/src/router/Router.ts:59


httpStatus

Optional httpStatus: number

Defined in

packages/core/src/router/Router.ts:60


managedRootView

managedRootView: unknown

Inherited from

RouteFactoryOptions.managedRootView

Defined in

packages/core/src/router/Router.ts:38


middlewares

middlewares: RouterMiddleware[]

Inherited from

RouteFactoryOptions.middlewares

Defined in

packages/core/src/router/Router.ts:43


onlyUpdate

onlyUpdate: boolean | (controller: RouteController, view: unknown) => boolean

Inherited from

RouteFactoryOptions.onlyUpdate

Defined in

packages/core/src/router/Router.ts:39


viewAdapter

viewAdapter: unknown

Inherited from

RouteFactoryOptions.viewAdapter

Defined in

packages/core/src/router/Router.ts:42

- - +
Skip to main content

Interface: RouteOptions

@ima/core.RouteOptions

Hierarchy

Properties

autoScroll

autoScroll: boolean

Inherited from

RouteFactoryOptions.autoScroll

Defined in

packages/core/src/router/Router.ts:36


documentView

documentView: unknown

Inherited from

RouteFactoryOptions.documentView

Defined in

packages/core/src/router/Router.ts:37


extensions

Optional extensions: ("$Helper" | "$oc" | "$Settings" | "$Env" | "$Protocol" | "$Secure" | "$Request" | "$Response" | "$Window" | "$Error" | "$Dictionary" | "$CookieTransformFunction" | "$CookieStorage" | "$SessionStorage" | "$MapStorage" | "$WeakMapStorage" | "$SessionMapStorage" | "$Dispatcher" | "$EventBus" | "$Observable" | "$CacheStorage" | "$CacheFactory" | "$Cache" | "$MetaManager" | "$ControllerDecorator" | "$PageStateManagerDecorator" | "$PageStateManager" | "$PageFactory" | "$ComponentUtils" | "$Utils" | "$PageHandlerRegistry" | "$PageManager" | "$RouteFactory" | "$Router" | "$RouteNames" | "$RouterEvents" | "$HttpUrlTransformer" | "$HttpAgentProxy" | "$Http" | "$HttpStatusCode" | "$PageRenderer" | `$Helper.${string}` | `$oc.${string}` | `$Settings.${string}` | `$Env.${string}` | `$Protocol.${string}` | `$Secure.${string}` | `$Request.${string}` | `$Response.${string}` | `$Window.${string}` | `$Error.${string}` | `$Dictionary.${string}` | `$CookieTransformFunction.${string}` | `$CookieStorage.${string}` | `$SessionStorage.${string}` | `$MapStorage.${string}` | `$WeakMapStorage.${string}` | `$SessionMapStorage.${string}` | `$Dispatcher.${string}` | `$EventBus.${string}` | `$Observable.${string}` | `$CacheStorage.${string}` | `$CacheFactory.${string}` | `$Cache.${string}` | `$MetaManager.${string}` | `$ControllerDecorator.${string}` | `$PageStateManagerDecorator.${string}` | `$PageStateManager.${string}` | `$PageFactory.${string}` | `$ComponentUtils.${string}` | `$Utils.${string}` | `$PageHandlerRegistry.${string}` | `$PageManager.${string}` | `$RouteFactory.${string}` | `$Router.${string}` | `$RouteNames.${string}` | `$RouterEvents.${string}` | `$HttpUrlTransformer.${string}` | `$HttpAgentProxy.${string}` | `$Http.${string}` | `$HttpStatusCode.${string}` | `$PageRenderer.${string}` | "?$Helper" | "?$oc" | "?$Settings" | "?$Env" | "?$Protocol" | "?$Secure" | "?$Request" | "?$Response" | "?$Window" | "?$Error" | "?$Dictionary" | "?$CookieTransformFunction" | "?$CookieStorage" | "?$SessionStorage" | "?$MapStorage" | "?$WeakMapStorage" | "?$SessionMapStorage" | "?$Dispatcher" | "?$EventBus" | "?$Observable" | "?$CacheStorage" | "?$CacheFactory" | "?$Cache" | "?$MetaManager" | "?$ControllerDecorator" | "?$PageStateManagerDecorator" | "?$PageStateManager" | "?$PageFactory" | "?$ComponentUtils" | "?$Utils" | "?$PageHandlerRegistry" | "?$PageManager" | "?$RouteFactory" | "?$Router" | "?$RouteNames" | "?$RouterEvents" | "?$HttpUrlTransformer" | "?$HttpAgentProxy" | "?$Http" | "?$HttpStatusCode" | "?$PageRenderer" | `?$Helper.${string}` | `?$oc.${string}` | `?$Settings.${string}` | `?$Env.${string}` | `?$Protocol.${string}` | `?$Secure.${string}` | `?$Request.${string}` | `?$Response.${string}` | `?$Window.${string}` | `?$Error.${string}` | `?$Dictionary.${string}` | `?$CookieTransformFunction.${string}` | `?$CookieStorage.${string}` | `?$SessionStorage.${string}` | `?$MapStorage.${string}` | `?$WeakMapStorage.${string}` | `?$SessionMapStorage.${string}` | `?$Dispatcher.${string}` | `?$EventBus.${string}` | `?$Observable.${string}` | `?$CacheStorage.${string}` | `?$CacheFactory.${string}` | `?$Cache.${string}` | `?$MetaManager.${string}` | `?$ControllerDecorator.${string}` | `?$PageStateManagerDecorator.${string}` | `?$PageStateManager.${string}` | `?$PageFactory.${string}` | `?$ComponentUtils.${string}` | `?$Utils.${string}` | `?$PageHandlerRegistry.${string}` | `?$PageManager.${string}` | `?$RouteFactory.${string}` | `?$Router.${string}` | `?$RouteNames.${string}` | `?$RouterEvents.${string}` | `?$HttpUrlTransformer.${string}` | `?$HttpAgentProxy.${string}` | `?$Http.${string}` | `?$HttpStatusCode.${string}` | `?$PageRenderer.${string}` | "...?$Helper" | "...?$oc" | "...?$Settings" | "...?$Env" | "...?$Protocol" | "...?$Secure" | "...?$Request" | "...?$Response" | "...?$Window" | "...?$Error" | "...?$Dictionary" | "...?$CookieTransformFunction" | "...?$CookieStorage" | "...?$SessionStorage" | "...?$MapStorage" | "...?$WeakMapStorage" | "...?$SessionMapStorage" | "...?$Dispatcher" | "...?$EventBus" | "...?$Observable" | "...?$CacheStorage" | "...?$CacheFactory" | "...?$Cache" | "...?$MetaManager" | "...?$ControllerDecorator" | "...?$PageStateManagerDecorator" | "...?$PageStateManager" | "...?$PageFactory" | "...?$ComponentUtils" | "...?$Utils" | "...?$PageHandlerRegistry" | "...?$PageManager" | "...?$RouteFactory" | "...?$Router" | "...?$RouteNames" | "...?$RouterEvents" | "...?$HttpUrlTransformer" | "...?$HttpAgentProxy" | "...?$Http" | "...?$HttpStatusCode" | "...?$PageRenderer" | `...?$Helper.${string}` | `...?$oc.${string}` | `...?$Settings.${string}` | `...?$Env.${string}` | `...?$Protocol.${string}` | `...?$Secure.${string}` | `...?$Request.${string}` | `...?$Response.${string}` | `...?$Window.${string}` | `...?$Error.${string}` | `...?$Dictionary.${string}` | `...?$CookieTransformFunction.${string}` | `...?$CookieStorage.${string}` | `...?$SessionStorage.${string}` | `...?$MapStorage.${string}` | `...?$WeakMapStorage.${string}` | `...?$SessionMapStorage.${string}` | `...?$Dispatcher.${string}` | `...?$EventBus.${string}` | `...?$Observable.${string}` | `...?$CacheStorage.${string}` | `...?$CacheFactory.${string}` | `...?$Cache.${string}` | `...?$MetaManager.${string}` | `...?$ControllerDecorator.${string}` | `...?$PageStateManagerDecorator.${string}` | `...?$PageStateManager.${string}` | `...?$PageFactory.${string}` | `...?$ComponentUtils.${string}` | `...?$Utils.${string}` | `...?$PageHandlerRegistry.${string}` | `...?$PageManager.${string}` | `...?$RouteFactory.${string}` | `...?$Router.${string}` | `...?$RouteNames.${string}` | `...?$RouterEvents.${string}` | `...?$HttpUrlTransformer.${string}` | `...?$HttpAgentProxy.${string}` | `...?$Http.${string}` | `...?$HttpStatusCode.${string}` | `...?$PageRenderer.${string}` | "...$Helper" | "...$oc" | "...$Settings" | "...$Env" | "...$Protocol" | "...$Secure" | "...$Request" | "...$Response" | "...$Window" | "...$Error" | "...$Dictionary" | "...$CookieTransformFunction" | "...$CookieStorage" | "...$SessionStorage" | "...$MapStorage" | "...$WeakMapStorage" | "...$SessionMapStorage" | "...$Dispatcher" | "...$EventBus" | "...$Observable" | "...$CacheStorage" | "...$CacheFactory" | "...$Cache" | "...$MetaManager" | "...$ControllerDecorator" | "...$PageStateManagerDecorator" | "...$PageStateManager" | "...$PageFactory" | "...$ComponentUtils" | "...$Utils" | "...$PageHandlerRegistry" | "...$PageManager" | "...$RouteFactory" | "...$Router" | "...$RouteNames" | "...$RouterEvents" | "...$HttpUrlTransformer" | "...$HttpAgentProxy" | "...$Http" | "...$HttpStatusCode" | "...$PageRenderer" | `...$Helper.${string}` | `...$oc.${string}` | `...$Settings.${string}` | `...$Env.${string}` | `...$Protocol.${string}` | `...$Secure.${string}` | `...$Request.${string}` | `...$Response.${string}` | `...$Window.${string}` | `...$Error.${string}` | `...$Dictionary.${string}` | `...$CookieTransformFunction.${string}` | `...$CookieStorage.${string}` | `...$SessionStorage.${string}` | `...$MapStorage.${string}` | `...$WeakMapStorage.${string}` | `...$SessionMapStorage.${string}` | `...$Dispatcher.${string}` | `...$EventBus.${string}` | `...$Observable.${string}` | `...$CacheStorage.${string}` | `...$CacheFactory.${string}` | `...$Cache.${string}` | `...$MetaManager.${string}` | `...$ControllerDecorator.${string}` | `...$PageStateManagerDecorator.${string}` | `...$PageStateManager.${string}` | `...$PageFactory.${string}` | `...$ComponentUtils.${string}` | `...$Utils.${string}` | `...$PageHandlerRegistry.${string}` | `...$PageManager.${string}` | `...$RouteFactory.${string}` | `...$Router.${string}` | `...$RouteNames.${string}` | `...$RouterEvents.${string}` | `...$HttpUrlTransformer.${string}` | `...$HttpAgentProxy.${string}` | `...$Http.${string}` | `...$HttpStatusCode.${string}` | `...$PageRenderer.${string}` | Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>> | [Constructor<Extension<any, any, any>> | AbstractConstructor<Extension<any, any, any>>, { optional: true }])[]

Inherited from

RouteFactoryOptions.extensions

Defined in

packages/core/src/router/Router.ts:44


headers

Optional headers: UnknownParameters

Defined in

packages/core/src/router/Router.ts:59


httpStatus

Optional httpStatus: number

Defined in

packages/core/src/router/Router.ts:60


managedRootView

managedRootView: unknown

Inherited from

RouteFactoryOptions.managedRootView

Defined in

packages/core/src/router/Router.ts:38


middlewares

middlewares: RouterMiddleware[]

Inherited from

RouteFactoryOptions.middlewares

Defined in

packages/core/src/router/Router.ts:43


onlyUpdate

onlyUpdate: boolean | (controller: RouteController, view: unknown) => boolean

Inherited from

RouteFactoryOptions.onlyUpdate

Defined in

packages/core/src/router/Router.ts:39


viewAdapter

viewAdapter: unknown

Inherited from

RouteFactoryOptions.viewAdapter

Defined in

packages/core/src/router/Router.ts:42

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.Settings/index.html b/api/interfaces/ima_core.Settings/index.html index 7e91d90518..bd398b09d3 100644 --- a/api/interfaces/ima_core.Settings/index.html +++ b/api/interfaces/ima_core.Settings/index.html @@ -4,13 +4,13 @@ Interface: Settings | IMA.js - - + +
-
Skip to main content

Interface: Settings

@ima/core.Settings

App settings for single env key.

Properties

$Cache

Optional $Cache: Object

Type declaration

NameType
enabled?boolean
ttl?number

Defined in

packages/core/src/boot.ts:144


$Http

$Http: Object

Type declaration

NameType
cacheOptionsHttpAgentImplCacheOptions
defaultRequestOptionsOmit<HttpAgentRequestOptions, "abortController">

Defined in

packages/core/src/boot.ts:136


$Observable

Optional $Observable: Object

Type declaration

NameType
maxHistoryLength?number

Defined in

packages/core/src/boot.ts:151


$Page

$Page: Object

Type declaration

NameType
$RenderPageRendererSettings

Defined in

packages/core/src/boot.ts:148


$Router

Optional $Router: Object

Type declaration

NameType
isSPARouted?(url: string, action?: RouteAction) => boolean
middlewareTimeout?number

Defined in

packages/core/src/boot.ts:140

- - +
Skip to main content

Interface: Settings

@ima/core.Settings

App settings for single env key.

Properties

$Cache

Optional $Cache: Object

Type declaration

NameType
enabled?boolean
ttl?number

Defined in

packages/core/src/boot.ts:144


$Http

$Http: Object

Type declaration

NameType
cacheOptionsHttpAgentImplCacheOptions
defaultRequestOptionsOmit<HttpAgentRequestOptions, "abortController">

Defined in

packages/core/src/boot.ts:136


$Observable

Optional $Observable: Object

Type declaration

NameType
maxHistoryLength?number

Defined in

packages/core/src/boot.ts:151


$Page

$Page: Object

Type declaration

NameType
$RenderPageRendererSettings

Defined in

packages/core/src/boot.ts:148


$Router

Optional $Router: Object

Type declaration

NameType
isSPARouted?(url: string, action?: RouteAction) => boolean
middlewareTimeout?number

Defined in

packages/core/src/boot.ts:140

+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.Utils/index.html b/api/interfaces/ima_core.Utils/index.html index 9d81babd98..201c503bcf 100644 --- a/api/interfaces/ima_core.Utils/index.html +++ b/api/interfaces/ima_core.Utils/index.html @@ -4,13 +4,13 @@ Interface: Utils | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/interfaces/ima_core.WindowCustomEventsMap/index.html b/api/interfaces/ima_core.WindowCustomEventsMap/index.html index 265bb7acdf..6039f99f9d 100644 --- a/api/interfaces/ima_core.WindowCustomEventsMap/index.html +++ b/api/interfaces/ima_core.WindowCustomEventsMap/index.html @@ -4,13 +4,13 @@ Interface: WindowCustomEventsMap | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content

Interface: WindowCustomEventsMap

@ima/core.WindowCustomEventsMap

+ + \ No newline at end of file diff --git a/api/interfaces/ima_dev_utils.CompileError/index.html b/api/interfaces/ima_dev_utils.CompileError/index.html index fe18dbad01..c64b76db54 100644 --- a/api/interfaces/ima_dev_utils.CompileError/index.html +++ b/api/interfaces/ima_dev_utils.CompileError/index.html @@ -4,13 +4,13 @@ Interface: CompileError | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/interfaces/ima_dev_utils.FragmentLine/index.html b/api/interfaces/ima_dev_utils.FragmentLine/index.html index a0f449cd44..68217896b5 100644 --- a/api/interfaces/ima_dev_utils.FragmentLine/index.html +++ b/api/interfaces/ima_dev_utils.FragmentLine/index.html @@ -4,13 +4,13 @@ Interface: FragmentLine | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/interfaces/ima_dev_utils.LoggerOptions/index.html b/api/interfaces/ima_dev_utils.LoggerOptions/index.html index 2788556f21..3591af658f 100644 --- a/api/interfaces/ima_dev_utils.LoggerOptions/index.html +++ b/api/interfaces/ima_dev_utils.LoggerOptions/index.html @@ -4,14 +4,14 @@ Interface: LoggerOptions | IMA.js - - + +
Skip to main content

Interface: LoggerOptions

@ima/dev-utils.LoggerOptions

Properties

elapsed

Optional elapsed: () => string

Type declaration

▸ (): string

Returns time utility function, which when called returns -formatted elapsed time from it's creation.

Returns

string

Callback to return formatted elapsed time.

Defined in

logger.ts:7


newLine

Optional newLine: boolean

Defined in

logger.ts:6


trackTime

Optional trackTime: boolean

Defined in

logger.ts:5

- - +formatted elapsed time from it's creation.

Returns

string

Callback to return formatted elapsed time.

Defined in

logger.ts:7


newLine

Optional newLine: boolean

Defined in

logger.ts:6


trackTime

Optional trackTime: boolean

Defined in

logger.ts:5

+ + \ No newline at end of file diff --git a/api/interfaces/ima_plugin_cli.Context/index.html b/api/interfaces/ima_plugin_cli.Context/index.html index 3121995b57..54de0a2c06 100644 --- a/api/interfaces/ima_plugin_cli.Context/index.html +++ b/api/interfaces/ima_plugin_cli.Context/index.html @@ -4,13 +4,13 @@ Interface: Context | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/interfaces/ima_plugin_cli.ImaPluginConfig/index.html b/api/interfaces/ima_plugin_cli.ImaPluginConfig/index.html index 9db65cfce2..5a2d0e6cd0 100644 --- a/api/interfaces/ima_plugin_cli.ImaPluginConfig/index.html +++ b/api/interfaces/ima_plugin_cli.ImaPluginConfig/index.html @@ -4,13 +4,13 @@ Interface: ImaPluginConfig | IMA.js - - + +
-
Skip to main content

Interface: ImaPluginConfig

@ima/plugin-cli.ImaPluginConfig

Properties

additionalWatchPaths

Optional additionalWatchPaths: string[]

Defined in

types.ts:66


exclude

Optional exclude: AnymatchMatcher

Defined in

types.ts:61


inputDir

inputDir: string

Defined in

types.ts:58


jsxRuntime

Optional jsxRuntime: "automatic" | "classic"

Defined in

types.ts:63


output

output: ImaPluginOutputConfig[]

Defined in

types.ts:59


plugins

Optional plugins: Plugin[]

Defined in

types.ts:62


sourceMaps

Optional sourceMaps: boolean

Defined in

types.ts:65


target

target: JscTarget

Defined in

types.ts:60


transformers

Optional transformers: TransformerDefinition[] | "..."

Defined in

types.ts:64

- - +
Skip to main content

Interface: ImaPluginConfig

@ima/plugin-cli.ImaPluginConfig

Properties

additionalWatchPaths

Optional additionalWatchPaths: string[]

Defined in

types.ts:66


exclude

Optional exclude: AnymatchMatcher

Defined in

types.ts:61


inputDir

inputDir: string

Defined in

types.ts:58


jsxRuntime

Optional jsxRuntime: "automatic" | "classic"

Defined in

types.ts:63


output

output: ImaPluginOutputConfig[]

Defined in

types.ts:59


plugins

Optional plugins: Plugin[]

Defined in

types.ts:62


sourceMaps

Optional sourceMaps: boolean

Defined in

types.ts:65


target

target: JscTarget

Defined in

types.ts:60


transformers

Optional transformers: TransformerDefinition[] | "..."

Defined in

types.ts:64

+ + \ No newline at end of file diff --git a/api/interfaces/ima_plugin_cli.PipeContext/index.html b/api/interfaces/ima_plugin_cli.PipeContext/index.html index 6ee5ea7ae6..fa615d1723 100644 --- a/api/interfaces/ima_plugin_cli.PipeContext/index.html +++ b/api/interfaces/ima_plugin_cli.PipeContext/index.html @@ -4,13 +4,13 @@ Interface: PipeContext | IMA.js - - + +
-
Skip to main content

Interface: PipeContext

@ima/plugin-cli.PipeContext

Properties

command

command: Command

Defined in

types.ts:79


config

config: ImaPluginConfig

Defined in

types.ts:84


contextDir

contextDir: string

Defined in

types.ts:83


cwd

cwd: string

Defined in

types.ts:80


fileName

fileName: string

Defined in

types.ts:81


filePath

filePath: string

Defined in

types.ts:82


inputDir

inputDir: string

Defined in

types.ts:85


outputDir

outputDir: string

Defined in

types.ts:86

- - +
Skip to main content

Interface: PipeContext

@ima/plugin-cli.PipeContext

Properties

command

command: Command

Defined in

types.ts:79


config

config: ImaPluginConfig

Defined in

types.ts:84


contextDir

contextDir: string

Defined in

types.ts:83


cwd

cwd: string

Defined in

types.ts:80


fileName

fileName: string

Defined in

types.ts:81


filePath

filePath: string

Defined in

types.ts:82


inputDir

inputDir: string

Defined in

types.ts:85


outputDir

outputDir: string

Defined in

types.ts:86

+ + \ No newline at end of file diff --git a/api/interfaces/ima_plugin_cli.Source/index.html b/api/interfaces/ima_plugin_cli.Source/index.html index 3510692263..41df148b64 100644 --- a/api/interfaces/ima_plugin_cli.Source/index.html +++ b/api/interfaces/ima_plugin_cli.Source/index.html @@ -4,13 +4,13 @@ Interface: Source | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/interfaces/ima_react_page_renderer.PageContextType/index.html b/api/interfaces/ima_react_page_renderer.PageContextType/index.html index 7d034352af..d812c8bb8e 100644 --- a/api/interfaces/ima_react_page_renderer.PageContextType/index.html +++ b/api/interfaces/ima_react_page_renderer.PageContextType/index.html @@ -4,13 +4,13 @@ Interface: PageContextType | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/interfaces/ima_react_page_renderer.ViewAdapterProps/index.html b/api/interfaces/ima_react_page_renderer.ViewAdapterProps/index.html index 53e941ab98..a578c5d2e8 100644 --- a/api/interfaces/ima_react_page_renderer.ViewAdapterProps/index.html +++ b/api/interfaces/ima_react_page_renderer.ViewAdapterProps/index.html @@ -4,13 +4,13 @@ Interface: ViewAdapterProps | IMA.js - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/api/interfaces/ima_react_page_renderer.useComponentType/index.html b/api/interfaces/ima_react_page_renderer.useComponentType/index.html index 620e97c9c2..cfec00ac3c 100644 --- a/api/interfaces/ima_react_page_renderer.useComponentType/index.html +++ b/api/interfaces/ima_react_page_renderer.useComponentType/index.html @@ -4,34 +4,34 @@ Interface: useComponentType | IMA.js - - + +
Skip to main content

Interface: useComponentType

@ima/react-page-renderer.useComponentType

Properties

cssClasses

cssClasses: (classRules: Argument, component?: string | ComponentType) => string

Type declaration

▸ (classRules, component?): string

Generate a string of CSS classes from the properties of the passed-in object that resolve to true.

Parameters
NameTypeDescription
classRulesArgumentCSS classes in a string separated by whitespace, or a map of CSS class names to boolean values. The CSS class name will be included in the result only if the value is true.
component?string | ComponentTypeThe component requiring the composition of the CSS class names, if it has the className property set and requires its inclusion this time.
Returns

string

String of CSS classes that had their property resolved -to true.

Defined in

packages/react-page-renderer/src/hooks/component.ts:9


fire

fire: (eventTarget: EventTarget, eventName: string, data?: any, options?: EventBusOptions) => EventBus

Type declaration

▸ (eventTarget, eventName, data?, options?): EventBus

Fires a new custom event of the specified name, carrying the provided +to true.

Defined in

packages/react-page-renderer/src/hooks/component.ts:9


fire

fire: (eventTarget: EventTarget, eventName: string, data?: any, options?: EventBusOptions) => EventBus

Type declaration

▸ (eventTarget, eventName, data?, options?): EventBus

Fires a new custom event of the specified name, carrying the provided data.

Note that this method does not prevent the event listeners to modify the data in any way. The order in which the event listeners will be executed is unspecified and should not be relied upon.

Note that the default options are { bubbles: true, cancelable: true }, which is different from the default values used in the native custom events ({ bubbles: false, cancelable: false }).

Parameters
NameTypeDescription
eventTargetEventTargetThe event target at which the event will be dispatched (e.g. element/document/window).
eventNamestringThe name of the event to fire.
data?anyThe data to pass to the event listeners.
options?EventBusOptionsThe override of the default options passed to the constructor of the custom event fired by this event bus. The default options passed to the custom event constructor are { bubbles: true, cancelable: true }.
Returns

EventBus

This custom event bus.

Throws

Thrown if the provided event target cannot be used to -fire the event.

See

https://developer.mozilla.org/en-US/docs/Web/API/Event/Event

Defined in

packages/react-page-renderer/src/hooks/component.ts:12


link: (routeName: string, params: RouteParams) => string

Type declaration

▸ (routeName, params): string

Generates an absolute URL (including protocol, domain, etc) for the +fire the event.

See

https://developer.mozilla.org/en-US/docs/Web/API/Event/Event

Defined in

packages/react-page-renderer/src/hooks/component.ts:12


link: (routeName: string, params: RouteParams) => string

Type declaration

▸ (routeName, params): string

Generates an absolute URL (including protocol, domain, etc) for the specified route by substituting the route's parameter placeholders with -the provided parameter values.

Parameters
NameTypeDescription
routeNamestringThe unique name of the route, identifying the route to use.
paramsRouteParamsParameter values for the route's parameter placeholders. Extraneous parameters will be added as URL query.
Returns

string

An absolute URL for the specified route and parameters.

Defined in

packages/react-page-renderer/src/hooks/component.ts:11


listen

listen: (eventTarget: EventTarget, eventName: string, listener: EventBusListener) => EventBus

Type declaration

▸ (eventTarget, eventName, listener): EventBus

Registers the provided event listener to be executed when the specific +the provided parameter values.

Parameters
NameTypeDescription
routeNamestringThe unique name of the route, identifying the route to use.
paramsRouteParamsParameter values for the route's parameter placeholders. Extraneous parameters will be added as URL query.
Returns

string

An absolute URL for the specified route and parameters.

Defined in

packages/react-page-renderer/src/hooks/component.ts:11


listen

listen: (eventTarget: EventTarget, eventName: string, listener: EventBusListener) => EventBus

Type declaration

▸ (eventTarget, eventName, listener): EventBus

Registers the provided event listener to be executed when the specific custom event is fired by the same implementation of the event bus and passes through the specified event target.

When the specified event is fired, the event listener will be executed with the event passed as the first argument.

The order in which the event listeners will be executed is unspecified -and should not be relied upon.

Parameters
NameTypeDescription
eventTargetEventTargetThe event target at which the listener should listen for the specified event.
eventNamestringThe name of the event to listen for.
listenerEventBusListenerThe event listener to register.
Returns

EventBus

This event bus.

Defined in

packages/react-page-renderer/src/hooks/component.ts:13


localize

localize: (key: never, parameters?: ObjectParameters) => string

Type declaration

▸ (key, parameters?): string

Retrieves the localization phrase identified by the specified key, +and should not be relied upon.

Parameters
NameTypeDescription
eventTargetEventTargetThe event target at which the listener should listen for the specified event.
eventNamestringThe name of the event to listen for.
listenerEventBusListenerThe event listener to register.
Returns

EventBus

This event bus.

Defined in

packages/react-page-renderer/src/hooks/component.ts:13


localize

localize: (key: never, parameters?: ObjectParameters) => string

Type declaration

▸ (key, parameters?): string

Retrieves the localization phrase identified by the specified key, evaluates the phrase's placeholder expressions using the provided parameters and returns the result.

Parameters
NameTypeDescription
keyneverThe key identifying the localization phrase.
parameters?ObjectParametersThe map of parameter names to the parameter values to use. Defaults to an empty plain object.
Returns

string

The specified localization phrase with its placeholders -evaluated using the provided parameters.

Defined in

packages/react-page-renderer/src/hooks/component.ts:10


unlisten

unlisten: (eventTarget: EventTarget, eventName: string, listener: EventBusListener) => EventBus

Type declaration

▸ (eventTarget, eventName, listener): EventBus

Removes the provided event listener from the set of event listeners +evaluated using the provided parameters.

Defined in

packages/react-page-renderer/src/hooks/component.ts:10


unlisten

unlisten: (eventTarget: EventTarget, eventName: string, listener: EventBusListener) => EventBus

Type declaration

▸ (eventTarget, eventName, listener): EventBus

Removes the provided event listener from the set of event listeners executed when the specified custom event fired by the same implementation passes through the specified event target.

The method has no effect if the listener is not registered for the -specified event at the specified event target.

Parameters
NameTypeDescription
eventTargetEventTargetThe event target at which the listener is listening for the event.
eventNamestringThe name of the event listened for.
listenerEventBusListenerThe event listener to deregister.
Returns

EventBus

This event bus.

Defined in

packages/react-page-renderer/src/hooks/component.ts:14


utils

utils: Utils

Defined in

packages/react-page-renderer/src/hooks/component.ts:8

- - +specified event at the specified event target.

Parameters
NameTypeDescription
eventTargetEventTargetThe event target at which the listener is listening for the event.
eventNamestringThe name of the event listened for.
listenerEventBusListenerThe event listener to deregister.
Returns

EventBus

This event bus.

Defined in

packages/react-page-renderer/src/hooks/component.ts:14


utils

utils: Utils

Defined in

packages/react-page-renderer/src/hooks/component.ts:8

+ + \ No newline at end of file diff --git a/api/interfaces/ima_react_page_renderer.useDispatcherType/index.html b/api/interfaces/ima_react_page_renderer.useDispatcherType/index.html index 59530cd5f7..d49b16652d 100644 --- a/api/interfaces/ima_react_page_renderer.useDispatcherType/index.html +++ b/api/interfaces/ima_react_page_renderer.useDispatcherType/index.html @@ -4,8 +4,8 @@ Interface: useDispatcherType | IMA.js - - + +
@@ -13,8 +13,8 @@ the specified event, passing the provided data to them as the first argument.

It will also execute all event listeners registered to listen to all events.

Note that this method does not prevent the event listeners to modify the data in any way. The order in which the event listeners will be executed -is unspecified and should not be relied upon.

Type parameters
NameType
Eextends keyof DispatcherEventsMap
Parameters
NameTypeDescription
eventEThe name of the event to fire.
dataDispatcherEventsMap[E]The data to pass to the event listeners.
Returns

Dispatcher

This dispatcher.

▸ (event, data): Dispatcher

Parameters
NameType
eventstring
dataany
Returns

Dispatcher

Defined in

packages/react-page-renderer/src/hooks/dispatcher.ts:12

- - +is unspecified and should not be relied upon.

Type parameters
NameType
Eextends keyof DispatcherEventsMap
Parameters
NameTypeDescription
eventEThe name of the event to fire.
dataDispatcherEventsMap[E]The data to pass to the event listeners.
Returns

Dispatcher

This dispatcher.

▸ (event, data): Dispatcher

Parameters
NameType
eventstring
dataany
Returns

Dispatcher

Defined in

packages/react-page-renderer/src/hooks/dispatcher.ts:12

+ + \ No newline at end of file diff --git a/api/interfaces/ima_react_page_renderer.useEventBusType/index.html b/api/interfaces/ima_react_page_renderer.useEventBusType/index.html index c70ceb80a6..fc4b107617 100644 --- a/api/interfaces/ima_react_page_renderer.useEventBusType/index.html +++ b/api/interfaces/ima_react_page_renderer.useEventBusType/index.html @@ -4,8 +4,8 @@ Interface: useEventBusType | IMA.js - - + +
@@ -16,8 +16,8 @@ { bubbles: true, cancelable: true }, which is different from the default values used in the native custom events ({ bubbles: false, cancelable: false }).

Parameters
NameTypeDescription
eventTargetEventTargetThe event target at which the event will be dispatched (e.g. element/document/window).
eventNamestringThe name of the event to fire.
data?anyThe data to pass to the event listeners.
options?EventBusOptionsThe override of the default options passed to the constructor of the custom event fired by this event bus. The default options passed to the custom event constructor are { bubbles: true, cancelable: true }.
Returns

EventBus

This custom event bus.

Throws

Thrown if the provided event target cannot be used to -fire the event.

See

https://developer.mozilla.org/en-US/docs/Web/API/Event/Event

Defined in

packages/react-page-renderer/src/hooks/eventBus.ts:7

- - +fire the event.

See

https://developer.mozilla.org/en-US/docs/Web/API/Event/Event

Defined in

packages/react-page-renderer/src/hooks/eventBus.ts:7

+ + \ No newline at end of file diff --git a/api/modules/ima_cli/index.html b/api/modules/ima_cli/index.html index 2af3c7d43b..f97998b3c4 100644 --- a/api/modules/ima_cli/index.html +++ b/api/modules/ima_cli/index.html @@ -4,19 +4,19 @@ Module: @ima/cli | IMA.js - - + +
-
Skip to main content

Module: @ima/cli

Interfaces

Type Aliases

ImaCliCommand

Ƭ ImaCliCommand: "build" | "dev"

Ima CLI commands.

Defined in

types.ts:25


ImaConfig

Ƭ ImaConfig: Object

Ima config options. Some of these options can be overridden using Args, which takes precedence. -These are parsed from optional ima.config.js that can be defined in the root of the IMA.js project.

Type declaration

NameTypeDescription
compressbooleanEnable brotli and gzip compression for production assets [default=true].
cssBrowsersTargetstringBrowserslist configuration string for postcss-preset-env.
devServer?{ hostname?: string ; origin?: string ; port?: number ; publicUrl?: string ; writeToDiskFilter?: (filePath: string) => boolean }HMR dev server settings.
devServer.hostname?string-
devServer.origin?stringOptional custom ima app origin (defaults to http://localhost:[environment.$Server.port]) this is used for CORS configuration.
devServer.port?number-
devServer.publicUrl?string-
devServer.writeToDiskFilter?(filePath: string) => booleanCustom filtr for files which should be always written to disk, even if we're serving static files from memory. This is used for example to always save runner.js to disk, since it's used on server-side too.
disableLegacyBuild?booleanDisables build of 'client' legacy bundle.
experiments?{ css?: boolean }Experimental configurations which can be enabled individually on specific applications. Some of these may find a way to default configuration in future versions of IMA.js.
experiments.css?boolean-
imageInlineSizeLimitnumberThreshold to inline image resources as base64 automatically [default=8192]
jsxRuntime?"classic" | "automatic"Set custom jsxRuntime, the default is 'automatic'.
languagesRecord<string, string[]>Supported languages with glob paths of the files with translations
plugins?ImaCliPlugin[]Optional IMA cli plugins that can be used to easily extend webpack config and cli with additional features.
postcss(config: Record<string, unknown>, ctx: ImaConfigurationContext) => Promise<Record<string, unknown>>Function which receives postcss-loader config and current context, this can be used to customize existing default postcss config or completely replace it with a custom one.
publicPathstringWebpack assets public path [default='']
sourceMaps?boolean | "eval" | "eval-cheap-source-map" | "eval-cheap-module-source-map" | "eval-source-map" | "cheap-source-map" | "cheap-module-source-map" | "source-map" | "inline-cheap-source-map" | "inline-cheap-module-source-map" | "inline-source-map" | "eval-nosources-cheap-source-map" | "eval-nosources-cheap-module-source-map" | "eval-nosources-source-map" | "inline-nosources-cheap-source-map" | "inline-nosources-cheap-module-source-map" | "inline-nosources-source-map" | "nosources-cheap-source-map" | "nosources-cheap-module-source-map" | "nosources-source-map" | "hidden-nosources-cheap-source-map" | "hidden-nosources-cheap-module-source-map" | "hidden-nosources-source-map" | "hidden-cheap-source-map" | "hidden-cheap-module-source-map" | "hidden-source-map"Set to true (or any preset from https://webpack.js.org/configuration/devtool/#devtool) to enable source maps for production build. (dev/watch tasks always generate source maps to work properly with error overlay).
swc(config: Record<string, unknown>, ctx: ImaConfigurationContext) => Promise<Record<string, unknown>>Function which receives default app swc-loader config and current context, this can be used for additional customization or returning completely different config.
swcVendor(config: Record<string, unknown>, ctx: ImaConfigurationContext) => Promise<Record<string, unknown>>Function which receives default vendor swc-loader config and current context, this can be used for additional customization of vendor processed files.
transformVendorPaths?{ exclude?: RegExp[] ; include?: RegExp[] }Advanced functionality allowing you to include/exclude custom vendor paths that go through swc loader (configured using swcVendor function). Use this if you're using dependencies that don't meet the lowest supported ES version target (ES9 by default). all packages in Ima namespace are included by default.
transformVendorPaths.exclude?RegExp[]-
transformVendorPaths.include?RegExp[]-
watchOptionsWatching["watchOptions"]Custom options passed to webpack watch api interface. For more information see: https://webpack.js.org/configuration/watch/#watchoptions
webpack?(config: Configuration, ctx: ImaConfigurationContext, imaConfig: ImaConfig) => Promise<Configuration>Webpack callback function can be used to completely customize default webpack config before it's run.
webpackAliases?ResolveOptions["alias"]Optional custom webpack aliases
prepareConfigurations?(configurations: ImaConfigurationContext[], imaConfig: ImaConfig, args: ImaCliArgs) => Promise<ImaConfigurationContext[]>Called right before creating webpack configurations after preProcess call. This hook lets you customize configuration contexts for each webpack config that will be generated. This is usefull when you need to overrite configuration contexts for values that are not editable anywhere else (like output folders).

Defined in

types.ts:139

Variables

IMA_CONF_FILENAME

Const IMA_CONF_FILENAME: "ima.config.js"

Defined in

webpack/utils.ts:14

Functions

compileLanguages

compileLanguages(imaConfig, rootDir, watch?): Promise<void>

Compile language files defined in imaConfig.

Parameters

NameTypeDefault valueDescription
imaConfigImaConfigundefinedima.config.js file contents.
rootDirstringundefinedCurrent compilation root directory.
watchbooleanfalseWhen set to true, it creates chokidar instances which watch language files for changes and trigger recompilation.

Returns

Promise<void>

Defined in

webpack/languages.ts:203


createCacheKey

createCacheKey(ctx, imaConfig, additionalData?): string

Creates hash representing current webpack environment.

Parameters

NameTypeDescription
ctxImaConfigurationContextCurrent configuration context.
imaConfigImaConfigima configuration
additionalDataObject-

Returns

string

Defined in

webpack/utils.ts:167


createDevServerConfig

createDevServerConfig(«destructured»): Object

Creates hmr dev server configuration from provided contexts -and arguments with this priority args -> ctx -> imaConfig -> [defaults].

Parameters

NameType
«destructured»Object
› args?ImaCliArgs
› ctx?ImaConfigurationContext
› imaConfigImaConfig

Returns

Object

NameType
hostnamestring
portnumber
publicUrlstring

Defined in

webpack/utils.ts:122


createWebpackConfig

createWebpackConfig(args, imaConfig): Promise<Configuration[]>

Creates webpack configurations contexts from current config and cli args. +

Module: @ima/cli

Interfaces

Type Aliases

ImaCliCommand

Ƭ ImaCliCommand: "build" | "dev"

Ima CLI commands.

Defined in

types.ts:25


ImaConfig

Ƭ ImaConfig: Object

Ima config options. Some of these options can be overridden using Args, which takes precedence. +These are parsed from optional ima.config.js that can be defined in the root of the IMA.js project.

Type declaration

NameTypeDescription
compressbooleanEnable brotli and gzip compression for production assets [default=true].
cssBrowsersTargetstringBrowserslist configuration string for postcss-preset-env.
devServer?{ hostname?: string ; origin?: string ; port?: number ; publicUrl?: string ; writeToDiskFilter?: (filePath: string) => boolean }HMR dev server settings.
devServer.hostname?string-
devServer.origin?stringOptional custom ima app origin (defaults to http://localhost:[environment.$Server.port]) this is used for CORS configuration.
devServer.port?number-
devServer.publicUrl?string-
devServer.writeToDiskFilter?(filePath: string) => booleanCustom filtr for files which should be always written to disk, even if we're serving static files from memory. This is used for example to always save runner.js to disk, since it's used on server-side too.
disableLegacyBuild?booleanDisables build of 'client' legacy bundle.
experiments?{ css?: boolean }Experimental configurations which can be enabled individually on specific applications. Some of these may find a way to default configuration in future versions of IMA.js.
experiments.css?boolean-
imageInlineSizeLimitnumberThreshold to inline image resources as base64 automatically [default=8192]
jsxRuntime?"classic" | "automatic"Set custom jsxRuntime, the default is 'automatic'.
languagesRecord<string, string[]>Supported languages with glob paths of the files with translations
plugins?ImaCliPlugin[]Optional IMA cli plugins that can be used to easily extend webpack config and cli with additional features.
postcss(config: Record<string, unknown>, ctx: ImaConfigurationContext) => Promise<Record<string, unknown>>Function which receives postcss-loader config and current context, this can be used to customize existing default postcss config or completely replace it with a custom one.
publicPathstringWebpack assets public path [default='']
sourceMaps?boolean | "eval" | "eval-cheap-source-map" | "eval-cheap-module-source-map" | "eval-source-map" | "cheap-source-map" | "cheap-module-source-map" | "source-map" | "inline-cheap-source-map" | "inline-cheap-module-source-map" | "inline-source-map" | "eval-nosources-cheap-source-map" | "eval-nosources-cheap-module-source-map" | "eval-nosources-source-map" | "inline-nosources-cheap-source-map" | "inline-nosources-cheap-module-source-map" | "inline-nosources-source-map" | "nosources-cheap-source-map" | "nosources-cheap-module-source-map" | "nosources-source-map" | "hidden-nosources-cheap-source-map" | "hidden-nosources-cheap-module-source-map" | "hidden-nosources-source-map" | "hidden-cheap-source-map" | "hidden-cheap-module-source-map" | "hidden-source-map"Set to true (or any preset from https://webpack.js.org/configuration/devtool/#devtool) to enable source maps for production build. (dev/watch tasks always generate source maps to work properly with error overlay).
swc(config: Record<string, unknown>, ctx: ImaConfigurationContext) => Promise<Record<string, unknown>>Function which receives default app swc-loader config and current context, this can be used for additional customization or returning completely different config.
swcVendor(config: Record<string, unknown>, ctx: ImaConfigurationContext) => Promise<Record<string, unknown>>Function which receives default vendor swc-loader config and current context, this can be used for additional customization of vendor processed files.
transformVendorPaths?{ exclude?: RegExp[] ; include?: RegExp[] }Advanced functionality allowing you to include/exclude custom vendor paths that go through swc loader (configured using swcVendor function). Use this if you're using dependencies that don't meet the lowest supported ES version target (ES9 by default). all packages in Ima namespace are included by default.
transformVendorPaths.exclude?RegExp[]-
transformVendorPaths.include?RegExp[]-
watchOptionsWatching["watchOptions"]Custom options passed to webpack watch api interface. For more information see: https://webpack.js.org/configuration/watch/#watchoptions
webpack?(config: Configuration, ctx: ImaConfigurationContext, imaConfig: ImaConfig) => Promise<Configuration>Webpack callback function can be used to completely customize default webpack config before it's run.
webpackAliases?ResolveOptions["alias"]Optional custom webpack aliases
prepareConfigurations?(configurations: ImaConfigurationContext[], imaConfig: ImaConfig, args: ImaCliArgs) => Promise<ImaConfigurationContext[]>Called right before creating webpack configurations after preProcess call. This hook lets you customize configuration contexts for each webpack config that will be generated. This is usefull when you need to overrite configuration contexts for values that are not editable anywhere else (like output folders).

Defined in

types.ts:139

Variables

IMA_CONF_FILENAME

Const IMA_CONF_FILENAME: "ima.config.js"

Defined in

webpack/utils.ts:14

Functions

compileLanguages

compileLanguages(imaConfig, rootDir, watch?): Promise<void>

Compile language files defined in imaConfig.

Parameters

NameTypeDefault valueDescription
imaConfigImaConfigundefinedima.config.js file contents.
rootDirstringundefinedCurrent compilation root directory.
watchbooleanfalseWhen set to true, it creates chokidar instances which watch language files for changes and trigger recompilation.

Returns

Promise<void>

Defined in

webpack/languages.ts:203


createCacheKey

createCacheKey(ctx, imaConfig, additionalData?): string

Creates hash representing current webpack environment.

Parameters

NameTypeDescription
ctxImaConfigurationContextCurrent configuration context.
imaConfigImaConfigima configuration
additionalDataObject-

Returns

string

Defined in

webpack/utils.ts:167


createDevServerConfig

createDevServerConfig(«destructured»): Object

Creates hmr dev server configuration from provided contexts +and arguments with this priority args -> ctx -> imaConfig -> [defaults].

Parameters

NameType
«destructured»Object
› args?ImaCliArgs
› ctx?ImaConfigurationContext
› imaConfigImaConfig

Returns

Object

NameType
hostnamestring
portnumber
publicUrlstring

Defined in

webpack/utils.ts:122


createWebpackConfig

createWebpackConfig(args, imaConfig): Promise<Configuration[]>

Creates webpack configurations contexts from current config and cli args. Additionally it applies all existing configuration overrides from cli plugins -and app overrides in this order cli -> plugins -> app.

Parameters

NameTypeDescription
argsImaCliArgsParsed CLI and build arguments.
imaConfigImaConfigLoaded ima config.

Returns

Promise<Configuration[]>

Defined in

webpack/utils.ts:453


findRules

findRules(config, testString, loader?): RuleSetRule[] | RuleSetUseItem[]

Helper for finding rules with given loader in webpack config.

Parameters

NameType
configConfiguration
testStringstring
loader?string

Returns

RuleSetRule[] | RuleSetUseItem[]

Defined in

webpack/utils.ts:20


getCurrentCoreJsVersion

getCurrentCoreJsVersion(): Promise<any>

Extracts major.minor version string of currently resolved -core-js from node_modules.

Returns

Promise<any>

Defined in

webpack/utils.ts:538


getLanguageEntryPoints

getLanguageEntryPoints(languages, rootDir, useHMR?): Record<string, string>

Returns entry points to use in webpack configurations. These then lead to -messageformat compiled modules while also containing some additional runtime code.

Parameters

NameTypeDefault valueDescription
languagesRecord<string, string[]>undefinedLanguages object from ima config.
rootDirstringundefinedCurrent compilation root directory.
useHMRbooleanfalse-

Returns

Record<string, string>

Object with webpack entry points.

Defined in

webpack/languages.ts:64


resolveEnvironment

resolveEnvironment(rootDir?): Environment

Loads application IMA.js environment from server/config/environment.js

Parameters

NameTypeDescription
rootDirstringApplication root directory

Returns

Environment

Loaded environment

Defined in

webpack/utils.ts:90


resolveImaConfig

resolveImaConfig(args): Promise<ImaConfig>

Resolves ima.config.js from rootDir base path with DEFAULTS.

Parameters

NameTypeDescription
argsImaCliArgsCLI args.

Returns

Promise<ImaConfig>

Ima config or empty object.

Defined in

webpack/utils.ts:229


runImaPluginsHook

runImaPluginsHook(args, imaConfig, hook): Promise<void>

Runs one of optional ima plugin hooks defined on existing plugins.

Parameters

NameTypeDescription
argsImaCliArgsParsed CLI and build arguments.
imaConfigImaConfigLoaded ima config.
hook"preProcess" | "postProcess"-

Returns

Promise<void>

Defined in

webpack/utils.ts:331

- - +and app overrides in this order cli -> plugins -> app.

Parameters

NameTypeDescription
argsImaCliArgsParsed CLI and build arguments.
imaConfigImaConfigLoaded ima config.

Returns

Promise<Configuration[]>

Defined in

webpack/utils.ts:453


findRules

findRules(config, testString, loader?): RuleSetRule[] | RuleSetUseItem[]

Helper for finding rules with given loader in webpack config.

Parameters

NameType
configConfiguration
testStringstring
loader?string

Returns

RuleSetRule[] | RuleSetUseItem[]

Defined in

webpack/utils.ts:20


getCurrentCoreJsVersion

getCurrentCoreJsVersion(): Promise<any>

Extracts major.minor version string of currently resolved +core-js from node_modules.

Returns

Promise<any>

Defined in

webpack/utils.ts:538


getLanguageEntryPoints

getLanguageEntryPoints(languages, rootDir, useHMR?): Record<string, string>

Returns entry points to use in webpack configurations. These then lead to +messageformat compiled modules while also containing some additional runtime code.

Parameters

NameTypeDefault valueDescription
languagesRecord<string, string[]>undefinedLanguages object from ima config.
rootDirstringundefinedCurrent compilation root directory.
useHMRbooleanfalse-

Returns

Record<string, string>

Object with webpack entry points.

Defined in

webpack/languages.ts:64


resolveEnvironment

resolveEnvironment(rootDir?): Environment

Loads application IMA.js environment from server/config/environment.js

Parameters

NameTypeDescription
rootDirstringApplication root directory

Returns

Environment

Loaded environment

Defined in

webpack/utils.ts:90


resolveImaConfig

resolveImaConfig(args): Promise<ImaConfig>

Resolves ima.config.js from rootDir base path with DEFAULTS.

Parameters

NameTypeDescription
argsImaCliArgsCLI args.

Returns

Promise<ImaConfig>

Ima config or empty object.

Defined in

webpack/utils.ts:229


runImaPluginsHook

runImaPluginsHook(args, imaConfig, hook): Promise<void>

Runs one of optional ima plugin hooks defined on existing plugins.

Parameters

NameTypeDescription
argsImaCliArgsParsed CLI and build arguments.
imaConfigImaConfigLoaded ima config.
hook"preProcess" | "postProcess"-

Returns

Promise<void>

Defined in

webpack/utils.ts:331

+ + \ No newline at end of file diff --git a/api/modules/ima_core/index.html b/api/modules/ima_core/index.html index 3bfed6a4df..f0e74b88c0 100644 --- a/api/modules/ima_core/index.html +++ b/api/modules/ima_core/index.html @@ -4,16 +4,16 @@ Module: @ima/core | IMA.js - - + +
-
Skip to main content

Module: @ima/core

Enumerations

Classes

Interfaces

Type Aliases

AnyParameters

Ƭ AnyParameters: Object

Index signature

[key: string]: unknown

Defined in

packages/core/src/types.ts:22


AppSettings

Ƭ AppSettings: Object

App settings function, used in ./app/config/settings.js

Type declaration

NameType
dev?PartialDeep<Settings>
prodSettings
regression?PartialDeep<Settings>
test?PartialDeep<Settings>

Defined in

packages/core/src/boot.ts:159


AsyncRouteController

Ƭ AsyncRouteController: WithAsync<RouteController>

Defined in

packages/core/src/router/AbstractRoute.ts:27


AsyncRouteView

Ƭ AsyncRouteView: WithAsync<RouteView>

Defined in

packages/core/src/router/AbstractRoute.ts:28


BootSettings

Ƭ BootSettings: Pick<GlobalImaObject, "$Version" | "$Debug" | "$Env" | "$Version" | "$App" | "$Protocol" | "$Language" | "$Host" | "$Path" | "$Root" | "$LanguagePartPath">

Defined in

packages/core/src/Bootstrap.ts:82


Ƭ Cookie: Object

Type declaration

NameType
optionsCookieOptions
valuestring | number | boolean | Date | undefined

Defined in

packages/core/src/storage/CookieStorage.ts:33


CookieOptions

Ƭ CookieOptions: Object

Type declaration

NameType
domain?string
expires?Date
httpOnly?boolean
maxAge?number
partitioned?boolean
path?string
sameSite?"none" | "lax" | "strict"
secure?boolean

Defined in

packages/core/src/storage/CookieStorage.ts:22


CookieTransformFunction

Ƭ CookieTransformFunction: Object

Type declaration

NameType
decode(value: string) => string
encode(value: string) => string

Defined in

packages/core/src/router/Response.ts:10


DecoratedOCAliasMap

Ƭ DecoratedOCAliasMap: AddOCChaining<OCAliasMap> & WithOCOptional<OCAliasMap> & WithOCOptionalSpread<OCAliasMap> & WithOCSpread<OCAliasMap>

Defined in

packages/core/src/config/bind.ts:68


Dependencies

Ƭ Dependencies<T>: Dependency<T>[]

Type parameters

NameType
Tany

Defined in

packages/core/src/oc/ObjectContainer.ts:23


Dependency

Ƭ Dependency<T>: keyof DecoratedOCAliasMap | OCInjectable<T> | [OCInjectable<T>, { optional: boolean }]

Type parameters

Name
T

Defined in

packages/core/src/oc/ObjectContainer.ts:24


DictionaryConfig

Ƭ DictionaryConfig: Object

Type declaration

NameType
$Languagestring
dictionaryDictionaryData

Defined in

packages/core/src/dictionary/Dictionary.ts:3


DictionaryData

Ƭ DictionaryData: Object

Index signature

[key: string]: DictionaryData | LocalizationFunction

Defined in

packages/core/src/dictionary/Dictionary.ts:8


DispatcherListener

Ƭ DispatcherListener<D>: (data: D) => void

Type parameters

Name
D

Type declaration

▸ (data): void

Parameters
NameType
dataD
Returns

void

Defined in

packages/core/src/event/Dispatcher.ts:12


EntryOptions

Ƭ EntryOptions: Object

Type declaration

NameType
writeableboolean

Defined in

packages/core/src/oc/Entry.ts:7


EventBusEventHandler

Ƭ EventBusEventHandler: (data?: UnknownParameters) => void

Type declaration

▸ (data?): void

Parameters
NameType
data?UnknownParameters
Returns

void

Defined in

packages/core/src/event/EventBus.ts:5


EventBusListener

Ƭ EventBusListener: (event: CustomEvent) => unknown

Type declaration

▸ (event): unknown

Parameters
NameType
eventCustomEvent
Returns

unknown

Defined in

packages/core/src/event/EventBus.ts:3


EventBusOptions

Ƭ EventBusOptions: Object

Type declaration

NameType
bubbles?boolean
cancelable?boolean
composed?boolean

Defined in

packages/core/src/event/EventBus.ts:9


ExecutionJob

Ƭ ExecutionJob: (...args: unknown[]) => Promise<unknown> | unknown

Type declaration

▸ (...args): Promise<unknown> | unknown

Parameters
NameType
...argsunknown[]
Returns

Promise<unknown> | unknown

Defined in

packages/core/src/execution/Execution.ts:1


GenericErrorParams

Ƭ GenericErrorParams: Object

Index signature

[key: string]: unknown

Type declaration

NameType
cause?Error | string
status?number

Defined in

packages/core/src/error/GenericError.ts:3


HttpAgentResponse

Ƭ HttpAgentResponse<B>: Object

A response from the server.

Type parameters

Name
B

Type declaration

NameType
bodyB
cachedboolean
headersStringParameters
headersRaw?Headers
paramsHttpProxyRequestParams
statusnumber

Defined in

packages/core/src/http/HttpAgent.ts:55


HttpProxyErrorParams

Ƭ HttpProxyErrorParams<B>: { body: B ; cause: Error ; errorName: string ; status: number } & HttpProxyRequestParams

An object that describes a failed HTTP request, providing +

Module: @ima/core

Enumerations

Classes

Interfaces

Type Aliases

AnyParameters

Ƭ AnyParameters: Object

Index signature

[key: string]: unknown

Defined in

packages/core/src/types.ts:22


AppSettings

Ƭ AppSettings: Object

App settings function, used in ./app/config/settings.js

Type declaration

NameType
dev?PartialDeep<Settings>
prodSettings
regression?PartialDeep<Settings>
test?PartialDeep<Settings>

Defined in

packages/core/src/boot.ts:159


AsyncRouteController

Ƭ AsyncRouteController: WithAsync<RouteController>

Defined in

packages/core/src/router/AbstractRoute.ts:27


AsyncRouteView

Ƭ AsyncRouteView: WithAsync<RouteView>

Defined in

packages/core/src/router/AbstractRoute.ts:28


BootSettings

Ƭ BootSettings: Pick<GlobalImaObject, "$Version" | "$Debug" | "$Env" | "$Version" | "$App" | "$Protocol" | "$Language" | "$Host" | "$Path" | "$Root" | "$LanguagePartPath">

Defined in

packages/core/src/Bootstrap.ts:82


Ƭ Cookie: Object

Type declaration

NameType
optionsCookieOptions
valuestring | number | boolean | Date | undefined

Defined in

packages/core/src/storage/CookieStorage.ts:33


CookieOptions

Ƭ CookieOptions: Object

Type declaration

NameType
domain?string
expires?Date
httpOnly?boolean
maxAge?number
partitioned?boolean
path?string
sameSite?"none" | "lax" | "strict"
secure?boolean

Defined in

packages/core/src/storage/CookieStorage.ts:22


CookieTransformFunction

Ƭ CookieTransformFunction: Object

Type declaration

NameType
decode(value: string) => string
encode(value: string) => string

Defined in

packages/core/src/router/Response.ts:10


DecoratedOCAliasMap

Ƭ DecoratedOCAliasMap: AddOCChaining<OCAliasMap> & WithOCOptional<OCAliasMap> & WithOCOptionalSpread<OCAliasMap> & WithOCSpread<OCAliasMap>

Defined in

packages/core/src/config/bind.ts:68


Dependencies

Ƭ Dependencies<T>: Dependency<T>[]

Type parameters

NameType
Tany

Defined in

packages/core/src/oc/ObjectContainer.ts:23


Dependency

Ƭ Dependency<T>: keyof DecoratedOCAliasMap | OCInjectable<T> | [OCInjectable<T>, { optional: boolean }]

Type parameters

Name
T

Defined in

packages/core/src/oc/ObjectContainer.ts:24


DictionaryConfig

Ƭ DictionaryConfig: Object

Type declaration

NameType
$Languagestring
dictionaryDictionaryData

Defined in

packages/core/src/dictionary/Dictionary.ts:3


DictionaryData

Ƭ DictionaryData: Object

Index signature

[key: string]: DictionaryData | LocalizationFunction

Defined in

packages/core/src/dictionary/Dictionary.ts:8


DispatcherListener

Ƭ DispatcherListener<D>: (data: D) => void

Type parameters

Name
D

Type declaration

▸ (data): void

Parameters
NameType
dataD
Returns

void

Defined in

packages/core/src/event/Dispatcher.ts:12


EntryOptions

Ƭ EntryOptions: Object

Type declaration

NameType
writeableboolean

Defined in

packages/core/src/oc/Entry.ts:7


EventBusEventHandler

Ƭ EventBusEventHandler: (data?: UnknownParameters) => void

Type declaration

▸ (data?): void

Parameters
NameType
data?UnknownParameters
Returns

void

Defined in

packages/core/src/event/EventBus.ts:5


EventBusListener

Ƭ EventBusListener: (event: CustomEvent) => unknown

Type declaration

▸ (event): unknown

Parameters
NameType
eventCustomEvent
Returns

unknown

Defined in

packages/core/src/event/EventBus.ts:3


EventBusOptions

Ƭ EventBusOptions: Object

Type declaration

NameType
bubbles?boolean
cancelable?boolean
composed?boolean

Defined in

packages/core/src/event/EventBus.ts:9


ExecutionJob

Ƭ ExecutionJob: (...args: unknown[]) => Promise<unknown> | unknown

Type declaration

▸ (...args): Promise<unknown> | unknown

Parameters
NameType
...argsunknown[]
Returns

Promise<unknown> | unknown

Defined in

packages/core/src/execution/Execution.ts:1


GenericErrorParams

Ƭ GenericErrorParams: Object

Index signature

[key: string]: unknown

Type declaration

NameType
cause?Error | string
status?number

Defined in

packages/core/src/error/GenericError.ts:3


HttpAgentResponse

Ƭ HttpAgentResponse<B>: Object

A response from the server.

Type parameters

Name
B

Type declaration

NameType
bodyB
cachedboolean
headersStringParameters
headersRaw?Headers
paramsHttpProxyRequestParams
statusnumber

Defined in

packages/core/src/http/HttpAgent.ts:55


HttpProxyErrorParams

Ƭ HttpProxyErrorParams<B>: { body: B ; cause: Error ; errorName: string ; status: number } & HttpProxyRequestParams

An object that describes a failed HTTP request, providing information about both the failure reported by the server and how the -request has been sent to the server.

Type parameters

NameType
Bunknown

Defined in

packages/core/src/http/HttpProxy.ts:51


HttpProxyRequestParams

Ƭ HttpProxyRequestParams: Object

An object representing the complete request parameters used to create and -send the HTTP request.

Type declaration

NameType
data?UnknownParameters
methodstring
optionsHttpAgentRequestOptions
transformedUrlstring
urlstring

Defined in

packages/core/src/http/HttpProxy.ts:27


InitBindFunction

Ƭ InitBindFunction: (ns: Namespace, oc: ObjectContainer, config: Required<BootConfig>["bind"], state: BindingState) => void

Type declaration

▸ (ns, oc, config, state): void

Parameters
NameType
nsNamespace
ocObjectContainer
configRequired<BootConfig>["bind"]
stateBindingState
Returns

void

Defined in

packages/core/src/Bootstrap.ts:16


InitRoutesFunction

Ƭ InitRoutesFunction: (ns: Namespace, oc: ObjectContainer, routes: UnknownParameters | undefined, router: Router) => void

Type declaration

▸ (ns, oc, routes, router): void

Parameters
NameType
nsNamespace
ocObjectContainer
routesUnknownParameters | undefined
routerRouter
Returns

void

Defined in

packages/core/src/Bootstrap.ts:23


InitServicesFunction

Ƭ InitServicesFunction: (ns: Namespace, oc: ObjectContainer, config: BootConfig["services"]) => void

Type declaration

▸ (ns, oc, config): void

Parameters
NameType
nsNamespace
ocObjectContainer
configBootConfig["services"]
Returns

void

Defined in

packages/core/src/Bootstrap.ts:30


InitSettingsFunction

Ƭ InitSettingsFunction: (ns: Namespace, oc: ObjectContainer, config: BootConfig["settings"]) => AppSettings

Type declaration

▸ (ns, oc, config): AppSettings

Parameters
NameType
nsNamespace
ocObjectContainer
configBootConfig["settings"]
Returns

AppSettings

Defined in

packages/core/src/Bootstrap.ts:36


LoadedResources

Ƭ LoadedResources<T>: Intersection<Partial<Pick<T, Matching<T, Promise<any>>>>, Required<Pick<T, NonMatching<T, Promise<any>>>>>

Type parameters

Name
T

Defined in

packages/core/src/controller/Controller.ts:27


LocalizationFunction

Ƭ LocalizationFunction: (parameters: ObjectParameters) => string

Type declaration

▸ (parameters): string

Parameters
NameType
parametersObjectParameters
Returns

string

Defined in

packages/core/src/dictionary/Dictionary.ts:12


ManageArgs

Ƭ ManageArgs: Object

Type declaration

NameType
action?PageAction
optionsRouteOptions
params?RouteParams
routeInstanceType<typeof AbstractRoute>

Defined in

packages/core/src/page/manager/PageManager.ts:5


ManagedPage

Ƭ ManagedPage: Object

Type declaration

NameType
controllerRouteController
controllerInstanceController
decoratedControllerControllerDecorator
optionsRouteOptions
paramsRouteParams
routeInstanceType<typeof AbstractRoute>
state{ abort?: { promise: Promise<void> ; reject: () => void ; resolve: () => void } ; activated: boolean ; cancelled: boolean ; executed: boolean ; initialized: boolean ; mounted: boolean ; page: { promise: Promise<void> ; reject: () => void ; resolve: () => void } }
state.abort?{ promise: Promise<void> ; reject: () => void ; resolve: () => void }
state.abort.promisePromise<void>
state.abort.reject() => void
state.abort.resolve() => void
state.activatedboolean
state.cancelledboolean
state.executedboolean
state.initializedboolean
state.mountedboolean
state.page{ promise: Promise<void> ; reject: () => void ; resolve: () => void }
state.page.promisePromise<void>
state.page.reject() => void
state.page.resolve() => void
viewunknown
viewInstanceunknown

Defined in

packages/core/src/page/PageTypes.ts:11


MetaAttributes

Ƭ MetaAttributes: Record<string, MetaValue>

Defined in

packages/core/src/meta/MetaManager.ts:2


MetaManagerRecord

Ƭ MetaManagerRecord<K>: { [key in K]: MetaValue } & MetaAttributes

Type parameters

NameType
Kextends MetaManagerRecordKeys

Defined in

packages/core/src/meta/MetaManager.ts:5


MetaManagerRecordKeys

Ƭ MetaManagerRecordKeys: "content" | "href"

Defined in

packages/core/src/meta/MetaManager.ts:4


MetaValue

Ƭ MetaValue: number | boolean | string | null | undefined

Defined in

packages/core/src/meta/MetaManager.ts:1


NativeListener

Ƭ NativeListener: (event: CustomEvent | Event) => unknown

Type declaration

▸ (event): unknown

Parameters
NameType
eventCustomEvent | Event
Returns

unknown

Defined in

packages/core/src/event/EventBus.ts:7


OCInjectable

Ƭ OCInjectable<T>: Constructor<T> & WithDependencies | AbstractConstructor<T> & Partial<WithDependencies> | Function & { prototype: T } & Partial<WithDependencies>

Type parameters

Name
T

Defined in

packages/core/src/oc/ObjectContainer.ts:18


OCInstance

Ƭ OCInstance<T>: T extends keyof DecoratedOCAliasMap ? DecoratedOCAliasMap[T] : T extends AbstractConstructor<any> | Constructor<any> ? InstanceType<T> : T extends [AbstractConstructor<any> | Constructor<any>, { optional: true }] ? InstanceType<T[0]> | null : T

Type parameters

NameType
Textends OCInstanceConstrain

Defined in

packages/core/src/oc/ObjectContainer.ts:40


OCInstanceConstrain

Ƭ OCInstanceConstrain<T>: keyof DecoratedOCAliasMap | Constructor<T> | AbstractConstructor<T> | [AbstractConstructor<T> | Constructor<T>, { optional: true }]

Type parameters

NameType
Tany

Defined in

packages/core/src/oc/ObjectContainer.ts:34


ObjectParameters

Ƭ ObjectParameters: Object

Index signature

[key: string]: boolean | number | string | Date

Defined in

packages/core/src/types.ts:30


PageData

Ƭ PageData: { status: number } & UnknownParameters

Defined in

packages/core/src/page/PageTypes.ts:50


PageState

Ƭ PageState: Object

Index signature

[key: string]: any

Defined in

packages/core/src/page/state/PageStateManager.ts:1


PluginInitBindFunction

Ƭ PluginInitBindFunction: (ns: Namespace, oc: ObjectContainer, config: Required<BootConfig>["bind"], isDynamicallyLoaded: boolean, name?: string) => void

Type declaration

▸ (ns, oc, config, isDynamicallyLoaded, name?): void

Parameters
NameType
nsNamespace
ocObjectContainer
configRequired<BootConfig>["bind"]
isDynamicallyLoadedboolean
name?string
Returns

void

Defined in

packages/core/src/Bootstrap.ts:42


PluginInitServicesFunction

Ƭ PluginInitServicesFunction: (ns: Namespace, oc: ObjectContainer, config: BootConfig["services"], isDynamicallyLoaded: boolean) => void

Type declaration

▸ (ns, oc, config, isDynamicallyLoaded): void

Parameters
NameType
nsNamespace
ocObjectContainer
configBootConfig["services"]
isDynamicallyLoadedboolean
Returns

void

Defined in

packages/core/src/Bootstrap.ts:50


PluginInitSettingsFunction

Ƭ PluginInitSettingsFunction: (ns: Namespace, oc: ObjectContainer, config: BootConfig["settings"], isDynamicallyLoaded: boolean) => PartialDeep<AppSettings>

Type declaration

▸ (ns, oc, config, isDynamicallyLoaded): PartialDeep<AppSettings>

Parameters
NameType
nsNamespace
ocObjectContainer
configBootConfig["settings"]
isDynamicallyLoadedboolean
Returns

PartialDeep<AppSettings>

Defined in

packages/core/src/Bootstrap.ts:57


Resource

Ƭ Resource: string | [string, { [attribute: string]: unknown; fallback: boolean }]

Defined in

packages/core/src/boot.ts:37


RouteController

Ƭ RouteController: keyof OCAliasMap | Constructor<Controller<any>> | AbstractConstructor<Controller<any>>

Defined in

packages/core/src/router/AbstractRoute.ts:15


RouteParams

Ƭ RouteParams<T>: Partial<{ [K in keyof T]: T[K] }> & { [key: string]: string | GenericError; }

Type parameters

NameType
T{}

Defined in

packages/core/src/router/AbstractRoute.ts:9


RoutePathExpression

Ƭ RoutePathExpression: Object

Path expression type used for router routes definition.

Type declaration

NameTypeDescription
extractParameters(trimmedPath: string, additionalData: { path: string ; query: RouteParams }) => RouteParamsFunction which takes care of parsing url params from given path. It returns object of key/value pairs which correspond to expected path url params and their values.
matcherRegExpRegExp use in router for path matching to current route.
toPath(params: RouteParams) => stringFunction that generates valid path from given route params.

Defined in

packages/core/src/router/DynamicRoute.ts:23


RouteView

Ƭ RouteView: keyof OCAliasMap | Constructor<any> | AbstractConstructor<any> | (...args: any[]) => any

Defined in

packages/core/src/router/AbstractRoute.ts:20


RouterMiddleware

Ƭ RouterMiddleware: (params: RouteParams, locals: RouteLocals, next?: (result: UnknownParameters) => void) => UnknownParameters | void | Promise<UnknownParameters | void>

Type declaration

▸ (params, locals, next?): UnknownParameters | void | Promise<UnknownParameters | void>

Parameters
NameType
paramsRouteParams
localsRouteLocals
next?(result: UnknownParameters) => void
Returns

UnknownParameters | void | Promise<UnknownParameters | void>

Defined in

packages/core/src/router/Router.ts:29


SerializedCacheEntry

Ƭ SerializedCacheEntry<V>: Object

Type parameters

Name
V

Type declaration

NameType
ttlnumber | string
valueV

Defined in

packages/core/src/cache/CacheEntry.ts:1


SerializedData

Ƭ SerializedData<V>: Object

Type parameters

NameType
Vunknown

Index signature

[key: string]: { ttl: number ; value: V }

Defined in

packages/core/src/cache/Cache.ts:1


StringParameters

Ƭ StringParameters: Object

Index signature

[key: string]: string

Defined in

packages/core/src/types.ts:14


UnknownParameters

Ƭ UnknownParameters: Object

Index signature

[key: string]: unknown

Defined in

packages/core/src/types.ts:18


UnknownPromiseParameters

Ƭ UnknownPromiseParameters: Object

Index signature

[key: string]: unknown | Promise<unknown>

Defined in

packages/core/src/types.ts:26


WindowEventTargets

Ƭ WindowEventTargets: Document | globalThis.Window | HTMLBodyElement | SVGSVGElement | SVGElement | HTMLMediaElement | HTMLVideoElement | Element

Defined in

packages/core/src/window/Window.ts:4


WindowEventTargetsMap

Ƭ WindowEventTargetsMap<E>: E extends Document ? DocumentEventMap : E extends globalThis.Window ? WindowEventMap : E extends HTMLBodyElement ? HTMLBodyElementEventMap : E extends SVGSVGElement ? SVGSVGElementEventMap : E extends SVGElement ? SVGElementEventMap : E extends HTMLMediaElement ? HTMLMediaElementEventMap : E extends HTMLVideoElement ? HTMLVideoElementEventMap : HTMLElementEventMap & WindowCustomEventsMap

Type parameters

NameType
Eextends WindowEventTargets

Defined in

packages/core/src/window/Window.ts:14

Variables

ns

Const ns: Namespace

Defined in

packages/core/src/Namespace.ts:123


pluginLoader

Const pluginLoader: PluginLoader

Defined in

packages/core/src/pluginLoader.ts:93

Functions

bootClientApp

bootClientApp(app, bootConfig): Object

Parameters

NameType
appObject
app.bootstrapBootstrap
app.ocObjectContainer
bootConfigBootConfig

Returns

Object

NameType
bootstrapBootstrap
ocObjectContainer

Defined in

packages/core/src/boot.ts:254


createImaApp

createImaApp(): Object

Returns

Object

NameType
bootstrapBootstrap
ocObjectContainer

Defined in

packages/core/src/boot.ts:182


getClientBootConfig

getClientBootConfig(initialAppConfigFunctions): BootConfig

Parameters

NameType
initialAppConfigFunctionsInitAppConfig

Returns

BootConfig

Defined in

packages/core/src/boot.ts:190


getInitialImaConfigFunctions

getInitialImaConfigFunctions(): InitImaConfig

Returns

InitImaConfig

Defined in

packages/core/src/boot.ts:166


getInitialPluginConfig

getInitialPluginConfig(): Object

Returns

Object

NameType
plugins{ name: string ; plugin: InitPluginConfig }[]

Defined in

packages/core/src/boot.ts:170


getNamespace

getNamespace(): Namespace

Returns

Namespace

Defined in

packages/core/src/Namespace.ts:125


onLoad

onLoad(): Promise<unknown>

Returns

Promise<unknown>

Defined in

packages/core/src/boot.ts:310


reviveClientApp

reviveClientApp(initialAppConfigFunctions): Promise<UnknownParameters & { app: { bootstrap: Bootstrap ; oc: ObjectContainer } ; bootConfig: BootConfig }>

Parameters

NameType
initialAppConfigFunctionsInitAppConfig

Returns

Promise<UnknownParameters & { app: { bootstrap: Bootstrap ; oc: ObjectContainer } ; bootConfig: BootConfig }>

Defined in

packages/core/src/boot.ts:289


routeClientApp

routeClientApp(app): Promise<void | UnknownParameters>

Parameters

NameType
appObject
app.bootstrapBootstrap
app.ocObjectContainer

Returns

Promise<void | UnknownParameters>

Defined in

packages/core/src/boot.ts:269

- - +request has been sent to the server.

Type parameters

NameType
Bunknown

Defined in

packages/core/src/http/HttpProxy.ts:51


HttpProxyRequestParams

Ƭ HttpProxyRequestParams: Object

An object representing the complete request parameters used to create and +send the HTTP request.

Type declaration

NameType
data?UnknownParameters
methodstring
optionsHttpAgentRequestOptions
transformedUrlstring
urlstring

Defined in

packages/core/src/http/HttpProxy.ts:27


InitBindFunction

Ƭ InitBindFunction: (ns: Namespace, oc: ObjectContainer, config: Required<BootConfig>["bind"], state: BindingState) => void

Type declaration

▸ (ns, oc, config, state): void

Parameters
NameType
nsNamespace
ocObjectContainer
configRequired<BootConfig>["bind"]
stateBindingState
Returns

void

Defined in

packages/core/src/Bootstrap.ts:16


InitRoutesFunction

Ƭ InitRoutesFunction: (ns: Namespace, oc: ObjectContainer, routes: UnknownParameters | undefined, router: Router) => void

Type declaration

▸ (ns, oc, routes, router): void

Parameters
NameType
nsNamespace
ocObjectContainer
routesUnknownParameters | undefined
routerRouter
Returns

void

Defined in

packages/core/src/Bootstrap.ts:23


InitServicesFunction

Ƭ InitServicesFunction: (ns: Namespace, oc: ObjectContainer, config: BootConfig["services"]) => void

Type declaration

▸ (ns, oc, config): void

Parameters
NameType
nsNamespace
ocObjectContainer
configBootConfig["services"]
Returns

void

Defined in

packages/core/src/Bootstrap.ts:30


InitSettingsFunction

Ƭ InitSettingsFunction: (ns: Namespace, oc: ObjectContainer, config: BootConfig["settings"]) => AppSettings

Type declaration

▸ (ns, oc, config): AppSettings

Parameters
NameType
nsNamespace
ocObjectContainer
configBootConfig["settings"]
Returns

AppSettings

Defined in

packages/core/src/Bootstrap.ts:36


LoadedResources

Ƭ LoadedResources<T>: Intersection<Partial<Pick<T, Matching<T, Promise<any>>>>, Required<Pick<T, NonMatching<T, Promise<any>>>>>

Type parameters

Name
T

Defined in

packages/core/src/controller/Controller.ts:27


LocalizationFunction

Ƭ LocalizationFunction: (parameters: ObjectParameters) => string

Type declaration

▸ (parameters): string

Parameters
NameType
parametersObjectParameters
Returns

string

Defined in

packages/core/src/dictionary/Dictionary.ts:12


ManageArgs

Ƭ ManageArgs: Object

Type declaration

NameType
action?PageAction
optionsRouteOptions
params?RouteParams
routeInstanceType<typeof AbstractRoute>

Defined in

packages/core/src/page/manager/PageManager.ts:5


ManagedPage

Ƭ ManagedPage: Object

Type declaration

NameType
controllerRouteController
controllerInstanceController
decoratedControllerControllerDecorator
optionsRouteOptions
paramsRouteParams
routeInstanceType<typeof AbstractRoute>
state{ abort?: { promise: Promise<void> ; reject: () => void ; resolve: () => void } ; activated: boolean ; cancelled: boolean ; executed: boolean ; initialized: boolean ; mounted: boolean ; page: { promise: Promise<void> ; reject: () => void ; resolve: () => void } }
state.abort?{ promise: Promise<void> ; reject: () => void ; resolve: () => void }
state.abort.promisePromise<void>
state.abort.reject() => void
state.abort.resolve() => void
state.activatedboolean
state.cancelledboolean
state.executedboolean
state.initializedboolean
state.mountedboolean
state.page{ promise: Promise<void> ; reject: () => void ; resolve: () => void }
state.page.promisePromise<void>
state.page.reject() => void
state.page.resolve() => void
viewunknown
viewInstanceunknown

Defined in

packages/core/src/page/PageTypes.ts:11


MetaAttributes

Ƭ MetaAttributes: Record<string, MetaValue>

Defined in

packages/core/src/meta/MetaManager.ts:2


MetaManagerRecord

Ƭ MetaManagerRecord<K>: { [key in K]: MetaValue } & MetaAttributes

Type parameters

NameType
Kextends MetaManagerRecordKeys

Defined in

packages/core/src/meta/MetaManager.ts:5


MetaManagerRecordKeys

Ƭ MetaManagerRecordKeys: "content" | "href"

Defined in

packages/core/src/meta/MetaManager.ts:4


MetaValue

Ƭ MetaValue: number | boolean | string | null | undefined

Defined in

packages/core/src/meta/MetaManager.ts:1


NativeListener

Ƭ NativeListener: (event: CustomEvent | Event) => unknown

Type declaration

▸ (event): unknown

Parameters
NameType
eventCustomEvent | Event
Returns

unknown

Defined in

packages/core/src/event/EventBus.ts:7


OCInjectable

Ƭ OCInjectable<T>: Constructor<T> & WithDependencies | AbstractConstructor<T> & Partial<WithDependencies> | Function & { prototype: T } & Partial<WithDependencies>

Type parameters

Name
T

Defined in

packages/core/src/oc/ObjectContainer.ts:18


OCInstance

Ƭ OCInstance<T>: T extends keyof DecoratedOCAliasMap ? DecoratedOCAliasMap[T] : T extends AbstractConstructor<any> | Constructor<any> ? InstanceType<T> : T extends [AbstractConstructor<any> | Constructor<any>, { optional: true }] ? InstanceType<T[0]> | null : T

Type parameters

NameType
Textends OCInstanceConstrain

Defined in

packages/core/src/oc/ObjectContainer.ts:40


OCInstanceConstrain

Ƭ OCInstanceConstrain<T>: keyof DecoratedOCAliasMap | Constructor<T> | AbstractConstructor<T> | [AbstractConstructor<T> | Constructor<T>, { optional: true }]

Type parameters

NameType
Tany

Defined in

packages/core/src/oc/ObjectContainer.ts:34


ObjectParameters

Ƭ ObjectParameters: Object

Index signature

[key: string]: boolean | number | string | Date

Defined in

packages/core/src/types.ts:30


PageData

Ƭ PageData: { status: number } & UnknownParameters

Defined in

packages/core/src/page/PageTypes.ts:50


PageState

Ƭ PageState: Object

Index signature

[key: string]: any

Defined in

packages/core/src/page/state/PageStateManager.ts:1


PluginInitBindFunction

Ƭ PluginInitBindFunction: (ns: Namespace, oc: ObjectContainer, config: Required<BootConfig>["bind"], isDynamicallyLoaded: boolean, name?: string) => void

Type declaration

▸ (ns, oc, config, isDynamicallyLoaded, name?): void

Parameters
NameType
nsNamespace
ocObjectContainer
configRequired<BootConfig>["bind"]
isDynamicallyLoadedboolean
name?string
Returns

void

Defined in

packages/core/src/Bootstrap.ts:42


PluginInitServicesFunction

Ƭ PluginInitServicesFunction: (ns: Namespace, oc: ObjectContainer, config: BootConfig["services"], isDynamicallyLoaded: boolean) => void

Type declaration

▸ (ns, oc, config, isDynamicallyLoaded): void

Parameters
NameType
nsNamespace
ocObjectContainer
configBootConfig["services"]
isDynamicallyLoadedboolean
Returns

void

Defined in

packages/core/src/Bootstrap.ts:50


PluginInitSettingsFunction

Ƭ PluginInitSettingsFunction: (ns: Namespace, oc: ObjectContainer, config: BootConfig["settings"], isDynamicallyLoaded: boolean) => PartialDeep<AppSettings>

Type declaration

▸ (ns, oc, config, isDynamicallyLoaded): PartialDeep<AppSettings>

Parameters
NameType
nsNamespace
ocObjectContainer
configBootConfig["settings"]
isDynamicallyLoadedboolean
Returns

PartialDeep<AppSettings>

Defined in

packages/core/src/Bootstrap.ts:57


Resource

Ƭ Resource: string | [string, { [attribute: string]: unknown; fallback: boolean }]

Defined in

packages/core/src/boot.ts:37


RouteController

Ƭ RouteController: keyof OCAliasMap | Constructor<Controller<any>> | AbstractConstructor<Controller<any>>

Defined in

packages/core/src/router/AbstractRoute.ts:15


RouteParams

Ƭ RouteParams<T>: Partial<{ [K in keyof T]: T[K] }> & { [key: string]: string | GenericError; }

Type parameters

NameType
T{}

Defined in

packages/core/src/router/AbstractRoute.ts:9


RoutePathExpression

Ƭ RoutePathExpression: Object

Path expression type used for router routes definition.

Type declaration

NameTypeDescription
extractParameters(trimmedPath: string, additionalData: { path: string ; query: RouteParams }) => RouteParamsFunction which takes care of parsing url params from given path. It returns object of key/value pairs which correspond to expected path url params and their values.
matcherRegExpRegExp use in router for path matching to current route.
toPath(params: RouteParams) => stringFunction that generates valid path from given route params.

Defined in

packages/core/src/router/DynamicRoute.ts:23


RouteView

Ƭ RouteView: keyof OCAliasMap | Constructor<any> | AbstractConstructor<any> | (...args: any[]) => any

Defined in

packages/core/src/router/AbstractRoute.ts:20


RouterMiddleware

Ƭ RouterMiddleware: (params: RouteParams, locals: RouteLocals, next?: (result: UnknownParameters) => void) => UnknownParameters | void | Promise<UnknownParameters | void>

Type declaration

▸ (params, locals, next?): UnknownParameters | void | Promise<UnknownParameters | void>

Parameters
NameType
paramsRouteParams
localsRouteLocals
next?(result: UnknownParameters) => void
Returns

UnknownParameters | void | Promise<UnknownParameters | void>

Defined in

packages/core/src/router/Router.ts:29


SerializedCacheEntry

Ƭ SerializedCacheEntry<V>: Object

Type parameters

Name
V

Type declaration

NameType
ttlnumber | string
valueV

Defined in

packages/core/src/cache/CacheEntry.ts:1


SerializedData

Ƭ SerializedData<V>: Object

Type parameters

NameType
Vunknown

Index signature

[key: string]: { ttl: number ; value: V }

Defined in

packages/core/src/cache/Cache.ts:1


StringParameters

Ƭ StringParameters: Object

Index signature

[key: string]: string

Defined in

packages/core/src/types.ts:14


UnknownParameters

Ƭ UnknownParameters: Object

Index signature

[key: string]: unknown

Defined in

packages/core/src/types.ts:18


UnknownPromiseParameters

Ƭ UnknownPromiseParameters: Object

Index signature

[key: string]: unknown | Promise<unknown>

Defined in

packages/core/src/types.ts:26


WindowEventTargets

Ƭ WindowEventTargets: Document | globalThis.Window | HTMLBodyElement | SVGSVGElement | SVGElement | HTMLMediaElement | HTMLVideoElement | Element

Defined in

packages/core/src/window/Window.ts:4


WindowEventTargetsMap

Ƭ WindowEventTargetsMap<E>: E extends Document ? DocumentEventMap : E extends globalThis.Window ? WindowEventMap : E extends HTMLBodyElement ? HTMLBodyElementEventMap : E extends SVGSVGElement ? SVGSVGElementEventMap : E extends SVGElement ? SVGElementEventMap : E extends HTMLMediaElement ? HTMLMediaElementEventMap : E extends HTMLVideoElement ? HTMLVideoElementEventMap : HTMLElementEventMap & WindowCustomEventsMap

Type parameters

NameType
Eextends WindowEventTargets

Defined in

packages/core/src/window/Window.ts:14

Variables

ns

Const ns: Namespace

Defined in

packages/core/src/Namespace.ts:123


pluginLoader

Const pluginLoader: PluginLoader

Defined in

packages/core/src/pluginLoader.ts:93

Functions

bootClientApp

bootClientApp(app, bootConfig): Object

Parameters

NameType
appObject
app.bootstrapBootstrap
app.ocObjectContainer
bootConfigBootConfig

Returns

Object

NameType
bootstrapBootstrap
ocObjectContainer

Defined in

packages/core/src/boot.ts:254


createImaApp

createImaApp(): Object

Returns

Object

NameType
bootstrapBootstrap
ocObjectContainer

Defined in

packages/core/src/boot.ts:182


getClientBootConfig

getClientBootConfig(initialAppConfigFunctions): BootConfig

Parameters

NameType
initialAppConfigFunctionsInitAppConfig

Returns

BootConfig

Defined in

packages/core/src/boot.ts:190


getInitialImaConfigFunctions

getInitialImaConfigFunctions(): InitImaConfig

Returns

InitImaConfig

Defined in

packages/core/src/boot.ts:166


getInitialPluginConfig

getInitialPluginConfig(): Object

Returns

Object

NameType
plugins{ name: string ; plugin: InitPluginConfig }[]

Defined in

packages/core/src/boot.ts:170


getNamespace

getNamespace(): Namespace

Returns

Namespace

Defined in

packages/core/src/Namespace.ts:125


onLoad

onLoad(): Promise<unknown>

Returns

Promise<unknown>

Defined in

packages/core/src/boot.ts:310


reviveClientApp

reviveClientApp(initialAppConfigFunctions): Promise<UnknownParameters & { app: { bootstrap: Bootstrap ; oc: ObjectContainer } ; bootConfig: BootConfig }>

Parameters

NameType
initialAppConfigFunctionsInitAppConfig

Returns

Promise<UnknownParameters & { app: { bootstrap: Bootstrap ; oc: ObjectContainer } ; bootConfig: BootConfig }>

Defined in

packages/core/src/boot.ts:289


routeClientApp

routeClientApp(app): Promise<void | UnknownParameters>

Parameters

NameType
appObject
app.bootstrapBootstrap
app.ocObjectContainer

Returns

Promise<void | UnknownParameters>

Defined in

packages/core/src/boot.ts:269

+ + \ No newline at end of file diff --git a/api/modules/ima_dev_utils/index.html b/api/modules/ima_dev_utils/index.html index 7b66f7c45d..beb2cfbc00 100644 --- a/api/modules/ima_dev_utils/index.html +++ b/api/modules/ima_dev_utils/index.html @@ -4,26 +4,26 @@ Module: @ima/dev-utils | IMA.js - - + +
-
Skip to main content

Module: @ima/dev-utils

Classes

Interfaces

Type Aliases

ParsedErrorData

Ƭ ParsedErrorData: Object

Type declaration

NameType
column?number
fileUri?string
functionName?string
line?number
message?string
name?string
stack?string

Defined in

cliUtils.ts:13

Variables

COMPILE_ERROR_NEEDLES_RE

Const COMPILE_ERROR_NEEDLES_RE: RegExp[]

Defined in

compileErrorParser.ts:11


RE_SOURCE_MAPPING_URL

Const RE_SOURCE_MAPPING_URL: RegExp

Used to extract source mapping url injected at the end -of a file with generated source maps (in separate file).

Defined in

helpers.ts:10


RE_VALID_FRAME_CHROME

Const RE_VALID_FRAME_CHROME: RegExp

Defined in

helpers.ts:2


RE_VALID_FRAME_FIREFOX

Const RE_VALID_FRAME_FIREFOX: RegExp

Defined in

helpers.ts:3


logger

Const logger: Logger

Create global logger instance

Defined in

logger.ts:172

Functions

createLogger

createLogger(name): Logger

Parameters

NameType
namestring

Returns

Logger

Defined in

logger.ts:175


createSourceFragment

createSourceFragment(line, source, contextLines?): FragmentLine[]

Create fragment of code lines around input line (above and below), created -created from provided source code.

Parameters

NameTypeDefault valueDescription
linenumberundefinedSource code line number, around which you want to created source fragment.
sourcestringundefinedSource file's source code.
contextLines?number4Number of lines to generate, below and after watched line.

Returns

FragmentLine[]

Array of source code lines.

Defined in

sourceFragment.ts:18


extractSourceMappingUrl

extractSourceMappingUrl(fileUri, fileContents): string | null

Extracts sourceMappingURL from the provided file contents. -Based on https://github.com/facebook/create-react-app/blob/main/packages/react-error-overlay/src/utils/getSourceMap.js#L79.

Parameters

NameTypeDescription
fileUristringThe uri of the source file.
fileContentsstringSource file file contents.

Returns

string | null

Defined in

sourceMapUtils.ts:11


formatError

formatError(parsedErrorData, rootDir?, uniqueTracker?): Promise<string>

Formats provided error object into readable format including +

Module: @ima/dev-utils

Classes

Interfaces

Type Aliases

ParsedErrorData

Ƭ ParsedErrorData: Object

Type declaration

NameType
column?number
fileUri?string
functionName?string
line?number
message?string
name?string
stack?string

Defined in

cliUtils.ts:13

Variables

COMPILE_ERROR_NEEDLES_RE

Const COMPILE_ERROR_NEEDLES_RE: RegExp[]

Defined in

compileErrorParser.ts:11


RE_SOURCE_MAPPING_URL

Const RE_SOURCE_MAPPING_URL: RegExp

Used to extract source mapping url injected at the end +of a file with generated source maps (in separate file).

Defined in

helpers.ts:10


RE_VALID_FRAME_CHROME

Const RE_VALID_FRAME_CHROME: RegExp

Defined in

helpers.ts:2


RE_VALID_FRAME_FIREFOX

Const RE_VALID_FRAME_FIREFOX: RegExp

Defined in

helpers.ts:3


logger

Const logger: Logger

Create global logger instance

Defined in

logger.ts:172

Functions

createLogger

createLogger(name): Logger

Parameters

NameType
namestring

Returns

Logger

Defined in

logger.ts:175


createSourceFragment

createSourceFragment(line, source, contextLines?): FragmentLine[]

Create fragment of code lines around input line (above and below), created +created from provided source code.

Parameters

NameTypeDefault valueDescription
linenumberundefinedSource code line number, around which you want to created source fragment.
sourcestringundefinedSource file's source code.
contextLines?number4Number of lines to generate, below and after watched line.

Returns

FragmentLine[]

Array of source code lines.

Defined in

sourceFragment.ts:18


extractSourceMappingUrl

extractSourceMappingUrl(fileUri, fileContents): string | null

Extracts sourceMappingURL from the provided file contents. +Based on https://github.com/facebook/create-react-app/blob/main/packages/react-error-overlay/src/utils/getSourceMap.js#L79.

Parameters

NameTypeDescription
fileUristringThe uri of the source file.
fileContentsstringSource file file contents.

Returns

string | null

Defined in

sourceMapUtils.ts:11


formatError

formatError(parsedErrorData, rootDir?, uniqueTracker?): Promise<string>

Formats provided error object into readable format including the errored source code fragment with line highlight. Works with runtime and compile errors while trying to show all -relevant information that can be extracted from provided object.

Parameters

NameTypeDescription
parsedErrorDataParsedErrorDataParsed error data object obtained from parseError function (or provided directly).
rootDir?stringOptional root directory used to print absolute URLs as relative to the current rootDir.
uniqueTracker?string[]Array of error identifiers to track uniques, if the error matches identifier already included in this array, this function returns empty string.

Returns

Promise<string>

Formatted error output.

Defined in

cliUtils.ts:178


getSource

getSource(fileUri?, line?, column?): Promise<string[] | undefined>

Get source fragment from provided source metadata. +relevant information that can be extracted from provided object.

Parameters

NameTypeDescription
parsedErrorDataParsedErrorDataParsed error data object obtained from parseError function (or provided directly).
rootDir?stringOptional root directory used to print absolute URLs as relative to the current rootDir.
uniqueTracker?string[]Array of error identifiers to track uniques, if the error matches identifier already included in this array, this function returns empty string.

Returns

Promise<string>

Formatted error output.

Defined in

cliUtils.ts:178


getSource

getSource(fileUri?, line?, column?): Promise<string[] | undefined>

Get source fragment from provided source metadata. Optionally it tries to parse original content if -source maps are available.

Parameters

NameTypeDefault valueDescription
fileUri?stringundefinedsource file uri.
line?numberundefinederrored line number.
columnnumber0errored column number.

Returns

Promise<string[] | undefined>

Formatted error lines.

Defined in

cliUtils.ts:33


parseCompileError

parseCompileError(error): CompileError | null

Tries to parse error location from an error. Which can be -either webpack stats error or simple Error object.

Parameters

NameTypeDescription
errorStatsError | Errorwebpack stats object or error instance.

Returns

CompileError | null

Parsed compile error.

Defined in

compileErrorParser.ts:37


parseError

parseError(error, type?): Promise<ParsedErrorData>

Formats provided error object into readable format including +source maps are available.

Parameters

NameTypeDefault valueDescription
fileUri?stringundefinedsource file uri.
line?numberundefinederrored line number.
columnnumber0errored column number.

Returns

Promise<string[] | undefined>

Formatted error lines.

Defined in

cliUtils.ts:33


parseCompileError

parseCompileError(error): CompileError | null

Tries to parse error location from an error. Which can be +either webpack stats error or simple Error object.

Parameters

NameTypeDescription
errorStatsError | Errorwebpack stats object or error instance.

Returns

CompileError | null

Parsed compile error.

Defined in

compileErrorParser.ts:37


parseError

parseError(error, type?): Promise<ParsedErrorData>

Formats provided error object into readable format including the errored source code fragment with line highlight. Works with runtime and compile errors while trying to show all -relevant information that can be extracted from provided object.

Parameters

NameTypeDescription
errorStatsError | Error-
type?"compile" | "runtime"Error type (affects error parsing).

Returns

Promise<ParsedErrorData>

Formatted error output.

Defined in

cliUtils.ts:124


printTime

printTime(): string

Prints current time in HH:MM:SS format.

Returns

string

Defined in

logger.ts:26


resolveErrorType

resolveErrorType(error): "compile" | "runtime"

Parameters

NameType
errorStatsError | Error

Returns

"compile" | "runtime"

Defined in

compileErrorParser.ts:16


time

time(): () => string

Returns time utility function, which when called returns -formatted elapsed time from it's creation.

Returns

fn

Callback to return formatted elapsed time.

▸ (): string

Returns

string

Defined in

logger.ts:16

- - +relevant information that can be extracted from provided object.

Parameters

NameTypeDescription
errorStatsError | Error-
type?"compile" | "runtime"Error type (affects error parsing).

Returns

Promise<ParsedErrorData>

Formatted error output.

Defined in

cliUtils.ts:124


printTime

printTime(): string

Prints current time in HH:MM:SS format.

Returns

string

Defined in

logger.ts:26


resolveErrorType

resolveErrorType(error): "compile" | "runtime"

Parameters

NameType
errorStatsError | Error

Returns

"compile" | "runtime"

Defined in

compileErrorParser.ts:16


time

time(): () => string

Returns time utility function, which when called returns +formatted elapsed time from it's creation.

Returns

fn

Callback to return formatted elapsed time.

▸ (): string

Returns

string

Defined in

logger.ts:16

+ + \ No newline at end of file diff --git a/api/modules/ima_plugin_cli/index.html b/api/modules/ima_plugin_cli/index.html index 0240d4251a..ff48c2403d 100644 --- a/api/modules/ima_plugin_cli/index.html +++ b/api/modules/ima_plugin_cli/index.html @@ -4,12 +4,12 @@ Module: @ima/plugin-cli | IMA.js - - + +
-
Skip to main content

Module: @ima/plugin-cli

Interfaces

Type Aliases

Command

Ƭ Command: "dev" | "link" | "build"

Defined in

types.ts:16


Plugin

Ƭ Plugin: (context: Context) => void | Promise<void>

Type declaration

▸ (context): void | Promise<void>

Parameters
NameType
contextContext
Returns

void | Promise<void>

Defined in

types.ts:69


Transformer

Ƭ Transformer: ({ +

Module: @ima/plugin-cli

Interfaces

Type Aliases

Command

Ƭ Command: "dev" | "link" | "build"

Defined in

types.ts:16


Plugin

Ƭ Plugin: (context: Context) => void | Promise<void>

Type declaration

▸ (context): void | Promise<void>

Parameters
NameType
contextContext
Returns

void | Promise<void>

Defined in

types.ts:69


Transformer

Ƭ Transformer: ({ source, context, }: { context: PipeContext ; source: Source }) => Source | Promise<Source>

Type declaration

▸ ({ @@ -26,8 +26,8 @@ | { source, context, -}.source | Source |

Returns

Source | Promise<Source>

Defined in

types.ts:4


TransformerOptions

Ƭ TransformerOptions: Object

Type declaration

NameType
testRegExp

Defined in

types.ts:11

Variables

clientServerConfig

Const clientServerConfig: ImaPluginConfig

Defined in

utils/configurations.ts:42


defaultConfig

Const defaultConfig: ImaPluginConfig

Defined in

utils/configurations.ts:6


nodeConfig

Const nodeConfig: ImaPluginConfig

Defined in

utils/configurations.ts:70

Functions

preprocessTransformer

preprocessTransformer(options): Transformer

Parameters

NameType
optionsPreprocessTransformerOptions

Returns

Transformer

Defined in

transformers/preprocessTransformer.ts:11


swcTransformer

swcTransformer(options): Transformer

Parameters

NameType
optionsOptions

Returns

Transformer

Defined in

transformers/swcTransformer.ts:59


typescriptDeclarationsPlugin

typescriptDeclarationsPlugin(options): Plugin

Parameters

NameType
optionsTypescriptDeclarationsPluginOptions

Returns

Plugin

Defined in

plugins/typescriptDeclarationsPlugin.ts:28

- - +}.source | Source |

Returns

Source | Promise<Source>

Defined in

types.ts:4


TransformerOptions

Ƭ TransformerOptions: Object

Type declaration

NameType
testRegExp

Defined in

types.ts:11

Variables

clientServerConfig

Const clientServerConfig: ImaPluginConfig

Defined in

utils/configurations.ts:42


defaultConfig

Const defaultConfig: ImaPluginConfig

Defined in

utils/configurations.ts:6


nodeConfig

Const nodeConfig: ImaPluginConfig

Defined in

utils/configurations.ts:70

Functions

preprocessTransformer

preprocessTransformer(options): Transformer

Parameters

NameType
optionsPreprocessTransformerOptions

Returns

Transformer

Defined in

transformers/preprocessTransformer.ts:11


swcTransformer

swcTransformer(options): Transformer

Parameters

NameType
optionsOptions

Returns

Transformer

Defined in

transformers/swcTransformer.ts:59


typescriptDeclarationsPlugin

typescriptDeclarationsPlugin(options): Plugin

Parameters

NameType
optionsTypescriptDeclarationsPluginOptions

Returns

Plugin

Defined in

plugins/typescriptDeclarationsPlugin.ts:28

+ + \ No newline at end of file diff --git a/api/modules/ima_react_page_renderer/index.html b/api/modules/ima_react_page_renderer/index.html index 117c62147f..cc085a94f9 100644 --- a/api/modules/ima_react_page_renderer/index.html +++ b/api/modules/ima_react_page_renderer/index.html @@ -4,32 +4,32 @@ Module: @ima/react-page-renderer | IMA.js - - + +
-
Skip to main content

Module: @ima/react-page-renderer

Classes

Interfaces

Variables

PageContext

Const PageContext: Context<PageContextType>

Defined in

packages/react-page-renderer/src/PageContext.ts:8

Functions

cssClasses

cssClasses(component, classRules, includeComponentClassName): string

Generate a string of CSS classes from the properties of the passed-in +

Module: @ima/react-page-renderer

Classes

Interfaces

Variables

PageContext

Const PageContext: Context<PageContextType>

Defined in

packages/react-page-renderer/src/PageContext.ts:8

Functions

cssClasses

cssClasses(component, classRules, includeComponentClassName): string

Generate a string of CSS classes from the properties of the passed-in object that resolve to true.

Parameters

NameTypeDescription
componentAbstractComponent<unknown, unknown, unknown> | AbstractPureComponent<unknown, unknown, unknown>The component requiring the composition of the CSS class names.
classRulesstring | string[] | { [key: string]: boolean; }CSS classes in a string separated by whitespace, or a map of CSS class names to boolean values. The CSS class name will be included in the result only if the value is true.
includeComponentClassNameboolean-

Returns

string

String of CSS classes that had their property resolved -to true.

Example

this.cssClasses('my-class my-class-modifier', true);

Example

this.cssClasses({
'my-class': true,
'my-class-modifier': this.props.modifier
}, true);

Defined in

packages/react-page-renderer/src/componentHelpers.ts:97


defaultCssClasses

defaultCssClasses(classRules, component?): string

Generate a string of CSS classes from the properties of the passed-in +to true.

Example

this.cssClasses('my-class my-class-modifier', true);

Example

this.cssClasses({
'my-class': true,
'my-class-modifier': this.props.modifier
}, true);

Defined in

packages/react-page-renderer/src/componentHelpers.ts:97


defaultCssClasses

defaultCssClasses(classRules, component?): string

Generate a string of CSS classes from the properties of the passed-in object that resolve to true.

Parameters

NameTypeDescription
classRulesArgumentCSS classes in a string separated by whitespace, or a map of CSS class names to boolean values. The CSS class name will be included in the result only if the value is true.
component?string | ComponentTypeThe component requiring the composition of the CSS class names, if it has the className property set and requires its inclusion this time.

Returns

string

String of CSS classes that had their property resolved -to true.

Defined in

packages/react-page-renderer/src/componentHelpers.ts:122


fire

fire(component, eventTarget, eventName, data?): EventBus

Creates and sends a new IMA.js DOM custom event from the provided component.

Parameters

NameTypeDefault valueDescription
componentAbstractComponent<unknown, unknown, unknown> | AbstractPureComponent<unknown, unknown, unknown>undefinedThe component at which's root element the event will originate.
eventTargetEventTargetundefined-
eventNamestringundefinedThe name of the event.
dataunknownnullData to send within the event.

Returns

EventBus

Defined in

packages/react-page-renderer/src/componentHelpers.ts:147


getUtils

getUtils(props, context): Utils | undefined

Retrieves the view utilities from the component's current context or +to true.

Defined in

packages/react-page-renderer/src/componentHelpers.ts:122


fire

fire(component, eventTarget, eventName, data?): EventBus

Creates and sends a new IMA.js DOM custom event from the provided component.

Parameters

NameTypeDefault valueDescription
componentAbstractComponent<unknown, unknown, unknown> | AbstractPureComponent<unknown, unknown, unknown>undefinedThe component at which's root element the event will originate.
eventTargetEventTargetundefined-
eventNamestringundefinedThe name of the event.
dataunknownnullData to send within the event.

Returns

EventBus

Defined in

packages/react-page-renderer/src/componentHelpers.ts:147


getUtils

getUtils(props, context): Utils | undefined

Retrieves the view utilities from the component's current context or properties (preferring the context).

Parameters

NameTypeDescription
propsObjectThe component's current properties.
props.$Utils?Utils-
contextPageContextTypeThe component's current context.

Returns

Utils | undefined

The retrieved view utilities.

Throws

Error Throw if the view utils cannot be located in the provided -properties nor context.

Defined in

packages/react-page-renderer/src/componentHelpers.ts:19


link(component, name, params): string

Generates an absolute URL using the provided route name (see the

app/config/routes.js file). The provided parameters will replace the placeholders in the route pattern, while the extraneous parameters will be appended to the generated URL's query string.

Parameters

NameTypeDescription
componentAbstractComponent<unknown, unknown, unknown> | AbstractPureComponent<unknown, unknown, unknown>The component requiring the generating of the URL.
namestringThe route name.
paramsObjectRouter parameters and extraneous parameters to add to the URL as a query string.

Returns

string

The generated URL.

Defined in

packages/react-page-renderer/src/componentHelpers.ts:68


listen

listen(component, eventTarget, eventName, listener): EventBus

Registers the provided event listener for execution whenever an IMA.js +properties nor context.

Defined in

packages/react-page-renderer/src/componentHelpers.ts:19


link(component, name, params): string

Generates an absolute URL using the provided route name (see the

app/config/routes.js file). The provided parameters will replace the placeholders in the route pattern, while the extraneous parameters will be appended to the generated URL's query string.

Parameters

NameTypeDescription
componentAbstractComponent<unknown, unknown, unknown> | AbstractPureComponent<unknown, unknown, unknown>The component requiring the generating of the URL.
namestringThe route name.
paramsObjectRouter parameters and extraneous parameters to add to the URL as a query string.

Returns

string

The generated URL.

Defined in

packages/react-page-renderer/src/componentHelpers.ts:68


listen

listen(component, eventTarget, eventName, listener): EventBus

Registers the provided event listener for execution whenever an IMA.js DOM custom event of the specified name occurs at the specified event -target.

Parameters

NameTypeDescription
componentAbstractComponent<unknown, unknown, unknown> | AbstractPureComponent<unknown, unknown, unknown>The component requesting the registration of the event listener.
eventTargetEventTargetThe react component or event target at which the listener should listen for the event.
eventNamestringThe name of the event for which to listen.
listener(event: Event) => voidThe listener for event to register.

Returns

EventBus

Defined in

packages/react-page-renderer/src/componentHelpers.ts:168


localize

localize(component, key, params): string

Returns the localized phrase identified by the specified key. The +target.

Parameters

NameTypeDescription
componentAbstractComponent<unknown, unknown, unknown> | AbstractPureComponent<unknown, unknown, unknown>The component requesting the registration of the event listener.
eventTargetEventTargetThe react component or event target at which the listener should listen for the event.
eventNamestringThe name of the event for which to listen.
listener(event: Event) => voidThe listener for event to register.

Returns

EventBus

Defined in

packages/react-page-renderer/src/componentHelpers.ts:168


localize

localize(component, key, params): string

Returns the localized phrase identified by the specified key. The placeholders in the localization phrase will be replaced by the provided -values.

Parameters

NameTypeDescription
componentAbstractComponent<unknown, unknown, unknown> | AbstractPureComponent<unknown, unknown, unknown>The component requiring the localization.
keyneverLocalization key.
paramsObjectValues for replacing the placeholders in the localization phrase.

Returns

string

Localized phrase.

Defined in

packages/react-page-renderer/src/componentHelpers.ts:47


unlisten

unlisten(component, eventTarget, eventName, listener): EventBus

Deregisters the provided event listener for an IMA.js DOM custom event -of the specified name at the specified event target.

Parameters

NameTypeDescription
componentAbstractComponent<unknown, unknown, unknown> | AbstractPureComponent<unknown, unknown, unknown>The component that requested the registration of the event listener.
eventTargetEventTargetThe react component or event target at which the listener should listen for the event.
eventNamestringThe name of the event for which to listen.
listener(event: Event) => voidThe listener for event to register.

Returns

EventBus

Defined in

packages/react-page-renderer/src/componentHelpers.ts:188


useComponent

useComponent(): useComponentType

Base hook you can use to initialize your component.

Returns object, which gives you access to the same features you would -get in your class component:

  • Utility methods: cssClasses, localize, link, fire, listen, unlisten.
  • Objects: utils (=== ComponentUtils).

Returns

useComponentType

Object containing context data and utility methods.

Example

const { utils, cssClasses } = useComponent();

Defined in

packages/react-page-renderer/src/hooks/component.ts:52


useComponentUtils

useComponentUtils(): Utils

Provides direct access to ComponentUtils.

Returns

Utils

Component utils.

Example

const utils = useComponentUtils();

Defined in

packages/react-page-renderer/src/hooks/componentUtils.ts:13


useCssClasses

useCssClasses(): typeof defaultCssClasses

Provides direct access to CssClasses.

Returns

typeof defaultCssClasses

CssClasses function.

Example

const cssClasses = useCssClasses();

Defined in

packages/react-page-renderer/src/hooks/cssClasses.ts:14


useDispatcher

useDispatcher<E>(event?, listener?): useDispatcherType

Hook to register listeners for dispatcher events. Returns +values.

Parameters

NameTypeDescription
componentAbstractComponent<unknown, unknown, unknown> | AbstractPureComponent<unknown, unknown, unknown>The component requiring the localization.
keyneverLocalization key.
paramsObjectValues for replacing the placeholders in the localization phrase.

Returns

string

Localized phrase.

Defined in

packages/react-page-renderer/src/componentHelpers.ts:47


unlisten

unlisten(component, eventTarget, eventName, listener): EventBus

Deregisters the provided event listener for an IMA.js DOM custom event +of the specified name at the specified event target.

Parameters

NameTypeDescription
componentAbstractComponent<unknown, unknown, unknown> | AbstractPureComponent<unknown, unknown, unknown>The component that requested the registration of the event listener.
eventTargetEventTargetThe react component or event target at which the listener should listen for the event.
eventNamestringThe name of the event for which to listen.
listener(event: Event) => voidThe listener for event to register.

Returns

EventBus

Defined in

packages/react-page-renderer/src/componentHelpers.ts:188


useComponent

useComponent(): useComponentType

Base hook you can use to initialize your component.

Returns object, which gives you access to the same features you would +get in your class component:

  • Utility methods: cssClasses, localize, link, fire, listen, unlisten.
  • Objects: utils (=== ComponentUtils).

Returns

useComponentType

Object containing context data and utility methods.

Example

const { utils, cssClasses } = useComponent();

Defined in

packages/react-page-renderer/src/hooks/component.ts:52


useComponentUtils

useComponentUtils(): Utils

Provides direct access to ComponentUtils.

Returns

Utils

Component utils.

Example

const utils = useComponentUtils();

Defined in

packages/react-page-renderer/src/hooks/componentUtils.ts:13


useCssClasses

useCssClasses(): typeof defaultCssClasses

Provides direct access to CssClasses.

Returns

typeof defaultCssClasses

CssClasses function.

Example

const cssClasses = useCssClasses();

Defined in

packages/react-page-renderer/src/hooks/cssClasses.ts:14


useDispatcher

useDispatcher<E>(event?, listener?): useDispatcherType

Hook to register listeners for dispatcher events. Returns decorated dispatcher fire function. Omitting hook params doesn't register any events to the dispatcher but provides -access to the dispatcher's fire method.

Type parameters

NameType
Eextends keyof DispatcherEventsMap

Parameters

NameTypeDescription
event?EEvent name.
listener?DispatcherListener<DispatcherEventsMap[E]>Callback to register to dispatcher.

Returns

useDispatcherType

Dispatcher fire method.

Example

const { fire } = useDispatcher(
'dispatcher-event',
() => {}
);

// Access $Dispatcher's.fire method without registering listener
const { fire } = useDispatcher();

// Firing custom event
useEffect(() => {
fire('another-event', { data: {} })
});

Defined in

packages/react-page-renderer/src/hooks/dispatcher.ts:39

useDispatcher(event?, listener?): useDispatcherType

Parameters

NameType
event?string
listener?DispatcherListener<any>

Returns

useDispatcherType

Defined in

packages/react-page-renderer/src/hooks/dispatcher.ts:43


useEventBus

useEventBus(eventTarget?, eventName?, listener?): useEventBusType

Hook to register listeners for dispatcher events. Returns +access to the dispatcher's fire method.

Type parameters

NameType
Eextends keyof DispatcherEventsMap

Parameters

NameTypeDescription
event?EEvent name.
listener?DispatcherListener<DispatcherEventsMap[E]>Callback to register to dispatcher.

Returns

useDispatcherType

Dispatcher fire method.

Example

const { fire } = useDispatcher(
'dispatcher-event',
() => {}
);

// Access $Dispatcher's.fire method without registering listener
const { fire } = useDispatcher();

// Firing custom event
useEffect(() => {
fire('another-event', { data: {} })
});

Defined in

packages/react-page-renderer/src/hooks/dispatcher.ts:39

useDispatcher(event?, listener?): useDispatcherType

Parameters

NameType
event?string
listener?DispatcherListener<any>

Returns

useDispatcherType

Defined in

packages/react-page-renderer/src/hooks/dispatcher.ts:43


useEventBus

useEventBus(eventTarget?, eventName?, listener?): useEventBusType

Hook to register listeners for dispatcher events. Returns decorated dispatcher fire function. Omitting hook params doesn't register any events to the dispatcher but provides -access to the dispatcher's fire method.

Parameters

NameType
eventTarget?null | EventTarget
eventName?string
listener?EventBusListener

Returns

useEventBusType

Dispatcher fire method.

Example

const { fire } = useEventBus(
componentRef.current,
'event',
() => {}
);

Defined in

packages/react-page-renderer/src/hooks/eventBus.ts:27


useLink(): Router["link"]

Provides direct access to Router link function.

Returns

Router["link"]

URL to linked path.

Example

const link = useLink();

Defined in

packages/react-page-renderer/src/hooks/link.ts:14


useLocalize

useLocalize(): Dictionary["get"]

Provides direct access to Dictionary.get function.

Returns

Dictionary["get"]

Localized string.

Example

const localize = useLocalize();

Defined in

packages/react-page-renderer/src/hooks/localize.ts:14


useOnce

useOnce(callback): void

"Constructor" like hook, which makes sure, that provided callback -is called only once during component's lifecycle.

Parameters

NameType
callback() => void

Returns

void

Example

useOnce(() => {
oneTimeAction();
});

Defined in

packages/react-page-renderer/src/hooks/component.ts:28


usePageContext

usePageContext(): PageContextType

Provides direct access to IMA Page context.

Returns

PageContextType

App page context.

Example

const pageContext = usePageContext();

Defined in

packages/react-page-renderer/src/hooks/pageContext.ts:14


useSettings

useSettings<T>(selector?): T | undefined

IMA $Settings access provider with optional selector.

Type parameters

NameType
Tany

Parameters

NameTypeDescription
selector?stringOptional path selector.

Returns

T | undefined

Settings value or undefined.

Example

const settings = useSettings();
console.log(settings.$Cache.enabled);

// Using settings selector
const { scripts, documentView } = useSettings('$Page.$Render');
const esScripts = useSettings('$Page.$Render.esScripts');

Defined in

packages/react-page-renderer/src/hooks/settings.ts:19


useWindowEvent

useWindowEvent<T, K>(eventTarget, event, listener, useCapture?): useWindowEventType

Hook for binding window events using IMA window API.

Type parameters

NameType
Textends WindowEventTargets
Kextends string | number | symbol

Parameters

NameTypeDescription
eventTargetTOptional event target, if left blank it defaults to current window (=> can be omitted in most use cases).
eventKEvent name.
listener(event: WindowEventTargetsMap<T>[K]) => void-
useCapture?boolean | EventListenerOptionsUse capture instead of bubbling (default).

Returns

useWindowEventType

window object and utility methods.

Example

// Using window as event target
const { dispatchEvent, createCustomEvent } = useWindowEvent(
window,
'custom-event',
() => windowEventCallback(a, b)
);

// Using custom event target
const { dispatchEvent } = useWindowEvent(
window.getElementById('page'),
'click',
() => windowEventCallback(a, b),
false,
);

// Dispatching custom event
useEffect(() => {
dispatchEvent(
createCustomEvent('custom-event'),
{ data: {} }
);
});

Defined in

packages/react-page-renderer/src/hooks/windowEvent.ts:50

useWindowEvent<T, E>(eventTarget, event, listener, useCapture?): useWindowEventType

Type parameters

NameType
Textends EventTarget
Eextends Event = Event

Parameters

NameType
eventTargetT
eventstring
listener(event: E) => void
useCapture?boolean | EventListenerOptions

Returns

useWindowEventType

Defined in

packages/react-page-renderer/src/hooks/windowEvent.ts:59

- - +access to the dispatcher's fire method.

Parameters

NameType
eventTarget?null | EventTarget
eventName?string
listener?EventBusListener

Returns

useEventBusType

Dispatcher fire method.

Example

const { fire } = useEventBus(
componentRef.current,
'event',
() => {}
);

Defined in

packages/react-page-renderer/src/hooks/eventBus.ts:27


useLink(): Router["link"]

Provides direct access to Router link function.

Returns

Router["link"]

URL to linked path.

Example

const link = useLink();

Defined in

packages/react-page-renderer/src/hooks/link.ts:14


useLocalize

useLocalize(): Dictionary["get"]

Provides direct access to Dictionary.get function.

Returns

Dictionary["get"]

Localized string.

Example

const localize = useLocalize();

Defined in

packages/react-page-renderer/src/hooks/localize.ts:14


useOnce

useOnce(callback): void

"Constructor" like hook, which makes sure, that provided callback +is called only once during component's lifecycle.

Parameters

NameType
callback() => void

Returns

void

Example

useOnce(() => {
oneTimeAction();
});

Defined in

packages/react-page-renderer/src/hooks/component.ts:28


usePageContext

usePageContext(): PageContextType

Provides direct access to IMA Page context.

Returns

PageContextType

App page context.

Example

const pageContext = usePageContext();

Defined in

packages/react-page-renderer/src/hooks/pageContext.ts:14


useSettings

useSettings<T>(selector?): T | undefined

IMA $Settings access provider with optional selector.

Type parameters

NameType
Tany

Parameters

NameTypeDescription
selector?stringOptional path selector.

Returns

T | undefined

Settings value or undefined.

Example

const settings = useSettings();
console.log(settings.$Cache.enabled);

// Using settings selector
const { scripts, documentView } = useSettings('$Page.$Render');
const esScripts = useSettings('$Page.$Render.esScripts');

Defined in

packages/react-page-renderer/src/hooks/settings.ts:19


useWindowEvent

useWindowEvent<T, K>(eventTarget, event, listener, useCapture?): useWindowEventType

Hook for binding window events using IMA window API.

Type parameters

NameType
Textends WindowEventTargets
Kextends string | number | symbol

Parameters

NameTypeDescription
eventTargetTOptional event target, if left blank it defaults to current window (=> can be omitted in most use cases).
eventKEvent name.
listener(event: WindowEventTargetsMap<T>[K]) => void-
useCapture?boolean | EventListenerOptionsUse capture instead of bubbling (default).

Returns

useWindowEventType

window object and utility methods.

Example

// Using window as event target
const { dispatchEvent, createCustomEvent } = useWindowEvent(
window,
'custom-event',
() => windowEventCallback(a, b)
);

// Using custom event target
const { dispatchEvent } = useWindowEvent(
window.getElementById('page'),
'click',
() => windowEventCallback(a, b),
false,
);

// Dispatching custom event
useEffect(() => {
dispatchEvent(
createCustomEvent('custom-event'),
{ data: {} }
);
});

Defined in

packages/react-page-renderer/src/hooks/windowEvent.ts:50

useWindowEvent<T, E>(eventTarget, event, listener, useCapture?): useWindowEventType

Type parameters

NameType
Textends EventTarget
Eextends Event = Event

Parameters

NameType
eventTargetT
eventstring
listener(event: E) => void
useCapture?boolean | EventListenerOptions

Returns

useWindowEventType

Defined in

packages/react-page-renderer/src/hooks/windowEvent.ts:59

+ + \ No newline at end of file diff --git a/assets/js/01fc3ad9.48e89701.js b/assets/js/01fc3ad9.f7b373ff.js similarity index 95% rename from assets/js/01fc3ad9.48e89701.js rename to assets/js/01fc3ad9.f7b373ff.js index 2e6ca571d3..e0017c9383 100644 --- a/assets/js/01fc3ad9.48e89701.js +++ b/assets/js/01fc3ad9.f7b373ff.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[7300],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=u(n),m=a,f=c["".concat(s,".").concat(m)]||c[m]||d[m]||o;return n?r.createElement(f,i(i({ref:t},p),{},{components:n})):r.createElement(f,i({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>u});var r=n(5773),a=(n(7294),n(3905));const o={id:"ima_core.RouterEvents",title:"Enumeration: RouterEvents",sidebar_label:"@ima/core.RouterEvents",custom_edit_url:null},i=void 0,l={unversionedId:"api/enums/ima_core.RouterEvents",id:"api/enums/ima_core.RouterEvents",title:"Enumeration: RouterEvents",description:"@ima/core.RouterEvents",source:"@site/../docs/api/enums/ima_core.RouterEvents.md",sourceDirName:"api/enums",slug:"/api/enums/ima_core.RouterEvents",permalink:"/api/enums/ima_core.RouterEvents",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.RouterEvents",title:"Enumeration: RouterEvents",sidebar_label:"@ima/core.RouterEvents",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.RouteNames",permalink:"/api/enums/ima_core.RouteNames"},next:{title:"@ima/core.StateEvents",permalink:"/api/enums/ima_core.StateEvents"}},s={},u=[{value:"Enumeration Members",id:"enumeration-members",level:2},{value:"AFTER_HANDLE_ROUTE",id:"after_handle_route",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"AFTER_LOADING_ASYNC_ROUTE",id:"after_loading_async_route",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"BEFORE_HANDLE_ROUTE",id:"before_handle_route",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"BEFORE_LOADING_ASYNC_ROUTE",id:"before_loading_async_route",level:3},{value:"Defined in",id:"defined-in-3",level:4}],p={toc:u},c="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".RouterEvents"),(0,a.kt)("p",null,"Events constants, which is firing to app."),(0,a.kt)("h2",{id:"enumeration-members"},"Enumeration Members"),(0,a.kt)("h3",{id:"after_handle_route"},"AFTER","_","HANDLE","_","ROUTE"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"AFTER","_","HANDLE","_","ROUTE")," = ",(0,a.kt)("inlineCode",{parentName:"p"},'"$IMA.$Router.afterHandleRoute"')),(0,a.kt)("p",null,"Router fire event ",(0,a.kt)("inlineCode",{parentName:"p"},"$IMA.$Router.afterHandleRoute")," after page\nmanager handle the route. Event's data contain\n",(0,a.kt)("inlineCode",{parentName:"p"},"{response: Object, params: Object"),",\nroute: ima.core.router.AbstractRoute, path: string, options: Object}}.\nThe ",(0,a.kt)("inlineCode",{parentName:"p"},"response")," is page render result. The ",(0,a.kt)("inlineCode",{parentName:"p"},"path")," is current\npath, the ",(0,a.kt)("inlineCode",{parentName:"p"},"params")," are params extracted from path, the\n",(0,a.kt)("inlineCode",{parentName:"p"},"route")," is handle route for path and the ",(0,a.kt)("inlineCode",{parentName:"p"},"options")," is route\nadditional options."),(0,a.kt)("h4",{id:"defined-in"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/RouterEvents.ts#L26"},"packages/core/src/router/RouterEvents.ts:26")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"after_loading_async_route"},"AFTER","_","LOADING","_","ASYNC","_","ROUTE"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"AFTER","_","LOADING","_","ASYNC","_","ROUTE")," = ",(0,a.kt)("inlineCode",{parentName:"p"},'"$IMA.$Router.afterLoadingAsyncRoute"')),(0,a.kt)("p",null,"Event fired when router finishes loading of async view\nand controller. If both are sync this is never fired."),(0,a.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/RouterEvents.ts#L38"},"packages/core/src/router/RouterEvents.ts:38")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"before_handle_route"},"BEFORE","_","HANDLE","_","ROUTE"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"BEFORE","_","HANDLE","_","ROUTE")," = ",(0,a.kt)("inlineCode",{parentName:"p"},'"$IMA.$Router.beforeHandleRoute"')),(0,a.kt)("p",null,"Router fire event ",(0,a.kt)("inlineCode",{parentName:"p"},"$IMA.$Router.beforeHandleRoute")," before page\nmanager handle the route. Event's data contain\n",(0,a.kt)("inlineCode",{parentName:"p"},"{ params: Object"),", route: ima.core.router.AbstractRoute,\npath: string, options: Object}}. The ",(0,a.kt)("inlineCode",{parentName:"p"},"path")," is current\npath, the ",(0,a.kt)("inlineCode",{parentName:"p"},"params")," are params extracted from path, the\n",(0,a.kt)("inlineCode",{parentName:"p"},"route")," is handle route for path and the ",(0,a.kt)("inlineCode",{parentName:"p"},"options")," is route\nadditional options."),(0,a.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/RouterEvents.ts#L14"},"packages/core/src/router/RouterEvents.ts:14")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"before_loading_async_route"},"BEFORE","_","LOADING","_","ASYNC","_","ROUTE"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"BEFORE","_","LOADING","_","ASYNC","_","ROUTE")," = ",(0,a.kt)("inlineCode",{parentName:"p"},'"$IMA.$Router.beforeLoadingAsyncRoute"')),(0,a.kt)("p",null,"Fired right before loading view and controller when either\nview or controller is async (or both)."),(0,a.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/RouterEvents.ts#L32"},"packages/core/src/router/RouterEvents.ts:32")))}d.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[7300],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=u(n),m=a,f=c["".concat(s,".").concat(m)]||c[m]||d[m]||o;return n?r.createElement(f,i(i({ref:t},p),{},{components:n})):r.createElement(f,i({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>u});var r=n(5773),a=(n(7294),n(3905));const o={id:"ima_core.RouterEvents",title:"Enumeration: RouterEvents",sidebar_label:"@ima/core.RouterEvents",custom_edit_url:null},i=void 0,l={unversionedId:"api/enums/ima_core.RouterEvents",id:"api/enums/ima_core.RouterEvents",title:"Enumeration: RouterEvents",description:"@ima/core.RouterEvents",source:"@site/../docs/api/enums/ima_core.RouterEvents.md",sourceDirName:"api/enums",slug:"/api/enums/ima_core.RouterEvents",permalink:"/api/enums/ima_core.RouterEvents",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.RouterEvents",title:"Enumeration: RouterEvents",sidebar_label:"@ima/core.RouterEvents",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.RouteNames",permalink:"/api/enums/ima_core.RouteNames"},next:{title:"@ima/core.StateEvents",permalink:"/api/enums/ima_core.StateEvents"}},s={},u=[{value:"Enumeration Members",id:"enumeration-members",level:2},{value:"AFTER_HANDLE_ROUTE",id:"after_handle_route",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"AFTER_LOADING_ASYNC_ROUTE",id:"after_loading_async_route",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"BEFORE_HANDLE_ROUTE",id:"before_handle_route",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"BEFORE_LOADING_ASYNC_ROUTE",id:"before_loading_async_route",level:3},{value:"Defined in",id:"defined-in-3",level:4}],p={toc:u},c="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".RouterEvents"),(0,a.kt)("p",null,"Events constants, which is firing to app."),(0,a.kt)("h2",{id:"enumeration-members"},"Enumeration Members"),(0,a.kt)("h3",{id:"after_handle_route"},"AFTER","_","HANDLE","_","ROUTE"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"AFTER","_","HANDLE","_","ROUTE")," = ",(0,a.kt)("inlineCode",{parentName:"p"},'"$IMA.$Router.afterHandleRoute"')),(0,a.kt)("p",null,"Router fire event ",(0,a.kt)("inlineCode",{parentName:"p"},"$IMA.$Router.afterHandleRoute")," after page\nmanager handle the route. Event's data contain\n",(0,a.kt)("inlineCode",{parentName:"p"},"{response: Object, params: Object"),",\nroute: ima.core.router.AbstractRoute, path: string, options: Object}}.\nThe ",(0,a.kt)("inlineCode",{parentName:"p"},"response")," is page render result. The ",(0,a.kt)("inlineCode",{parentName:"p"},"path")," is current\npath, the ",(0,a.kt)("inlineCode",{parentName:"p"},"params")," are params extracted from path, the\n",(0,a.kt)("inlineCode",{parentName:"p"},"route")," is handle route for path and the ",(0,a.kt)("inlineCode",{parentName:"p"},"options")," is route\nadditional options."),(0,a.kt)("h4",{id:"defined-in"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/RouterEvents.ts#L26"},"packages/core/src/router/RouterEvents.ts:26")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"after_loading_async_route"},"AFTER","_","LOADING","_","ASYNC","_","ROUTE"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"AFTER","_","LOADING","_","ASYNC","_","ROUTE")," = ",(0,a.kt)("inlineCode",{parentName:"p"},'"$IMA.$Router.afterLoadingAsyncRoute"')),(0,a.kt)("p",null,"Event fired when router finishes loading of async view\nand controller. If both are sync this is never fired."),(0,a.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/RouterEvents.ts#L38"},"packages/core/src/router/RouterEvents.ts:38")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"before_handle_route"},"BEFORE","_","HANDLE","_","ROUTE"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"BEFORE","_","HANDLE","_","ROUTE")," = ",(0,a.kt)("inlineCode",{parentName:"p"},'"$IMA.$Router.beforeHandleRoute"')),(0,a.kt)("p",null,"Router fire event ",(0,a.kt)("inlineCode",{parentName:"p"},"$IMA.$Router.beforeHandleRoute")," before page\nmanager handle the route. Event's data contain\n",(0,a.kt)("inlineCode",{parentName:"p"},"{ params: Object"),", route: ima.core.router.AbstractRoute,\npath: string, options: Object}}. The ",(0,a.kt)("inlineCode",{parentName:"p"},"path")," is current\npath, the ",(0,a.kt)("inlineCode",{parentName:"p"},"params")," are params extracted from path, the\n",(0,a.kt)("inlineCode",{parentName:"p"},"route")," is handle route for path and the ",(0,a.kt)("inlineCode",{parentName:"p"},"options")," is route\nadditional options."),(0,a.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/RouterEvents.ts#L14"},"packages/core/src/router/RouterEvents.ts:14")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"before_loading_async_route"},"BEFORE","_","LOADING","_","ASYNC","_","ROUTE"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"BEFORE","_","LOADING","_","ASYNC","_","ROUTE")," = ",(0,a.kt)("inlineCode",{parentName:"p"},'"$IMA.$Router.beforeLoadingAsyncRoute"')),(0,a.kt)("p",null,"Fired right before loading view and controller when either\nview or controller is async (or both)."),(0,a.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/RouterEvents.ts#L32"},"packages/core/src/router/RouterEvents.ts:32")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/046a2c8d.83c92fd3.js b/assets/js/046a2c8d.83c92fd3.js deleted file mode 100644 index 749a71c401..0000000000 --- a/assets/js/046a2c8d.83c92fd3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[2707],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>g});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),p=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),u=p(n),m=r,g=u["".concat(l,".").concat(m)]||u[m]||d[m]||i;return n?a.createElement(g,s(s({ref:t},c),{},{components:n})):a.createElement(g,s({ref:t},c))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,s=new Array(i);s[0]=m;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[u]="string"==typeof e?e:r,s[1]=o;for(var p=2;p{n.d(t,{Z:()=>s});var a=n(7294),r=n(8944);const i={tabItem:"tabItem_Ymn6"};function s(e){let{children:t,hidden:n,className:s}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,s),hidden:n},t)}},6745:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(5773),r=n(7294),i=n(8944),s=n(2466),o=n(3620),l=n(1980),p=n(7392),c=n(12);function u(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??u(n);return function(e){const t=(0,p.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function g(e){let{queryString:t=!1,groupId:n}=e;const a=(0,o.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,l._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function y(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,i=d(e),[s,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[l,p]=g({queryString:n,groupId:a}),[u,y]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:a}),f=(()=>{const e=l??u;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{f&&o(f)}),[f]);return{selectedValue:s,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);o(e),p(e),y(e)}),[p,y,i]),tabValues:i}}var f=n(2389);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function h(e){let{className:t,block:n,selectedValue:o,selectValue:l,tabValues:p}=e;const c=[],{blockElementScrollPositionUntilNextRender:u}=(0,s.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),a=p[n].value;a!==o&&(u(t),l(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},p.map((e=>{let{value:t,label:n,attributes:s}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},s,{className:(0,i.Z)("tabs__item",k.tabItem,s?.className,{"tabs__item--active":o===t})}),n??t)})))}function b(e){let{lazy:t,children:n,selectedValue:a}=e;const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=y(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",k.tabList)},r.createElement(h,(0,a.Z)({},e,t)),r.createElement(b,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(v,(0,a.Z)({key:String(t)},e))}},8789:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>g,frontMatter:()=>o,metadata:()=>p,toc:()=>u});var a=n(5773),r=(n(7294),n(3905)),i=n(6745),s=n(1683);const o={title:"TypeScript",description:"Basic features > TypeScript"},l=void 0,p={unversionedId:"basic-features/typescript",id:"basic-features/typescript",title:"TypeScript",description:"Basic features > TypeScript",source:"@site/../docs/basic-features/typescript.md",sourceDirName:"basic-features",slug:"/basic-features/typescript",permalink:"/basic-features/typescript",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/basic-features/typescript.md",tags:[],version:"current",lastUpdatedBy:"Filip Satek",lastUpdatedAt:1734590310,formattedLastUpdatedAt:"Dec 19, 2024",frontMatter:{title:"TypeScript",description:"Basic features > TypeScript"},sidebar:"docs",previous:{title:"Error Handling",permalink:"/basic-features/error-handling"},next:{title:"Testing",permalink:"/basic-features/testing"}},c={},u=[{value:"tsconfig.json",id:"tsconfigjson",level:2},{value:"ima-env.d.ts",id:"ima-envdts",level:3},{value:"create-ima-app support",id:"create-ima-app-support",level:2},{value:"Controller generic types",id:"controller-generic-types",level:2},{value:"Extending existing interfaces",id:"extending-existing-interfaces",level:2},{value:"Extending Utils",id:"extending-utils",level:3},{value:"Extending ObjectContainer",id:"extending-objectcontainer",level:3},{value:"Extending Settings",id:"extending-settings",level:3},{value:"Dictionary localization keys",id:"dictionary-localization-keys",level:2}],d={toc:u},m="wrapper";function g(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Since IMA.js v18 we provide ",(0,r.kt)("strong",{parentName:"p"},"support for Typescript in your application code")," with proper type declarations from the core packages."),(0,r.kt)("p",null,"To enable TypeScript in your project, first you need to add ",(0,r.kt)("inlineCode",{parentName:"p"},"typescript")," to your app dependencies:"),(0,r.kt)(i.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,r.kt)(s.Z,{value:"npm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm i -D typescript\n"))),(0,r.kt)(s.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"yarn add --dev typescript\n"))),(0,r.kt)(s.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"pnpm add -D typescript\n")))),(0,r.kt)("h2",{id:"tsconfigjson"},"tsconfig.json"),(0,r.kt)("p",null,"Now create ",(0,r.kt)("inlineCode",{parentName:"p"},"tsconfig.json")," file (that may look something like this):"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json",metastring:"title=./tsconfig.json",title:"./tsconfig.json"},'{\n "compilerOptions": {\n "allowJs": true,\n "target": "ES2022",\n "lib": [\n "ES2022",\n "DOM",\n "DOM.Iterable"\n ],\n "module": "ES2022",\n "moduleResolution": "Node16",\n "strict": true,\n "resolveJsonModule": true,\n "jsx": "react-jsx",\n "baseUrl": ".",\n "outDir": "./build/ts-cache",\n "paths": {\n "app/*": [\n "app/*"\n ],\n }\n },\n "include": ["./app/**/*", "./build/tmp/types/**/*"],\n "exclude": ["./**/__tests__"]\n}\n')),(0,r.kt)("p",null,"When CLI detects existence of the ",(0,r.kt)("inlineCode",{parentName:"p"},"tsconfig.json")," file, it automatically starts ",(0,r.kt)("strong",{parentName:"p"},"type checking")," and ",(0,r.kt)("strong",{parentName:"p"},"compiling")," files with ",(0,r.kt)("inlineCode",{parentName:"p"},"*.ts")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"*.tsx")," extensions."),(0,r.kt)("p",null,"Keep in mind that the code is still compiled using ",(0,r.kt)("a",{parentName:"p",href:"https://swc.rs/"},"swc"),", the same way JS code is. This means that certain settings in ",(0,r.kt)("inlineCode",{parentName:"p"},"tsconfig.json")," only applies to type checking (like ",(0,r.kt)("inlineCode",{parentName:"p"},"target"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"moduleResolution"),", etc.), but compilation uses it's own settings to match the JS code."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"You will also probably need to install additional ",(0,r.kt)("inlineCode",{parentName:"p"},"@types/*")," type definition libs to ensure proper support, like react types:"),(0,r.kt)(i.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,r.kt)(s.Z,{value:"npm",mdxType:"TabItem"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm i -D @types/react @types/react-dom\n"))),(0,r.kt)(s.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"yarn add --dev @types/react @types/react-dom\n"))),(0,r.kt)(s.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"pnpm add -D @types/react @types/react-dom\n"))))),(0,r.kt)("h3",{id:"ima-envdts"},"ima-env.d.ts"),(0,r.kt)("p",null,"Additionally we recommend creating a new ",(0,r.kt)("inlineCode",{parentName:"p"},"ima-env.d.ts")," file in root of your ",(0,r.kt)("inlineCode",{parentName:"p"},"./app")," folder with following contents:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts",metastring:"title=./app/ima-env.d.ts",title:"./app/ima-env.d.ts"},'/// \n')),(0,r.kt)("p",null,"This adds proper types support for webpack specific imports like images and other files."),(0,r.kt)("h2",{id:"create-ima-app-support"},(0,r.kt)("inlineCode",{parentName:"h2"},"create-ima-app")," support"),(0,r.kt)("p",null,"You can also easily create a typescript base IMA.js application using ",(0,r.kt)("inlineCode",{parentName:"p"},"--typescript")," cli argument when running ",(0,r.kt)("inlineCode",{parentName:"p"},"create-ima-app")," command:"),(0,r.kt)(i.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,r.kt)(s.Z,{value:"npm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx create-ima-app ~/Desktop/ima-ts --typescript\n"))),(0,r.kt)(s.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx create-ima-app ~/Desktop/ima-ts --typescript\n"))),(0,r.kt)(s.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx create-ima-app ~/Desktop/ima-ts --typescript\n")))),(0,r.kt)("h2",{id:"controller-generic-types"},"Controller generic types"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractController")," class follows similar principles used in React ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractComponent")," type. There are 3 generic types you can define on the class definition itself."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts",metastring:"title=AbstractController.ts",title:"AbstractController.ts"},"export class AbstractController<\n S extends PageState = {},\n R extends RouteParams = {},\n SS extends S = S\n> extends Controller;\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"S")," - Use to define shape of your controller managed state."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"R")," - Use to define controller's route route params that are extracted to ",(0,r.kt)("inlineCode",{parentName:"li"},"this.params"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"SS")," - Defaults to ",(0,r.kt)("inlineCode",{parentName:"li"},"S"),", however when you are using any extensions in your controller, that have their own state, you can merge those state types in this generic value, to have proper type support for ",(0,r.kt)("inlineCode",{parentName:"li"},"this.getState()")," method (this will now include all state keys, including ones used in extensions).")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts",metastring:"title=HomeController.ts",title:"HomeController.ts"},"import { TestExtension, GalleryExtensionState } from './GalleryExtension';\n\nexport type HomeControllerState = {\n cards: Promise;\n message: string;\n name: string;\n};\n\nexport class HomeController extends AbstractController<\n HomeControllerState,\n { detailId?: string },\n HomeControllerState & GalleryExtensionState\n>{\n static $extensions?: Dependencies> = [GalleryExtension];\n\n load(): HomeControllerState {\n const cardsPromise = this.#httpAgent\n .get('http://localhost:3001/static/static/public/cards.json')\n .then(response => response.body);\n\n // `state` contains all merged types from `SS` generic value.\n const state = this.getState();\n\n return {\n message: 'test',\n cards: cardsPromise,\n name: 'nam',\n };\n }\n}\n")),(0,r.kt)("h2",{id:"extending-existing-interfaces"},"Extending existing interfaces"),(0,r.kt)("p",null,"Since you can extend certain features like ",(0,r.kt)("inlineCode",{parentName:"p"},"ComponentUtils")," or settings from within your application or through plugins, and in order to provide type checking for these, we are using specific interfaces that you can extend using ",(0,r.kt)("a",{parentName:"p",href:"https://www.typescriptlang.org/docs/handbook/declaration-merging.html"},"Declaration Merging")," feature."),(0,r.kt)("p",null,"This ensures (when used correctly), that you always have correct static types when using these interfaces, even when they are extended in multiple places."),(0,r.kt)("h3",{id:"extending-utils"},"Extending ",(0,r.kt)("inlineCode",{parentName:"h3"},"Utils")),(0,r.kt)("p",null,"When using component utils, in addition to registering your classes using ",(0,r.kt)("inlineCode",{parentName:"p"},"ComponentUtils")," helper, make sure to also extend ",(0,r.kt)("inlineCode",{parentName:"p"},"Utils")," interface. This adds autocomplete and typechecking to ",(0,r.kt)("inlineCode",{parentName:"p"},"this.utils()")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"useComponentUtils")," in your components."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts",metastring:"title=./app/config/bind.ts",title:"./app/config/bind.ts"},"declare module '@ima/core' {\n interface Utils {\n $CssClasses: typeof defaultCssClasses;\n }\n}\n\nexport const initBindApp: InitBindFunction = (ns, oc) => {\n oc.get(ComponentUtils).register({\n $CssClasses: '$CssClasses',\n });\n};\n")),(0,r.kt)("h3",{id:"extending-objectcontainer"},"Extending ",(0,r.kt)("inlineCode",{parentName:"h3"},"ObjectContainer")),(0,r.kt)("p",null,"Same goes for defining string aliases in Object container. This adds proper type checking to dependencies definition and ",(0,r.kt)("inlineCode",{parentName:"p"},"oc.get")," autocomplete."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts",metastring:"title=./app/config/bind.ts",title:"./app/config/bind.ts"},"declare module '@ima/core' {\n interface OCAliasMap {\n $CssClasses: () => typeof cssClassNameProcessor;\n $PageRendererFactory: PageRendererFactory;\n API_KEY: string;\n }\n}\n\nexport const initBindApp: InitBindFunction = (ns, oc) => {\n oc.bind('$CssClasses', function () { return cssClassNameProcessor; });\n oc.bind('$PageRendererFactory', PageRendererFactory);\n oc.constant('API_KEY', '14fasdf');\n};\n")),(0,r.kt)("h3",{id:"extending-settings"},"Extending ",(0,r.kt)("inlineCode",{parentName:"h3"},"Settings")),(0,r.kt)("p",null,"This makes sure you don't have any missing or additional fields in your app settings. Other environments than ",(0,r.kt)("inlineCode",{parentName:"p"},"prod")," have all fields made optional, since they are deeply merged with the ",(0,r.kt)("inlineCode",{parentName:"p"},"prod")," settings."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Use ",(0,r.kt)("inlineCode",{parentName:"p"},"?:")," for settings with default values. This applies mostly to plugins.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts",metastring:"title=./app/config/settings.ts",title:"./app/config/settings.ts"},"declare module '@ima/core' {\n interface Settings {\n links: Record<'documentation' | 'tutorial' | 'plugins' | 'api', string>;\n }\n}\n\nexport const initSettings: InitSettingsFunction = (ns, oc, config) => {\n return {\n prod: {\n links: {\n documentation: 'https://imajs.io/docs',\n api: 'https://imajs.io/api',\n },\n }\n }\n}\n\n")),(0,r.kt)("h2",{id:"dictionary-localization-keys"},"Dictionary localization keys"),(0,r.kt)("p",null,"When compiling app language files, we also generate dictionary keys during runtime. These are then stored in ",(0,r.kt)("inlineCode",{parentName:"p"},"'./build/tmp/types/dictionary.ts'")," file. Don't forget to include this file in ",(0,r.kt)("inlineCode",{parentName:"p"},"tsconfig.json")," source files array, to have correct static type checking:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json",metastring:"title=./tsconfig.json",title:"./tsconfig.json"},'{\n "include": ["./app/**/*", "./build/tmp/types/**/*"],\n}\n')),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"When used in IMA.js plugins, you can manually extend the ",(0,r.kt)("inlineCode",{parentName:"p"},"DictionaryMap")," interface:"),(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"declare module '@ima/core' {\n interface DictionaryMap {\n 'home.intro': string;\n }\n}\n\nexport {};\n"))))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/046a2c8d.9dd7210f.js b/assets/js/046a2c8d.9dd7210f.js new file mode 100644 index 0000000000..1fddfcc093 --- /dev/null +++ b/assets/js/046a2c8d.9dd7210f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[2707],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>g});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),p=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),u=p(n),m=r,g=u["".concat(l,".").concat(m)]||u[m]||d[m]||i;return n?a.createElement(g,s(s({ref:t},c),{},{components:n})):a.createElement(g,s({ref:t},c))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,s=new Array(i);s[0]=m;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[u]="string"==typeof e?e:r,s[1]=o;for(var p=2;p{n.d(t,{Z:()=>s});var a=n(7294),r=n(8944);const i={tabItem:"tabItem_Ymn6"};function s(e){let{children:t,hidden:n,className:s}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i.tabItem,s),hidden:n},t)}},6745:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(5773),r=n(7294),i=n(8944),s=n(2466),o=n(3620),l=n(1980),p=n(7392),c=n(12);function u(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??u(n);return function(e){const t=(0,p.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function g(e){let{queryString:t=!1,groupId:n}=e;const a=(0,o.k6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,l._X)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(a.location.search);t.set(i,e),a.replace({...a.location,search:t.toString()})}),[i,a])]}function y(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,i=d(e),[s,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:i}))),[l,p]=g({queryString:n,groupId:a}),[u,y]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,i]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:a}),f=(()=>{const e=l??u;return m({value:e,tabValues:i})?e:null})();(0,r.useLayoutEffect)((()=>{f&&o(f)}),[f]);return{selectedValue:s,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);o(e),p(e),y(e)}),[p,y,i]),tabValues:i}}var f=n(2389);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function h(e){let{className:t,block:n,selectedValue:o,selectValue:l,tabValues:p}=e;const c=[],{blockElementScrollPositionUntilNextRender:u}=(0,s.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),a=p[n].value;a!==o&&(u(t),l(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},t)},p.map((e=>{let{value:t,label:n,attributes:s}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},s,{className:(0,i.Z)("tabs__item",k.tabItem,s?.className,{"tabs__item--active":o===t})}),n??t)})))}function b(e){let{lazy:t,children:n,selectedValue:a}=e;const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=y(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",k.tabList)},r.createElement(h,(0,a.Z)({},e,t)),r.createElement(b,(0,a.Z)({},e,t)))}function N(e){const t=(0,f.Z)();return r.createElement(v,(0,a.Z)({key:String(t)},e))}},8789:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>g,frontMatter:()=>o,metadata:()=>p,toc:()=>u});var a=n(5773),r=(n(7294),n(3905)),i=n(6745),s=n(1683);const o={title:"TypeScript",description:"Basic features > TypeScript"},l=void 0,p={unversionedId:"basic-features/typescript",id:"basic-features/typescript",title:"TypeScript",description:"Basic features > TypeScript",source:"@site/../docs/basic-features/typescript.md",sourceDirName:"basic-features",slug:"/basic-features/typescript",permalink:"/basic-features/typescript",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/basic-features/typescript.md",tags:[],version:"current",lastUpdatedBy:"PS",lastUpdatedAt:1736522400,formattedLastUpdatedAt:"Jan 10, 2025",frontMatter:{title:"TypeScript",description:"Basic features > TypeScript"},sidebar:"docs",previous:{title:"Error Handling",permalink:"/basic-features/error-handling"},next:{title:"Testing",permalink:"/basic-features/testing"}},c={},u=[{value:"tsconfig.json",id:"tsconfigjson",level:2},{value:"ima-env.d.ts",id:"ima-envdts",level:3},{value:"create-ima-app support",id:"create-ima-app-support",level:2},{value:"Controller generic types",id:"controller-generic-types",level:2},{value:"Extending existing interfaces",id:"extending-existing-interfaces",level:2},{value:"Extending Utils",id:"extending-utils",level:3},{value:"Extending ObjectContainer",id:"extending-objectcontainer",level:3},{value:"Extending Settings",id:"extending-settings",level:3},{value:"Dictionary localization keys",id:"dictionary-localization-keys",level:2}],d={toc:u},m="wrapper";function g(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Since IMA.js v18 we provide ",(0,r.kt)("strong",{parentName:"p"},"support for Typescript in your application code")," with proper type declarations from the core packages."),(0,r.kt)("p",null,"To enable TypeScript in your project, first you need to add ",(0,r.kt)("inlineCode",{parentName:"p"},"typescript")," to your app dependencies:"),(0,r.kt)(i.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,r.kt)(s.Z,{value:"npm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm i -D typescript\n"))),(0,r.kt)(s.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"yarn add --dev typescript\n"))),(0,r.kt)(s.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"pnpm add -D typescript\n")))),(0,r.kt)("h2",{id:"tsconfigjson"},"tsconfig.json"),(0,r.kt)("p",null,"Now create ",(0,r.kt)("inlineCode",{parentName:"p"},"tsconfig.json")," file (that may look something like this):"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json",metastring:"title=./tsconfig.json",title:"./tsconfig.json"},'{\n "compilerOptions": {\n "allowJs": true,\n "target": "ES2022",\n "lib": [\n "ES2022",\n "DOM",\n "DOM.Iterable"\n ],\n "module": "ES2022",\n "moduleResolution": "Node16",\n "strict": true,\n "resolveJsonModule": true,\n "jsx": "react-jsx",\n "baseUrl": ".",\n "outDir": "./build/ts-cache",\n "paths": {\n "app/*": [\n "app/*"\n ],\n }\n },\n "include": ["./app/**/*", "./build/tmp/types/**/*"],\n "exclude": ["./**/__tests__"]\n}\n')),(0,r.kt)("p",null,"When CLI detects existence of the ",(0,r.kt)("inlineCode",{parentName:"p"},"tsconfig.json")," file, it automatically starts ",(0,r.kt)("strong",{parentName:"p"},"type checking")," and ",(0,r.kt)("strong",{parentName:"p"},"compiling")," files with ",(0,r.kt)("inlineCode",{parentName:"p"},"*.ts")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"*.tsx")," extensions."),(0,r.kt)("p",null,"Keep in mind that the code is still compiled using ",(0,r.kt)("a",{parentName:"p",href:"https://swc.rs/"},"swc"),", the same way JS code is. This means that certain settings in ",(0,r.kt)("inlineCode",{parentName:"p"},"tsconfig.json")," only applies to type checking (like ",(0,r.kt)("inlineCode",{parentName:"p"},"target"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"moduleResolution"),", etc.), but compilation uses it's own settings to match the JS code."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"You will also probably need to install additional ",(0,r.kt)("inlineCode",{parentName:"p"},"@types/*")," type definition libs to ensure proper support, like react types:"),(0,r.kt)(i.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,r.kt)(s.Z,{value:"npm",mdxType:"TabItem"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm i -D @types/react @types/react-dom\n"))),(0,r.kt)(s.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"yarn add --dev @types/react @types/react-dom\n"))),(0,r.kt)(s.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"pnpm add -D @types/react @types/react-dom\n"))))),(0,r.kt)("h3",{id:"ima-envdts"},"ima-env.d.ts"),(0,r.kt)("p",null,"Additionally we recommend creating a new ",(0,r.kt)("inlineCode",{parentName:"p"},"ima-env.d.ts")," file in root of your ",(0,r.kt)("inlineCode",{parentName:"p"},"./app")," folder with following contents:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts",metastring:"title=./app/ima-env.d.ts",title:"./app/ima-env.d.ts"},'/// \n')),(0,r.kt)("p",null,"This adds proper types support for webpack specific imports like images and other files."),(0,r.kt)("h2",{id:"create-ima-app-support"},(0,r.kt)("inlineCode",{parentName:"h2"},"create-ima-app")," support"),(0,r.kt)("p",null,"You can also easily create a typescript base IMA.js application using ",(0,r.kt)("inlineCode",{parentName:"p"},"--typescript")," cli argument when running ",(0,r.kt)("inlineCode",{parentName:"p"},"create-ima-app")," command:"),(0,r.kt)(i.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,r.kt)(s.Z,{value:"npm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx create-ima-app ~/Desktop/ima-ts --typescript\n"))),(0,r.kt)(s.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx create-ima-app ~/Desktop/ima-ts --typescript\n"))),(0,r.kt)(s.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx create-ima-app ~/Desktop/ima-ts --typescript\n")))),(0,r.kt)("h2",{id:"controller-generic-types"},"Controller generic types"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractController")," class follows similar principles used in React ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractComponent")," type. There are 3 generic types you can define on the class definition itself."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts",metastring:"title=AbstractController.ts",title:"AbstractController.ts"},"export class AbstractController<\n S extends PageState = {},\n R extends RouteParams = {},\n SS extends S = S\n> extends Controller;\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"S")," - Use to define shape of your controller managed state."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"R")," - Use to define controller's route route params that are extracted to ",(0,r.kt)("inlineCode",{parentName:"li"},"this.params"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"SS")," - Defaults to ",(0,r.kt)("inlineCode",{parentName:"li"},"S"),", however when you are using any extensions in your controller, that have their own state, you can merge those state types in this generic value, to have proper type support for ",(0,r.kt)("inlineCode",{parentName:"li"},"this.getState()")," method (this will now include all state keys, including ones used in extensions).")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts",metastring:"title=HomeController.ts",title:"HomeController.ts"},"import { TestExtension, GalleryExtensionState } from './GalleryExtension';\n\nexport type HomeControllerState = {\n cards: Promise;\n message: string;\n name: string;\n};\n\nexport class HomeController extends AbstractController<\n HomeControllerState,\n { detailId?: string },\n HomeControllerState & GalleryExtensionState\n>{\n static $extensions?: Dependencies> = [GalleryExtension];\n\n load(): HomeControllerState {\n const cardsPromise = this.#httpAgent\n .get('http://localhost:3001/static/static/public/cards.json')\n .then(response => response.body);\n\n // `state` contains all merged types from `SS` generic value.\n const state = this.getState();\n\n return {\n message: 'test',\n cards: cardsPromise,\n name: 'nam',\n };\n }\n}\n")),(0,r.kt)("h2",{id:"extending-existing-interfaces"},"Extending existing interfaces"),(0,r.kt)("p",null,"Since you can extend certain features like ",(0,r.kt)("inlineCode",{parentName:"p"},"ComponentUtils")," or settings from within your application or through plugins, and in order to provide type checking for these, we are using specific interfaces that you can extend using ",(0,r.kt)("a",{parentName:"p",href:"https://www.typescriptlang.org/docs/handbook/declaration-merging.html"},"Declaration Merging")," feature."),(0,r.kt)("p",null,"This ensures (when used correctly), that you always have correct static types when using these interfaces, even when they are extended in multiple places."),(0,r.kt)("h3",{id:"extending-utils"},"Extending ",(0,r.kt)("inlineCode",{parentName:"h3"},"Utils")),(0,r.kt)("p",null,"When using component utils, in addition to registering your classes using ",(0,r.kt)("inlineCode",{parentName:"p"},"ComponentUtils")," helper, make sure to also extend ",(0,r.kt)("inlineCode",{parentName:"p"},"Utils")," interface. This adds autocomplete and typechecking to ",(0,r.kt)("inlineCode",{parentName:"p"},"this.utils()")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"useComponentUtils")," in your components."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts",metastring:"title=./app/config/bind.ts",title:"./app/config/bind.ts"},"declare module '@ima/core' {\n interface Utils {\n $CssClasses: typeof defaultCssClasses;\n }\n}\n\nexport const initBindApp: InitBindFunction = (ns, oc) => {\n oc.get(ComponentUtils).register({\n $CssClasses: '$CssClasses',\n });\n};\n")),(0,r.kt)("h3",{id:"extending-objectcontainer"},"Extending ",(0,r.kt)("inlineCode",{parentName:"h3"},"ObjectContainer")),(0,r.kt)("p",null,"Same goes for defining string aliases in Object container. This adds proper type checking to dependencies definition and ",(0,r.kt)("inlineCode",{parentName:"p"},"oc.get")," autocomplete."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts",metastring:"title=./app/config/bind.ts",title:"./app/config/bind.ts"},"declare module '@ima/core' {\n interface OCAliasMap {\n $CssClasses: () => typeof cssClassNameProcessor;\n $PageRendererFactory: PageRendererFactory;\n API_KEY: string;\n }\n}\n\nexport const initBindApp: InitBindFunction = (ns, oc) => {\n oc.bind('$CssClasses', function () { return cssClassNameProcessor; });\n oc.bind('$PageRendererFactory', PageRendererFactory);\n oc.constant('API_KEY', '14fasdf');\n};\n")),(0,r.kt)("h3",{id:"extending-settings"},"Extending ",(0,r.kt)("inlineCode",{parentName:"h3"},"Settings")),(0,r.kt)("p",null,"This makes sure you don't have any missing or additional fields in your app settings. Other environments than ",(0,r.kt)("inlineCode",{parentName:"p"},"prod")," have all fields made optional, since they are deeply merged with the ",(0,r.kt)("inlineCode",{parentName:"p"},"prod")," settings."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Use ",(0,r.kt)("inlineCode",{parentName:"p"},"?:")," for settings with default values. This applies mostly to plugins.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts",metastring:"title=./app/config/settings.ts",title:"./app/config/settings.ts"},"declare module '@ima/core' {\n interface Settings {\n links: Record<'documentation' | 'tutorial' | 'plugins' | 'api', string>;\n }\n}\n\nexport const initSettings: InitSettingsFunction = (ns, oc, config) => {\n return {\n prod: {\n links: {\n documentation: 'https://imajs.io/docs',\n api: 'https://imajs.io/api',\n },\n }\n }\n}\n\n")),(0,r.kt)("h2",{id:"dictionary-localization-keys"},"Dictionary localization keys"),(0,r.kt)("p",null,"When compiling app language files, we also generate dictionary keys during runtime. These are then stored in ",(0,r.kt)("inlineCode",{parentName:"p"},"'./build/tmp/types/dictionary.ts'")," file. Don't forget to include this file in ",(0,r.kt)("inlineCode",{parentName:"p"},"tsconfig.json")," source files array, to have correct static type checking:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json",metastring:"title=./tsconfig.json",title:"./tsconfig.json"},'{\n "include": ["./app/**/*", "./build/tmp/types/**/*"],\n}\n')),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"When used in IMA.js plugins, you can manually extend the ",(0,r.kt)("inlineCode",{parentName:"p"},"DictionaryMap")," interface:"),(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"declare module '@ima/core' {\n interface DictionaryMap {\n 'home.intro': string;\n }\n}\n\nexport {};\n"))))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/087d9a97.91f20180.js b/assets/js/087d9a97.5f47faf8.js similarity index 96% rename from assets/js/087d9a97.91f20180.js rename to assets/js/087d9a97.5f47faf8.js index 73ec5056cd..4d0d6637d5 100644 --- a/assets/js/087d9a97.91f20180.js +++ b/assets/js/087d9a97.5f47faf8.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4080],{3905:(e,a,t)=>{t.d(a,{Zo:()=>s,kt:()=>c});var n=t(7294);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function i(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var p=n.createContext({}),o=function(e){var a=n.useContext(p),t=a;return e&&(t="function"==typeof e?e(a):l(l({},a),e)),t},s=function(e){var a=o(e.components);return n.createElement(p.Provider,{value:a},e.children)},m="mdxType",g={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},k=n.forwardRef((function(e,a){var t=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,s=d(e,["components","mdxType","originalType","parentName"]),m=o(t),k=r,c=m["".concat(p,".").concat(k)]||m[k]||g[k]||i;return t?n.createElement(c,l(l({ref:a},s),{},{components:t})):n.createElement(c,l({ref:a},s))}));function c(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var i=t.length,l=new Array(i);l[0]=k;var d={};for(var p in a)hasOwnProperty.call(a,p)&&(d[p]=a[p]);d.originalType=e,d[m]="string"==typeof e?e:r,l[1]=d;for(var o=2;o{t.r(a),t.d(a,{assets:()=>p,contentTitle:()=>l,default:()=>g,frontMatter:()=>i,metadata:()=>d,toc:()=>o});var n=t(5773),r=(t(7294),t(3905));const i={id:"ima_core.PageNavigationHandler",title:"Class: PageNavigationHandler",sidebar_label:"@ima/core.PageNavigationHandler",custom_edit_url:null},l=void 0,d={unversionedId:"api/classes/ima_core.PageNavigationHandler",id:"api/classes/ima_core.PageNavigationHandler",title:"Class: PageNavigationHandler",description:"@ima/core.PageNavigationHandler",source:"@site/../docs/api/classes/ima_core.PageNavigationHandler.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.PageNavigationHandler",permalink:"/api/classes/ima_core.PageNavigationHandler",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.PageNavigationHandler",title:"Class: PageNavigationHandler",sidebar_label:"@ima/core.PageNavigationHandler",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.PageMetaHandler",permalink:"/api/classes/ima_core.PageMetaHandler"},next:{title:"@ima/core.PageRenderer",permalink:"/api/classes/ima_core.PageRenderer"}},p={},o=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"#preManaged",id:"premanaged",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"_window",id:"_window",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"$dependencies",id:"dependencies",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"Methods",id:"methods",level:2},{value:"_saveScrollHistory",id:"_savescrollhistory",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"_scrollTo",id:"_scrollto",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"_setAddressBar",id:"_setaddressbar",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"destroy",id:"destroy",level:3},{value:"Returns",id:"returns-3",level:4},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"handlePostManagedState",id:"handlepostmanagedstate",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"handlePreManagedState",id:"handlepremanagedstate",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-5",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"init",id:"init",level:3},{value:"Returns",id:"returns-6",level:4},{value:"Overrides",id:"overrides-3",level:4},{value:"Defined in",id:"defined-in-10",level:4}],s={toc:o},m="wrapper";function g(e){let{components:a,...t}=e;return(0,r.kt)(m,(0,n.Z)({},s,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".PageNavigationHandler"),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},(0,r.kt)("inlineCode",{parentName:"a"},"PageHandler"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"PageNavigationHandler"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new PageNavigationHandler"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"window"),")"),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"window")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The utility for manipulating the global context and global client-side-specific APIs.")))),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#constructor"},"constructor")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageNavigationHandler.ts#L18"},"packages/core/src/page/handler/PageNavigationHandler.ts:18")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"premanaged"},"#preManaged"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#preManaged"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"false")),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageNavigationHandler.ts#L10"},"packages/core/src/page/handler/PageNavigationHandler.ts:10")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_window"},"_","window"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","window"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageNavigationHandler.ts#L8"},"packages/core/src/page/handler/PageNavigationHandler.ts:8")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"dependencies"},"$dependencies"),(0,r.kt)("p",null,"\u25aa ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("strong",{parentName:"p"},"$dependencies"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageNavigationHandler.ts#L12"},"packages/core/src/page/handler/PageNavigationHandler.ts:12")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"_savescrollhistory"},"_","saveScrollHistory"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_saveScrollHistory"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Save user's scroll state to history."),(0,r.kt)("p",null,"Replace scroll values in current state for actual scroll values in\ndocument."),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageNavigationHandler.ts#L104"},"packages/core/src/page/handler/PageNavigationHandler.ts:104")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_scrollto"},"_","scrollTo"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_scrollTo"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"\xabdestructured\xbb"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Scrolls to give coordinates on a page."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"\xabdestructured\xbb")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Object"))))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageNavigationHandler.ts#L121"},"packages/core/src/page/handler/PageNavigationHandler.ts:121")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_setaddressbar"},"_","setAddressBar"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_setAddressBar"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"url"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"isRedirection"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Sets the provided URL to the browser's address bar by pushing or replacing a new\nstate to the history."),(0,r.kt)("p",null,"The state object pushed to or replaced in the history will be an object with the\nfollowing structure: ",(0,r.kt)("inlineCode",{parentName:"p"},"{url: string}"),". The ",(0,r.kt)("inlineCode",{parentName:"p"},"url")," field will\nbe set to the provided URL."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"url")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The URL.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"isRedirection")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean")),(0,r.kt)("td",{parentName:"tr",align:"left"},"If replaceState should be used instead of pushState.")))),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageNavigationHandler.ts#L138"},"packages/core/src/page/handler/PageNavigationHandler.ts:138")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"destroy"},"destroy"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"destroy"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Finalization callback, called when the page manager is being discarded.\nThis usually happens when the page is hot-reloaded at the client side."),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#destroy"},"destroy")),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageHandler.ts#L50"},"packages/core/src/page/handler/PageHandler.ts:50")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"handlepostmanagedstate"},"handlePostManagedState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"handlePostManagedState"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"managedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"previousManagedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"action"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called after a PageManager finishes transition from previous page to\na new one."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"managedPage")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The currently managed page.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"previousManagedPage")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The data of the page that was previously managed.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"action")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.PageAction"},(0,r.kt)("inlineCode",{parentName:"a"},"PageAction"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"An action object describing what triggered the routing.")))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-1"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#handlepostmanagedstate"},"handlePostManagedState")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageNavigationHandler.ts#L84"},"packages/core/src/page/handler/PageNavigationHandler.ts:84")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"handlepremanagedstate"},"handlePreManagedState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"handlePreManagedState"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"managedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextManagedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"action"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called before a PageManager starts to transition from previous page to\na new one."),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"managedPage")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The currently managed page - soon-to-be previously managed page.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextManagedPage")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The data of the page that's about to be managed.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"action")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.PageAction"},(0,r.kt)("inlineCode",{parentName:"a"},"PageAction"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"An action object describing what triggered the routing.")))),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-2"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#handlepremanagedstate"},"handlePreManagedState")),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageNavigationHandler.ts#L43"},"packages/core/src/page/handler/PageNavigationHandler.ts:43")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"init"},"init"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"init"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Initializes the page handler."),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-3"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#init"},"init")),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageNavigationHandler.ts#L31"},"packages/core/src/page/handler/PageNavigationHandler.ts:31")))}g.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4080],{3905:(e,a,t)=>{t.d(a,{Zo:()=>s,kt:()=>c});var n=t(7294);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function i(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var p=n.createContext({}),o=function(e){var a=n.useContext(p),t=a;return e&&(t="function"==typeof e?e(a):l(l({},a),e)),t},s=function(e){var a=o(e.components);return n.createElement(p.Provider,{value:a},e.children)},m="mdxType",g={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},k=n.forwardRef((function(e,a){var t=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,s=d(e,["components","mdxType","originalType","parentName"]),m=o(t),k=r,c=m["".concat(p,".").concat(k)]||m[k]||g[k]||i;return t?n.createElement(c,l(l({ref:a},s),{},{components:t})):n.createElement(c,l({ref:a},s))}));function c(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var i=t.length,l=new Array(i);l[0]=k;var d={};for(var p in a)hasOwnProperty.call(a,p)&&(d[p]=a[p]);d.originalType=e,d[m]="string"==typeof e?e:r,l[1]=d;for(var o=2;o{t.r(a),t.d(a,{assets:()=>p,contentTitle:()=>l,default:()=>g,frontMatter:()=>i,metadata:()=>d,toc:()=>o});var n=t(5773),r=(t(7294),t(3905));const i={id:"ima_core.PageNavigationHandler",title:"Class: PageNavigationHandler",sidebar_label:"@ima/core.PageNavigationHandler",custom_edit_url:null},l=void 0,d={unversionedId:"api/classes/ima_core.PageNavigationHandler",id:"api/classes/ima_core.PageNavigationHandler",title:"Class: PageNavigationHandler",description:"@ima/core.PageNavigationHandler",source:"@site/../docs/api/classes/ima_core.PageNavigationHandler.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.PageNavigationHandler",permalink:"/api/classes/ima_core.PageNavigationHandler",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.PageNavigationHandler",title:"Class: PageNavigationHandler",sidebar_label:"@ima/core.PageNavigationHandler",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.PageMetaHandler",permalink:"/api/classes/ima_core.PageMetaHandler"},next:{title:"@ima/core.PageRenderer",permalink:"/api/classes/ima_core.PageRenderer"}},p={},o=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"#preManaged",id:"premanaged",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"_window",id:"_window",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"$dependencies",id:"dependencies",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"Methods",id:"methods",level:2},{value:"_saveScrollHistory",id:"_savescrollhistory",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"_scrollTo",id:"_scrollto",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"_setAddressBar",id:"_setaddressbar",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"destroy",id:"destroy",level:3},{value:"Returns",id:"returns-3",level:4},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"handlePostManagedState",id:"handlepostmanagedstate",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"handlePreManagedState",id:"handlepremanagedstate",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-5",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"init",id:"init",level:3},{value:"Returns",id:"returns-6",level:4},{value:"Overrides",id:"overrides-3",level:4},{value:"Defined in",id:"defined-in-10",level:4}],s={toc:o},m="wrapper";function g(e){let{components:a,...t}=e;return(0,r.kt)(m,(0,n.Z)({},s,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".PageNavigationHandler"),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},(0,r.kt)("inlineCode",{parentName:"a"},"PageHandler"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"PageNavigationHandler"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new PageNavigationHandler"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"window"),")"),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"window")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The utility for manipulating the global context and global client-side-specific APIs.")))),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#constructor"},"constructor")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageNavigationHandler.ts#L18"},"packages/core/src/page/handler/PageNavigationHandler.ts:18")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"premanaged"},"#preManaged"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#preManaged"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"false")),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageNavigationHandler.ts#L10"},"packages/core/src/page/handler/PageNavigationHandler.ts:10")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_window"},"_","window"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","window"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageNavigationHandler.ts#L8"},"packages/core/src/page/handler/PageNavigationHandler.ts:8")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"dependencies"},"$dependencies"),(0,r.kt)("p",null,"\u25aa ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("strong",{parentName:"p"},"$dependencies"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageNavigationHandler.ts#L12"},"packages/core/src/page/handler/PageNavigationHandler.ts:12")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"_savescrollhistory"},"_","saveScrollHistory"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_saveScrollHistory"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Save user's scroll state to history."),(0,r.kt)("p",null,"Replace scroll values in current state for actual scroll values in\ndocument."),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageNavigationHandler.ts#L104"},"packages/core/src/page/handler/PageNavigationHandler.ts:104")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_scrollto"},"_","scrollTo"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_scrollTo"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"\xabdestructured\xbb"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Scrolls to give coordinates on a page."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"\xabdestructured\xbb")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Object"))))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageNavigationHandler.ts#L121"},"packages/core/src/page/handler/PageNavigationHandler.ts:121")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_setaddressbar"},"_","setAddressBar"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_setAddressBar"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"url"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"isRedirection"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Sets the provided URL to the browser's address bar by pushing or replacing a new\nstate to the history."),(0,r.kt)("p",null,"The state object pushed to or replaced in the history will be an object with the\nfollowing structure: ",(0,r.kt)("inlineCode",{parentName:"p"},"{url: string}"),". The ",(0,r.kt)("inlineCode",{parentName:"p"},"url")," field will\nbe set to the provided URL."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"url")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The URL.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"isRedirection")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean")),(0,r.kt)("td",{parentName:"tr",align:"left"},"If replaceState should be used instead of pushState.")))),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageNavigationHandler.ts#L138"},"packages/core/src/page/handler/PageNavigationHandler.ts:138")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"destroy"},"destroy"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"destroy"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Finalization callback, called when the page manager is being discarded.\nThis usually happens when the page is hot-reloaded at the client side."),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#destroy"},"destroy")),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageHandler.ts#L50"},"packages/core/src/page/handler/PageHandler.ts:50")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"handlepostmanagedstate"},"handlePostManagedState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"handlePostManagedState"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"managedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"previousManagedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"action"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called after a PageManager finishes transition from previous page to\na new one."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"managedPage")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The currently managed page.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"previousManagedPage")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The data of the page that was previously managed.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"action")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.PageAction"},(0,r.kt)("inlineCode",{parentName:"a"},"PageAction"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"An action object describing what triggered the routing.")))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-1"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#handlepostmanagedstate"},"handlePostManagedState")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageNavigationHandler.ts#L84"},"packages/core/src/page/handler/PageNavigationHandler.ts:84")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"handlepremanagedstate"},"handlePreManagedState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"handlePreManagedState"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"managedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextManagedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"action"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called before a PageManager starts to transition from previous page to\na new one."),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"managedPage")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The currently managed page - soon-to-be previously managed page.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextManagedPage")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The data of the page that's about to be managed.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"action")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.PageAction"},(0,r.kt)("inlineCode",{parentName:"a"},"PageAction"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"An action object describing what triggered the routing.")))),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-2"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#handlepremanagedstate"},"handlePreManagedState")),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageNavigationHandler.ts#L43"},"packages/core/src/page/handler/PageNavigationHandler.ts:43")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"init"},"init"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"init"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Initializes the page handler."),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-3"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#init"},"init")),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageNavigationHandler.ts#L31"},"packages/core/src/page/handler/PageNavigationHandler.ts:31")))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0915269d.4e8a62e3.js b/assets/js/0915269d.619b7005.js similarity index 96% rename from assets/js/0915269d.4e8a62e3.js rename to assets/js/0915269d.619b7005.js index c598a60a75..2626e7da9a 100644 --- a/assets/js/0915269d.4e8a62e3.js +++ b/assets/js/0915269d.619b7005.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[2598],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>f});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=n.createContext({}),l=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},m="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),m=l(r),d=a,f=m["".concat(c,".").concat(d)]||m[d]||s[d]||i;return r?n.createElement(f,o(o({ref:t},u),{},{components:r})):n.createElement(f,o({ref:t},u))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=d;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p[m]="string"==typeof e?e:a,o[1]=p;for(var l=2;l{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>s,frontMatter:()=>i,metadata:()=>p,toc:()=>l});var n=r(5773),a=(r(7294),r(3905));const i={id:"ima_core.PageAction",title:"Interface: PageAction",sidebar_label:"@ima/core.PageAction",custom_edit_url:null},o=void 0,p={unversionedId:"api/interfaces/ima_core.PageAction",id:"api/interfaces/ima_core.PageAction",title:"Interface: PageAction",description:"@ima/core.PageAction",source:"@site/../docs/api/interfaces/ima_core.PageAction.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.PageAction",permalink:"/api/interfaces/ima_core.PageAction",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.PageAction",title:"Interface: PageAction",sidebar_label:"@ima/core.PageAction",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.OCAliasMap",permalink:"/api/interfaces/ima_core.OCAliasMap"},next:{title:"@ima/core.PageRendererSettings",permalink:"/api/interfaces/ima_core.PageRendererSettings"}},c={},l=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:"event",id:"event",level:3},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"type",id:"type",level:3},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"url",id:"url",level:3},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-2",level:4}],u={toc:l},m="wrapper";function s(e){let{components:t,...r}=e;return(0,a.kt)(m,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".PageAction"),(0,a.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction"},(0,a.kt)("inlineCode",{parentName:"a"},"RouteAction"))),(0,a.kt)("p",{parentName:"li"},"\u21b3 ",(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("inlineCode",{parentName:"strong"},"PageAction"))))),(0,a.kt)("h2",{id:"properties"},"Properties"),(0,a.kt)("h3",{id:"event"},"event"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"event"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"Event")," & { ",(0,a.kt)("inlineCode",{parentName:"p"},"state?"),": { ",(0,a.kt)("inlineCode",{parentName:"p"},"scroll?"),": { ",(0,a.kt)("inlineCode",{parentName:"p"},"x"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"number")," ; ",(0,a.kt)("inlineCode",{parentName:"p"},"y"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"number")," } } }"),(0,a.kt)("h4",{id:"overrides"},"Overrides"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction"},"RouteAction"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction#event"},"event")),(0,a.kt)("h4",{id:"defined-in"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/PageTypes.ts#L40"},"packages/core/src/page/PageTypes.ts:40")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"type"},"type"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"type"),": ",(0,a.kt)("a",{parentName:"p",href:"/api/enums/ima_core.ActionTypes"},(0,a.kt)("inlineCode",{parentName:"a"},"ActionTypes"))),(0,a.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction"},"RouteAction"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction#type"},"type")),(0,a.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L18"},"packages/core/src/router/Router.ts:18")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"url"},"url"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"url"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction"},"RouteAction"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction#url"},"url")),(0,a.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L20"},"packages/core/src/router/Router.ts:20")))}s.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[2598],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>f});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=n.createContext({}),l=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},m="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),m=l(r),d=a,f=m["".concat(c,".").concat(d)]||m[d]||s[d]||i;return r?n.createElement(f,o(o({ref:t},u),{},{components:r})):n.createElement(f,o({ref:t},u))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=d;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p[m]="string"==typeof e?e:a,o[1]=p;for(var l=2;l{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>s,frontMatter:()=>i,metadata:()=>p,toc:()=>l});var n=r(5773),a=(r(7294),r(3905));const i={id:"ima_core.PageAction",title:"Interface: PageAction",sidebar_label:"@ima/core.PageAction",custom_edit_url:null},o=void 0,p={unversionedId:"api/interfaces/ima_core.PageAction",id:"api/interfaces/ima_core.PageAction",title:"Interface: PageAction",description:"@ima/core.PageAction",source:"@site/../docs/api/interfaces/ima_core.PageAction.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.PageAction",permalink:"/api/interfaces/ima_core.PageAction",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.PageAction",title:"Interface: PageAction",sidebar_label:"@ima/core.PageAction",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.OCAliasMap",permalink:"/api/interfaces/ima_core.OCAliasMap"},next:{title:"@ima/core.PageRendererSettings",permalink:"/api/interfaces/ima_core.PageRendererSettings"}},c={},l=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:"event",id:"event",level:3},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"type",id:"type",level:3},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"url",id:"url",level:3},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-2",level:4}],u={toc:l},m="wrapper";function s(e){let{components:t,...r}=e;return(0,a.kt)(m,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".PageAction"),(0,a.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction"},(0,a.kt)("inlineCode",{parentName:"a"},"RouteAction"))),(0,a.kt)("p",{parentName:"li"},"\u21b3 ",(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("inlineCode",{parentName:"strong"},"PageAction"))))),(0,a.kt)("h2",{id:"properties"},"Properties"),(0,a.kt)("h3",{id:"event"},"event"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"event"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"Event")," & { ",(0,a.kt)("inlineCode",{parentName:"p"},"state?"),": { ",(0,a.kt)("inlineCode",{parentName:"p"},"scroll?"),": { ",(0,a.kt)("inlineCode",{parentName:"p"},"x"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"number")," ; ",(0,a.kt)("inlineCode",{parentName:"p"},"y"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"number")," } } }"),(0,a.kt)("h4",{id:"overrides"},"Overrides"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction"},"RouteAction"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction#event"},"event")),(0,a.kt)("h4",{id:"defined-in"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/PageTypes.ts#L40"},"packages/core/src/page/PageTypes.ts:40")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"type"},"type"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"type"),": ",(0,a.kt)("a",{parentName:"p",href:"/api/enums/ima_core.ActionTypes"},(0,a.kt)("inlineCode",{parentName:"a"},"ActionTypes"))),(0,a.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction"},"RouteAction"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction#type"},"type")),(0,a.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L18"},"packages/core/src/router/Router.ts:18")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"url"},"url"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"url"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction"},"RouteAction"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction#url"},"url")),(0,a.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L20"},"packages/core/src/router/Router.ts:20")))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/094a494b.68e30ef0.js b/assets/js/094a494b.8af801ae.js similarity index 98% rename from assets/js/094a494b.68e30ef0.js rename to assets/js/094a494b.8af801ae.js index e6f1043d63..dba20dc45d 100644 --- a/assets/js/094a494b.68e30ef0.js +++ b/assets/js/094a494b.8af801ae.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[2158],{3905:(e,t,n)=>{n.d(t,{Zo:()=>$,kt:()=>c});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),l=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},$=function(e){var t=l(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,$=p(e,["components","mdxType","originalType","parentName"]),d=l(n),g=r,c=d["".concat(s,".").concat(g)]||d[g]||m[g]||i;return n?a.createElement(c,o(o({ref:t},$),{},{components:n})):a.createElement(c,o({ref:t},$))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=g;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[d]="string"==typeof e?e:r,o[1]=p;for(var l=2;l{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>m,frontMatter:()=>i,metadata:()=>p,toc:()=>l});var a=n(5773),r=(n(7294),n(3905));const i={id:"ima_core.RouteOptions",title:"Interface: RouteOptions",sidebar_label:"@ima/core.RouteOptions",custom_edit_url:null},o=void 0,p={unversionedId:"api/interfaces/ima_core.RouteOptions",id:"api/interfaces/ima_core.RouteOptions",title:"Interface: RouteOptions",description:"@ima/core.RouteOptions",source:"@site/../docs/api/interfaces/ima_core.RouteOptions.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.RouteOptions",permalink:"/api/interfaces/ima_core.RouteOptions",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.RouteOptions",title:"Interface: RouteOptions",sidebar_label:"@ima/core.RouteOptions",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.RouteLocals",permalink:"/api/interfaces/ima_core.RouteLocals"},next:{title:"@ima/core.Settings",permalink:"/api/interfaces/ima_core.Settings"}},s={},l=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:"autoScroll",id:"autoscroll",level:3},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"documentView",id:"documentview",level:3},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"extensions",id:"extensions",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"headers",id:"headers",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"httpStatus",id:"httpstatus",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"managedRootView",id:"managedrootview",level:3},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"middlewares",id:"middlewares",level:3},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"onlyUpdate",id:"onlyupdate",level:3},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"viewAdapter",id:"viewadapter",level:3},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-8",level:4}],$={toc:l},d="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},$,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".RouteOptions"),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteFactoryOptions"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"RouteOptions"))))),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"autoscroll"},"autoScroll"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"autoScroll"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions"),".",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions#autoscroll"},"autoScroll")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L36"},"packages/core/src/router/Router.ts:36")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"documentview"},"documentView"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"documentView"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions"),".",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions#documentview"},"documentView")),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L37"},"packages/core/src/router/Router.ts:37")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"extensions"},"extensions"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"extensions"),": (",(0,r.kt)("inlineCode",{parentName:"p"},'"$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageRenderer"')," ","|"," ","`","$Helper.${string}","`"," ","|"," ","`","$oc.${string}","`"," ","|"," ","`","$Settings.${string}","`"," ","|"," ","`","$Env.${string}","`"," ","|"," ","`","$Protocol.${string}","`"," ","|"," ","`","$Secure.${string}","`"," ","|"," ","`","$Request.${string}","`"," ","|"," ","`","$Response.${string}","`"," ","|"," ","`","$Window.${string}","`"," ","|"," ","`","$Error.${string}","`"," ","|"," ","`","$Dictionary.${string}","`"," ","|"," ","`","$CookieTransformFunction.${string}","`"," ","|"," ","`","$CookieStorage.${string}","`"," ","|"," ","`","$SessionStorage.${string}","`"," ","|"," ","`","$MapStorage.${string}","`"," ","|"," ","`","$WeakMapStorage.${string}","`"," ","|"," ","`","$SessionMapStorage.${string}","`"," ","|"," ","`","$Dispatcher.${string}","`"," ","|"," ","`","$EventBus.${string}","`"," ","|"," ","`","$Observable.${string}","`"," ","|"," ","`","$CacheStorage.${string}","`"," ","|"," ","`","$CacheFactory.${string}","`"," ","|"," ","`","$Cache.${string}","`"," ","|"," ","`","$MetaManager.${string}","`"," ","|"," ","`","$ControllerDecorator.${string}","`"," ","|"," ","`","$PageStateManagerDecorator.${string}","`"," ","|"," ","`","$PageStateManager.${string}","`"," ","|"," ","`","$PageFactory.${string}","`"," ","|"," ","`","$ComponentUtils.${string}","`"," ","|"," ","`","$Utils.${string}","`"," ","|"," ","`","$PageHandlerRegistry.${string}","`"," ","|"," ","`","$PageManager.${string}","`"," ","|"," ","`","$RouteFactory.${string}","`"," ","|"," ","`","$Router.${string}","`"," ","|"," ","`","$RouteNames.${string}","`"," ","|"," ","`","$RouterEvents.${string}","`"," ","|"," ","`","$HttpUrlTransformer.${string}","`"," ","|"," ","`","$HttpAgentProxy.${string}","`"," ","|"," ","`","$Http.${string}","`"," ","|"," ","`","$HttpStatusCode.${string}","`"," ","|"," ","`","$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageRenderer"')," ","|"," ","`","?$Helper.${string}","`"," ","|"," ","`","?$oc.${string}","`"," ","|"," ","`","?$Settings.${string}","`"," ","|"," ","`","?$Env.${string}","`"," ","|"," ","`","?$Protocol.${string}","`"," ","|"," ","`","?$Secure.${string}","`"," ","|"," ","`","?$Request.${string}","`"," ","|"," ","`","?$Response.${string}","`"," ","|"," ","`","?$Window.${string}","`"," ","|"," ","`","?$Error.${string}","`"," ","|"," ","`","?$Dictionary.${string}","`"," ","|"," ","`","?$CookieTransformFunction.${string}","`"," ","|"," ","`","?$CookieStorage.${string}","`"," ","|"," ","`","?$SessionStorage.${string}","`"," ","|"," ","`","?$MapStorage.${string}","`"," ","|"," ","`","?$WeakMapStorage.${string}","`"," ","|"," ","`","?$SessionMapStorage.${string}","`"," ","|"," ","`","?$Dispatcher.${string}","`"," ","|"," ","`","?$EventBus.${string}","`"," ","|"," ","`","?$Observable.${string}","`"," ","|"," ","`","?$CacheStorage.${string}","`"," ","|"," ","`","?$CacheFactory.${string}","`"," ","|"," ","`","?$Cache.${string}","`"," ","|"," ","`","?$MetaManager.${string}","`"," ","|"," ","`","?$ControllerDecorator.${string}","`"," ","|"," ","`","?$PageStateManagerDecorator.${string}","`"," ","|"," ","`","?$PageStateManager.${string}","`"," ","|"," ","`","?$PageFactory.${string}","`"," ","|"," ","`","?$ComponentUtils.${string}","`"," ","|"," ","`","?$Utils.${string}","`"," ","|"," ","`","?$PageHandlerRegistry.${string}","`"," ","|"," ","`","?$PageManager.${string}","`"," ","|"," ","`","?$RouteFactory.${string}","`"," ","|"," ","`","?$Router.${string}","`"," ","|"," ","`","?$RouteNames.${string}","`"," ","|"," ","`","?$RouterEvents.${string}","`"," ","|"," ","`","?$HttpUrlTransformer.${string}","`"," ","|"," ","`","?$HttpAgentProxy.${string}","`"," ","|"," ","`","?$Http.${string}","`"," ","|"," ","`","?$HttpStatusCode.${string}","`"," ","|"," ","`","?$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageRenderer"')," ","|"," ","`","...?$Helper.${string}","`"," ","|"," ","`","...?$oc.${string}","`"," ","|"," ","`","...?$Settings.${string}","`"," ","|"," ","`","...?$Env.${string}","`"," ","|"," ","`","...?$Protocol.${string}","`"," ","|"," ","`","...?$Secure.${string}","`"," ","|"," ","`","...?$Request.${string}","`"," ","|"," ","`","...?$Response.${string}","`"," ","|"," ","`","...?$Window.${string}","`"," ","|"," ","`","...?$Error.${string}","`"," ","|"," ","`","...?$Dictionary.${string}","`"," ","|"," ","`","...?$CookieTransformFunction.${string}","`"," ","|"," ","`","...?$CookieStorage.${string}","`"," ","|"," ","`","...?$SessionStorage.${string}","`"," ","|"," ","`","...?$MapStorage.${string}","`"," ","|"," ","`","...?$WeakMapStorage.${string}","`"," ","|"," ","`","...?$SessionMapStorage.${string}","`"," ","|"," ","`","...?$Dispatcher.${string}","`"," ","|"," ","`","...?$EventBus.${string}","`"," ","|"," ","`","...?$Observable.${string}","`"," ","|"," ","`","...?$CacheStorage.${string}","`"," ","|"," ","`","...?$CacheFactory.${string}","`"," ","|"," ","`","...?$Cache.${string}","`"," ","|"," ","`","...?$MetaManager.${string}","`"," ","|"," ","`","...?$ControllerDecorator.${string}","`"," ","|"," ","`","...?$PageStateManagerDecorator.${string}","`"," ","|"," ","`","...?$PageStateManager.${string}","`"," ","|"," ","`","...?$PageFactory.${string}","`"," ","|"," ","`","...?$ComponentUtils.${string}","`"," ","|"," ","`","...?$Utils.${string}","`"," ","|"," ","`","...?$PageHandlerRegistry.${string}","`"," ","|"," ","`","...?$PageManager.${string}","`"," ","|"," ","`","...?$RouteFactory.${string}","`"," ","|"," ","`","...?$Router.${string}","`"," ","|"," ","`","...?$RouteNames.${string}","`"," ","|"," ","`","...?$RouterEvents.${string}","`"," ","|"," ","`","...?$HttpUrlTransformer.${string}","`"," ","|"," ","`","...?$HttpAgentProxy.${string}","`"," ","|"," ","`","...?$Http.${string}","`"," ","|"," ","`","...?$HttpStatusCode.${string}","`"," ","|"," ","`","...?$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageRenderer"')," ","|"," ","`","...$Helper.${string}","`"," ","|"," ","`","...$oc.${string}","`"," ","|"," ","`","...$Settings.${string}","`"," ","|"," ","`","...$Env.${string}","`"," ","|"," ","`","...$Protocol.${string}","`"," ","|"," ","`","...$Secure.${string}","`"," ","|"," ","`","...$Request.${string}","`"," ","|"," ","`","...$Response.${string}","`"," ","|"," ","`","...$Window.${string}","`"," ","|"," ","`","...$Error.${string}","`"," ","|"," ","`","...$Dictionary.${string}","`"," ","|"," ","`","...$CookieTransformFunction.${string}","`"," ","|"," ","`","...$CookieStorage.${string}","`"," ","|"," ","`","...$SessionStorage.${string}","`"," ","|"," ","`","...$MapStorage.${string}","`"," ","|"," ","`","...$WeakMapStorage.${string}","`"," ","|"," ","`","...$SessionMapStorage.${string}","`"," ","|"," ","`","...$Dispatcher.${string}","`"," ","|"," ","`","...$EventBus.${string}","`"," ","|"," ","`","...$Observable.${string}","`"," ","|"," ","`","...$CacheStorage.${string}","`"," ","|"," ","`","...$CacheFactory.${string}","`"," ","|"," ","`","...$Cache.${string}","`"," ","|"," ","`","...$MetaManager.${string}","`"," ","|"," ","`","...$ControllerDecorator.${string}","`"," ","|"," ","`","...$PageStateManagerDecorator.${string}","`"," ","|"," ","`","...$PageStateManager.${string}","`"," ","|"," ","`","...$PageFactory.${string}","`"," ","|"," ","`","...$ComponentUtils.${string}","`"," ","|"," ","`","...$Utils.${string}","`"," ","|"," ","`","...$PageHandlerRegistry.${string}","`"," ","|"," ","`","...$PageManager.${string}","`"," ","|"," ","`","...$RouteFactory.${string}","`"," ","|"," ","`","...$Router.${string}","`"," ","|"," ","`","...$RouteNames.${string}","`"," ","|"," ","`","...$RouterEvents.${string}","`"," ","|"," ","`","...$HttpUrlTransformer.${string}","`"," ","|"," ","`","...$HttpAgentProxy.${string}","`"," ","|"," ","`","...$Http.${string}","`"," ","|"," ","`","...$HttpStatusCode.${string}","`"," ","|"," ","`","...$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"," ","|"," [",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">",", { ",(0,r.kt)("inlineCode",{parentName:"p"},"optional"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," }])[]"),(0,r.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions"),".",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions#extensions"},"extensions")),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L44"},"packages/core/src/router/Router.ts:44")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"headers"},"headers"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"headers"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L59"},"packages/core/src/router/Router.ts:59")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"httpstatus"},"httpStatus"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"httpStatus"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"number")),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L60"},"packages/core/src/router/Router.ts:60")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"managedrootview"},"managedRootView"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"managedRootView"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions"),".",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions#managedrootview"},"managedRootView")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L38"},"packages/core/src/router/Router.ts:38")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"middlewares"},"middlewares"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"middlewares"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,r.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),"[]"),(0,r.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions"),".",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions#middlewares"},"middlewares")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L43"},"packages/core/src/router/Router.ts:43")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"onlyupdate"},"onlyUpdate"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"onlyUpdate"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," (",(0,r.kt)("inlineCode",{parentName:"p"},"controller"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"view"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions"),".",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions#onlyupdate"},"onlyUpdate")),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L39"},"packages/core/src/router/Router.ts:39")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"viewadapter"},"viewAdapter"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"viewAdapter"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions"),".",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions#viewadapter"},"viewAdapter")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L42"},"packages/core/src/router/Router.ts:42")))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[2158],{3905:(e,t,n)=>{n.d(t,{Zo:()=>$,kt:()=>c});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),l=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},$=function(e){var t=l(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,$=p(e,["components","mdxType","originalType","parentName"]),d=l(n),g=r,c=d["".concat(s,".").concat(g)]||d[g]||m[g]||i;return n?a.createElement(c,o(o({ref:t},$),{},{components:n})):a.createElement(c,o({ref:t},$))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=g;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[d]="string"==typeof e?e:r,o[1]=p;for(var l=2;l{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>m,frontMatter:()=>i,metadata:()=>p,toc:()=>l});var a=n(5773),r=(n(7294),n(3905));const i={id:"ima_core.RouteOptions",title:"Interface: RouteOptions",sidebar_label:"@ima/core.RouteOptions",custom_edit_url:null},o=void 0,p={unversionedId:"api/interfaces/ima_core.RouteOptions",id:"api/interfaces/ima_core.RouteOptions",title:"Interface: RouteOptions",description:"@ima/core.RouteOptions",source:"@site/../docs/api/interfaces/ima_core.RouteOptions.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.RouteOptions",permalink:"/api/interfaces/ima_core.RouteOptions",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.RouteOptions",title:"Interface: RouteOptions",sidebar_label:"@ima/core.RouteOptions",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.RouteLocals",permalink:"/api/interfaces/ima_core.RouteLocals"},next:{title:"@ima/core.Settings",permalink:"/api/interfaces/ima_core.Settings"}},s={},l=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:"autoScroll",id:"autoscroll",level:3},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"documentView",id:"documentview",level:3},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"extensions",id:"extensions",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"headers",id:"headers",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"httpStatus",id:"httpstatus",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"managedRootView",id:"managedrootview",level:3},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"middlewares",id:"middlewares",level:3},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"onlyUpdate",id:"onlyupdate",level:3},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"viewAdapter",id:"viewadapter",level:3},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-8",level:4}],$={toc:l},d="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},$,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".RouteOptions"),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteFactoryOptions"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"RouteOptions"))))),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"autoscroll"},"autoScroll"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"autoScroll"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions"),".",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions#autoscroll"},"autoScroll")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L36"},"packages/core/src/router/Router.ts:36")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"documentview"},"documentView"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"documentView"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions"),".",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions#documentview"},"documentView")),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L37"},"packages/core/src/router/Router.ts:37")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"extensions"},"extensions"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"extensions"),": (",(0,r.kt)("inlineCode",{parentName:"p"},'"$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageRenderer"')," ","|"," ","`","$Helper.${string}","`"," ","|"," ","`","$oc.${string}","`"," ","|"," ","`","$Settings.${string}","`"," ","|"," ","`","$Env.${string}","`"," ","|"," ","`","$Protocol.${string}","`"," ","|"," ","`","$Secure.${string}","`"," ","|"," ","`","$Request.${string}","`"," ","|"," ","`","$Response.${string}","`"," ","|"," ","`","$Window.${string}","`"," ","|"," ","`","$Error.${string}","`"," ","|"," ","`","$Dictionary.${string}","`"," ","|"," ","`","$CookieTransformFunction.${string}","`"," ","|"," ","`","$CookieStorage.${string}","`"," ","|"," ","`","$SessionStorage.${string}","`"," ","|"," ","`","$MapStorage.${string}","`"," ","|"," ","`","$WeakMapStorage.${string}","`"," ","|"," ","`","$SessionMapStorage.${string}","`"," ","|"," ","`","$Dispatcher.${string}","`"," ","|"," ","`","$EventBus.${string}","`"," ","|"," ","`","$Observable.${string}","`"," ","|"," ","`","$CacheStorage.${string}","`"," ","|"," ","`","$CacheFactory.${string}","`"," ","|"," ","`","$Cache.${string}","`"," ","|"," ","`","$MetaManager.${string}","`"," ","|"," ","`","$ControllerDecorator.${string}","`"," ","|"," ","`","$PageStateManagerDecorator.${string}","`"," ","|"," ","`","$PageStateManager.${string}","`"," ","|"," ","`","$PageFactory.${string}","`"," ","|"," ","`","$ComponentUtils.${string}","`"," ","|"," ","`","$Utils.${string}","`"," ","|"," ","`","$PageHandlerRegistry.${string}","`"," ","|"," ","`","$PageManager.${string}","`"," ","|"," ","`","$RouteFactory.${string}","`"," ","|"," ","`","$Router.${string}","`"," ","|"," ","`","$RouteNames.${string}","`"," ","|"," ","`","$RouterEvents.${string}","`"," ","|"," ","`","$HttpUrlTransformer.${string}","`"," ","|"," ","`","$HttpAgentProxy.${string}","`"," ","|"," ","`","$Http.${string}","`"," ","|"," ","`","$HttpStatusCode.${string}","`"," ","|"," ","`","$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageRenderer"')," ","|"," ","`","?$Helper.${string}","`"," ","|"," ","`","?$oc.${string}","`"," ","|"," ","`","?$Settings.${string}","`"," ","|"," ","`","?$Env.${string}","`"," ","|"," ","`","?$Protocol.${string}","`"," ","|"," ","`","?$Secure.${string}","`"," ","|"," ","`","?$Request.${string}","`"," ","|"," ","`","?$Response.${string}","`"," ","|"," ","`","?$Window.${string}","`"," ","|"," ","`","?$Error.${string}","`"," ","|"," ","`","?$Dictionary.${string}","`"," ","|"," ","`","?$CookieTransformFunction.${string}","`"," ","|"," ","`","?$CookieStorage.${string}","`"," ","|"," ","`","?$SessionStorage.${string}","`"," ","|"," ","`","?$MapStorage.${string}","`"," ","|"," ","`","?$WeakMapStorage.${string}","`"," ","|"," ","`","?$SessionMapStorage.${string}","`"," ","|"," ","`","?$Dispatcher.${string}","`"," ","|"," ","`","?$EventBus.${string}","`"," ","|"," ","`","?$Observable.${string}","`"," ","|"," ","`","?$CacheStorage.${string}","`"," ","|"," ","`","?$CacheFactory.${string}","`"," ","|"," ","`","?$Cache.${string}","`"," ","|"," ","`","?$MetaManager.${string}","`"," ","|"," ","`","?$ControllerDecorator.${string}","`"," ","|"," ","`","?$PageStateManagerDecorator.${string}","`"," ","|"," ","`","?$PageStateManager.${string}","`"," ","|"," ","`","?$PageFactory.${string}","`"," ","|"," ","`","?$ComponentUtils.${string}","`"," ","|"," ","`","?$Utils.${string}","`"," ","|"," ","`","?$PageHandlerRegistry.${string}","`"," ","|"," ","`","?$PageManager.${string}","`"," ","|"," ","`","?$RouteFactory.${string}","`"," ","|"," ","`","?$Router.${string}","`"," ","|"," ","`","?$RouteNames.${string}","`"," ","|"," ","`","?$RouterEvents.${string}","`"," ","|"," ","`","?$HttpUrlTransformer.${string}","`"," ","|"," ","`","?$HttpAgentProxy.${string}","`"," ","|"," ","`","?$Http.${string}","`"," ","|"," ","`","?$HttpStatusCode.${string}","`"," ","|"," ","`","?$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageRenderer"')," ","|"," ","`","...?$Helper.${string}","`"," ","|"," ","`","...?$oc.${string}","`"," ","|"," ","`","...?$Settings.${string}","`"," ","|"," ","`","...?$Env.${string}","`"," ","|"," ","`","...?$Protocol.${string}","`"," ","|"," ","`","...?$Secure.${string}","`"," ","|"," ","`","...?$Request.${string}","`"," ","|"," ","`","...?$Response.${string}","`"," ","|"," ","`","...?$Window.${string}","`"," ","|"," ","`","...?$Error.${string}","`"," ","|"," ","`","...?$Dictionary.${string}","`"," ","|"," ","`","...?$CookieTransformFunction.${string}","`"," ","|"," ","`","...?$CookieStorage.${string}","`"," ","|"," ","`","...?$SessionStorage.${string}","`"," ","|"," ","`","...?$MapStorage.${string}","`"," ","|"," ","`","...?$WeakMapStorage.${string}","`"," ","|"," ","`","...?$SessionMapStorage.${string}","`"," ","|"," ","`","...?$Dispatcher.${string}","`"," ","|"," ","`","...?$EventBus.${string}","`"," ","|"," ","`","...?$Observable.${string}","`"," ","|"," ","`","...?$CacheStorage.${string}","`"," ","|"," ","`","...?$CacheFactory.${string}","`"," ","|"," ","`","...?$Cache.${string}","`"," ","|"," ","`","...?$MetaManager.${string}","`"," ","|"," ","`","...?$ControllerDecorator.${string}","`"," ","|"," ","`","...?$PageStateManagerDecorator.${string}","`"," ","|"," ","`","...?$PageStateManager.${string}","`"," ","|"," ","`","...?$PageFactory.${string}","`"," ","|"," ","`","...?$ComponentUtils.${string}","`"," ","|"," ","`","...?$Utils.${string}","`"," ","|"," ","`","...?$PageHandlerRegistry.${string}","`"," ","|"," ","`","...?$PageManager.${string}","`"," ","|"," ","`","...?$RouteFactory.${string}","`"," ","|"," ","`","...?$Router.${string}","`"," ","|"," ","`","...?$RouteNames.${string}","`"," ","|"," ","`","...?$RouterEvents.${string}","`"," ","|"," ","`","...?$HttpUrlTransformer.${string}","`"," ","|"," ","`","...?$HttpAgentProxy.${string}","`"," ","|"," ","`","...?$Http.${string}","`"," ","|"," ","`","...?$HttpStatusCode.${string}","`"," ","|"," ","`","...?$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageRenderer"')," ","|"," ","`","...$Helper.${string}","`"," ","|"," ","`","...$oc.${string}","`"," ","|"," ","`","...$Settings.${string}","`"," ","|"," ","`","...$Env.${string}","`"," ","|"," ","`","...$Protocol.${string}","`"," ","|"," ","`","...$Secure.${string}","`"," ","|"," ","`","...$Request.${string}","`"," ","|"," ","`","...$Response.${string}","`"," ","|"," ","`","...$Window.${string}","`"," ","|"," ","`","...$Error.${string}","`"," ","|"," ","`","...$Dictionary.${string}","`"," ","|"," ","`","...$CookieTransformFunction.${string}","`"," ","|"," ","`","...$CookieStorage.${string}","`"," ","|"," ","`","...$SessionStorage.${string}","`"," ","|"," ","`","...$MapStorage.${string}","`"," ","|"," ","`","...$WeakMapStorage.${string}","`"," ","|"," ","`","...$SessionMapStorage.${string}","`"," ","|"," ","`","...$Dispatcher.${string}","`"," ","|"," ","`","...$EventBus.${string}","`"," ","|"," ","`","...$Observable.${string}","`"," ","|"," ","`","...$CacheStorage.${string}","`"," ","|"," ","`","...$CacheFactory.${string}","`"," ","|"," ","`","...$Cache.${string}","`"," ","|"," ","`","...$MetaManager.${string}","`"," ","|"," ","`","...$ControllerDecorator.${string}","`"," ","|"," ","`","...$PageStateManagerDecorator.${string}","`"," ","|"," ","`","...$PageStateManager.${string}","`"," ","|"," ","`","...$PageFactory.${string}","`"," ","|"," ","`","...$ComponentUtils.${string}","`"," ","|"," ","`","...$Utils.${string}","`"," ","|"," ","`","...$PageHandlerRegistry.${string}","`"," ","|"," ","`","...$PageManager.${string}","`"," ","|"," ","`","...$RouteFactory.${string}","`"," ","|"," ","`","...$Router.${string}","`"," ","|"," ","`","...$RouteNames.${string}","`"," ","|"," ","`","...$RouterEvents.${string}","`"," ","|"," ","`","...$HttpUrlTransformer.${string}","`"," ","|"," ","`","...$HttpAgentProxy.${string}","`"," ","|"," ","`","...$Http.${string}","`"," ","|"," ","`","...$HttpStatusCode.${string}","`"," ","|"," ","`","...$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"," ","|"," [",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">",", { ",(0,r.kt)("inlineCode",{parentName:"p"},"optional"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," }])[]"),(0,r.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions"),".",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions#extensions"},"extensions")),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L44"},"packages/core/src/router/Router.ts:44")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"headers"},"headers"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"headers"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L59"},"packages/core/src/router/Router.ts:59")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"httpstatus"},"httpStatus"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"httpStatus"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"number")),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L60"},"packages/core/src/router/Router.ts:60")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"managedrootview"},"managedRootView"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"managedRootView"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions"),".",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions#managedrootview"},"managedRootView")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L38"},"packages/core/src/router/Router.ts:38")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"middlewares"},"middlewares"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"middlewares"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,r.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),"[]"),(0,r.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions"),".",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions#middlewares"},"middlewares")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L43"},"packages/core/src/router/Router.ts:43")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"onlyupdate"},"onlyUpdate"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"onlyUpdate"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," (",(0,r.kt)("inlineCode",{parentName:"p"},"controller"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"view"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions"),".",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions#onlyupdate"},"onlyUpdate")),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L39"},"packages/core/src/router/Router.ts:39")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"viewadapter"},"viewAdapter"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"viewAdapter"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions"),".",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteFactoryOptions#viewadapter"},"viewAdapter")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L42"},"packages/core/src/router/Router.ts:42")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0b304565.4dbe4cf2.js b/assets/js/0b304565.7e3685a6.js similarity index 90% rename from assets/js/0b304565.4dbe4cf2.js rename to assets/js/0b304565.7e3685a6.js index 84e196b362..0c4d1d0055 100644 --- a/assets/js/0b304565.4dbe4cf2.js +++ b/assets/js/0b304565.7e3685a6.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[1097],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>u});var n=a(7294);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var o=n.createContext({}),s=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=s(e.components);return n.createElement(o.Provider,{value:t},e.children)},c="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,i=e.mdxType,r=e.originalType,o=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),c=s(a),m=i,u=c["".concat(o,".").concat(m)]||c[m]||k[m]||r;return a?n.createElement(u,l(l({ref:t},d),{},{components:a})):n.createElement(u,l({ref:t},d))}));function u(e,t){var a=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=a.length,l=new Array(r);l[0]=m;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[c]="string"==typeof e?e:i,l[1]=p;for(var s=2;s{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>k,frontMatter:()=>r,metadata:()=>p,toc:()=>s});var n=a(5773),i=(a(7294),a(3905));const r={id:"ima_core.GlobalImaObject",title:"Interface: GlobalImaObject",sidebar_label:"@ima/core.GlobalImaObject",custom_edit_url:null},l=void 0,p={unversionedId:"api/interfaces/ima_core.GlobalImaObject",id:"api/interfaces/ima_core.GlobalImaObject",title:"Interface: GlobalImaObject",description:"@ima/core.GlobalImaObject",source:"@site/../docs/api/interfaces/ima_core.GlobalImaObject.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.GlobalImaObject",permalink:"/api/interfaces/ima_core.GlobalImaObject",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.GlobalImaObject",title:"Interface: GlobalImaObject",sidebar_label:"@ima/core.GlobalImaObject",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.Environment",permalink:"/api/interfaces/ima_core.Environment"},next:{title:"@ima/core.HttpAgentRequestOptions",permalink:"/api/interfaces/ima_core.HttpAgentRequestOptions"}},o={},s=[{value:"Properties",id:"properties",level:2},{value:"$App",id:"app",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"$Debug",id:"debug",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"$Env",id:"env",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"$Host",id:"host",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"$IMA",id:"ima",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"$Language",id:"language",level:3},{value:"Defined in",id:"defined-in-5",level:4},{value:"$LanguagePartPath",id:"languagepartpath",level:3},{value:"Defined in",id:"defined-in-6",level:4},{value:"$Path",id:"path",level:3},{value:"Defined in",id:"defined-in-7",level:4},{value:"$Protocol",id:"protocol",level:3},{value:"Defined in",id:"defined-in-8",level:4},{value:"$PublicPath",id:"publicpath",level:3},{value:"Defined in",id:"defined-in-9",level:4},{value:"$RequestID",id:"requestid",level:3},{value:"Defined in",id:"defined-in-10",level:4},{value:"$Root",id:"root",level:3},{value:"Defined in",id:"defined-in-11",level:4},{value:"$Version",id:"version",level:3},{value:"Defined in",id:"defined-in-12",level:4},{value:"Cache",id:"cache",level:3},{value:"Defined in",id:"defined-in-13",level:4},{value:"Runner",id:"runner",level:3},{value:"Defined in",id:"defined-in-14",level:4},{value:"SPA",id:"spa",level:3},{value:"Defined in",id:"defined-in-15",level:4},{value:"Test",id:"test",level:3},{value:"Defined in",id:"defined-in-16",level:4},{value:"fatalErrorHandler",id:"fatalerrorhandler",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Parameters",id:"parameters",level:5},{value:"Returns",id:"returns",level:5},{value:"Defined in",id:"defined-in-17",level:4},{value:"i18n",id:"i18n",level:3},{value:"Defined in",id:"defined-in-18",level:4}],d={toc:s},c="wrapper";function k(e){let{components:t,...a}=e;return(0,i.kt)(c,(0,n.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".GlobalImaObject"),(0,i.kt)("h2",{id:"properties"},"Properties"),(0,i.kt)("h3",{id:"app"},"$App"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$App"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"$AppSettings")),(0,i.kt)("h4",{id:"defined-in"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L54"},"packages/core/src/types.ts:54")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"debug"},"$Debug"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Debug"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"boolean")),(0,i.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L56"},"packages/core/src/types.ts:56")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"env"},"$Env"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Env"),": keyof ",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.AppEnvironment"},(0,i.kt)("inlineCode",{parentName:"a"},"AppEnvironment"))),(0,i.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L52"},"packages/core/src/types.ts:52")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"host"},"$Host"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Host"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L58"},"packages/core/src/types.ts:58")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"ima"},"$IMA"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$IMA"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.GlobalImaObject"},(0,i.kt)("inlineCode",{parentName:"a"},"GlobalImaObject"))),(0,i.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L65"},"packages/core/src/types.ts:65")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"language"},"$Language"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Language"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L55"},"packages/core/src/types.ts:55")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"languagepartpath"},"$LanguagePartPath"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$LanguagePartPath"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L61"},"packages/core/src/types.ts:61")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"path"},"$Path"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Path"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L59"},"packages/core/src/types.ts:59")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"protocol"},"$Protocol"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Protocol"),": ",(0,i.kt)("inlineCode",{parentName:"p"},'"http:"')," ","|"," ",(0,i.kt)("inlineCode",{parentName:"p"},'"https:"')),(0,i.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L57"},"packages/core/src/types.ts:57")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"publicpath"},"$PublicPath"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$PublicPath"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L67"},"packages/core/src/types.ts:67")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"requestid"},"$RequestID"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$RequestID"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L66"},"packages/core/src/types.ts:66")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"root"},"$Root"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Root"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L60"},"packages/core/src/types.ts:60")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"version"},"$Version"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Version"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L53"},"packages/core/src/types.ts:53")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"cache"},"Cache"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"Cache"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"object")),(0,i.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L70"},"packages/core/src/types.ts:70")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"runner"},"Runner"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"Runner"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"object")),(0,i.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L62"},"packages/core/src/types.ts:62")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"spa"},"SPA"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"SPA"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"boolean")),(0,i.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L64"},"packages/core/src/types.ts:64")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"test"},"Test"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"Test"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"boolean")),(0,i.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L63"},"packages/core/src/types.ts:63")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"fatalerrorhandler"},"fatalErrorHandler"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"fatalErrorHandler"),": (",(0,i.kt)("inlineCode",{parentName:"p"},"error"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"Error"),") => ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,i.kt)("p",null,"\u25b8 (",(0,i.kt)("inlineCode",{parentName:"p"},"error"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h5",{id:"parameters"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"error")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Error"))))),(0,i.kt)("h5",{id:"returns"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L69"},"packages/core/src/types.ts:69")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"i18n"},"i18n"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"i18n"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dictionarydata"},(0,i.kt)("inlineCode",{parentName:"a"},"DictionaryData"))),(0,i.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L68"},"packages/core/src/types.ts:68")))}k.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[1097],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>u});var n=a(7294);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var o=n.createContext({}),s=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=s(e.components);return n.createElement(o.Provider,{value:t},e.children)},c="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,i=e.mdxType,r=e.originalType,o=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),c=s(a),m=i,u=c["".concat(o,".").concat(m)]||c[m]||k[m]||r;return a?n.createElement(u,l(l({ref:t},d),{},{components:a})):n.createElement(u,l({ref:t},d))}));function u(e,t){var a=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=a.length,l=new Array(r);l[0]=m;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[c]="string"==typeof e?e:i,l[1]=p;for(var s=2;s{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>k,frontMatter:()=>r,metadata:()=>p,toc:()=>s});var n=a(5773),i=(a(7294),a(3905));const r={id:"ima_core.GlobalImaObject",title:"Interface: GlobalImaObject",sidebar_label:"@ima/core.GlobalImaObject",custom_edit_url:null},l=void 0,p={unversionedId:"api/interfaces/ima_core.GlobalImaObject",id:"api/interfaces/ima_core.GlobalImaObject",title:"Interface: GlobalImaObject",description:"@ima/core.GlobalImaObject",source:"@site/../docs/api/interfaces/ima_core.GlobalImaObject.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.GlobalImaObject",permalink:"/api/interfaces/ima_core.GlobalImaObject",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.GlobalImaObject",title:"Interface: GlobalImaObject",sidebar_label:"@ima/core.GlobalImaObject",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.Environment",permalink:"/api/interfaces/ima_core.Environment"},next:{title:"@ima/core.HttpAgentRequestOptions",permalink:"/api/interfaces/ima_core.HttpAgentRequestOptions"}},o={},s=[{value:"Properties",id:"properties",level:2},{value:"$App",id:"app",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"$Debug",id:"debug",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"$Env",id:"env",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"$Host",id:"host",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"$IMA",id:"ima",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"$Language",id:"language",level:3},{value:"Defined in",id:"defined-in-5",level:4},{value:"$LanguagePartPath",id:"languagepartpath",level:3},{value:"Defined in",id:"defined-in-6",level:4},{value:"$Path",id:"path",level:3},{value:"Defined in",id:"defined-in-7",level:4},{value:"$Protocol",id:"protocol",level:3},{value:"Defined in",id:"defined-in-8",level:4},{value:"$PublicPath",id:"publicpath",level:3},{value:"Defined in",id:"defined-in-9",level:4},{value:"$RequestID",id:"requestid",level:3},{value:"Defined in",id:"defined-in-10",level:4},{value:"$Root",id:"root",level:3},{value:"Defined in",id:"defined-in-11",level:4},{value:"$Version",id:"version",level:3},{value:"Defined in",id:"defined-in-12",level:4},{value:"Cache",id:"cache",level:3},{value:"Defined in",id:"defined-in-13",level:4},{value:"Runner",id:"runner",level:3},{value:"Defined in",id:"defined-in-14",level:4},{value:"SPA",id:"spa",level:3},{value:"Defined in",id:"defined-in-15",level:4},{value:"Test",id:"test",level:3},{value:"Defined in",id:"defined-in-16",level:4},{value:"fatalErrorHandler",id:"fatalerrorhandler",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Parameters",id:"parameters",level:5},{value:"Returns",id:"returns",level:5},{value:"Defined in",id:"defined-in-17",level:4},{value:"i18n",id:"i18n",level:3},{value:"Defined in",id:"defined-in-18",level:4}],d={toc:s},c="wrapper";function k(e){let{components:t,...a}=e;return(0,i.kt)(c,(0,n.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".GlobalImaObject"),(0,i.kt)("h2",{id:"properties"},"Properties"),(0,i.kt)("h3",{id:"app"},"$App"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$App"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"$AppSettings")),(0,i.kt)("h4",{id:"defined-in"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L54"},"packages/core/src/types.ts:54")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"debug"},"$Debug"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Debug"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"boolean")),(0,i.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L56"},"packages/core/src/types.ts:56")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"env"},"$Env"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Env"),": keyof ",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.AppEnvironment"},(0,i.kt)("inlineCode",{parentName:"a"},"AppEnvironment"))),(0,i.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L52"},"packages/core/src/types.ts:52")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"host"},"$Host"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Host"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L58"},"packages/core/src/types.ts:58")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"ima"},"$IMA"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$IMA"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.GlobalImaObject"},(0,i.kt)("inlineCode",{parentName:"a"},"GlobalImaObject"))),(0,i.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L65"},"packages/core/src/types.ts:65")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"language"},"$Language"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Language"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L55"},"packages/core/src/types.ts:55")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"languagepartpath"},"$LanguagePartPath"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$LanguagePartPath"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L61"},"packages/core/src/types.ts:61")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"path"},"$Path"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Path"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L59"},"packages/core/src/types.ts:59")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"protocol"},"$Protocol"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Protocol"),": ",(0,i.kt)("inlineCode",{parentName:"p"},'"http:"')," ","|"," ",(0,i.kt)("inlineCode",{parentName:"p"},'"https:"')),(0,i.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L57"},"packages/core/src/types.ts:57")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"publicpath"},"$PublicPath"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$PublicPath"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L67"},"packages/core/src/types.ts:67")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"requestid"},"$RequestID"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$RequestID"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L66"},"packages/core/src/types.ts:66")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"root"},"$Root"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Root"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L60"},"packages/core/src/types.ts:60")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"version"},"$Version"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Version"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L53"},"packages/core/src/types.ts:53")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"cache"},"Cache"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"Cache"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"object")),(0,i.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L70"},"packages/core/src/types.ts:70")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"runner"},"Runner"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"Runner"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"object")),(0,i.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L62"},"packages/core/src/types.ts:62")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"spa"},"SPA"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"SPA"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"boolean")),(0,i.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L64"},"packages/core/src/types.ts:64")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"test"},"Test"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"Test"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"boolean")),(0,i.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L63"},"packages/core/src/types.ts:63")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"fatalerrorhandler"},"fatalErrorHandler"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"fatalErrorHandler"),": (",(0,i.kt)("inlineCode",{parentName:"p"},"error"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"Error"),") => ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,i.kt)("p",null,"\u25b8 (",(0,i.kt)("inlineCode",{parentName:"p"},"error"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h5",{id:"parameters"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"error")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Error"))))),(0,i.kt)("h5",{id:"returns"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L69"},"packages/core/src/types.ts:69")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"i18n"},"i18n"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"i18n"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dictionarydata"},(0,i.kt)("inlineCode",{parentName:"a"},"DictionaryData"))),(0,i.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L68"},"packages/core/src/types.ts:68")))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0b497735.12154425.js b/assets/js/0b497735.bdb9f3e1.js similarity index 99% rename from assets/js/0b497735.12154425.js rename to assets/js/0b497735.bdb9f3e1.js index ae9e33aacb..f21ef7217c 100644 --- a/assets/js/0b497735.12154425.js +++ b/assets/js/0b497735.bdb9f3e1.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[7006],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>N});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),d=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=d(e.components);return a.createElement(o.Provider,{value:t},e.children)},k="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),k=d(n),u=r,N=k["".concat(o,".").concat(u)]||k[u]||s[u]||l;return n?a.createElement(N,i(i({ref:t},m),{},{components:n})):a.createElement(N,i({ref:t},m))}));function N(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=u;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[k]="string"==typeof e?e:r,i[1]=p;for(var d=2;d{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>s,frontMatter:()=>l,metadata:()=>p,toc:()=>d});var a=n(5773),r=(n(7294),n(3905));const l={id:"ima_react_page_renderer.BlankManagedRootView",title:"Class: BlankManagedRootView",sidebar_label:"@ima/react-page-renderer.BlankManagedRootView",custom_edit_url:null},i=void 0,p={unversionedId:"api/classes/ima_react_page_renderer.BlankManagedRootView",id:"api/classes/ima_react_page_renderer.BlankManagedRootView",title:"Class: BlankManagedRootView",description:"@ima/react-page-renderer.BlankManagedRootView",source:"@site/../docs/api/classes/ima_react_page_renderer.BlankManagedRootView.md",sourceDirName:"api/classes",slug:"/api/classes/ima_react_page_renderer.BlankManagedRootView",permalink:"/api/classes/ima_react_page_renderer.BlankManagedRootView",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_react_page_renderer.BlankManagedRootView",title:"Class: BlankManagedRootView",sidebar_label:"@ima/react-page-renderer.BlankManagedRootView",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/react-page-renderer.AbstractPureComponent",permalink:"/api/classes/ima_react_page_renderer.AbstractPureComponent"},next:{title:"@ima/react-page-renderer.ErrorBoundary",permalink:"/api/classes/ima_react_page_renderer.ErrorBoundary"}},o={},d=[{value:"Type parameters",id:"type-parameters",level:2},{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Parameters",id:"parameters",level:4},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Type parameters",id:"type-parameters-2",level:4},{value:"Parameters",id:"parameters-1",level:4},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"Properties",id:"properties",level:2},{value:"context",id:"context",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"props",id:"props",level:3},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"refs",id:"refs",level:3},{value:"Index signature",id:"index-signature",level:4},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"state",id:"state",level:3},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"contextType",id:"contexttype",level:3},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"Accessors",id:"accessors",level:2},{value:"defaultProps",id:"defaultprops",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"Methods",id:"methods",level:2},{value:"UNSAFE_componentWillMount",id:"unsafe_componentwillmount",level:3},{value:"Returns",id:"returns-1",level:4},{value:"Inherited from",id:"inherited-from-7",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"UNSAFE_componentWillReceiveProps",id:"unsafe_componentwillreceiveprops",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Inherited from",id:"inherited-from-8",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"UNSAFE_componentWillUpdate",id:"unsafe_componentwillupdate",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Inherited from",id:"inherited-from-9",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"componentDidCatch",id:"componentdidcatch",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Inherited from",id:"inherited-from-10",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"componentDidMount",id:"componentdidmount",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Inherited from",id:"inherited-from-11",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"componentDidUpdate",id:"componentdidupdate",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Inherited from",id:"inherited-from-12",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"componentWillMount",id:"componentwillmount",level:3},{value:"Returns",id:"returns-7",level:4},{value:"Inherited from",id:"inherited-from-13",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"componentWillReceiveProps",id:"componentwillreceiveprops",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-8",level:4},{value:"Inherited from",id:"inherited-from-14",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"componentWillUnmount",id:"componentwillunmount",level:3},{value:"Returns",id:"returns-9",level:4},{value:"Inherited from",id:"inherited-from-15",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"componentWillUpdate",id:"componentwillupdate",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-10",level:4},{value:"Inherited from",id:"inherited-from-16",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"forceUpdate",id:"forceupdate",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-11",level:4},{value:"Inherited from",id:"inherited-from-17",level:4},{value:"Defined in",id:"defined-in-18",level:4},{value:"getSnapshotBeforeUpdate",id:"getsnapshotbeforeupdate",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-12",level:4},{value:"Inherited from",id:"inherited-from-18",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"render",id:"render",level:3},{value:"Returns",id:"returns-13",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"setState",id:"setstate",level:3},{value:"Type parameters",id:"type-parameters-3",level:4},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-14",level:4},{value:"Inherited from",id:"inherited-from-19",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"shouldComponentUpdate",id:"shouldcomponentupdate",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-15",level:4},{value:"Inherited from",id:"inherited-from-20",level:4},{value:"Defined in",id:"defined-in-22",level:4}],m={toc:d},k="wrapper";function s(e){let{components:t,...n}=e;return(0,r.kt)(k,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_react_page_renderer"},"@ima/react-page-renderer"),".BlankManagedRootView"),(0,r.kt)("p",null,"Blank managed root view does not nothing except for rendering the current\npage view."),(0,r.kt)("p",null,"This is the default managed root view."),(0,r.kt)("h2",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"BlankManagedRootViewProps")," = ",(0,r.kt)("inlineCode",{parentName:"td"},"BlankManagedRootViewProps"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"Component"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">"),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"BlankManagedRootView"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new BlankManagedRootView"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"props"),")"),(0,r.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"BlankManagedRootViewProps")," = ",(0,r.kt)("inlineCode",{parentName:"td"},"BlankManagedRootViewProps"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"props")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")))),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,"Component",".constructor"),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:515"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new BlankManagedRootView"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"props"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"context"),")"),(0,r.kt)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"BlankManagedRootViewProps")," = ",(0,r.kt)("inlineCode",{parentName:"td"},"BlankManagedRootViewProps"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"props")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"context")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://legacy.reactjs.org/docs/legacy-context.html"},"https://legacy.reactjs.org/docs/legacy-context.html")),(0,r.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,r.kt)("p",null,"Component",".constructor"),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:520"),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"context"},"context"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"context"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("p",null,"If using the new style context, re-declare this in your class to be the\n",(0,r.kt)("inlineCode",{parentName:"p"},"React.ContextType")," of your ",(0,r.kt)("inlineCode",{parentName:"p"},"static contextType"),".\nShould be used with type annotation or static contextType."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"static contextType = MyContext\n// For TS pre-3.7:\ncontext!: React.ContextType\n// For TS 3.7 and above:\ndeclare context: React.ContextType\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://react.dev/reference/react/Component#context"},"https://react.dev/reference/react/Component#context")),(0,r.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,r.kt)("p",null,"Component.context"),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:513"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"props"},"props"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Readonly")," ",(0,r.kt)("strong",{parentName:"p"},"props"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),">"),(0,r.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,r.kt)("p",null,"Component.props"),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:533"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"refs"},"refs"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"refs"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs"},"https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs")),(0,r.kt)("h4",{id:"index-signature"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"ReactInstance")),(0,r.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,r.kt)("p",null,"Component.refs"),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:539"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"state"},"state"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"state"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">"),(0,r.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,r.kt)("p",null,"Component.state"),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:534"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"contexttype"},"contextType"),(0,r.kt)("p",null,"\u25aa ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"contextType"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Context"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">"),(0,r.kt)("p",null,"If set, ",(0,r.kt)("inlineCode",{parentName:"p"},"this.context")," will be set at runtime to the current value of the given Context."),(0,r.kt)("p",null,"Usage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"type MyContext = number\nconst Ctx = React.createContext(0)\n\nclass Foo extends React.Component {\n static contextType = Ctx\n context!: React.ContextType\n render () {\n return <>My context's value: {this.context};\n }\n}\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://react.dev/reference/react/Component#static-contexttype"},"https://react.dev/reference/react/Component#static-contexttype")),(0,r.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,r.kt)("p",null,"Component.contextType"),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:496"),(0,r.kt)("h2",{id:"accessors"},"Accessors"),(0,r.kt)("h3",{id:"defaultprops"},"defaultProps"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("inlineCode",{parentName:"p"},"get")," ",(0,r.kt)("strong",{parentName:"p"},"defaultProps"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"pageView")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"null"))))),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/component/BlankManagedRootView.ts#L23"},"packages/react-page-renderer/src/component/BlankManagedRootView.ts:23")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"unsafe_componentwillmount"},"UNSAFE","_","componentWillMount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"UNSAFE_componentWillMount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before mounting occurs, and before ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#render"),".\nAvoid introducing any side-effects or subscriptions in this method."),(0,r.kt)("p",null,"This method will not stop working in React 17."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use componentDidMount or the constructor instead"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-7"},"Inherited from"),(0,r.kt)("p",null,"Component.UNSAFE","_","componentWillMount"),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:730"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unsafe_componentwillreceiveprops"},"UNSAFE","_","componentWillReceiveProps"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"UNSAFE_componentWillReceiveProps"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called when the component may be receiving new props.\nReact may call this even if props have not changed, so be sure to compare new and existing\nprops if you only want to handle changes."),(0,r.kt)("p",null,"Calling ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," generally does not trigger this method."),(0,r.kt)("p",null,"This method will not stop working in React 17."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use static getDerivedStateFromProps instead"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-8"},"Inherited from"),(0,r.kt)("p",null,"Component.UNSAFE","_","componentWillReceiveProps"),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:762"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unsafe_componentwillupdate"},"UNSAFE","_","componentWillUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"UNSAFE_componentWillUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before rendering when new props or state is received. Not called for the initial render."),(0,r.kt)("p",null,"Note: You cannot call ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," here."),(0,r.kt)("p",null,"This method will not stop working in React 17."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use getSnapshotBeforeUpdate instead"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-9"},"Inherited from"),(0,r.kt)("p",null,"Component.UNSAFE","_","componentWillUpdate"),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:790"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentdidcatch"},"componentDidCatch"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentDidCatch"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"error"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"errorInfo"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Catches exceptions generated in descendant components. Unhandled exceptions will cause\nthe entire component tree to unmount."),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"error")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Error"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"errorInfo")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ErrorInfo"))))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-10"},"Inherited from"),(0,r.kt)("p",null,"Component.componentDidCatch"),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:659"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentdidmount"},"componentDidMount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentDidMount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately after a component is mounted. Setting state here will trigger re-rendering."),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-11"},"Inherited from"),(0,r.kt)("p",null,"Component.componentDidMount"),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:638"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentdidupdate"},"componentDidUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentDidUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prevProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"prevState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"snapshot?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately after updating occurs. Not called for the initial render."),(0,r.kt)("p",null,"The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null."),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"snapshot?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS"))))),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-12"},"Inherited from"),(0,r.kt)("p",null,"Component.componentDidUpdate"),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:701"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillmount"},"componentWillMount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillMount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before mounting occurs, and before ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#render"),".\nAvoid introducing any side-effects or subscriptions in this method."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use componentDidMount or the constructor instead; will stop working in React 17"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-13"},"Inherited from"),(0,r.kt)("p",null,"Component.componentWillMount"),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:716"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillreceiveprops"},"componentWillReceiveProps"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillReceiveProps"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called when the component may be receiving new props.\nReact may call this even if props have not changed, so be sure to compare new and existing\nprops if you only want to handle changes."),(0,r.kt)("p",null,"Calling ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," generally does not trigger this method."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use static getDerivedStateFromProps instead; will stop working in React 17"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-14"},"Inherited from"),(0,r.kt)("p",null,"Component.componentWillReceiveProps"),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:745"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillunmount"},"componentWillUnmount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillUnmount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as\ncancelled network requests, or cleaning up any DOM elements created in ",(0,r.kt)("inlineCode",{parentName:"p"},"componentDidMount"),"."),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-15"},"Inherited from"),(0,r.kt)("p",null,"Component.componentWillUnmount"),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:654"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillupdate"},"componentWillUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before rendering when new props or state is received. Not called for the initial render."),(0,r.kt)("p",null,"Note: You cannot call ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," here."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-16"},"Inherited from"),(0,r.kt)("p",null,"Component.componentWillUpdate"),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:775"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"forceupdate"},"forceUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"forceUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"callback?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"callback?")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))))),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-17"},"Inherited from"),(0,r.kt)("p",null,"Component.forceUpdate"),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:530"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getsnapshotbeforeupdate"},"getSnapshotBeforeUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"getSnapshotBeforeUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prevProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"prevState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"SS")),(0,r.kt)("p",null,"Runs before React applies the result of ",(0,r.kt)("inlineCode",{parentName:"p"},"render")," to the document, and\nreturns an object to be given to componentDidUpdate. Useful for saving\nthings such as scroll position before ",(0,r.kt)("inlineCode",{parentName:"p"},"render")," causes changes to it."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated\nlifecycle events from running."),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")))),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"SS")),(0,r.kt)("h4",{id:"inherited-from-18"},"Inherited from"),(0,r.kt)("p",null,"Component.getSnapshotBeforeUpdate"),(0,r.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:695"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"render"},"render"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"render"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"ReactElement"),"<{}, ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"JSXElementConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"),(0,r.kt)("h4",{id:"returns-13"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"ReactElement"),"<{}, ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"JSXElementConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Inherit Doc"))),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,"Component.render"),(0,r.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/component/BlankManagedRootView.ts#L32"},"packages/react-page-renderer/src/component/BlankManagedRootView.ts:32")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setstate"},"setState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setState"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"K"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"state"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"callback?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-parameters-3"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"K")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"symbol"))))),(0,r.kt)("h4",{id:"parameters-10"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"S")," ","|"," (",(0,r.kt)("inlineCode",{parentName:"td"},"prevState"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">",", ",(0,r.kt)("inlineCode",{parentName:"td"},"props"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">",") => ",(0,r.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"K"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"K"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"callback?")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))))),(0,r.kt)("h4",{id:"returns-14"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-19"},"Inherited from"),(0,r.kt)("p",null,"Component.setState"),(0,r.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:525"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"shouldcomponentupdate"},"shouldComponentUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"shouldComponentUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Called to determine whether the change in props and state should trigger a re-render."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Component")," always returns true.\n",(0,r.kt)("inlineCode",{parentName:"p"},"PureComponent")," implements a shallow comparison on props and state and returns true if any\nprops or states have changed."),(0,r.kt)("p",null,"If false is returned, ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#render"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"componentWillUpdate"),"\nand ",(0,r.kt)("inlineCode",{parentName:"p"},"componentDidUpdate")," will not be called."),(0,r.kt)("h4",{id:"parameters-11"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-15"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"inherited-from-20"},"Inherited from"),(0,r.kt)("p",null,"Component.shouldComponentUpdate"),(0,r.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:649"))}s.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[7006],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>N});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),d=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=d(e.components);return a.createElement(o.Provider,{value:t},e.children)},k="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),k=d(n),u=r,N=k["".concat(o,".").concat(u)]||k[u]||s[u]||l;return n?a.createElement(N,i(i({ref:t},m),{},{components:n})):a.createElement(N,i({ref:t},m))}));function N(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=u;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[k]="string"==typeof e?e:r,i[1]=p;for(var d=2;d{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>s,frontMatter:()=>l,metadata:()=>p,toc:()=>d});var a=n(5773),r=(n(7294),n(3905));const l={id:"ima_react_page_renderer.BlankManagedRootView",title:"Class: BlankManagedRootView",sidebar_label:"@ima/react-page-renderer.BlankManagedRootView",custom_edit_url:null},i=void 0,p={unversionedId:"api/classes/ima_react_page_renderer.BlankManagedRootView",id:"api/classes/ima_react_page_renderer.BlankManagedRootView",title:"Class: BlankManagedRootView",description:"@ima/react-page-renderer.BlankManagedRootView",source:"@site/../docs/api/classes/ima_react_page_renderer.BlankManagedRootView.md",sourceDirName:"api/classes",slug:"/api/classes/ima_react_page_renderer.BlankManagedRootView",permalink:"/api/classes/ima_react_page_renderer.BlankManagedRootView",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_react_page_renderer.BlankManagedRootView",title:"Class: BlankManagedRootView",sidebar_label:"@ima/react-page-renderer.BlankManagedRootView",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/react-page-renderer.AbstractPureComponent",permalink:"/api/classes/ima_react_page_renderer.AbstractPureComponent"},next:{title:"@ima/react-page-renderer.ErrorBoundary",permalink:"/api/classes/ima_react_page_renderer.ErrorBoundary"}},o={},d=[{value:"Type parameters",id:"type-parameters",level:2},{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Parameters",id:"parameters",level:4},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Type parameters",id:"type-parameters-2",level:4},{value:"Parameters",id:"parameters-1",level:4},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"Properties",id:"properties",level:2},{value:"context",id:"context",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"props",id:"props",level:3},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"refs",id:"refs",level:3},{value:"Index signature",id:"index-signature",level:4},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"state",id:"state",level:3},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"contextType",id:"contexttype",level:3},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"Accessors",id:"accessors",level:2},{value:"defaultProps",id:"defaultprops",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"Methods",id:"methods",level:2},{value:"UNSAFE_componentWillMount",id:"unsafe_componentwillmount",level:3},{value:"Returns",id:"returns-1",level:4},{value:"Inherited from",id:"inherited-from-7",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"UNSAFE_componentWillReceiveProps",id:"unsafe_componentwillreceiveprops",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Inherited from",id:"inherited-from-8",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"UNSAFE_componentWillUpdate",id:"unsafe_componentwillupdate",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Inherited from",id:"inherited-from-9",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"componentDidCatch",id:"componentdidcatch",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Inherited from",id:"inherited-from-10",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"componentDidMount",id:"componentdidmount",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Inherited from",id:"inherited-from-11",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"componentDidUpdate",id:"componentdidupdate",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Inherited from",id:"inherited-from-12",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"componentWillMount",id:"componentwillmount",level:3},{value:"Returns",id:"returns-7",level:4},{value:"Inherited from",id:"inherited-from-13",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"componentWillReceiveProps",id:"componentwillreceiveprops",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-8",level:4},{value:"Inherited from",id:"inherited-from-14",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"componentWillUnmount",id:"componentwillunmount",level:3},{value:"Returns",id:"returns-9",level:4},{value:"Inherited from",id:"inherited-from-15",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"componentWillUpdate",id:"componentwillupdate",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-10",level:4},{value:"Inherited from",id:"inherited-from-16",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"forceUpdate",id:"forceupdate",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-11",level:4},{value:"Inherited from",id:"inherited-from-17",level:4},{value:"Defined in",id:"defined-in-18",level:4},{value:"getSnapshotBeforeUpdate",id:"getsnapshotbeforeupdate",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-12",level:4},{value:"Inherited from",id:"inherited-from-18",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"render",id:"render",level:3},{value:"Returns",id:"returns-13",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"setState",id:"setstate",level:3},{value:"Type parameters",id:"type-parameters-3",level:4},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-14",level:4},{value:"Inherited from",id:"inherited-from-19",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"shouldComponentUpdate",id:"shouldcomponentupdate",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-15",level:4},{value:"Inherited from",id:"inherited-from-20",level:4},{value:"Defined in",id:"defined-in-22",level:4}],m={toc:d},k="wrapper";function s(e){let{components:t,...n}=e;return(0,r.kt)(k,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_react_page_renderer"},"@ima/react-page-renderer"),".BlankManagedRootView"),(0,r.kt)("p",null,"Blank managed root view does not nothing except for rendering the current\npage view."),(0,r.kt)("p",null,"This is the default managed root view."),(0,r.kt)("h2",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"BlankManagedRootViewProps")," = ",(0,r.kt)("inlineCode",{parentName:"td"},"BlankManagedRootViewProps"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"Component"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">"),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"BlankManagedRootView"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new BlankManagedRootView"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"props"),")"),(0,r.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"BlankManagedRootViewProps")," = ",(0,r.kt)("inlineCode",{parentName:"td"},"BlankManagedRootViewProps"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"props")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")))),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,"Component",".constructor"),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:515"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new BlankManagedRootView"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"props"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"context"),")"),(0,r.kt)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"BlankManagedRootViewProps")," = ",(0,r.kt)("inlineCode",{parentName:"td"},"BlankManagedRootViewProps"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"props")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"context")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://legacy.reactjs.org/docs/legacy-context.html"},"https://legacy.reactjs.org/docs/legacy-context.html")),(0,r.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,r.kt)("p",null,"Component",".constructor"),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:520"),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"context"},"context"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"context"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("p",null,"If using the new style context, re-declare this in your class to be the\n",(0,r.kt)("inlineCode",{parentName:"p"},"React.ContextType")," of your ",(0,r.kt)("inlineCode",{parentName:"p"},"static contextType"),".\nShould be used with type annotation or static contextType."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"static contextType = MyContext\n// For TS pre-3.7:\ncontext!: React.ContextType\n// For TS 3.7 and above:\ndeclare context: React.ContextType\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://react.dev/reference/react/Component#context"},"https://react.dev/reference/react/Component#context")),(0,r.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,r.kt)("p",null,"Component.context"),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:513"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"props"},"props"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Readonly")," ",(0,r.kt)("strong",{parentName:"p"},"props"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),">"),(0,r.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,r.kt)("p",null,"Component.props"),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:533"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"refs"},"refs"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"refs"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs"},"https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs")),(0,r.kt)("h4",{id:"index-signature"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"ReactInstance")),(0,r.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,r.kt)("p",null,"Component.refs"),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:539"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"state"},"state"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"state"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">"),(0,r.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,r.kt)("p",null,"Component.state"),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:534"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"contexttype"},"contextType"),(0,r.kt)("p",null,"\u25aa ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"contextType"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Context"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">"),(0,r.kt)("p",null,"If set, ",(0,r.kt)("inlineCode",{parentName:"p"},"this.context")," will be set at runtime to the current value of the given Context."),(0,r.kt)("p",null,"Usage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"type MyContext = number\nconst Ctx = React.createContext(0)\n\nclass Foo extends React.Component {\n static contextType = Ctx\n context!: React.ContextType\n render () {\n return <>My context's value: {this.context};\n }\n}\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://react.dev/reference/react/Component#static-contexttype"},"https://react.dev/reference/react/Component#static-contexttype")),(0,r.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,r.kt)("p",null,"Component.contextType"),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:496"),(0,r.kt)("h2",{id:"accessors"},"Accessors"),(0,r.kt)("h3",{id:"defaultprops"},"defaultProps"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("inlineCode",{parentName:"p"},"get")," ",(0,r.kt)("strong",{parentName:"p"},"defaultProps"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"pageView")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"null"))))),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/component/BlankManagedRootView.ts#L23"},"packages/react-page-renderer/src/component/BlankManagedRootView.ts:23")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"unsafe_componentwillmount"},"UNSAFE","_","componentWillMount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"UNSAFE_componentWillMount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before mounting occurs, and before ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#render"),".\nAvoid introducing any side-effects or subscriptions in this method."),(0,r.kt)("p",null,"This method will not stop working in React 17."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use componentDidMount or the constructor instead"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-7"},"Inherited from"),(0,r.kt)("p",null,"Component.UNSAFE","_","componentWillMount"),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:730"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unsafe_componentwillreceiveprops"},"UNSAFE","_","componentWillReceiveProps"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"UNSAFE_componentWillReceiveProps"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called when the component may be receiving new props.\nReact may call this even if props have not changed, so be sure to compare new and existing\nprops if you only want to handle changes."),(0,r.kt)("p",null,"Calling ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," generally does not trigger this method."),(0,r.kt)("p",null,"This method will not stop working in React 17."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use static getDerivedStateFromProps instead"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-8"},"Inherited from"),(0,r.kt)("p",null,"Component.UNSAFE","_","componentWillReceiveProps"),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:762"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unsafe_componentwillupdate"},"UNSAFE","_","componentWillUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"UNSAFE_componentWillUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before rendering when new props or state is received. Not called for the initial render."),(0,r.kt)("p",null,"Note: You cannot call ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," here."),(0,r.kt)("p",null,"This method will not stop working in React 17."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use getSnapshotBeforeUpdate instead"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-9"},"Inherited from"),(0,r.kt)("p",null,"Component.UNSAFE","_","componentWillUpdate"),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:790"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentdidcatch"},"componentDidCatch"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentDidCatch"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"error"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"errorInfo"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Catches exceptions generated in descendant components. Unhandled exceptions will cause\nthe entire component tree to unmount."),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"error")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Error"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"errorInfo")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ErrorInfo"))))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-10"},"Inherited from"),(0,r.kt)("p",null,"Component.componentDidCatch"),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:659"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentdidmount"},"componentDidMount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentDidMount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately after a component is mounted. Setting state here will trigger re-rendering."),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-11"},"Inherited from"),(0,r.kt)("p",null,"Component.componentDidMount"),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:638"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentdidupdate"},"componentDidUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentDidUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prevProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"prevState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"snapshot?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately after updating occurs. Not called for the initial render."),(0,r.kt)("p",null,"The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null."),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"snapshot?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS"))))),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-12"},"Inherited from"),(0,r.kt)("p",null,"Component.componentDidUpdate"),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:701"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillmount"},"componentWillMount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillMount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before mounting occurs, and before ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#render"),".\nAvoid introducing any side-effects or subscriptions in this method."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use componentDidMount or the constructor instead; will stop working in React 17"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-13"},"Inherited from"),(0,r.kt)("p",null,"Component.componentWillMount"),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:716"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillreceiveprops"},"componentWillReceiveProps"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillReceiveProps"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called when the component may be receiving new props.\nReact may call this even if props have not changed, so be sure to compare new and existing\nprops if you only want to handle changes."),(0,r.kt)("p",null,"Calling ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," generally does not trigger this method."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use static getDerivedStateFromProps instead; will stop working in React 17"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-14"},"Inherited from"),(0,r.kt)("p",null,"Component.componentWillReceiveProps"),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:745"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillunmount"},"componentWillUnmount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillUnmount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as\ncancelled network requests, or cleaning up any DOM elements created in ",(0,r.kt)("inlineCode",{parentName:"p"},"componentDidMount"),"."),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-15"},"Inherited from"),(0,r.kt)("p",null,"Component.componentWillUnmount"),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:654"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillupdate"},"componentWillUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before rendering when new props or state is received. Not called for the initial render."),(0,r.kt)("p",null,"Note: You cannot call ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," here."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-16"},"Inherited from"),(0,r.kt)("p",null,"Component.componentWillUpdate"),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:775"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"forceupdate"},"forceUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"forceUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"callback?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"callback?")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))))),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-17"},"Inherited from"),(0,r.kt)("p",null,"Component.forceUpdate"),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:530"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getsnapshotbeforeupdate"},"getSnapshotBeforeUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"getSnapshotBeforeUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prevProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"prevState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"SS")),(0,r.kt)("p",null,"Runs before React applies the result of ",(0,r.kt)("inlineCode",{parentName:"p"},"render")," to the document, and\nreturns an object to be given to componentDidUpdate. Useful for saving\nthings such as scroll position before ",(0,r.kt)("inlineCode",{parentName:"p"},"render")," causes changes to it."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated\nlifecycle events from running."),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")))),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"SS")),(0,r.kt)("h4",{id:"inherited-from-18"},"Inherited from"),(0,r.kt)("p",null,"Component.getSnapshotBeforeUpdate"),(0,r.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:695"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"render"},"render"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"render"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"ReactElement"),"<{}, ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"JSXElementConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"),(0,r.kt)("h4",{id:"returns-13"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"ReactElement"),"<{}, ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"JSXElementConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Inherit Doc"))),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,"Component.render"),(0,r.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/component/BlankManagedRootView.ts#L32"},"packages/react-page-renderer/src/component/BlankManagedRootView.ts:32")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setstate"},"setState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setState"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"K"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"state"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"callback?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-parameters-3"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"K")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"symbol"))))),(0,r.kt)("h4",{id:"parameters-10"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"S")," ","|"," (",(0,r.kt)("inlineCode",{parentName:"td"},"prevState"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">",", ",(0,r.kt)("inlineCode",{parentName:"td"},"props"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">",") => ",(0,r.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"K"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"K"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"callback?")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))))),(0,r.kt)("h4",{id:"returns-14"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-19"},"Inherited from"),(0,r.kt)("p",null,"Component.setState"),(0,r.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:525"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"shouldcomponentupdate"},"shouldComponentUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"shouldComponentUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Called to determine whether the change in props and state should trigger a re-render."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Component")," always returns true.\n",(0,r.kt)("inlineCode",{parentName:"p"},"PureComponent")," implements a shallow comparison on props and state and returns true if any\nprops or states have changed."),(0,r.kt)("p",null,"If false is returned, ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#render"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"componentWillUpdate"),"\nand ",(0,r.kt)("inlineCode",{parentName:"p"},"componentDidUpdate")," will not be called."),(0,r.kt)("h4",{id:"parameters-11"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-15"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"inherited-from-20"},"Inherited from"),(0,r.kt)("p",null,"Component.shouldComponentUpdate"),(0,r.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:649"))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0f7684f2.d0a36e5f.js b/assets/js/0f7684f2.b3f4ca86.js similarity index 95% rename from assets/js/0f7684f2.d0a36e5f.js rename to assets/js/0f7684f2.b3f4ca86.js index b0238f7047..7771b9548a 100644 --- a/assets/js/0f7684f2.d0a36e5f.js +++ b/assets/js/0f7684f2.b3f4ca86.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[3424],{3905:(e,t,a)=>{a.d(t,{Zo:()=>o,kt:()=>u});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var d=n.createContext({}),s=function(e){var t=n.useContext(d),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},o=function(e){var t=s(e.components);return n.createElement(d.Provider,{value:t},e.children)},m="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,d=e.parentName,o=p(e,["components","mdxType","originalType","parentName"]),m=s(a),g=r,u=m["".concat(d,".").concat(g)]||m[g]||k[g]||i;return a?n.createElement(u,l(l({ref:t},o),{},{components:a})):n.createElement(u,l({ref:t},o))}));function u(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=g;var p={};for(var d in t)hasOwnProperty.call(t,d)&&(p[d]=t[d]);p.originalType=e,p[m]="string"==typeof e?e:r,l[1]=p;for(var s=2;s{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>k,frontMatter:()=>i,metadata:()=>p,toc:()=>s});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_dev_utils.Logger",title:"Class: Logger",sidebar_label:"@ima/dev-utils.Logger",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_dev_utils.Logger",id:"api/classes/ima_dev_utils.Logger",title:"Class: Logger",description:"@ima/dev-utils.Logger",source:"@site/../docs/api/classes/ima_dev_utils.Logger.md",sourceDirName:"api/classes",slug:"/api/classes/ima_dev_utils.Logger",permalink:"/api/classes/ima_dev_utils.Logger",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_dev_utils.Logger",title:"Class: Logger",sidebar_label:"@ima/dev-utils.Logger",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.Window",permalink:"/api/classes/ima_core.Window"},next:{title:"@ima/react-page-renderer.AbstractComponent",permalink:"/api/classes/ima_react_page_renderer.AbstractComponent"}},d={},s=[{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"#globalLogger",id:"globallogger",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"#identifier",id:"identifier",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"#isSilent",id:"issilent",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"innerElapsed",id:"innerelapsed",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Returns",id:"returns",level:5},{value:"Defined in",id:"defined-in-4",level:4},{value:"Methods",id:"methods",level:2},{value:"#log",id:"log",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"endTracking",id:"endtracking",level:3},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"error",id:"error",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"info",id:"info",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"isSilent",id:"issilent-1",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"plugin",id:"plugin",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"setSilent",id:"setsilent",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-7",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"success",id:"success",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-8",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"sync",id:"sync",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-9",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"warn",id:"warn",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-10",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"write",id:"write",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-11",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"writeElapsed",id:"writeelapsed",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-12",level:4},{value:"Defined in",id:"defined-in-16",level:4}],o={toc:s},m="wrapper";function k(e){let{components:t,...a}=e;return(0,r.kt)(m,(0,n.Z)({},o,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_dev_utils"},"@ima/dev-utils"),".Logger"),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new Logger"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"identifier?"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"globalLogger?"),")"),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"identifier?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"globalLogger?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_dev_utils.Logger"},(0,r.kt)("inlineCode",{parentName:"a"},"Logger")))))),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L42"},"logger.ts:42")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"globallogger"},"#globalLogger"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"#globalLogger"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_dev_utils.Logger"},(0,r.kt)("inlineCode",{parentName:"a"},"Logger"))),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L37"},"logger.ts:37")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"identifier"},"#identifier"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"#identifier"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L36"},"logger.ts:36")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"issilent"},"#isSilent"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#isSilent"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"false")),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L38"},"logger.ts:38")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"innerelapsed"},"innerElapsed"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"innerElapsed"),": () => ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Returns time utility function, which when called returns\nformatted elapsed time from it's creation."),(0,r.kt)("h5",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Callback to return formatted elapsed time."),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L40"},"logger.ts:40")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"log"},"#log"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#log"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prefix"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"chalkFn"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"\xabdestructured\xbb?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prefix")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"chalkFn")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"input"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number"),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"\xabdestructured\xbb")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L47"},"logger.ts:47")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"endtracking"},"endTracking"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"endTracking"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L94"},"logger.ts:94")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"error"},"error"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"error"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Error"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L120"},"logger.ts:120")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"info"},"info"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"info"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L112"},"logger.ts:112")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"issilent-1"},"isSilent"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"isSilent"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L164"},"logger.ts:164")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"plugin"},"plugin"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"plugin"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L148"},"logger.ts:148")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setsilent"},"setSilent"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setSilent"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"isSilent"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"isSilent")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))))),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L160"},"logger.ts:160")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"success"},"success"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"success"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L116"},"logger.ts:116")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"sync"},"sync"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"sync"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L144"},"logger.ts:144")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"warn"},"warn"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"warn"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L140"},"logger.ts:140")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"write"},"write"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"write"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L152"},"logger.ts:152")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"writeelapsed"},"writeElapsed"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"writeElapsed"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"elapsed"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-10"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"elapsed")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/dev-utils/src/logger.ts#L156"},"logger.ts:156")))}k.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[3424],{3905:(e,t,a)=>{a.d(t,{Zo:()=>o,kt:()=>u});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var d=n.createContext({}),s=function(e){var t=n.useContext(d),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},o=function(e){var t=s(e.components);return n.createElement(d.Provider,{value:t},e.children)},m="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,d=e.parentName,o=p(e,["components","mdxType","originalType","parentName"]),m=s(a),g=r,u=m["".concat(d,".").concat(g)]||m[g]||k[g]||i;return a?n.createElement(u,l(l({ref:t},o),{},{components:a})):n.createElement(u,l({ref:t},o))}));function u(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=g;var p={};for(var d in t)hasOwnProperty.call(t,d)&&(p[d]=t[d]);p.originalType=e,p[m]="string"==typeof e?e:r,l[1]=p;for(var s=2;s{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>k,frontMatter:()=>i,metadata:()=>p,toc:()=>s});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_dev_utils.Logger",title:"Class: Logger",sidebar_label:"@ima/dev-utils.Logger",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_dev_utils.Logger",id:"api/classes/ima_dev_utils.Logger",title:"Class: Logger",description:"@ima/dev-utils.Logger",source:"@site/../docs/api/classes/ima_dev_utils.Logger.md",sourceDirName:"api/classes",slug:"/api/classes/ima_dev_utils.Logger",permalink:"/api/classes/ima_dev_utils.Logger",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_dev_utils.Logger",title:"Class: Logger",sidebar_label:"@ima/dev-utils.Logger",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.Window",permalink:"/api/classes/ima_core.Window"},next:{title:"@ima/react-page-renderer.AbstractComponent",permalink:"/api/classes/ima_react_page_renderer.AbstractComponent"}},d={},s=[{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"#globalLogger",id:"globallogger",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"#identifier",id:"identifier",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"#isSilent",id:"issilent",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"innerElapsed",id:"innerelapsed",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Returns",id:"returns",level:5},{value:"Defined in",id:"defined-in-4",level:4},{value:"Methods",id:"methods",level:2},{value:"#log",id:"log",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"endTracking",id:"endtracking",level:3},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"error",id:"error",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"info",id:"info",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"isSilent",id:"issilent-1",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"plugin",id:"plugin",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"setSilent",id:"setsilent",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-7",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"success",id:"success",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-8",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"sync",id:"sync",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-9",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"warn",id:"warn",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-10",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"write",id:"write",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-11",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"writeElapsed",id:"writeelapsed",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-12",level:4},{value:"Defined in",id:"defined-in-16",level:4}],o={toc:s},m="wrapper";function k(e){let{components:t,...a}=e;return(0,r.kt)(m,(0,n.Z)({},o,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_dev_utils"},"@ima/dev-utils"),".Logger"),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new Logger"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"identifier?"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"globalLogger?"),")"),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"identifier?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"globalLogger?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_dev_utils.Logger"},(0,r.kt)("inlineCode",{parentName:"a"},"Logger")))))),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L42"},"logger.ts:42")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"globallogger"},"#globalLogger"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"#globalLogger"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_dev_utils.Logger"},(0,r.kt)("inlineCode",{parentName:"a"},"Logger"))),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L37"},"logger.ts:37")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"identifier"},"#identifier"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"#identifier"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L36"},"logger.ts:36")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"issilent"},"#isSilent"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#isSilent"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"false")),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L38"},"logger.ts:38")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"innerelapsed"},"innerElapsed"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"innerElapsed"),": () => ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Returns time utility function, which when called returns\nformatted elapsed time from it's creation."),(0,r.kt)("h5",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Callback to return formatted elapsed time."),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L40"},"logger.ts:40")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"log"},"#log"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#log"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prefix"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"chalkFn"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"\xabdestructured\xbb?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prefix")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"chalkFn")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"input"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number"),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"\xabdestructured\xbb")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L47"},"logger.ts:47")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"endtracking"},"endTracking"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"endTracking"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L94"},"logger.ts:94")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"error"},"error"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"error"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Error"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L120"},"logger.ts:120")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"info"},"info"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"info"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L112"},"logger.ts:112")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"issilent-1"},"isSilent"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"isSilent"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L164"},"logger.ts:164")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"plugin"},"plugin"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"plugin"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L148"},"logger.ts:148")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setsilent"},"setSilent"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setSilent"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"isSilent"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"isSilent")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))))),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L160"},"logger.ts:160")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"success"},"success"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"success"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L116"},"logger.ts:116")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"sync"},"sync"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"sync"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L144"},"logger.ts:144")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"warn"},"warn"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"warn"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L140"},"logger.ts:140")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"write"},"write"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"write"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"message"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"message")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_dev_utils.LoggerOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"LoggerOptions")))))),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L152"},"logger.ts:152")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"writeelapsed"},"writeElapsed"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"writeElapsed"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"elapsed"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-10"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"elapsed")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/dev-utils/src/logger.ts#L156"},"logger.ts:156")))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/106127c8.b47ef8b0.js b/assets/js/106127c8.d7e5cf06.js similarity index 95% rename from assets/js/106127c8.b47ef8b0.js rename to assets/js/106127c8.d7e5cf06.js index 9665ecbba9..8d508f2d9a 100644 --- a/assets/js/106127c8.b47ef8b0.js +++ b/assets/js/106127c8.d7e5cf06.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[8447],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>f});var n=r(7294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var p=n.createContext({}),l=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},s=function(e){var t=l(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,a=e.originalType,p=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),u=l(r),d=i,f=u["".concat(p,".").concat(d)]||u[d]||m[d]||a;return r?n.createElement(f,o(o({ref:t},s),{},{components:r})):n.createElement(f,o({ref:t},s))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=r.length,o=new Array(a);o[0]=d;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[u]="string"==typeof e?e:i,o[1]=c;for(var l=2;l{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>m,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var n=r(5773),i=(r(7294),r(3905));const a={id:"ima_core.ActionTypes",title:"Enumeration: ActionTypes",sidebar_label:"@ima/core.ActionTypes",custom_edit_url:null},o=void 0,c={unversionedId:"api/enums/ima_core.ActionTypes",id:"api/enums/ima_core.ActionTypes",title:"Enumeration: ActionTypes",description:"@ima/core.ActionTypes",source:"@site/../docs/api/enums/ima_core.ActionTypes.md",sourceDirName:"api/enums",slug:"/api/enums/ima_core.ActionTypes",permalink:"/api/enums/ima_core.ActionTypes",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.ActionTypes",title:"Enumeration: ActionTypes",sidebar_label:"@ima/core.ActionTypes",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/react-page-renderer",permalink:"/api/modules/ima_react_page_renderer"},next:{title:"@ima/core.BindingState",permalink:"/api/enums/ima_core.BindingState"}},p={},l=[{value:"Enumeration Members",id:"enumeration-members",level:2},{value:"CLICK",id:"click",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"ERROR",id:"error",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"POP_STATE",id:"pop_state",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"REDIRECT",id:"redirect",level:3},{value:"Defined in",id:"defined-in-3",level:4}],s={toc:l},u="wrapper";function m(e){let{components:t,...r}=e;return(0,i.kt)(u,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".ActionTypes"),(0,i.kt)("p",null,"Name of actions that can trigger routing"),(0,i.kt)("h2",{id:"enumeration-members"},"Enumeration Members"),(0,i.kt)("h3",{id:"click"},"CLICK"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"CLICK")," = ",(0,i.kt)("inlineCode",{parentName:"p"},'"click"')),(0,i.kt)("h4",{id:"defined-in"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ActionTypes.ts#L6"},"packages/core/src/router/ActionTypes.ts:6")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"error"},"ERROR"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"ERROR")," = ",(0,i.kt)("inlineCode",{parentName:"p"},'"error"')),(0,i.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ActionTypes.ts#L8"},"packages/core/src/router/ActionTypes.ts:8")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"pop_state"},"POP","_","STATE"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"POP","_","STATE")," = ",(0,i.kt)("inlineCode",{parentName:"p"},'"popstate"')),(0,i.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ActionTypes.ts#L7"},"packages/core/src/router/ActionTypes.ts:7")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"redirect"},"REDIRECT"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"REDIRECT")," = ",(0,i.kt)("inlineCode",{parentName:"p"},'"redirect"')),(0,i.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ActionTypes.ts#L5"},"packages/core/src/router/ActionTypes.ts:5")))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[8447],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>f});var n=r(7294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var p=n.createContext({}),l=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},s=function(e){var t=l(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,a=e.originalType,p=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),u=l(r),d=i,f=u["".concat(p,".").concat(d)]||u[d]||m[d]||a;return r?n.createElement(f,o(o({ref:t},s),{},{components:r})):n.createElement(f,o({ref:t},s))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=r.length,o=new Array(a);o[0]=d;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[u]="string"==typeof e?e:i,o[1]=c;for(var l=2;l{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>m,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var n=r(5773),i=(r(7294),r(3905));const a={id:"ima_core.ActionTypes",title:"Enumeration: ActionTypes",sidebar_label:"@ima/core.ActionTypes",custom_edit_url:null},o=void 0,c={unversionedId:"api/enums/ima_core.ActionTypes",id:"api/enums/ima_core.ActionTypes",title:"Enumeration: ActionTypes",description:"@ima/core.ActionTypes",source:"@site/../docs/api/enums/ima_core.ActionTypes.md",sourceDirName:"api/enums",slug:"/api/enums/ima_core.ActionTypes",permalink:"/api/enums/ima_core.ActionTypes",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.ActionTypes",title:"Enumeration: ActionTypes",sidebar_label:"@ima/core.ActionTypes",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/react-page-renderer",permalink:"/api/modules/ima_react_page_renderer"},next:{title:"@ima/core.BindingState",permalink:"/api/enums/ima_core.BindingState"}},p={},l=[{value:"Enumeration Members",id:"enumeration-members",level:2},{value:"CLICK",id:"click",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"ERROR",id:"error",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"POP_STATE",id:"pop_state",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"REDIRECT",id:"redirect",level:3},{value:"Defined in",id:"defined-in-3",level:4}],s={toc:l},u="wrapper";function m(e){let{components:t,...r}=e;return(0,i.kt)(u,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".ActionTypes"),(0,i.kt)("p",null,"Name of actions that can trigger routing"),(0,i.kt)("h2",{id:"enumeration-members"},"Enumeration Members"),(0,i.kt)("h3",{id:"click"},"CLICK"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"CLICK")," = ",(0,i.kt)("inlineCode",{parentName:"p"},'"click"')),(0,i.kt)("h4",{id:"defined-in"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ActionTypes.ts#L6"},"packages/core/src/router/ActionTypes.ts:6")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"error"},"ERROR"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"ERROR")," = ",(0,i.kt)("inlineCode",{parentName:"p"},'"error"')),(0,i.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ActionTypes.ts#L8"},"packages/core/src/router/ActionTypes.ts:8")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"pop_state"},"POP","_","STATE"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"POP","_","STATE")," = ",(0,i.kt)("inlineCode",{parentName:"p"},'"popstate"')),(0,i.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ActionTypes.ts#L7"},"packages/core/src/router/ActionTypes.ts:7")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"redirect"},"REDIRECT"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"REDIRECT")," = ",(0,i.kt)("inlineCode",{parentName:"p"},'"redirect"')),(0,i.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ActionTypes.ts#L5"},"packages/core/src/router/ActionTypes.ts:5")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/10617864.29d82948.js b/assets/js/10617864.d4dee5d5.js similarity index 57% rename from assets/js/10617864.29d82948.js rename to assets/js/10617864.d4dee5d5.js index 4aa107240f..68555b77fc 100644 --- a/assets/js/10617864.29d82948.js +++ b/assets/js/10617864.d4dee5d5.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[1594],{3905:(e,a,n)=>{n.d(a,{Zo:()=>c,kt:()=>f});var t=n(7294);function i(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function r(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function o(e){for(var a=1;a=0||(i[n]=e[n]);return i}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=t.createContext({}),s=function(e){var a=t.useContext(p),n=a;return e&&(n="function"==typeof e?e(a):o(o({},a),e)),n},c=function(e){var a=s(e.components);return t.createElement(p.Provider,{value:a},e.children)},d="mdxType",k={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},m=t.forwardRef((function(e,a){var n=e.components,i=e.mdxType,r=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=s(n),m=i,f=d["".concat(p,".").concat(m)]||d[m]||k[m]||r;return n?t.createElement(f,o(o({ref:a},c),{},{components:n})):t.createElement(f,o({ref:a},c))}));function f(e,a){var n=arguments,i=a&&a.mdxType;if("string"==typeof e||i){var r=n.length,o=new Array(r);o[0]=m;var l={};for(var p in a)hasOwnProperty.call(a,p)&&(l[p]=a[p]);l.originalType=e,l[d]="string"==typeof e?e:i,o[1]=l;for(var s=2;s{n.r(a),n.d(a,{assets:()=>p,contentTitle:()=>o,default:()=>k,frontMatter:()=>r,metadata:()=>l,toc:()=>s});var t=n(5773),i=(n(7294),n(3905));const r={id:"ima_core.OCAliasMap",title:"Interface: OCAliasMap",sidebar_label:"@ima/core.OCAliasMap",custom_edit_url:null},o=void 0,l={unversionedId:"api/interfaces/ima_core.OCAliasMap",id:"api/interfaces/ima_core.OCAliasMap",title:"Interface: OCAliasMap",description:"@ima/core.OCAliasMap",source:"@site/../docs/api/interfaces/ima_core.OCAliasMap.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.OCAliasMap",permalink:"/api/interfaces/ima_core.OCAliasMap",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.OCAliasMap",title:"Interface: OCAliasMap",sidebar_label:"@ima/core.OCAliasMap",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.ManifestAsset",permalink:"/api/interfaces/ima_core.ManifestAsset"},next:{title:"@ima/core.PageAction",permalink:"/api/interfaces/ima_core.PageAction"}},p={},s=[{value:"Properties",id:"properties",level:2},{value:"$Cache",id:"cache",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"$CacheFactory",id:"cachefactory",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"$CacheStorage",id:"cachestorage",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"$ComponentUtils",id:"componentutils",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"$ControllerDecorator",id:"controllerdecorator",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"$CookieStorage",id:"cookiestorage",level:3},{value:"Defined in",id:"defined-in-5",level:4},{value:"$CookieTransformFunction",id:"cookietransformfunction",level:3},{value:"Defined in",id:"defined-in-6",level:4},{value:"$Dictionary",id:"dictionary",level:3},{value:"Defined in",id:"defined-in-7",level:4},{value:"$Dispatcher",id:"dispatcher",level:3},{value:"Defined in",id:"defined-in-8",level:4},{value:"$Env",id:"env",level:3},{value:"Defined in",id:"defined-in-9",level:4},{value:"$Error",id:"error",level:3},{value:"Defined in",id:"defined-in-10",level:4},{value:"$EventBus",id:"eventbus",level:3},{value:"Defined in",id:"defined-in-11",level:4},{value:"$Helper",id:"helper",level:3},{value:"Defined in",id:"defined-in-12",level:4},{value:"$Http",id:"http",level:3},{value:"Defined in",id:"defined-in-13",level:4},{value:"$HttpAgentProxy",id:"httpagentproxy",level:3},{value:"Defined in",id:"defined-in-14",level:4},{value:"$HttpStatusCode",id:"httpstatuscode",level:3},{value:"Defined in",id:"defined-in-15",level:4},{value:"$HttpUrlTransformer",id:"httpurltransformer",level:3},{value:"Defined in",id:"defined-in-16",level:4},{value:"$MapStorage",id:"mapstorage",level:3},{value:"Defined in",id:"defined-in-17",level:4},{value:"$MetaManager",id:"metamanager",level:3},{value:"Defined in",id:"defined-in-18",level:4},{value:"$Observable",id:"observable",level:3},{value:"Defined in",id:"defined-in-19",level:4},{value:"$PageFactory",id:"pagefactory",level:3},{value:"Defined in",id:"defined-in-20",level:4},{value:"$PageHandlerRegistry",id:"pagehandlerregistry",level:3},{value:"Defined in",id:"defined-in-21",level:4},{value:"$PageManager",id:"pagemanager",level:3},{value:"Defined in",id:"defined-in-22",level:4},{value:"$PageRenderer",id:"pagerenderer",level:3},{value:"Defined in",id:"defined-in-23",level:4},{value:"$PageStateManager",id:"pagestatemanager",level:3},{value:"Defined in",id:"defined-in-24",level:4},{value:"$PageStateManagerDecorator",id:"pagestatemanagerdecorator",level:3},{value:"Defined in",id:"defined-in-25",level:4},{value:"$Protocol",id:"protocol",level:3},{value:"Defined in",id:"defined-in-26",level:4},{value:"$Request",id:"request",level:3},{value:"Defined in",id:"defined-in-27",level:4},{value:"$Response",id:"response",level:3},{value:"Defined in",id:"defined-in-28",level:4},{value:"$RouteFactory",id:"routefactory",level:3},{value:"Defined in",id:"defined-in-29",level:4},{value:"$RouteNames",id:"routenames",level:3},{value:"Defined in",id:"defined-in-30",level:4},{value:"$Router",id:"router",level:3},{value:"Defined in",id:"defined-in-31",level:4},{value:"$RouterEvents",id:"routerevents",level:3},{value:"Defined in",id:"defined-in-32",level:4},{value:"$Secure",id:"secure",level:3},{value:"Defined in",id:"defined-in-33",level:4},{value:"$SessionMapStorage",id:"sessionmapstorage",level:3},{value:"Defined in",id:"defined-in-34",level:4},{value:"$SessionStorage",id:"sessionstorage",level:3},{value:"Defined in",id:"defined-in-35",level:4},{value:"$Settings",id:"settings",level:3},{value:"Defined in",id:"defined-in-36",level:4},{value:"$Utils",id:"utils",level:3},{value:"Defined in",id:"defined-in-37",level:4},{value:"$WeakMapStorage",id:"weakmapstorage",level:3},{value:"Defined in",id:"defined-in-38",level:4},{value:"$Window",id:"window",level:3},{value:"Defined in",id:"defined-in-39",level:4},{value:"$oc",id:"oc",level:3},{value:"Defined in",id:"defined-in-40",level:4}],c={toc:s},d="wrapper";function k(e){let{components:a,...n}=e;return(0,i.kt)(d,(0,t.Z)({},c,n,{components:a,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".OCAliasMap"),(0,i.kt)("p",null,"Map of IMA default string aliases and constants initialized in\nthe ObjectContainer. This is used for typechecking and type\nhinting of string OC arguments."),(0,i.kt)("h2",{id:"properties"},"Properties"),(0,i.kt)("h3",{id:"cache"},"$Cache"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Cache"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Cache"},(0,i.kt)("inlineCode",{parentName:"a"},"Cache")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,i.kt)("h4",{id:"defined-in"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L103"},"packages/core/src/config/bind.ts:103")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"cachefactory"},"$CacheFactory"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$CacheFactory"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CacheFactory"},(0,i.kt)("inlineCode",{parentName:"a"},"CacheFactory")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,i.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L102"},"packages/core/src/config/bind.ts:102")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"cachestorage"},"$CacheStorage"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$CacheStorage"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MapStorage"},(0,i.kt)("inlineCode",{parentName:"a"},"MapStorage")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,i.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L101"},"packages/core/src/config/bind.ts:101")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"componentutils"},"$ComponentUtils"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$ComponentUtils"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ComponentUtils"},(0,i.kt)("inlineCode",{parentName:"a"},"ComponentUtils"))),(0,i.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L109"},"packages/core/src/config/bind.ts:109")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"controllerdecorator"},"$ControllerDecorator"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$ControllerDecorator"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ControllerDecorator"},(0,i.kt)("inlineCode",{parentName:"a"},"ControllerDecorator")),"<{}, {}, {}",">"),(0,i.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L105"},"packages/core/src/config/bind.ts:105")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"cookiestorage"},"$CookieStorage"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$CookieStorage"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,i.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,i.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L91"},"packages/core/src/config/bind.ts:91")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"cookietransformfunction"},"$CookieTransformFunction"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$CookieTransformFunction"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core#cookietransformfunction"},(0,i.kt)("inlineCode",{parentName:"a"},"CookieTransformFunction"))),(0,i.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L90"},"packages/core/src/config/bind.ts:90")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"dictionary"},"$Dictionary"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Dictionary"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dictionary"},(0,i.kt)("inlineCode",{parentName:"a"},"Dictionary"))),(0,i.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L89"},"packages/core/src/config/bind.ts:89")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"dispatcher"},"$Dispatcher"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Dispatcher"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,i.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,i.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L98"},"packages/core/src/config/bind.ts:98")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"env"},"$Env"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Env"),": keyof ",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.AppEnvironment"},(0,i.kt)("inlineCode",{parentName:"a"},"AppEnvironment"))),(0,i.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L82"},"packages/core/src/config/bind.ts:82")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"error"},"$Error"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Error"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,i.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,i.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L88"},"packages/core/src/config/bind.ts:88")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"eventbus"},"$EventBus"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$EventBus"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.EventBus"},(0,i.kt)("inlineCode",{parentName:"a"},"EventBus"))),(0,i.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L99"},"packages/core/src/config/bind.ts:99")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"helper"},"$Helper"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Helper"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"__module")),(0,i.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L79"},"packages/core/src/config/bind.ts:79")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"http"},"$Http"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Http"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.HttpAgent"},(0,i.kt)("inlineCode",{parentName:"a"},"HttpAgent"))),(0,i.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L119"},"packages/core/src/config/bind.ts:119")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"httpagentproxy"},"$HttpAgentProxy"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$HttpAgentProxy"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.HttpProxy"},(0,i.kt)("inlineCode",{parentName:"a"},"HttpProxy"))),(0,i.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L118"},"packages/core/src/config/bind.ts:118")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"httpstatuscode"},"$HttpStatusCode"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$HttpStatusCode"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"Readonly"),"<{ ",(0,i.kt)("inlineCode",{parentName:"p"},"BAD_REQUEST"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"400")," = 400; ",(0,i.kt)("inlineCode",{parentName:"p"},"FORBIDDEN"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"403")," = 403; ",(0,i.kt)("inlineCode",{parentName:"p"},"NOT_FOUND"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"404")," = 404; ",(0,i.kt)("inlineCode",{parentName:"p"},"NO_CONTENT"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"204")," = 204; ",(0,i.kt)("inlineCode",{parentName:"p"},"OK"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"200")," = 200; ",(0,i.kt)("inlineCode",{parentName:"p"},"SERVER_ERROR"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"500")," = 500; ",(0,i.kt)("inlineCode",{parentName:"p"},"TIMEOUT"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"408")," = 408; ",(0,i.kt)("inlineCode",{parentName:"p"},"UNAUTHORIZED"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"401")," = 401 }",">"),(0,i.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L120"},"packages/core/src/config/bind.ts:120")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"httpurltransformer"},"$HttpUrlTransformer"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$HttpUrlTransformer"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.UrlTransformer"},(0,i.kt)("inlineCode",{parentName:"a"},"UrlTransformer"))),(0,i.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L117"},"packages/core/src/config/bind.ts:117")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"mapstorage"},"$MapStorage"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$MapStorage"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MapStorage"},(0,i.kt)("inlineCode",{parentName:"a"},"MapStorage")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,i.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L95"},"packages/core/src/config/bind.ts:95")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"metamanager"},"$MetaManager"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$MetaManager"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MetaManager"},(0,i.kt)("inlineCode",{parentName:"a"},"MetaManager"))),(0,i.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L104"},"packages/core/src/config/bind.ts:104")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"observable"},"$Observable"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Observable"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"Observable")),(0,i.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L100"},"packages/core/src/config/bind.ts:100")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"pagefactory"},"$PageFactory"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$PageFactory"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageFactory"},(0,i.kt)("inlineCode",{parentName:"a"},"PageFactory"))),(0,i.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L108"},"packages/core/src/config/bind.ts:108")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"pagehandlerregistry"},"$PageHandlerRegistry"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$PageHandlerRegistry"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandlerRegistry"},(0,i.kt)("inlineCode",{parentName:"a"},"PageHandlerRegistry"))),(0,i.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L111"},"packages/core/src/config/bind.ts:111")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"pagemanager"},"$PageManager"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$PageManager"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageManager"},(0,i.kt)("inlineCode",{parentName:"a"},"PageManager"))),(0,i.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L112"},"packages/core/src/config/bind.ts:112")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"pagerenderer"},"$PageRenderer"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$PageRenderer"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageRenderer"},(0,i.kt)("inlineCode",{parentName:"a"},"PageRenderer"))),(0,i.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L121"},"packages/core/src/config/bind.ts:121")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"pagestatemanager"},"$PageStateManager"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$PageStateManager"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},(0,i.kt)("inlineCode",{parentName:"a"},"PageStateManager")),"<{}",">"),(0,i.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L107"},"packages/core/src/config/bind.ts:107")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"pagestatemanagerdecorator"},"$PageStateManagerDecorator"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$PageStateManagerDecorator"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManagerDecorator"},(0,i.kt)("inlineCode",{parentName:"a"},"PageStateManagerDecorator"))),(0,i.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L106"},"packages/core/src/config/bind.ts:106")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"protocol"},"$Protocol"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Protocol"),": ",(0,i.kt)("inlineCode",{parentName:"p"},'"http:"')," ","|"," ",(0,i.kt)("inlineCode",{parentName:"p"},'"https:"')),(0,i.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L83"},"packages/core/src/config/bind.ts:83")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"request"},"$Request"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Request"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Request"},(0,i.kt)("inlineCode",{parentName:"a"},"Request"))),(0,i.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L85"},"packages/core/src/config/bind.ts:85")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"response"},"$Response"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Response"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Response"},(0,i.kt)("inlineCode",{parentName:"a"},"Response"))),(0,i.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L86"},"packages/core/src/config/bind.ts:86")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"routefactory"},"$RouteFactory"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$RouteFactory"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.RouteFactory"},(0,i.kt)("inlineCode",{parentName:"a"},"RouteFactory"))),(0,i.kt)("h4",{id:"defined-in-29"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L113"},"packages/core/src/config/bind.ts:113")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"routenames"},"$RouteNames"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$RouteNames"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/enums/ima_core.RouteNames"},(0,i.kt)("inlineCode",{parentName:"a"},"RouteNames"))),(0,i.kt)("h4",{id:"defined-in-30"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L115"},"packages/core/src/config/bind.ts:115")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"router"},"$Router"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Router"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Router"},(0,i.kt)("inlineCode",{parentName:"a"},"Router"))),(0,i.kt)("h4",{id:"defined-in-31"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L114"},"packages/core/src/config/bind.ts:114")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"routerevents"},"$RouterEvents"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$RouterEvents"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/enums/ima_core.RouterEvents"},(0,i.kt)("inlineCode",{parentName:"a"},"RouterEvents"))),(0,i.kt)("h4",{id:"defined-in-32"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L116"},"packages/core/src/config/bind.ts:116")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"secure"},"$Secure"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Secure"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"boolean")),(0,i.kt)("h4",{id:"defined-in-33"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L84"},"packages/core/src/config/bind.ts:84")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"sessionmapstorage"},"$SessionMapStorage"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$SessionMapStorage"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.SessionMapStorage"},(0,i.kt)("inlineCode",{parentName:"a"},"SessionMapStorage")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,i.kt)("h4",{id:"defined-in-34"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L97"},"packages/core/src/config/bind.ts:97")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"sessionstorage"},"$SessionStorage"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$SessionStorage"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.SessionStorage"},(0,i.kt)("inlineCode",{parentName:"a"},"SessionStorage")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"unknown"),">"," ","|"," ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MapStorage"},(0,i.kt)("inlineCode",{parentName:"a"},"MapStorage")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,i.kt)("h4",{id:"defined-in-35"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L92"},"packages/core/src/config/bind.ts:92")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"settings"},"$Settings"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Settings"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Settings"},(0,i.kt)("inlineCode",{parentName:"a"},"Settings"))," & ",(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core#bootsettings"},(0,i.kt)("inlineCode",{parentName:"a"},"BootSettings"))," & { ",(0,i.kt)("inlineCode",{parentName:"p"},"[key: string]"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"any"),"; }"),(0,i.kt)("h4",{id:"defined-in-36"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L81"},"packages/core/src/config/bind.ts:81")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"utils"},"$Utils"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Utils"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,i.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,i.kt)("h4",{id:"defined-in-37"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L110"},"packages/core/src/config/bind.ts:110")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"weakmapstorage"},"$WeakMapStorage"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$WeakMapStorage"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.WeakMapStorage"},(0,i.kt)("inlineCode",{parentName:"a"},"WeakMapStorage")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"object"),">"),(0,i.kt)("h4",{id:"defined-in-38"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L96"},"packages/core/src/config/bind.ts:96")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"window"},"$Window"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Window"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,i.kt)("inlineCode",{parentName:"a"},"Window"))),(0,i.kt)("h4",{id:"defined-in-39"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L87"},"packages/core/src/config/bind.ts:87")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"oc"},"$oc"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$oc"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,i.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,i.kt)("h4",{id:"defined-in-40"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L80"},"packages/core/src/config/bind.ts:80")))}k.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[1594],{3905:(e,a,n)=>{n.d(a,{Zo:()=>c,kt:()=>f});var t=n(7294);function i(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function r(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function o(e){for(var a=1;a=0||(i[n]=e[n]);return i}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=t.createContext({}),s=function(e){var a=t.useContext(p),n=a;return e&&(n="function"==typeof e?e(a):o(o({},a),e)),n},c=function(e){var a=s(e.components);return t.createElement(p.Provider,{value:a},e.children)},d="mdxType",k={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},m=t.forwardRef((function(e,a){var n=e.components,i=e.mdxType,r=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=s(n),m=i,f=d["".concat(p,".").concat(m)]||d[m]||k[m]||r;return n?t.createElement(f,o(o({ref:a},c),{},{components:n})):t.createElement(f,o({ref:a},c))}));function f(e,a){var n=arguments,i=a&&a.mdxType;if("string"==typeof e||i){var r=n.length,o=new Array(r);o[0]=m;var l={};for(var p in a)hasOwnProperty.call(a,p)&&(l[p]=a[p]);l.originalType=e,l[d]="string"==typeof e?e:i,o[1]=l;for(var s=2;s{n.r(a),n.d(a,{assets:()=>p,contentTitle:()=>o,default:()=>k,frontMatter:()=>r,metadata:()=>l,toc:()=>s});var t=n(5773),i=(n(7294),n(3905));const r={id:"ima_core.OCAliasMap",title:"Interface: OCAliasMap",sidebar_label:"@ima/core.OCAliasMap",custom_edit_url:null},o=void 0,l={unversionedId:"api/interfaces/ima_core.OCAliasMap",id:"api/interfaces/ima_core.OCAliasMap",title:"Interface: OCAliasMap",description:"@ima/core.OCAliasMap",source:"@site/../docs/api/interfaces/ima_core.OCAliasMap.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.OCAliasMap",permalink:"/api/interfaces/ima_core.OCAliasMap",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.OCAliasMap",title:"Interface: OCAliasMap",sidebar_label:"@ima/core.OCAliasMap",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.ManifestAsset",permalink:"/api/interfaces/ima_core.ManifestAsset"},next:{title:"@ima/core.PageAction",permalink:"/api/interfaces/ima_core.PageAction"}},p={},s=[{value:"Properties",id:"properties",level:2},{value:"$Cache",id:"cache",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"$CacheFactory",id:"cachefactory",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"$CacheStorage",id:"cachestorage",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"$ComponentUtils",id:"componentutils",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"$ControllerDecorator",id:"controllerdecorator",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"$CookieStorage",id:"cookiestorage",level:3},{value:"Defined in",id:"defined-in-5",level:4},{value:"$CookieTransformFunction",id:"cookietransformfunction",level:3},{value:"Defined in",id:"defined-in-6",level:4},{value:"$Dictionary",id:"dictionary",level:3},{value:"Defined in",id:"defined-in-7",level:4},{value:"$Dispatcher",id:"dispatcher",level:3},{value:"Defined in",id:"defined-in-8",level:4},{value:"$Env",id:"env",level:3},{value:"Defined in",id:"defined-in-9",level:4},{value:"$Error",id:"error",level:3},{value:"Defined in",id:"defined-in-10",level:4},{value:"$EventBus",id:"eventbus",level:3},{value:"Defined in",id:"defined-in-11",level:4},{value:"$Helper",id:"helper",level:3},{value:"Defined in",id:"defined-in-12",level:4},{value:"$Http",id:"http",level:3},{value:"Defined in",id:"defined-in-13",level:4},{value:"$HttpAgentProxy",id:"httpagentproxy",level:3},{value:"Defined in",id:"defined-in-14",level:4},{value:"$HttpStatusCode",id:"httpstatuscode",level:3},{value:"Defined in",id:"defined-in-15",level:4},{value:"$HttpUrlTransformer",id:"httpurltransformer",level:3},{value:"Defined in",id:"defined-in-16",level:4},{value:"$MapStorage",id:"mapstorage",level:3},{value:"Defined in",id:"defined-in-17",level:4},{value:"$MetaManager",id:"metamanager",level:3},{value:"Defined in",id:"defined-in-18",level:4},{value:"$Observable",id:"observable",level:3},{value:"Defined in",id:"defined-in-19",level:4},{value:"$PageFactory",id:"pagefactory",level:3},{value:"Defined in",id:"defined-in-20",level:4},{value:"$PageHandlerRegistry",id:"pagehandlerregistry",level:3},{value:"Defined in",id:"defined-in-21",level:4},{value:"$PageManager",id:"pagemanager",level:3},{value:"Defined in",id:"defined-in-22",level:4},{value:"$PageRenderer",id:"pagerenderer",level:3},{value:"Defined in",id:"defined-in-23",level:4},{value:"$PageStateManager",id:"pagestatemanager",level:3},{value:"Defined in",id:"defined-in-24",level:4},{value:"$PageStateManagerDecorator",id:"pagestatemanagerdecorator",level:3},{value:"Defined in",id:"defined-in-25",level:4},{value:"$Protocol",id:"protocol",level:3},{value:"Defined in",id:"defined-in-26",level:4},{value:"$Request",id:"request",level:3},{value:"Defined in",id:"defined-in-27",level:4},{value:"$Response",id:"response",level:3},{value:"Defined in",id:"defined-in-28",level:4},{value:"$RouteFactory",id:"routefactory",level:3},{value:"Defined in",id:"defined-in-29",level:4},{value:"$RouteNames",id:"routenames",level:3},{value:"Defined in",id:"defined-in-30",level:4},{value:"$Router",id:"router",level:3},{value:"Defined in",id:"defined-in-31",level:4},{value:"$RouterEvents",id:"routerevents",level:3},{value:"Defined in",id:"defined-in-32",level:4},{value:"$Secure",id:"secure",level:3},{value:"Defined in",id:"defined-in-33",level:4},{value:"$SessionMapStorage",id:"sessionmapstorage",level:3},{value:"Defined in",id:"defined-in-34",level:4},{value:"$SessionStorage",id:"sessionstorage",level:3},{value:"Defined in",id:"defined-in-35",level:4},{value:"$Settings",id:"settings",level:3},{value:"Defined in",id:"defined-in-36",level:4},{value:"$Utils",id:"utils",level:3},{value:"Defined in",id:"defined-in-37",level:4},{value:"$WeakMapStorage",id:"weakmapstorage",level:3},{value:"Defined in",id:"defined-in-38",level:4},{value:"$Window",id:"window",level:3},{value:"Defined in",id:"defined-in-39",level:4},{value:"$oc",id:"oc",level:3},{value:"Defined in",id:"defined-in-40",level:4}],c={toc:s},d="wrapper";function k(e){let{components:a,...n}=e;return(0,i.kt)(d,(0,t.Z)({},c,n,{components:a,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".OCAliasMap"),(0,i.kt)("p",null,"Map of IMA default string aliases and constants initialized in\nthe ObjectContainer. This is used for typechecking and type\nhinting of string OC arguments."),(0,i.kt)("h2",{id:"properties"},"Properties"),(0,i.kt)("h3",{id:"cache"},"$Cache"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Cache"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Cache"},(0,i.kt)("inlineCode",{parentName:"a"},"Cache")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,i.kt)("h4",{id:"defined-in"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L103"},"packages/core/src/config/bind.ts:103")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"cachefactory"},"$CacheFactory"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$CacheFactory"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CacheFactory"},(0,i.kt)("inlineCode",{parentName:"a"},"CacheFactory")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,i.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L102"},"packages/core/src/config/bind.ts:102")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"cachestorage"},"$CacheStorage"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$CacheStorage"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MapStorage"},(0,i.kt)("inlineCode",{parentName:"a"},"MapStorage")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,i.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L101"},"packages/core/src/config/bind.ts:101")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"componentutils"},"$ComponentUtils"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$ComponentUtils"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ComponentUtils"},(0,i.kt)("inlineCode",{parentName:"a"},"ComponentUtils"))),(0,i.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L109"},"packages/core/src/config/bind.ts:109")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"controllerdecorator"},"$ControllerDecorator"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$ControllerDecorator"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ControllerDecorator"},(0,i.kt)("inlineCode",{parentName:"a"},"ControllerDecorator")),"<{}, {}, {}",">"),(0,i.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L105"},"packages/core/src/config/bind.ts:105")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"cookiestorage"},"$CookieStorage"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$CookieStorage"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,i.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,i.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L91"},"packages/core/src/config/bind.ts:91")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"cookietransformfunction"},"$CookieTransformFunction"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$CookieTransformFunction"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core#cookietransformfunction"},(0,i.kt)("inlineCode",{parentName:"a"},"CookieTransformFunction"))),(0,i.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L90"},"packages/core/src/config/bind.ts:90")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"dictionary"},"$Dictionary"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Dictionary"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dictionary"},(0,i.kt)("inlineCode",{parentName:"a"},"Dictionary"))),(0,i.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L89"},"packages/core/src/config/bind.ts:89")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"dispatcher"},"$Dispatcher"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Dispatcher"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,i.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,i.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L98"},"packages/core/src/config/bind.ts:98")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"env"},"$Env"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Env"),": keyof ",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.AppEnvironment"},(0,i.kt)("inlineCode",{parentName:"a"},"AppEnvironment"))),(0,i.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L82"},"packages/core/src/config/bind.ts:82")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"error"},"$Error"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Error"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,i.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,i.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L88"},"packages/core/src/config/bind.ts:88")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"eventbus"},"$EventBus"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$EventBus"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.EventBus"},(0,i.kt)("inlineCode",{parentName:"a"},"EventBus"))),(0,i.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L99"},"packages/core/src/config/bind.ts:99")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"helper"},"$Helper"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Helper"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"__module")),(0,i.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L79"},"packages/core/src/config/bind.ts:79")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"http"},"$Http"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Http"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.HttpAgent"},(0,i.kt)("inlineCode",{parentName:"a"},"HttpAgent"))),(0,i.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L119"},"packages/core/src/config/bind.ts:119")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"httpagentproxy"},"$HttpAgentProxy"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$HttpAgentProxy"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.HttpProxy"},(0,i.kt)("inlineCode",{parentName:"a"},"HttpProxy"))),(0,i.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L118"},"packages/core/src/config/bind.ts:118")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"httpstatuscode"},"$HttpStatusCode"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$HttpStatusCode"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"Readonly"),"<{ ",(0,i.kt)("inlineCode",{parentName:"p"},"BAD_REQUEST"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"400")," = 400; ",(0,i.kt)("inlineCode",{parentName:"p"},"FORBIDDEN"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"403")," = 403; ",(0,i.kt)("inlineCode",{parentName:"p"},"NOT_FOUND"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"404")," = 404; ",(0,i.kt)("inlineCode",{parentName:"p"},"NO_CONTENT"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"204")," = 204; ",(0,i.kt)("inlineCode",{parentName:"p"},"OK"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"200")," = 200; ",(0,i.kt)("inlineCode",{parentName:"p"},"SERVER_ERROR"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"500")," = 500; ",(0,i.kt)("inlineCode",{parentName:"p"},"TIMEOUT"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"408")," = 408; ",(0,i.kt)("inlineCode",{parentName:"p"},"UNAUTHORIZED"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"401")," = 401 }",">"),(0,i.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L120"},"packages/core/src/config/bind.ts:120")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"httpurltransformer"},"$HttpUrlTransformer"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$HttpUrlTransformer"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.UrlTransformer"},(0,i.kt)("inlineCode",{parentName:"a"},"UrlTransformer"))),(0,i.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L117"},"packages/core/src/config/bind.ts:117")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"mapstorage"},"$MapStorage"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$MapStorage"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MapStorage"},(0,i.kt)("inlineCode",{parentName:"a"},"MapStorage")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,i.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L95"},"packages/core/src/config/bind.ts:95")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"metamanager"},"$MetaManager"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$MetaManager"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MetaManager"},(0,i.kt)("inlineCode",{parentName:"a"},"MetaManager"))),(0,i.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L104"},"packages/core/src/config/bind.ts:104")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"observable"},"$Observable"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Observable"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Observable"},(0,i.kt)("inlineCode",{parentName:"a"},"Observable"))),(0,i.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L100"},"packages/core/src/config/bind.ts:100")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"pagefactory"},"$PageFactory"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$PageFactory"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageFactory"},(0,i.kt)("inlineCode",{parentName:"a"},"PageFactory"))),(0,i.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L108"},"packages/core/src/config/bind.ts:108")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"pagehandlerregistry"},"$PageHandlerRegistry"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$PageHandlerRegistry"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandlerRegistry"},(0,i.kt)("inlineCode",{parentName:"a"},"PageHandlerRegistry"))),(0,i.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L111"},"packages/core/src/config/bind.ts:111")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"pagemanager"},"$PageManager"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$PageManager"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageManager"},(0,i.kt)("inlineCode",{parentName:"a"},"PageManager"))),(0,i.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L112"},"packages/core/src/config/bind.ts:112")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"pagerenderer"},"$PageRenderer"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$PageRenderer"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageRenderer"},(0,i.kt)("inlineCode",{parentName:"a"},"PageRenderer"))),(0,i.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L121"},"packages/core/src/config/bind.ts:121")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"pagestatemanager"},"$PageStateManager"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$PageStateManager"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},(0,i.kt)("inlineCode",{parentName:"a"},"PageStateManager")),"<{}",">"),(0,i.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L107"},"packages/core/src/config/bind.ts:107")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"pagestatemanagerdecorator"},"$PageStateManagerDecorator"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$PageStateManagerDecorator"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManagerDecorator"},(0,i.kt)("inlineCode",{parentName:"a"},"PageStateManagerDecorator"))),(0,i.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L106"},"packages/core/src/config/bind.ts:106")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"protocol"},"$Protocol"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Protocol"),": ",(0,i.kt)("inlineCode",{parentName:"p"},'"http:"')," ","|"," ",(0,i.kt)("inlineCode",{parentName:"p"},'"https:"')),(0,i.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L83"},"packages/core/src/config/bind.ts:83")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"request"},"$Request"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Request"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Request"},(0,i.kt)("inlineCode",{parentName:"a"},"Request"))),(0,i.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L85"},"packages/core/src/config/bind.ts:85")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"response"},"$Response"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Response"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Response"},(0,i.kt)("inlineCode",{parentName:"a"},"Response"))),(0,i.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L86"},"packages/core/src/config/bind.ts:86")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"routefactory"},"$RouteFactory"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$RouteFactory"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.RouteFactory"},(0,i.kt)("inlineCode",{parentName:"a"},"RouteFactory"))),(0,i.kt)("h4",{id:"defined-in-29"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L113"},"packages/core/src/config/bind.ts:113")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"routenames"},"$RouteNames"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$RouteNames"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/enums/ima_core.RouteNames"},(0,i.kt)("inlineCode",{parentName:"a"},"RouteNames"))),(0,i.kt)("h4",{id:"defined-in-30"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L115"},"packages/core/src/config/bind.ts:115")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"router"},"$Router"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Router"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Router"},(0,i.kt)("inlineCode",{parentName:"a"},"Router"))),(0,i.kt)("h4",{id:"defined-in-31"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L114"},"packages/core/src/config/bind.ts:114")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"routerevents"},"$RouterEvents"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$RouterEvents"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/enums/ima_core.RouterEvents"},(0,i.kt)("inlineCode",{parentName:"a"},"RouterEvents"))),(0,i.kt)("h4",{id:"defined-in-32"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L116"},"packages/core/src/config/bind.ts:116")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"secure"},"$Secure"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Secure"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"boolean")),(0,i.kt)("h4",{id:"defined-in-33"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L84"},"packages/core/src/config/bind.ts:84")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"sessionmapstorage"},"$SessionMapStorage"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$SessionMapStorage"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.SessionMapStorage"},(0,i.kt)("inlineCode",{parentName:"a"},"SessionMapStorage")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,i.kt)("h4",{id:"defined-in-34"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L97"},"packages/core/src/config/bind.ts:97")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"sessionstorage"},"$SessionStorage"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$SessionStorage"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.SessionStorage"},(0,i.kt)("inlineCode",{parentName:"a"},"SessionStorage")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"unknown"),">"," ","|"," ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MapStorage"},(0,i.kt)("inlineCode",{parentName:"a"},"MapStorage")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,i.kt)("h4",{id:"defined-in-35"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L92"},"packages/core/src/config/bind.ts:92")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"settings"},"$Settings"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Settings"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Settings"},(0,i.kt)("inlineCode",{parentName:"a"},"Settings"))," & ",(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core#bootsettings"},(0,i.kt)("inlineCode",{parentName:"a"},"BootSettings"))," & { ",(0,i.kt)("inlineCode",{parentName:"p"},"[key: string]"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"any"),"; }"),(0,i.kt)("h4",{id:"defined-in-36"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L81"},"packages/core/src/config/bind.ts:81")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"utils"},"$Utils"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Utils"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,i.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,i.kt)("h4",{id:"defined-in-37"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L110"},"packages/core/src/config/bind.ts:110")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"weakmapstorage"},"$WeakMapStorage"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$WeakMapStorage"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.WeakMapStorage"},(0,i.kt)("inlineCode",{parentName:"a"},"WeakMapStorage")),"<",(0,i.kt)("inlineCode",{parentName:"p"},"object"),">"),(0,i.kt)("h4",{id:"defined-in-38"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L96"},"packages/core/src/config/bind.ts:96")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"window"},"$Window"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$Window"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,i.kt)("inlineCode",{parentName:"a"},"Window"))),(0,i.kt)("h4",{id:"defined-in-39"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L87"},"packages/core/src/config/bind.ts:87")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"oc"},"$oc"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"$oc"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,i.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,i.kt)("h4",{id:"defined-in-40"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L80"},"packages/core/src/config/bind.ts:80")))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/10a88b42.8d994eab.js b/assets/js/10a88b42.0008582e.js similarity index 97% rename from assets/js/10a88b42.8d994eab.js rename to assets/js/10a88b42.0008582e.js index d58067da89..f3ab429481 100644 --- a/assets/js/10a88b42.8d994eab.js +++ b/assets/js/10a88b42.0008582e.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[9591],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>c});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var o=r.createContext({}),s=function(e){var t=r.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=s(e.components);return r.createElement(o.Provider,{value:t},e.children)},k="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,o=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),k=s(a),u=n,c=k["".concat(o,".").concat(u)]||k[u]||m[u]||i;return a?r.createElement(c,l(l({ref:t},d),{},{components:a})):r.createElement(c,l({ref:t},d))}));function c(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,l=new Array(i);l[0]=u;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[k]="string"==typeof e?e:n,l[1]=p;for(var s=2;s{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>p,toc:()=>s});var r=a(5773),n=(a(7294),a(3905));const i={id:"ima_core.Storage",title:"Class: Storage",sidebar_label:"@ima/core.Storage",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_core.Storage",id:"api/classes/ima_core.Storage",title:"Class: Storage",description:"@ima/core.Storage",source:"@site/../docs/api/classes/ima_core.Storage.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.Storage",permalink:"/api/classes/ima_core.Storage",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.Storage",title:"Class: Storage",sidebar_label:"@ima/core.Storage",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.StaticRoute",permalink:"/api/classes/ima_core.StaticRoute"},next:{title:"@ima/core.UrlTransformer",permalink:"/api/classes/ima_core.UrlTransformer"}},o={},s=[{value:"Type parameters",id:"type-parameters",level:2},{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Methods",id:"methods",level:2},{value:"clear",id:"clear",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"delete",id:"delete",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"get",id:"get",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"has",id:"has",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"init",id:"init",level:3},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"keys",id:"keys",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"set",id:"set",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"size",id:"size",level:3},{value:"Returns",id:"returns-7",level:4},{value:"Defined in",id:"defined-in-7",level:4}],d={toc:s},k="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(k,(0,r.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".Storage"),(0,n.kt)("p",null,"The ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage")," is an unordered collection of named values of any\ntype. Values in the storage are named using ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," keys. The storage\ncan be therefore thought of as a ",(0,n.kt)("inlineCode",{parentName:"p"},"Map"),"....."),(0,n.kt)("h2",{id:"type-parameters"},"Type parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"V"))))),(0,n.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("p",{parentName:"li"},(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Storage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MapStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"MapStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.SessionMapStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"SessionMapStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.SessionStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"SessionStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.WeakMapStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"WeakMapStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MapStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"MapStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.SessionMapStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"SessionMapStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.SessionStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"SessionStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.WeakMapStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"WeakMapStorage"))))),(0,n.kt)("h2",{id:"constructors"},"Constructors"),(0,n.kt)("h3",{id:"constructor"},"constructor"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("strong",{parentName:"p"},"new Storage"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">","()"),(0,n.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"V"))))),(0,n.kt)("h2",{id:"methods"},"Methods"),(0,n.kt)("h3",{id:"clear"},"clear"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"clear"),"(): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"Clears the storage of all entries."),(0,n.kt)("h4",{id:"returns"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"This storage."),(0,n.kt)("h4",{id:"defined-in"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/Storage.ts#L73"},"packages/core/src/storage/Storage.ts:73")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"delete"},"delete"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"delete"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"key"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"Deletes the entry identified by the specified key from this storage."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"key")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The key identifying the storage entry.")))),(0,n.kt)("h4",{id:"returns-1"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"This storage."),(0,n.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/Storage.ts#L64"},"packages/core/src/storage/Storage.ts:64")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"get"},"get"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"get"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"key"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"V")),(0,n.kt)("p",null,"Retrieves the value of the entry identified by the specified . The\nmethod returns ",(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," if the entry does not exists."),(0,n.kt)("p",null,"Entries set to the ",(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," value can be tested for existence\nusing the ",(0,n.kt)("inlineCode",{parentName:"p"},"link has")," method."),(0,n.kt)("h4",{id:"parameters-1"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"key")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The key identifying the storage entry.")))),(0,n.kt)("h4",{id:"returns-2"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"V")),(0,n.kt)("p",null,"The value of the storage entry."),(0,n.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/Storage.ts#L42"},"packages/core/src/storage/Storage.ts:42")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"has"},"has"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"has"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"key"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,"Returns ",(0,n.kt)("inlineCode",{parentName:"p"},"true")," if the entry identified by the specified key exists\nin this storage."),(0,n.kt)("h4",{id:"parameters-2"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"key")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The key identifying the storage entry.")))),(0,n.kt)("h4",{id:"returns-3"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"true")," if the storage entry exists."),(0,n.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/Storage.ts#L28"},"packages/core/src/storage/Storage.ts:28")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"init"},"init"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"init"),"(): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"This method is used to finalize the initialization of the storage after\nthe dependencies provided through the constructor have been prepared for\nuse."),(0,n.kt)("p",null,"This method must be invoked only once and it must be the first method\ninvoked on this instance."),(0,n.kt)("h4",{id:"returns-4"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"This storage."),(0,n.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/Storage.ts#L17"},"packages/core/src/storage/Storage.ts:17")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"keys"},"keys"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"keys"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"Iterable"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string"),">"),(0,n.kt)("p",null,"Returns an iterator for traversing the keys in this storage. The order\nin which the keys are traversed is undefined."),(0,n.kt)("h4",{id:"returns-5"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Iterable"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string"),">"),(0,n.kt)("p",null,"An iterator for traversing the keys in this\nstorage. The iterator also implements the iterable protocol,\nreturning itself as its own iterator, allowing it to be used in\na ",(0,n.kt)("inlineCode",{parentName:"p"},"for..of")," loop."),(0,n.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/Storage.ts#L86"},"packages/core/src/storage/Storage.ts:86")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"set"},"set"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"set"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"key"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"value"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"Sets the storage entry identified by the specified key to the provided\nvalue. The method creates the entry if it does not exist already."),(0,n.kt)("h4",{id:"parameters-3"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"key")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The key identifying the storage entry.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"value")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"V")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The storage entry value.")))),(0,n.kt)("h4",{id:"returns-6"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"This storage."),(0,n.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/Storage.ts#L54"},"packages/core/src/storage/Storage.ts:54")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"size"},"size"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"size"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"number")),(0,n.kt)("p",null,"Returns the number of entries in this storage."),(0,n.kt)("h4",{id:"returns-7"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"number")),(0,n.kt)("p",null,"The number of entries in this storage."),(0,n.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/Storage.ts#L95"},"packages/core/src/storage/Storage.ts:95")))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[9591],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>c});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var o=r.createContext({}),s=function(e){var t=r.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=s(e.components);return r.createElement(o.Provider,{value:t},e.children)},k="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,o=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),k=s(a),u=n,c=k["".concat(o,".").concat(u)]||k[u]||m[u]||i;return a?r.createElement(c,l(l({ref:t},d),{},{components:a})):r.createElement(c,l({ref:t},d))}));function c(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,l=new Array(i);l[0]=u;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[k]="string"==typeof e?e:n,l[1]=p;for(var s=2;s{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>p,toc:()=>s});var r=a(5773),n=(a(7294),a(3905));const i={id:"ima_core.Storage",title:"Class: Storage",sidebar_label:"@ima/core.Storage",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_core.Storage",id:"api/classes/ima_core.Storage",title:"Class: Storage",description:"@ima/core.Storage",source:"@site/../docs/api/classes/ima_core.Storage.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.Storage",permalink:"/api/classes/ima_core.Storage",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.Storage",title:"Class: Storage",sidebar_label:"@ima/core.Storage",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.StaticRoute",permalink:"/api/classes/ima_core.StaticRoute"},next:{title:"@ima/core.UrlTransformer",permalink:"/api/classes/ima_core.UrlTransformer"}},o={},s=[{value:"Type parameters",id:"type-parameters",level:2},{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Methods",id:"methods",level:2},{value:"clear",id:"clear",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"delete",id:"delete",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"get",id:"get",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"has",id:"has",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"init",id:"init",level:3},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"keys",id:"keys",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"set",id:"set",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"size",id:"size",level:3},{value:"Returns",id:"returns-7",level:4},{value:"Defined in",id:"defined-in-7",level:4}],d={toc:s},k="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(k,(0,r.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".Storage"),(0,n.kt)("p",null,"The ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage")," is an unordered collection of named values of any\ntype. Values in the storage are named using ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," keys. The storage\ncan be therefore thought of as a ",(0,n.kt)("inlineCode",{parentName:"p"},"Map"),"....."),(0,n.kt)("h2",{id:"type-parameters"},"Type parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"V"))))),(0,n.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("p",{parentName:"li"},(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Storage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MapStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"MapStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.SessionMapStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"SessionMapStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.SessionStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"SessionStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.WeakMapStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"WeakMapStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MapStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"MapStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.SessionMapStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"SessionMapStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.SessionStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"SessionStorage"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.WeakMapStorage"},(0,n.kt)("inlineCode",{parentName:"a"},"WeakMapStorage"))))),(0,n.kt)("h2",{id:"constructors"},"Constructors"),(0,n.kt)("h3",{id:"constructor"},"constructor"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("strong",{parentName:"p"},"new Storage"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">","()"),(0,n.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"V"))))),(0,n.kt)("h2",{id:"methods"},"Methods"),(0,n.kt)("h3",{id:"clear"},"clear"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"clear"),"(): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"Clears the storage of all entries."),(0,n.kt)("h4",{id:"returns"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"This storage."),(0,n.kt)("h4",{id:"defined-in"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/Storage.ts#L73"},"packages/core/src/storage/Storage.ts:73")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"delete"},"delete"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"delete"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"key"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"Deletes the entry identified by the specified key from this storage."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"key")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The key identifying the storage entry.")))),(0,n.kt)("h4",{id:"returns-1"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"This storage."),(0,n.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/Storage.ts#L64"},"packages/core/src/storage/Storage.ts:64")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"get"},"get"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"get"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"key"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"V")),(0,n.kt)("p",null,"Retrieves the value of the entry identified by the specified . The\nmethod returns ",(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," if the entry does not exists."),(0,n.kt)("p",null,"Entries set to the ",(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," value can be tested for existence\nusing the ",(0,n.kt)("inlineCode",{parentName:"p"},"link has")," method."),(0,n.kt)("h4",{id:"parameters-1"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"key")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The key identifying the storage entry.")))),(0,n.kt)("h4",{id:"returns-2"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"V")),(0,n.kt)("p",null,"The value of the storage entry."),(0,n.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/Storage.ts#L42"},"packages/core/src/storage/Storage.ts:42")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"has"},"has"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"has"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"key"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,"Returns ",(0,n.kt)("inlineCode",{parentName:"p"},"true")," if the entry identified by the specified key exists\nin this storage."),(0,n.kt)("h4",{id:"parameters-2"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"key")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The key identifying the storage entry.")))),(0,n.kt)("h4",{id:"returns-3"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"true")," if the storage entry exists."),(0,n.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/Storage.ts#L28"},"packages/core/src/storage/Storage.ts:28")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"init"},"init"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"init"),"(): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"This method is used to finalize the initialization of the storage after\nthe dependencies provided through the constructor have been prepared for\nuse."),(0,n.kt)("p",null,"This method must be invoked only once and it must be the first method\ninvoked on this instance."),(0,n.kt)("h4",{id:"returns-4"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"This storage."),(0,n.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/Storage.ts#L17"},"packages/core/src/storage/Storage.ts:17")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"keys"},"keys"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"keys"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"Iterable"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string"),">"),(0,n.kt)("p",null,"Returns an iterator for traversing the keys in this storage. The order\nin which the keys are traversed is undefined."),(0,n.kt)("h4",{id:"returns-5"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Iterable"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string"),">"),(0,n.kt)("p",null,"An iterator for traversing the keys in this\nstorage. The iterator also implements the iterable protocol,\nreturning itself as its own iterator, allowing it to be used in\na ",(0,n.kt)("inlineCode",{parentName:"p"},"for..of")," loop."),(0,n.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/Storage.ts#L86"},"packages/core/src/storage/Storage.ts:86")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"set"},"set"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"set"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"key"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"value"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"Sets the storage entry identified by the specified key to the provided\nvalue. The method creates the entry if it does not exist already."),(0,n.kt)("h4",{id:"parameters-3"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"key")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The key identifying the storage entry.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"value")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"V")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The storage entry value.")))),(0,n.kt)("h4",{id:"returns-6"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,n.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"V"),">"),(0,n.kt)("p",null,"This storage."),(0,n.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/Storage.ts#L54"},"packages/core/src/storage/Storage.ts:54")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"size"},"size"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"size"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"number")),(0,n.kt)("p",null,"Returns the number of entries in this storage."),(0,n.kt)("h4",{id:"returns-7"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"number")),(0,n.kt)("p",null,"The number of entries in this storage."),(0,n.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/Storage.ts#L95"},"packages/core/src/storage/Storage.ts:95")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/10f85a35.a093f164.js b/assets/js/10f85a35.67d5e5e7.js similarity index 97% rename from assets/js/10f85a35.a093f164.js rename to assets/js/10f85a35.67d5e5e7.js index 9fc6c7ebac..93488bea89 100644 --- a/assets/js/10f85a35.a093f164.js +++ b/assets/js/10f85a35.67d5e5e7.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4513],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>u});var n=a(7294);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var o=n.createContext({}),m=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=m(e.components);return n.createElement(o.Provider,{value:t},e.children)},s="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},k=n.forwardRef((function(e,t){var a=e.components,i=e.mdxType,r=e.originalType,o=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),s=m(a),k=i,u=s["".concat(o,".").concat(k)]||s[k]||c[k]||r;return a?n.createElement(u,l(l({ref:t},d),{},{components:a})):n.createElement(u,l({ref:t},d))}));function u(e,t){var a=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=a.length,l=new Array(r);l[0]=k;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[s]="string"==typeof e?e:i,l[1]=p;for(var m=2;m{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>c,frontMatter:()=>r,metadata:()=>p,toc:()=>m});var n=a(5773),i=(a(7294),a(3905));const r={id:"ima_cli.ImaCliPlugin",title:"Interface: ImaCliPlugin",sidebar_label:"@ima/cli.ImaCliPlugin",custom_edit_url:null},l=void 0,p={unversionedId:"api/interfaces/ima_cli.ImaCliPlugin",id:"api/interfaces/ima_cli.ImaCliPlugin",title:"Interface: ImaCliPlugin",description:"@ima/cli.ImaCliPlugin",source:"@site/../docs/api/interfaces/ima_cli.ImaCliPlugin.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_cli.ImaCliPlugin",permalink:"/api/interfaces/ima_cli.ImaCliPlugin",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_cli.ImaCliPlugin",title:"Interface: ImaCliPlugin",sidebar_label:"@ima/cli.ImaCliPlugin",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/cli.ImaCliArgs",permalink:"/api/interfaces/ima_cli.ImaCliArgs"},next:{title:"@ima/cli.ImaConfigurationContext",permalink:"/api/interfaces/ima_cli.ImaConfigurationContext"}},o={},m=[{value:"Properties",id:"properties",level:2},{value:"cliArgs",id:"cliargs",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"name",id:"name",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"Methods",id:"methods",level:2},{value:"postProcess",id:"postprocess",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"preProcess",id:"preprocess",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"prepareConfigurations",id:"prepareconfigurations",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"webpack",id:"webpack",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-5",level:4}],d={toc:m},s="wrapper";function c(e){let{components:t,...a}=e;return(0,i.kt)(s,(0,n.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_cli"},"@ima/cli"),".ImaCliPlugin"),(0,i.kt)("p",null,"Interface for ima/cli plugins that can be defined in plugins field in ima.conf.js. These can be used\nto extend functionality of default CLI with custom cli arguments and webpack config overrides."),(0,i.kt)("h2",{id:"properties"},"Properties"),(0,i.kt)("h3",{id:"cliargs"},"cliArgs"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("inlineCode",{parentName:"p"},"Readonly")," ",(0,i.kt)("strong",{parentName:"p"},"cliArgs"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"Partial"),"<",(0,i.kt)("inlineCode",{parentName:"p"},"Record"),"<",(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_cli#imaclicommand"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaCliCommand")),", ",(0,i.kt)("inlineCode",{parentName:"p"},"CommandBuilder"),">",">"),(0,i.kt)("p",null,"Optional additional CLI arguments to extend the set of existing ones."),(0,i.kt)("h4",{id:"defined-in"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L99"},"types.ts:99")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"name"},"name"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Readonly")," ",(0,i.kt)("strong",{parentName:"p"},"name"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("p",null,"Plugin name, used mainly for better debugging messages."),(0,i.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L94"},"types.ts:94")),(0,i.kt)("h2",{id:"methods"},"Methods"),(0,i.kt)("h3",{id:"postprocess"},"postProcess"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"postProcess"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"args"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"imaConfig"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,i.kt)("p",null,"Optional plugin hook to do some custom processing after the compilation has finished.\nAttention! This hook runs only for build command."),(0,i.kt)("h4",{id:"parameters"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"args")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_cli.ImaCliArgs"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaCliArgs")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"imaConfig")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/modules/ima_cli#imaconfig"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfig")))))),(0,i.kt)("h4",{id:"returns"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,i.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L132"},"types.ts:132")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"preprocess"},"preProcess"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"preProcess"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"args"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"imaConfig"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,i.kt)("p",null,"Optional plugin hook to do some pre processing right after the cli args are processed\nand the imaConfig is loaded, before the webpack config creation and compiler run."),(0,i.kt)("h4",{id:"parameters-1"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"args")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_cli.ImaCliArgs"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaCliArgs")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"imaConfig")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/modules/ima_cli#imaconfig"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfig")))))),(0,i.kt)("h4",{id:"returns-1"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,i.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L105"},"types.ts:105")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"prepareconfigurations"},"prepareConfigurations"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"prepareConfigurations"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"configurations"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"imaConfig"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"args"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaConfigurationContext"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfigurationContext")),"[]",">"),(0,i.kt)("p",null,"Called right before creating webpack configurations after preProcess call.\nThis hook lets you customize configuration contexts for each webpack config\nthat will be generated. This is usefull when you need to overrite configuration\ncontexts for values that are not editable anywhere else (like output folders)."),(0,i.kt)("h4",{id:"parameters-2"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"configurations")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_cli.ImaConfigurationContext"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfigurationContext")),"[]")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"imaConfig")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/modules/ima_cli#imaconfig"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfig")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"args")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_cli.ImaCliArgs"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaCliArgs")))))),(0,i.kt)("h4",{id:"returns-2"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaConfigurationContext"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfigurationContext")),"[]",">"),(0,i.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L113"},"types.ts:113")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"webpack"},"webpack"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"webpack"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"config"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"ctx"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"imaConfig"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("inlineCode",{parentName:"p"},"Configuration"),">"),(0,i.kt)("p",null,"Webpack callback function used by plugins to customize/extend ima webpack config before it's run."),(0,i.kt)("h4",{id:"parameters-3"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"config")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Configuration"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"ctx")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_cli.ImaConfigurationContext"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfigurationContext")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"imaConfig")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/modules/ima_cli#imaconfig"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfig")))))),(0,i.kt)("h4",{id:"returns-3"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("inlineCode",{parentName:"p"},"Configuration"),">"),(0,i.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L122"},"types.ts:122")))}c.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4513],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>u});var n=a(7294);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var o=n.createContext({}),m=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=m(e.components);return n.createElement(o.Provider,{value:t},e.children)},s="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},k=n.forwardRef((function(e,t){var a=e.components,i=e.mdxType,r=e.originalType,o=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),s=m(a),k=i,u=s["".concat(o,".").concat(k)]||s[k]||c[k]||r;return a?n.createElement(u,l(l({ref:t},d),{},{components:a})):n.createElement(u,l({ref:t},d))}));function u(e,t){var a=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=a.length,l=new Array(r);l[0]=k;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[s]="string"==typeof e?e:i,l[1]=p;for(var m=2;m{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>c,frontMatter:()=>r,metadata:()=>p,toc:()=>m});var n=a(5773),i=(a(7294),a(3905));const r={id:"ima_cli.ImaCliPlugin",title:"Interface: ImaCliPlugin",sidebar_label:"@ima/cli.ImaCliPlugin",custom_edit_url:null},l=void 0,p={unversionedId:"api/interfaces/ima_cli.ImaCliPlugin",id:"api/interfaces/ima_cli.ImaCliPlugin",title:"Interface: ImaCliPlugin",description:"@ima/cli.ImaCliPlugin",source:"@site/../docs/api/interfaces/ima_cli.ImaCliPlugin.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_cli.ImaCliPlugin",permalink:"/api/interfaces/ima_cli.ImaCliPlugin",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_cli.ImaCliPlugin",title:"Interface: ImaCliPlugin",sidebar_label:"@ima/cli.ImaCliPlugin",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/cli.ImaCliArgs",permalink:"/api/interfaces/ima_cli.ImaCliArgs"},next:{title:"@ima/cli.ImaConfigurationContext",permalink:"/api/interfaces/ima_cli.ImaConfigurationContext"}},o={},m=[{value:"Properties",id:"properties",level:2},{value:"cliArgs",id:"cliargs",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"name",id:"name",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"Methods",id:"methods",level:2},{value:"postProcess",id:"postprocess",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"preProcess",id:"preprocess",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"prepareConfigurations",id:"prepareconfigurations",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"webpack",id:"webpack",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-5",level:4}],d={toc:m},s="wrapper";function c(e){let{components:t,...a}=e;return(0,i.kt)(s,(0,n.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_cli"},"@ima/cli"),".ImaCliPlugin"),(0,i.kt)("p",null,"Interface for ima/cli plugins that can be defined in plugins field in ima.conf.js. These can be used\nto extend functionality of default CLI with custom cli arguments and webpack config overrides."),(0,i.kt)("h2",{id:"properties"},"Properties"),(0,i.kt)("h3",{id:"cliargs"},"cliArgs"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("inlineCode",{parentName:"p"},"Readonly")," ",(0,i.kt)("strong",{parentName:"p"},"cliArgs"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"Partial"),"<",(0,i.kt)("inlineCode",{parentName:"p"},"Record"),"<",(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_cli#imaclicommand"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaCliCommand")),", ",(0,i.kt)("inlineCode",{parentName:"p"},"CommandBuilder"),">",">"),(0,i.kt)("p",null,"Optional additional CLI arguments to extend the set of existing ones."),(0,i.kt)("h4",{id:"defined-in"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L99"},"types.ts:99")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"name"},"name"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Readonly")," ",(0,i.kt)("strong",{parentName:"p"},"name"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("p",null,"Plugin name, used mainly for better debugging messages."),(0,i.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L94"},"types.ts:94")),(0,i.kt)("h2",{id:"methods"},"Methods"),(0,i.kt)("h3",{id:"postprocess"},"postProcess"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"postProcess"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"args"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"imaConfig"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,i.kt)("p",null,"Optional plugin hook to do some custom processing after the compilation has finished.\nAttention! This hook runs only for build command."),(0,i.kt)("h4",{id:"parameters"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"args")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_cli.ImaCliArgs"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaCliArgs")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"imaConfig")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/modules/ima_cli#imaconfig"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfig")))))),(0,i.kt)("h4",{id:"returns"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,i.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L132"},"types.ts:132")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"preprocess"},"preProcess"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"preProcess"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"args"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"imaConfig"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,i.kt)("p",null,"Optional plugin hook to do some pre processing right after the cli args are processed\nand the imaConfig is loaded, before the webpack config creation and compiler run."),(0,i.kt)("h4",{id:"parameters-1"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"args")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_cli.ImaCliArgs"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaCliArgs")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"imaConfig")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/modules/ima_cli#imaconfig"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfig")))))),(0,i.kt)("h4",{id:"returns-1"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,i.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L105"},"types.ts:105")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"prepareconfigurations"},"prepareConfigurations"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"prepareConfigurations"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"configurations"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"imaConfig"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"args"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaConfigurationContext"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfigurationContext")),"[]",">"),(0,i.kt)("p",null,"Called right before creating webpack configurations after preProcess call.\nThis hook lets you customize configuration contexts for each webpack config\nthat will be generated. This is usefull when you need to overrite configuration\ncontexts for values that are not editable anywhere else (like output folders)."),(0,i.kt)("h4",{id:"parameters-2"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"configurations")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_cli.ImaConfigurationContext"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfigurationContext")),"[]")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"imaConfig")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/modules/ima_cli#imaconfig"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfig")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"args")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_cli.ImaCliArgs"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaCliArgs")))))),(0,i.kt)("h4",{id:"returns-2"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaConfigurationContext"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfigurationContext")),"[]",">"),(0,i.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L113"},"types.ts:113")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"webpack"},"webpack"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"webpack"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"config"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"ctx"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"imaConfig"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("inlineCode",{parentName:"p"},"Configuration"),">"),(0,i.kt)("p",null,"Webpack callback function used by plugins to customize/extend ima webpack config before it's run."),(0,i.kt)("h4",{id:"parameters-3"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"config")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Configuration"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"ctx")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_cli.ImaConfigurationContext"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfigurationContext")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"imaConfig")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/modules/ima_cli#imaconfig"},(0,i.kt)("inlineCode",{parentName:"a"},"ImaConfig")))))),(0,i.kt)("h4",{id:"returns-3"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,i.kt)("inlineCode",{parentName:"p"},"Configuration"),">"),(0,i.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L122"},"types.ts:122")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/12a940f3.236d91f1.js b/assets/js/12a940f3.f34f637c.js similarity index 96% rename from assets/js/12a940f3.236d91f1.js rename to assets/js/12a940f3.f34f637c.js index 3b39326255..3f441b05d7 100644 --- a/assets/js/12a940f3.236d91f1.js +++ b/assets/js/12a940f3.f34f637c.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[6515],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>k});var a=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o=a.createContext({}),s=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(o.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,o=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),c=s(n),u=i,k=c["".concat(o,".").concat(u)]||c[u]||m[u]||r;return n?a.createElement(k,l(l({ref:t},d),{},{components:n})):a.createElement(k,l({ref:t},d))}));function k(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,l=new Array(r);l[0]=u;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[c]="string"==typeof e?e:i,l[1]=p;for(var s=2;s{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>m,frontMatter:()=>r,metadata:()=>p,toc:()=>s});var a=n(5773),i=(n(7294),n(3905));const r={id:"ima_core.Bootstrap",title:"Class: Bootstrap",sidebar_label:"@ima/core.Bootstrap",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_core.Bootstrap",id:"api/classes/ima_core.Bootstrap",title:"Class: Bootstrap",description:"@ima/core.Bootstrap",source:"@site/../docs/api/classes/ima_core.Bootstrap.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.Bootstrap",permalink:"/api/classes/ima_core.Bootstrap",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.Bootstrap",title:"Class: Bootstrap",sidebar_label:"@ima/core.Bootstrap",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.AbstractRouter",permalink:"/api/classes/ima_core.AbstractRouter"},next:{title:"@ima/core.Cache",permalink:"/api/classes/ima_core.Cache"}},o={},s=[{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"_config",id:"_config",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"_oc",id:"_oc",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"Methods",id:"methods",level:2},{value:"_bindDependencies",id:"_binddependencies",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"_bindPluginDependencies",id:"_bindplugindependencies",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"_initPluginServices",id:"_initpluginservices",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"_initPluginSettings",id:"_initpluginsettings",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"_initRoutes",id:"_initroutes",level:3},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"_initServices",id:"_initservices",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"_initSettings",id:"_initsettings",level:3},{value:"Returns",id:"returns-6",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"initPlugin",id:"initplugin",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-7",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"run",id:"run",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-8",level:4},{value:"Defined in",id:"defined-in-11",level:4}],d={toc:s},c="wrapper";function m(e){let{components:t,...n}=e;return(0,i.kt)(c,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".Bootstrap"),(0,i.kt)("p",null,"Application bootstrap used to initialize the environment and the application\nitself."),(0,i.kt)("h2",{id:"constructors"},"Constructors"),(0,i.kt)("h3",{id:"constructor"},"constructor"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"new Bootstrap"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"oc"),")"),(0,i.kt)("p",null,"Initializes the bootstrap."),(0,i.kt)("h4",{id:"parameters"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"oc")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,i.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"The application's object container to use for managing dependencies.")))),(0,i.kt)("h4",{id:"defined-in"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L133"},"packages/core/src/Bootstrap.ts:133")),(0,i.kt)("h2",{id:"properties"},"Properties"),(0,i.kt)("h3",{id:"_config"},"_","config"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,i.kt)("strong",{parentName:"p"},"_","config"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,i.kt)("inlineCode",{parentName:"a"},"BootConfig"))),(0,i.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L125"},"packages/core/src/Bootstrap.ts:125")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"_oc"},"_","oc"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,i.kt)("strong",{parentName:"p"},"_","oc"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,i.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,i.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L124"},"packages/core/src/Bootstrap.ts:124")),(0,i.kt)("h2",{id:"methods"},"Methods"),(0,i.kt)("h3",{id:"_binddependencies"},"_","bindDependencies"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"_bindDependencies"),"(): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Binds the constants, service providers and class dependencies to the\nobject container."),(0,i.kt)("h4",{id:"returns"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L266"},"packages/core/src/Bootstrap.ts:266")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"_bindplugindependencies"},"_","bindPluginDependencies"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"_bindPluginDependencies"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"plugin"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Binds the constants, service providers and class dependencies to the\nobject container for dynamically imported plugins."),(0,i.kt)("h4",{id:"parameters-1"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"name")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Plugin name.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"plugin")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.InitPluginConfig"},(0,i.kt)("inlineCode",{parentName:"a"},"InitPluginConfig"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"Plugin interface (object with init functions).")))),(0,i.kt)("h4",{id:"returns-1"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L298"},"packages/core/src/Bootstrap.ts:298")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"_initpluginservices"},"_","initPluginServices"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"_initPluginServices"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"plugin"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Service initialization for the dynamically loaded plugins."),(0,i.kt)("h4",{id:"parameters-2"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"plugin")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.InitPluginConfig"},(0,i.kt)("inlineCode",{parentName:"a"},"InitPluginConfig"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"Plugin interface (object with init functions).")))),(0,i.kt)("h4",{id:"returns-2"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L336"},"packages/core/src/Bootstrap.ts:336")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"_initpluginsettings"},"_","initPluginSettings"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"_initPluginSettings"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"plugin"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Initializes dynamically loaded plugin settings (if the init\nfunction is provided). The settings are merged into the application\nthe same way as with non-dynamic import, meaning the app setting overrides\nare prioritized over the default plugin settings."),(0,i.kt)("h4",{id:"parameters-3"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"name")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Plugin name.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"plugin")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.InitPluginConfig"},(0,i.kt)("inlineCode",{parentName:"a"},"InitPluginConfig"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"Plugin interface (object with init functions).")))),(0,i.kt)("h4",{id:"returns-3"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L230"},"packages/core/src/Bootstrap.ts:230")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"_initroutes"},"_","initRoutes"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"_initRoutes"),"(): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Initializes the routes."),(0,i.kt)("h4",{id:"returns-4"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L311"},"packages/core/src/Bootstrap.ts:311")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"_initservices"},"_","initServices"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"_initServices"),"(): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Initializes the basic application services."),(0,i.kt)("h4",{id:"returns-5"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L319"},"packages/core/src/Bootstrap.ts:319")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"_initsettings"},"_","initSettings"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"_initSettings"),"(): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Initializes the application settings. The method loads the settings for\nall environments and then picks the settings for the current environment."),(0,i.kt)("p",null,"The method also handles using the values in the production environment\nas default values for configuration items in other environments."),(0,i.kt)("h4",{id:"returns-6"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L186"},"packages/core/src/Bootstrap.ts:186")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"initplugin"},"initPlugin"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"initPlugin"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"plugin?"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Initializes dynamically loaded plugin. This is explicitly called from\nwithin the Plugin Loader instance."),(0,i.kt)("h4",{id:"parameters-4"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"name")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Plugin name.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"plugin?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.InitPluginConfig"},(0,i.kt)("inlineCode",{parentName:"a"},"InitPluginConfig"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"Plugin interface (object with init functions).")))),(0,i.kt)("h4",{id:"returns-7"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L169"},"packages/core/src/Bootstrap.ts:169")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"run"},"run"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"run"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"config"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Initializes the application by running the bootstrap sequence. The\nsequence initializes the components of the application in the following\norder:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"application settings"),(0,i.kt)("li",{parentName:"ul"},"constants, service providers and class dependencies configuration"),(0,i.kt)("li",{parentName:"ul"},"services"),(0,i.kt)("li",{parentName:"ul"},"UI components"),(0,i.kt)("li",{parentName:"ul"},"routing")),(0,i.kt)("h4",{id:"parameters-5"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"config")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,i.kt)("inlineCode",{parentName:"a"},"BootConfig"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"The application environment configuration for the current environment.")))),(0,i.kt)("h4",{id:"returns-8"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L153"},"packages/core/src/Bootstrap.ts:153")))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[6515],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>k});var a=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o=a.createContext({}),s=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(o.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,o=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),c=s(n),u=i,k=c["".concat(o,".").concat(u)]||c[u]||m[u]||r;return n?a.createElement(k,l(l({ref:t},d),{},{components:n})):a.createElement(k,l({ref:t},d))}));function k(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,l=new Array(r);l[0]=u;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[c]="string"==typeof e?e:i,l[1]=p;for(var s=2;s{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>m,frontMatter:()=>r,metadata:()=>p,toc:()=>s});var a=n(5773),i=(n(7294),n(3905));const r={id:"ima_core.Bootstrap",title:"Class: Bootstrap",sidebar_label:"@ima/core.Bootstrap",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_core.Bootstrap",id:"api/classes/ima_core.Bootstrap",title:"Class: Bootstrap",description:"@ima/core.Bootstrap",source:"@site/../docs/api/classes/ima_core.Bootstrap.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.Bootstrap",permalink:"/api/classes/ima_core.Bootstrap",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.Bootstrap",title:"Class: Bootstrap",sidebar_label:"@ima/core.Bootstrap",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.AbstractRouter",permalink:"/api/classes/ima_core.AbstractRouter"},next:{title:"@ima/core.Cache",permalink:"/api/classes/ima_core.Cache"}},o={},s=[{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"_config",id:"_config",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"_oc",id:"_oc",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"Methods",id:"methods",level:2},{value:"_bindDependencies",id:"_binddependencies",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"_bindPluginDependencies",id:"_bindplugindependencies",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"_initPluginServices",id:"_initpluginservices",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"_initPluginSettings",id:"_initpluginsettings",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"_initRoutes",id:"_initroutes",level:3},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"_initServices",id:"_initservices",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"_initSettings",id:"_initsettings",level:3},{value:"Returns",id:"returns-6",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"initPlugin",id:"initplugin",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-7",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"run",id:"run",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-8",level:4},{value:"Defined in",id:"defined-in-11",level:4}],d={toc:s},c="wrapper";function m(e){let{components:t,...n}=e;return(0,i.kt)(c,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".Bootstrap"),(0,i.kt)("p",null,"Application bootstrap used to initialize the environment and the application\nitself."),(0,i.kt)("h2",{id:"constructors"},"Constructors"),(0,i.kt)("h3",{id:"constructor"},"constructor"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"new Bootstrap"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"oc"),")"),(0,i.kt)("p",null,"Initializes the bootstrap."),(0,i.kt)("h4",{id:"parameters"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"oc")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,i.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"The application's object container to use for managing dependencies.")))),(0,i.kt)("h4",{id:"defined-in"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L133"},"packages/core/src/Bootstrap.ts:133")),(0,i.kt)("h2",{id:"properties"},"Properties"),(0,i.kt)("h3",{id:"_config"},"_","config"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,i.kt)("strong",{parentName:"p"},"_","config"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,i.kt)("inlineCode",{parentName:"a"},"BootConfig"))),(0,i.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L125"},"packages/core/src/Bootstrap.ts:125")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"_oc"},"_","oc"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,i.kt)("strong",{parentName:"p"},"_","oc"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,i.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,i.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L124"},"packages/core/src/Bootstrap.ts:124")),(0,i.kt)("h2",{id:"methods"},"Methods"),(0,i.kt)("h3",{id:"_binddependencies"},"_","bindDependencies"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"_bindDependencies"),"(): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Binds the constants, service providers and class dependencies to the\nobject container."),(0,i.kt)("h4",{id:"returns"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L266"},"packages/core/src/Bootstrap.ts:266")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"_bindplugindependencies"},"_","bindPluginDependencies"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"_bindPluginDependencies"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"plugin"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Binds the constants, service providers and class dependencies to the\nobject container for dynamically imported plugins."),(0,i.kt)("h4",{id:"parameters-1"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"name")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Plugin name.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"plugin")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.InitPluginConfig"},(0,i.kt)("inlineCode",{parentName:"a"},"InitPluginConfig"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"Plugin interface (object with init functions).")))),(0,i.kt)("h4",{id:"returns-1"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L298"},"packages/core/src/Bootstrap.ts:298")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"_initpluginservices"},"_","initPluginServices"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"_initPluginServices"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"plugin"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Service initialization for the dynamically loaded plugins."),(0,i.kt)("h4",{id:"parameters-2"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"plugin")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.InitPluginConfig"},(0,i.kt)("inlineCode",{parentName:"a"},"InitPluginConfig"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"Plugin interface (object with init functions).")))),(0,i.kt)("h4",{id:"returns-2"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L336"},"packages/core/src/Bootstrap.ts:336")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"_initpluginsettings"},"_","initPluginSettings"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"_initPluginSettings"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"plugin"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Initializes dynamically loaded plugin settings (if the init\nfunction is provided). The settings are merged into the application\nthe same way as with non-dynamic import, meaning the app setting overrides\nare prioritized over the default plugin settings."),(0,i.kt)("h4",{id:"parameters-3"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"name")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Plugin name.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"plugin")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.InitPluginConfig"},(0,i.kt)("inlineCode",{parentName:"a"},"InitPluginConfig"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"Plugin interface (object with init functions).")))),(0,i.kt)("h4",{id:"returns-3"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L230"},"packages/core/src/Bootstrap.ts:230")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"_initroutes"},"_","initRoutes"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"_initRoutes"),"(): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Initializes the routes."),(0,i.kt)("h4",{id:"returns-4"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L311"},"packages/core/src/Bootstrap.ts:311")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"_initservices"},"_","initServices"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"_initServices"),"(): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Initializes the basic application services."),(0,i.kt)("h4",{id:"returns-5"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L319"},"packages/core/src/Bootstrap.ts:319")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"_initsettings"},"_","initSettings"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"_initSettings"),"(): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Initializes the application settings. The method loads the settings for\nall environments and then picks the settings for the current environment."),(0,i.kt)("p",null,"The method also handles using the values in the production environment\nas default values for configuration items in other environments."),(0,i.kt)("h4",{id:"returns-6"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L186"},"packages/core/src/Bootstrap.ts:186")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"initplugin"},"initPlugin"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"initPlugin"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"plugin?"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Initializes dynamically loaded plugin. This is explicitly called from\nwithin the Plugin Loader instance."),(0,i.kt)("h4",{id:"parameters-4"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"name")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Plugin name.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"plugin?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.InitPluginConfig"},(0,i.kt)("inlineCode",{parentName:"a"},"InitPluginConfig"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"Plugin interface (object with init functions).")))),(0,i.kt)("h4",{id:"returns-7"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L169"},"packages/core/src/Bootstrap.ts:169")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"run"},"run"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"run"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"config"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("p",null,"Initializes the application by running the bootstrap sequence. The\nsequence initializes the components of the application in the following\norder:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"application settings"),(0,i.kt)("li",{parentName:"ul"},"constants, service providers and class dependencies configuration"),(0,i.kt)("li",{parentName:"ul"},"services"),(0,i.kt)("li",{parentName:"ul"},"UI components"),(0,i.kt)("li",{parentName:"ul"},"routing")),(0,i.kt)("h4",{id:"parameters-5"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"config")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,i.kt)("inlineCode",{parentName:"a"},"BootConfig"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"The application environment configuration for the current environment.")))),(0,i.kt)("h4",{id:"returns-8"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"void")),(0,i.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L153"},"packages/core/src/Bootstrap.ts:153")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/13512aaf.8b0a566a.js b/assets/js/13512aaf.777e67b4.js similarity index 95% rename from assets/js/13512aaf.8b0a566a.js rename to assets/js/13512aaf.777e67b4.js index 060017b3fe..f7c7eba0c4 100644 --- a/assets/js/13512aaf.8b0a566a.js +++ b/assets/js/13512aaf.777e67b4.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4539],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>u});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),d=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=d(e.components);return n.createElement(o.Provider,{value:t},e.children)},m="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},k=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),m=d(a),k=r,u=m["".concat(o,".").concat(k)]||m[k]||s[k]||i;return a?n.createElement(u,l(l({ref:t},c),{},{components:a})):n.createElement(u,l({ref:t},c))}));function u(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=k;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[m]="string"==typeof e?e:r,l[1]=p;for(var d=2;d{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>s,frontMatter:()=>i,metadata:()=>p,toc:()=>d});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_core.Settings",title:"Interface: Settings",sidebar_label:"@ima/core.Settings",custom_edit_url:null},l=void 0,p={unversionedId:"api/interfaces/ima_core.Settings",id:"api/interfaces/ima_core.Settings",title:"Interface: Settings",description:"@ima/core.Settings",source:"@site/../docs/api/interfaces/ima_core.Settings.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.Settings",permalink:"/api/interfaces/ima_core.Settings",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.Settings",title:"Interface: Settings",sidebar_label:"@ima/core.Settings",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.RouteOptions",permalink:"/api/interfaces/ima_core.RouteOptions"},next:{title:"@ima/core.Utils",permalink:"/api/interfaces/ima_core.Utils"}},o={},d=[{value:"Properties",id:"properties",level:2},{value:"$Cache",id:"cache",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"$Http",id:"http",level:3},{value:"Type declaration",id:"type-declaration-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"$Observable",id:"observable",level:3},{value:"Type declaration",id:"type-declaration-2",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"$Page",id:"page",level:3},{value:"Type declaration",id:"type-declaration-3",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"$Router",id:"router",level:3},{value:"Type declaration",id:"type-declaration-4",level:4},{value:"Defined in",id:"defined-in-4",level:4}],c={toc:d},m="wrapper";function s(e){let{components:t,...a}=e;return(0,r.kt)(m,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".Settings"),(0,r.kt)("p",null,"App settings for single env key."),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"cache"},"$Cache"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"$Cache"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"enabled?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ttl?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number"))))),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L144"},"packages/core/src/boot.ts:144")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"http"},"$Http"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"$Http"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-1"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"cacheOptions")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"HttpAgentImplCacheOptions"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"defaultRequestOptions")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Omit"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.HttpAgentRequestOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"HttpAgentRequestOptions")),", ",(0,r.kt)("inlineCode",{parentName:"td"},'"abortController"'),">")))),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L136"},"packages/core/src/boot.ts:136")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"observable"},"$Observable"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"$Observable"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-2"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"maxHistoryLength?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number"))))),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L151"},"packages/core/src/boot.ts:151")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"page"},"$Page"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"$Page"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-3"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"$Render")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.PageRendererSettings"},(0,r.kt)("inlineCode",{parentName:"a"},"PageRendererSettings")))))),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L148"},"packages/core/src/boot.ts:148")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"router"},"$Router"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"$Router"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-4"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"isSPARouted?")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"url"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"action?"),": ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteAction"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteAction")),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"middlewareTimeout?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number"))))),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L140"},"packages/core/src/boot.ts:140")))}s.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4539],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>u});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),d=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=d(e.components);return n.createElement(o.Provider,{value:t},e.children)},m="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},k=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),m=d(a),k=r,u=m["".concat(o,".").concat(k)]||m[k]||s[k]||i;return a?n.createElement(u,l(l({ref:t},c),{},{components:a})):n.createElement(u,l({ref:t},c))}));function u(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=k;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[m]="string"==typeof e?e:r,l[1]=p;for(var d=2;d{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>s,frontMatter:()=>i,metadata:()=>p,toc:()=>d});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_core.Settings",title:"Interface: Settings",sidebar_label:"@ima/core.Settings",custom_edit_url:null},l=void 0,p={unversionedId:"api/interfaces/ima_core.Settings",id:"api/interfaces/ima_core.Settings",title:"Interface: Settings",description:"@ima/core.Settings",source:"@site/../docs/api/interfaces/ima_core.Settings.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.Settings",permalink:"/api/interfaces/ima_core.Settings",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.Settings",title:"Interface: Settings",sidebar_label:"@ima/core.Settings",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.RouteOptions",permalink:"/api/interfaces/ima_core.RouteOptions"},next:{title:"@ima/core.Utils",permalink:"/api/interfaces/ima_core.Utils"}},o={},d=[{value:"Properties",id:"properties",level:2},{value:"$Cache",id:"cache",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"$Http",id:"http",level:3},{value:"Type declaration",id:"type-declaration-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"$Observable",id:"observable",level:3},{value:"Type declaration",id:"type-declaration-2",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"$Page",id:"page",level:3},{value:"Type declaration",id:"type-declaration-3",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"$Router",id:"router",level:3},{value:"Type declaration",id:"type-declaration-4",level:4},{value:"Defined in",id:"defined-in-4",level:4}],c={toc:d},m="wrapper";function s(e){let{components:t,...a}=e;return(0,r.kt)(m,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".Settings"),(0,r.kt)("p",null,"App settings for single env key."),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"cache"},"$Cache"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"$Cache"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"enabled?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ttl?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number"))))),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L144"},"packages/core/src/boot.ts:144")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"http"},"$Http"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"$Http"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-1"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"cacheOptions")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"HttpAgentImplCacheOptions"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"defaultRequestOptions")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Omit"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.HttpAgentRequestOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"HttpAgentRequestOptions")),", ",(0,r.kt)("inlineCode",{parentName:"td"},'"abortController"'),">")))),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L136"},"packages/core/src/boot.ts:136")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"observable"},"$Observable"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"$Observable"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-2"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"maxHistoryLength?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number"))))),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L151"},"packages/core/src/boot.ts:151")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"page"},"$Page"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"$Page"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-3"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"$Render")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.PageRendererSettings"},(0,r.kt)("inlineCode",{parentName:"a"},"PageRendererSettings")))))),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L148"},"packages/core/src/boot.ts:148")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"router"},"$Router"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"$Router"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-4"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"isSPARouted?")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"url"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"action?"),": ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteAction"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteAction")),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"middlewareTimeout?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number"))))),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L140"},"packages/core/src/boot.ts:140")))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1352a5d9.054768ad.js b/assets/js/1352a5d9.72cae4f2.js similarity index 60% rename from assets/js/1352a5d9.054768ad.js rename to assets/js/1352a5d9.72cae4f2.js index 81f25e866b..67d1551eb5 100644 --- a/assets/js/1352a5d9.054768ad.js +++ b/assets/js/1352a5d9.72cae4f2.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[7912],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>f});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),p=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},l=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),d=p(r),m=a,f=d["".concat(s,".").concat(m)]||d[m]||u[m]||i;return r?n.createElement(f,o(o({ref:t},l),{},{components:r})):n.createElement(f,o({ref:t},l))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=m;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[d]="string"==typeof e?e:a,o[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var n=r(5773),a=(r(7294),r(3905));const i={title:"Dynamic imports",description:"Advanced Features > Dynamic imports and lazy loading"},o=void 0,c={unversionedId:"advanced-features/dynamic-imports",id:"advanced-features/dynamic-imports",title:"Dynamic imports",description:"Advanced Features > Dynamic imports and lazy loading",source:"@site/../docs/advanced-features/dynamic-imports.md",sourceDirName:"advanced-features",slug:"/advanced-features/dynamic-imports",permalink:"/advanced-features/dynamic-imports",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/advanced-features/dynamic-imports.md",tags:[],version:"current",lastUpdatedBy:"Filip Satek",lastUpdatedAt:1734590310,formattedLastUpdatedAt:"Dec 19, 2024",frontMatter:{title:"Dynamic imports",description:"Advanced Features > Dynamic imports and lazy loading"},sidebar:"docs",previous:{title:"Testing",permalink:"/basic-features/testing"},next:{title:"Introduction to @ima/cli",permalink:"/cli/"}},s={},p=[{value:"Dynamic imports",id:"dynamic-imports",level:2},{value:"Preloading and prefetching",id:"preloading-and-prefetching",level:2},{value:"React suspense",id:"react-suspense",level:2}],l={toc:p},d="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"dynamic-imports"},"Dynamic imports"),(0,a.kt)("h2",{id:"preloading-and-prefetching"},"Preloading and prefetching"),(0,a.kt)("p",null,"Since we're using webpack, to built the application, it already has support for ",(0,a.kt)("a",{parentName:"p",href:"https://webpack.js.org/guides/code-splitting/#prefetchingpreloading-modules"},"inline directives")," for preloading and prefetching. Using this comment:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"import(/* webpackPrefetch: true */ './path/to/LoginModal.js');\n")),(0,a.kt)("p",null,"will result in",(0,a.kt)("inlineCode",{parentName:"p"},'')," being appended in the head of the page. For more information about"),(0,a.kt)("h2",{id:"react-suspense"},"React suspense"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://reactjs.org/docs/react-api.html#reactsuspense"},"Suspense")," currently ",(0,a.kt)("strong",{parentName:"p"},"doesn't support SSR"),". However you can use it to load client-side react components. Don't forget to add proper handlers so it only gets rendered on client, since SSR will result in an hydratation error."))}u.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[7912],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>f});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),p=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},l=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),d=p(r),m=a,f=d["".concat(s,".").concat(m)]||d[m]||u[m]||i;return r?n.createElement(f,o(o({ref:t},l),{},{components:r})):n.createElement(f,o({ref:t},l))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=m;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[d]="string"==typeof e?e:a,o[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var n=r(5773),a=(r(7294),r(3905));const i={title:"Dynamic imports",description:"Advanced Features > Dynamic imports and lazy loading"},o=void 0,c={unversionedId:"advanced-features/dynamic-imports",id:"advanced-features/dynamic-imports",title:"Dynamic imports",description:"Advanced Features > Dynamic imports and lazy loading",source:"@site/../docs/advanced-features/dynamic-imports.md",sourceDirName:"advanced-features",slug:"/advanced-features/dynamic-imports",permalink:"/advanced-features/dynamic-imports",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/advanced-features/dynamic-imports.md",tags:[],version:"current",lastUpdatedBy:"PS",lastUpdatedAt:1736522400,formattedLastUpdatedAt:"Jan 10, 2025",frontMatter:{title:"Dynamic imports",description:"Advanced Features > Dynamic imports and lazy loading"},sidebar:"docs",previous:{title:"Testing",permalink:"/basic-features/testing"},next:{title:"Introduction to @ima/cli",permalink:"/cli/"}},s={},p=[{value:"Dynamic imports",id:"dynamic-imports",level:2},{value:"Preloading and prefetching",id:"preloading-and-prefetching",level:2},{value:"React suspense",id:"react-suspense",level:2}],l={toc:p},d="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"dynamic-imports"},"Dynamic imports"),(0,a.kt)("h2",{id:"preloading-and-prefetching"},"Preloading and prefetching"),(0,a.kt)("p",null,"Since we're using webpack, to built the application, it already has support for ",(0,a.kt)("a",{parentName:"p",href:"https://webpack.js.org/guides/code-splitting/#prefetchingpreloading-modules"},"inline directives")," for preloading and prefetching. Using this comment:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"import(/* webpackPrefetch: true */ './path/to/LoginModal.js');\n")),(0,a.kt)("p",null,"will result in",(0,a.kt)("inlineCode",{parentName:"p"},'')," being appended in the head of the page. For more information about"),(0,a.kt)("h2",{id:"react-suspense"},"React suspense"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://reactjs.org/docs/react-api.html#reactsuspense"},"Suspense")," currently ",(0,a.kt)("strong",{parentName:"p"},"doesn't support SSR"),". However you can use it to load client-side react components. Don't forget to add proper handlers so it only gets rendered on client, since SSR will result in an hydratation error."))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/151b6e84.76752e5e.js b/assets/js/151b6e84.0ef63d71.js similarity index 99% rename from assets/js/151b6e84.76752e5e.js rename to assets/js/151b6e84.0ef63d71.js index 161f598e4b..0a8d3fab5b 100644 --- a/assets/js/151b6e84.76752e5e.js +++ b/assets/js/151b6e84.0ef63d71.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[1590],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>N});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var d=a.createContext({}),o=function(e){var t=a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=o(e.components);return a.createElement(d.Provider,{value:t},e.children)},s="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,d=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),s=o(n),u=r,N=s["".concat(d,".").concat(u)]||s[u]||k[u]||l;return n?a.createElement(N,i(i({ref:t},m),{},{components:n})):a.createElement(N,i({ref:t},m))}));function N(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=u;var p={};for(var d in t)hasOwnProperty.call(t,d)&&(p[d]=t[d]);p.originalType=e,p[s]="string"==typeof e?e:r,i[1]=p;for(var o=2;o{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>k,frontMatter:()=>l,metadata:()=>p,toc:()=>o});var a=n(5773),r=(n(7294),n(3905));const l={id:"ima_react_page_renderer.AbstractPureComponent",title:"Class: AbstractPureComponent",sidebar_label:"@ima/react-page-renderer.AbstractPureComponent",custom_edit_url:null},i=void 0,p={unversionedId:"api/classes/ima_react_page_renderer.AbstractPureComponent",id:"api/classes/ima_react_page_renderer.AbstractPureComponent",title:"Class: AbstractPureComponent",description:"@ima/react-page-renderer.AbstractPureComponent",source:"@site/../docs/api/classes/ima_react_page_renderer.AbstractPureComponent.md",sourceDirName:"api/classes",slug:"/api/classes/ima_react_page_renderer.AbstractPureComponent",permalink:"/api/classes/ima_react_page_renderer.AbstractPureComponent",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_react_page_renderer.AbstractPureComponent",title:"Class: AbstractPureComponent",sidebar_label:"@ima/react-page-renderer.AbstractPureComponent",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/react-page-renderer.AbstractComponent",permalink:"/api/classes/ima_react_page_renderer.AbstractComponent"},next:{title:"@ima/react-page-renderer.BlankManagedRootView",permalink:"/api/classes/ima_react_page_renderer.BlankManagedRootView"}},d={},o=[{value:"Type parameters",id:"type-parameters",level:2},{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Parameters",id:"parameters",level:4},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Type parameters",id:"type-parameters-2",level:4},{value:"Parameters",id:"parameters-1",level:4},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"Properties",id:"properties",level:2},{value:"_utils",id:"_utils",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"context",id:"context",level:3},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"props",id:"props",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"refs",id:"refs",level:3},{value:"Index signature",id:"index-signature",level:4},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"state",id:"state",level:3},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"contextType",id:"contexttype",level:3},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"Accessors",id:"accessors",level:2},{value:"utils",id:"utils",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"Methods",id:"methods",level:2},{value:"UNSAFE_componentWillMount",id:"unsafe_componentwillmount",level:3},{value:"Returns",id:"returns-1",level:4},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"UNSAFE_componentWillReceiveProps",id:"unsafe_componentwillreceiveprops",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"UNSAFE_componentWillUpdate",id:"unsafe_componentwillupdate",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Inherited from",id:"inherited-from-7",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"componentDidCatch",id:"componentdidcatch",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Inherited from",id:"inherited-from-8",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"componentDidMount",id:"componentdidmount",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Inherited from",id:"inherited-from-9",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"componentDidUpdate",id:"componentdidupdate",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Inherited from",id:"inherited-from-10",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"componentWillMount",id:"componentwillmount",level:3},{value:"Returns",id:"returns-7",level:4},{value:"Inherited from",id:"inherited-from-11",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"componentWillReceiveProps",id:"componentwillreceiveprops",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-8",level:4},{value:"Inherited from",id:"inherited-from-12",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"componentWillUnmount",id:"componentwillunmount",level:3},{value:"Returns",id:"returns-9",level:4},{value:"Inherited from",id:"inherited-from-13",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"componentWillUpdate",id:"componentwillupdate",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-10",level:4},{value:"Inherited from",id:"inherited-from-14",level:4},{value:"Defined in",id:"defined-in-18",level:4},{value:"cssClasses",id:"cssclasses",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-11",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"fire",id:"fire",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-12",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"forceUpdate",id:"forceupdate",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-13",level:4},{value:"Inherited from",id:"inherited-from-15",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"getSnapshotBeforeUpdate",id:"getsnapshotbeforeupdate",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-14",level:4},{value:"Inherited from",id:"inherited-from-16",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"link",id:"link",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-15",level:4},{value:"Defined in",id:"defined-in-23",level:4},{value:"listen",id:"listen",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-16",level:4},{value:"Defined in",id:"defined-in-24",level:4},{value:"localize",id:"localize",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-17",level:4},{value:"Defined in",id:"defined-in-25",level:4},{value:"render",id:"render",level:3},{value:"Returns",id:"returns-18",level:4},{value:"Inherited from",id:"inherited-from-17",level:4},{value:"Defined in",id:"defined-in-26",level:4},{value:"setState",id:"setstate",level:3},{value:"Type parameters",id:"type-parameters-3",level:4},{value:"Parameters",id:"parameters-15",level:4},{value:"Returns",id:"returns-19",level:4},{value:"Inherited from",id:"inherited-from-18",level:4},{value:"Defined in",id:"defined-in-27",level:4},{value:"shouldComponentUpdate",id:"shouldcomponentupdate",level:3},{value:"Parameters",id:"parameters-16",level:4},{value:"Returns",id:"returns-20",level:4},{value:"Inherited from",id:"inherited-from-19",level:4},{value:"Defined in",id:"defined-in-28",level:4},{value:"unlisten",id:"unlisten",level:3},{value:"Parameters",id:"parameters-17",level:4},{value:"Returns",id:"returns-21",level:4},{value:"Defined in",id:"defined-in-29",level:4}],m={toc:o},s="wrapper";function k(e){let{components:t,...n}=e;return(0,r.kt)(s,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_react_page_renderer"},"@ima/react-page-renderer"),".AbstractPureComponent"),(0,r.kt)("p",null,"The base class for all view components."),(0,r.kt)("h2",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"PureComponent"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">"),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"AbstractPureComponent"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new AbstractPureComponent"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"props"),")"),(0,r.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"props")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")))),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,"PureComponent",".constructor"),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:515"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new AbstractPureComponent"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"props"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"context"),")"),(0,r.kt)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"props")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"context")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://legacy.reactjs.org/docs/legacy-context.html"},"https://legacy.reactjs.org/docs/legacy-context.html")),(0,r.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,r.kt)("p",null,"PureComponent",".constructor"),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:520"),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"_utils"},"_","utils"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"_","utils"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,r.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L18"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:18")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"context"},"context"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"context"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_react_page_renderer.PageContextType"},(0,r.kt)("inlineCode",{parentName:"a"},"PageContextType"))),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,"PureComponent.context"),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L16"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:16")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"props"},"props"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Readonly")," ",(0,r.kt)("strong",{parentName:"p"},"props"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),">"),(0,r.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.props"),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:533"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"refs"},"refs"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"refs"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs"},"https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs")),(0,r.kt)("h4",{id:"index-signature"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"ReactInstance")),(0,r.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.refs"),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:539"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"state"},"state"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"state"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">"),(0,r.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.state"),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:534"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"contexttype"},"contextType"),(0,r.kt)("p",null,"\u25aa ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("strong",{parentName:"p"},"contextType"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Context"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_react_page_renderer.PageContextType"},(0,r.kt)("inlineCode",{parentName:"a"},"PageContextType")),">"," = ",(0,r.kt)("inlineCode",{parentName:"p"},"PageContext")),(0,r.kt)("h4",{id:"overrides-1"},"Overrides"),(0,r.kt)("p",null,"PureComponent.contextType"),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L15"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:15")),(0,r.kt)("h2",{id:"accessors"},"Accessors"),(0,r.kt)("h3",{id:"utils"},"utils"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"get")," ",(0,r.kt)("strong",{parentName:"p"},"utils"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,r.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,r.kt)("p",null,"Returns the utilities for the view components. The returned value is the\nvalue bound to the ",(0,r.kt)("inlineCode",{parentName:"p"},"$Utils")," object container constant."),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,r.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,r.kt)("p",null,"The utilities for the view components."),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L26"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:26")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"unsafe_componentwillmount"},"UNSAFE","_","componentWillMount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"UNSAFE_componentWillMount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before mounting occurs, and before ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#render"),".\nAvoid introducing any side-effects or subscriptions in this method."),(0,r.kt)("p",null,"This method will not stop working in React 17."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use componentDidMount or the constructor instead"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.UNSAFE","_","componentWillMount"),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:730"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unsafe_componentwillreceiveprops"},"UNSAFE","_","componentWillReceiveProps"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"UNSAFE_componentWillReceiveProps"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called when the component may be receiving new props.\nReact may call this even if props have not changed, so be sure to compare new and existing\nprops if you only want to handle changes."),(0,r.kt)("p",null,"Calling ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," generally does not trigger this method."),(0,r.kt)("p",null,"This method will not stop working in React 17."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use static getDerivedStateFromProps instead"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.UNSAFE","_","componentWillReceiveProps"),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:762"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unsafe_componentwillupdate"},"UNSAFE","_","componentWillUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"UNSAFE_componentWillUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before rendering when new props or state is received. Not called for the initial render."),(0,r.kt)("p",null,"Note: You cannot call ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," here."),(0,r.kt)("p",null,"This method will not stop working in React 17."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use getSnapshotBeforeUpdate instead"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-7"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.UNSAFE","_","componentWillUpdate"),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:790"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentdidcatch"},"componentDidCatch"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentDidCatch"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"error"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"errorInfo"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Catches exceptions generated in descendant components. Unhandled exceptions will cause\nthe entire component tree to unmount."),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"error")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Error"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"errorInfo")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ErrorInfo"))))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-8"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.componentDidCatch"),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:659"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentdidmount"},"componentDidMount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentDidMount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately after a component is mounted. Setting state here will trigger re-rendering."),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-9"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.componentDidMount"),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:638"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentdidupdate"},"componentDidUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentDidUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prevProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"prevState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"snapshot?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately after updating occurs. Not called for the initial render."),(0,r.kt)("p",null,"The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null."),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"snapshot?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS"))))),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-10"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.componentDidUpdate"),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:701"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillmount"},"componentWillMount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillMount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before mounting occurs, and before ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#render"),".\nAvoid introducing any side-effects or subscriptions in this method."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use componentDidMount or the constructor instead; will stop working in React 17"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-11"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.componentWillMount"),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:716"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillreceiveprops"},"componentWillReceiveProps"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillReceiveProps"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called when the component may be receiving new props.\nReact may call this even if props have not changed, so be sure to compare new and existing\nprops if you only want to handle changes."),(0,r.kt)("p",null,"Calling ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," generally does not trigger this method."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use static getDerivedStateFromProps instead; will stop working in React 17"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-12"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.componentWillReceiveProps"),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:745"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillunmount"},"componentWillUnmount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillUnmount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as\ncancelled network requests, or cleaning up any DOM elements created in ",(0,r.kt)("inlineCode",{parentName:"p"},"componentDidMount"),"."),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-13"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.componentWillUnmount"),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:654"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillupdate"},"componentWillUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before rendering when new props or state is received. Not called for the initial render."),(0,r.kt)("p",null,"Note: You cannot call ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," here."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-14"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.componentWillUpdate"),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:775"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cssclasses"},"cssClasses"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"cssClasses"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"classRules"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"includeComponentClassName?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Generate a string of CSS classes from the properties of the passed-in\nobject that resolve to true."),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Default value"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"classRules")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," { ",(0,r.kt)("inlineCode",{parentName:"td"},"[key: string]"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean"),"; }"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"undefined")),(0,r.kt)("td",{parentName:"tr",align:"left"},"CSS classes in a string separated by whitespace, or a map of CSS class names to boolean values. The CSS class name will be included in the result only if the value is ",(0,r.kt)("inlineCode",{parentName:"td"},"true"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"includeComponentClassName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:"left"},"-")))),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"String of CSS classes that had their property resolved\nto ",(0,r.kt)("inlineCode",{parentName:"p"},"true"),"."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Example"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"this.cssClasses('my-class my-class-modifier', true);\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Example"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"this.cssClasses({\n 'my-class': true,\n 'my-class-modifier': this.props.modifier\n }, true);\n")),(0,r.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L86"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:86")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"fire"},"fire"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"fire"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"eventTarget"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"eventName"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"data?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Creates and sends a new IMA.js DOM custom event from this component."),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventTarget")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"EventTarget")),(0,r.kt)("td",{parentName:"tr",align:"left"},"EventTarget compatible node.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the event.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Data to send within the event.")))),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L100"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:100")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"forceupdate"},"forceUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"forceUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"callback?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-10"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"callback?")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))))),(0,r.kt)("h4",{id:"returns-13"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-15"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.forceUpdate"),(0,r.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:530"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getsnapshotbeforeupdate"},"getSnapshotBeforeUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"getSnapshotBeforeUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prevProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"prevState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"SS")),(0,r.kt)("p",null,"Runs before React applies the result of ",(0,r.kt)("inlineCode",{parentName:"p"},"render")," to the document, and\nreturns an object to be given to componentDidUpdate. Useful for saving\nthings such as scroll position before ",(0,r.kt)("inlineCode",{parentName:"p"},"render")," causes changes to it."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated\nlifecycle events from running."),(0,r.kt)("h4",{id:"parameters-11"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")))),(0,r.kt)("h4",{id:"returns-14"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"SS")),(0,r.kt)("h4",{id:"inherited-from-16"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.getSnapshotBeforeUpdate"),(0,r.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:695"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"link"},"link"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"link"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"params?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Generates an absolute URL using the provided route name (see the"),(0,r.kt)("code",null,"app/config/routes.js")," file). The provided parameters will replace the placeholders in the route pattern, while the extraneous parameters will be appended to the generated URL's query string.",(0,r.kt)("h4",{id:"parameters-12"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The route name.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Object")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Router parameters and extraneous parameters to add to the URL as a query string.")))),(0,r.kt)("h4",{id:"returns-15"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"The generated URL."),(0,r.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L62"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:62")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"listen"},"listen"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"listen"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"eventTarget"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"eventName"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Registers the provided event listener for execution whenever an IMA.js\nDOM custom event of the specified name occurs at the specified event\ntarget."),(0,r.kt)("h4",{id:"parameters-13"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventTarget")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"EventTarget")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The react component or event target at which the listener should listen for the event.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the event for which to listen.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"event"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Event"),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The listener for event to register.")))),(0,r.kt)("h4",{id:"returns-16"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L114"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:114")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"localize"},"localize"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"localize"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"key"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"params?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Returns the localized phrase identified by the specified key. The\nplaceholders in the localization phrase will be replaced by the provided\nvalues."),(0,r.kt)("h4",{id:"parameters-14"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"key")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"never")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Localization key.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Object")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Values for replacing the placeholders in the localization phrase.")))),(0,r.kt)("h4",{id:"returns-17"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Localized phrase."),(0,r.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L44"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:44")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"render"},"render"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"render"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"ReactNode")),(0,r.kt)("h4",{id:"returns-18"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"ReactNode")),(0,r.kt)("h4",{id:"inherited-from-17"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.render"),(0,r.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:531"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setstate"},"setState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setState"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"K"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"state"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"callback?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-parameters-3"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"K")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"symbol"))))),(0,r.kt)("h4",{id:"parameters-15"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"S")," ","|"," (",(0,r.kt)("inlineCode",{parentName:"td"},"prevState"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">",", ",(0,r.kt)("inlineCode",{parentName:"td"},"props"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">",") => ",(0,r.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"K"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"K"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"callback?")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))))),(0,r.kt)("h4",{id:"returns-19"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-18"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.setState"),(0,r.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:525"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"shouldcomponentupdate"},"shouldComponentUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"shouldComponentUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Called to determine whether the change in props and state should trigger a re-render."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Component")," always returns true.\n",(0,r.kt)("inlineCode",{parentName:"p"},"PureComponent")," implements a shallow comparison on props and state and returns true if any\nprops or states have changed."),(0,r.kt)("p",null,"If false is returned, ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#render"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"componentWillUpdate"),"\nand ",(0,r.kt)("inlineCode",{parentName:"p"},"componentDidUpdate")," will not be called."),(0,r.kt)("h4",{id:"parameters-16"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-20"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"inherited-from-19"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.shouldComponentUpdate"),(0,r.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:649"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unlisten"},"unlisten"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"unlisten"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"eventTarget"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"eventName"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Deregisters the provided event listener for an IMA.js DOM custom event\nof the specified name at the specified event target."),(0,r.kt)("h4",{id:"parameters-17"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventTarget")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"EventTarget")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The react component or event target at which the listener should listen for the event.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the event for which to listen.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"event"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Event"),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The listener for event to register.")))),(0,r.kt)("h4",{id:"returns-21"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-29"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L131"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:131")))}k.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[1590],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>N});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var d=a.createContext({}),o=function(e){var t=a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=o(e.components);return a.createElement(d.Provider,{value:t},e.children)},s="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,d=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),s=o(n),u=r,N=s["".concat(d,".").concat(u)]||s[u]||k[u]||l;return n?a.createElement(N,i(i({ref:t},m),{},{components:n})):a.createElement(N,i({ref:t},m))}));function N(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=u;var p={};for(var d in t)hasOwnProperty.call(t,d)&&(p[d]=t[d]);p.originalType=e,p[s]="string"==typeof e?e:r,i[1]=p;for(var o=2;o{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>k,frontMatter:()=>l,metadata:()=>p,toc:()=>o});var a=n(5773),r=(n(7294),n(3905));const l={id:"ima_react_page_renderer.AbstractPureComponent",title:"Class: AbstractPureComponent",sidebar_label:"@ima/react-page-renderer.AbstractPureComponent",custom_edit_url:null},i=void 0,p={unversionedId:"api/classes/ima_react_page_renderer.AbstractPureComponent",id:"api/classes/ima_react_page_renderer.AbstractPureComponent",title:"Class: AbstractPureComponent",description:"@ima/react-page-renderer.AbstractPureComponent",source:"@site/../docs/api/classes/ima_react_page_renderer.AbstractPureComponent.md",sourceDirName:"api/classes",slug:"/api/classes/ima_react_page_renderer.AbstractPureComponent",permalink:"/api/classes/ima_react_page_renderer.AbstractPureComponent",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_react_page_renderer.AbstractPureComponent",title:"Class: AbstractPureComponent",sidebar_label:"@ima/react-page-renderer.AbstractPureComponent",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/react-page-renderer.AbstractComponent",permalink:"/api/classes/ima_react_page_renderer.AbstractComponent"},next:{title:"@ima/react-page-renderer.BlankManagedRootView",permalink:"/api/classes/ima_react_page_renderer.BlankManagedRootView"}},d={},o=[{value:"Type parameters",id:"type-parameters",level:2},{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Parameters",id:"parameters",level:4},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Type parameters",id:"type-parameters-2",level:4},{value:"Parameters",id:"parameters-1",level:4},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"Properties",id:"properties",level:2},{value:"_utils",id:"_utils",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"context",id:"context",level:3},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"props",id:"props",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"refs",id:"refs",level:3},{value:"Index signature",id:"index-signature",level:4},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"state",id:"state",level:3},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"contextType",id:"contexttype",level:3},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"Accessors",id:"accessors",level:2},{value:"utils",id:"utils",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"Methods",id:"methods",level:2},{value:"UNSAFE_componentWillMount",id:"unsafe_componentwillmount",level:3},{value:"Returns",id:"returns-1",level:4},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"UNSAFE_componentWillReceiveProps",id:"unsafe_componentwillreceiveprops",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"UNSAFE_componentWillUpdate",id:"unsafe_componentwillupdate",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Inherited from",id:"inherited-from-7",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"componentDidCatch",id:"componentdidcatch",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Inherited from",id:"inherited-from-8",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"componentDidMount",id:"componentdidmount",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Inherited from",id:"inherited-from-9",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"componentDidUpdate",id:"componentdidupdate",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Inherited from",id:"inherited-from-10",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"componentWillMount",id:"componentwillmount",level:3},{value:"Returns",id:"returns-7",level:4},{value:"Inherited from",id:"inherited-from-11",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"componentWillReceiveProps",id:"componentwillreceiveprops",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-8",level:4},{value:"Inherited from",id:"inherited-from-12",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"componentWillUnmount",id:"componentwillunmount",level:3},{value:"Returns",id:"returns-9",level:4},{value:"Inherited from",id:"inherited-from-13",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"componentWillUpdate",id:"componentwillupdate",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-10",level:4},{value:"Inherited from",id:"inherited-from-14",level:4},{value:"Defined in",id:"defined-in-18",level:4},{value:"cssClasses",id:"cssclasses",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-11",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"fire",id:"fire",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-12",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"forceUpdate",id:"forceupdate",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-13",level:4},{value:"Inherited from",id:"inherited-from-15",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"getSnapshotBeforeUpdate",id:"getsnapshotbeforeupdate",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-14",level:4},{value:"Inherited from",id:"inherited-from-16",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"link",id:"link",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-15",level:4},{value:"Defined in",id:"defined-in-23",level:4},{value:"listen",id:"listen",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-16",level:4},{value:"Defined in",id:"defined-in-24",level:4},{value:"localize",id:"localize",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-17",level:4},{value:"Defined in",id:"defined-in-25",level:4},{value:"render",id:"render",level:3},{value:"Returns",id:"returns-18",level:4},{value:"Inherited from",id:"inherited-from-17",level:4},{value:"Defined in",id:"defined-in-26",level:4},{value:"setState",id:"setstate",level:3},{value:"Type parameters",id:"type-parameters-3",level:4},{value:"Parameters",id:"parameters-15",level:4},{value:"Returns",id:"returns-19",level:4},{value:"Inherited from",id:"inherited-from-18",level:4},{value:"Defined in",id:"defined-in-27",level:4},{value:"shouldComponentUpdate",id:"shouldcomponentupdate",level:3},{value:"Parameters",id:"parameters-16",level:4},{value:"Returns",id:"returns-20",level:4},{value:"Inherited from",id:"inherited-from-19",level:4},{value:"Defined in",id:"defined-in-28",level:4},{value:"unlisten",id:"unlisten",level:3},{value:"Parameters",id:"parameters-17",level:4},{value:"Returns",id:"returns-21",level:4},{value:"Defined in",id:"defined-in-29",level:4}],m={toc:o},s="wrapper";function k(e){let{components:t,...n}=e;return(0,r.kt)(s,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_react_page_renderer"},"@ima/react-page-renderer"),".AbstractPureComponent"),(0,r.kt)("p",null,"The base class for all view components."),(0,r.kt)("h2",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"PureComponent"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">"),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"AbstractPureComponent"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new AbstractPureComponent"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"props"),")"),(0,r.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"props")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")))),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,"PureComponent",".constructor"),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:515"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new AbstractPureComponent"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"props"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"context"),")"),(0,r.kt)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"props")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"P"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"context")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://legacy.reactjs.org/docs/legacy-context.html"},"https://legacy.reactjs.org/docs/legacy-context.html")),(0,r.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,r.kt)("p",null,"PureComponent",".constructor"),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:520"),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"_utils"},"_","utils"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"_","utils"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,r.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L18"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:18")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"context"},"context"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"context"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_react_page_renderer.PageContextType"},(0,r.kt)("inlineCode",{parentName:"a"},"PageContextType"))),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,"PureComponent.context"),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L16"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:16")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"props"},"props"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Readonly")," ",(0,r.kt)("strong",{parentName:"p"},"props"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"P"),">"),(0,r.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.props"),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:533"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"refs"},"refs"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"refs"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs"},"https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs")),(0,r.kt)("h4",{id:"index-signature"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"ReactInstance")),(0,r.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.refs"),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:539"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"state"},"state"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"state"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">"),(0,r.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.state"),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:534"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"contexttype"},"contextType"),(0,r.kt)("p",null,"\u25aa ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("strong",{parentName:"p"},"contextType"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Context"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_react_page_renderer.PageContextType"},(0,r.kt)("inlineCode",{parentName:"a"},"PageContextType")),">"," = ",(0,r.kt)("inlineCode",{parentName:"p"},"PageContext")),(0,r.kt)("h4",{id:"overrides-1"},"Overrides"),(0,r.kt)("p",null,"PureComponent.contextType"),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L15"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:15")),(0,r.kt)("h2",{id:"accessors"},"Accessors"),(0,r.kt)("h3",{id:"utils"},"utils"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"get")," ",(0,r.kt)("strong",{parentName:"p"},"utils"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,r.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,r.kt)("p",null,"Returns the utilities for the view components. The returned value is the\nvalue bound to the ",(0,r.kt)("inlineCode",{parentName:"p"},"$Utils")," object container constant."),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,r.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,r.kt)("p",null,"The utilities for the view components."),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L26"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:26")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"unsafe_componentwillmount"},"UNSAFE","_","componentWillMount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"UNSAFE_componentWillMount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before mounting occurs, and before ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#render"),".\nAvoid introducing any side-effects or subscriptions in this method."),(0,r.kt)("p",null,"This method will not stop working in React 17."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use componentDidMount or the constructor instead"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.UNSAFE","_","componentWillMount"),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:730"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unsafe_componentwillreceiveprops"},"UNSAFE","_","componentWillReceiveProps"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"UNSAFE_componentWillReceiveProps"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called when the component may be receiving new props.\nReact may call this even if props have not changed, so be sure to compare new and existing\nprops if you only want to handle changes."),(0,r.kt)("p",null,"Calling ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," generally does not trigger this method."),(0,r.kt)("p",null,"This method will not stop working in React 17."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use static getDerivedStateFromProps instead"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.UNSAFE","_","componentWillReceiveProps"),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:762"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unsafe_componentwillupdate"},"UNSAFE","_","componentWillUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"UNSAFE_componentWillUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before rendering when new props or state is received. Not called for the initial render."),(0,r.kt)("p",null,"Note: You cannot call ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," here."),(0,r.kt)("p",null,"This method will not stop working in React 17."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use getSnapshotBeforeUpdate instead"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-7"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.UNSAFE","_","componentWillUpdate"),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:790"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentdidcatch"},"componentDidCatch"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentDidCatch"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"error"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"errorInfo"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Catches exceptions generated in descendant components. Unhandled exceptions will cause\nthe entire component tree to unmount."),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"error")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Error"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"errorInfo")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ErrorInfo"))))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-8"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.componentDidCatch"),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:659"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentdidmount"},"componentDidMount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentDidMount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately after a component is mounted. Setting state here will trigger re-rendering."),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-9"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.componentDidMount"),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:638"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentdidupdate"},"componentDidUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentDidUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prevProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"prevState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"snapshot?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately after updating occurs. Not called for the initial render."),(0,r.kt)("p",null,"The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null."),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"snapshot?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS"))))),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-10"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.componentDidUpdate"),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:701"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillmount"},"componentWillMount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillMount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before mounting occurs, and before ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#render"),".\nAvoid introducing any side-effects or subscriptions in this method."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use componentDidMount or the constructor instead; will stop working in React 17"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-11"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.componentWillMount"),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:716"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillreceiveprops"},"componentWillReceiveProps"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillReceiveProps"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called when the component may be receiving new props.\nReact may call this even if props have not changed, so be sure to compare new and existing\nprops if you only want to handle changes."),(0,r.kt)("p",null,"Calling ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," generally does not trigger this method."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use static getDerivedStateFromProps instead; will stop working in React 17"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-12"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.componentWillReceiveProps"),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:745"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillunmount"},"componentWillUnmount"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillUnmount"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as\ncancelled network requests, or cleaning up any DOM elements created in ",(0,r.kt)("inlineCode",{parentName:"p"},"componentDidMount"),"."),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-13"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.componentWillUnmount"),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:654"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"componentwillupdate"},"componentWillUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"componentWillUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called immediately before rendering when new props or state is received. Not called for the initial render."),(0,r.kt)("p",null,"Note: You cannot call ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#setState")," here."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\nprevents this from being invoked."),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Deprecated"))),(0,r.kt)("p",null,"16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"See"))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"},"https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path"))),(0,r.kt)("h4",{id:"inherited-from-14"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.componentWillUpdate"),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:775"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cssclasses"},"cssClasses"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"cssClasses"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"classRules"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"includeComponentClassName?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Generate a string of CSS classes from the properties of the passed-in\nobject that resolve to true."),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Default value"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"classRules")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," { ",(0,r.kt)("inlineCode",{parentName:"td"},"[key: string]"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean"),"; }"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"undefined")),(0,r.kt)("td",{parentName:"tr",align:"left"},"CSS classes in a string separated by whitespace, or a map of CSS class names to boolean values. The CSS class name will be included in the result only if the value is ",(0,r.kt)("inlineCode",{parentName:"td"},"true"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"includeComponentClassName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"false")),(0,r.kt)("td",{parentName:"tr",align:"left"},"-")))),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"String of CSS classes that had their property resolved\nto ",(0,r.kt)("inlineCode",{parentName:"p"},"true"),"."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Example"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"this.cssClasses('my-class my-class-modifier', true);\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Example"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"this.cssClasses({\n 'my-class': true,\n 'my-class-modifier': this.props.modifier\n }, true);\n")),(0,r.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L86"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:86")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"fire"},"fire"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"fire"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"eventTarget"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"eventName"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"data?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Creates and sends a new IMA.js DOM custom event from this component."),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventTarget")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"EventTarget")),(0,r.kt)("td",{parentName:"tr",align:"left"},"EventTarget compatible node.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the event.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Data to send within the event.")))),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L100"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:100")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"forceupdate"},"forceUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"forceUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"callback?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-10"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"callback?")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))))),(0,r.kt)("h4",{id:"returns-13"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-15"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.forceUpdate"),(0,r.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:530"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getsnapshotbeforeupdate"},"getSnapshotBeforeUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"getSnapshotBeforeUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prevProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"prevState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"SS")),(0,r.kt)("p",null,"Runs before React applies the result of ",(0,r.kt)("inlineCode",{parentName:"p"},"render")," to the document, and\nreturns an object to be given to componentDidUpdate. Useful for saving\nthings such as scroll position before ",(0,r.kt)("inlineCode",{parentName:"p"},"render")," causes changes to it."),(0,r.kt)("p",null,"Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated\nlifecycle events from running."),(0,r.kt)("h4",{id:"parameters-11"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")))),(0,r.kt)("h4",{id:"returns-14"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"SS")),(0,r.kt)("h4",{id:"inherited-from-16"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.getSnapshotBeforeUpdate"),(0,r.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:695"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"link"},"link"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"link"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"params?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Generates an absolute URL using the provided route name (see the"),(0,r.kt)("code",null,"app/config/routes.js")," file). The provided parameters will replace the placeholders in the route pattern, while the extraneous parameters will be appended to the generated URL's query string.",(0,r.kt)("h4",{id:"parameters-12"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The route name.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Object")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Router parameters and extraneous parameters to add to the URL as a query string.")))),(0,r.kt)("h4",{id:"returns-15"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"The generated URL."),(0,r.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L62"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:62")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"listen"},"listen"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"listen"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"eventTarget"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"eventName"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Registers the provided event listener for execution whenever an IMA.js\nDOM custom event of the specified name occurs at the specified event\ntarget."),(0,r.kt)("h4",{id:"parameters-13"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventTarget")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"EventTarget")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The react component or event target at which the listener should listen for the event.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the event for which to listen.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"event"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Event"),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The listener for event to register.")))),(0,r.kt)("h4",{id:"returns-16"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L114"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:114")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"localize"},"localize"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"localize"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"key"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"params?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Returns the localized phrase identified by the specified key. The\nplaceholders in the localization phrase will be replaced by the provided\nvalues."),(0,r.kt)("h4",{id:"parameters-14"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"key")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"never")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Localization key.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Object")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Values for replacing the placeholders in the localization phrase.")))),(0,r.kt)("h4",{id:"returns-17"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Localized phrase."),(0,r.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L44"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:44")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"render"},"render"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"render"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"ReactNode")),(0,r.kt)("h4",{id:"returns-18"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"ReactNode")),(0,r.kt)("h4",{id:"inherited-from-17"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.render"),(0,r.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:531"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setstate"},"setState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setState"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"K"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"state"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"callback?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-parameters-3"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"K")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"symbol"))))),(0,r.kt)("h4",{id:"parameters-15"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"S")," ","|"," (",(0,r.kt)("inlineCode",{parentName:"td"},"prevState"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">",", ",(0,r.kt)("inlineCode",{parentName:"td"},"props"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">",") => ",(0,r.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"K"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"K"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"callback?")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))))),(0,r.kt)("h4",{id:"returns-19"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-18"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.setState"),(0,r.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:525"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"shouldcomponentupdate"},"shouldComponentUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"shouldComponentUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"nextProps"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextContext"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Called to determine whether the change in props and state should trigger a re-render."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Component")," always returns true.\n",(0,r.kt)("inlineCode",{parentName:"p"},"PureComponent")," implements a shallow comparison on props and state and returns true if any\nprops or states have changed."),(0,r.kt)("p",null,"If false is returned, ",(0,r.kt)("inlineCode",{parentName:"p"},"Component#render"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"componentWillUpdate"),"\nand ",(0,r.kt)("inlineCode",{parentName:"p"},"componentDidUpdate")," will not be called."),(0,r.kt)("h4",{id:"parameters-16"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextProps")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"P"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Readonly"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nextContext")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-20"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"inherited-from-19"},"Inherited from"),(0,r.kt)("p",null,"PureComponent.shouldComponentUpdate"),(0,r.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,r.kt)("p",null,"node_modules/@types/react/index.d.ts:649"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unlisten"},"unlisten"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"unlisten"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"eventTarget"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"eventName"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Deregisters the provided event listener for an IMA.js DOM custom event\nof the specified name at the specified event target."),(0,r.kt)("h4",{id:"parameters-17"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventTarget")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"EventTarget")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The react component or event target at which the listener should listen for the event.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the event for which to listen.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"event"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Event"),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The listener for event to register.")))),(0,r.kt)("h4",{id:"returns-21"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-29"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/component/AbstractPureComponent.ts#L131"},"packages/react-page-renderer/src/component/AbstractPureComponent.ts:131")))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/153c616c.1d743e4a.js b/assets/js/153c616c.133e907a.js similarity index 98% rename from assets/js/153c616c.1d743e4a.js rename to assets/js/153c616c.133e907a.js index 79290ea417..e5e0ecc3b1 100644 --- a/assets/js/153c616c.1d743e4a.js +++ b/assets/js/153c616c.133e907a.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[9277],{3905:(e,t,n)=>{n.d(t,{Zo:()=>$,kt:()=>k});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),l=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},$=function(e){var t=l(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,$=p(e,["components","mdxType","originalType","parentName"]),d=l(n),m=r,k=d["".concat(s,".").concat(m)]||d[m]||g[m]||i;return n?a.createElement(k,o(o({ref:t},$),{},{components:n})):a.createElement(k,o({ref:t},$))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[d]="string"==typeof e?e:r,o[1]=p;for(var l=2;l{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>g,frontMatter:()=>i,metadata:()=>p,toc:()=>l});var a=n(5773),r=(n(7294),n(3905));const i={id:"ima_core.RouteFactoryOptions",title:"Interface: RouteFactoryOptions",sidebar_label:"@ima/core.RouteFactoryOptions",custom_edit_url:null},o=void 0,p={unversionedId:"api/interfaces/ima_core.RouteFactoryOptions",id:"api/interfaces/ima_core.RouteFactoryOptions",title:"Interface: RouteFactoryOptions",description:"@ima/core.RouteFactoryOptions",source:"@site/../docs/api/interfaces/ima_core.RouteFactoryOptions.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.RouteFactoryOptions",permalink:"/api/interfaces/ima_core.RouteFactoryOptions",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.RouteFactoryOptions",title:"Interface: RouteFactoryOptions",sidebar_label:"@ima/core.RouteFactoryOptions",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.RouteAction",permalink:"/api/interfaces/ima_core.RouteAction"},next:{title:"@ima/core.RouteLocals",permalink:"/api/interfaces/ima_core.RouteLocals"}},s={},l=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:"autoScroll",id:"autoscroll",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"documentView",id:"documentview",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"extensions",id:"extensions",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"managedRootView",id:"managedrootview",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"middlewares",id:"middlewares",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"onlyUpdate",id:"onlyupdate",level:3},{value:"Defined in",id:"defined-in-5",level:4},{value:"viewAdapter",id:"viewadapter",level:3},{value:"Defined in",id:"defined-in-6",level:4}],$={toc:l},d="wrapper";function g(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},$,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".RouteFactoryOptions"),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"RouteFactoryOptions"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions"))))),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"autoscroll"},"autoScroll"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"autoScroll"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L36"},"packages/core/src/router/Router.ts:36")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"documentview"},"documentView"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"documentView"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L37"},"packages/core/src/router/Router.ts:37")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"extensions"},"extensions"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"extensions"),": (",(0,r.kt)("inlineCode",{parentName:"p"},'"$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageRenderer"')," ","|"," ","`","$Helper.${string}","`"," ","|"," ","`","$oc.${string}","`"," ","|"," ","`","$Settings.${string}","`"," ","|"," ","`","$Env.${string}","`"," ","|"," ","`","$Protocol.${string}","`"," ","|"," ","`","$Secure.${string}","`"," ","|"," ","`","$Request.${string}","`"," ","|"," ","`","$Response.${string}","`"," ","|"," ","`","$Window.${string}","`"," ","|"," ","`","$Error.${string}","`"," ","|"," ","`","$Dictionary.${string}","`"," ","|"," ","`","$CookieTransformFunction.${string}","`"," ","|"," ","`","$CookieStorage.${string}","`"," ","|"," ","`","$SessionStorage.${string}","`"," ","|"," ","`","$MapStorage.${string}","`"," ","|"," ","`","$WeakMapStorage.${string}","`"," ","|"," ","`","$SessionMapStorage.${string}","`"," ","|"," ","`","$Dispatcher.${string}","`"," ","|"," ","`","$EventBus.${string}","`"," ","|"," ","`","$Observable.${string}","`"," ","|"," ","`","$CacheStorage.${string}","`"," ","|"," ","`","$CacheFactory.${string}","`"," ","|"," ","`","$Cache.${string}","`"," ","|"," ","`","$MetaManager.${string}","`"," ","|"," ","`","$ControllerDecorator.${string}","`"," ","|"," ","`","$PageStateManagerDecorator.${string}","`"," ","|"," ","`","$PageStateManager.${string}","`"," ","|"," ","`","$PageFactory.${string}","`"," ","|"," ","`","$ComponentUtils.${string}","`"," ","|"," ","`","$Utils.${string}","`"," ","|"," ","`","$PageHandlerRegistry.${string}","`"," ","|"," ","`","$PageManager.${string}","`"," ","|"," ","`","$RouteFactory.${string}","`"," ","|"," ","`","$Router.${string}","`"," ","|"," ","`","$RouteNames.${string}","`"," ","|"," ","`","$RouterEvents.${string}","`"," ","|"," ","`","$HttpUrlTransformer.${string}","`"," ","|"," ","`","$HttpAgentProxy.${string}","`"," ","|"," ","`","$Http.${string}","`"," ","|"," ","`","$HttpStatusCode.${string}","`"," ","|"," ","`","$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageRenderer"')," ","|"," ","`","?$Helper.${string}","`"," ","|"," ","`","?$oc.${string}","`"," ","|"," ","`","?$Settings.${string}","`"," ","|"," ","`","?$Env.${string}","`"," ","|"," ","`","?$Protocol.${string}","`"," ","|"," ","`","?$Secure.${string}","`"," ","|"," ","`","?$Request.${string}","`"," ","|"," ","`","?$Response.${string}","`"," ","|"," ","`","?$Window.${string}","`"," ","|"," ","`","?$Error.${string}","`"," ","|"," ","`","?$Dictionary.${string}","`"," ","|"," ","`","?$CookieTransformFunction.${string}","`"," ","|"," ","`","?$CookieStorage.${string}","`"," ","|"," ","`","?$SessionStorage.${string}","`"," ","|"," ","`","?$MapStorage.${string}","`"," ","|"," ","`","?$WeakMapStorage.${string}","`"," ","|"," ","`","?$SessionMapStorage.${string}","`"," ","|"," ","`","?$Dispatcher.${string}","`"," ","|"," ","`","?$EventBus.${string}","`"," ","|"," ","`","?$Observable.${string}","`"," ","|"," ","`","?$CacheStorage.${string}","`"," ","|"," ","`","?$CacheFactory.${string}","`"," ","|"," ","`","?$Cache.${string}","`"," ","|"," ","`","?$MetaManager.${string}","`"," ","|"," ","`","?$ControllerDecorator.${string}","`"," ","|"," ","`","?$PageStateManagerDecorator.${string}","`"," ","|"," ","`","?$PageStateManager.${string}","`"," ","|"," ","`","?$PageFactory.${string}","`"," ","|"," ","`","?$ComponentUtils.${string}","`"," ","|"," ","`","?$Utils.${string}","`"," ","|"," ","`","?$PageHandlerRegistry.${string}","`"," ","|"," ","`","?$PageManager.${string}","`"," ","|"," ","`","?$RouteFactory.${string}","`"," ","|"," ","`","?$Router.${string}","`"," ","|"," ","`","?$RouteNames.${string}","`"," ","|"," ","`","?$RouterEvents.${string}","`"," ","|"," ","`","?$HttpUrlTransformer.${string}","`"," ","|"," ","`","?$HttpAgentProxy.${string}","`"," ","|"," ","`","?$Http.${string}","`"," ","|"," ","`","?$HttpStatusCode.${string}","`"," ","|"," ","`","?$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageRenderer"')," ","|"," ","`","...?$Helper.${string}","`"," ","|"," ","`","...?$oc.${string}","`"," ","|"," ","`","...?$Settings.${string}","`"," ","|"," ","`","...?$Env.${string}","`"," ","|"," ","`","...?$Protocol.${string}","`"," ","|"," ","`","...?$Secure.${string}","`"," ","|"," ","`","...?$Request.${string}","`"," ","|"," ","`","...?$Response.${string}","`"," ","|"," ","`","...?$Window.${string}","`"," ","|"," ","`","...?$Error.${string}","`"," ","|"," ","`","...?$Dictionary.${string}","`"," ","|"," ","`","...?$CookieTransformFunction.${string}","`"," ","|"," ","`","...?$CookieStorage.${string}","`"," ","|"," ","`","...?$SessionStorage.${string}","`"," ","|"," ","`","...?$MapStorage.${string}","`"," ","|"," ","`","...?$WeakMapStorage.${string}","`"," ","|"," ","`","...?$SessionMapStorage.${string}","`"," ","|"," ","`","...?$Dispatcher.${string}","`"," ","|"," ","`","...?$EventBus.${string}","`"," ","|"," ","`","...?$Observable.${string}","`"," ","|"," ","`","...?$CacheStorage.${string}","`"," ","|"," ","`","...?$CacheFactory.${string}","`"," ","|"," ","`","...?$Cache.${string}","`"," ","|"," ","`","...?$MetaManager.${string}","`"," ","|"," ","`","...?$ControllerDecorator.${string}","`"," ","|"," ","`","...?$PageStateManagerDecorator.${string}","`"," ","|"," ","`","...?$PageStateManager.${string}","`"," ","|"," ","`","...?$PageFactory.${string}","`"," ","|"," ","`","...?$ComponentUtils.${string}","`"," ","|"," ","`","...?$Utils.${string}","`"," ","|"," ","`","...?$PageHandlerRegistry.${string}","`"," ","|"," ","`","...?$PageManager.${string}","`"," ","|"," ","`","...?$RouteFactory.${string}","`"," ","|"," ","`","...?$Router.${string}","`"," ","|"," ","`","...?$RouteNames.${string}","`"," ","|"," ","`","...?$RouterEvents.${string}","`"," ","|"," ","`","...?$HttpUrlTransformer.${string}","`"," ","|"," ","`","...?$HttpAgentProxy.${string}","`"," ","|"," ","`","...?$Http.${string}","`"," ","|"," ","`","...?$HttpStatusCode.${string}","`"," ","|"," ","`","...?$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageRenderer"')," ","|"," ","`","...$Helper.${string}","`"," ","|"," ","`","...$oc.${string}","`"," ","|"," ","`","...$Settings.${string}","`"," ","|"," ","`","...$Env.${string}","`"," ","|"," ","`","...$Protocol.${string}","`"," ","|"," ","`","...$Secure.${string}","`"," ","|"," ","`","...$Request.${string}","`"," ","|"," ","`","...$Response.${string}","`"," ","|"," ","`","...$Window.${string}","`"," ","|"," ","`","...$Error.${string}","`"," ","|"," ","`","...$Dictionary.${string}","`"," ","|"," ","`","...$CookieTransformFunction.${string}","`"," ","|"," ","`","...$CookieStorage.${string}","`"," ","|"," ","`","...$SessionStorage.${string}","`"," ","|"," ","`","...$MapStorage.${string}","`"," ","|"," ","`","...$WeakMapStorage.${string}","`"," ","|"," ","`","...$SessionMapStorage.${string}","`"," ","|"," ","`","...$Dispatcher.${string}","`"," ","|"," ","`","...$EventBus.${string}","`"," ","|"," ","`","...$Observable.${string}","`"," ","|"," ","`","...$CacheStorage.${string}","`"," ","|"," ","`","...$CacheFactory.${string}","`"," ","|"," ","`","...$Cache.${string}","`"," ","|"," ","`","...$MetaManager.${string}","`"," ","|"," ","`","...$ControllerDecorator.${string}","`"," ","|"," ","`","...$PageStateManagerDecorator.${string}","`"," ","|"," ","`","...$PageStateManager.${string}","`"," ","|"," ","`","...$PageFactory.${string}","`"," ","|"," ","`","...$ComponentUtils.${string}","`"," ","|"," ","`","...$Utils.${string}","`"," ","|"," ","`","...$PageHandlerRegistry.${string}","`"," ","|"," ","`","...$PageManager.${string}","`"," ","|"," ","`","...$RouteFactory.${string}","`"," ","|"," ","`","...$Router.${string}","`"," ","|"," ","`","...$RouteNames.${string}","`"," ","|"," ","`","...$RouterEvents.${string}","`"," ","|"," ","`","...$HttpUrlTransformer.${string}","`"," ","|"," ","`","...$HttpAgentProxy.${string}","`"," ","|"," ","`","...$Http.${string}","`"," ","|"," ","`","...$HttpStatusCode.${string}","`"," ","|"," ","`","...$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"," ","|"," [",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">",", { ",(0,r.kt)("inlineCode",{parentName:"p"},"optional"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," }])[]"),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L44"},"packages/core/src/router/Router.ts:44")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"managedrootview"},"managedRootView"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"managedRootView"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L38"},"packages/core/src/router/Router.ts:38")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"middlewares"},"middlewares"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"middlewares"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,r.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),"[]"),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L43"},"packages/core/src/router/Router.ts:43")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"onlyupdate"},"onlyUpdate"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"onlyUpdate"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," (",(0,r.kt)("inlineCode",{parentName:"p"},"controller"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"view"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L39"},"packages/core/src/router/Router.ts:39")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"viewadapter"},"viewAdapter"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"viewAdapter"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L42"},"packages/core/src/router/Router.ts:42")))}g.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[9277],{3905:(e,t,n)=>{n.d(t,{Zo:()=>$,kt:()=>k});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),l=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},$=function(e){var t=l(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,$=p(e,["components","mdxType","originalType","parentName"]),d=l(n),m=r,k=d["".concat(s,".").concat(m)]||d[m]||g[m]||i;return n?a.createElement(k,o(o({ref:t},$),{},{components:n})):a.createElement(k,o({ref:t},$))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[d]="string"==typeof e?e:r,o[1]=p;for(var l=2;l{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>g,frontMatter:()=>i,metadata:()=>p,toc:()=>l});var a=n(5773),r=(n(7294),n(3905));const i={id:"ima_core.RouteFactoryOptions",title:"Interface: RouteFactoryOptions",sidebar_label:"@ima/core.RouteFactoryOptions",custom_edit_url:null},o=void 0,p={unversionedId:"api/interfaces/ima_core.RouteFactoryOptions",id:"api/interfaces/ima_core.RouteFactoryOptions",title:"Interface: RouteFactoryOptions",description:"@ima/core.RouteFactoryOptions",source:"@site/../docs/api/interfaces/ima_core.RouteFactoryOptions.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.RouteFactoryOptions",permalink:"/api/interfaces/ima_core.RouteFactoryOptions",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.RouteFactoryOptions",title:"Interface: RouteFactoryOptions",sidebar_label:"@ima/core.RouteFactoryOptions",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.RouteAction",permalink:"/api/interfaces/ima_core.RouteAction"},next:{title:"@ima/core.RouteLocals",permalink:"/api/interfaces/ima_core.RouteLocals"}},s={},l=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:"autoScroll",id:"autoscroll",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"documentView",id:"documentview",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"extensions",id:"extensions",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"managedRootView",id:"managedrootview",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"middlewares",id:"middlewares",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"onlyUpdate",id:"onlyupdate",level:3},{value:"Defined in",id:"defined-in-5",level:4},{value:"viewAdapter",id:"viewadapter",level:3},{value:"Defined in",id:"defined-in-6",level:4}],$={toc:l},d="wrapper";function g(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},$,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".RouteFactoryOptions"),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"RouteFactoryOptions"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions"))))),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"autoscroll"},"autoScroll"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"autoScroll"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L36"},"packages/core/src/router/Router.ts:36")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"documentview"},"documentView"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"documentView"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L37"},"packages/core/src/router/Router.ts:37")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"extensions"},"extensions"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"extensions"),": (",(0,r.kt)("inlineCode",{parentName:"p"},'"$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$PageRenderer"')," ","|"," ","`","$Helper.${string}","`"," ","|"," ","`","$oc.${string}","`"," ","|"," ","`","$Settings.${string}","`"," ","|"," ","`","$Env.${string}","`"," ","|"," ","`","$Protocol.${string}","`"," ","|"," ","`","$Secure.${string}","`"," ","|"," ","`","$Request.${string}","`"," ","|"," ","`","$Response.${string}","`"," ","|"," ","`","$Window.${string}","`"," ","|"," ","`","$Error.${string}","`"," ","|"," ","`","$Dictionary.${string}","`"," ","|"," ","`","$CookieTransformFunction.${string}","`"," ","|"," ","`","$CookieStorage.${string}","`"," ","|"," ","`","$SessionStorage.${string}","`"," ","|"," ","`","$MapStorage.${string}","`"," ","|"," ","`","$WeakMapStorage.${string}","`"," ","|"," ","`","$SessionMapStorage.${string}","`"," ","|"," ","`","$Dispatcher.${string}","`"," ","|"," ","`","$EventBus.${string}","`"," ","|"," ","`","$Observable.${string}","`"," ","|"," ","`","$CacheStorage.${string}","`"," ","|"," ","`","$CacheFactory.${string}","`"," ","|"," ","`","$Cache.${string}","`"," ","|"," ","`","$MetaManager.${string}","`"," ","|"," ","`","$ControllerDecorator.${string}","`"," ","|"," ","`","$PageStateManagerDecorator.${string}","`"," ","|"," ","`","$PageStateManager.${string}","`"," ","|"," ","`","$PageFactory.${string}","`"," ","|"," ","`","$ComponentUtils.${string}","`"," ","|"," ","`","$Utils.${string}","`"," ","|"," ","`","$PageHandlerRegistry.${string}","`"," ","|"," ","`","$PageManager.${string}","`"," ","|"," ","`","$RouteFactory.${string}","`"," ","|"," ","`","$Router.${string}","`"," ","|"," ","`","$RouteNames.${string}","`"," ","|"," ","`","$RouterEvents.${string}","`"," ","|"," ","`","$HttpUrlTransformer.${string}","`"," ","|"," ","`","$HttpAgentProxy.${string}","`"," ","|"," ","`","$Http.${string}","`"," ","|"," ","`","$HttpStatusCode.${string}","`"," ","|"," ","`","$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"?$PageRenderer"')," ","|"," ","`","?$Helper.${string}","`"," ","|"," ","`","?$oc.${string}","`"," ","|"," ","`","?$Settings.${string}","`"," ","|"," ","`","?$Env.${string}","`"," ","|"," ","`","?$Protocol.${string}","`"," ","|"," ","`","?$Secure.${string}","`"," ","|"," ","`","?$Request.${string}","`"," ","|"," ","`","?$Response.${string}","`"," ","|"," ","`","?$Window.${string}","`"," ","|"," ","`","?$Error.${string}","`"," ","|"," ","`","?$Dictionary.${string}","`"," ","|"," ","`","?$CookieTransformFunction.${string}","`"," ","|"," ","`","?$CookieStorage.${string}","`"," ","|"," ","`","?$SessionStorage.${string}","`"," ","|"," ","`","?$MapStorage.${string}","`"," ","|"," ","`","?$WeakMapStorage.${string}","`"," ","|"," ","`","?$SessionMapStorage.${string}","`"," ","|"," ","`","?$Dispatcher.${string}","`"," ","|"," ","`","?$EventBus.${string}","`"," ","|"," ","`","?$Observable.${string}","`"," ","|"," ","`","?$CacheStorage.${string}","`"," ","|"," ","`","?$CacheFactory.${string}","`"," ","|"," ","`","?$Cache.${string}","`"," ","|"," ","`","?$MetaManager.${string}","`"," ","|"," ","`","?$ControllerDecorator.${string}","`"," ","|"," ","`","?$PageStateManagerDecorator.${string}","`"," ","|"," ","`","?$PageStateManager.${string}","`"," ","|"," ","`","?$PageFactory.${string}","`"," ","|"," ","`","?$ComponentUtils.${string}","`"," ","|"," ","`","?$Utils.${string}","`"," ","|"," ","`","?$PageHandlerRegistry.${string}","`"," ","|"," ","`","?$PageManager.${string}","`"," ","|"," ","`","?$RouteFactory.${string}","`"," ","|"," ","`","?$Router.${string}","`"," ","|"," ","`","?$RouteNames.${string}","`"," ","|"," ","`","?$RouterEvents.${string}","`"," ","|"," ","`","?$HttpUrlTransformer.${string}","`"," ","|"," ","`","?$HttpAgentProxy.${string}","`"," ","|"," ","`","?$Http.${string}","`"," ","|"," ","`","?$HttpStatusCode.${string}","`"," ","|"," ","`","?$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...?$PageRenderer"')," ","|"," ","`","...?$Helper.${string}","`"," ","|"," ","`","...?$oc.${string}","`"," ","|"," ","`","...?$Settings.${string}","`"," ","|"," ","`","...?$Env.${string}","`"," ","|"," ","`","...?$Protocol.${string}","`"," ","|"," ","`","...?$Secure.${string}","`"," ","|"," ","`","...?$Request.${string}","`"," ","|"," ","`","...?$Response.${string}","`"," ","|"," ","`","...?$Window.${string}","`"," ","|"," ","`","...?$Error.${string}","`"," ","|"," ","`","...?$Dictionary.${string}","`"," ","|"," ","`","...?$CookieTransformFunction.${string}","`"," ","|"," ","`","...?$CookieStorage.${string}","`"," ","|"," ","`","...?$SessionStorage.${string}","`"," ","|"," ","`","...?$MapStorage.${string}","`"," ","|"," ","`","...?$WeakMapStorage.${string}","`"," ","|"," ","`","...?$SessionMapStorage.${string}","`"," ","|"," ","`","...?$Dispatcher.${string}","`"," ","|"," ","`","...?$EventBus.${string}","`"," ","|"," ","`","...?$Observable.${string}","`"," ","|"," ","`","...?$CacheStorage.${string}","`"," ","|"," ","`","...?$CacheFactory.${string}","`"," ","|"," ","`","...?$Cache.${string}","`"," ","|"," ","`","...?$MetaManager.${string}","`"," ","|"," ","`","...?$ControllerDecorator.${string}","`"," ","|"," ","`","...?$PageStateManagerDecorator.${string}","`"," ","|"," ","`","...?$PageStateManager.${string}","`"," ","|"," ","`","...?$PageFactory.${string}","`"," ","|"," ","`","...?$ComponentUtils.${string}","`"," ","|"," ","`","...?$Utils.${string}","`"," ","|"," ","`","...?$PageHandlerRegistry.${string}","`"," ","|"," ","`","...?$PageManager.${string}","`"," ","|"," ","`","...?$RouteFactory.${string}","`"," ","|"," ","`","...?$Router.${string}","`"," ","|"," ","`","...?$RouteNames.${string}","`"," ","|"," ","`","...?$RouterEvents.${string}","`"," ","|"," ","`","...?$HttpUrlTransformer.${string}","`"," ","|"," ","`","...?$HttpAgentProxy.${string}","`"," ","|"," ","`","...?$Http.${string}","`"," ","|"," ","`","...?$HttpStatusCode.${string}","`"," ","|"," ","`","...?$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Helper"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$oc"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Settings"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Secure"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Request"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Response"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Window"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Error"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Dictionary"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CookieTransformFunction"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CookieStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$SessionStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$MapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$WeakMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$SessionMapStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Dispatcher"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$EventBus"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Observable"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CacheStorage"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$CacheFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Cache"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$MetaManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$ControllerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageStateManagerDecorator"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageStateManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$ComponentUtils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Utils"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageHandlerRegistry"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageManager"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$RouteFactory"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Router"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$RouteNames"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$RouterEvents"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$HttpUrlTransformer"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$HttpAgentProxy"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$Http"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$HttpStatusCode"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"...$PageRenderer"')," ","|"," ","`","...$Helper.${string}","`"," ","|"," ","`","...$oc.${string}","`"," ","|"," ","`","...$Settings.${string}","`"," ","|"," ","`","...$Env.${string}","`"," ","|"," ","`","...$Protocol.${string}","`"," ","|"," ","`","...$Secure.${string}","`"," ","|"," ","`","...$Request.${string}","`"," ","|"," ","`","...$Response.${string}","`"," ","|"," ","`","...$Window.${string}","`"," ","|"," ","`","...$Error.${string}","`"," ","|"," ","`","...$Dictionary.${string}","`"," ","|"," ","`","...$CookieTransformFunction.${string}","`"," ","|"," ","`","...$CookieStorage.${string}","`"," ","|"," ","`","...$SessionStorage.${string}","`"," ","|"," ","`","...$MapStorage.${string}","`"," ","|"," ","`","...$WeakMapStorage.${string}","`"," ","|"," ","`","...$SessionMapStorage.${string}","`"," ","|"," ","`","...$Dispatcher.${string}","`"," ","|"," ","`","...$EventBus.${string}","`"," ","|"," ","`","...$Observable.${string}","`"," ","|"," ","`","...$CacheStorage.${string}","`"," ","|"," ","`","...$CacheFactory.${string}","`"," ","|"," ","`","...$Cache.${string}","`"," ","|"," ","`","...$MetaManager.${string}","`"," ","|"," ","`","...$ControllerDecorator.${string}","`"," ","|"," ","`","...$PageStateManagerDecorator.${string}","`"," ","|"," ","`","...$PageStateManager.${string}","`"," ","|"," ","`","...$PageFactory.${string}","`"," ","|"," ","`","...$ComponentUtils.${string}","`"," ","|"," ","`","...$Utils.${string}","`"," ","|"," ","`","...$PageHandlerRegistry.${string}","`"," ","|"," ","`","...$PageManager.${string}","`"," ","|"," ","`","...$RouteFactory.${string}","`"," ","|"," ","`","...$Router.${string}","`"," ","|"," ","`","...$RouteNames.${string}","`"," ","|"," ","`","...$RouterEvents.${string}","`"," ","|"," ","`","...$HttpUrlTransformer.${string}","`"," ","|"," ","`","...$HttpAgentProxy.${string}","`"," ","|"," ","`","...$Http.${string}","`"," ","|"," ","`","...$HttpStatusCode.${string}","`"," ","|"," ","`","...$PageRenderer.${string}","`"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"," ","|"," [",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">",", { ",(0,r.kt)("inlineCode",{parentName:"p"},"optional"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," }])[]"),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L44"},"packages/core/src/router/Router.ts:44")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"managedrootview"},"managedRootView"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"managedRootView"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L38"},"packages/core/src/router/Router.ts:38")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"middlewares"},"middlewares"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"middlewares"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,r.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),"[]"),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L43"},"packages/core/src/router/Router.ts:43")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"onlyupdate"},"onlyUpdate"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"onlyUpdate"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," (",(0,r.kt)("inlineCode",{parentName:"p"},"controller"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"view"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L39"},"packages/core/src/router/Router.ts:39")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"viewadapter"},"viewAdapter"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"viewAdapter"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L42"},"packages/core/src/router/Router.ts:42")))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/162a65f7.6823923a.js b/assets/js/162a65f7.6823923a.js deleted file mode 100644 index 373a972693..0000000000 --- a/assets/js/162a65f7.6823923a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[9728],{1467:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/diagram-page-manager-e1a61acbae5ac5651fe727dd2c2a8c31.png"},3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),d=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=d(e.components);return a.createElement(s.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=d(n),m=r,h=c["".concat(s,".").concat(m)]||c[m]||g[m]||o;return n?a.createElement(h,i(i({ref:t},p),{},{components:n})):a.createElement(h,i({ref:t},p))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:r,i[1]=l;for(var d=2;d{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>g,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var a=n(5773),r=(n(7294),n(3905));const o={title:"Page Manager",description:"Basic features > Page Manager and app rendering"},i=void 0,l={unversionedId:"basic-features/page-manager",id:"basic-features/page-manager",title:"Page Manager",description:"Basic features > Page Manager and app rendering",source:"@site/../docs/basic-features/page-manager.md",sourceDirName:"basic-features",slug:"/basic-features/page-manager",permalink:"/basic-features/page-manager",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/basic-features/page-manager.md",tags:[],version:"current",lastUpdatedBy:"Filip Satek",lastUpdatedAt:1734590310,formattedLastUpdatedAt:"Dec 19, 2024",frontMatter:{title:"Page Manager",description:"Basic features > Page Manager and app rendering"},sidebar:"docs",previous:{title:"Handling scripts and styles",permalink:"/basic-features/handling-scripts-and-styles"},next:{title:"Events",permalink:"/basic-features/events"}},s={},d=[{value:"Managing process",id:"managing-process",level:2},{value:"Intervene into the process",id:"intervene-into-the-process",level:2},{value:"PageManagerHandlers",id:"pagemanagerhandlers",level:3},{value:"1. init() method",id:"1-init-method",level:4},{value:"2. handlePreManagedState() method",id:"2-handlepremanagedstate-method",level:4},{value:"3. handlePostManagedState() method",id:"3-handlepostmanagedstate-method",level:4},{value:"4. destroy() method",id:"4-destroy-method",level:4},{value:"Registering PageManagerHandlers",id:"registering-pagemanagerhandlers",level:2},{value:"PageNavigationHandler",id:"pagenavigationhandler",level:2}],p={toc:d},c="wrapper";function g(e){let{components:t,...o}=e;return(0,r.kt)(c,(0,a.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Page Manager is an essential part of IMA.js. It's something like a puppeteer that manipulates with pages and views. Once a router matches URL to one of route's path the page manager takes care of the rest."),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(1467).Z,width:"881",height:"421"})),(0,r.kt)("h2",{id:"managing-process"},"Managing process"),(0,r.kt)("p",null,"If the new matched route has ",(0,r.kt)("a",{parentName:"p",href:"./routing/introduction#onlyupdate"},(0,r.kt)("inlineCode",{parentName:"a"},"onlyUpdate")," option")," set to ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," and the controller and view hasn't changed the route transition is dispatched only through ",(0,r.kt)("a",{parentName:"p",href:"./controller-lifecycle#update-client"},(0,r.kt)("inlineCode",{parentName:"a"},"update")," method")," of the controller."),(0,r.kt)("p",null,"In every other case the manager goes through it's full process:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Unload previous controller and extensions")," - To make room for the new, manager has to get rid of the old controller and extensions. First calls ",(0,r.kt)("a",{parentName:"p",href:"./controller-lifecycle#deactivate-client"},(0,r.kt)("inlineCode",{parentName:"a"},"deactivate")," method")," on every extension registered in the old controller and then the same method on the controller itself.\nSame process follows with ",(0,r.kt)("a",{parentName:"p",href:"./controller-lifecycle#destroy-client"},(0,r.kt)("inlineCode",{parentName:"a"},"destroy")," method"),".")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Clear state and unmount view")," - After unloading controller and extensions the page state is cleared and view (starting from ",(0,r.kt)("a",{parentName:"p",href:"./rendering-process#managedrootview"},"ManagedRootView"),") is unmounted. However if the ",(0,r.kt)("a",{parentName:"p",href:"./rendering-process#documentview"},"DocumentView"),", ",(0,r.kt)("a",{parentName:"p",href:"./rendering-process#viewadapter"},"ViewAdapter")," and ",(0,r.kt)("a",{parentName:"p",href:"./rendering-process#managedrootview"},"ManagedRootView")," are the same for the new route the view is cleared rather then unmounted. This way you can achieve component persistency.")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Loading new controller and extensions")," - After the manager is done with clearing previous resource it initializes the new ones. First the ",(0,r.kt)("a",{parentName:"p",href:"./controller-lifecycle#init-serverclient"},(0,r.kt)("inlineCode",{parentName:"a"},"init")," method")," is called on controller then on every extension (Extensions may ",(0,r.kt)("a",{parentName:"p",href:"./extensions#how-to-use-extensions"},"be initialized")," during the controllers ",(0,r.kt)("inlineCode",{parentName:"p"},"init")," method call).\nWhen the initialization is complete manager starts loading resources via ",(0,r.kt)("inlineCode",{parentName:"p"},"load")," method of the controller and extensions. For detailed explanation see the ",(0,r.kt)("a",{parentName:"p",href:"./controller-lifecycle#load-serverclient"},(0,r.kt)("inlineCode",{parentName:"a"},"load")," method documentation"),".")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Rendering new view")," - After the ",(0,r.kt)("inlineCode",{parentName:"p"},"load")," method has been called a view for the controller is rendered. It doesn't matter if all promises returned by the ",(0,r.kt)("inlineCode",{parentName:"p"},"load")," method have been resolved. The process of handling promises is described in the ",(0,r.kt)("a",{parentName:"p",href:"./controller-lifecycle#load-serverclient"},(0,r.kt)("inlineCode",{parentName:"a"},"load")," method documentation"),". Following rendering process is described on a page ",(0,r.kt)("a",{parentName:"p",href:"./rendering-process"},"Rendering process")," and ",(0,r.kt)("a",{parentName:"p",href:"./views-and-components"},"View & Components"),"."))),(0,r.kt)("h2",{id:"intervene-into-the-process"},"Intervene into the process"),(0,r.kt)("p",null,"It's possible for you to intervene into the process before it starts and after it finished. One way is to listen to ",(0,r.kt)("a",{parentName:"p",href:"./events#built-in-events"},(0,r.kt)("inlineCode",{parentName:"a"},"BEFORE_HANDLE_ROUTE"))," and ",(0,r.kt)("a",{parentName:"p",href:"./events#built-in-events"},(0,r.kt)("inlineCode",{parentName:"a"},"AFTER_HANDLE_ROUTE"))," dispatcher events. However from inside event listeners you cannot intercept or modify the process. For this purpose we've introduced PageManagerHandlers in ",(0,r.kt)("a",{parentName:"p",href:"/migration/migration-0.16.0"},"v16")),(0,r.kt)("h3",{id:"pagemanagerhandlers"},"PageManagerHandlers"),(0,r.kt)("p",null,"PageManagerHandler is a simple class that extends ",(0,r.kt)("inlineCode",{parentName:"p"},"ima/page/handler/PageHandler"),". It can obtain dependencies through ",(0,r.kt)("a",{parentName:"p",href:"./object-container#1-dependency-injection"},"dependency injection"),". Each handler should contain 4 methods:"),(0,r.kt)("h4",{id:"1-init-method"},"1. ",(0,r.kt)("inlineCode",{parentName:"h4"},"init()")," method"),(0,r.kt)("p",null,"For purpose of initializing."),(0,r.kt)("h4",{id:"2-handlepremanagedstate-method"},"2. ",(0,r.kt)("inlineCode",{parentName:"h4"},"handlePreManagedState()")," method"),(0,r.kt)("p",null,"This method is called before the page manager start taking any action. It receives 3 arguments ",(0,r.kt)("inlineCode",{parentName:"p"},"managedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextManagedPage")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"action"),". ",(0,r.kt)("inlineCode",{parentName:"p"},"managedPage")," holds information about current page, ",(0,r.kt)("inlineCode",{parentName:"p"},"nextManagedPage"),' about following page. Each of the "managed page" arguments has following shape:'),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"{\n controller: ?(string|function(new: Controller)), // controller class\n controllerInstance: ?Controller, // instantiated controller\n decoratedController: ?Controller, // controller decorator created from controller instance\n view: ?React.Component, // view class/component\n viewInstance: ?React.Element, // instantiated view\n route: ?Route, // matched route that leads to the controller\n options: ?RouteOptions, // route options\n params: ?Object, // route parameters and their values\n state: {\n activated: boolean // if the page has been activated\n }\n}\n")),(0,r.kt)("p",null,"and finally the ",(0,r.kt)("inlineCode",{parentName:"p"},"action")," is an object describing what triggered the routing. If a ",(0,r.kt)("inlineCode",{parentName:"p"},"PopStateEvent")," triggered the routing the action object will look like this: ",(0,r.kt)("inlineCode",{parentName:"p"},"{ type: 'popstate', event: PopStateEvent }")," otherwise the ",(0,r.kt)("inlineCode",{parentName:"p"},"event")," property will contain ",(0,r.kt)("inlineCode",{parentName:"p"},"MouseEvent")," (e.g. clicked on a link) and ",(0,r.kt)("inlineCode",{parentName:"p"},"type")," property will have value ",(0,r.kt)("inlineCode",{parentName:"p"},"'redirect'"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"'click'")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"'error'"),"."),(0,r.kt)("h4",{id:"3-handlepostmanagedstate-method"},"3. ",(0,r.kt)("inlineCode",{parentName:"h4"},"handlePostManagedState()")," method"),(0,r.kt)("p",null,"This method is a counterpart to ",(0,r.kt)("inlineCode",{parentName:"p"},"handlePreManagedState()")," method. It's called after page transition is finished. It receives similar arguments (",(0,r.kt)("inlineCode",{parentName:"p"},"managedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"previousManagedPage")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"action"),"). ",(0,r.kt)("inlineCode",{parentName:"p"},"previousManagedPage")," holds information about previous page."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Note:")," ",(0,r.kt)("inlineCode",{parentName:"p"},"handlePreManagedState()")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"handlePostManagedState()")," methods can interrupt transition process by throwing an error. The thrown error should be instance of ",(0,r.kt)("a",{parentName:"p",href:"./error-handling"},(0,r.kt)("inlineCode",{parentName:"a"},"GenericError"))," with a status code specified. That way the router can handle thrown error accordingly.")),(0,r.kt)("h4",{id:"4-destroy-method"},"4. ",(0,r.kt)("inlineCode",{parentName:"h4"},"destroy()")," method"),(0,r.kt)("p",null,"For purpose of destructing"),(0,r.kt)("h2",{id:"registering-pagemanagerhandlers"},"Registering PageManagerHandlers"),(0,r.kt)("p",null,"PageManagerHandlers have their own registry ",(0,r.kt)("strong",{parentName:"p"},"PageHandlerRegistry"),". Every handler you create should be registered as a dependency of this registry."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/config/bind.js\nimport { PageHandlerRegistry, Window } from '@ima/core';\nimport MyOwnHandler from 'app/handler/MyOwnHandler';\n\nexport let init = (ns, oc, config) => {\n // ...\n\n if (oc.get(Window).isClient()) { // register different handlers for client and server\n oc.inject(PageHandlerRegistry, [MyOwnHandler]);\n } else {\n oc.inject(PageHandlerRegistry, []);\n }\n};\n")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Note:"),"\xa0Handlers are executed in series and each one waits for the previous one to complete its task.")),(0,r.kt)("h2",{id:"pagenavigationhandler"},"PageNavigationHandler"),(0,r.kt)("p",null,"With introduction of PageManagerHandlers in ",(0,r.kt)("a",{parentName:"p",href:"/migration/migration-0.16.0"},"v16")," we've moved some functionality to predefined handler ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/master/packages/core/src/page/handler/PageNavigationHandler.js"},(0,r.kt)("strong",{parentName:"a"},"PageNavigationHandler")),". This handler takes care of saving scroll position, restoring scroll position and settings browser's address bar URL. You're free to extend it, override it or whatever else you want."),(0,r.kt)("p",null,"PageNavigationHandler is registered by default, but when you register your own handlers you need to specify PageNavigationHandler as well."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"import { PageHandlerRegistry, PageNavigationHandler } from '@ima/core';\nimport MyOwnHandler from 'app/handler/MyOwnHandler';\n\nexport let init = (ns, oc, config) => {\n // ...\n oc.inject(PageHandlerRegistry, [PageNavigationHandler, MyOwnHandler]);\n};\n")))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/162a65f7.820b695f.js b/assets/js/162a65f7.820b695f.js new file mode 100644 index 0000000000..32bcef97c3 --- /dev/null +++ b/assets/js/162a65f7.820b695f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[9728],{1467:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/diagram-page-manager-e1a61acbae5ac5651fe727dd2c2a8c31.png"},3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),d=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=d(e.components);return a.createElement(s.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=d(n),m=r,h=c["".concat(s,".").concat(m)]||c[m]||g[m]||o;return n?a.createElement(h,i(i({ref:t},p),{},{components:n})):a.createElement(h,i({ref:t},p))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:r,i[1]=l;for(var d=2;d{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>g,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var a=n(5773),r=(n(7294),n(3905));const o={title:"Page Manager",description:"Basic features > Page Manager and app rendering"},i=void 0,l={unversionedId:"basic-features/page-manager",id:"basic-features/page-manager",title:"Page Manager",description:"Basic features > Page Manager and app rendering",source:"@site/../docs/basic-features/page-manager.md",sourceDirName:"basic-features",slug:"/basic-features/page-manager",permalink:"/basic-features/page-manager",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/basic-features/page-manager.md",tags:[],version:"current",lastUpdatedBy:"PS",lastUpdatedAt:1736522400,formattedLastUpdatedAt:"Jan 10, 2025",frontMatter:{title:"Page Manager",description:"Basic features > Page Manager and app rendering"},sidebar:"docs",previous:{title:"Handling scripts and styles",permalink:"/basic-features/handling-scripts-and-styles"},next:{title:"Events",permalink:"/basic-features/events"}},s={},d=[{value:"Managing process",id:"managing-process",level:2},{value:"Intervene into the process",id:"intervene-into-the-process",level:2},{value:"PageManagerHandlers",id:"pagemanagerhandlers",level:3},{value:"1. init() method",id:"1-init-method",level:4},{value:"2. handlePreManagedState() method",id:"2-handlepremanagedstate-method",level:4},{value:"3. handlePostManagedState() method",id:"3-handlepostmanagedstate-method",level:4},{value:"4. destroy() method",id:"4-destroy-method",level:4},{value:"Registering PageManagerHandlers",id:"registering-pagemanagerhandlers",level:2},{value:"PageNavigationHandler",id:"pagenavigationhandler",level:2}],p={toc:d},c="wrapper";function g(e){let{components:t,...o}=e;return(0,r.kt)(c,(0,a.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Page Manager is an essential part of IMA.js. It's something like a puppeteer that manipulates with pages and views. Once a router matches URL to one of route's path the page manager takes care of the rest."),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(1467).Z,width:"881",height:"421"})),(0,r.kt)("h2",{id:"managing-process"},"Managing process"),(0,r.kt)("p",null,"If the new matched route has ",(0,r.kt)("a",{parentName:"p",href:"./routing/introduction#onlyupdate"},(0,r.kt)("inlineCode",{parentName:"a"},"onlyUpdate")," option")," set to ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," and the controller and view hasn't changed the route transition is dispatched only through ",(0,r.kt)("a",{parentName:"p",href:"./controller-lifecycle#update-client"},(0,r.kt)("inlineCode",{parentName:"a"},"update")," method")," of the controller."),(0,r.kt)("p",null,"In every other case the manager goes through it's full process:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Unload previous controller and extensions")," - To make room for the new, manager has to get rid of the old controller and extensions. First calls ",(0,r.kt)("a",{parentName:"p",href:"./controller-lifecycle#deactivate-client"},(0,r.kt)("inlineCode",{parentName:"a"},"deactivate")," method")," on every extension registered in the old controller and then the same method on the controller itself.\nSame process follows with ",(0,r.kt)("a",{parentName:"p",href:"./controller-lifecycle#destroy-client"},(0,r.kt)("inlineCode",{parentName:"a"},"destroy")," method"),".")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Clear state and unmount view")," - After unloading controller and extensions the page state is cleared and view (starting from ",(0,r.kt)("a",{parentName:"p",href:"./rendering-process#managedrootview"},"ManagedRootView"),") is unmounted. However if the ",(0,r.kt)("a",{parentName:"p",href:"./rendering-process#documentview"},"DocumentView"),", ",(0,r.kt)("a",{parentName:"p",href:"./rendering-process#viewadapter"},"ViewAdapter")," and ",(0,r.kt)("a",{parentName:"p",href:"./rendering-process#managedrootview"},"ManagedRootView")," are the same for the new route the view is cleared rather then unmounted. This way you can achieve component persistency.")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Loading new controller and extensions")," - After the manager is done with clearing previous resource it initializes the new ones. First the ",(0,r.kt)("a",{parentName:"p",href:"./controller-lifecycle#init-serverclient"},(0,r.kt)("inlineCode",{parentName:"a"},"init")," method")," is called on controller then on every extension (Extensions may ",(0,r.kt)("a",{parentName:"p",href:"./extensions#how-to-use-extensions"},"be initialized")," during the controllers ",(0,r.kt)("inlineCode",{parentName:"p"},"init")," method call).\nWhen the initialization is complete manager starts loading resources via ",(0,r.kt)("inlineCode",{parentName:"p"},"load")," method of the controller and extensions. For detailed explanation see the ",(0,r.kt)("a",{parentName:"p",href:"./controller-lifecycle#load-serverclient"},(0,r.kt)("inlineCode",{parentName:"a"},"load")," method documentation"),".")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Rendering new view")," - After the ",(0,r.kt)("inlineCode",{parentName:"p"},"load")," method has been called a view for the controller is rendered. It doesn't matter if all promises returned by the ",(0,r.kt)("inlineCode",{parentName:"p"},"load")," method have been resolved. The process of handling promises is described in the ",(0,r.kt)("a",{parentName:"p",href:"./controller-lifecycle#load-serverclient"},(0,r.kt)("inlineCode",{parentName:"a"},"load")," method documentation"),". Following rendering process is described on a page ",(0,r.kt)("a",{parentName:"p",href:"./rendering-process"},"Rendering process")," and ",(0,r.kt)("a",{parentName:"p",href:"./views-and-components"},"View & Components"),"."))),(0,r.kt)("h2",{id:"intervene-into-the-process"},"Intervene into the process"),(0,r.kt)("p",null,"It's possible for you to intervene into the process before it starts and after it finished. One way is to listen to ",(0,r.kt)("a",{parentName:"p",href:"./events#built-in-events"},(0,r.kt)("inlineCode",{parentName:"a"},"BEFORE_HANDLE_ROUTE"))," and ",(0,r.kt)("a",{parentName:"p",href:"./events#built-in-events"},(0,r.kt)("inlineCode",{parentName:"a"},"AFTER_HANDLE_ROUTE"))," dispatcher events. However from inside event listeners you cannot intercept or modify the process. For this purpose we've introduced PageManagerHandlers in ",(0,r.kt)("a",{parentName:"p",href:"/migration/migration-0.16.0"},"v16")),(0,r.kt)("h3",{id:"pagemanagerhandlers"},"PageManagerHandlers"),(0,r.kt)("p",null,"PageManagerHandler is a simple class that extends ",(0,r.kt)("inlineCode",{parentName:"p"},"ima/page/handler/PageHandler"),". It can obtain dependencies through ",(0,r.kt)("a",{parentName:"p",href:"./object-container#1-dependency-injection"},"dependency injection"),". Each handler should contain 4 methods:"),(0,r.kt)("h4",{id:"1-init-method"},"1. ",(0,r.kt)("inlineCode",{parentName:"h4"},"init()")," method"),(0,r.kt)("p",null,"For purpose of initializing."),(0,r.kt)("h4",{id:"2-handlepremanagedstate-method"},"2. ",(0,r.kt)("inlineCode",{parentName:"h4"},"handlePreManagedState()")," method"),(0,r.kt)("p",null,"This method is called before the page manager start taking any action. It receives 3 arguments ",(0,r.kt)("inlineCode",{parentName:"p"},"managedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"nextManagedPage")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"action"),". ",(0,r.kt)("inlineCode",{parentName:"p"},"managedPage")," holds information about current page, ",(0,r.kt)("inlineCode",{parentName:"p"},"nextManagedPage"),' about following page. Each of the "managed page" arguments has following shape:'),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"{\n controller: ?(string|function(new: Controller)), // controller class\n controllerInstance: ?Controller, // instantiated controller\n decoratedController: ?Controller, // controller decorator created from controller instance\n view: ?React.Component, // view class/component\n viewInstance: ?React.Element, // instantiated view\n route: ?Route, // matched route that leads to the controller\n options: ?RouteOptions, // route options\n params: ?Object, // route parameters and their values\n state: {\n activated: boolean // if the page has been activated\n }\n}\n")),(0,r.kt)("p",null,"and finally the ",(0,r.kt)("inlineCode",{parentName:"p"},"action")," is an object describing what triggered the routing. If a ",(0,r.kt)("inlineCode",{parentName:"p"},"PopStateEvent")," triggered the routing the action object will look like this: ",(0,r.kt)("inlineCode",{parentName:"p"},"{ type: 'popstate', event: PopStateEvent }")," otherwise the ",(0,r.kt)("inlineCode",{parentName:"p"},"event")," property will contain ",(0,r.kt)("inlineCode",{parentName:"p"},"MouseEvent")," (e.g. clicked on a link) and ",(0,r.kt)("inlineCode",{parentName:"p"},"type")," property will have value ",(0,r.kt)("inlineCode",{parentName:"p"},"'redirect'"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"'click'")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"'error'"),"."),(0,r.kt)("h4",{id:"3-handlepostmanagedstate-method"},"3. ",(0,r.kt)("inlineCode",{parentName:"h4"},"handlePostManagedState()")," method"),(0,r.kt)("p",null,"This method is a counterpart to ",(0,r.kt)("inlineCode",{parentName:"p"},"handlePreManagedState()")," method. It's called after page transition is finished. It receives similar arguments (",(0,r.kt)("inlineCode",{parentName:"p"},"managedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"previousManagedPage")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"action"),"). ",(0,r.kt)("inlineCode",{parentName:"p"},"previousManagedPage")," holds information about previous page."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Note:")," ",(0,r.kt)("inlineCode",{parentName:"p"},"handlePreManagedState()")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"handlePostManagedState()")," methods can interrupt transition process by throwing an error. The thrown error should be instance of ",(0,r.kt)("a",{parentName:"p",href:"./error-handling"},(0,r.kt)("inlineCode",{parentName:"a"},"GenericError"))," with a status code specified. That way the router can handle thrown error accordingly.")),(0,r.kt)("h4",{id:"4-destroy-method"},"4. ",(0,r.kt)("inlineCode",{parentName:"h4"},"destroy()")," method"),(0,r.kt)("p",null,"For purpose of destructing"),(0,r.kt)("h2",{id:"registering-pagemanagerhandlers"},"Registering PageManagerHandlers"),(0,r.kt)("p",null,"PageManagerHandlers have their own registry ",(0,r.kt)("strong",{parentName:"p"},"PageHandlerRegistry"),". Every handler you create should be registered as a dependency of this registry."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/config/bind.js\nimport { PageHandlerRegistry, Window } from '@ima/core';\nimport MyOwnHandler from 'app/handler/MyOwnHandler';\n\nexport let init = (ns, oc, config) => {\n // ...\n\n if (oc.get(Window).isClient()) { // register different handlers for client and server\n oc.inject(PageHandlerRegistry, [MyOwnHandler]);\n } else {\n oc.inject(PageHandlerRegistry, []);\n }\n};\n")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Note:"),"\xa0Handlers are executed in series and each one waits for the previous one to complete its task.")),(0,r.kt)("h2",{id:"pagenavigationhandler"},"PageNavigationHandler"),(0,r.kt)("p",null,"With introduction of PageManagerHandlers in ",(0,r.kt)("a",{parentName:"p",href:"/migration/migration-0.16.0"},"v16")," we've moved some functionality to predefined handler ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/master/packages/core/src/page/handler/PageNavigationHandler.js"},(0,r.kt)("strong",{parentName:"a"},"PageNavigationHandler")),". This handler takes care of saving scroll position, restoring scroll position and settings browser's address bar URL. You're free to extend it, override it or whatever else you want."),(0,r.kt)("p",null,"PageNavigationHandler is registered by default, but when you register your own handlers you need to specify PageNavigationHandler as well."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"import { PageHandlerRegistry, PageNavigationHandler } from '@ima/core';\nimport MyOwnHandler from 'app/handler/MyOwnHandler';\n\nexport let init = (ns, oc, config) => {\n // ...\n oc.inject(PageHandlerRegistry, [PageNavigationHandler, MyOwnHandler]);\n};\n")))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/16feba69.e08cb02b.js b/assets/js/16feba69.1f2318be.js similarity index 96% rename from assets/js/16feba69.e08cb02b.js rename to assets/js/16feba69.1f2318be.js index 13d8145e56..391c3ca09a 100644 --- a/assets/js/16feba69.e08cb02b.js +++ b/assets/js/16feba69.1f2318be.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[698],{3905:(e,a,t)=>{t.d(a,{Zo:()=>s,kt:()=>c});var n=t(7294);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function i(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var d=n.createContext({}),o=function(e){var a=n.useContext(d),t=a;return e&&(t="function"==typeof e?e(a):l(l({},a),e)),t},s=function(e){var a=o(e.components);return n.createElement(d.Provider,{value:a},e.children)},m="mdxType",g={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},k=n.forwardRef((function(e,a){var t=e.components,r=e.mdxType,i=e.originalType,d=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),m=o(t),k=r,c=m["".concat(d,".").concat(k)]||m[k]||g[k]||i;return t?n.createElement(c,l(l({ref:a},s),{},{components:t})):n.createElement(c,l({ref:a},s))}));function c(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var i=t.length,l=new Array(i);l[0]=k;var p={};for(var d in a)hasOwnProperty.call(a,d)&&(p[d]=a[d]);p.originalType=e,p[m]="string"==typeof e?e:r,l[1]=p;for(var o=2;o{t.r(a),t.d(a,{assets:()=>d,contentTitle:()=>l,default:()=>g,frontMatter:()=>i,metadata:()=>p,toc:()=>o});var n=t(5773),r=(t(7294),t(3905));const i={id:"ima_core.ClientPageManager",title:"Class: ClientPageManager",sidebar_label:"@ima/core.ClientPageManager",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_core.ClientPageManager",id:"api/classes/ima_core.ClientPageManager",title:"Class: ClientPageManager",description:"@ima/core.ClientPageManager",source:"@site/../docs/api/classes/ima_core.ClientPageManager.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.ClientPageManager",permalink:"/api/classes/ima_core.ClientPageManager",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.ClientPageManager",title:"Class: ClientPageManager",sidebar_label:"@ima/core.ClientPageManager",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.CancelError",permalink:"/api/classes/ima_core.CancelError"},next:{title:"@ima/core.ClientRouter",permalink:"/api/classes/ima_core.ClientRouter"}},d={},o=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"_dispatcher",id:"_dispatcher",level:3},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"_eventBus",id:"_eventbus",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"_managedPage",id:"_managedpage",level:3},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"_pageFactory",id:"_pagefactory",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"_pageHandlerRegistry",id:"_pagehandlerregistry",level:3},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"_pageRenderer",id:"_pagerenderer",level:3},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"_pageStateManager",id:"_pagestatemanager",level:3},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"_previousManagedPage",id:"_previousmanagedpage",level:3},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"_window",id:"_window",level:3},{value:"Defined in",id:"defined-in-9",level:4},{value:"Accessors",id:"accessors",level:2},{value:"$dependencies",id:"dependencies",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"Methods",id:"methods",level:2},{value:"#cancelable",id:"cancelable",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Inherited from",id:"inherited-from-7",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"_activateController",id:"_activatecontroller",level:3},{value:"Returns",id:"returns-2",level:4},{value:"Inherited from",id:"inherited-from-8",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"_activateExtensions",id:"_activateextensions",level:3},{value:"Returns",id:"returns-3",level:4},{value:"Inherited from",id:"inherited-from-9",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"_activatePageSource",id:"_activatepagesource",level:3},{value:"Returns",id:"returns-4",level:4},{value:"Inherited from",id:"inherited-from-10",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"_boundOnCustomEventHandler",id:"_boundoncustomeventhandler",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"_clearComponentState",id:"_clearcomponentstate",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Inherited from",id:"inherited-from-11",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"_constructManagedPageValue",id:"_constructmanagedpagevalue",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-7",level:4},{value:"Inherited from",id:"inherited-from-12",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"_deactivateController",id:"_deactivatecontroller",level:3},{value:"Returns",id:"returns-8",level:4},{value:"Inherited from",id:"inherited-from-13",level:4},{value:"Defined in",id:"defined-in-18",level:4},{value:"_deactivateExtensions",id:"_deactivateextensions",level:3},{value:"Returns",id:"returns-9",level:4},{value:"Inherited from",id:"inherited-from-14",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"_deactivatePageSource",id:"_deactivatepagesource",level:3},{value:"Returns",id:"returns-10",level:4},{value:"Inherited from",id:"inherited-from-15",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"_destroyController",id:"_destroycontroller",level:3},{value:"Returns",id:"returns-11",level:4},{value:"Inherited from",id:"inherited-from-16",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"_destroyExtensions",id:"_destroyextensions",level:3},{value:"Returns",id:"returns-12",level:4},{value:"Inherited from",id:"inherited-from-17",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"_destroyPageSource",id:"_destroypagesource",level:3},{value:"Returns",id:"returns-13",level:4},{value:"Inherited from",id:"inherited-from-18",level:4},{value:"Defined in",id:"defined-in-23",level:4},{value:"_getInitialManagedPage",id:"_getinitialmanagedpage",level:3},{value:"Returns",id:"returns-14",level:4},{value:"Inherited from",id:"inherited-from-19",level:4},{value:"Defined in",id:"defined-in-24",level:4},{value:"_getLoadedControllerState",id:"_getloadedcontrollerstate",level:3},{value:"Returns",id:"returns-15",level:4},{value:"Inherited from",id:"inherited-from-20",level:4},{value:"Defined in",id:"defined-in-25",level:4},{value:"_getLoadedExtensionsState",id:"_getloadedextensionsstate",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-16",level:4},{value:"Inherited from",id:"inherited-from-21",level:4},{value:"Defined in",id:"defined-in-26",level:4},{value:"_getUpdatedControllerState",id:"_getupdatedcontrollerstate",level:3},{value:"Returns",id:"returns-17",level:4},{value:"Inherited from",id:"inherited-from-22",level:4},{value:"Defined in",id:"defined-in-27",level:4},{value:"_getUpdatedExtensionsState",id:"_getupdatedextensionsstate",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-18",level:4},{value:"Inherited from",id:"inherited-from-23",level:4},{value:"Defined in",id:"defined-in-28",level:4},{value:"_handleEventWithController",id:"_handleeventwithcontroller",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-19",level:4},{value:"Defined in",id:"defined-in-29",level:4},{value:"_handleEventWithExtensions",id:"_handleeventwithextensions",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-20",level:4},{value:"Defined in",id:"defined-in-30",level:4},{value:"_hasOnlyUpdate",id:"_hasonlyupdate",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-21",level:4},{value:"Inherited from",id:"inherited-from-24",level:4},{value:"Defined in",id:"defined-in-31",level:4},{value:"_initController",id:"_initcontroller",level:3},{value:"Returns",id:"returns-22",level:4},{value:"Inherited from",id:"inherited-from-25",level:4},{value:"Defined in",id:"defined-in-32",level:4},{value:"_initExtensions",id:"_initextensions",level:3},{value:"Returns",id:"returns-23",level:4},{value:"Inherited from",id:"inherited-from-26",level:4},{value:"Defined in",id:"defined-in-33",level:4},{value:"_initPageSource",id:"_initpagesource",level:3},{value:"Returns",id:"returns-24",level:4},{value:"Inherited from",id:"inherited-from-27",level:4},{value:"Defined in",id:"defined-in-34",level:4},{value:"_loadPageSource",id:"_loadpagesource",level:3},{value:"Returns",id:"returns-25",level:4},{value:"Inherited from",id:"inherited-from-28",level:4},{value:"Defined in",id:"defined-in-35",level:4},{value:"_onChangeStateHandler",id:"_onchangestatehandler",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-26",level:4},{value:"Defined in",id:"defined-in-36",level:4},{value:"_onCustomEventHandler",id:"_oncustomeventhandler",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-27",level:4},{value:"Defined in",id:"defined-in-37",level:4},{value:"_parseCustomEvent",id:"_parsecustomevent",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-28",level:4},{value:"Defined in",id:"defined-in-38",level:4},{value:"_runPostManageHandlers",id:"_runpostmanagehandlers",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-29",level:4},{value:"Inherited from",id:"inherited-from-29",level:4},{value:"Defined in",id:"defined-in-39",level:4},{value:"_runPreManageHandlers",id:"_runpremanagehandlers",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-30",level:4},{value:"Inherited from",id:"inherited-from-30",level:4},{value:"Defined in",id:"defined-in-40",level:4},{value:"_setRestrictedPageStateManager",id:"_setrestrictedpagestatemanager",level:3},{value:"Parameters",id:"parameters-15",level:4},{value:"Returns",id:"returns-31",level:4},{value:"Inherited from",id:"inherited-from-31",level:4},{value:"Defined in",id:"defined-in-41",level:4},{value:"_storeManagedPageSnapshot",id:"_storemanagedpagesnapshot",level:3},{value:"Returns",id:"returns-32",level:4},{value:"Inherited from",id:"inherited-from-32",level:4},{value:"Defined in",id:"defined-in-42",level:4},{value:"_stripManagedPageValueForPublic",id:"_stripmanagedpagevalueforpublic",level:3},{value:"Parameters",id:"parameters-16",level:4},{value:"Returns",id:"returns-33",level:4},{value:"Inherited from",id:"inherited-from-33",level:4},{value:"Defined in",id:"defined-in-43",level:4},{value:"_switchToPageStateManager",id:"_switchtopagestatemanager",level:3},{value:"Returns",id:"returns-34",level:4},{value:"Inherited from",id:"inherited-from-34",level:4},{value:"Defined in",id:"defined-in-44",level:4},{value:"_switchToPageStateManagerAfterLoaded",id:"_switchtopagestatemanagerafterloaded",level:3},{value:"Parameters",id:"parameters-17",level:4},{value:"Returns",id:"returns-35",level:4},{value:"Inherited from",id:"inherited-from-35",level:4},{value:"Defined in",id:"defined-in-45",level:4},{value:"_updatePageSource",id:"_updatepagesource",level:3},{value:"Returns",id:"returns-36",level:4},{value:"Inherited from",id:"inherited-from-36",level:4},{value:"Defined in",id:"defined-in-46",level:4},{value:"destroy",id:"destroy",level:3},{value:"Returns",id:"returns-37",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-47",level:4},{value:"getViewController",id:"getviewcontroller",level:3},{value:"Parameters",id:"parameters-18",level:4},{value:"Returns",id:"returns-38",level:4},{value:"Inherited from",id:"inherited-from-37",level:4},{value:"Defined in",id:"defined-in-48",level:4},{value:"init",id:"init",level:3},{value:"Returns",id:"returns-39",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-49",level:4},{value:"manage",id:"manage",level:3},{value:"Parameters",id:"parameters-19",level:4},{value:"Returns",id:"returns-40",level:4},{value:"Overrides",id:"overrides-3",level:4},{value:"Defined in",id:"defined-in-50",level:4},{value:"postManage",id:"postmanage",level:3},{value:"Returns",id:"returns-41",level:4},{value:"Inherited from",id:"inherited-from-38",level:4},{value:"Defined in",id:"defined-in-51",level:4},{value:"preManage",id:"premanage",level:3},{value:"Returns",id:"returns-42",level:4},{value:"Inherited from",id:"inherited-from-39",level:4},{value:"Defined in",id:"defined-in-52",level:4}],s={toc:o},m="wrapper";function g(e){let{components:a,...t}=e;return(0,r.kt)(m,(0,n.Z)({},s,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".ClientPageManager"),(0,r.kt)("p",null,"Page manager for controller on the client side."),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},(0,r.kt)("inlineCode",{parentName:"a"},"AbstractPageManager"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"ClientPageManager"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new ClientPageManager"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"pageFactory"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"pageRenderer"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"pageStateManager"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"handlerRegistry"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dispatcher"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"window"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"eventBus"),")"),(0,r.kt)("p",null,"Initializes the client-side page manager."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"pageFactory")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.PageFactory"},(0,r.kt)("inlineCode",{parentName:"a"},"PageFactory"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"Factory used by the page manager to create instances of the controller for the current route, and decorate the controllers and page state managers.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"pageRenderer")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.PageRenderer"},(0,r.kt)("inlineCode",{parentName:"a"},"PageRenderer"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The current renderer of the page.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"pageStateManager")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.PageStateManager"},(0,r.kt)("inlineCode",{parentName:"a"},"PageStateManager")),"<{}",">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"-")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"handlerRegistry")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.PageHandlerRegistry"},(0,r.kt)("inlineCode",{parentName:"a"},"PageHandlerRegistry"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"Instance of HandlerRegistry that holds a list of pre-manage and post-manage handlers.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dispatcher")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"IMA Dispatcher.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"window")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The utility for manipulating the global context and global client-side-specific APIs.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventBus")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.EventBus"},(0,r.kt)("inlineCode",{parentName:"a"},"EventBus"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The event bus for dispatching and listening for custom IMA events propagated through the DOM.")))),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#constructor"},"constructor")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/ClientPageManager.ts#L70"},"packages/core/src/page/manager/ClientPageManager.ts:70")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"_dispatcher"},"_","dispatcher"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","dispatcher"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_dispatcher"},"_dispatcher")),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L81"},"packages/core/src/page/manager/AbstractPageManager.ts:81")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_eventbus"},"_","eventBus"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","eventBus"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.EventBus"},(0,r.kt)("inlineCode",{parentName:"a"},"EventBus"))),(0,r.kt)("p",null,"The event bus for dispatching and listening for custom IMA events\npropagated through the DOM."),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/ClientPageManager.ts#L33"},"packages/core/src/page/manager/ClientPageManager.ts:33")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_managedpage"},"_","managedPage"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","managedPage"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("p",null,"Details of the currently managed page."),(0,r.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_managedpage"},"_managedPage")),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L68"},"packages/core/src/page/manager/AbstractPageManager.ts:68")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_pagefactory"},"_","pageFactory"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","pageFactory"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageFactory"},(0,r.kt)("inlineCode",{parentName:"a"},"PageFactory"))),(0,r.kt)("p",null,"Factory used by the page manager to create instances of the\ncontroller for the current route, and decorate the controllers and\npage state managers."),(0,r.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_pagefactory"},"_pageFactory")),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L63"},"packages/core/src/page/manager/AbstractPageManager.ts:63")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_pagehandlerregistry"},"_","pageHandlerRegistry"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","pageHandlerRegistry"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandlerRegistry"},(0,r.kt)("inlineCode",{parentName:"a"},"PageHandlerRegistry"))),(0,r.kt)("p",null,"A registry that holds a list of pre-manage and post-manage handlers."),(0,r.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_pagehandlerregistry"},"_pageHandlerRegistry")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L80"},"packages/core/src/page/manager/AbstractPageManager.ts:80")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_pagerenderer"},"_","pageRenderer"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","pageRenderer"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageRenderer"},(0,r.kt)("inlineCode",{parentName:"a"},"PageRenderer"))),(0,r.kt)("p",null,"The current renderer of the page."),(0,r.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_pagerenderer"},"_pageRenderer")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L72"},"packages/core/src/page/manager/AbstractPageManager.ts:72")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_pagestatemanager"},"_","pageStateManager"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","pageStateManager"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},(0,r.kt)("inlineCode",{parentName:"a"},"PageStateManager")),"<{}",">"),(0,r.kt)("p",null,"The current page state manager."),(0,r.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_pagestatemanager"},"_pageStateManager")),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L76"},"packages/core/src/page/manager/AbstractPageManager.ts:76")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_previousmanagedpage"},"_","previousManagedPage"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","previousManagedPage"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("p",null,"Snapshot of the previously managed page before it was replaced with\na new one"),(0,r.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_previousmanagedpage"},"_previousManagedPage")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L57"},"packages/core/src/page/manager/AbstractPageManager.ts:57")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_window"},"_","window"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","window"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))),(0,r.kt)("p",null,"The utility for manipulating the global context and global\nclient-side-specific APIs."),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/ClientPageManager.ts#L28"},"packages/core/src/page/manager/ClientPageManager.ts:28")),(0,r.kt)("h2",{id:"accessors"},"Accessors"),(0,r.kt)("h3",{id:"dependencies"},"$dependencies"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("inlineCode",{parentName:"p"},"get")," ",(0,r.kt)("strong",{parentName:"p"},"$dependencies"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/ClientPageManager.ts#L42"},"packages/core/src/page/manager/ClientPageManager.ts:42")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"cancelable"},"#cancelable"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#cancelable"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"promise"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("h4",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"promise")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("h4",{id:"inherited-from-7"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager##cancelable"},"#cancelable")),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L845"},"packages/core/src/page/manager/AbstractPageManager.ts:845")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_activatecontroller"},"_","activateController"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_activateController"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Activate managed instance of controller."),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-8"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_activatecontroller"},"_activateController")),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L549"},"packages/core/src/page/manager/AbstractPageManager.ts:549")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_activateextensions"},"_","activateExtensions"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_activateExtensions"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Activate extensions for managed instance of controller."),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-9"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_activateextensions"},"_activateExtensions")),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L563"},"packages/core/src/page/manager/AbstractPageManager.ts:563")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_activatepagesource"},"_","activatePageSource"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_activatePageSource"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Activate page source so call activate method on controller and his\nextensions."),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-10"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_activatepagesource"},"_activatePageSource")),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L529"},"packages/core/src/page/manager/AbstractPageManager.ts:529")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_boundoncustomeventhandler"},"_","boundOnCustomEventHandler"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_boundOnCustomEventHandler"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Event listener for the custom DOM events used by the event bus,\nbound to this instance."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"CustomEvent"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")))),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/ClientPageManager.ts#L38"},"packages/core/src/page/manager/ClientPageManager.ts:38")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_clearcomponentstate"},"_","clearComponentState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_clearComponentState"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"options"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"The method clear state on current rendered component to DOM."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The current route options.")))),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-11"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_clearcomponentstate"},"_clearComponentState")),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L753"},"packages/core/src/page/manager/AbstractPageManager.ts:753")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_constructmanagedpagevalue"},"_","constructManagedPageValue"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_constructManagedPageValue"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"controller"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"view"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"route"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"params"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"controllerInstance"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"decoratedController"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"viewInstance"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controller")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"view")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"route")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.AbstractRoute"},(0,r.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routepathexpression"},(0,r.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controllerInstance")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Controller"},(0,r.kt)("inlineCode",{parentName:"a"},"Controller")),"<",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#pagestate"},(0,r.kt)("inlineCode",{parentName:"a"},"PageState")),", ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")),", ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#pagestate"},(0,r.kt)("inlineCode",{parentName:"a"},"PageState")),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"decoratedController")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ControllerDecorator"},(0,r.kt)("inlineCode",{parentName:"a"},"ControllerDecorator")),"<{}, {}, {}",">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"viewInstance")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("h4",{id:"inherited-from-12"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_constructmanagedpagevalue"},"_constructManagedPageValue")),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L245"},"packages/core/src/page/manager/AbstractPageManager.ts:245")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_deactivatecontroller"},"_","deactivateController"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_deactivateController"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Deactivate last managed instance of controller only If controller was\nactivated."),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-13"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_deactivatecontroller"},"_deactivateController")),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L691"},"packages/core/src/page/manager/AbstractPageManager.ts:691")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_deactivateextensions"},"_","deactivateExtensions"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_deactivateExtensions"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Deactivate extensions for last managed instance of controller only if\nthey were activated."),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-14"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_deactivateextensions"},"_deactivateExtensions")),(0,r.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L702"},"packages/core/src/page/manager/AbstractPageManager.ts:702")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_deactivatepagesource"},"_","deactivatePageSource"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_deactivatePageSource"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Deactivate page source so call deactivate method on controller and his\nextensions."),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-15"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_deactivatepagesource"},"_deactivatePageSource")),(0,r.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L677"},"packages/core/src/page/manager/AbstractPageManager.ts:677")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_destroycontroller"},"_","destroyController"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_destroyController"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Destroy last managed instance of controller."),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-16"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_destroycontroller"},"_destroyController")),(0,r.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L726"},"packages/core/src/page/manager/AbstractPageManager.ts:726")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_destroyextensions"},"_","destroyExtensions"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_destroyExtensions"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Destroy extensions for last managed instance of controller."),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-17"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_destroyextensions"},"_destroyExtensions")),(0,r.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L739"},"packages/core/src/page/manager/AbstractPageManager.ts:739")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_destroypagesource"},"_","destroyPageSource"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_destroyPageSource"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Destroy page source so call destroy method on controller and his\nextensions."),(0,r.kt)("h4",{id:"returns-13"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-18"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_destroypagesource"},"_destroyPageSource")),(0,r.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L714"},"packages/core/src/page/manager/AbstractPageManager.ts:714")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getinitialmanagedpage"},"_","getInitialManagedPage"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_getInitialManagedPage"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("p",null,"Clear value from managed page."),(0,r.kt)("h4",{id:"returns-14"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("h4",{id:"inherited-from-19"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_getinitialmanagedpage"},"_getInitialManagedPage")),(0,r.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L302"},"packages/core/src/page/manager/AbstractPageManager.ts:302")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getloadedcontrollerstate"},"_","getLoadedControllerState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_getLoadedControllerState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<{}",">"),(0,r.kt)("p",null,"Load controller state from managed instance of controller."),(0,r.kt)("h4",{id:"returns-15"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<{}",">"),(0,r.kt)("h4",{id:"inherited-from-20"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_getloadedcontrollerstate"},"_getLoadedControllerState")),(0,r.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L485"},"packages/core/src/page/manager/AbstractPageManager.ts:485")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getloadedextensionsstate"},"_","getLoadedExtensionsState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_getLoadedExtensionsState"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"controllerState?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,r.kt)("p",null,"Load extensions state from managed instance of controller."),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controllerState?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))))),(0,r.kt)("h4",{id:"returns-16"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,r.kt)("h4",{id:"inherited-from-21"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_getloadedextensionsstate"},"_getLoadedExtensionsState")),(0,r.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L501"},"packages/core/src/page/manager/AbstractPageManager.ts:501")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getupdatedcontrollerstate"},"_","getUpdatedControllerState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_getUpdatedControllerState"),"(): {} ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<{}",">"),(0,r.kt)("p",null,"Return updated controller state for current page controller."),(0,r.kt)("h4",{id:"returns-17"},"Returns"),(0,r.kt)("p",null,"{} ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<{}",">"),(0,r.kt)("h4",{id:"inherited-from-22"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_getupdatedcontrollerstate"},"_getUpdatedControllerState")),(0,r.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L621"},"packages/core/src/page/manager/AbstractPageManager.ts:621")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getupdatedextensionsstate"},"_","getUpdatedExtensionsState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_getUpdatedExtensionsState"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"controllerState?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,r.kt)("p",null,"Return updated extensions state for current page controller."),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controllerState?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))))),(0,r.kt)("h4",{id:"returns-18"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,r.kt)("h4",{id:"inherited-from-23"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_getupdatedextensionsstate"},"_getUpdatedExtensionsState")),(0,r.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L637"},"packages/core/src/page/manager/AbstractPageManager.ts:637")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_handleeventwithcontroller"},"_","handleEventWithController"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_handleEventWithController"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prefix"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"method"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"data"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Attempts to handle the currently processed event bus custom DOM event\nusing the current controller. The method returns ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the\nevent is handled by the controller."),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prefix")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"-")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"method")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the method the current controller should use to process the currently processed event bus custom DOM event.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The custom event's data.")))),(0,r.kt)("h4",{id:"returns-19"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the event has been handled by the\ncontroller, ",(0,r.kt)("inlineCode",{parentName:"p"},"false")," if the controller does not have a\nmethod for processing the event."),(0,r.kt)("h4",{id:"defined-in-29"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/ClientPageManager.ts#L215"},"packages/core/src/page/manager/ClientPageManager.ts:215")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_handleeventwithextensions"},"_","handleEventWithExtensions"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_handleEventWithExtensions"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prefix"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"method"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"data"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Attempts to handle the currently processed event bus custom DOM event\nusing the registered extensions of the current controller. The method\nreturns ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the event is handled by the controller."),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prefix")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"-")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"method")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the method the current controller should use to process the currently processed event bus custom DOM event.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The custom event's data.")))),(0,r.kt)("h4",{id:"returns-20"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the event has been handled by one of\nthe controller's extensions, ",(0,r.kt)("inlineCode",{parentName:"p"},"false")," if none of the\ncontroller's extensions has a method for processing the event."),(0,r.kt)("h4",{id:"defined-in-30"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/ClientPageManager.ts#L251"},"packages/core/src/page/manager/ClientPageManager.ts:251")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_hasonlyupdate"},"_","hasOnlyUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_hasOnlyUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"controller"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"view"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Return true if manager has to update last managed controller and view."),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controller")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"view")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions")))))),(0,r.kt)("h4",{id:"returns-21"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"inherited-from-24"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_hasonlyupdate"},"_hasOnlyUpdate")),(0,r.kt)("h4",{id:"defined-in-31"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L769"},"packages/core/src/page/manager/AbstractPageManager.ts:769")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_initcontroller"},"_","initController"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_initController"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Initializes managed instance of controller with the provided parameters."),(0,r.kt)("h4",{id:"returns-22"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-25"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_initcontroller"},"_initController")),(0,r.kt)("h4",{id:"defined-in-32"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L398"},"packages/core/src/page/manager/AbstractPageManager.ts:398")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_initextensions"},"_","initExtensions"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_initExtensions"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Initialize extensions for managed instance of controller with the\nprovided parameters."),(0,r.kt)("h4",{id:"returns-23"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-26"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_initextensions"},"_initExtensions")),(0,r.kt)("h4",{id:"defined-in-33"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L413"},"packages/core/src/page/manager/AbstractPageManager.ts:413")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_initpagesource"},"_","initPageSource"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_initPageSource"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Initialize page source so call init method on controller and his\nextensions."),(0,r.kt)("h4",{id:"returns-24"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-27"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_initpagesource"},"_initPageSource")),(0,r.kt)("h4",{id:"defined-in-34"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L383"},"packages/core/src/page/manager/AbstractPageManager.ts:383")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_loadpagesource"},"_","loadPageSource"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_loadPageSource"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,r.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,r.kt)("p",null,"Load page source so call load method on controller and his extensions.\nMerge loaded state and render it."),(0,r.kt)("h4",{id:"returns-25"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,r.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,r.kt)("h4",{id:"inherited-from-28"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_loadpagesource"},"_loadPageSource")),(0,r.kt)("h4",{id:"defined-in-35"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L443"},"packages/core/src/page/manager/AbstractPageManager.ts:443")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_onchangestatehandler"},"_","onChangeStateHandler"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_onChangeStateHandler"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"state"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"On change event handler set state to view."),(0,r.kt)("h4",{id:"parameters-10"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))))),(0,r.kt)("h4",{id:"returns-26"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-36"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/ClientPageManager.ts#L276"},"packages/core/src/page/manager/ClientPageManager.ts:276")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_oncustomeventhandler"},"_","onCustomEventHandler"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_onCustomEventHandler"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Custom DOM event handler."),(0,r.kt)("p",null,"The handler invokes the event listener in the active controller, if such\nlistener is present. The name of the controller's listener method is\ncreated by turning the first symbol of the event's name to upper case,\nand then prefixing the result with the 'on' prefix."),(0,r.kt)("p",null,"For example: for an event named 'toggle' the controller's listener\nwould be named 'onToggle'."),(0,r.kt)("p",null,"The controller's listener will be invoked with the event's data as an\nargument."),(0,r.kt)("h4",{id:"parameters-11"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"CustomEvent"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The encountered event bus DOM event.")))),(0,r.kt)("h4",{id:"returns-27"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-37"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/ClientPageManager.ts#L151"},"packages/core/src/page/manager/ClientPageManager.ts:151")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_parsecustomevent"},"_","parseCustomEvent"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_parseCustomEvent"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"Extracts the details of the provided event bus custom DOM event, along\nwith the expected name of the current controller's method for\nintercepting the event."),(0,r.kt)("h4",{id:"parameters-12"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"CustomEvent"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The encountered event bus custom DOM event.")))),(0,r.kt)("h4",{id:"returns-28"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"The event's\ndetails."),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"method")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prefix")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"defined-in-38"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/ClientPageManager.ts#L188"},"packages/core/src/page/manager/ClientPageManager.ts:188")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_runpostmanagehandlers"},"_","runPostManageHandlers"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_runPostManageHandlers"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"previousManagedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"action"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"parameters-13"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"previousManagedPage")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"action")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.PageAction"},(0,r.kt)("inlineCode",{parentName:"a"},"PageAction")))))),(0,r.kt)("h4",{id:"returns-29"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"inherited-from-29"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_runpostmanagehandlers"},"_runPostManageHandlers")),(0,r.kt)("h4",{id:"defined-in-39"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L809"},"packages/core/src/page/manager/AbstractPageManager.ts:809")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_runpremanagehandlers"},"_","runPreManageHandlers"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_runPreManageHandlers"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"actualManagedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"action"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"parameters-14"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"actualManagedPage")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"action")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.PageAction"},(0,r.kt)("inlineCode",{parentName:"a"},"PageAction")))))),(0,r.kt)("h4",{id:"returns-30"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"inherited-from-30"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_runpremanagehandlers"},"_runPreManageHandlers")),(0,r.kt)("h4",{id:"defined-in-40"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L788"},"packages/core/src/page/manager/AbstractPageManager.ts:788")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_setrestrictedpagestatemanager"},"_","setRestrictedPageStateManager"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_setRestrictedPageStateManager"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"extension"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"extensionState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Set page state manager to extension which has restricted rights to set\nglobal state."),(0,r.kt)("h4",{id:"parameters-15"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"extension")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<{}, {}, {}",">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"extensionState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))))),(0,r.kt)("h4",{id:"returns-31"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-31"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_setrestrictedpagestatemanager"},"_setRestrictedPageStateManager")),(0,r.kt)("h4",{id:"defined-in-41"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L342"},"packages/core/src/page/manager/AbstractPageManager.ts:342")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_storemanagedpagesnapshot"},"_","storeManagedPageSnapshot"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_storeManagedPageSnapshot"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Creates a cloned version of currently managed page and stores it in\na helper property.\nSnapshot is used in manager handlers to easily determine differences\nbetween the current and the previous state."),(0,r.kt)("h4",{id:"returns-32"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-32"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_storemanagedpagesnapshot"},"_storeManagedPageSnapshot")),(0,r.kt)("h4",{id:"defined-in-42"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L281"},"packages/core/src/page/manager/AbstractPageManager.ts:281")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_stripmanagedpagevalueforpublic"},"_","stripManagedPageValueForPublic"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_stripManagedPageValueForPublic"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"value"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"Removes properties we do not want to propagate outside of the page manager"),(0,r.kt)("h4",{id:"parameters-16"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The managed page object to strip down")))),(0,r.kt)("h4",{id:"returns-33"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controller")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"route")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.AbstractRoute"},(0,r.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routepathexpression"},(0,r.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"view")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"inherited-from-33"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_stripmanagedpagevalueforpublic"},"_stripManagedPageValueForPublic")),(0,r.kt)("h4",{id:"defined-in-43"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L332"},"packages/core/src/page/manager/AbstractPageManager.ts:332")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_switchtopagestatemanager"},"_","switchToPageStateManager"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_switchToPageStateManager"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Iterates over extensions of current controller and switches each one to\npageStateManager and clears their partial state."),(0,r.kt)("h4",{id:"returns-34"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-34"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_switchtopagestatemanager"},"_switchToPageStateManager")),(0,r.kt)("h4",{id:"defined-in-44"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L430"},"packages/core/src/page/manager/AbstractPageManager.ts:430")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_switchtopagestatemanagerafterloaded"},"_","switchToPageStateManagerAfterLoaded"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_switchToPageStateManagerAfterLoaded"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"extension"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"extensionState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"For defined extension switches to pageStageManager and clears partial state\nafter extension state is loaded."),(0,r.kt)("h4",{id:"parameters-17"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"extension")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<{}, {}, {}",">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"extensionState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))))),(0,r.kt)("h4",{id:"returns-35"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-35"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_switchtopagestatemanagerafterloaded"},"_switchToPageStateManagerAfterLoaded")),(0,r.kt)("h4",{id:"defined-in-45"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L363"},"packages/core/src/page/manager/AbstractPageManager.ts:363")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_updatepagesource"},"_","updatePageSource"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_updatePageSource"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,r.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,r.kt)("p",null,"Update page source so call update method on controller and his\nextensions. Merge updated state and render it."),(0,r.kt)("h4",{id:"returns-36"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,r.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,r.kt)("h4",{id:"inherited-from-36"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_updatepagesource"},"_updatePageSource")),(0,r.kt)("h4",{id:"defined-in-46"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L580"},"packages/core/src/page/manager/AbstractPageManager.ts:580")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"destroy"},"destroy"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"destroy"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Finalization callback, called when the page manager is being discarded.\nThis usually happens when the page is hot-reloaded at the client side."),(0,r.kt)("h4",{id:"returns-37"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"overrides-1"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#destroy"},"destroy")),(0,r.kt)("h4",{id:"defined-in-47"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/ClientPageManager.ts#L126"},"packages/core/src/page/manager/ClientPageManager.ts:126")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getviewcontroller"},"getViewController"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"getViewController"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"route"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<{ ",(0,r.kt)("inlineCode",{parentName:"p"},"controller"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController"))," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"view"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routeview"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteView"))," }",">"),(0,r.kt)("h4",{id:"parameters-18"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"route")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.AbstractRoute"},(0,r.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routepathexpression"},(0,r.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">")))),(0,r.kt)("h4",{id:"returns-38"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<{ ",(0,r.kt)("inlineCode",{parentName:"p"},"controller"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController"))," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"view"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routeview"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteView"))," }",">"),(0,r.kt)("h4",{id:"inherited-from-37"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#getviewcontroller"},"getViewController")),(0,r.kt)("h4",{id:"defined-in-48"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L833"},"packages/core/src/page/manager/AbstractPageManager.ts:833")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"init"},"init"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"init"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Initializes the page manager."),(0,r.kt)("h4",{id:"returns-39"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-2"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#init"},"init")),(0,r.kt)("h4",{id:"defined-in-49"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/ClientPageManager.ts#L95"},"packages/core/src/page/manager/ClientPageManager.ts:95")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"manage"},"manage"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"manage"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"\xabdestructured\xbb"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,r.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,r.kt)("p",null,"Starts to manage the provided controller and its view. The manager\nstops the management of any previously managed controller and view."),(0,r.kt)("p",null,"The controller and view will be initialized and rendered either into the\nUI (at the client-side) or to the response to send to the client (at the\nserver-side)."),(0,r.kt)("h4",{id:"parameters-19"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"\xabdestructured\xbb")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#manageargs"},(0,r.kt)("inlineCode",{parentName:"a"},"ManageArgs")))))),(0,r.kt)("h4",{id:"returns-40"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,r.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,r.kt)("p",null,"A promise that will resolve to information about the rendered page.\nThe ",(0,r.kt)("inlineCode",{parentName:"p"},"status")," will contain the HTTP status code to send to the\nclient (at the server side) or determine the type of error page\nto navigate to (at the client side)."),(0,r.kt)("h4",{id:"overrides-3"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#manage"},"manage")),(0,r.kt)("h4",{id:"defined-in-50"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/ClientPageManager.ts#L109"},"packages/core/src/page/manager/ClientPageManager.ts:109")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"postmanage"},"postManage"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"postManage"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called by router after currently managed route is resolved."),(0,r.kt)("h4",{id:"returns-41"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-38"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#postmanage"},"postManage")),(0,r.kt)("h4",{id:"defined-in-51"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L223"},"packages/core/src/page/manager/AbstractPageManager.ts:223")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"premanage"},"preManage"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"preManage"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Pre manage handler, should be called and awaited before tryint to handle\nnew route handler. This pre manage takes care of canceling any currently\nexecuted route handlers and returns promise which is resolved when previous\npage finished loading (even if it got canceled)."),(0,r.kt)("h4",{id:"returns-42"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-39"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#premanage"},"preManage")),(0,r.kt)("h4",{id:"defined-in-52"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/AbstractPageManager.ts#L123"},"packages/core/src/page/manager/AbstractPageManager.ts:123")))}g.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[698],{3905:(e,a,t)=>{t.d(a,{Zo:()=>s,kt:()=>c});var n=t(7294);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function i(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var d=n.createContext({}),o=function(e){var a=n.useContext(d),t=a;return e&&(t="function"==typeof e?e(a):l(l({},a),e)),t},s=function(e){var a=o(e.components);return n.createElement(d.Provider,{value:a},e.children)},m="mdxType",g={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},k=n.forwardRef((function(e,a){var t=e.components,r=e.mdxType,i=e.originalType,d=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),m=o(t),k=r,c=m["".concat(d,".").concat(k)]||m[k]||g[k]||i;return t?n.createElement(c,l(l({ref:a},s),{},{components:t})):n.createElement(c,l({ref:a},s))}));function c(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var i=t.length,l=new Array(i);l[0]=k;var p={};for(var d in a)hasOwnProperty.call(a,d)&&(p[d]=a[d]);p.originalType=e,p[m]="string"==typeof e?e:r,l[1]=p;for(var o=2;o{t.r(a),t.d(a,{assets:()=>d,contentTitle:()=>l,default:()=>g,frontMatter:()=>i,metadata:()=>p,toc:()=>o});var n=t(5773),r=(t(7294),t(3905));const i={id:"ima_core.ClientPageManager",title:"Class: ClientPageManager",sidebar_label:"@ima/core.ClientPageManager",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_core.ClientPageManager",id:"api/classes/ima_core.ClientPageManager",title:"Class: ClientPageManager",description:"@ima/core.ClientPageManager",source:"@site/../docs/api/classes/ima_core.ClientPageManager.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.ClientPageManager",permalink:"/api/classes/ima_core.ClientPageManager",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.ClientPageManager",title:"Class: ClientPageManager",sidebar_label:"@ima/core.ClientPageManager",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.CancelError",permalink:"/api/classes/ima_core.CancelError"},next:{title:"@ima/core.ClientRouter",permalink:"/api/classes/ima_core.ClientRouter"}},d={},o=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"_dispatcher",id:"_dispatcher",level:3},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"_eventBus",id:"_eventbus",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"_managedPage",id:"_managedpage",level:3},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"_pageFactory",id:"_pagefactory",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"_pageHandlerRegistry",id:"_pagehandlerregistry",level:3},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"_pageRenderer",id:"_pagerenderer",level:3},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"_pageStateManager",id:"_pagestatemanager",level:3},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"_previousManagedPage",id:"_previousmanagedpage",level:3},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"_window",id:"_window",level:3},{value:"Defined in",id:"defined-in-9",level:4},{value:"Accessors",id:"accessors",level:2},{value:"$dependencies",id:"dependencies",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"Methods",id:"methods",level:2},{value:"#cancelable",id:"cancelable",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Inherited from",id:"inherited-from-7",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"_activateController",id:"_activatecontroller",level:3},{value:"Returns",id:"returns-2",level:4},{value:"Inherited from",id:"inherited-from-8",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"_activateExtensions",id:"_activateextensions",level:3},{value:"Returns",id:"returns-3",level:4},{value:"Inherited from",id:"inherited-from-9",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"_activatePageSource",id:"_activatepagesource",level:3},{value:"Returns",id:"returns-4",level:4},{value:"Inherited from",id:"inherited-from-10",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"_boundOnCustomEventHandler",id:"_boundoncustomeventhandler",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"_clearComponentState",id:"_clearcomponentstate",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Inherited from",id:"inherited-from-11",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"_constructManagedPageValue",id:"_constructmanagedpagevalue",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-7",level:4},{value:"Inherited from",id:"inherited-from-12",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"_deactivateController",id:"_deactivatecontroller",level:3},{value:"Returns",id:"returns-8",level:4},{value:"Inherited from",id:"inherited-from-13",level:4},{value:"Defined in",id:"defined-in-18",level:4},{value:"_deactivateExtensions",id:"_deactivateextensions",level:3},{value:"Returns",id:"returns-9",level:4},{value:"Inherited from",id:"inherited-from-14",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"_deactivatePageSource",id:"_deactivatepagesource",level:3},{value:"Returns",id:"returns-10",level:4},{value:"Inherited from",id:"inherited-from-15",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"_destroyController",id:"_destroycontroller",level:3},{value:"Returns",id:"returns-11",level:4},{value:"Inherited from",id:"inherited-from-16",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"_destroyExtensions",id:"_destroyextensions",level:3},{value:"Returns",id:"returns-12",level:4},{value:"Inherited from",id:"inherited-from-17",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"_destroyPageSource",id:"_destroypagesource",level:3},{value:"Returns",id:"returns-13",level:4},{value:"Inherited from",id:"inherited-from-18",level:4},{value:"Defined in",id:"defined-in-23",level:4},{value:"_getInitialManagedPage",id:"_getinitialmanagedpage",level:3},{value:"Returns",id:"returns-14",level:4},{value:"Inherited from",id:"inherited-from-19",level:4},{value:"Defined in",id:"defined-in-24",level:4},{value:"_getLoadedControllerState",id:"_getloadedcontrollerstate",level:3},{value:"Returns",id:"returns-15",level:4},{value:"Inherited from",id:"inherited-from-20",level:4},{value:"Defined in",id:"defined-in-25",level:4},{value:"_getLoadedExtensionsState",id:"_getloadedextensionsstate",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-16",level:4},{value:"Inherited from",id:"inherited-from-21",level:4},{value:"Defined in",id:"defined-in-26",level:4},{value:"_getUpdatedControllerState",id:"_getupdatedcontrollerstate",level:3},{value:"Returns",id:"returns-17",level:4},{value:"Inherited from",id:"inherited-from-22",level:4},{value:"Defined in",id:"defined-in-27",level:4},{value:"_getUpdatedExtensionsState",id:"_getupdatedextensionsstate",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-18",level:4},{value:"Inherited from",id:"inherited-from-23",level:4},{value:"Defined in",id:"defined-in-28",level:4},{value:"_handleEventWithController",id:"_handleeventwithcontroller",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-19",level:4},{value:"Defined in",id:"defined-in-29",level:4},{value:"_handleEventWithExtensions",id:"_handleeventwithextensions",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-20",level:4},{value:"Defined in",id:"defined-in-30",level:4},{value:"_hasOnlyUpdate",id:"_hasonlyupdate",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-21",level:4},{value:"Inherited from",id:"inherited-from-24",level:4},{value:"Defined in",id:"defined-in-31",level:4},{value:"_initController",id:"_initcontroller",level:3},{value:"Returns",id:"returns-22",level:4},{value:"Inherited from",id:"inherited-from-25",level:4},{value:"Defined in",id:"defined-in-32",level:4},{value:"_initExtensions",id:"_initextensions",level:3},{value:"Returns",id:"returns-23",level:4},{value:"Inherited from",id:"inherited-from-26",level:4},{value:"Defined in",id:"defined-in-33",level:4},{value:"_initPageSource",id:"_initpagesource",level:3},{value:"Returns",id:"returns-24",level:4},{value:"Inherited from",id:"inherited-from-27",level:4},{value:"Defined in",id:"defined-in-34",level:4},{value:"_loadPageSource",id:"_loadpagesource",level:3},{value:"Returns",id:"returns-25",level:4},{value:"Inherited from",id:"inherited-from-28",level:4},{value:"Defined in",id:"defined-in-35",level:4},{value:"_onChangeStateHandler",id:"_onchangestatehandler",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-26",level:4},{value:"Defined in",id:"defined-in-36",level:4},{value:"_onCustomEventHandler",id:"_oncustomeventhandler",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-27",level:4},{value:"Defined in",id:"defined-in-37",level:4},{value:"_parseCustomEvent",id:"_parsecustomevent",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-28",level:4},{value:"Defined in",id:"defined-in-38",level:4},{value:"_runPostManageHandlers",id:"_runpostmanagehandlers",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-29",level:4},{value:"Inherited from",id:"inherited-from-29",level:4},{value:"Defined in",id:"defined-in-39",level:4},{value:"_runPreManageHandlers",id:"_runpremanagehandlers",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-30",level:4},{value:"Inherited from",id:"inherited-from-30",level:4},{value:"Defined in",id:"defined-in-40",level:4},{value:"_setRestrictedPageStateManager",id:"_setrestrictedpagestatemanager",level:3},{value:"Parameters",id:"parameters-15",level:4},{value:"Returns",id:"returns-31",level:4},{value:"Inherited from",id:"inherited-from-31",level:4},{value:"Defined in",id:"defined-in-41",level:4},{value:"_storeManagedPageSnapshot",id:"_storemanagedpagesnapshot",level:3},{value:"Returns",id:"returns-32",level:4},{value:"Inherited from",id:"inherited-from-32",level:4},{value:"Defined in",id:"defined-in-42",level:4},{value:"_stripManagedPageValueForPublic",id:"_stripmanagedpagevalueforpublic",level:3},{value:"Parameters",id:"parameters-16",level:4},{value:"Returns",id:"returns-33",level:4},{value:"Inherited from",id:"inherited-from-33",level:4},{value:"Defined in",id:"defined-in-43",level:4},{value:"_switchToPageStateManager",id:"_switchtopagestatemanager",level:3},{value:"Returns",id:"returns-34",level:4},{value:"Inherited from",id:"inherited-from-34",level:4},{value:"Defined in",id:"defined-in-44",level:4},{value:"_switchToPageStateManagerAfterLoaded",id:"_switchtopagestatemanagerafterloaded",level:3},{value:"Parameters",id:"parameters-17",level:4},{value:"Returns",id:"returns-35",level:4},{value:"Inherited from",id:"inherited-from-35",level:4},{value:"Defined in",id:"defined-in-45",level:4},{value:"_updatePageSource",id:"_updatepagesource",level:3},{value:"Returns",id:"returns-36",level:4},{value:"Inherited from",id:"inherited-from-36",level:4},{value:"Defined in",id:"defined-in-46",level:4},{value:"destroy",id:"destroy",level:3},{value:"Returns",id:"returns-37",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-47",level:4},{value:"getViewController",id:"getviewcontroller",level:3},{value:"Parameters",id:"parameters-18",level:4},{value:"Returns",id:"returns-38",level:4},{value:"Inherited from",id:"inherited-from-37",level:4},{value:"Defined in",id:"defined-in-48",level:4},{value:"init",id:"init",level:3},{value:"Returns",id:"returns-39",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-49",level:4},{value:"manage",id:"manage",level:3},{value:"Parameters",id:"parameters-19",level:4},{value:"Returns",id:"returns-40",level:4},{value:"Overrides",id:"overrides-3",level:4},{value:"Defined in",id:"defined-in-50",level:4},{value:"postManage",id:"postmanage",level:3},{value:"Returns",id:"returns-41",level:4},{value:"Inherited from",id:"inherited-from-38",level:4},{value:"Defined in",id:"defined-in-51",level:4},{value:"preManage",id:"premanage",level:3},{value:"Returns",id:"returns-42",level:4},{value:"Inherited from",id:"inherited-from-39",level:4},{value:"Defined in",id:"defined-in-52",level:4}],s={toc:o},m="wrapper";function g(e){let{components:a,...t}=e;return(0,r.kt)(m,(0,n.Z)({},s,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".ClientPageManager"),(0,r.kt)("p",null,"Page manager for controller on the client side."),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},(0,r.kt)("inlineCode",{parentName:"a"},"AbstractPageManager"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"ClientPageManager"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new ClientPageManager"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"pageFactory"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"pageRenderer"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"pageStateManager"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"handlerRegistry"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dispatcher"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"window"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"eventBus"),")"),(0,r.kt)("p",null,"Initializes the client-side page manager."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"pageFactory")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.PageFactory"},(0,r.kt)("inlineCode",{parentName:"a"},"PageFactory"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"Factory used by the page manager to create instances of the controller for the current route, and decorate the controllers and page state managers.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"pageRenderer")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.PageRenderer"},(0,r.kt)("inlineCode",{parentName:"a"},"PageRenderer"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The current renderer of the page.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"pageStateManager")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.PageStateManager"},(0,r.kt)("inlineCode",{parentName:"a"},"PageStateManager")),"<{}",">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"-")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"handlerRegistry")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.PageHandlerRegistry"},(0,r.kt)("inlineCode",{parentName:"a"},"PageHandlerRegistry"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"Instance of HandlerRegistry that holds a list of pre-manage and post-manage handlers.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dispatcher")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"IMA Dispatcher.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"window")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The utility for manipulating the global context and global client-side-specific APIs.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventBus")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.EventBus"},(0,r.kt)("inlineCode",{parentName:"a"},"EventBus"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The event bus for dispatching and listening for custom IMA events propagated through the DOM.")))),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#constructor"},"constructor")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/ClientPageManager.ts#L70"},"packages/core/src/page/manager/ClientPageManager.ts:70")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"_dispatcher"},"_","dispatcher"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","dispatcher"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_dispatcher"},"_dispatcher")),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L81"},"packages/core/src/page/manager/AbstractPageManager.ts:81")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_eventbus"},"_","eventBus"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","eventBus"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.EventBus"},(0,r.kt)("inlineCode",{parentName:"a"},"EventBus"))),(0,r.kt)("p",null,"The event bus for dispatching and listening for custom IMA events\npropagated through the DOM."),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/ClientPageManager.ts#L33"},"packages/core/src/page/manager/ClientPageManager.ts:33")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_managedpage"},"_","managedPage"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","managedPage"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("p",null,"Details of the currently managed page."),(0,r.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_managedpage"},"_managedPage")),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L68"},"packages/core/src/page/manager/AbstractPageManager.ts:68")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_pagefactory"},"_","pageFactory"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","pageFactory"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageFactory"},(0,r.kt)("inlineCode",{parentName:"a"},"PageFactory"))),(0,r.kt)("p",null,"Factory used by the page manager to create instances of the\ncontroller for the current route, and decorate the controllers and\npage state managers."),(0,r.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_pagefactory"},"_pageFactory")),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L63"},"packages/core/src/page/manager/AbstractPageManager.ts:63")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_pagehandlerregistry"},"_","pageHandlerRegistry"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","pageHandlerRegistry"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandlerRegistry"},(0,r.kt)("inlineCode",{parentName:"a"},"PageHandlerRegistry"))),(0,r.kt)("p",null,"A registry that holds a list of pre-manage and post-manage handlers."),(0,r.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_pagehandlerregistry"},"_pageHandlerRegistry")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L80"},"packages/core/src/page/manager/AbstractPageManager.ts:80")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_pagerenderer"},"_","pageRenderer"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","pageRenderer"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageRenderer"},(0,r.kt)("inlineCode",{parentName:"a"},"PageRenderer"))),(0,r.kt)("p",null,"The current renderer of the page."),(0,r.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_pagerenderer"},"_pageRenderer")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L72"},"packages/core/src/page/manager/AbstractPageManager.ts:72")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_pagestatemanager"},"_","pageStateManager"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","pageStateManager"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},(0,r.kt)("inlineCode",{parentName:"a"},"PageStateManager")),"<{}",">"),(0,r.kt)("p",null,"The current page state manager."),(0,r.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_pagestatemanager"},"_pageStateManager")),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L76"},"packages/core/src/page/manager/AbstractPageManager.ts:76")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_previousmanagedpage"},"_","previousManagedPage"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","previousManagedPage"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("p",null,"Snapshot of the previously managed page before it was replaced with\na new one"),(0,r.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_previousmanagedpage"},"_previousManagedPage")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L57"},"packages/core/src/page/manager/AbstractPageManager.ts:57")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_window"},"_","window"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","window"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))),(0,r.kt)("p",null,"The utility for manipulating the global context and global\nclient-side-specific APIs."),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/ClientPageManager.ts#L28"},"packages/core/src/page/manager/ClientPageManager.ts:28")),(0,r.kt)("h2",{id:"accessors"},"Accessors"),(0,r.kt)("h3",{id:"dependencies"},"$dependencies"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("inlineCode",{parentName:"p"},"get")," ",(0,r.kt)("strong",{parentName:"p"},"$dependencies"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/ClientPageManager.ts#L42"},"packages/core/src/page/manager/ClientPageManager.ts:42")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"cancelable"},"#cancelable"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#cancelable"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"promise"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("h4",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"promise")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("h4",{id:"inherited-from-7"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager##cancelable"},"#cancelable")),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L845"},"packages/core/src/page/manager/AbstractPageManager.ts:845")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_activatecontroller"},"_","activateController"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_activateController"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Activate managed instance of controller."),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-8"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_activatecontroller"},"_activateController")),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L549"},"packages/core/src/page/manager/AbstractPageManager.ts:549")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_activateextensions"},"_","activateExtensions"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_activateExtensions"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Activate extensions for managed instance of controller."),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-9"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_activateextensions"},"_activateExtensions")),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L563"},"packages/core/src/page/manager/AbstractPageManager.ts:563")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_activatepagesource"},"_","activatePageSource"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_activatePageSource"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Activate page source so call activate method on controller and his\nextensions."),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-10"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_activatepagesource"},"_activatePageSource")),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L529"},"packages/core/src/page/manager/AbstractPageManager.ts:529")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_boundoncustomeventhandler"},"_","boundOnCustomEventHandler"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_boundOnCustomEventHandler"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Event listener for the custom DOM events used by the event bus,\nbound to this instance."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"CustomEvent"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")))),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/ClientPageManager.ts#L38"},"packages/core/src/page/manager/ClientPageManager.ts:38")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_clearcomponentstate"},"_","clearComponentState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_clearComponentState"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"options"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"The method clear state on current rendered component to DOM."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The current route options.")))),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-11"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_clearcomponentstate"},"_clearComponentState")),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L753"},"packages/core/src/page/manager/AbstractPageManager.ts:753")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_constructmanagedpagevalue"},"_","constructManagedPageValue"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_constructManagedPageValue"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"controller"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"view"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"route"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"params"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"controllerInstance"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"decoratedController"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"viewInstance"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controller")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"view")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"route")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.AbstractRoute"},(0,r.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routepathexpression"},(0,r.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controllerInstance")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Controller"},(0,r.kt)("inlineCode",{parentName:"a"},"Controller")),"<",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#pagestate"},(0,r.kt)("inlineCode",{parentName:"a"},"PageState")),", ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")),", ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#pagestate"},(0,r.kt)("inlineCode",{parentName:"a"},"PageState")),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"decoratedController")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ControllerDecorator"},(0,r.kt)("inlineCode",{parentName:"a"},"ControllerDecorator")),"<{}, {}, {}",">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"viewInstance")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("h4",{id:"inherited-from-12"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_constructmanagedpagevalue"},"_constructManagedPageValue")),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L245"},"packages/core/src/page/manager/AbstractPageManager.ts:245")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_deactivatecontroller"},"_","deactivateController"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_deactivateController"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Deactivate last managed instance of controller only If controller was\nactivated."),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-13"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_deactivatecontroller"},"_deactivateController")),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L691"},"packages/core/src/page/manager/AbstractPageManager.ts:691")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_deactivateextensions"},"_","deactivateExtensions"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_deactivateExtensions"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Deactivate extensions for last managed instance of controller only if\nthey were activated."),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-14"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_deactivateextensions"},"_deactivateExtensions")),(0,r.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L702"},"packages/core/src/page/manager/AbstractPageManager.ts:702")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_deactivatepagesource"},"_","deactivatePageSource"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_deactivatePageSource"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Deactivate page source so call deactivate method on controller and his\nextensions."),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-15"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_deactivatepagesource"},"_deactivatePageSource")),(0,r.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L677"},"packages/core/src/page/manager/AbstractPageManager.ts:677")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_destroycontroller"},"_","destroyController"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_destroyController"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Destroy last managed instance of controller."),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-16"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_destroycontroller"},"_destroyController")),(0,r.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L726"},"packages/core/src/page/manager/AbstractPageManager.ts:726")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_destroyextensions"},"_","destroyExtensions"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_destroyExtensions"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Destroy extensions for last managed instance of controller."),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-17"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_destroyextensions"},"_destroyExtensions")),(0,r.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L739"},"packages/core/src/page/manager/AbstractPageManager.ts:739")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_destroypagesource"},"_","destroyPageSource"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_destroyPageSource"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Destroy page source so call destroy method on controller and his\nextensions."),(0,r.kt)("h4",{id:"returns-13"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-18"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_destroypagesource"},"_destroyPageSource")),(0,r.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L714"},"packages/core/src/page/manager/AbstractPageManager.ts:714")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getinitialmanagedpage"},"_","getInitialManagedPage"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_getInitialManagedPage"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("p",null,"Clear value from managed page."),(0,r.kt)("h4",{id:"returns-14"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("h4",{id:"inherited-from-19"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_getinitialmanagedpage"},"_getInitialManagedPage")),(0,r.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L302"},"packages/core/src/page/manager/AbstractPageManager.ts:302")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getloadedcontrollerstate"},"_","getLoadedControllerState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_getLoadedControllerState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<{}",">"),(0,r.kt)("p",null,"Load controller state from managed instance of controller."),(0,r.kt)("h4",{id:"returns-15"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<{}",">"),(0,r.kt)("h4",{id:"inherited-from-20"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_getloadedcontrollerstate"},"_getLoadedControllerState")),(0,r.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L485"},"packages/core/src/page/manager/AbstractPageManager.ts:485")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getloadedextensionsstate"},"_","getLoadedExtensionsState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_getLoadedExtensionsState"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"controllerState?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,r.kt)("p",null,"Load extensions state from managed instance of controller."),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controllerState?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))))),(0,r.kt)("h4",{id:"returns-16"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,r.kt)("h4",{id:"inherited-from-21"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_getloadedextensionsstate"},"_getLoadedExtensionsState")),(0,r.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L501"},"packages/core/src/page/manager/AbstractPageManager.ts:501")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getupdatedcontrollerstate"},"_","getUpdatedControllerState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_getUpdatedControllerState"),"(): {} ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<{}",">"),(0,r.kt)("p",null,"Return updated controller state for current page controller."),(0,r.kt)("h4",{id:"returns-17"},"Returns"),(0,r.kt)("p",null,"{} ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<{}",">"),(0,r.kt)("h4",{id:"inherited-from-22"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_getupdatedcontrollerstate"},"_getUpdatedControllerState")),(0,r.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L621"},"packages/core/src/page/manager/AbstractPageManager.ts:621")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getupdatedextensionsstate"},"_","getUpdatedExtensionsState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_getUpdatedExtensionsState"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"controllerState?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,r.kt)("p",null,"Return updated extensions state for current page controller."),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controllerState?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))))),(0,r.kt)("h4",{id:"returns-18"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,r.kt)("h4",{id:"inherited-from-23"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_getupdatedextensionsstate"},"_getUpdatedExtensionsState")),(0,r.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L637"},"packages/core/src/page/manager/AbstractPageManager.ts:637")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_handleeventwithcontroller"},"_","handleEventWithController"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_handleEventWithController"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prefix"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"method"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"data"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Attempts to handle the currently processed event bus custom DOM event\nusing the current controller. The method returns ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the\nevent is handled by the controller."),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prefix")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"-")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"method")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the method the current controller should use to process the currently processed event bus custom DOM event.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The custom event's data.")))),(0,r.kt)("h4",{id:"returns-19"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the event has been handled by the\ncontroller, ",(0,r.kt)("inlineCode",{parentName:"p"},"false")," if the controller does not have a\nmethod for processing the event."),(0,r.kt)("h4",{id:"defined-in-29"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/ClientPageManager.ts#L215"},"packages/core/src/page/manager/ClientPageManager.ts:215")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_handleeventwithextensions"},"_","handleEventWithExtensions"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_handleEventWithExtensions"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prefix"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"method"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"data"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Attempts to handle the currently processed event bus custom DOM event\nusing the registered extensions of the current controller. The method\nreturns ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the event is handled by the controller."),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prefix")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"-")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"method")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the method the current controller should use to process the currently processed event bus custom DOM event.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The custom event's data.")))),(0,r.kt)("h4",{id:"returns-20"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the event has been handled by one of\nthe controller's extensions, ",(0,r.kt)("inlineCode",{parentName:"p"},"false")," if none of the\ncontroller's extensions has a method for processing the event."),(0,r.kt)("h4",{id:"defined-in-30"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/ClientPageManager.ts#L251"},"packages/core/src/page/manager/ClientPageManager.ts:251")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_hasonlyupdate"},"_","hasOnlyUpdate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_hasOnlyUpdate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"controller"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"view"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Return true if manager has to update last managed controller and view."),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controller")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"view")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions")))))),(0,r.kt)("h4",{id:"returns-21"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"inherited-from-24"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_hasonlyupdate"},"_hasOnlyUpdate")),(0,r.kt)("h4",{id:"defined-in-31"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L769"},"packages/core/src/page/manager/AbstractPageManager.ts:769")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_initcontroller"},"_","initController"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_initController"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Initializes managed instance of controller with the provided parameters."),(0,r.kt)("h4",{id:"returns-22"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-25"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_initcontroller"},"_initController")),(0,r.kt)("h4",{id:"defined-in-32"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L398"},"packages/core/src/page/manager/AbstractPageManager.ts:398")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_initextensions"},"_","initExtensions"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_initExtensions"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Initialize extensions for managed instance of controller with the\nprovided parameters."),(0,r.kt)("h4",{id:"returns-23"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-26"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_initextensions"},"_initExtensions")),(0,r.kt)("h4",{id:"defined-in-33"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L413"},"packages/core/src/page/manager/AbstractPageManager.ts:413")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_initpagesource"},"_","initPageSource"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_initPageSource"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Initialize page source so call init method on controller and his\nextensions."),(0,r.kt)("h4",{id:"returns-24"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-27"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_initpagesource"},"_initPageSource")),(0,r.kt)("h4",{id:"defined-in-34"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L383"},"packages/core/src/page/manager/AbstractPageManager.ts:383")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_loadpagesource"},"_","loadPageSource"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_loadPageSource"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,r.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,r.kt)("p",null,"Load page source so call load method on controller and his extensions.\nMerge loaded state and render it."),(0,r.kt)("h4",{id:"returns-25"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,r.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,r.kt)("h4",{id:"inherited-from-28"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_loadpagesource"},"_loadPageSource")),(0,r.kt)("h4",{id:"defined-in-35"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L443"},"packages/core/src/page/manager/AbstractPageManager.ts:443")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_onchangestatehandler"},"_","onChangeStateHandler"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_onChangeStateHandler"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"state"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"On change event handler set state to view."),(0,r.kt)("h4",{id:"parameters-10"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))))),(0,r.kt)("h4",{id:"returns-26"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-36"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/ClientPageManager.ts#L276"},"packages/core/src/page/manager/ClientPageManager.ts:276")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_oncustomeventhandler"},"_","onCustomEventHandler"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_onCustomEventHandler"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Custom DOM event handler."),(0,r.kt)("p",null,"The handler invokes the event listener in the active controller, if such\nlistener is present. The name of the controller's listener method is\ncreated by turning the first symbol of the event's name to upper case,\nand then prefixing the result with the 'on' prefix."),(0,r.kt)("p",null,"For example: for an event named 'toggle' the controller's listener\nwould be named 'onToggle'."),(0,r.kt)("p",null,"The controller's listener will be invoked with the event's data as an\nargument."),(0,r.kt)("h4",{id:"parameters-11"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"CustomEvent"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The encountered event bus DOM event.")))),(0,r.kt)("h4",{id:"returns-27"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-37"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/ClientPageManager.ts#L151"},"packages/core/src/page/manager/ClientPageManager.ts:151")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_parsecustomevent"},"_","parseCustomEvent"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_parseCustomEvent"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"Extracts the details of the provided event bus custom DOM event, along\nwith the expected name of the current controller's method for\nintercepting the event."),(0,r.kt)("h4",{id:"parameters-12"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"CustomEvent"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The encountered event bus custom DOM event.")))),(0,r.kt)("h4",{id:"returns-28"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"The event's\ndetails."),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"eventName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"method")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prefix")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"defined-in-38"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/ClientPageManager.ts#L188"},"packages/core/src/page/manager/ClientPageManager.ts:188")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_runpostmanagehandlers"},"_","runPostManageHandlers"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_runPostManageHandlers"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"previousManagedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"action"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"parameters-13"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"previousManagedPage")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"action")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.PageAction"},(0,r.kt)("inlineCode",{parentName:"a"},"PageAction")))))),(0,r.kt)("h4",{id:"returns-29"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"inherited-from-29"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_runpostmanagehandlers"},"_runPostManageHandlers")),(0,r.kt)("h4",{id:"defined-in-39"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L809"},"packages/core/src/page/manager/AbstractPageManager.ts:809")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_runpremanagehandlers"},"_","runPreManageHandlers"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_runPreManageHandlers"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"actualManagedPage"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"action"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"parameters-14"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"actualManagedPage")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"action")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.PageAction"},(0,r.kt)("inlineCode",{parentName:"a"},"PageAction")))))),(0,r.kt)("h4",{id:"returns-30"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"inherited-from-30"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_runpremanagehandlers"},"_runPreManageHandlers")),(0,r.kt)("h4",{id:"defined-in-40"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L788"},"packages/core/src/page/manager/AbstractPageManager.ts:788")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_setrestrictedpagestatemanager"},"_","setRestrictedPageStateManager"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_setRestrictedPageStateManager"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"extension"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"extensionState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Set page state manager to extension which has restricted rights to set\nglobal state."),(0,r.kt)("h4",{id:"parameters-15"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"extension")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<{}, {}, {}",">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"extensionState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))))),(0,r.kt)("h4",{id:"returns-31"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-31"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_setrestrictedpagestatemanager"},"_setRestrictedPageStateManager")),(0,r.kt)("h4",{id:"defined-in-41"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L342"},"packages/core/src/page/manager/AbstractPageManager.ts:342")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_storemanagedpagesnapshot"},"_","storeManagedPageSnapshot"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_storeManagedPageSnapshot"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Creates a cloned version of currently managed page and stores it in\na helper property.\nSnapshot is used in manager handlers to easily determine differences\nbetween the current and the previous state."),(0,r.kt)("h4",{id:"returns-32"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-32"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_storemanagedpagesnapshot"},"_storeManagedPageSnapshot")),(0,r.kt)("h4",{id:"defined-in-42"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L281"},"packages/core/src/page/manager/AbstractPageManager.ts:281")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_stripmanagedpagevalueforpublic"},"_","stripManagedPageValueForPublic"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_stripManagedPageValueForPublic"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"value"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"Removes properties we do not want to propagate outside of the page manager"),(0,r.kt)("h4",{id:"parameters-16"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#managedpage"},(0,r.kt)("inlineCode",{parentName:"a"},"ManagedPage"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The managed page object to strip down")))),(0,r.kt)("h4",{id:"returns-33"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controller")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"route")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.AbstractRoute"},(0,r.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routepathexpression"},(0,r.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"view")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"inherited-from-33"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_stripmanagedpagevalueforpublic"},"_stripManagedPageValueForPublic")),(0,r.kt)("h4",{id:"defined-in-43"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L332"},"packages/core/src/page/manager/AbstractPageManager.ts:332")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_switchtopagestatemanager"},"_","switchToPageStateManager"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_switchToPageStateManager"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Iterates over extensions of current controller and switches each one to\npageStateManager and clears their partial state."),(0,r.kt)("h4",{id:"returns-34"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-34"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_switchtopagestatemanager"},"_switchToPageStateManager")),(0,r.kt)("h4",{id:"defined-in-44"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L430"},"packages/core/src/page/manager/AbstractPageManager.ts:430")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_switchtopagestatemanagerafterloaded"},"_","switchToPageStateManagerAfterLoaded"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_switchToPageStateManagerAfterLoaded"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"extension"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"extensionState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"For defined extension switches to pageStageManager and clears partial state\nafter extension state is loaded."),(0,r.kt)("h4",{id:"parameters-17"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"extension")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<{}, {}, {}",">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"extensionState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))))),(0,r.kt)("h4",{id:"returns-35"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-35"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_switchtopagestatemanagerafterloaded"},"_switchToPageStateManagerAfterLoaded")),(0,r.kt)("h4",{id:"defined-in-45"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L363"},"packages/core/src/page/manager/AbstractPageManager.ts:363")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_updatepagesource"},"_","updatePageSource"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_updatePageSource"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,r.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,r.kt)("p",null,"Update page source so call update method on controller and his\nextensions. Merge updated state and render it."),(0,r.kt)("h4",{id:"returns-36"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,r.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,r.kt)("h4",{id:"inherited-from-36"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#_updatepagesource"},"_updatePageSource")),(0,r.kt)("h4",{id:"defined-in-46"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L580"},"packages/core/src/page/manager/AbstractPageManager.ts:580")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"destroy"},"destroy"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"destroy"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Finalization callback, called when the page manager is being discarded.\nThis usually happens when the page is hot-reloaded at the client side."),(0,r.kt)("h4",{id:"returns-37"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"overrides-1"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#destroy"},"destroy")),(0,r.kt)("h4",{id:"defined-in-47"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/ClientPageManager.ts#L126"},"packages/core/src/page/manager/ClientPageManager.ts:126")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getviewcontroller"},"getViewController"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"getViewController"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"route"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<{ ",(0,r.kt)("inlineCode",{parentName:"p"},"controller"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController"))," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"view"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routeview"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteView"))," }",">"),(0,r.kt)("h4",{id:"parameters-18"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"route")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.AbstractRoute"},(0,r.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routepathexpression"},(0,r.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">")))),(0,r.kt)("h4",{id:"returns-38"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<{ ",(0,r.kt)("inlineCode",{parentName:"p"},"controller"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController"))," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"view"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routeview"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteView"))," }",">"),(0,r.kt)("h4",{id:"inherited-from-37"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#getviewcontroller"},"getViewController")),(0,r.kt)("h4",{id:"defined-in-48"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L833"},"packages/core/src/page/manager/AbstractPageManager.ts:833")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"init"},"init"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"init"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Initializes the page manager."),(0,r.kt)("h4",{id:"returns-39"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-2"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#init"},"init")),(0,r.kt)("h4",{id:"defined-in-49"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/ClientPageManager.ts#L95"},"packages/core/src/page/manager/ClientPageManager.ts:95")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"manage"},"manage"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"manage"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"\xabdestructured\xbb"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,r.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,r.kt)("p",null,"Starts to manage the provided controller and its view. The manager\nstops the management of any previously managed controller and view."),(0,r.kt)("p",null,"The controller and view will be initialized and rendered either into the\nUI (at the client-side) or to the response to send to the client (at the\nserver-side)."),(0,r.kt)("h4",{id:"parameters-19"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"\xabdestructured\xbb")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#manageargs"},(0,r.kt)("inlineCode",{parentName:"a"},"ManageArgs")))))),(0,r.kt)("h4",{id:"returns-40"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,r.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,r.kt)("p",null,"A promise that will resolve to information about the rendered page.\nThe ",(0,r.kt)("inlineCode",{parentName:"p"},"status")," will contain the HTTP status code to send to the\nclient (at the server side) or determine the type of error page\nto navigate to (at the client side)."),(0,r.kt)("h4",{id:"overrides-3"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#manage"},"manage")),(0,r.kt)("h4",{id:"defined-in-50"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/ClientPageManager.ts#L109"},"packages/core/src/page/manager/ClientPageManager.ts:109")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"postmanage"},"postManage"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"postManage"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called by router after currently managed route is resolved."),(0,r.kt)("h4",{id:"returns-41"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-38"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#postmanage"},"postManage")),(0,r.kt)("h4",{id:"defined-in-51"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L223"},"packages/core/src/page/manager/AbstractPageManager.ts:223")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"premanage"},"preManage"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"preManage"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Pre manage handler, should be called and awaited before tryint to handle\nnew route handler. This pre manage takes care of canceling any currently\nexecuted route handlers and returns promise which is resolved when previous\npage finished loading (even if it got canceled)."),(0,r.kt)("h4",{id:"returns-42"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"inherited-from-39"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractPageManager#premanage"},"preManage")),(0,r.kt)("h4",{id:"defined-in-52"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/AbstractPageManager.ts#L123"},"packages/core/src/page/manager/AbstractPageManager.ts:123")))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/18ba1c5e.e9f7e908.js b/assets/js/18ba1c5e.cfbb1091.js similarity index 90% rename from assets/js/18ba1c5e.e9f7e908.js rename to assets/js/18ba1c5e.cfbb1091.js index 2451e6ea1d..26e7dbc881 100644 --- a/assets/js/18ba1c5e.e9f7e908.js +++ b/assets/js/18ba1c5e.cfbb1091.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[8087],{3905:(e,t,i)=>{i.d(t,{Zo:()=>s,kt:()=>c});var n=i(7294);function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function l(e){for(var t=1;t=0||(a[i]=e[i]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}var d=n.createContext({}),m=function(e){var t=n.useContext(d),i=t;return e&&(i="function"==typeof e?e(t):l(l({},t),e)),i},s=function(e){var t=m(e.components);return n.createElement(d.Provider,{value:t},e.children)},o="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},k=n.forwardRef((function(e,t){var i=e.components,a=e.mdxType,r=e.originalType,d=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),o=m(i),k=a,c=o["".concat(d,".").concat(k)]||o[k]||f[k]||r;return i?n.createElement(c,l(l({ref:t},s),{},{components:i})):n.createElement(c,l({ref:t},s))}));function c(e,t){var i=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=i.length,l=new Array(r);l[0]=k;var p={};for(var d in t)hasOwnProperty.call(t,d)&&(p[d]=t[d]);p.originalType=e,p[o]="string"==typeof e?e:a,l[1]=p;for(var m=2;m{i.r(t),i.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>f,frontMatter:()=>r,metadata:()=>p,toc:()=>m});var n=i(5773),a=(i(7294),i(3905));const r={id:"ima_cli.ImaConfigurationContext",title:"Interface: ImaConfigurationContext",sidebar_label:"@ima/cli.ImaConfigurationContext",custom_edit_url:null},l=void 0,p={unversionedId:"api/interfaces/ima_cli.ImaConfigurationContext",id:"api/interfaces/ima_cli.ImaConfigurationContext",title:"Interface: ImaConfigurationContext",description:"@ima/cli.ImaConfigurationContext",source:"@site/../docs/api/interfaces/ima_cli.ImaConfigurationContext.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_cli.ImaConfigurationContext",permalink:"/api/interfaces/ima_cli.ImaConfigurationContext",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_cli.ImaConfigurationContext",title:"Interface: ImaConfigurationContext",sidebar_label:"@ima/cli.ImaConfigurationContext",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/cli.ImaCliPlugin",permalink:"/api/interfaces/ima_cli.ImaCliPlugin"},next:{title:"@ima/core.AppEnvironment",permalink:"/api/interfaces/ima_core.AppEnvironment"}},d={},m=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:"appDir",id:"appdir",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"clean",id:"clean",level:3},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"clearCache",id:"clearcache",level:3},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"command",id:"command",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"devtool",id:"devtool",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"environment",id:"environment",level:3},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"forceLegacy",id:"forcelegacy",level:3},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"forceSPA",id:"forcespa",level:3},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"hostname",id:"hostname",level:3},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"ignoreWarnings",id:"ignorewarnings",level:3},{value:"Inherited from",id:"inherited-from-7",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"imaEnvironment",id:"imaenvironment",level:3},{value:"Defined in",id:"defined-in-10",level:4},{value:"inspect",id:"inspect",level:3},{value:"Inherited from",id:"inherited-from-8",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"isClient",id:"isclient",level:3},{value:"Defined in",id:"defined-in-12",level:4},{value:"isClientES",id:"isclientes",level:3},{value:"Defined in",id:"defined-in-13",level:4},{value:"isDevEnv",id:"isdevenv",level:3},{value:"Defined in",id:"defined-in-14",level:4},{value:"isServer",id:"isserver",level:3},{value:"Defined in",id:"defined-in-15",level:4},{value:"lazyServer",id:"lazyserver",level:3},{value:"Inherited from",id:"inherited-from-9",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"legacy",id:"legacy",level:3},{value:"Inherited from",id:"inherited-from-10",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"lessGlobalsPath",id:"lessglobalspath",level:3},{value:"Defined in",id:"defined-in-18",level:4},{value:"mode",id:"mode",level:3},{value:"Defined in",id:"defined-in-19",level:4},{value:"name",id:"name",level:3},{value:"Defined in",id:"defined-in-20",level:4},{value:"open",id:"open",level:3},{value:"Inherited from",id:"inherited-from-11",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"openUrl",id:"openurl",level:3},{value:"Inherited from",id:"inherited-from-12",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"outputFolders",id:"outputfolders",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Defined in",id:"defined-in-23",level:4},{value:"port",id:"port",level:3},{value:"Inherited from",id:"inherited-from-13",level:4},{value:"Defined in",id:"defined-in-24",level:4},{value:"processCss",id:"processcss",level:3},{value:"Defined in",id:"defined-in-25",level:4},{value:"profile",id:"profile",level:3},{value:"Inherited from",id:"inherited-from-14",level:4},{value:"Defined in",id:"defined-in-26",level:4},{value:"publicUrl",id:"publicurl",level:3},{value:"Inherited from",id:"inherited-from-15",level:4},{value:"Defined in",id:"defined-in-27",level:4},{value:"reactRefresh",id:"reactrefresh",level:3},{value:"Inherited from",id:"inherited-from-16",level:4},{value:"Defined in",id:"defined-in-28",level:4},{value:"rootDir",id:"rootdir",level:3},{value:"Inherited from",id:"inherited-from-17",level:4},{value:"Defined in",id:"defined-in-29",level:4},{value:"targets",id:"targets",level:3},{value:"Defined in",id:"defined-in-30",level:4},{value:"typescript",id:"typescript",level:3},{value:"Type declaration",id:"type-declaration-1",level:4},{value:"Defined in",id:"defined-in-31",level:4},{value:"useHMR",id:"usehmr",level:3},{value:"Defined in",id:"defined-in-32",level:4},{value:"useSourceMaps",id:"usesourcemaps",level:3},{value:"Defined in",id:"defined-in-33",level:4},{value:"verbose",id:"verbose",level:3},{value:"Inherited from",id:"inherited-from-18",level:4},{value:"Defined in",id:"defined-in-34",level:4},{value:"writeToDisk",id:"writetodisk",level:3},{value:"Inherited from",id:"inherited-from-19",level:4},{value:"Defined in",id:"defined-in-35",level:4}],s={toc:m},o="wrapper";function f(e){let{components:t,...i}=e;return(0,a.kt)(o,(0,n.Z)({},s,i,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/modules/ima_cli"},"@ima/cli"),".ImaConfigurationContext"),(0,a.kt)("p",null,"CLI arguments merged with concrete configuration context."),(0,a.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},(0,a.kt)("inlineCode",{parentName:"a"},"ImaCliArgs"))),(0,a.kt)("p",{parentName:"li"},"\u21b3 ",(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("inlineCode",{parentName:"strong"},"ImaConfigurationContext"))))),(0,a.kt)("h2",{id:"properties"},"Properties"),(0,a.kt)("h3",{id:"appdir"},"appDir"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"appDir"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"defined-in"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L74"},"types.ts:74")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"clean"},"clean"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"clean"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#clean"},"clean")),(0,a.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L33"},"types.ts:33")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"clearcache"},"clearCache"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"clearCache"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#clearcache"},"clearCache")),(0,a.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L34"},"types.ts:34")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"command"},"command"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"command"),": ",(0,a.kt)("a",{parentName:"p",href:"/api/modules/ima_cli#imaclicommand"},(0,a.kt)("inlineCode",{parentName:"a"},"ImaCliCommand"))),(0,a.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#command"},"command")),(0,a.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L32"},"types.ts:32")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"devtool"},"devtool"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"devtool"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"p"},"false")),(0,a.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L81"},"types.ts:81")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"environment"},"environment"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"environment"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#environment"},"environment")),(0,a.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L46"},"types.ts:46")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"forcelegacy"},"forceLegacy"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"forceLegacy"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#forcelegacy"},"forceLegacy")),(0,a.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L49"},"types.ts:49")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"forcespa"},"forceSPA"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"forceSPA"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#forcespa"},"forceSPA")),(0,a.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L41"},"types.ts:41")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"hostname"},"hostname"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"hostname"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#hostname"},"hostname")),(0,a.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L44"},"types.ts:44")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"ignorewarnings"},"ignoreWarnings"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"ignoreWarnings"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-7"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#ignorewarnings"},"ignoreWarnings")),(0,a.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L37"},"types.ts:37")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"imaenvironment"},"imaEnvironment"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"imaEnvironment"),": ",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Environment"},(0,a.kt)("inlineCode",{parentName:"a"},"Environment"))),(0,a.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L73"},"types.ts:73")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"inspect"},"inspect"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"inspect"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-8"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#inspect"},"inspect")),(0,a.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L36"},"types.ts:36")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"isclient"},"isClient"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"isClient"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L59"},"types.ts:59")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"isclientes"},"isClientES"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"isClientES"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L60"},"types.ts:60")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"isdevenv"},"isDevEnv"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"isDevEnv"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L79"},"types.ts:79")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"isserver"},"isServer"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"isServer"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L58"},"types.ts:58")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"lazyserver"},"lazyServer"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"lazyServer"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-9"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#lazyserver"},"lazyServer")),(0,a.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L50"},"types.ts:50")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"legacy"},"legacy"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"legacy"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-10"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#legacy"},"legacy")),(0,a.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L40"},"types.ts:40")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"lessglobalspath"},"lessGlobalsPath"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"lessGlobalsPath"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L75"},"types.ts:75")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"mode"},"mode"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"mode"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"p"},'"development"')," ","|"," ",(0,a.kt)("inlineCode",{parentName:"p"},'"production"')," ","|"," ",(0,a.kt)("inlineCode",{parentName:"p"},'"none"')),(0,a.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L76"},"types.ts:76")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"name"},"name"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"name"),": ",(0,a.kt)("inlineCode",{parentName:"p"},'"server"')," ","|"," ",(0,a.kt)("inlineCode",{parentName:"p"},'"client"')," ","|"," ",(0,a.kt)("inlineCode",{parentName:"p"},'"client.es"')),(0,a.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L57"},"types.ts:57")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"open"},"open"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"open"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-11"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#open"},"open")),(0,a.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L38"},"types.ts:38")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"openurl"},"openUrl"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"openUrl"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"inherited-from-12"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#openurl"},"openUrl")),(0,a.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L39"},"types.ts:39")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"outputfolders"},"outputFolders"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"outputFolders"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"Object")),(0,a.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"css")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"hot")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"js")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"media")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"public")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string"))))),(0,a.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L62"},"types.ts:62")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"port"},"port"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"port"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"number")),(0,a.kt)("h4",{id:"inherited-from-13"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#port"},"port")),(0,a.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L43"},"types.ts:43")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"processcss"},"processCss"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"processCss"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L61"},"types.ts:61")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"profile"},"profile"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"profile"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-14"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#profile"},"profile")),(0,a.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L42"},"types.ts:42")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"publicurl"},"publicUrl"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"publicUrl"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"inherited-from-15"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#publicurl"},"publicUrl")),(0,a.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L45"},"types.ts:45")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"reactrefresh"},"reactRefresh"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"reactRefresh"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-16"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#reactrefresh"},"reactRefresh")),(0,a.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L48"},"types.ts:48")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"rootdir"},"rootDir"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"rootDir"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"inherited-from-17"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#rootdir"},"rootDir")),(0,a.kt)("h4",{id:"defined-in-29"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L31"},"types.ts:31")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"targets"},"targets"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"targets"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string"),"[]"),(0,a.kt)("h4",{id:"defined-in-30"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L80"},"types.ts:80")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"typescript"},"typescript"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"typescript"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"Object")),(0,a.kt)("h4",{id:"type-declaration-1"},"Type declaration"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"enabled")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"tsconfigPath")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"td"},"string"))))),(0,a.kt)("h4",{id:"defined-in-31"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L69"},"types.ts:69")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"usehmr"},"useHMR"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"useHMR"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"defined-in-32"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L77"},"types.ts:77")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"usesourcemaps"},"useSourceMaps"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"useSourceMaps"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"defined-in-33"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L78"},"types.ts:78")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"verbose"},"verbose"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"verbose"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-18"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#verbose"},"verbose")),(0,a.kt)("h4",{id:"defined-in-34"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L35"},"types.ts:35")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"writetodisk"},"writeToDisk"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"writeToDisk"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-19"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#writetodisk"},"writeToDisk")),(0,a.kt)("h4",{id:"defined-in-35"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/cli/src/types.ts#L47"},"types.ts:47")))}f.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[8087],{3905:(e,t,i)=>{i.d(t,{Zo:()=>s,kt:()=>c});var n=i(7294);function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function l(e){for(var t=1;t=0||(a[i]=e[i]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}var d=n.createContext({}),m=function(e){var t=n.useContext(d),i=t;return e&&(i="function"==typeof e?e(t):l(l({},t),e)),i},s=function(e){var t=m(e.components);return n.createElement(d.Provider,{value:t},e.children)},o="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var i=e.components,a=e.mdxType,r=e.originalType,d=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),o=m(i),f=a,c=o["".concat(d,".").concat(f)]||o[f]||k[f]||r;return i?n.createElement(c,l(l({ref:t},s),{},{components:i})):n.createElement(c,l({ref:t},s))}));function c(e,t){var i=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=i.length,l=new Array(r);l[0]=f;var p={};for(var d in t)hasOwnProperty.call(t,d)&&(p[d]=t[d]);p.originalType=e,p[o]="string"==typeof e?e:a,l[1]=p;for(var m=2;m{i.r(t),i.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>k,frontMatter:()=>r,metadata:()=>p,toc:()=>m});var n=i(5773),a=(i(7294),i(3905));const r={id:"ima_cli.ImaConfigurationContext",title:"Interface: ImaConfigurationContext",sidebar_label:"@ima/cli.ImaConfigurationContext",custom_edit_url:null},l=void 0,p={unversionedId:"api/interfaces/ima_cli.ImaConfigurationContext",id:"api/interfaces/ima_cli.ImaConfigurationContext",title:"Interface: ImaConfigurationContext",description:"@ima/cli.ImaConfigurationContext",source:"@site/../docs/api/interfaces/ima_cli.ImaConfigurationContext.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_cli.ImaConfigurationContext",permalink:"/api/interfaces/ima_cli.ImaConfigurationContext",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_cli.ImaConfigurationContext",title:"Interface: ImaConfigurationContext",sidebar_label:"@ima/cli.ImaConfigurationContext",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/cli.ImaCliPlugin",permalink:"/api/interfaces/ima_cli.ImaCliPlugin"},next:{title:"@ima/core.AppEnvironment",permalink:"/api/interfaces/ima_core.AppEnvironment"}},d={},m=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:"appDir",id:"appdir",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"clean",id:"clean",level:3},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"clearCache",id:"clearcache",level:3},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"command",id:"command",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"devtool",id:"devtool",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"environment",id:"environment",level:3},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"forceLegacy",id:"forcelegacy",level:3},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"forceSPA",id:"forcespa",level:3},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"hostname",id:"hostname",level:3},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"ignoreWarnings",id:"ignorewarnings",level:3},{value:"Inherited from",id:"inherited-from-7",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"imaEnvironment",id:"imaenvironment",level:3},{value:"Defined in",id:"defined-in-10",level:4},{value:"inspect",id:"inspect",level:3},{value:"Inherited from",id:"inherited-from-8",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"isClient",id:"isclient",level:3},{value:"Defined in",id:"defined-in-12",level:4},{value:"isClientES",id:"isclientes",level:3},{value:"Defined in",id:"defined-in-13",level:4},{value:"isDevEnv",id:"isdevenv",level:3},{value:"Defined in",id:"defined-in-14",level:4},{value:"isServer",id:"isserver",level:3},{value:"Defined in",id:"defined-in-15",level:4},{value:"lazyServer",id:"lazyserver",level:3},{value:"Inherited from",id:"inherited-from-9",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"legacy",id:"legacy",level:3},{value:"Inherited from",id:"inherited-from-10",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"lessGlobalsPath",id:"lessglobalspath",level:3},{value:"Defined in",id:"defined-in-18",level:4},{value:"mode",id:"mode",level:3},{value:"Defined in",id:"defined-in-19",level:4},{value:"name",id:"name",level:3},{value:"Defined in",id:"defined-in-20",level:4},{value:"open",id:"open",level:3},{value:"Inherited from",id:"inherited-from-11",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"openUrl",id:"openurl",level:3},{value:"Inherited from",id:"inherited-from-12",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"outputFolders",id:"outputfolders",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Defined in",id:"defined-in-23",level:4},{value:"port",id:"port",level:3},{value:"Inherited from",id:"inherited-from-13",level:4},{value:"Defined in",id:"defined-in-24",level:4},{value:"processCss",id:"processcss",level:3},{value:"Defined in",id:"defined-in-25",level:4},{value:"profile",id:"profile",level:3},{value:"Inherited from",id:"inherited-from-14",level:4},{value:"Defined in",id:"defined-in-26",level:4},{value:"publicUrl",id:"publicurl",level:3},{value:"Inherited from",id:"inherited-from-15",level:4},{value:"Defined in",id:"defined-in-27",level:4},{value:"reactRefresh",id:"reactrefresh",level:3},{value:"Inherited from",id:"inherited-from-16",level:4},{value:"Defined in",id:"defined-in-28",level:4},{value:"rootDir",id:"rootdir",level:3},{value:"Inherited from",id:"inherited-from-17",level:4},{value:"Defined in",id:"defined-in-29",level:4},{value:"targets",id:"targets",level:3},{value:"Defined in",id:"defined-in-30",level:4},{value:"typescript",id:"typescript",level:3},{value:"Type declaration",id:"type-declaration-1",level:4},{value:"Defined in",id:"defined-in-31",level:4},{value:"useHMR",id:"usehmr",level:3},{value:"Defined in",id:"defined-in-32",level:4},{value:"useSourceMaps",id:"usesourcemaps",level:3},{value:"Defined in",id:"defined-in-33",level:4},{value:"verbose",id:"verbose",level:3},{value:"Inherited from",id:"inherited-from-18",level:4},{value:"Defined in",id:"defined-in-34",level:4},{value:"writeToDisk",id:"writetodisk",level:3},{value:"Inherited from",id:"inherited-from-19",level:4},{value:"Defined in",id:"defined-in-35",level:4}],s={toc:m},o="wrapper";function k(e){let{components:t,...i}=e;return(0,a.kt)(o,(0,n.Z)({},s,i,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/modules/ima_cli"},"@ima/cli"),".ImaConfigurationContext"),(0,a.kt)("p",null,"CLI arguments merged with concrete configuration context."),(0,a.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},(0,a.kt)("inlineCode",{parentName:"a"},"ImaCliArgs"))),(0,a.kt)("p",{parentName:"li"},"\u21b3 ",(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("inlineCode",{parentName:"strong"},"ImaConfigurationContext"))))),(0,a.kt)("h2",{id:"properties"},"Properties"),(0,a.kt)("h3",{id:"appdir"},"appDir"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"appDir"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"defined-in"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L74"},"types.ts:74")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"clean"},"clean"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"clean"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#clean"},"clean")),(0,a.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L33"},"types.ts:33")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"clearcache"},"clearCache"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"clearCache"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#clearcache"},"clearCache")),(0,a.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L34"},"types.ts:34")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"command"},"command"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"command"),": ",(0,a.kt)("a",{parentName:"p",href:"/api/modules/ima_cli#imaclicommand"},(0,a.kt)("inlineCode",{parentName:"a"},"ImaCliCommand"))),(0,a.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#command"},"command")),(0,a.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L32"},"types.ts:32")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"devtool"},"devtool"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"devtool"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"p"},"false")),(0,a.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L81"},"types.ts:81")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"environment"},"environment"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"environment"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#environment"},"environment")),(0,a.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L46"},"types.ts:46")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"forcelegacy"},"forceLegacy"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"forceLegacy"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#forcelegacy"},"forceLegacy")),(0,a.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L49"},"types.ts:49")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"forcespa"},"forceSPA"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"forceSPA"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#forcespa"},"forceSPA")),(0,a.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L41"},"types.ts:41")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"hostname"},"hostname"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"hostname"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#hostname"},"hostname")),(0,a.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L44"},"types.ts:44")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"ignorewarnings"},"ignoreWarnings"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"ignoreWarnings"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-7"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#ignorewarnings"},"ignoreWarnings")),(0,a.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L37"},"types.ts:37")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"imaenvironment"},"imaEnvironment"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"imaEnvironment"),": ",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Environment"},(0,a.kt)("inlineCode",{parentName:"a"},"Environment"))),(0,a.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L73"},"types.ts:73")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"inspect"},"inspect"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"inspect"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-8"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#inspect"},"inspect")),(0,a.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L36"},"types.ts:36")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"isclient"},"isClient"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"isClient"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L59"},"types.ts:59")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"isclientes"},"isClientES"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"isClientES"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L60"},"types.ts:60")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"isdevenv"},"isDevEnv"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"isDevEnv"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L79"},"types.ts:79")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"isserver"},"isServer"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"isServer"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L58"},"types.ts:58")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"lazyserver"},"lazyServer"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"lazyServer"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-9"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#lazyserver"},"lazyServer")),(0,a.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L50"},"types.ts:50")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"legacy"},"legacy"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"legacy"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-10"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#legacy"},"legacy")),(0,a.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L40"},"types.ts:40")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"lessglobalspath"},"lessGlobalsPath"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"lessGlobalsPath"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L75"},"types.ts:75")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"mode"},"mode"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"mode"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"p"},'"development"')," ","|"," ",(0,a.kt)("inlineCode",{parentName:"p"},'"production"')," ","|"," ",(0,a.kt)("inlineCode",{parentName:"p"},'"none"')),(0,a.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L76"},"types.ts:76")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"name"},"name"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"name"),": ",(0,a.kt)("inlineCode",{parentName:"p"},'"server"')," ","|"," ",(0,a.kt)("inlineCode",{parentName:"p"},'"client"')," ","|"," ",(0,a.kt)("inlineCode",{parentName:"p"},'"client.es"')),(0,a.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L57"},"types.ts:57")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"open"},"open"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"open"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-11"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#open"},"open")),(0,a.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L38"},"types.ts:38")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"openurl"},"openUrl"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"openUrl"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"inherited-from-12"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#openurl"},"openUrl")),(0,a.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L39"},"types.ts:39")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"outputfolders"},"outputFolders"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"outputFolders"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"Object")),(0,a.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"css")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"hot")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"js")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"media")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"public")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string"))))),(0,a.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L62"},"types.ts:62")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"port"},"port"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"port"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"number")),(0,a.kt)("h4",{id:"inherited-from-13"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#port"},"port")),(0,a.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L43"},"types.ts:43")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"processcss"},"processCss"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"processCss"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L61"},"types.ts:61")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"profile"},"profile"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"profile"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-14"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#profile"},"profile")),(0,a.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L42"},"types.ts:42")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"publicurl"},"publicUrl"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"publicUrl"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"inherited-from-15"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#publicurl"},"publicUrl")),(0,a.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L45"},"types.ts:45")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"reactrefresh"},"reactRefresh"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"reactRefresh"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-16"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#reactrefresh"},"reactRefresh")),(0,a.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L48"},"types.ts:48")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"rootdir"},"rootDir"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"rootDir"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string")),(0,a.kt)("h4",{id:"inherited-from-17"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#rootdir"},"rootDir")),(0,a.kt)("h4",{id:"defined-in-29"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L31"},"types.ts:31")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"targets"},"targets"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"targets"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string"),"[]"),(0,a.kt)("h4",{id:"defined-in-30"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L80"},"types.ts:80")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"typescript"},"typescript"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"typescript"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"Object")),(0,a.kt)("h4",{id:"type-declaration-1"},"Type declaration"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"enabled")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"tsconfigPath")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"td"},"string"))))),(0,a.kt)("h4",{id:"defined-in-31"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L69"},"types.ts:69")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"usehmr"},"useHMR"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"useHMR"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"defined-in-32"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L77"},"types.ts:77")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"usesourcemaps"},"useSourceMaps"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"useSourceMaps"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"defined-in-33"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L78"},"types.ts:78")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"verbose"},"verbose"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"verbose"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-18"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#verbose"},"verbose")),(0,a.kt)("h4",{id:"defined-in-34"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L35"},"types.ts:35")),(0,a.kt)("hr",null),(0,a.kt)("h3",{id:"writetodisk"},"writeToDisk"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,a.kt)("strong",{parentName:"p"},"writeToDisk"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"boolean")),(0,a.kt)("h4",{id:"inherited-from-19"},"Inherited from"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs"},"ImaCliArgs"),".",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_cli.ImaCliArgs#writetodisk"},"writeToDisk")),(0,a.kt)("h4",{id:"defined-in-35"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/cli/src/types.ts#L47"},"types.ts:47")))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/192c90c3.4fa629f3.js b/assets/js/192c90c3.9b854362.js similarity index 96% rename from assets/js/192c90c3.4fa629f3.js rename to assets/js/192c90c3.9b854362.js index fd41d79562..7d09dc8277 100644 --- a/assets/js/192c90c3.4fa629f3.js +++ b/assets/js/192c90c3.9b854362.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[7652],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>u});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),s=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(o.Provider,{value:t},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),m=s(n),k=r,u=m["".concat(o,".").concat(k)]||m[k]||c[k]||i;return n?a.createElement(u,l(l({ref:t},d),{},{components:n})):a.createElement(u,l({ref:t},d))}));function u(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=k;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[m]="string"==typeof e?e:r,l[1]=p;for(var s=2;s{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>c,frontMatter:()=>i,metadata:()=>p,toc:()=>s});var a=n(5773),r=(n(7294),n(3905));const i={id:"ima_core.ComponentUtils",title:"Class: ComponentUtils",sidebar_label:"@ima/core.ComponentUtils",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_core.ComponentUtils",id:"api/classes/ima_core.ComponentUtils",title:"Class: ComponentUtils",description:"@ima/core.ComponentUtils",source:"@site/../docs/api/classes/ima_core.ComponentUtils.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.ComponentUtils",permalink:"/api/classes/ima_core.ComponentUtils",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.ComponentUtils",title:"Class: ComponentUtils",sidebar_label:"@ima/core.ComponentUtils",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.ClientWindow",permalink:"/api/classes/ima_core.ClientWindow"},next:{title:"@ima/core.Controller",permalink:"/api/classes/ima_core.Controller"}},o={},s=[{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"_oc",id:"_oc",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"_utilities",id:"_utilities",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"_utilityClasses",id:"_utilityclasses",level:3},{value:"Index signature",id:"index-signature",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"_utilityReferrers",id:"_utilityreferrers",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"Methods",id:"methods",level:2},{value:"_createUtilityInstance",id:"_createutilityinstance",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"getReferrers",id:"getreferrers",level:3},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"getUtils",id:"getutils",level:3},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"register",id:"register",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-8",level:4}],d={toc:s},m="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".ComponentUtils"),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new ComponentUtils"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),")"),(0,r.kt)("p",null,"Initializes the registry used for managing component utils."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The application's dependency injector - the object container.")))),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/renderer/ComponentUtils.ts#L31"},"packages/core/src/page/renderer/ComponentUtils.ts:31")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"_oc"},"_","oc"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"The application's dependency injector - the object container."),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/renderer/ComponentUtils.ts#L8"},"packages/core/src/page/renderer/ComponentUtils.ts:8")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_utilities"},"_","utilities"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"_","utilities"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,r.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,r.kt)("p",null,"Map of instantiated utilities"),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/renderer/ComponentUtils.ts#L18"},"packages/core/src/page/renderer/ComponentUtils.ts:18")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_utilityclasses"},"_","utilityClasses"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","utilityClasses"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"{}")),(0,r.kt)("p",null,"Map of registered utilities."),(0,r.kt)("h4",{id:"index-signature"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">"),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/renderer/ComponentUtils.ts#L12"},"packages/core/src/page/renderer/ComponentUtils.ts:12")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_utilityreferrers"},"_","utilityReferrers"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","utilityReferrers"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#stringparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"StringParameters"))," = ",(0,r.kt)("inlineCode",{parentName:"p"},"{}")),(0,r.kt)("p",null,"Map of referrers to utilities"),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/renderer/ComponentUtils.ts#L23"},"packages/core/src/page/renderer/ComponentUtils.ts:23")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"_createutilityinstance"},"_","createUtilityInstance"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_createUtilityInstance"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"alias"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"utilityClass"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"any")),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"alias")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"utilityClass")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")))),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"any")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/renderer/ComponentUtils.ts#L104"},"packages/core/src/page/renderer/ComponentUtils.ts:104")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getreferrers"},"getReferrers"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getReferrers"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#stringparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"StringParameters"))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#stringparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"StringParameters"))),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/renderer/ComponentUtils.ts#L100"},"packages/core/src/page/renderer/ComponentUtils.ts:100")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getutils"},"getUtils"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getUtils"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,r.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,r.kt)("p",null,"Returns object containing all registered utilities"),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,r.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/renderer/ComponentUtils.ts#L80"},"packages/core/src/page/renderer/ComponentUtils.ts:80")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"register"},"register"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"register"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"componentUtilityClass?"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"referrer?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Registers single utility class or multiple classes in alias->class mapping."),(0,r.kt)("h4",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," { ",(0,r.kt)("inlineCode",{parentName:"td"},"[key: string]"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">","; } ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"," & ",(0,r.kt)("inlineCode",{parentName:"td"},"WithDependencies")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"," & ",(0,r.kt)("inlineCode",{parentName:"td"},"Partial"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"WithDependencies"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Function")," & { ",(0,r.kt)("inlineCode",{parentName:"td"},"prototype"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"T")," } & ",(0,r.kt)("inlineCode",{parentName:"td"},"Partial"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"WithDependencies"),">"," ","|"," [",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinjectable"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInjectable")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">",", { ",(0,r.kt)("inlineCode",{parentName:"td"},"optional"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," }]")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"componentUtilityClass?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"referrer?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/renderer/ComponentUtils.ts#L38"},"packages/core/src/page/renderer/ComponentUtils.ts:38")))}c.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[7652],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>u});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),s=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(o.Provider,{value:t},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),m=s(n),k=r,u=m["".concat(o,".").concat(k)]||m[k]||c[k]||i;return n?a.createElement(u,l(l({ref:t},d),{},{components:n})):a.createElement(u,l({ref:t},d))}));function u(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=k;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[m]="string"==typeof e?e:r,l[1]=p;for(var s=2;s{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>c,frontMatter:()=>i,metadata:()=>p,toc:()=>s});var a=n(5773),r=(n(7294),n(3905));const i={id:"ima_core.ComponentUtils",title:"Class: ComponentUtils",sidebar_label:"@ima/core.ComponentUtils",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_core.ComponentUtils",id:"api/classes/ima_core.ComponentUtils",title:"Class: ComponentUtils",description:"@ima/core.ComponentUtils",source:"@site/../docs/api/classes/ima_core.ComponentUtils.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.ComponentUtils",permalink:"/api/classes/ima_core.ComponentUtils",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.ComponentUtils",title:"Class: ComponentUtils",sidebar_label:"@ima/core.ComponentUtils",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.ClientWindow",permalink:"/api/classes/ima_core.ClientWindow"},next:{title:"@ima/core.Controller",permalink:"/api/classes/ima_core.Controller"}},o={},s=[{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"_oc",id:"_oc",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"_utilities",id:"_utilities",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"_utilityClasses",id:"_utilityclasses",level:3},{value:"Index signature",id:"index-signature",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"_utilityReferrers",id:"_utilityreferrers",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"Methods",id:"methods",level:2},{value:"_createUtilityInstance",id:"_createutilityinstance",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"getReferrers",id:"getreferrers",level:3},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"getUtils",id:"getutils",level:3},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"register",id:"register",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-8",level:4}],d={toc:s},m="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".ComponentUtils"),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new ComponentUtils"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),")"),(0,r.kt)("p",null,"Initializes the registry used for managing component utils."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The application's dependency injector - the object container.")))),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/renderer/ComponentUtils.ts#L31"},"packages/core/src/page/renderer/ComponentUtils.ts:31")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"_oc"},"_","oc"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"The application's dependency injector - the object container."),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/renderer/ComponentUtils.ts#L8"},"packages/core/src/page/renderer/ComponentUtils.ts:8")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_utilities"},"_","utilities"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"_","utilities"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,r.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,r.kt)("p",null,"Map of instantiated utilities"),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/renderer/ComponentUtils.ts#L18"},"packages/core/src/page/renderer/ComponentUtils.ts:18")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_utilityclasses"},"_","utilityClasses"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","utilityClasses"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"{}")),(0,r.kt)("p",null,"Map of registered utilities."),(0,r.kt)("h4",{id:"index-signature"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">"),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/renderer/ComponentUtils.ts#L12"},"packages/core/src/page/renderer/ComponentUtils.ts:12")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_utilityreferrers"},"_","utilityReferrers"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","utilityReferrers"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#stringparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"StringParameters"))," = ",(0,r.kt)("inlineCode",{parentName:"p"},"{}")),(0,r.kt)("p",null,"Map of referrers to utilities"),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/renderer/ComponentUtils.ts#L23"},"packages/core/src/page/renderer/ComponentUtils.ts:23")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"_createutilityinstance"},"_","createUtilityInstance"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_createUtilityInstance"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"alias"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"utilityClass"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"any")),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"alias")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"utilityClass")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")))),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"any")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/renderer/ComponentUtils.ts#L104"},"packages/core/src/page/renderer/ComponentUtils.ts:104")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getreferrers"},"getReferrers"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getReferrers"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#stringparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"StringParameters"))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#stringparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"StringParameters"))),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/renderer/ComponentUtils.ts#L100"},"packages/core/src/page/renderer/ComponentUtils.ts:100")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getutils"},"getUtils"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getUtils"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,r.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,r.kt)("p",null,"Returns object containing all registered utilities"),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,r.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/renderer/ComponentUtils.ts#L80"},"packages/core/src/page/renderer/ComponentUtils.ts:80")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"register"},"register"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"register"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"componentUtilityClass?"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"referrer?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Registers single utility class or multiple classes in alias->class mapping."),(0,r.kt)("h4",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," { ",(0,r.kt)("inlineCode",{parentName:"td"},"[key: string]"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">","; } ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"," & ",(0,r.kt)("inlineCode",{parentName:"td"},"WithDependencies")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"," & ",(0,r.kt)("inlineCode",{parentName:"td"},"Partial"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"WithDependencies"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Function")," & { ",(0,r.kt)("inlineCode",{parentName:"td"},"prototype"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"T")," } & ",(0,r.kt)("inlineCode",{parentName:"td"},"Partial"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"WithDependencies"),">"," ","|"," [",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinjectable"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInjectable")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">",", { ",(0,r.kt)("inlineCode",{parentName:"td"},"optional"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," }]")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"componentUtilityClass?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"referrer?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/renderer/ComponentUtils.ts#L38"},"packages/core/src/page/renderer/ComponentUtils.ts:38")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1ae6f9c3.58897fdb.js b/assets/js/1ae6f9c3.24aef780.js similarity index 96% rename from assets/js/1ae6f9c3.58897fdb.js rename to assets/js/1ae6f9c3.24aef780.js index 90e9761745..aea61272c4 100644 --- a/assets/js/1ae6f9c3.58897fdb.js +++ b/assets/js/1ae6f9c3.24aef780.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[5252],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>u});var a=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function p(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),o=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},s=function(e){var t=o(e.components);return a.createElement(l.Provider,{value:t},e.children)},m="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,i=e.originalType,l=e.parentName,s=d(e,["components","mdxType","originalType","parentName"]),m=o(r),c=n,u=m["".concat(l,".").concat(c)]||m[c]||k[c]||i;return r?a.createElement(u,p(p({ref:t},s),{},{components:r})):a.createElement(u,p({ref:t},s))}));function u(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=r.length,p=new Array(i);p[0]=c;var d={};for(var l in t)hasOwnProperty.call(t,l)&&(d[l]=t[l]);d.originalType=e,d[m]="string"==typeof e?e:n,p[1]=d;for(var o=2;o{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>p,default:()=>k,frontMatter:()=>i,metadata:()=>d,toc:()=>o});var a=r(5773),n=(r(7294),r(3905));const i={id:"ima_react_page_renderer.ServerPageRenderer",title:"Class: ServerPageRenderer",sidebar_label:"@ima/react-page-renderer.ServerPageRenderer",custom_edit_url:null},p=void 0,d={unversionedId:"api/classes/ima_react_page_renderer.ServerPageRenderer",id:"api/classes/ima_react_page_renderer.ServerPageRenderer",title:"Class: ServerPageRenderer",description:"@ima/react-page-renderer.ServerPageRenderer",source:"@site/../docs/api/classes/ima_react_page_renderer.ServerPageRenderer.md",sourceDirName:"api/classes",slug:"/api/classes/ima_react_page_renderer.ServerPageRenderer",permalink:"/api/classes/ima_react_page_renderer.ServerPageRenderer",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_react_page_renderer.ServerPageRenderer",title:"Class: ServerPageRenderer",sidebar_label:"@ima/react-page-renderer.ServerPageRenderer",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/react-page-renderer.PageRendererFactory",permalink:"/api/classes/ima_react_page_renderer.PageRendererFactory"},next:{title:"@ima/react-page-renderer.ViewAdapter",permalink:"/api/classes/ima_react_page_renderer.ViewAdapter"}},l={},o=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"_dispatcher",id:"_dispatcher",level:3},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"_factory",id:"_factory",level:3},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"_helpers",id:"_helpers",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"_settings",id:"_settings",level:3},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"_viewAdapter",id:"_viewadapter",level:3},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"_viewAdapterProps",id:"_viewadapterprops",level:3},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"Methods",id:"methods",level:2},{value:"_generateViewAdapterProps",id:"_generateviewadapterprops",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns",level:4},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"_getDocumentView",id:"_getdocumentview",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Inherited from",id:"inherited-from-7",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"_getViewAdapterElement",id:"_getviewadapterelement",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Inherited from",id:"inherited-from-8",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"_prepareViewAdapter",id:"_prepareviewadapter",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Inherited from",id:"inherited-from-9",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"mount",id:"mount",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"setState",id:"setstate",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"unmount",id:"unmount",level:3},{value:"Returns",id:"returns-6",level:4},{value:"Overrides",id:"overrides-3",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"update",id:"update",level:3},{value:"Returns",id:"returns-7",level:4},{value:"Overrides",id:"overrides-4",level:4},{value:"Defined in",id:"defined-in-14",level:4}],s={toc:o},m="wrapper";function k(e){let{components:t,...r}=e;return(0,n.kt)(m,(0,a.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_react_page_renderer"},"@ima/react-page-renderer"),".ServerPageRenderer"),(0,n.kt)("p",null,"Server-side page renderer. The renderer renders the page into the HTML\nmarkup and sends it to the client."),(0,n.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("p",{parentName:"li"},(0,n.kt)("inlineCode",{parentName:"p"},"AbstractPageRenderer")),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"ServerPageRenderer"))))),(0,n.kt)("h2",{id:"constructors"},"Constructors"),(0,n.kt)("h3",{id:"constructor"},"constructor"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("strong",{parentName:"p"},"new ServerPageRenderer"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"factory"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"helpers"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"dispatcher"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"settings"),")"),(0,n.kt)("p",null,"Initializes the server-side page renderer."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"factory")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_react_page_renderer.PageRendererFactory"},(0,n.kt)("inlineCode",{parentName:"a"},"PageRendererFactory"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Factory for receive $Utils to view.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"helpers")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"__module")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The IMA.js helper methods.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"dispatcher")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Dispatcher"},(0,n.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Dispatcher fires events to app.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"settings")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.Settings"},(0,n.kt)("inlineCode",{parentName:"a"},"Settings"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Application setting for the current application environment.")))),(0,n.kt)("h4",{id:"overrides"},"Overrides"),(0,n.kt)("p",null,"AbstractPageRenderer.constructor"),(0,n.kt)("h4",{id:"defined-in"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/renderer/ServerPageRenderer.ts#L34"},"packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:34")),(0,n.kt)("h2",{id:"properties"},"Properties"),(0,n.kt)("h3",{id:"_dispatcher"},"_","dispatcher"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","dispatcher"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,n.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,n.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","dispatcher"),(0,n.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L37"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:37")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_factory"},"_","factory"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","factory"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_react_page_renderer.PageRendererFactory"},(0,n.kt)("inlineCode",{parentName:"a"},"PageRendererFactory"))),(0,n.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","factory"),(0,n.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L38"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:38")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_helpers"},"_","helpers"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","helpers"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"__module")),(0,n.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","helpers"),(0,n.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L39"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:39")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_settings"},"_","settings"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","settings"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Settings"},(0,n.kt)("inlineCode",{parentName:"a"},"Settings"))),(0,n.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","settings"),(0,n.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L40"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:40")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_viewadapter"},"_","viewAdapter"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,n.kt)("strong",{parentName:"p"},"_","viewAdapter"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"ComponentType")),(0,n.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","viewAdapter"),(0,n.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L41"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:41")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_viewadapterprops"},"_","viewAdapterProps"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","viewAdapterProps"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," = ",(0,n.kt)("inlineCode",{parentName:"p"},"{}")),(0,n.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","viewAdapterProps"),(0,n.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L42"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:42")),(0,n.kt)("h2",{id:"methods"},"Methods"),(0,n.kt)("h3",{id:"_generateviewadapterprops"},"_","generateViewAdapterProps"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_generateViewAdapterProps"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"managedRootView"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"pageView"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"state?"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/interfaces/ima_react_page_renderer.ViewAdapterProps"},(0,n.kt)("inlineCode",{parentName:"a"},"ViewAdapterProps"))),(0,n.kt)("p",null,"Generate properties for view from state."),(0,n.kt)("h4",{id:"parameters-1"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"managedRootView")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"ComponentType"))),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"pageView")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"ComponentType"))),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"state")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))))),(0,n.kt)("h4",{id:"returns"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/interfaces/ima_react_page_renderer.ViewAdapterProps"},(0,n.kt)("inlineCode",{parentName:"a"},"ViewAdapterProps"))),(0,n.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","generateViewAdapterProps"),(0,n.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L128"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:128")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_getdocumentview"},"_","getDocumentView"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_getDocumentView"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"routeOptions"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"ComponentType")),(0,n.kt)("p",null,"Returns the class constructor of the specified document view component."),(0,n.kt)("h4",{id:"parameters-2"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"routeOptions")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The current route options.")))),(0,n.kt)("h4",{id:"returns-1"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"ComponentType")),(0,n.kt)("p",null,"The constructor of the document view component."),(0,n.kt)("h4",{id:"inherited-from-7"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","getDocumentView"),(0,n.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L176"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:176")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_getviewadapterelement"},"_","getViewAdapterElement"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_getViewAdapterElement"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"props?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"ReactElement"),"<{}, ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"JSXElementConstructor"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"any"),">",">"),(0,n.kt)("h4",{id:"parameters-3"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"props")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Object"))))),(0,n.kt)("h4",{id:"returns-2"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"ReactElement"),"<{}, ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"JSXElementConstructor"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"any"),">",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Inherit Doc"))),(0,n.kt)("h4",{id:"inherited-from-8"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","getViewAdapterElement"),(0,n.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L115"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:115")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_prepareviewadapter"},"_","prepareViewAdapter"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_prepareViewAdapter"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"controller"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"pageView"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"routeOptions"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("p",null,"Returns wrapped page view component with managed root view and view adapter."),(0,n.kt)("h4",{id:"parameters-4"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"controller")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Controller"},(0,n.kt)("inlineCode",{parentName:"a"},"Controller")),"<{}, {}, {}",">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"-")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"pageView")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"ComponentType")),(0,n.kt)("td",{parentName:"tr",align:"left"},"-")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"routeOptions")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The current route options.")))),(0,n.kt)("h4",{id:"returns-3"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"inherited-from-9"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","prepareViewAdapter"),(0,n.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L148"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:148")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"mount"},"mount"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"mount"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"controller"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"pageView"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"pageResources"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"routeOptions"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"PageData"),">"),(0,n.kt)("h4",{id:"parameters-5"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"controller")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ControllerDecorator"},(0,n.kt)("inlineCode",{parentName:"a"},"ControllerDecorator")),"<{}, {}, {}",">")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"pageView")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"ComponentType"),"<{}",">")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"pageResources")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownpromiseparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownPromiseParameters")))),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"routeOptions")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions")))))),(0,n.kt)("h4",{id:"returns-4"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"PageData"),">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Inherit Doc"))),(0,n.kt)("h4",{id:"overrides-1"},"Overrides"),(0,n.kt)("p",null,"AbstractPageRenderer.mount"),(0,n.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/renderer/ServerPageRenderer.ts#L46"},"packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:46")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"setstate"},"setState"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"setState"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,n.kt)("h4",{id:"returns-5"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,n.kt)("h4",{id:"overrides-2"},"Overrides"),(0,n.kt)("p",null,"AbstractPageRenderer.setState"),(0,n.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/renderer/ServerPageRenderer.ts#L72"},"packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:72")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"unmount"},"unmount"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"unmount"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"returns-6"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Inherit Doc"))),(0,n.kt)("h4",{id:"overrides-3"},"Overrides"),(0,n.kt)("p",null,"AbstractPageRenderer.unmount"),(0,n.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/renderer/ServerPageRenderer.ts#L88"},"packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:88")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"update"},"update"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"update"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"never"),">"),(0,n.kt)("h4",{id:"returns-7"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"never"),">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Inherit Doc"))),(0,n.kt)("h4",{id:"overrides-4"},"Overrides"),(0,n.kt)("p",null,"AbstractPageRenderer.update"),(0,n.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/renderer/ServerPageRenderer.ts#L79"},"packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:79")))}k.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[5252],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>u});var a=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function p(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),o=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},s=function(e){var t=o(e.components);return a.createElement(l.Provider,{value:t},e.children)},m="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,i=e.originalType,l=e.parentName,s=d(e,["components","mdxType","originalType","parentName"]),m=o(r),c=n,u=m["".concat(l,".").concat(c)]||m[c]||k[c]||i;return r?a.createElement(u,p(p({ref:t},s),{},{components:r})):a.createElement(u,p({ref:t},s))}));function u(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=r.length,p=new Array(i);p[0]=c;var d={};for(var l in t)hasOwnProperty.call(t,l)&&(d[l]=t[l]);d.originalType=e,d[m]="string"==typeof e?e:n,p[1]=d;for(var o=2;o{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>p,default:()=>k,frontMatter:()=>i,metadata:()=>d,toc:()=>o});var a=r(5773),n=(r(7294),r(3905));const i={id:"ima_react_page_renderer.ServerPageRenderer",title:"Class: ServerPageRenderer",sidebar_label:"@ima/react-page-renderer.ServerPageRenderer",custom_edit_url:null},p=void 0,d={unversionedId:"api/classes/ima_react_page_renderer.ServerPageRenderer",id:"api/classes/ima_react_page_renderer.ServerPageRenderer",title:"Class: ServerPageRenderer",description:"@ima/react-page-renderer.ServerPageRenderer",source:"@site/../docs/api/classes/ima_react_page_renderer.ServerPageRenderer.md",sourceDirName:"api/classes",slug:"/api/classes/ima_react_page_renderer.ServerPageRenderer",permalink:"/api/classes/ima_react_page_renderer.ServerPageRenderer",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_react_page_renderer.ServerPageRenderer",title:"Class: ServerPageRenderer",sidebar_label:"@ima/react-page-renderer.ServerPageRenderer",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/react-page-renderer.PageRendererFactory",permalink:"/api/classes/ima_react_page_renderer.PageRendererFactory"},next:{title:"@ima/react-page-renderer.ViewAdapter",permalink:"/api/classes/ima_react_page_renderer.ViewAdapter"}},l={},o=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"_dispatcher",id:"_dispatcher",level:3},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"_factory",id:"_factory",level:3},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"_helpers",id:"_helpers",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"_settings",id:"_settings",level:3},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"_viewAdapter",id:"_viewadapter",level:3},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"_viewAdapterProps",id:"_viewadapterprops",level:3},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"Methods",id:"methods",level:2},{value:"_generateViewAdapterProps",id:"_generateviewadapterprops",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns",level:4},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"_getDocumentView",id:"_getdocumentview",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Inherited from",id:"inherited-from-7",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"_getViewAdapterElement",id:"_getviewadapterelement",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Inherited from",id:"inherited-from-8",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"_prepareViewAdapter",id:"_prepareviewadapter",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Inherited from",id:"inherited-from-9",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"mount",id:"mount",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"setState",id:"setstate",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"unmount",id:"unmount",level:3},{value:"Returns",id:"returns-6",level:4},{value:"Overrides",id:"overrides-3",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"update",id:"update",level:3},{value:"Returns",id:"returns-7",level:4},{value:"Overrides",id:"overrides-4",level:4},{value:"Defined in",id:"defined-in-14",level:4}],s={toc:o},m="wrapper";function k(e){let{components:t,...r}=e;return(0,n.kt)(m,(0,a.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_react_page_renderer"},"@ima/react-page-renderer"),".ServerPageRenderer"),(0,n.kt)("p",null,"Server-side page renderer. The renderer renders the page into the HTML\nmarkup and sends it to the client."),(0,n.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("p",{parentName:"li"},(0,n.kt)("inlineCode",{parentName:"p"},"AbstractPageRenderer")),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"ServerPageRenderer"))))),(0,n.kt)("h2",{id:"constructors"},"Constructors"),(0,n.kt)("h3",{id:"constructor"},"constructor"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("strong",{parentName:"p"},"new ServerPageRenderer"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"factory"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"helpers"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"dispatcher"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"settings"),")"),(0,n.kt)("p",null,"Initializes the server-side page renderer."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"factory")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_react_page_renderer.PageRendererFactory"},(0,n.kt)("inlineCode",{parentName:"a"},"PageRendererFactory"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Factory for receive $Utils to view.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"helpers")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"__module")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The IMA.js helper methods.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"dispatcher")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Dispatcher"},(0,n.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Dispatcher fires events to app.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"settings")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.Settings"},(0,n.kt)("inlineCode",{parentName:"a"},"Settings"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Application setting for the current application environment.")))),(0,n.kt)("h4",{id:"overrides"},"Overrides"),(0,n.kt)("p",null,"AbstractPageRenderer.constructor"),(0,n.kt)("h4",{id:"defined-in"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/renderer/ServerPageRenderer.ts#L34"},"packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:34")),(0,n.kt)("h2",{id:"properties"},"Properties"),(0,n.kt)("h3",{id:"_dispatcher"},"_","dispatcher"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","dispatcher"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,n.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,n.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","dispatcher"),(0,n.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L37"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:37")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_factory"},"_","factory"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","factory"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_react_page_renderer.PageRendererFactory"},(0,n.kt)("inlineCode",{parentName:"a"},"PageRendererFactory"))),(0,n.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","factory"),(0,n.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L38"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:38")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_helpers"},"_","helpers"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","helpers"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"__module")),(0,n.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","helpers"),(0,n.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L39"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:39")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_settings"},"_","settings"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","settings"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Settings"},(0,n.kt)("inlineCode",{parentName:"a"},"Settings"))),(0,n.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","settings"),(0,n.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L40"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:40")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_viewadapter"},"_","viewAdapter"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,n.kt)("strong",{parentName:"p"},"_","viewAdapter"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"ComponentType")),(0,n.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","viewAdapter"),(0,n.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L41"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:41")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_viewadapterprops"},"_","viewAdapterProps"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","viewAdapterProps"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," = ",(0,n.kt)("inlineCode",{parentName:"p"},"{}")),(0,n.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","viewAdapterProps"),(0,n.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L42"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:42")),(0,n.kt)("h2",{id:"methods"},"Methods"),(0,n.kt)("h3",{id:"_generateviewadapterprops"},"_","generateViewAdapterProps"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_generateViewAdapterProps"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"managedRootView"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"pageView"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"state?"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/interfaces/ima_react_page_renderer.ViewAdapterProps"},(0,n.kt)("inlineCode",{parentName:"a"},"ViewAdapterProps"))),(0,n.kt)("p",null,"Generate properties for view from state."),(0,n.kt)("h4",{id:"parameters-1"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"managedRootView")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"ComponentType"))),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"pageView")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"ComponentType"))),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"state")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))))),(0,n.kt)("h4",{id:"returns"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/interfaces/ima_react_page_renderer.ViewAdapterProps"},(0,n.kt)("inlineCode",{parentName:"a"},"ViewAdapterProps"))),(0,n.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","generateViewAdapterProps"),(0,n.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L128"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:128")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_getdocumentview"},"_","getDocumentView"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_getDocumentView"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"routeOptions"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"ComponentType")),(0,n.kt)("p",null,"Returns the class constructor of the specified document view component."),(0,n.kt)("h4",{id:"parameters-2"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"routeOptions")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The current route options.")))),(0,n.kt)("h4",{id:"returns-1"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"ComponentType")),(0,n.kt)("p",null,"The constructor of the document view component."),(0,n.kt)("h4",{id:"inherited-from-7"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","getDocumentView"),(0,n.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L176"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:176")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_getviewadapterelement"},"_","getViewAdapterElement"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_getViewAdapterElement"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"props?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"ReactElement"),"<{}, ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"JSXElementConstructor"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"any"),">",">"),(0,n.kt)("h4",{id:"parameters-3"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"props")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Object"))))),(0,n.kt)("h4",{id:"returns-2"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"ReactElement"),"<{}, ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"JSXElementConstructor"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"any"),">",">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Inherit Doc"))),(0,n.kt)("h4",{id:"inherited-from-8"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","getViewAdapterElement"),(0,n.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L115"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:115")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_prepareviewadapter"},"_","prepareViewAdapter"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_prepareViewAdapter"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"controller"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"pageView"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"routeOptions"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("p",null,"Returns wrapped page view component with managed root view and view adapter."),(0,n.kt)("h4",{id:"parameters-4"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"controller")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Controller"},(0,n.kt)("inlineCode",{parentName:"a"},"Controller")),"<{}, {}, {}",">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"-")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"pageView")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"ComponentType")),(0,n.kt)("td",{parentName:"tr",align:"left"},"-")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"routeOptions")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The current route options.")))),(0,n.kt)("h4",{id:"returns-3"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"inherited-from-9"},"Inherited from"),(0,n.kt)("p",null,"AbstractPageRenderer.","_","prepareViewAdapter"),(0,n.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts#L148"},"packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:148")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"mount"},"mount"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"mount"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"controller"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"pageView"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"pageResources"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"routeOptions"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"PageData"),">"),(0,n.kt)("h4",{id:"parameters-5"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"controller")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ControllerDecorator"},(0,n.kt)("inlineCode",{parentName:"a"},"ControllerDecorator")),"<{}, {}, {}",">")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"pageView")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"ComponentType"),"<{}",">")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"pageResources")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownpromiseparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownPromiseParameters")))),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"routeOptions")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions")))))),(0,n.kt)("h4",{id:"returns-4"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"p"},"PageData"),">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Inherit Doc"))),(0,n.kt)("h4",{id:"overrides-1"},"Overrides"),(0,n.kt)("p",null,"AbstractPageRenderer.mount"),(0,n.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/renderer/ServerPageRenderer.ts#L46"},"packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:46")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"setstate"},"setState"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"setState"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,n.kt)("h4",{id:"returns-5"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,n.kt)("h4",{id:"overrides-2"},"Overrides"),(0,n.kt)("p",null,"AbstractPageRenderer.setState"),(0,n.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/renderer/ServerPageRenderer.ts#L72"},"packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:72")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"unmount"},"unmount"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"unmount"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"returns-6"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Inherit Doc"))),(0,n.kt)("h4",{id:"overrides-3"},"Overrides"),(0,n.kt)("p",null,"AbstractPageRenderer.unmount"),(0,n.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/renderer/ServerPageRenderer.ts#L88"},"packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:88")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"update"},"update"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"update"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"never"),">"),(0,n.kt)("h4",{id:"returns-7"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"never"),">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Inherit Doc"))),(0,n.kt)("h4",{id:"overrides-4"},"Overrides"),(0,n.kt)("p",null,"AbstractPageRenderer.update"),(0,n.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/renderer/ServerPageRenderer.ts#L79"},"packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:79")))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1ae9d490.8f656932.js b/assets/js/1ae9d490.bb87d518.js similarity index 96% rename from assets/js/1ae9d490.8f656932.js rename to assets/js/1ae9d490.bb87d518.js index 781da69969..1918c25258 100644 --- a/assets/js/1ae9d490.8f656932.js +++ b/assets/js/1ae9d490.bb87d518.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[7711],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>h});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var p=r.createContext({}),d=function(e){var t=r.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},s=function(e){var t=d(e.components);return r.createElement(p.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,p=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),m=d(a),k=n,h=m["".concat(p,".").concat(k)]||m[k]||u[k]||i;return a?r.createElement(h,l(l({ref:t},s),{},{components:a})):r.createElement(h,l({ref:t},s))}));function h(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,l=new Array(i);l[0]=k;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[m]="string"==typeof e?e:n,l[1]=o;for(var d=2;d{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var r=a(5773),n=(a(7294),a(3905));const i={id:"ima_core.ClientRouter",title:"Class: ClientRouter",sidebar_label:"@ima/core.ClientRouter",custom_edit_url:null},l=void 0,o={unversionedId:"api/classes/ima_core.ClientRouter",id:"api/classes/ima_core.ClientRouter",title:"Class: ClientRouter",description:"@ima/core.ClientRouter",source:"@site/../docs/api/classes/ima_core.ClientRouter.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.ClientRouter",permalink:"/api/classes/ima_core.ClientRouter",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.ClientRouter",title:"Class: ClientRouter",sidebar_label:"@ima/core.ClientRouter",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.ClientPageManager",permalink:"/api/classes/ima_core.ClientPageManager"},next:{title:"@ima/core.ClientWindow",permalink:"/api/classes/ima_core.ClientWindow"}},p={},d=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"_currentMiddlewareId",id:"_currentmiddlewareid",level:3},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"_currentlyRoutedPath",id:"_currentlyroutedpath",level:3},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"_dispatcher",id:"_dispatcher",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"_factory",id:"_factory",level:3},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"_host",id:"_host",level:3},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"_isSPARouted",id:"_issparouted",level:3},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"_languagePartPath",id:"_languagepartpath",level:3},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"_middlewareTimeout",id:"_middlewaretimeout",level:3},{value:"Inherited from",id:"inherited-from-7",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"_mountedPromise",id:"_mountedpromise",level:3},{value:"Defined in",id:"defined-in-9",level:4},{value:"_pageManager",id:"_pagemanager",level:3},{value:"Inherited from",id:"inherited-from-8",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"_protocol",id:"_protocol",level:3},{value:"Inherited from",id:"inherited-from-9",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"_root",id:"_root",level:3},{value:"Inherited from",id:"inherited-from-10",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"_routeHandlers",id:"_routehandlers",level:3},{value:"Inherited from",id:"inherited-from-11",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"_window",id:"_window",level:3},{value:"Defined in",id:"defined-in-14",level:4},{value:"Accessors",id:"accessors",level:2},{value:"$dependencies",id:"dependencies",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"Methods",id:"methods",level:2},{value:"#addParamsFromOriginalRoute",id:"addparamsfromoriginalroute",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Inherited from",id:"inherited-from-12",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"#handleMounted",id:"handlemounted",level:3},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"#isSPARouted",id:"issparouted",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-18",level:4},{value:"_boundHandleClick",id:"_boundhandleclick",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"_boundHandlePopState",id:"_boundhandlepopstate",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"_extractRoutePath",id:"_extractroutepath",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Inherited from",id:"inherited-from-13",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"_getAnchorElement",id:"_getanchorelement",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-7",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"_getCurrentlyRoutedPath",id:"_getcurrentlyroutedpath",level:3},{value:"Returns",id:"returns-8",level:4},{value:"Inherited from",id:"inherited-from-14",level:4},{value:"Defined in",id:"defined-in-23",level:4},{value:"_getMiddlewaresForRoute",id:"_getmiddlewaresforroute",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-9",level:4},{value:"Inherited from",id:"inherited-from-15",level:4},{value:"Defined in",id:"defined-in-24",level:4},{value:"_handle",id:"_handle",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-10",level:4},{value:"Inherited from",id:"inherited-from-16",level:4},{value:"Defined in",id:"defined-in-25",level:4},{value:"_handleClick",id:"_handleclick",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-11",level:4},{value:"Defined in",id:"defined-in-26",level:4},{value:"_handleFatalError",id:"_handlefatalerror",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-12",level:4},{value:"Defined in",id:"defined-in-27",level:4},{value:"_handlePopState",id:"_handlepopstate",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-13",level:4},{value:"Defined in",id:"defined-in-28",level:4},{value:"_isHashLink",id:"_ishashlink",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-14",level:4},{value:"Defined in",id:"defined-in-29",level:4},{value:"_isSameDomain",id:"_issamedomain",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-15",level:4},{value:"Defined in",id:"defined-in-30",level:4},{value:"_runMiddlewares",id:"_runmiddlewares",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-16",level:4},{value:"Inherited from",id:"inherited-from-17",level:4},{value:"Defined in",id:"defined-in-31",level:4},{value:"add",id:"add",level:3},{value:"Parameters",id:"parameters-15",level:4},{value:"Returns",id:"returns-17",level:4},{value:"Inherited from",id:"inherited-from-18",level:4},{value:"Defined in",id:"defined-in-32",level:4},{value:"getBaseUrl",id:"getbaseurl",level:3},{value:"Returns",id:"returns-18",level:4},{value:"Inherited from",id:"inherited-from-19",level:4},{value:"Defined in",id:"defined-in-33",level:4},{value:"getCurrentRouteInfo",id:"getcurrentrouteinfo",level:3},{value:"Returns",id:"returns-19",level:4},{value:"Inherited from",id:"inherited-from-20",level:4},{value:"Defined in",id:"defined-in-34",level:4},{value:"getDomain",id:"getdomain",level:3},{value:"Returns",id:"returns-20",level:4},{value:"Inherited from",id:"inherited-from-21",level:4},{value:"Defined in",id:"defined-in-35",level:4},{value:"getHost",id:"gethost",level:3},{value:"Returns",id:"returns-21",level:4},{value:"Inherited from",id:"inherited-from-22",level:4},{value:"Defined in",id:"defined-in-36",level:4},{value:"getPath",id:"getpath",level:3},{value:"Returns",id:"returns-22",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-37",level:4},{value:"getProtocol",id:"getprotocol",level:3},{value:"Returns",id:"returns-23",level:4},{value:"Inherited from",id:"inherited-from-23",level:4},{value:"Defined in",id:"defined-in-38",level:4},{value:"getRouteHandler",id:"getroutehandler",level:3},{value:"Parameters",id:"parameters-16",level:4},{value:"Returns",id:"returns-24",level:4},{value:"Inherited from",id:"inherited-from-24",level:4},{value:"Defined in",id:"defined-in-39",level:4},{value:"getRouteHandlers",id:"getroutehandlers",level:3},{value:"Returns",id:"returns-25",level:4},{value:"Inherited from",id:"inherited-from-25",level:4},{value:"Defined in",id:"defined-in-40",level:4},{value:"getRouteHandlersByPath",id:"getroutehandlersbypath",level:3},{value:"Parameters",id:"parameters-17",level:4},{value:"Returns",id:"returns-26",level:4},{value:"Inherited from",id:"inherited-from-26",level:4},{value:"Defined in",id:"defined-in-41",level:4},{value:"getUrl",id:"geturl",level:3},{value:"Returns",id:"returns-27",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-42",level:4},{value:"handleError",id:"handleerror",level:3},{value:"Parameters",id:"parameters-18",level:4},{value:"Returns",id:"returns-28",level:4},{value:"Overrides",id:"overrides-3",level:4},{value:"Defined in",id:"defined-in-43",level:4},{value:"handleNotFound",id:"handlenotfound",level:3},{value:"Parameters",id:"parameters-19",level:4},{value:"Returns",id:"returns-29",level:4},{value:"Overrides",id:"overrides-4",level:4},{value:"Defined in",id:"defined-in-44",level:4},{value:"init",id:"init",level:3},{value:"Parameters",id:"parameters-20",level:4},{value:"Returns",id:"returns-30",level:4},{value:"Overrides",id:"overrides-5",level:4},{value:"Defined in",id:"defined-in-45",level:4},{value:"isClientError",id:"isclienterror",level:3},{value:"Parameters",id:"parameters-21",level:4},{value:"Returns",id:"returns-31",level:4},{value:"Inherited from",id:"inherited-from-27",level:4},{value:"Defined in",id:"defined-in-46",level:4},{value:"isRedirection",id:"isredirection",level:3},{value:"Parameters",id:"parameters-22",level:4},{value:"Returns",id:"returns-32",level:4},{value:"Inherited from",id:"inherited-from-28",level:4},{value:"Defined in",id:"defined-in-47",level:4},{value:"link",id:"link",level:3},{value:"Parameters",id:"parameters-23",level:4},{value:"Returns",id:"returns-33",level:4},{value:"Inherited from",id:"inherited-from-29",level:4},{value:"Defined in",id:"defined-in-48",level:4},{value:"listen",id:"listen",level:3},{value:"Returns",id:"returns-34",level:4},{value:"Overrides",id:"overrides-6",level:4},{value:"Defined in",id:"defined-in-49",level:4},{value:"redirect",id:"redirect",level:3},{value:"Parameters",id:"parameters-24",level:4},{value:"Returns",id:"returns-35",level:4},{value:"Overrides",id:"overrides-7",level:4},{value:"Defined in",id:"defined-in-50",level:4},{value:"remove",id:"remove",level:3},{value:"Parameters",id:"parameters-25",level:4},{value:"Returns",id:"returns-36",level:4},{value:"Inherited from",id:"inherited-from-30",level:4},{value:"Defined in",id:"defined-in-51",level:4},{value:"route",id:"route",level:3},{value:"Parameters",id:"parameters-26",level:4},{value:"Returns",id:"returns-37",level:4},{value:"Overrides",id:"overrides-8",level:4},{value:"Defined in",id:"defined-in-52",level:4},{value:"unlisten",id:"unlisten",level:3},{value:"Returns",id:"returns-38",level:4},{value:"Overrides",id:"overrides-9",level:4},{value:"Defined in",id:"defined-in-53",level:4},{value:"use",id:"use",level:3},{value:"Parameters",id:"parameters-27",level:4},{value:"Returns",id:"returns-39",level:4},{value:"Inherited from",id:"inherited-from-31",level:4},{value:"Defined in",id:"defined-in-54",level:4}],s={toc:d},m="wrapper";function u(e){let{components:t,...a}=e;return(0,n.kt)(m,(0,r.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".ClientRouter"),(0,n.kt)("p",null,"The client-side implementation of the ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Router"},"Router")," interface."),(0,n.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("p",{parentName:"li"},(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRouter"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"ClientRouter"))))),(0,n.kt)("h2",{id:"constructors"},"Constructors"),(0,n.kt)("h3",{id:"constructor"},"constructor"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("strong",{parentName:"p"},"new ClientRouter"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"pageManager"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"factory"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"dispatcher"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"window"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"settings"),")"),(0,n.kt)("p",null,"Initializes the client-side router."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"pageManager")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.PageManager"},(0,n.kt)("inlineCode",{parentName:"a"},"PageManager"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The page manager handling UI rendering, and transitions between pages if at the client side.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"factory")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.RouteFactory"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteFactory"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Factory for routes.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"dispatcher")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Dispatcher"},(0,n.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Dispatcher fires events to app.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"window")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Window"},(0,n.kt)("inlineCode",{parentName:"a"},"Window"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The current global client-side APIs provider.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"settings")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"td"},"number")," ","|"," { ",(0,n.kt)("inlineCode",{parentName:"td"},"isSPARouted?"),": (",(0,n.kt)("inlineCode",{parentName:"td"},"url"),": ",(0,n.kt)("inlineCode",{parentName:"td"},"string"),", ",(0,n.kt)("inlineCode",{parentName:"td"},"action?"),": ",(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteAction"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteAction")),") => ",(0,n.kt)("inlineCode",{parentName:"td"},"boolean")," ; ",(0,n.kt)("inlineCode",{parentName:"td"},"middlewareTimeout?"),": ",(0,n.kt)("inlineCode",{parentName:"td"},"number")," }"),(0,n.kt)("td",{parentName:"tr",align:"left"},"$Router settings.")))),(0,n.kt)("h4",{id:"overrides"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#constructor"},"constructor")),(0,n.kt)("h4",{id:"defined-in"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L79"},"packages/core/src/router/ClientRouter.ts:79")),(0,n.kt)("h2",{id:"properties"},"Properties"),(0,n.kt)("h3",{id:"_currentmiddlewareid"},"_","currentMiddlewareId"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","currentMiddlewareId"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"number")," = ",(0,n.kt)("inlineCode",{parentName:"p"},"0")),(0,n.kt)("p",null,"Middleware ID counter which is used to auto-generate unique middleware\nnames when adding them to routeHandlers map."),(0,n.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_currentmiddlewareid"},"_currentMiddlewareId")),(0,n.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L92"},"packages/core/src/router/AbstractRouter.ts:92")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_currentlyroutedpath"},"_","currentlyRoutedPath"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","currentlyRoutedPath"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," = ",(0,n.kt)("inlineCode",{parentName:"p"},"''")),(0,n.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_currentlyroutedpath"},"_currentlyRoutedPath")),(0,n.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L93"},"packages/core/src/router/AbstractRouter.ts:93")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_dispatcher"},"_","dispatcher"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","dispatcher"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,n.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,n.kt)("p",null,"Dispatcher fires events to app."),(0,n.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_dispatcher"},"_dispatcher")),(0,n.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L62"},"packages/core/src/router/AbstractRouter.ts:62")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_factory"},"_","factory"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","factory"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.RouteFactory"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteFactory"))),(0,n.kt)("p",null,"Factory for routes."),(0,n.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_factory"},"_factory")),(0,n.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L58"},"packages/core/src/router/AbstractRouter.ts:58")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_host"},"_","host"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","host"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," = ",(0,n.kt)("inlineCode",{parentName:"p"},"''")),(0,n.kt)("p",null,"The application's host."),(0,n.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_host"},"_host")),(0,n.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L71"},"packages/core/src/router/AbstractRouter.ts:71")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_issparouted"},"_","isSPARouted"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","isSPARouted"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," (",(0,n.kt)("inlineCode",{parentName:"p"},"url"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"action?"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteAction")),") => ",(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_issparouted"},"_isSPARouted")),(0,n.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L95"},"packages/core/src/router/AbstractRouter.ts:95")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_languagepartpath"},"_","languagePartPath"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","languagePartPath"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," = ",(0,n.kt)("inlineCode",{parentName:"p"},"''")),(0,n.kt)("p",null,"The URL path fragment used as a suffix to the ",(0,n.kt)("inlineCode",{parentName:"p"},"_root")," field\nthat specifies the current language."),(0,n.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_languagepartpath"},"_languagePartPath")),(0,n.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L80"},"packages/core/src/router/AbstractRouter.ts:80")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_middlewaretimeout"},"_","middlewareTimeout"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","middlewareTimeout"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"number")),(0,n.kt)("h4",{id:"inherited-from-7"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_middlewaretimeout"},"_middlewareTimeout")),(0,n.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L94"},"packages/core/src/router/AbstractRouter.ts:94")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_mountedpromise"},"_","mountedPromise"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","mountedPromise"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"null")," ","|"," { ",(0,n.kt)("inlineCode",{parentName:"p"},"promise"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void"),">"," ; ",(0,n.kt)("inlineCode",{parentName:"p"},"reject"),": () => ",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ; ",(0,n.kt)("inlineCode",{parentName:"p"},"resolve"),": () => ",(0,n.kt)("inlineCode",{parentName:"p"},"void")," } = ",(0,n.kt)("inlineCode",{parentName:"p"},"null")),(0,n.kt)("p",null,"Mounted promise to prevent routing until app is fully mounted."),(0,n.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L53"},"packages/core/src/router/ClientRouter.ts:53")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_pagemanager"},"_","pageManager"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","pageManager"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageManager"},(0,n.kt)("inlineCode",{parentName:"a"},"PageManager"))),(0,n.kt)("p",null,"The page manager handling UI rendering, and transitions between\npages if at the client side."),(0,n.kt)("h4",{id:"inherited-from-8"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_pagemanager"},"_pageManager")),(0,n.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L54"},"packages/core/src/router/AbstractRouter.ts:54")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_protocol"},"_","protocol"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","protocol"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," = ",(0,n.kt)("inlineCode",{parentName:"p"},"''")),(0,n.kt)("p",null,"The current protocol used to access the application, terminated by a\ncolon (for example ",(0,n.kt)("inlineCode",{parentName:"p"},"https:"),")."),(0,n.kt)("h4",{id:"inherited-from-9"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_protocol"},"_protocol")),(0,n.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L67"},"packages/core/src/router/AbstractRouter.ts:67")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_root"},"_","root"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","root"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," = ",(0,n.kt)("inlineCode",{parentName:"p"},"''")),(0,n.kt)("p",null,"The URL path pointing to the application's root."),(0,n.kt)("h4",{id:"inherited-from-10"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_root"},"_root")),(0,n.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L75"},"packages/core/src/router/AbstractRouter.ts:75")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_routehandlers"},"_","routeHandlers"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","routeHandlers"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"Map"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">"," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),">"),(0,n.kt)("p",null,"Storage of all known routes and middlewares. The key are their names."),(0,n.kt)("h4",{id:"inherited-from-11"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_routehandlers"},"_routeHandlers")),(0,n.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L84"},"packages/core/src/router/AbstractRouter.ts:84")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_window"},"_","window"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","window"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,n.kt)("inlineCode",{parentName:"a"},"Window"))),(0,n.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L44"},"packages/core/src/router/ClientRouter.ts:44")),(0,n.kt)("h2",{id:"accessors"},"Accessors"),(0,n.kt)("h3",{id:"dependencies"},"$dependencies"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,n.kt)("inlineCode",{parentName:"p"},"get")," ",(0,n.kt)("strong",{parentName:"p"},"$dependencies"),"(): ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,n.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,n.kt)("h4",{id:"returns"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,n.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,n.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L59"},"packages/core/src/router/ClientRouter.ts:59")),(0,n.kt)("h2",{id:"methods"},"Methods"),(0,n.kt)("h3",{id:"addparamsfromoriginalroute"},"#addParamsFromOriginalRoute"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,n.kt)("strong",{parentName:"p"},"#addParamsFromOriginalRoute"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"params"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Object")),(0,n.kt)("p",null,"Obtains original route that was handled before not-found / error route\nand assigns its params to current params"),(0,n.kt)("h4",{id:"parameters-1"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"params")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteParams"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Route params for not-found or error page")))),(0,n.kt)("h4",{id:"returns-1"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Object")),(0,n.kt)("p",null,"Provided params merged with params\nfrom original route"),(0,n.kt)("h4",{id:"inherited-from-12"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter##addparamsfromoriginalroute"},"#addParamsFromOriginalRoute")),(0,n.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L733"},"packages/core/src/router/AbstractRouter.ts:733")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"handlemounted"},"#handleMounted"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,n.kt)("strong",{parentName:"p"},"#handleMounted"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"returns-2"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L476"},"packages/core/src/router/ClientRouter.ts:476")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"issparouted"},"#isSPARouted"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,n.kt)("strong",{parentName:"p"},"#isSPARouted"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"url?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"action?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,"This option allows user to override how certain URLs are handled\nduring SPA (client) routing. This adds possibility to opt-out\nof SPA routing for specific URLs and let them be handled by browser\nnatively."),(0,n.kt)("h4",{id:"parameters-2"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Default value"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"url?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"''")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The URL.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"action?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteAction"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteAction"))),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"undefined")),(0,n.kt)("td",{parentName:"tr",align:"left"},"-")))),(0,n.kt)("h4",{id:"returns-3"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"true")," if url routing should be handled by IMA."),(0,n.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L472"},"packages/core/src/router/ClientRouter.ts:472")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_boundhandleclick"},"_","boundHandleClick"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_boundHandleClick"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"parameters-3"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"event")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Event"))))),(0,n.kt)("h4",{id:"returns-4"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L45"},"packages/core/src/router/ClientRouter.ts:45")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_boundhandlepopstate"},"_","boundHandlePopState"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_boundHandlePopState"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"parameters-4"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"event")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Event"))))),(0,n.kt)("h4",{id:"returns-5"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L47"},"packages/core/src/router/ClientRouter.ts:47")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_extractroutepath"},"_","extractRoutePath"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_extractRoutePath"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"path"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Strips the URL path part that points to the application's root (base\nURL) from the provided path."),(0,n.kt)("h4",{id:"parameters-5"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"path")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"Relative or absolute URL path.")))),(0,n.kt)("h4",{id:"returns-6"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"URL path relative to the application's base URL."),(0,n.kt)("h4",{id:"inherited-from-13"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_extractroutepath"},"_extractRoutePath")),(0,n.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L526"},"packages/core/src/router/AbstractRouter.ts:526")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_getanchorelement"},"_","getAnchorElement"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_getAnchorElement"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"target"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Node")),(0,n.kt)("p",null,"The method determines whether an anchor element or a child of an anchor\nelement has been clicked, and if it was, the method returns anchor\nelement else null."),(0,n.kt)("h4",{id:"parameters-6"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"target")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Node"))))),(0,n.kt)("h4",{id:"returns-7"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Node")),(0,n.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L408"},"packages/core/src/router/ClientRouter.ts:408")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_getcurrentlyroutedpath"},"_","getCurrentlyRoutedPath"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_getCurrentlyRoutedPath"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Returns path that is stored in private property when a ",(0,n.kt)("inlineCode",{parentName:"p"},"route"),"\nmethod is called."),(0,n.kt)("h4",{id:"returns-8"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("h4",{id:"inherited-from-14"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_getcurrentlyroutedpath"},"_getCurrentlyRoutedPath")),(0,n.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L664"},"packages/core/src/router/AbstractRouter.ts:664")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_getmiddlewaresforroute"},"_","getMiddlewaresForRoute"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_getMiddlewaresForRoute"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"routeName"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),"[]"),(0,n.kt)("p",null,"Returns middlewares preceding given route name."),(0,n.kt)("h4",{id:"parameters-7"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"routeName")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string"))))),(0,n.kt)("h4",{id:"returns-9"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),"[]"),(0,n.kt)("h4",{id:"inherited-from-15"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_getmiddlewaresforroute"},"_getMiddlewaresForRoute")),(0,n.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L642"},"packages/core/src/router/AbstractRouter.ts:642")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_handle"},"_","handle"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_handle"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"route"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"params"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"options?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"action?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,"Handles the provided route and parameters by initializing the route's\ncontroller and rendering its state via the route's view."),(0,n.kt)("p",null,"The result is then sent to the client if used at the server side, or\ndisplayed if used as the client side."),(0,n.kt)("h4",{id:"parameters-8"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"route")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"The route that should have its associated controller rendered via the associated view.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"params")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteParams"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Parameters extracted from the URL path and query.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"options?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Partial"),"<",(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions")),">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"The options overrides route options defined in the ",(0,n.kt)("inlineCode",{parentName:"td"},"routes.js")," configuration file.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"action?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteAction"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteAction"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"An action object describing what triggered this routing.")))),(0,n.kt)("h4",{id:"returns-10"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,"A promise that resolves when the\npage is rendered and the result is sent to the client, or\ndisplayed if used at the client side."),(0,n.kt)("h4",{id:"inherited-from-16"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_handle"},"_handle")),(0,n.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L549"},"packages/core/src/router/AbstractRouter.ts:549")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_handleclick"},"_","handleClick"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_handleClick"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("p",null,"Handles a click event. The method performs navigation to the target\nlocation of the anchor (if it has one)."),(0,n.kt)("p",null,"The navigation will be handled by the router if the protocol and domain\nof the anchor's target location (href) is the same as the current,\notherwise the method results in a hard redirect."),(0,n.kt)("h4",{id:"parameters-9"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"event")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"MouseEvent")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The click event.")))),(0,n.kt)("h4",{id:"returns-11"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L350"},"packages/core/src/router/ClientRouter.ts:350")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_handlefatalerror"},"_","handleFatalError"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_handleFatalError"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"error"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("p",null,"Handle a fatal error application state. IMA handle fatal error when IMA\nhandle error."),(0,n.kt)("h4",{id:"parameters-10"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"error")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Error"))))),(0,n.kt)("h4",{id:"returns-12"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L305"},"packages/core/src/router/ClientRouter.ts:305")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_handlepopstate"},"_","handlePopState"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_handlePopState"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("p",null,"Handles a popstate event. The method is performed when the active history\nentry changes."),(0,n.kt)("p",null,"The navigation will be handled by the router if the event state is defined\nand event is not ",(0,n.kt)("inlineCode",{parentName:"p"},"defaultPrevented"),"."),(0,n.kt)("h4",{id:"parameters-11"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"event")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"PopStateEvent")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The popstate event.")))),(0,n.kt)("h4",{id:"returns-13"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L326"},"packages/core/src/router/ClientRouter.ts:326")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_ishashlink"},"_","isHashLink"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_isHashLink"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"targetUrl"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,"Tests whether the provided target URL contains only an update of the\nhash fragment of the current URL."),(0,n.kt)("h4",{id:"parameters-12"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"targetUrl")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The target URL.")))),(0,n.kt)("h4",{id:"returns-14"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"true")," if the navigation to target URL would\nresult only in updating the hash fragment of the current URL."),(0,n.kt)("h4",{id:"defined-in-29"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L436"},"packages/core/src/router/ClientRouter.ts:436")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_issamedomain"},"_","isSameDomain"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_isSameDomain"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"url?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,"Tests whether the the protocol and domain of the provided URL are the\nsame as the current."),(0,n.kt)("h4",{id:"parameters-13"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Default value"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"url?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"''")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The URL.")))),(0,n.kt)("h4",{id:"returns-15"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"true")," if the protocol and domain of the\nprovided URL are the same as the current."),(0,n.kt)("h4",{id:"defined-in-30"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L459"},"packages/core/src/router/ClientRouter.ts:459")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_runmiddlewares"},"_","runMiddlewares"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_runMiddlewares"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"middlewares"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"params"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"locals"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,n.kt)("p",null,"Runs provided middlewares in sequence."),(0,n.kt)("h4",{id:"parameters-14"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"middlewares")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),"[]"),(0,n.kt)("td",{parentName:"tr",align:"left"},"Array of middlewares.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"params")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteParams"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Router params that can be mutated by middlewares.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"locals")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteLocals"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteLocals"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The locals param is used to pass local data between middlewares.")))),(0,n.kt)("h4",{id:"returns-16"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,n.kt)("h4",{id:"inherited-from-17"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_runmiddlewares"},"_runMiddlewares")),(0,n.kt)("h4",{id:"defined-in-31"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L677"},"packages/core/src/router/AbstractRouter.ts:677")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"add"},"add"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"add"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"pathExpression"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"controller"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"view"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"Adds a new route to router."),(0,n.kt)("h4",{id:"parameters-15"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"name")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The unique name of this route, identifying it among the rest of the routes in the application.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"pathExpression")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"A path expression specifying the URL path part matching this route (must not contain a query string), optionally containing named parameter placeholders specified as ",(0,n.kt)("inlineCode",{parentName:"td"},":parameterName"),". The name of the parameter is terminated by a forward slash (",(0,n.kt)("inlineCode",{parentName:"td"},"/"),") or the end of the path expression string. The path expression may also contain optional parameters, which are specified as ",(0,n.kt)("inlineCode",{parentName:"td"},":?parameterName"),". It is recommended to specify the optional parameters at the end of the path expression.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"controller")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#asyncroutecontroller"},(0,n.kt)("inlineCode",{parentName:"a"},"AsyncRouteController"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The full name of Object Container alias identifying the controller associated with this route.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"view")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#asyncrouteview"},(0,n.kt)("inlineCode",{parentName:"a"},"AsyncRouteView"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The full name or Object Container alias identifying the view class associated with this route.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"options?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Partial"),"<",(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions")),">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"Additional route options, specified how the navigation to the route will be handled. The ",(0,n.kt)("inlineCode",{parentName:"td"},"onlyUpdate")," can be either a flag signalling whether the current controller and view instances should be kept if they match the ones used by the previous route; or a callback function that will receive the previous controller and view identifiers used in the previously matching route, and returns a ",(0,n.kt)("inlineCode",{parentName:"td"},"boolean")," representing the value of the flag. This flag is disabled by default. The ",(0,n.kt)("inlineCode",{parentName:"td"},"autoScroll")," flag signals whether the page should be scrolled to the top when the navigation takes place. This flag is enabled by default.")))),(0,n.kt)("h4",{id:"returns-17"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"This router."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Throws"))),(0,n.kt)("p",null,"Thrown if a route with the same name already exists."),(0,n.kt)("h4",{id:"inherited-from-18"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#add"},"add")),(0,n.kt)("h4",{id:"defined-in-32"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L167"},"packages/core/src/router/AbstractRouter.ts:167")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getbaseurl"},"getBaseUrl"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getBaseUrl"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Returns the application's absolute base URL, pointing to the public root\nof the application."),(0,n.kt)("h4",{id:"returns-18"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"The application's base URL."),(0,n.kt)("h4",{id:"inherited-from-19"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getbaseurl"},"getBaseUrl")),(0,n.kt)("h4",{id:"defined-in-33"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L243"},"packages/core/src/router/AbstractRouter.ts:243")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getcurrentrouteinfo"},"getCurrentRouteInfo"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getCurrentRouteInfo"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"Object")),(0,n.kt)("p",null,"Returns the information about the currently active route."),(0,n.kt)("h4",{id:"returns-19"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Object")),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"params")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteParams")),"<{}",">")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"path")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string"))),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"route")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">")))),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Throws"))),(0,n.kt)("p",null,"Thrown if a route is not define for current path."),(0,n.kt)("h4",{id:"inherited-from-20"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getcurrentrouteinfo"},"getCurrentRouteInfo")),(0,n.kt)("h4",{id:"defined-in-34"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L271"},"packages/core/src/router/AbstractRouter.ts:271")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getdomain"},"getDomain"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getDomain"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Returns the application's domain in the following form\n",(0,n.kt)("inlineCode",{parentName:"p"},"${protocol}//${host}"),"."),(0,n.kt)("h4",{id:"returns-20"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"The current application's domain."),(0,n.kt)("h4",{id:"inherited-from-21"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getdomain"},"getDomain")),(0,n.kt)("h4",{id:"defined-in-35"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L250"},"packages/core/src/router/AbstractRouter.ts:250")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"gethost"},"getHost"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getHost"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Returns application's host (domain and, if necessary, the port number)."),(0,n.kt)("h4",{id:"returns-21"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"The current application's host."),(0,n.kt)("h4",{id:"inherited-from-22"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#gethost"},"getHost")),(0,n.kt)("h4",{id:"defined-in-36"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L257"},"packages/core/src/router/AbstractRouter.ts:257")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getpath"},"getPath"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getPath"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Returns the current path part of the current URL, including the query\nstring (if any)."),(0,n.kt)("h4",{id:"returns-22"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"The path and query parts of the current URL."),(0,n.kt)("h4",{id:"overrides-1"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getpath"},"getPath")),(0,n.kt)("h4",{id:"defined-in-37"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L120"},"packages/core/src/router/ClientRouter.ts:120")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getprotocol"},"getProtocol"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getProtocol"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Returns the current protocol used to access the application, terminated\nby a colon (for example ",(0,n.kt)("inlineCode",{parentName:"p"},"https:"),")."),(0,n.kt)("h4",{id:"returns-23"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"The current application protocol used to access the\napplication."),(0,n.kt)("h4",{id:"inherited-from-23"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getprotocol"},"getProtocol")),(0,n.kt)("h4",{id:"defined-in-38"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L264"},"packages/core/src/router/AbstractRouter.ts:264")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getroutehandler"},"getRouteHandler"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getRouteHandler"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">"," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware"))),(0,n.kt)("p",null,"Returns specified handler from registered route handlers."),(0,n.kt)("h4",{id:"parameters-16"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"name")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The route's unique name.")))),(0,n.kt)("h4",{id:"returns-24"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">"," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware"))),(0,n.kt)("p",null,"Route with given name or undefined."),(0,n.kt)("h4",{id:"inherited-from-24"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getroutehandler"},"getRouteHandler")),(0,n.kt)("h4",{id:"defined-in-39"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L220"},"packages/core/src/router/AbstractRouter.ts:220")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getroutehandlers"},"getRouteHandlers"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getRouteHandlers"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"Map"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">"," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),">"),(0,n.kt)("h4",{id:"returns-25"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Map"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">"," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Inherit Doc"))),(0,n.kt)("h4",{id:"inherited-from-25"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getroutehandlers"},"getRouteHandlers")),(0,n.kt)("h4",{id:"defined-in-40"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L297"},"packages/core/src/router/AbstractRouter.ts:297")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getroutehandlersbypath"},"getRouteHandlersByPath"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getRouteHandlersByPath"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"path"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Object")),(0,n.kt)("p",null,"Returns the route matching the provided URL path part (the path may\ncontain a query) and all middlewares preceding this route definition."),(0,n.kt)("h4",{id:"parameters-17"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"path")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The URL path.")))),(0,n.kt)("h4",{id:"returns-26"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Object")),(0,n.kt)("p",null,"The route\nmatching the path and middlewares preceding it or ",(0,n.kt)("inlineCode",{parentName:"p"},"{}"),"\n(empty object) if no such route exists."),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"middlewares")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),"[]")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"route?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">")))),(0,n.kt)("h4",{id:"inherited-from-26"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getroutehandlersbypath"},"getRouteHandlersByPath")),(0,n.kt)("h4",{id:"defined-in-41"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L615"},"packages/core/src/router/AbstractRouter.ts:615")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"geturl"},"getUrl"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getUrl"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Returns the current absolute URL (including protocol, host, query, etc)."),(0,n.kt)("h4",{id:"returns-27"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"The current absolute URL."),(0,n.kt)("h4",{id:"overrides-2"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#geturl"},"getUrl")),(0,n.kt)("h4",{id:"defined-in-42"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L113"},"packages/core/src/router/ClientRouter.ts:113")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"handleerror"},"handleError"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"handleError"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"params"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"options?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"locals?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,'Handles an internal server error by responding with the appropriate\n"internal server error" error page.'),(0,n.kt)("h4",{id:"parameters-18"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"params")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteParams"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Parameters extracted from the current URL path and query.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"options?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Partial"),"<",(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions")),">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"The options overrides route options defined in the ",(0,n.kt)("inlineCode",{parentName:"td"},"routes.js")," configuration file.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"locals?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteLocals"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteLocals"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The locals param is used to pass local data between middlewares.")))),(0,n.kt)("h4",{id:"returns-28"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,"A promise resolved when the error\nhas been handled and the response has been sent to the client,\nor displayed if used at the client side."),(0,n.kt)("h4",{id:"overrides-3"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#handleerror"},"handleError")),(0,n.kt)("h4",{id:"defined-in-43"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L233"},"packages/core/src/router/ClientRouter.ts:233")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"handlenotfound"},"handleNotFound"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"handleNotFound"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"params"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"options?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"locals?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,'Handles a "not found" error by responding with the appropriate "not\nfound" error page.'),(0,n.kt)("h4",{id:"parameters-19"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"params")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#stringparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"StringParameters"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Parameters extracted from the current URL path and query.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"options")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Object")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The options overrides route options defined in the ",(0,n.kt)("inlineCode",{parentName:"td"},"routes.js")," configuration file.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"locals")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Object")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The locals param is used to pass local data between middlewares.")))),(0,n.kt)("h4",{id:"returns-29"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,"A promise resolved\nwhen the error has been handled and the response has been sent\nto the client, or displayed if used at the client side."),(0,n.kt)("h4",{id:"overrides-4"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#handlenotfound"},"handleNotFound")),(0,n.kt)("h4",{id:"defined-in-44"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L293"},"packages/core/src/router/ClientRouter.ts:293")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"init"},"init"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"init"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"config"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"Initializes the router with the provided configuration."),(0,n.kt)("h4",{id:"parameters-20"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"config")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Object")),(0,n.kt)("td",{parentName:"tr",align:"left"},"Router configuration. The ",(0,n.kt)("inlineCode",{parentName:"td"},"$Protocol")," field must be the current protocol used to access the application, terminated by a colon (for example ",(0,n.kt)("inlineCode",{parentName:"td"},"https:"),"). The ",(0,n.kt)("inlineCode",{parentName:"td"},"$Root")," field must specify the URL path pointing to the application's root. The ",(0,n.kt)("inlineCode",{parentName:"td"},"$LanguagePartPath")," field must be the URL path fragment used as a suffix to the ",(0,n.kt)("inlineCode",{parentName:"td"},"$Root")," field that specifies the current language. The ",(0,n.kt)("inlineCode",{parentName:"td"},"$Host")," field must be the application's domain (and the port number if other than the default is used) in the following form: ",(0,n.kt)("inlineCode",{parentName:"td"},"${protocol}//${host}"),".")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"config.$Host")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"-")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"config.$LanguagePartPath")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"-")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"config.$Protocol")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"-")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"config.$Root")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"-")))),(0,n.kt)("h4",{id:"returns-30"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("h4",{id:"overrides-5"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#init"},"init")),(0,n.kt)("h4",{id:"defined-in-45"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L97"},"packages/core/src/router/ClientRouter.ts:97")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"isclienterror"},"isClientError"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"isClientError"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"reason"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,"Tests, if possible, whether the specified error was caused by the\nclient's action (for example wrong URL or request encoding) or by a\nfailure at the server side."),(0,n.kt)("h4",{id:"parameters-21"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"reason")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Error")," ","|"," ",(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Error"},(0,n.kt)("inlineCode",{parentName:"a"},"Error"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The encountered error.")))),(0,n.kt)("h4",{id:"returns-31"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"true")," if the error was caused the action of the\nclient."),(0,n.kt)("h4",{id:"inherited-from-27"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#isclienterror"},"isClientError")),(0,n.kt)("h4",{id:"defined-in-46"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L507"},"packages/core/src/router/AbstractRouter.ts:507")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"isredirection"},"isRedirection"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"isRedirection"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"reason"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,"Tests, if possible, whether the specified error lead to redirection."),(0,n.kt)("h4",{id:"parameters-22"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"reason")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Error")," ","|"," ",(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Error"},(0,n.kt)("inlineCode",{parentName:"a"},"Error"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The encountered error.")))),(0,n.kt)("h4",{id:"returns-32"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"true")," if the error was caused the action of the\nredirection."),(0,n.kt)("h4",{id:"inherited-from-28"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#isredirection"},"isRedirection")),(0,n.kt)("h4",{id:"defined-in-47"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L514"},"packages/core/src/router/AbstractRouter.ts:514")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"link"},"link"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"link"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"routeName"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"params"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Generates an absolute URL (including protocol, domain, etc) for the\nspecified route by substituting the route's parameter placeholders with\nthe provided parameter values."),(0,n.kt)("h4",{id:"parameters-23"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"routeName")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The unique name of the route, identifying the route to use.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"params")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteParams"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Parameter values for the route's parameter placeholders. Extraneous parameters will be added as URL query.")))),(0,n.kt)("h4",{id:"returns-33"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"An absolute URL for the specified route and parameters."),(0,n.kt)("h4",{id:"inherited-from-29"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#link"},"link")),(0,n.kt)("h4",{id:"defined-in-48"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L338"},"packages/core/src/router/AbstractRouter.ts:338")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"listen"},"listen"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"listen"),"(): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,'Registers event listeners at the client side window object allowing the\nrouter to capture user\'s history (history pop state - going "back") and\npage (clicking links) navigation.'),(0,n.kt)("p",null,"The router will start processing the navigation internally, handling the\nuser's navigation to display the page related to the URL resulting from\nthe user's action."),(0,n.kt)("p",null,"Note that the router will not prevent forms from being submitted to the\nserver."),(0,n.kt)("p",null,"The effects of this method can be reverted with ",(0,n.kt)("inlineCode",{parentName:"p"},"unlisten"),". This\nmethod has no effect at the server side."),(0,n.kt)("h4",{id:"returns-34"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"This router."),(0,n.kt)("h4",{id:"overrides-6"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#listen"},"listen")),(0,n.kt)("h4",{id:"defined-in-49"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L127"},"packages/core/src/router/ClientRouter.ts:127")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"redirect"},"redirect"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"redirect"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"url"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"options?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"action?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"locals?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("p",null,"Redirects the client to the specified location."),(0,n.kt)("p",null,"At the server side the method results in responding to the client with a\nredirect HTTP status code and the ",(0,n.kt)("inlineCode",{parentName:"p"},"Location")," header."),(0,n.kt)("p",null,"At the client side the method updates the current URL by manipulating\nthe browser history (if the target URL is at the same domain and\nprotocol as the current one) or performs a hard redirect (if the target\nURL points to a different protocol or domain)."),(0,n.kt)("p",null,"The method will result in the router handling the new URL and routing\nthe client to the related page if the URL is set at the client side and\npoints to the same domain and protocol."),(0,n.kt)("h4",{id:"parameters-24"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"url")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The URL to which the client should be redirected.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"options?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Partial"),"<",(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions")),">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"The options overrides route options defined in the ",(0,n.kt)("inlineCode",{parentName:"td"},"routes.js")," configuration file.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"action?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteAction"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteAction"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"An action object describing what triggered this routing.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"locals?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteLocals"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteLocals"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The locals param is used to pass local data between middlewares.")))),(0,n.kt)("h4",{id:"returns-35"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"overrides-7"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#redirect"},"redirect")),(0,n.kt)("h4",{id:"defined-in-50"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L169"},"packages/core/src/router/ClientRouter.ts:169")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"remove"},"remove"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"remove"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"Removes the specified route from the router's known routes."),(0,n.kt)("h4",{id:"parameters-25"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"name")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The route's unique name, identifying the route to remove.")))),(0,n.kt)("h4",{id:"returns-36"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"This router."),(0,n.kt)("h4",{id:"inherited-from-30"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#remove"},"remove")),(0,n.kt)("h4",{id:"defined-in-51"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L211"},"packages/core/src/router/AbstractRouter.ts:211")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"route"},"route"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"route"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"path"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"options?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"action?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"locals?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,"Routes the application to the route matching the providing path, renders\nthe route page and sends the result to the client."),(0,n.kt)("h4",{id:"parameters-26"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"path")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The URL path part received from the client, with optional query.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"options?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Partial"),"<",(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions")),">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"The options overrides route options defined in the ",(0,n.kt)("inlineCode",{parentName:"td"},"routes.js")," configuration file.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"action?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteAction"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteAction"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"An action object describing what triggered this routing.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"locals?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteLocals"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteLocals"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The locals param is used to pass local data between middlewares.")))),(0,n.kt)("h4",{id:"returns-37"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,"A promise resolved\nwhen the error has been handled and the response has been sent\nto the client, or displayed if used at the client side."),(0,n.kt)("h4",{id:"overrides-8"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#route"},"route")),(0,n.kt)("h4",{id:"defined-in-52"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L198"},"packages/core/src/router/ClientRouter.ts:198")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"unlisten"},"unlisten"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"unlisten"),"(): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,'Unregisters event listeners at the client side window object allowing the\nrouter to capture user\'s history (history pop state - going "back") and\npage (clicking links) navigation.'),(0,n.kt)("p",null,"The router will stop processing the navigation internally, handling the\nuser's navigation to display the page related to the URL resulting from\nthe user's action."),(0,n.kt)("p",null,"Note that the router will not prevent forms from being submitted to the\nserver."),(0,n.kt)("p",null,"The effects of this method can be reverted with ",(0,n.kt)("inlineCode",{parentName:"p"},"unlisten"),". This method has no effect\nat the server side."),(0,n.kt)("h4",{id:"returns-38"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"This router."),(0,n.kt)("h4",{id:"overrides-9"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#unlisten"},"unlisten")),(0,n.kt)("h4",{id:"defined-in-53"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/ClientRouter.ts#L148"},"packages/core/src/router/ClientRouter.ts:148")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"use"},"use"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"use"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"middleware"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"Adds a new middleware to router."),(0,n.kt)("h4",{id:"parameters-27"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"middleware")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Middleware function accepting routeParams as a first argument, which can be mutated and ",(0,n.kt)("inlineCode",{parentName:"td"},"locals")," object as second argument. This can be used to pass data between middlewares.")))),(0,n.kt)("h4",{id:"returns-39"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"This router."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Throws"))),(0,n.kt)("p",null,"Thrown if a middleware with the same name already exists."),(0,n.kt)("h4",{id:"inherited-from-31"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#use"},"use")),(0,n.kt)("h4",{id:"defined-in-54"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRouter.ts#L199"},"packages/core/src/router/AbstractRouter.ts:199")))}u.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[7711],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>h});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var p=r.createContext({}),d=function(e){var t=r.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},s=function(e){var t=d(e.components);return r.createElement(p.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,p=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),m=d(a),k=n,h=m["".concat(p,".").concat(k)]||m[k]||u[k]||i;return a?r.createElement(h,l(l({ref:t},s),{},{components:a})):r.createElement(h,l({ref:t},s))}));function h(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,l=new Array(i);l[0]=k;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[m]="string"==typeof e?e:n,l[1]=o;for(var d=2;d{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var r=a(5773),n=(a(7294),a(3905));const i={id:"ima_core.ClientRouter",title:"Class: ClientRouter",sidebar_label:"@ima/core.ClientRouter",custom_edit_url:null},l=void 0,o={unversionedId:"api/classes/ima_core.ClientRouter",id:"api/classes/ima_core.ClientRouter",title:"Class: ClientRouter",description:"@ima/core.ClientRouter",source:"@site/../docs/api/classes/ima_core.ClientRouter.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.ClientRouter",permalink:"/api/classes/ima_core.ClientRouter",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.ClientRouter",title:"Class: ClientRouter",sidebar_label:"@ima/core.ClientRouter",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.ClientPageManager",permalink:"/api/classes/ima_core.ClientPageManager"},next:{title:"@ima/core.ClientWindow",permalink:"/api/classes/ima_core.ClientWindow"}},p={},d=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"_currentMiddlewareId",id:"_currentmiddlewareid",level:3},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"_currentlyRoutedPath",id:"_currentlyroutedpath",level:3},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"_dispatcher",id:"_dispatcher",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"_factory",id:"_factory",level:3},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"_host",id:"_host",level:3},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"_isSPARouted",id:"_issparouted",level:3},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"_languagePartPath",id:"_languagepartpath",level:3},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"_middlewareTimeout",id:"_middlewaretimeout",level:3},{value:"Inherited from",id:"inherited-from-7",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"_mountedPromise",id:"_mountedpromise",level:3},{value:"Defined in",id:"defined-in-9",level:4},{value:"_pageManager",id:"_pagemanager",level:3},{value:"Inherited from",id:"inherited-from-8",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"_protocol",id:"_protocol",level:3},{value:"Inherited from",id:"inherited-from-9",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"_root",id:"_root",level:3},{value:"Inherited from",id:"inherited-from-10",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"_routeHandlers",id:"_routehandlers",level:3},{value:"Inherited from",id:"inherited-from-11",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"_window",id:"_window",level:3},{value:"Defined in",id:"defined-in-14",level:4},{value:"Accessors",id:"accessors",level:2},{value:"$dependencies",id:"dependencies",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"Methods",id:"methods",level:2},{value:"#addParamsFromOriginalRoute",id:"addparamsfromoriginalroute",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Inherited from",id:"inherited-from-12",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"#handleMounted",id:"handlemounted",level:3},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"#isSPARouted",id:"issparouted",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-18",level:4},{value:"_boundHandleClick",id:"_boundhandleclick",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"_boundHandlePopState",id:"_boundhandlepopstate",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"_extractRoutePath",id:"_extractroutepath",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Inherited from",id:"inherited-from-13",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"_getAnchorElement",id:"_getanchorelement",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-7",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"_getCurrentlyRoutedPath",id:"_getcurrentlyroutedpath",level:3},{value:"Returns",id:"returns-8",level:4},{value:"Inherited from",id:"inherited-from-14",level:4},{value:"Defined in",id:"defined-in-23",level:4},{value:"_getMiddlewaresForRoute",id:"_getmiddlewaresforroute",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-9",level:4},{value:"Inherited from",id:"inherited-from-15",level:4},{value:"Defined in",id:"defined-in-24",level:4},{value:"_handle",id:"_handle",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-10",level:4},{value:"Inherited from",id:"inherited-from-16",level:4},{value:"Defined in",id:"defined-in-25",level:4},{value:"_handleClick",id:"_handleclick",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-11",level:4},{value:"Defined in",id:"defined-in-26",level:4},{value:"_handleFatalError",id:"_handlefatalerror",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-12",level:4},{value:"Defined in",id:"defined-in-27",level:4},{value:"_handlePopState",id:"_handlepopstate",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-13",level:4},{value:"Defined in",id:"defined-in-28",level:4},{value:"_isHashLink",id:"_ishashlink",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-14",level:4},{value:"Defined in",id:"defined-in-29",level:4},{value:"_isSameDomain",id:"_issamedomain",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-15",level:4},{value:"Defined in",id:"defined-in-30",level:4},{value:"_runMiddlewares",id:"_runmiddlewares",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-16",level:4},{value:"Inherited from",id:"inherited-from-17",level:4},{value:"Defined in",id:"defined-in-31",level:4},{value:"add",id:"add",level:3},{value:"Parameters",id:"parameters-15",level:4},{value:"Returns",id:"returns-17",level:4},{value:"Inherited from",id:"inherited-from-18",level:4},{value:"Defined in",id:"defined-in-32",level:4},{value:"getBaseUrl",id:"getbaseurl",level:3},{value:"Returns",id:"returns-18",level:4},{value:"Inherited from",id:"inherited-from-19",level:4},{value:"Defined in",id:"defined-in-33",level:4},{value:"getCurrentRouteInfo",id:"getcurrentrouteinfo",level:3},{value:"Returns",id:"returns-19",level:4},{value:"Inherited from",id:"inherited-from-20",level:4},{value:"Defined in",id:"defined-in-34",level:4},{value:"getDomain",id:"getdomain",level:3},{value:"Returns",id:"returns-20",level:4},{value:"Inherited from",id:"inherited-from-21",level:4},{value:"Defined in",id:"defined-in-35",level:4},{value:"getHost",id:"gethost",level:3},{value:"Returns",id:"returns-21",level:4},{value:"Inherited from",id:"inherited-from-22",level:4},{value:"Defined in",id:"defined-in-36",level:4},{value:"getPath",id:"getpath",level:3},{value:"Returns",id:"returns-22",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-37",level:4},{value:"getProtocol",id:"getprotocol",level:3},{value:"Returns",id:"returns-23",level:4},{value:"Inherited from",id:"inherited-from-23",level:4},{value:"Defined in",id:"defined-in-38",level:4},{value:"getRouteHandler",id:"getroutehandler",level:3},{value:"Parameters",id:"parameters-16",level:4},{value:"Returns",id:"returns-24",level:4},{value:"Inherited from",id:"inherited-from-24",level:4},{value:"Defined in",id:"defined-in-39",level:4},{value:"getRouteHandlers",id:"getroutehandlers",level:3},{value:"Returns",id:"returns-25",level:4},{value:"Inherited from",id:"inherited-from-25",level:4},{value:"Defined in",id:"defined-in-40",level:4},{value:"getRouteHandlersByPath",id:"getroutehandlersbypath",level:3},{value:"Parameters",id:"parameters-17",level:4},{value:"Returns",id:"returns-26",level:4},{value:"Inherited from",id:"inherited-from-26",level:4},{value:"Defined in",id:"defined-in-41",level:4},{value:"getUrl",id:"geturl",level:3},{value:"Returns",id:"returns-27",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-42",level:4},{value:"handleError",id:"handleerror",level:3},{value:"Parameters",id:"parameters-18",level:4},{value:"Returns",id:"returns-28",level:4},{value:"Overrides",id:"overrides-3",level:4},{value:"Defined in",id:"defined-in-43",level:4},{value:"handleNotFound",id:"handlenotfound",level:3},{value:"Parameters",id:"parameters-19",level:4},{value:"Returns",id:"returns-29",level:4},{value:"Overrides",id:"overrides-4",level:4},{value:"Defined in",id:"defined-in-44",level:4},{value:"init",id:"init",level:3},{value:"Parameters",id:"parameters-20",level:4},{value:"Returns",id:"returns-30",level:4},{value:"Overrides",id:"overrides-5",level:4},{value:"Defined in",id:"defined-in-45",level:4},{value:"isClientError",id:"isclienterror",level:3},{value:"Parameters",id:"parameters-21",level:4},{value:"Returns",id:"returns-31",level:4},{value:"Inherited from",id:"inherited-from-27",level:4},{value:"Defined in",id:"defined-in-46",level:4},{value:"isRedirection",id:"isredirection",level:3},{value:"Parameters",id:"parameters-22",level:4},{value:"Returns",id:"returns-32",level:4},{value:"Inherited from",id:"inherited-from-28",level:4},{value:"Defined in",id:"defined-in-47",level:4},{value:"link",id:"link",level:3},{value:"Parameters",id:"parameters-23",level:4},{value:"Returns",id:"returns-33",level:4},{value:"Inherited from",id:"inherited-from-29",level:4},{value:"Defined in",id:"defined-in-48",level:4},{value:"listen",id:"listen",level:3},{value:"Returns",id:"returns-34",level:4},{value:"Overrides",id:"overrides-6",level:4},{value:"Defined in",id:"defined-in-49",level:4},{value:"redirect",id:"redirect",level:3},{value:"Parameters",id:"parameters-24",level:4},{value:"Returns",id:"returns-35",level:4},{value:"Overrides",id:"overrides-7",level:4},{value:"Defined in",id:"defined-in-50",level:4},{value:"remove",id:"remove",level:3},{value:"Parameters",id:"parameters-25",level:4},{value:"Returns",id:"returns-36",level:4},{value:"Inherited from",id:"inherited-from-30",level:4},{value:"Defined in",id:"defined-in-51",level:4},{value:"route",id:"route",level:3},{value:"Parameters",id:"parameters-26",level:4},{value:"Returns",id:"returns-37",level:4},{value:"Overrides",id:"overrides-8",level:4},{value:"Defined in",id:"defined-in-52",level:4},{value:"unlisten",id:"unlisten",level:3},{value:"Returns",id:"returns-38",level:4},{value:"Overrides",id:"overrides-9",level:4},{value:"Defined in",id:"defined-in-53",level:4},{value:"use",id:"use",level:3},{value:"Parameters",id:"parameters-27",level:4},{value:"Returns",id:"returns-39",level:4},{value:"Inherited from",id:"inherited-from-31",level:4},{value:"Defined in",id:"defined-in-54",level:4}],s={toc:d},m="wrapper";function u(e){let{components:t,...a}=e;return(0,n.kt)(m,(0,r.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".ClientRouter"),(0,n.kt)("p",null,"The client-side implementation of the ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Router"},"Router")," interface."),(0,n.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("p",{parentName:"li"},(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRouter"))),(0,n.kt)("p",{parentName:"li"},"\u21b3 ",(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"ClientRouter"))))),(0,n.kt)("h2",{id:"constructors"},"Constructors"),(0,n.kt)("h3",{id:"constructor"},"constructor"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("strong",{parentName:"p"},"new ClientRouter"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"pageManager"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"factory"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"dispatcher"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"window"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"settings"),")"),(0,n.kt)("p",null,"Initializes the client-side router."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"pageManager")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.PageManager"},(0,n.kt)("inlineCode",{parentName:"a"},"PageManager"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The page manager handling UI rendering, and transitions between pages if at the client side.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"factory")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.RouteFactory"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteFactory"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Factory for routes.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"dispatcher")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Dispatcher"},(0,n.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Dispatcher fires events to app.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"window")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Window"},(0,n.kt)("inlineCode",{parentName:"a"},"Window"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The current global client-side APIs provider.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"settings")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,n.kt)("inlineCode",{parentName:"td"},"number")," ","|"," { ",(0,n.kt)("inlineCode",{parentName:"td"},"isSPARouted?"),": (",(0,n.kt)("inlineCode",{parentName:"td"},"url"),": ",(0,n.kt)("inlineCode",{parentName:"td"},"string"),", ",(0,n.kt)("inlineCode",{parentName:"td"},"action?"),": ",(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteAction"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteAction")),") => ",(0,n.kt)("inlineCode",{parentName:"td"},"boolean")," ; ",(0,n.kt)("inlineCode",{parentName:"td"},"middlewareTimeout?"),": ",(0,n.kt)("inlineCode",{parentName:"td"},"number")," }"),(0,n.kt)("td",{parentName:"tr",align:"left"},"$Router settings.")))),(0,n.kt)("h4",{id:"overrides"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#constructor"},"constructor")),(0,n.kt)("h4",{id:"defined-in"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L79"},"packages/core/src/router/ClientRouter.ts:79")),(0,n.kt)("h2",{id:"properties"},"Properties"),(0,n.kt)("h3",{id:"_currentmiddlewareid"},"_","currentMiddlewareId"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","currentMiddlewareId"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"number")," = ",(0,n.kt)("inlineCode",{parentName:"p"},"0")),(0,n.kt)("p",null,"Middleware ID counter which is used to auto-generate unique middleware\nnames when adding them to routeHandlers map."),(0,n.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_currentmiddlewareid"},"_currentMiddlewareId")),(0,n.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L92"},"packages/core/src/router/AbstractRouter.ts:92")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_currentlyroutedpath"},"_","currentlyRoutedPath"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","currentlyRoutedPath"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," = ",(0,n.kt)("inlineCode",{parentName:"p"},"''")),(0,n.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_currentlyroutedpath"},"_currentlyRoutedPath")),(0,n.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L93"},"packages/core/src/router/AbstractRouter.ts:93")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_dispatcher"},"_","dispatcher"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","dispatcher"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,n.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,n.kt)("p",null,"Dispatcher fires events to app."),(0,n.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_dispatcher"},"_dispatcher")),(0,n.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L62"},"packages/core/src/router/AbstractRouter.ts:62")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_factory"},"_","factory"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","factory"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.RouteFactory"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteFactory"))),(0,n.kt)("p",null,"Factory for routes."),(0,n.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_factory"},"_factory")),(0,n.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L58"},"packages/core/src/router/AbstractRouter.ts:58")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_host"},"_","host"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","host"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," = ",(0,n.kt)("inlineCode",{parentName:"p"},"''")),(0,n.kt)("p",null,"The application's host."),(0,n.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_host"},"_host")),(0,n.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L71"},"packages/core/src/router/AbstractRouter.ts:71")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_issparouted"},"_","isSPARouted"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","isSPARouted"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," (",(0,n.kt)("inlineCode",{parentName:"p"},"url"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"action?"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteAction"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteAction")),") => ",(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_issparouted"},"_isSPARouted")),(0,n.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L95"},"packages/core/src/router/AbstractRouter.ts:95")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_languagepartpath"},"_","languagePartPath"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","languagePartPath"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," = ",(0,n.kt)("inlineCode",{parentName:"p"},"''")),(0,n.kt)("p",null,"The URL path fragment used as a suffix to the ",(0,n.kt)("inlineCode",{parentName:"p"},"_root")," field\nthat specifies the current language."),(0,n.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_languagepartpath"},"_languagePartPath")),(0,n.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L80"},"packages/core/src/router/AbstractRouter.ts:80")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_middlewaretimeout"},"_","middlewareTimeout"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","middlewareTimeout"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"number")),(0,n.kt)("h4",{id:"inherited-from-7"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_middlewaretimeout"},"_middlewareTimeout")),(0,n.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L94"},"packages/core/src/router/AbstractRouter.ts:94")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_mountedpromise"},"_","mountedPromise"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","mountedPromise"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"null")," ","|"," { ",(0,n.kt)("inlineCode",{parentName:"p"},"promise"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void"),">"," ; ",(0,n.kt)("inlineCode",{parentName:"p"},"reject"),": () => ",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ; ",(0,n.kt)("inlineCode",{parentName:"p"},"resolve"),": () => ",(0,n.kt)("inlineCode",{parentName:"p"},"void")," } = ",(0,n.kt)("inlineCode",{parentName:"p"},"null")),(0,n.kt)("p",null,"Mounted promise to prevent routing until app is fully mounted."),(0,n.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L53"},"packages/core/src/router/ClientRouter.ts:53")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_pagemanager"},"_","pageManager"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","pageManager"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageManager"},(0,n.kt)("inlineCode",{parentName:"a"},"PageManager"))),(0,n.kt)("p",null,"The page manager handling UI rendering, and transitions between\npages if at the client side."),(0,n.kt)("h4",{id:"inherited-from-8"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_pagemanager"},"_pageManager")),(0,n.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L54"},"packages/core/src/router/AbstractRouter.ts:54")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_protocol"},"_","protocol"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","protocol"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," = ",(0,n.kt)("inlineCode",{parentName:"p"},"''")),(0,n.kt)("p",null,"The current protocol used to access the application, terminated by a\ncolon (for example ",(0,n.kt)("inlineCode",{parentName:"p"},"https:"),")."),(0,n.kt)("h4",{id:"inherited-from-9"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_protocol"},"_protocol")),(0,n.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L67"},"packages/core/src/router/AbstractRouter.ts:67")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_root"},"_","root"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","root"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"string")," = ",(0,n.kt)("inlineCode",{parentName:"p"},"''")),(0,n.kt)("p",null,"The URL path pointing to the application's root."),(0,n.kt)("h4",{id:"inherited-from-10"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_root"},"_root")),(0,n.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L75"},"packages/core/src/router/AbstractRouter.ts:75")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_routehandlers"},"_","routeHandlers"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","routeHandlers"),": ",(0,n.kt)("inlineCode",{parentName:"p"},"Map"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">"," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),">"),(0,n.kt)("p",null,"Storage of all known routes and middlewares. The key are their names."),(0,n.kt)("h4",{id:"inherited-from-11"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_routehandlers"},"_routeHandlers")),(0,n.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L84"},"packages/core/src/router/AbstractRouter.ts:84")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_window"},"_","window"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_","window"),": ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,n.kt)("inlineCode",{parentName:"a"},"Window"))),(0,n.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L44"},"packages/core/src/router/ClientRouter.ts:44")),(0,n.kt)("h2",{id:"accessors"},"Accessors"),(0,n.kt)("h3",{id:"dependencies"},"$dependencies"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,n.kt)("inlineCode",{parentName:"p"},"get")," ",(0,n.kt)("strong",{parentName:"p"},"$dependencies"),"(): ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,n.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,n.kt)("h4",{id:"returns"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,n.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,n.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L59"},"packages/core/src/router/ClientRouter.ts:59")),(0,n.kt)("h2",{id:"methods"},"Methods"),(0,n.kt)("h3",{id:"addparamsfromoriginalroute"},"#addParamsFromOriginalRoute"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,n.kt)("strong",{parentName:"p"},"#addParamsFromOriginalRoute"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"params"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Object")),(0,n.kt)("p",null,"Obtains original route that was handled before not-found / error route\nand assigns its params to current params"),(0,n.kt)("h4",{id:"parameters-1"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"params")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteParams"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Route params for not-found or error page")))),(0,n.kt)("h4",{id:"returns-1"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Object")),(0,n.kt)("p",null,"Provided params merged with params\nfrom original route"),(0,n.kt)("h4",{id:"inherited-from-12"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter##addparamsfromoriginalroute"},"#addParamsFromOriginalRoute")),(0,n.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L733"},"packages/core/src/router/AbstractRouter.ts:733")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"handlemounted"},"#handleMounted"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,n.kt)("strong",{parentName:"p"},"#handleMounted"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"returns-2"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L476"},"packages/core/src/router/ClientRouter.ts:476")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"issparouted"},"#isSPARouted"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,n.kt)("strong",{parentName:"p"},"#isSPARouted"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"url?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"action?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,"This option allows user to override how certain URLs are handled\nduring SPA (client) routing. This adds possibility to opt-out\nof SPA routing for specific URLs and let them be handled by browser\nnatively."),(0,n.kt)("h4",{id:"parameters-2"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Default value"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"url?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"''")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The URL.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"action?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteAction"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteAction"))),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"undefined")),(0,n.kt)("td",{parentName:"tr",align:"left"},"-")))),(0,n.kt)("h4",{id:"returns-3"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"true")," if url routing should be handled by IMA."),(0,n.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L472"},"packages/core/src/router/ClientRouter.ts:472")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_boundhandleclick"},"_","boundHandleClick"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_boundHandleClick"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"parameters-3"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"event")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Event"))))),(0,n.kt)("h4",{id:"returns-4"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L45"},"packages/core/src/router/ClientRouter.ts:45")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_boundhandlepopstate"},"_","boundHandlePopState"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_boundHandlePopState"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"parameters-4"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"event")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Event"))))),(0,n.kt)("h4",{id:"returns-5"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L47"},"packages/core/src/router/ClientRouter.ts:47")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_extractroutepath"},"_","extractRoutePath"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,n.kt)("strong",{parentName:"p"},"_extractRoutePath"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"path"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Strips the URL path part that points to the application's root (base\nURL) from the provided path."),(0,n.kt)("h4",{id:"parameters-5"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"path")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"Relative or absolute URL path.")))),(0,n.kt)("h4",{id:"returns-6"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"URL path relative to the application's base URL."),(0,n.kt)("h4",{id:"inherited-from-13"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_extractroutepath"},"_extractRoutePath")),(0,n.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L526"},"packages/core/src/router/AbstractRouter.ts:526")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_getanchorelement"},"_","getAnchorElement"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_getAnchorElement"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"target"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Node")),(0,n.kt)("p",null,"The method determines whether an anchor element or a child of an anchor\nelement has been clicked, and if it was, the method returns anchor\nelement else null."),(0,n.kt)("h4",{id:"parameters-6"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"target")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Node"))))),(0,n.kt)("h4",{id:"returns-7"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Node")),(0,n.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L408"},"packages/core/src/router/ClientRouter.ts:408")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_getcurrentlyroutedpath"},"_","getCurrentlyRoutedPath"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_getCurrentlyRoutedPath"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Returns path that is stored in private property when a ",(0,n.kt)("inlineCode",{parentName:"p"},"route"),"\nmethod is called."),(0,n.kt)("h4",{id:"returns-8"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("h4",{id:"inherited-from-14"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_getcurrentlyroutedpath"},"_getCurrentlyRoutedPath")),(0,n.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L664"},"packages/core/src/router/AbstractRouter.ts:664")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_getmiddlewaresforroute"},"_","getMiddlewaresForRoute"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_getMiddlewaresForRoute"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"routeName"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),"[]"),(0,n.kt)("p",null,"Returns middlewares preceding given route name."),(0,n.kt)("h4",{id:"parameters-7"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"routeName")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string"))))),(0,n.kt)("h4",{id:"returns-9"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),"[]"),(0,n.kt)("h4",{id:"inherited-from-15"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_getmiddlewaresforroute"},"_getMiddlewaresForRoute")),(0,n.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L642"},"packages/core/src/router/AbstractRouter.ts:642")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_handle"},"_","handle"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_handle"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"route"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"params"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"options?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"action?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,"Handles the provided route and parameters by initializing the route's\ncontroller and rendering its state via the route's view."),(0,n.kt)("p",null,"The result is then sent to the client if used at the server side, or\ndisplayed if used as the client side."),(0,n.kt)("h4",{id:"parameters-8"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"route")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"The route that should have its associated controller rendered via the associated view.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"params")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteParams"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Parameters extracted from the URL path and query.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"options?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Partial"),"<",(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions")),">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"The options overrides route options defined in the ",(0,n.kt)("inlineCode",{parentName:"td"},"routes.js")," configuration file.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"action?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteAction"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteAction"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"An action object describing what triggered this routing.")))),(0,n.kt)("h4",{id:"returns-10"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,"A promise that resolves when the\npage is rendered and the result is sent to the client, or\ndisplayed if used at the client side."),(0,n.kt)("h4",{id:"inherited-from-16"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_handle"},"_handle")),(0,n.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L549"},"packages/core/src/router/AbstractRouter.ts:549")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_handleclick"},"_","handleClick"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_handleClick"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("p",null,"Handles a click event. The method performs navigation to the target\nlocation of the anchor (if it has one)."),(0,n.kt)("p",null,"The navigation will be handled by the router if the protocol and domain\nof the anchor's target location (href) is the same as the current,\notherwise the method results in a hard redirect."),(0,n.kt)("h4",{id:"parameters-9"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"event")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"MouseEvent")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The click event.")))),(0,n.kt)("h4",{id:"returns-11"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L350"},"packages/core/src/router/ClientRouter.ts:350")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_handlefatalerror"},"_","handleFatalError"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_handleFatalError"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"error"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("p",null,"Handle a fatal error application state. IMA handle fatal error when IMA\nhandle error."),(0,n.kt)("h4",{id:"parameters-10"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"error")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Error"))))),(0,n.kt)("h4",{id:"returns-12"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L305"},"packages/core/src/router/ClientRouter.ts:305")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_handlepopstate"},"_","handlePopState"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_handlePopState"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("p",null,"Handles a popstate event. The method is performed when the active history\nentry changes."),(0,n.kt)("p",null,"The navigation will be handled by the router if the event state is defined\nand event is not ",(0,n.kt)("inlineCode",{parentName:"p"},"defaultPrevented"),"."),(0,n.kt)("h4",{id:"parameters-11"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"event")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"PopStateEvent")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The popstate event.")))),(0,n.kt)("h4",{id:"returns-13"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L326"},"packages/core/src/router/ClientRouter.ts:326")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_ishashlink"},"_","isHashLink"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_isHashLink"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"targetUrl"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,"Tests whether the provided target URL contains only an update of the\nhash fragment of the current URL."),(0,n.kt)("h4",{id:"parameters-12"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"targetUrl")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The target URL.")))),(0,n.kt)("h4",{id:"returns-14"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"true")," if the navigation to target URL would\nresult only in updating the hash fragment of the current URL."),(0,n.kt)("h4",{id:"defined-in-29"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L436"},"packages/core/src/router/ClientRouter.ts:436")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_issamedomain"},"_","isSameDomain"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_isSameDomain"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"url?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,"Tests whether the the protocol and domain of the provided URL are the\nsame as the current."),(0,n.kt)("h4",{id:"parameters-13"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Default value"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"url?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"''")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The URL.")))),(0,n.kt)("h4",{id:"returns-15"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"true")," if the protocol and domain of the\nprovided URL are the same as the current."),(0,n.kt)("h4",{id:"defined-in-30"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L459"},"packages/core/src/router/ClientRouter.ts:459")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"_runmiddlewares"},"_","runMiddlewares"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"_runMiddlewares"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"middlewares"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"params"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"locals"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,n.kt)("p",null,"Runs provided middlewares in sequence."),(0,n.kt)("h4",{id:"parameters-14"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"middlewares")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),"[]"),(0,n.kt)("td",{parentName:"tr",align:"left"},"Array of middlewares.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"params")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteParams"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Router params that can be mutated by middlewares.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"locals")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteLocals"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteLocals"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The locals param is used to pass local data between middlewares.")))),(0,n.kt)("h4",{id:"returns-16"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,n.kt)("h4",{id:"inherited-from-17"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#_runmiddlewares"},"_runMiddlewares")),(0,n.kt)("h4",{id:"defined-in-31"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L677"},"packages/core/src/router/AbstractRouter.ts:677")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"add"},"add"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"add"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"pathExpression"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"controller"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"view"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"Adds a new route to router."),(0,n.kt)("h4",{id:"parameters-15"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"name")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The unique name of this route, identifying it among the rest of the routes in the application.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"pathExpression")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"A path expression specifying the URL path part matching this route (must not contain a query string), optionally containing named parameter placeholders specified as ",(0,n.kt)("inlineCode",{parentName:"td"},":parameterName"),". The name of the parameter is terminated by a forward slash (",(0,n.kt)("inlineCode",{parentName:"td"},"/"),") or the end of the path expression string. The path expression may also contain optional parameters, which are specified as ",(0,n.kt)("inlineCode",{parentName:"td"},":?parameterName"),". It is recommended to specify the optional parameters at the end of the path expression.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"controller")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#asyncroutecontroller"},(0,n.kt)("inlineCode",{parentName:"a"},"AsyncRouteController"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The full name of Object Container alias identifying the controller associated with this route.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"view")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#asyncrouteview"},(0,n.kt)("inlineCode",{parentName:"a"},"AsyncRouteView"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The full name or Object Container alias identifying the view class associated with this route.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"options?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Partial"),"<",(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions")),">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"Additional route options, specified how the navigation to the route will be handled. The ",(0,n.kt)("inlineCode",{parentName:"td"},"onlyUpdate")," can be either a flag signalling whether the current controller and view instances should be kept if they match the ones used by the previous route; or a callback function that will receive the previous controller and view identifiers used in the previously matching route, and returns a ",(0,n.kt)("inlineCode",{parentName:"td"},"boolean")," representing the value of the flag. This flag is disabled by default. The ",(0,n.kt)("inlineCode",{parentName:"td"},"autoScroll")," flag signals whether the page should be scrolled to the top when the navigation takes place. This flag is enabled by default.")))),(0,n.kt)("h4",{id:"returns-17"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"This router."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Throws"))),(0,n.kt)("p",null,"Thrown if a route with the same name already exists."),(0,n.kt)("h4",{id:"inherited-from-18"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#add"},"add")),(0,n.kt)("h4",{id:"defined-in-32"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L167"},"packages/core/src/router/AbstractRouter.ts:167")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getbaseurl"},"getBaseUrl"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getBaseUrl"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Returns the application's absolute base URL, pointing to the public root\nof the application."),(0,n.kt)("h4",{id:"returns-18"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"The application's base URL."),(0,n.kt)("h4",{id:"inherited-from-19"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getbaseurl"},"getBaseUrl")),(0,n.kt)("h4",{id:"defined-in-33"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L243"},"packages/core/src/router/AbstractRouter.ts:243")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getcurrentrouteinfo"},"getCurrentRouteInfo"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getCurrentRouteInfo"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"Object")),(0,n.kt)("p",null,"Returns the information about the currently active route."),(0,n.kt)("h4",{id:"returns-19"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Object")),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"params")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteParams")),"<{}",">")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"path")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string"))),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"route")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">")))),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Throws"))),(0,n.kt)("p",null,"Thrown if a route is not define for current path."),(0,n.kt)("h4",{id:"inherited-from-20"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getcurrentrouteinfo"},"getCurrentRouteInfo")),(0,n.kt)("h4",{id:"defined-in-34"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L271"},"packages/core/src/router/AbstractRouter.ts:271")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getdomain"},"getDomain"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getDomain"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Returns the application's domain in the following form\n",(0,n.kt)("inlineCode",{parentName:"p"},"${protocol}//${host}"),"."),(0,n.kt)("h4",{id:"returns-20"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"The current application's domain."),(0,n.kt)("h4",{id:"inherited-from-21"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getdomain"},"getDomain")),(0,n.kt)("h4",{id:"defined-in-35"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L250"},"packages/core/src/router/AbstractRouter.ts:250")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"gethost"},"getHost"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getHost"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Returns application's host (domain and, if necessary, the port number)."),(0,n.kt)("h4",{id:"returns-21"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"The current application's host."),(0,n.kt)("h4",{id:"inherited-from-22"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#gethost"},"getHost")),(0,n.kt)("h4",{id:"defined-in-36"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L257"},"packages/core/src/router/AbstractRouter.ts:257")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getpath"},"getPath"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getPath"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Returns the current path part of the current URL, including the query\nstring (if any)."),(0,n.kt)("h4",{id:"returns-22"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"The path and query parts of the current URL."),(0,n.kt)("h4",{id:"overrides-1"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getpath"},"getPath")),(0,n.kt)("h4",{id:"defined-in-37"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L120"},"packages/core/src/router/ClientRouter.ts:120")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getprotocol"},"getProtocol"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getProtocol"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Returns the current protocol used to access the application, terminated\nby a colon (for example ",(0,n.kt)("inlineCode",{parentName:"p"},"https:"),")."),(0,n.kt)("h4",{id:"returns-23"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"The current application protocol used to access the\napplication."),(0,n.kt)("h4",{id:"inherited-from-23"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getprotocol"},"getProtocol")),(0,n.kt)("h4",{id:"defined-in-38"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L264"},"packages/core/src/router/AbstractRouter.ts:264")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getroutehandler"},"getRouteHandler"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getRouteHandler"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">"," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware"))),(0,n.kt)("p",null,"Returns specified handler from registered route handlers."),(0,n.kt)("h4",{id:"parameters-16"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"name")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The route's unique name.")))),(0,n.kt)("h4",{id:"returns-24"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">"," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware"))),(0,n.kt)("p",null,"Route with given name or undefined."),(0,n.kt)("h4",{id:"inherited-from-24"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getroutehandler"},"getRouteHandler")),(0,n.kt)("h4",{id:"defined-in-39"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L220"},"packages/core/src/router/AbstractRouter.ts:220")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getroutehandlers"},"getRouteHandlers"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getRouteHandlers"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"Map"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">"," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),">"),(0,n.kt)("h4",{id:"returns-25"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Map"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">"," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),">"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Inherit Doc"))),(0,n.kt)("h4",{id:"inherited-from-25"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getroutehandlers"},"getRouteHandlers")),(0,n.kt)("h4",{id:"defined-in-40"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L297"},"packages/core/src/router/AbstractRouter.ts:297")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"getroutehandlersbypath"},"getRouteHandlersByPath"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getRouteHandlersByPath"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"path"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Object")),(0,n.kt)("p",null,"Returns the route matching the provided URL path part (the path may\ncontain a query) and all middlewares preceding this route definition."),(0,n.kt)("h4",{id:"parameters-17"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"path")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The URL path.")))),(0,n.kt)("h4",{id:"returns-26"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Object")),(0,n.kt)("p",null,"The route\nmatching the path and middlewares preceding it or ",(0,n.kt)("inlineCode",{parentName:"p"},"{}"),"\n(empty object) if no such route exists."),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"middlewares")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware")),"[]")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"route?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.AbstractRoute"},(0,n.kt)("inlineCode",{parentName:"a"},"AbstractRoute")),"<",(0,n.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routepathexpression"},(0,n.kt)("inlineCode",{parentName:"a"},"RoutePathExpression")),">")))),(0,n.kt)("h4",{id:"inherited-from-26"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#getroutehandlersbypath"},"getRouteHandlersByPath")),(0,n.kt)("h4",{id:"defined-in-41"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L615"},"packages/core/src/router/AbstractRouter.ts:615")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"geturl"},"getUrl"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"getUrl"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Returns the current absolute URL (including protocol, host, query, etc)."),(0,n.kt)("h4",{id:"returns-27"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"The current absolute URL."),(0,n.kt)("h4",{id:"overrides-2"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#geturl"},"getUrl")),(0,n.kt)("h4",{id:"defined-in-42"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L113"},"packages/core/src/router/ClientRouter.ts:113")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"handleerror"},"handleError"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"handleError"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"params"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"options?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"locals?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,'Handles an internal server error by responding with the appropriate\n"internal server error" error page.'),(0,n.kt)("h4",{id:"parameters-18"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"params")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteParams"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Parameters extracted from the current URL path and query.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"options?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Partial"),"<",(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions")),">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"The options overrides route options defined in the ",(0,n.kt)("inlineCode",{parentName:"td"},"routes.js")," configuration file.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"locals?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteLocals"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteLocals"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The locals param is used to pass local data between middlewares.")))),(0,n.kt)("h4",{id:"returns-28"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,"A promise resolved when the error\nhas been handled and the response has been sent to the client,\nor displayed if used at the client side."),(0,n.kt)("h4",{id:"overrides-3"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#handleerror"},"handleError")),(0,n.kt)("h4",{id:"defined-in-43"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L233"},"packages/core/src/router/ClientRouter.ts:233")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"handlenotfound"},"handleNotFound"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"handleNotFound"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"params"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"options?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"locals?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,'Handles a "not found" error by responding with the appropriate "not\nfound" error page.'),(0,n.kt)("h4",{id:"parameters-19"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"params")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#stringparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"StringParameters"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Parameters extracted from the current URL path and query.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"options")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Object")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The options overrides route options defined in the ",(0,n.kt)("inlineCode",{parentName:"td"},"routes.js")," configuration file.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"locals")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Object")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The locals param is used to pass local data between middlewares.")))),(0,n.kt)("h4",{id:"returns-29"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,"A promise resolved\nwhen the error has been handled and the response has been sent\nto the client, or displayed if used at the client side."),(0,n.kt)("h4",{id:"overrides-4"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#handlenotfound"},"handleNotFound")),(0,n.kt)("h4",{id:"defined-in-44"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L293"},"packages/core/src/router/ClientRouter.ts:293")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"init"},"init"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"init"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"config"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"Initializes the router with the provided configuration."),(0,n.kt)("h4",{id:"parameters-20"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"config")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Object")),(0,n.kt)("td",{parentName:"tr",align:"left"},"Router configuration. The ",(0,n.kt)("inlineCode",{parentName:"td"},"$Protocol")," field must be the current protocol used to access the application, terminated by a colon (for example ",(0,n.kt)("inlineCode",{parentName:"td"},"https:"),"). The ",(0,n.kt)("inlineCode",{parentName:"td"},"$Root")," field must specify the URL path pointing to the application's root. The ",(0,n.kt)("inlineCode",{parentName:"td"},"$LanguagePartPath")," field must be the URL path fragment used as a suffix to the ",(0,n.kt)("inlineCode",{parentName:"td"},"$Root")," field that specifies the current language. The ",(0,n.kt)("inlineCode",{parentName:"td"},"$Host")," field must be the application's domain (and the port number if other than the default is used) in the following form: ",(0,n.kt)("inlineCode",{parentName:"td"},"${protocol}//${host}"),".")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"config.$Host")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"-")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"config.$LanguagePartPath")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"-")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"config.$Protocol")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"-")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"config.$Root")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"-")))),(0,n.kt)("h4",{id:"returns-30"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("h4",{id:"overrides-5"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#init"},"init")),(0,n.kt)("h4",{id:"defined-in-45"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L97"},"packages/core/src/router/ClientRouter.ts:97")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"isclienterror"},"isClientError"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"isClientError"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"reason"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,"Tests, if possible, whether the specified error was caused by the\nclient's action (for example wrong URL or request encoding) or by a\nfailure at the server side."),(0,n.kt)("h4",{id:"parameters-21"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"reason")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Error")," ","|"," ",(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Error"},(0,n.kt)("inlineCode",{parentName:"a"},"Error"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The encountered error.")))),(0,n.kt)("h4",{id:"returns-31"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"true")," if the error was caused the action of the\nclient."),(0,n.kt)("h4",{id:"inherited-from-27"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#isclienterror"},"isClientError")),(0,n.kt)("h4",{id:"defined-in-46"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L507"},"packages/core/src/router/AbstractRouter.ts:507")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"isredirection"},"isRedirection"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"isRedirection"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"reason"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,"Tests, if possible, whether the specified error lead to redirection."),(0,n.kt)("h4",{id:"parameters-22"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"reason")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Error")," ","|"," ",(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Error"},(0,n.kt)("inlineCode",{parentName:"a"},"Error"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The encountered error.")))),(0,n.kt)("h4",{id:"returns-32"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"boolean")),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"true")," if the error was caused the action of the\nredirection."),(0,n.kt)("h4",{id:"inherited-from-28"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#isredirection"},"isRedirection")),(0,n.kt)("h4",{id:"defined-in-47"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L514"},"packages/core/src/router/AbstractRouter.ts:514")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"link"},"link"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"link"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"routeName"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"params"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"Generates an absolute URL (including protocol, domain, etc) for the\nspecified route by substituting the route's parameter placeholders with\nthe provided parameter values."),(0,n.kt)("h4",{id:"parameters-23"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"routeName")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The unique name of the route, identifying the route to use.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"params")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteParams"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Parameter values for the route's parameter placeholders. Extraneous parameters will be added as URL query.")))),(0,n.kt)("h4",{id:"returns-33"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"string")),(0,n.kt)("p",null,"An absolute URL for the specified route and parameters."),(0,n.kt)("h4",{id:"inherited-from-29"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#link"},"link")),(0,n.kt)("h4",{id:"defined-in-48"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L338"},"packages/core/src/router/AbstractRouter.ts:338")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"listen"},"listen"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"listen"),"(): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,'Registers event listeners at the client side window object allowing the\nrouter to capture user\'s history (history pop state - going "back") and\npage (clicking links) navigation.'),(0,n.kt)("p",null,"The router will start processing the navigation internally, handling the\nuser's navigation to display the page related to the URL resulting from\nthe user's action."),(0,n.kt)("p",null,"Note that the router will not prevent forms from being submitted to the\nserver."),(0,n.kt)("p",null,"The effects of this method can be reverted with ",(0,n.kt)("inlineCode",{parentName:"p"},"unlisten"),". This\nmethod has no effect at the server side."),(0,n.kt)("h4",{id:"returns-34"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"This router."),(0,n.kt)("h4",{id:"overrides-6"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#listen"},"listen")),(0,n.kt)("h4",{id:"defined-in-49"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L127"},"packages/core/src/router/ClientRouter.ts:127")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"redirect"},"redirect"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"redirect"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"url"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"options?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"action?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"locals?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("p",null,"Redirects the client to the specified location."),(0,n.kt)("p",null,"At the server side the method results in responding to the client with a\nredirect HTTP status code and the ",(0,n.kt)("inlineCode",{parentName:"p"},"Location")," header."),(0,n.kt)("p",null,"At the client side the method updates the current URL by manipulating\nthe browser history (if the target URL is at the same domain and\nprotocol as the current one) or performs a hard redirect (if the target\nURL points to a different protocol or domain)."),(0,n.kt)("p",null,"The method will result in the router handling the new URL and routing\nthe client to the related page if the URL is set at the client side and\npoints to the same domain and protocol."),(0,n.kt)("h4",{id:"parameters-24"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"url")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The URL to which the client should be redirected.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"options?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Partial"),"<",(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions")),">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"The options overrides route options defined in the ",(0,n.kt)("inlineCode",{parentName:"td"},"routes.js")," configuration file.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"action?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteAction"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteAction"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"An action object describing what triggered this routing.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"locals?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteLocals"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteLocals"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The locals param is used to pass local data between middlewares.")))),(0,n.kt)("h4",{id:"returns-35"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"overrides-7"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#redirect"},"redirect")),(0,n.kt)("h4",{id:"defined-in-50"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L169"},"packages/core/src/router/ClientRouter.ts:169")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"remove"},"remove"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"remove"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"Removes the specified route from the router's known routes."),(0,n.kt)("h4",{id:"parameters-25"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"name")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The route's unique name, identifying the route to remove.")))),(0,n.kt)("h4",{id:"returns-36"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"This router."),(0,n.kt)("h4",{id:"inherited-from-30"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#remove"},"remove")),(0,n.kt)("h4",{id:"defined-in-51"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L211"},"packages/core/src/router/AbstractRouter.ts:211")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"route"},"route"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"route"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"path"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"options?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"action?"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"locals?"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,"Routes the application to the route matching the providing path, renders\nthe route page and sends the result to the client."),(0,n.kt)("h4",{id:"parameters-26"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"path")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"string")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The URL path part received from the client, with optional query.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"options?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"Partial"),"<",(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions")),">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"The options overrides route options defined in the ",(0,n.kt)("inlineCode",{parentName:"td"},"routes.js")," configuration file.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"action?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteAction"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteAction"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"An action object describing what triggered this routing.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"locals?")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteLocals"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteLocals"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The locals param is used to pass local data between middlewares.")))),(0,n.kt)("h4",{id:"returns-37"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,n.kt)("p",null,"A promise resolved\nwhen the error has been handled and the response has been sent\nto the client, or displayed if used at the client side."),(0,n.kt)("h4",{id:"overrides-8"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#route"},"route")),(0,n.kt)("h4",{id:"defined-in-52"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L198"},"packages/core/src/router/ClientRouter.ts:198")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"unlisten"},"unlisten"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"unlisten"),"(): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,'Unregisters event listeners at the client side window object allowing the\nrouter to capture user\'s history (history pop state - going "back") and\npage (clicking links) navigation.'),(0,n.kt)("p",null,"The router will stop processing the navigation internally, handling the\nuser's navigation to display the page related to the URL resulting from\nthe user's action."),(0,n.kt)("p",null,"Note that the router will not prevent forms from being submitted to the\nserver."),(0,n.kt)("p",null,"The effects of this method can be reverted with ",(0,n.kt)("inlineCode",{parentName:"p"},"unlisten"),". This method has no effect\nat the server side."),(0,n.kt)("h4",{id:"returns-38"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"This router."),(0,n.kt)("h4",{id:"overrides-9"},"Overrides"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#unlisten"},"unlisten")),(0,n.kt)("h4",{id:"defined-in-53"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/ClientRouter.ts#L148"},"packages/core/src/router/ClientRouter.ts:148")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"use"},"use"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"use"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"middleware"),"): ",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"Adds a new middleware to router."),(0,n.kt)("h4",{id:"parameters-27"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"middleware")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routermiddleware"},(0,n.kt)("inlineCode",{parentName:"a"},"RouterMiddleware"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"Middleware function accepting routeParams as a first argument, which can be mutated and ",(0,n.kt)("inlineCode",{parentName:"td"},"locals")," object as second argument. This can be used to pass data between middlewares.")))),(0,n.kt)("h4",{id:"returns-39"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ClientRouter"},(0,n.kt)("inlineCode",{parentName:"a"},"ClientRouter"))),(0,n.kt)("p",null,"This router."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("inlineCode",{parentName:"strong"},"Throws"))),(0,n.kt)("p",null,"Thrown if a middleware with the same name already exists."),(0,n.kt)("h4",{id:"inherited-from-31"},"Inherited from"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter"),".",(0,n.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractRouter#use"},"use")),(0,n.kt)("h4",{id:"defined-in-54"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRouter.ts#L199"},"packages/core/src/router/AbstractRouter.ts:199")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1ba2ef78.82dfcd56.js b/assets/js/1ba2ef78.82dfcd56.js new file mode 100644 index 0000000000..1ce53fdc9c --- /dev/null +++ b/assets/js/1ba2ef78.82dfcd56.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4075],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>g});var o=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=o.createContext({}),p=function(e){var t=o.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return o.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=p(n),d=r,g=u["".concat(l,".").concat(d)]||u[d]||m[d]||a;return n?o.createElement(g,i(i({ref:t},c),{},{components:n})):o.createElement(g,i({ref:t},c))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:r,i[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>s,toc:()=>p});var o=n(5773),r=(n(7294),n(3905));const a={title:"Async Routing",description:"Basic features > Routing > Async Routing"},i=void 0,s={unversionedId:"basic-features/routing/async-routing",id:"basic-features/routing/async-routing",title:"Async Routing",description:"Basic features > Routing > Async Routing",source:"@site/../docs/basic-features/routing/async-routing.md",sourceDirName:"basic-features/routing",slug:"/basic-features/routing/async-routing",permalink:"/basic-features/routing/async-routing",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/basic-features/routing/async-routing.md",tags:[],version:"current",lastUpdatedBy:"PS",lastUpdatedAt:1736522400,formattedLastUpdatedAt:"Jan 10, 2025",frontMatter:{title:"Async Routing",description:"Basic features > Routing > Async Routing"},sidebar:"docs",previous:{title:"Middlewares",permalink:"/basic-features/routing/middlewares"},next:{title:"Extensions",permalink:"/basic-features/extensions"}},l={},p=[{value:"Merging view and controller imports into one",id:"merging-view-and-controller-imports-into-one",level:2},{value:"Preloading routeHandlers",id:"preloading-routehandlers",level:2},{value:"Prefetching/Preloading modules",id:"prefetchingpreloading-modules",level:3}],c={toc:p},u="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,o.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Async routing allows you to split views and controllers into separate bundles and load them dynamically. This can be useful for some specific routes, that are not visited regularly and contain large amounts of unique code."),(0,r.kt)("p",null,"To take advantage of this feature, you simply wrap your ",(0,r.kt)("a",{parentName:"p",href:"/basic-features/routing/introduction#controller"},(0,r.kt)("inlineCode",{parentName:"a"},"controller"))," and ",(0,r.kt)("a",{parentName:"p",href:"/basic-features/routing/introduction#view"},(0,r.kt)("inlineCode",{parentName:"a"},"view"))," arguments into ",(0,r.kt)("inlineCode",{parentName:"p"},"async")," function which calls a dynamic import():"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript",metastring:"title=./app/config/routes.js",title:"./app/config/routes.js"},"import { RouteNames } from '@ima/core';\n\nexport let init = (ns, oc, config) => {\n const router = oc.get('$Router');\n\n router\n .add(\n 'home',\n '/',\n async() => import('app/page/home/HomeController'),\n async() => import('app/page/home/HomeView')\n )\n}\n")),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"When using ",(0,r.kt)("strong",{parentName:"p"},"default exports"),", you don't have to explicitly set the import promise to the default export, the router does this by default."),(0,r.kt)("p",{parentName:"admonition"},"However when using named exports you need to let the router know, where is the controller/view located in the resolved promise:"),(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"async() => import('app/page/home/HomeView').then(module => module.HomeView);\n"))),(0,r.kt)("h2",{id:"merging-view-and-controller-imports-into-one"},"Merging view and controller imports into one"),(0,r.kt)("p",null,"Since the method above produces 2 separate JS chunk files (can depend on the actual environment). If you have really small controller and view files, you can help webpack in creating only one small chunk file which usually loads faster."),(0,r.kt)("p",null,"This can be done by exporting view and controller from the same file:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript",metastring:"title=./app/page/home/index.js",title:"./app/page/home/index.js"},"export { default as HomeView } from './HomeView';\nexport { default as HomeController } from './HomeController';\n")),(0,r.kt)("p",null,"And then merging those two dynamic imports into one:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript",metastring:"title=./app/config/routes.js",title:"./app/config/routes.js"},"import { RouteNames } from '@ima/core';\n\nconst homeModules = async () => import('app/page/home');\n\nexport let init = (ns, oc, config) => {\n const router = oc.get('$Router');\n\n router\n .add(\n 'home',\n '/',\n // highlight-next-line\n async () => homeModules().then(module => module.HomeController),\n // highlight-next-line\n async () => homeModules().then(module => module.HomeView)\n )\n}\n")),(0,r.kt)("h2",{id:"preloading-routehandlers"},"Preloading routeHandlers"),(0,r.kt)("p",null,"Each route handler exposes ",(0,r.kt)("inlineCode",{parentName:"p"},"preload()")," method, which can be used to programmatically trigger preload of the dynamic imports for specific route."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Use this in situations when the browser is idle and you want to preload some specific route handlers that the user will probably go next. This speeds up the responsiveness of your application dramatically.")),(0,r.kt)("p",null,"To call the ",(0,r.kt)("inlineCode",{parentName:"p"},"preload()")," method, ",(0,r.kt)("a",{parentName:"p",href:"/basic-features/routing/introduction#generating-links-outside-of-app-components"},"you first need to get access")," to the ",(0,r.kt)("inlineCode",{parentName:"p"},"Router")," instance (we can use ",(0,r.kt)("inlineCode",{parentName:"p"},"useComponentUtils")," hook in this example) and then you can use ",(0,r.kt)("inlineCode",{parentName:"p"},"getRouteHandler()")," method to get specific route handler instance. After that just call ",(0,r.kt)("inlineCode",{parentName:"p"},"preload()")," on this handler:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-jsx",metastring:"title=./app/config/routes.js",title:"./app/config/routes.js"},"import { useComponentUtils } from '@ima/react-hooks';\n\nexport default function Card() {\n const { $Router } = useComponentUtils();\n const homeRouteHandler = $Router.getRouteHandler('home');\n\n useEffect(() => {\n // highlight-next-line\n homeRouteHandler.preload();\n }, [])\n\n return (\n Home\n );\n}\n")),(0,r.kt)("p",null,"The method returns a promise, which resolves to tuple of ",(0,r.kt)("inlineCode",{parentName:"p"},"[controller, view]")," instances."),(0,r.kt)("h3",{id:"prefetchingpreloading-modules"},"Prefetching/Preloading modules"),(0,r.kt)("p",null,"As with the ",(0,r.kt)("a",{parentName:"p",href:"/advanced-features/dynamic-imports"},"dynamic imports"),", you can also use ",(0,r.kt)("a",{parentName:"p",href:"https://webpack.js.org/guides/code-splitting/#prefetchingpreloading-modules"},"webpack directives")," for prefetching and preloading. Simply use the inline commend as it is mentioned in the ",(0,r.kt)("a",{parentName:"p",href:"https://webpack.js.org/guides/code-splitting/#prefetchingpreloading-modules"},"webpack documentation"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript",metastring:"title=./app/config/routes.js",title:"./app/config/routes.js"},"// ...\nasync() => import(/* webpackPrefetch: true */ 'app/page/home/HomeController'),\nasync() => import(/* webpackPreload: true */ 'app/page/home/HomeView')\n// ...\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1ba2ef78.c2c21164.js b/assets/js/1ba2ef78.c2c21164.js deleted file mode 100644 index dfa9a03eae..0000000000 --- a/assets/js/1ba2ef78.c2c21164.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4075],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>g});var o=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=o.createContext({}),p=function(e){var t=o.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return o.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=p(n),d=r,g=u["".concat(l,".").concat(d)]||u[d]||m[d]||a;return n?o.createElement(g,i(i({ref:t},c),{},{components:n})):o.createElement(g,i({ref:t},c))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:r,i[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>s,toc:()=>p});var o=n(5773),r=(n(7294),n(3905));const a={title:"Async Routing",description:"Basic features > Routing > Async Routing"},i=void 0,s={unversionedId:"basic-features/routing/async-routing",id:"basic-features/routing/async-routing",title:"Async Routing",description:"Basic features > Routing > Async Routing",source:"@site/../docs/basic-features/routing/async-routing.md",sourceDirName:"basic-features/routing",slug:"/basic-features/routing/async-routing",permalink:"/basic-features/routing/async-routing",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/basic-features/routing/async-routing.md",tags:[],version:"current",lastUpdatedBy:"Filip Satek",lastUpdatedAt:1734590310,formattedLastUpdatedAt:"Dec 19, 2024",frontMatter:{title:"Async Routing",description:"Basic features > Routing > Async Routing"},sidebar:"docs",previous:{title:"Middlewares",permalink:"/basic-features/routing/middlewares"},next:{title:"Extensions",permalink:"/basic-features/extensions"}},l={},p=[{value:"Merging view and controller imports into one",id:"merging-view-and-controller-imports-into-one",level:2},{value:"Preloading routeHandlers",id:"preloading-routehandlers",level:2},{value:"Prefetching/Preloading modules",id:"prefetchingpreloading-modules",level:3}],c={toc:p},u="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,o.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Async routing allows you to split views and controllers into separate bundles and load them dynamically. This can be useful for some specific routes, that are not visited regularly and contain large amounts of unique code."),(0,r.kt)("p",null,"To take advantage of this feature, you simply wrap your ",(0,r.kt)("a",{parentName:"p",href:"/basic-features/routing/introduction#controller"},(0,r.kt)("inlineCode",{parentName:"a"},"controller"))," and ",(0,r.kt)("a",{parentName:"p",href:"/basic-features/routing/introduction#view"},(0,r.kt)("inlineCode",{parentName:"a"},"view"))," arguments into ",(0,r.kt)("inlineCode",{parentName:"p"},"async")," function which calls a dynamic import():"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript",metastring:"title=./app/config/routes.js",title:"./app/config/routes.js"},"import { RouteNames } from '@ima/core';\n\nexport let init = (ns, oc, config) => {\n const router = oc.get('$Router');\n\n router\n .add(\n 'home',\n '/',\n async() => import('app/page/home/HomeController'),\n async() => import('app/page/home/HomeView')\n )\n}\n")),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"When using ",(0,r.kt)("strong",{parentName:"p"},"default exports"),", you don't have to explicitly set the import promise to the default export, the router does this by default."),(0,r.kt)("p",{parentName:"admonition"},"However when using named exports you need to let the router know, where is the controller/view located in the resolved promise:"),(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"async() => import('app/page/home/HomeView').then(module => module.HomeView);\n"))),(0,r.kt)("h2",{id:"merging-view-and-controller-imports-into-one"},"Merging view and controller imports into one"),(0,r.kt)("p",null,"Since the method above produces 2 separate JS chunk files (can depend on the actual environment). If you have really small controller and view files, you can help webpack in creating only one small chunk file which usually loads faster."),(0,r.kt)("p",null,"This can be done by exporting view and controller from the same file:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript",metastring:"title=./app/page/home/index.js",title:"./app/page/home/index.js"},"export { default as HomeView } from './HomeView';\nexport { default as HomeController } from './HomeController';\n")),(0,r.kt)("p",null,"And then merging those two dynamic imports into one:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript",metastring:"title=./app/config/routes.js",title:"./app/config/routes.js"},"import { RouteNames } from '@ima/core';\n\nconst homeModules = async () => import('app/page/home');\n\nexport let init = (ns, oc, config) => {\n const router = oc.get('$Router');\n\n router\n .add(\n 'home',\n '/',\n // highlight-next-line\n async () => homeModules().then(module => module.HomeController),\n // highlight-next-line\n async () => homeModules().then(module => module.HomeView)\n )\n}\n")),(0,r.kt)("h2",{id:"preloading-routehandlers"},"Preloading routeHandlers"),(0,r.kt)("p",null,"Each route handler exposes ",(0,r.kt)("inlineCode",{parentName:"p"},"preload()")," method, which can be used to programmatically trigger preload of the dynamic imports for specific route."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Use this in situations when the browser is idle and you want to preload some specific route handlers that the user will probably go next. This speeds up the responsiveness of your application dramatically.")),(0,r.kt)("p",null,"To call the ",(0,r.kt)("inlineCode",{parentName:"p"},"preload()")," method, ",(0,r.kt)("a",{parentName:"p",href:"/basic-features/routing/introduction#generating-links-outside-of-app-components"},"you first need to get access")," to the ",(0,r.kt)("inlineCode",{parentName:"p"},"Router")," instance (we can use ",(0,r.kt)("inlineCode",{parentName:"p"},"useComponentUtils")," hook in this example) and then you can use ",(0,r.kt)("inlineCode",{parentName:"p"},"getRouteHandler()")," method to get specific route handler instance. After that just call ",(0,r.kt)("inlineCode",{parentName:"p"},"preload()")," on this handler:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-jsx",metastring:"title=./app/config/routes.js",title:"./app/config/routes.js"},"import { useComponentUtils } from '@ima/react-hooks';\n\nexport default function Card() {\n const { $Router } = useComponentUtils();\n const homeRouteHandler = $Router.getRouteHandler('home');\n\n useEffect(() => {\n // highlight-next-line\n homeRouteHandler.preload();\n }, [])\n\n return (\n Home\n );\n}\n")),(0,r.kt)("p",null,"The method returns a promise, which resolves to tuple of ",(0,r.kt)("inlineCode",{parentName:"p"},"[controller, view]")," instances."),(0,r.kt)("h3",{id:"prefetchingpreloading-modules"},"Prefetching/Preloading modules"),(0,r.kt)("p",null,"As with the ",(0,r.kt)("a",{parentName:"p",href:"/advanced-features/dynamic-imports"},"dynamic imports"),", you can also use ",(0,r.kt)("a",{parentName:"p",href:"https://webpack.js.org/guides/code-splitting/#prefetchingpreloading-modules"},"webpack directives")," for prefetching and preloading. Simply use the inline commend as it is mentioned in the ",(0,r.kt)("a",{parentName:"p",href:"https://webpack.js.org/guides/code-splitting/#prefetchingpreloading-modules"},"webpack documentation"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript",metastring:"title=./app/config/routes.js",title:"./app/config/routes.js"},"// ...\nasync() => import(/* webpackPrefetch: true */ 'app/page/home/HomeController'),\nasync() => import(/* webpackPreload: true */ 'app/page/home/HomeView')\n// ...\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1bd618df.8213e9cc.js b/assets/js/1bd618df.8213e9cc.js deleted file mode 100644 index 484071abe4..0000000000 --- a/assets/js/1bd618df.8213e9cc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[1987],{3905:(e,t,a)=>{a.d(t,{Zo:()=>m,kt:()=>c});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),d=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},m=function(e){var t=d(e.components);return n.createElement(o.Provider,{value:t},e.children)},k="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},N=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),k=d(a),N=r,c=k["".concat(o,".").concat(N)]||k[N]||s[N]||i;return a?n.createElement(c,l(l({ref:t},m),{},{components:a})):n.createElement(c,l({ref:t},m))}));function c(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=N;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[k]="string"==typeof e?e:r,l[1]=p;for(var d=2;d{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>s,frontMatter:()=>i,metadata:()=>p,toc:()=>d});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_core",title:"Module: @ima/core",sidebar_label:"@ima/core",sidebar_position:0,custom_edit_url:null},l=void 0,p={unversionedId:"api/modules/ima_core",id:"api/modules/ima_core",title:"Module: @ima/core",description:"Enumerations",source:"@site/../docs/api/modules/ima_core.md",sourceDirName:"api/modules",slug:"/api/modules/ima_core",permalink:"/api/modules/ima_core",draft:!1,editUrl:null,tags:[],version:"current",sidebarPosition:0,frontMatter:{id:"ima_core",title:"Module: @ima/core",sidebar_label:"@ima/core",sidebar_position:0,custom_edit_url:null},sidebar:"api",previous:{title:"@ima/cli",permalink:"/api/modules/ima_cli"},next:{title:"@ima/dev-utils",permalink:"/api/modules/ima_dev_utils"}},o={},d=[{value:"Enumerations",id:"enumerations",level:2},{value:"Classes",id:"classes",level:2},{value:"Interfaces",id:"interfaces",level:2},{value:"Type Aliases",id:"type-aliases",level:2},{value:"AnyParameters",id:"anyparameters",level:3},{value:"Index signature",id:"index-signature",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"AppSettings",id:"appsettings",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"AsyncRouteController",id:"asyncroutecontroller",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"AsyncRouteView",id:"asyncrouteview",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"BootSettings",id:"bootsettings",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"Cookie",id:"cookie",level:3},{value:"Type declaration",id:"type-declaration-1",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"CookieOptions",id:"cookieoptions",level:3},{value:"Type declaration",id:"type-declaration-2",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"CookieTransformFunction",id:"cookietransformfunction",level:3},{value:"Type declaration",id:"type-declaration-3",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"DecoratedOCAliasMap",id:"decoratedocaliasmap",level:3},{value:"Defined in",id:"defined-in-8",level:4},{value:"Dependencies",id:"dependencies",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"Dependency",id:"dependency",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"DictionaryConfig",id:"dictionaryconfig",level:3},{value:"Type declaration",id:"type-declaration-4",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"DictionaryData",id:"dictionarydata",level:3},{value:"Index signature",id:"index-signature-1",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"DispatcherListener",id:"dispatcherlistener",level:3},{value:"Type parameters",id:"type-parameters-2",level:4},{value:"Type declaration",id:"type-declaration-5",level:4},{value:"Parameters",id:"parameters",level:5},{value:"Returns",id:"returns",level:5},{value:"Defined in",id:"defined-in-13",level:4},{value:"EntryOptions",id:"entryoptions",level:3},{value:"Type declaration",id:"type-declaration-6",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"EventBusEventHandler",id:"eventbuseventhandler",level:3},{value:"Type declaration",id:"type-declaration-7",level:4},{value:"Parameters",id:"parameters-1",level:5},{value:"Returns",id:"returns-1",level:5},{value:"Defined in",id:"defined-in-15",level:4},{value:"EventBusListener",id:"eventbuslistener",level:3},{value:"Type declaration",id:"type-declaration-8",level:4},{value:"Parameters",id:"parameters-2",level:5},{value:"Returns",id:"returns-2",level:5},{value:"Defined in",id:"defined-in-16",level:4},{value:"EventBusOptions",id:"eventbusoptions",level:3},{value:"Type declaration",id:"type-declaration-9",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"ExecutionJob",id:"executionjob",level:3},{value:"Type declaration",id:"type-declaration-10",level:4},{value:"Parameters",id:"parameters-3",level:5},{value:"Returns",id:"returns-3",level:5},{value:"Defined in",id:"defined-in-18",level:4},{value:"GenericErrorParams",id:"genericerrorparams",level:3},{value:"Index signature",id:"index-signature-2",level:4},{value:"Type declaration",id:"type-declaration-11",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"HttpAgentResponse",id:"httpagentresponse",level:3},{value:"Type parameters",id:"type-parameters-3",level:4},{value:"Type declaration",id:"type-declaration-12",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"HttpProxyErrorParams",id:"httpproxyerrorparams",level:3},{value:"Type parameters",id:"type-parameters-4",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"HttpProxyRequestParams",id:"httpproxyrequestparams",level:3},{value:"Type declaration",id:"type-declaration-13",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"InitBindFunction",id:"initbindfunction",level:3},{value:"Type declaration",id:"type-declaration-14",level:4},{value:"Parameters",id:"parameters-4",level:5},{value:"Returns",id:"returns-4",level:5},{value:"Defined in",id:"defined-in-23",level:4},{value:"InitRoutesFunction",id:"initroutesfunction",level:3},{value:"Type declaration",id:"type-declaration-15",level:4},{value:"Parameters",id:"parameters-5",level:5},{value:"Returns",id:"returns-5",level:5},{value:"Defined in",id:"defined-in-24",level:4},{value:"InitServicesFunction",id:"initservicesfunction",level:3},{value:"Type declaration",id:"type-declaration-16",level:4},{value:"Parameters",id:"parameters-6",level:5},{value:"Returns",id:"returns-6",level:5},{value:"Defined in",id:"defined-in-25",level:4},{value:"InitSettingsFunction",id:"initsettingsfunction",level:3},{value:"Type declaration",id:"type-declaration-17",level:4},{value:"Parameters",id:"parameters-7",level:5},{value:"Returns",id:"returns-7",level:5},{value:"Defined in",id:"defined-in-26",level:4},{value:"LoadedResources",id:"loadedresources",level:3},{value:"Type parameters",id:"type-parameters-5",level:4},{value:"Defined in",id:"defined-in-27",level:4},{value:"LocalizationFunction",id:"localizationfunction",level:3},{value:"Type declaration",id:"type-declaration-18",level:4},{value:"Parameters",id:"parameters-8",level:5},{value:"Returns",id:"returns-8",level:5},{value:"Defined in",id:"defined-in-28",level:4},{value:"ManageArgs",id:"manageargs",level:3},{value:"Type declaration",id:"type-declaration-19",level:4},{value:"Defined in",id:"defined-in-29",level:4},{value:"ManagedPage",id:"managedpage",level:3},{value:"Type declaration",id:"type-declaration-20",level:4},{value:"Defined in",id:"defined-in-30",level:4},{value:"MetaAttributes",id:"metaattributes",level:3},{value:"Defined in",id:"defined-in-31",level:4},{value:"MetaManagerRecord",id:"metamanagerrecord",level:3},{value:"Type parameters",id:"type-parameters-6",level:4},{value:"Defined in",id:"defined-in-32",level:4},{value:"MetaManagerRecordKeys",id:"metamanagerrecordkeys",level:3},{value:"Defined in",id:"defined-in-33",level:4},{value:"MetaValue",id:"metavalue",level:3},{value:"Defined in",id:"defined-in-34",level:4},{value:"NativeListener",id:"nativelistener",level:3},{value:"Type declaration",id:"type-declaration-21",level:4},{value:"Parameters",id:"parameters-9",level:5},{value:"Returns",id:"returns-9",level:5},{value:"Defined in",id:"defined-in-35",level:4},{value:"OCInjectable",id:"ocinjectable",level:3},{value:"Type parameters",id:"type-parameters-7",level:4},{value:"Defined in",id:"defined-in-36",level:4},{value:"OCInstance",id:"ocinstance",level:3},{value:"Type parameters",id:"type-parameters-8",level:4},{value:"Defined in",id:"defined-in-37",level:4},{value:"OCInstanceConstrain",id:"ocinstanceconstrain",level:3},{value:"Type parameters",id:"type-parameters-9",level:4},{value:"Defined in",id:"defined-in-38",level:4},{value:"ObjectParameters",id:"objectparameters",level:3},{value:"Index signature",id:"index-signature-3",level:4},{value:"Defined in",id:"defined-in-39",level:4},{value:"PageData",id:"pagedata",level:3},{value:"Defined in",id:"defined-in-40",level:4},{value:"PageState",id:"pagestate",level:3},{value:"Index signature",id:"index-signature-4",level:4},{value:"Defined in",id:"defined-in-41",level:4},{value:"PluginInitBindFunction",id:"plugininitbindfunction",level:3},{value:"Type declaration",id:"type-declaration-22",level:4},{value:"Parameters",id:"parameters-10",level:5},{value:"Returns",id:"returns-10",level:5},{value:"Defined in",id:"defined-in-42",level:4},{value:"PluginInitServicesFunction",id:"plugininitservicesfunction",level:3},{value:"Type declaration",id:"type-declaration-23",level:4},{value:"Parameters",id:"parameters-11",level:5},{value:"Returns",id:"returns-11",level:5},{value:"Defined in",id:"defined-in-43",level:4},{value:"PluginInitSettingsFunction",id:"plugininitsettingsfunction",level:3},{value:"Type declaration",id:"type-declaration-24",level:4},{value:"Parameters",id:"parameters-12",level:5},{value:"Returns",id:"returns-12",level:5},{value:"Defined in",id:"defined-in-44",level:4},{value:"Resource",id:"resource",level:3},{value:"Defined in",id:"defined-in-45",level:4},{value:"RouteController",id:"routecontroller",level:3},{value:"Defined in",id:"defined-in-46",level:4},{value:"RouteParams",id:"routeparams",level:3},{value:"Type parameters",id:"type-parameters-10",level:4},{value:"Defined in",id:"defined-in-47",level:4},{value:"RoutePathExpression",id:"routepathexpression",level:3},{value:"Type declaration",id:"type-declaration-25",level:4},{value:"Defined in",id:"defined-in-48",level:4},{value:"RouteView",id:"routeview",level:3},{value:"Defined in",id:"defined-in-49",level:4},{value:"RouterMiddleware",id:"routermiddleware",level:3},{value:"Type declaration",id:"type-declaration-26",level:4},{value:"Parameters",id:"parameters-13",level:5},{value:"Returns",id:"returns-13",level:5},{value:"Defined in",id:"defined-in-50",level:4},{value:"SerializedCacheEntry",id:"serializedcacheentry",level:3},{value:"Type parameters",id:"type-parameters-11",level:4},{value:"Type declaration",id:"type-declaration-27",level:4},{value:"Defined in",id:"defined-in-51",level:4},{value:"SerializedData",id:"serializeddata",level:3},{value:"Type parameters",id:"type-parameters-12",level:4},{value:"Index signature",id:"index-signature-5",level:4},{value:"Defined in",id:"defined-in-52",level:4},{value:"StringParameters",id:"stringparameters",level:3},{value:"Index signature",id:"index-signature-6",level:4},{value:"Defined in",id:"defined-in-53",level:4},{value:"UnknownParameters",id:"unknownparameters",level:3},{value:"Index signature",id:"index-signature-7",level:4},{value:"Defined in",id:"defined-in-54",level:4},{value:"UnknownPromiseParameters",id:"unknownpromiseparameters",level:3},{value:"Index signature",id:"index-signature-8",level:4},{value:"Defined in",id:"defined-in-55",level:4},{value:"WindowEventTargets",id:"windoweventtargets",level:3},{value:"Defined in",id:"defined-in-56",level:4},{value:"WindowEventTargetsMap",id:"windoweventtargetsmap",level:3},{value:"Type parameters",id:"type-parameters-13",level:4},{value:"Defined in",id:"defined-in-57",level:4},{value:"Variables",id:"variables",level:2},{value:"ns",id:"ns",level:3},{value:"Defined in",id:"defined-in-58",level:4},{value:"pluginLoader",id:"pluginloader",level:3},{value:"Defined in",id:"defined-in-59",level:4},{value:"Functions",id:"functions",level:2},{value:"bootClientApp",id:"bootclientapp",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-14",level:4},{value:"Defined in",id:"defined-in-60",level:4},{value:"createImaApp",id:"createimaapp",level:3},{value:"Returns",id:"returns-15",level:4},{value:"Defined in",id:"defined-in-61",level:4},{value:"getClientBootConfig",id:"getclientbootconfig",level:3},{value:"Parameters",id:"parameters-15",level:4},{value:"Returns",id:"returns-16",level:4},{value:"Defined in",id:"defined-in-62",level:4},{value:"getInitialImaConfigFunctions",id:"getinitialimaconfigfunctions",level:3},{value:"Returns",id:"returns-17",level:4},{value:"Defined in",id:"defined-in-63",level:4},{value:"getInitialPluginConfig",id:"getinitialpluginconfig",level:3},{value:"Returns",id:"returns-18",level:4},{value:"Defined in",id:"defined-in-64",level:4},{value:"getNamespace",id:"getnamespace",level:3},{value:"Returns",id:"returns-19",level:4},{value:"Defined in",id:"defined-in-65",level:4},{value:"onLoad",id:"onload",level:3},{value:"Returns",id:"returns-20",level:4},{value:"Defined in",id:"defined-in-66",level:4},{value:"reviveClientApp",id:"reviveclientapp",level:3},{value:"Parameters",id:"parameters-16",level:4},{value:"Returns",id:"returns-21",level:4},{value:"Defined in",id:"defined-in-67",level:4},{value:"routeClientApp",id:"routeclientapp",level:3},{value:"Parameters",id:"parameters-17",level:4},{value:"Returns",id:"returns-22",level:4},{value:"Defined in",id:"defined-in-68",level:4}],m={toc:d},k="wrapper";function s(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"enumerations"},"Enumerations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.ActionTypes"},"ActionTypes")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.BindingState"},"BindingState")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.HttpStatusCode"},"HttpStatusCode")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.RendererEvents"},"RendererEvents")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.RendererTypes"},"RendererTypes")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.RouteNames"},"RouteNames")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.RouterEvents"},"RouterEvents")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.StateEvents"},"StateEvents"))),(0,r.kt)("h2",{id:"classes"},"Classes"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.AbstractController"},"AbstractController")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.AbstractExecution"},"AbstractExecution")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.AbstractExtension"},"AbstractExtension")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.AbstractRoute"},"AbstractRoute")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Bootstrap"},"Bootstrap")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Cache"},"Cache")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.CacheEntry"},"CacheEntry")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.CacheFactory"},"CacheFactory")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.CacheImpl"},"CacheImpl")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.CancelError"},"CancelError")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ClientPageManager"},"ClientPageManager")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ClientRouter"},"ClientRouter")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ClientWindow"},"ClientWindow")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ComponentUtils"},"ComponentUtils")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Controller"},"Controller")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ControllerDecorator"},"ControllerDecorator")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.CookieStorage"},"CookieStorage")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Dictionary"},"Dictionary")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Dispatcher"},"Dispatcher")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.DispatcherImpl"},"DispatcherImpl")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.DynamicRoute"},"DynamicRoute")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Entry"},"Entry")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Error"},"Error")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.EventBus"},"EventBus")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.EventBusImpl"},"EventBusImpl")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Execution"},"Execution")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Extension"},"Extension")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.GenericError"},"GenericError")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.HttpAgent"},"HttpAgent")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.HttpAgentImpl"},"HttpAgentImpl")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.HttpProxy"},"HttpProxy")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.MapStorage"},"MapStorage")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.MessageFormatDictionary"},"MessageFormatDictionary")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.MetaManager"},"MetaManager")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.MetaManagerImpl"},"MetaManagerImpl")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Namespace"},"Namespace")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ObjectContainer"},"ObjectContainer")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageFactory"},"PageFactory")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageHandler"},"PageHandler")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageHandlerRegistry"},"PageHandlerRegistry")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageManager"},"PageManager")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageMetaHandler"},"PageMetaHandler")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageNavigationHandler"},"PageNavigationHandler")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageRenderer"},"PageRenderer")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageStateManagerDecorator"},"PageStateManagerDecorator")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageStateManagerImpl"},"PageStateManagerImpl")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PluginLoader"},"PluginLoader")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Request"},"Request")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Response"},"Response")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.RouteFactory"},"RouteFactory")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Router"},"Router")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.SerialBatch"},"SerialBatch")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ServerPageManager"},"ServerPageManager")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ServerRouter"},"ServerRouter")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ServerWindow"},"ServerWindow")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.SessionMapStorage"},"SessionMapStorage")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.SessionStorage"},"SessionStorage")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.StaticRoute"},"StaticRoute")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Storage"},"Storage")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.UrlTransformer"},"UrlTransformer")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.WeakMapStorage"},"WeakMapStorage")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Window"},"Window"))),(0,r.kt)("h2",{id:"interfaces"},"Interfaces"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.AppEnvironment"},"AppEnvironment")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.BootConfig"},"BootConfig")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.BootServices"},"BootServices")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.DictionaryMap"},"DictionaryMap")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.DispatcherEventsMap"},"DispatcherEventsMap")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.Environment"},"Environment")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.GlobalImaObject"},"GlobalImaObject")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.HttpAgentRequestOptions"},"HttpAgentRequestOptions")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.ImaRequestInit"},"ImaRequestInit")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.InitAppConfig"},"InitAppConfig")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.InitImaConfig"},"InitImaConfig")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.InitPluginConfig"},"InitPluginConfig")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.Manifest"},"Manifest")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.ManifestAsset"},"ManifestAsset")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.OCAliasMap"},"OCAliasMap")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.PageAction"},"PageAction")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.PageRendererSettings"},"PageRendererSettings")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.Resources"},"Resources")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.RouteAction"},"RouteAction")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.RouteLocals"},"RouteLocals")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.RouteOptions"},"RouteOptions")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.Settings"},"Settings")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.Utils"},"Utils")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.WindowCustomEventsMap"},"WindowCustomEventsMap"))),(0,r.kt)("h2",{id:"type-aliases"},"Type Aliases"),(0,r.kt)("h3",{id:"anyparameters"},"AnyParameters"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"AnyParameters"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L22"},"packages/core/src/types.ts:22")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"appsettings"},"AppSettings"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"AppSettings"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"App settings function, used in ./app/config/settings.js"),(0,r.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dev?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"PartialDeep"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.Settings"},(0,r.kt)("inlineCode",{parentName:"a"},"Settings")),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prod")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.Settings"},(0,r.kt)("inlineCode",{parentName:"a"},"Settings")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"regression?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"PartialDeep"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.Settings"},(0,r.kt)("inlineCode",{parentName:"a"},"Settings")),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"test?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"PartialDeep"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.Settings"},(0,r.kt)("inlineCode",{parentName:"a"},"Settings")),">")))),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L159"},"packages/core/src/boot.ts:159")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"asyncroutecontroller"},"AsyncRouteController"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"AsyncRouteController"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"WithAsync"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController")),">"),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRoute.ts#L27"},"packages/core/src/router/AbstractRoute.ts:27")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"asyncrouteview"},"AsyncRouteView"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"AsyncRouteView"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"WithAsync"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routeview"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteView")),">"),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRoute.ts#L28"},"packages/core/src/router/AbstractRoute.ts:28")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"bootsettings"},"BootSettings"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"BootSettings"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Pick"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.GlobalImaObject"},(0,r.kt)("inlineCode",{parentName:"a"},"GlobalImaObject")),", ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Version"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Debug"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Version"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$App"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Language"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Host"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Path"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Root"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$LanguagePartPath"'),">"),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L82"},"packages/core/src/Bootstrap.ts:82")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cookie"},"Cookie"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"Cookie"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-1"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#cookieoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieOptions")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Date")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"undefined"))))),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L33"},"packages/core/src/storage/CookieStorage.ts:33")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cookieoptions"},"CookieOptions"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"CookieOptions"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-2"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"domain?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"expires?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Date"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"httpOnly?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"maxAge?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"partitioned?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"path?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"sameSite?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},'"none"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},'"lax"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},'"strict"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"secure?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))))),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L22"},"packages/core/src/storage/CookieStorage.ts:22")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cookietransformfunction"},"CookieTransformFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"CookieTransformFunction"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-3"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"decode")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"value"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string"),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"encode")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"value"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string"),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Response.ts#L10"},"packages/core/src/router/Response.ts:10")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"decoratedocaliasmap"},"DecoratedOCAliasMap"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"DecoratedOCAliasMap"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"AddOCChaining"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap")),">"," & ",(0,r.kt)("inlineCode",{parentName:"p"},"WithOCOptional"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap")),">"," & ",(0,r.kt)("inlineCode",{parentName:"p"},"WithOCOptionalSpread"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap")),">"," & ",(0,r.kt)("inlineCode",{parentName:"p"},"WithOCSpread"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap")),">"),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/config/bind.ts#L68"},"packages/core/src/config/bind.ts:68")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"dependencies"},"Dependencies"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"Dependencies"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","[]"),(0,r.kt)("h4",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L23"},"packages/core/src/oc/ObjectContainer.ts:23")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"dependency"},"Dependency"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"Dependency"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",": keyof ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#decoratedocaliasmap"},(0,r.kt)("inlineCode",{parentName:"a"},"DecoratedOCAliasMap"))," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#ocinjectable"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInjectable")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"," ","|"," [",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#ocinjectable"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInjectable")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",", { ",(0,r.kt)("inlineCode",{parentName:"p"},"optional"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," }]"),(0,r.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L24"},"packages/core/src/oc/ObjectContainer.ts:24")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"dictionaryconfig"},"DictionaryConfig"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"DictionaryConfig"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-4"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"$Language")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dictionary")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dictionarydata"},(0,r.kt)("inlineCode",{parentName:"a"},"DictionaryData")))))),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/dictionary/Dictionary.ts#L3"},"packages/core/src/dictionary/Dictionary.ts:3")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"dictionarydata"},"DictionaryData"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"DictionaryData"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature-1"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dictionarydata"},(0,r.kt)("inlineCode",{parentName:"a"},"DictionaryData"))," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#localizationfunction"},(0,r.kt)("inlineCode",{parentName:"a"},"LocalizationFunction"))),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/dictionary/Dictionary.ts#L8"},"packages/core/src/dictionary/Dictionary.ts:8")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"dispatcherlistener"},"DispatcherListener"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"DispatcherListener"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"D"),">",": (",(0,r.kt)("inlineCode",{parentName:"p"},"data"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"D"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"D"))))),(0,r.kt)("h4",{id:"type-declaration-5"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"data"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"D"))))),(0,r.kt)("h5",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/Dispatcher.ts#L12"},"packages/core/src/event/Dispatcher.ts:12")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"entryoptions"},"EntryOptions"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"EntryOptions"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-6"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"writeable")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))))),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/Entry.ts#L7"},"packages/core/src/oc/Entry.ts:7")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"eventbuseventhandler"},"EventBusEventHandler"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"EventBusEventHandler"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"data?"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-declaration-7"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"data?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))))),(0,r.kt)("h5",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/EventBus.ts#L5"},"packages/core/src/event/EventBus.ts:5")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"eventbuslistener"},"EventBusListener"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"EventBusListener"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"event"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"CustomEvent"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"type-declaration-8"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h5",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"CustomEvent"))))),(0,r.kt)("h5",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/EventBus.ts#L3"},"packages/core/src/event/EventBus.ts:3")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"eventbusoptions"},"EventBusOptions"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"EventBusOptions"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-9"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"bubbles?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"cancelable?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"composed?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))))),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/EventBus.ts#L9"},"packages/core/src/event/EventBus.ts:9")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"executionjob"},"ExecutionJob"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"ExecutionJob"),": (...",(0,r.kt)("inlineCode",{parentName:"p"},"args"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),"[]) => ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"type-declaration-10"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"...args"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h5",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"...args")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"),"[]")))),(0,r.kt)("h5",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/execution/Execution.ts#L1"},"packages/core/src/execution/Execution.ts:1")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"genericerrorparams"},"GenericErrorParams"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"GenericErrorParams"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature-2"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"type-declaration-11"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"cause?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Error")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"status?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number"))))),(0,r.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/error/GenericError.ts#L3"},"packages/core/src/error/GenericError.ts:3")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"httpagentresponse"},"HttpAgentResponse"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"HttpAgentResponse"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"B"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"A response from the server."),(0,r.kt)("h4",{id:"type-parameters-3"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"B"))))),(0,r.kt)("h4",{id:"type-declaration-12"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"body")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"B"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"cached")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"headers")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#stringparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"StringParameters")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"headersRaw?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Headers"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#httpproxyrequestparams"},(0,r.kt)("inlineCode",{parentName:"a"},"HttpProxyRequestParams")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"status")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number"))))),(0,r.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/http/HttpAgent.ts#L55"},"packages/core/src/http/HttpAgent.ts:55")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"httpproxyerrorparams"},"HttpProxyErrorParams"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"HttpProxyErrorParams"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"B"),">",": { ",(0,r.kt)("inlineCode",{parentName:"p"},"body"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"B")," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"cause"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Error")," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"errorName"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"status"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," } & ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#httpproxyrequestparams"},(0,r.kt)("inlineCode",{parentName:"a"},"HttpProxyRequestParams"))),(0,r.kt)("p",null,"An object that describes a failed HTTP request, providing\ninformation about both the failure reported by the server and how the\nrequest has been sent to the server."),(0,r.kt)("h4",{id:"type-parameters-4"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"B")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/http/HttpProxy.ts#L51"},"packages/core/src/http/HttpProxy.ts:51")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"httpproxyrequestparams"},"HttpProxyRequestParams"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"HttpProxyRequestParams"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"An object representing the complete request parameters used to create and\nsend the HTTP request."),(0,r.kt)("h4",{id:"type-declaration-13"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"method")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.HttpAgentRequestOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"HttpAgentRequestOptions")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"transformedUrl")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"url")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/http/HttpProxy.ts#L27"},"packages/core/src/http/HttpProxy.ts:27")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"initbindfunction"},"InitBindFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"InitBindFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Required"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),">","[",(0,r.kt)("inlineCode",{parentName:"p"},'"bind"'),"]",", ",(0,r.kt)("inlineCode",{parentName:"p"},"state"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/enums/ima_core.BindingState"},(0,r.kt)("inlineCode",{parentName:"a"},"BindingState")),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-declaration-14"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"state"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ns")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"config")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Required"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),">","[",(0,r.kt)("inlineCode",{parentName:"td"},'"bind"'),"]")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/enums/ima_core.BindingState"},(0,r.kt)("inlineCode",{parentName:"a"},"BindingState")))))),(0,r.kt)("h5",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L16"},"packages/core/src/Bootstrap.ts:16")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"initroutesfunction"},"InitRoutesFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"InitRoutesFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"routes"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"router"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Router"},(0,r.kt)("inlineCode",{parentName:"a"},"Router")),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-declaration-15"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"routes"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"router"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ns")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"routes")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"undefined"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"router")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Router"},(0,r.kt)("inlineCode",{parentName:"a"},"Router")))))),(0,r.kt)("h5",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L23"},"packages/core/src/Bootstrap.ts:23")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"initservicesfunction"},"InitServicesFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"InitServicesFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"p"},'"services"'),"]",") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-declaration-16"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ns")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"config")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"td"},'"services"'),"]")))),(0,r.kt)("h5",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L30"},"packages/core/src/Bootstrap.ts:30")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"initsettingsfunction"},"InitSettingsFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"InitSettingsFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"p"},'"settings"'),"]",") => ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#appsettings"},(0,r.kt)("inlineCode",{parentName:"a"},"AppSettings"))),(0,r.kt)("h4",{id:"type-declaration-17"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#appsettings"},(0,r.kt)("inlineCode",{parentName:"a"},"AppSettings"))),(0,r.kt)("h5",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ns")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"config")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"td"},'"settings"'),"]")))),(0,r.kt)("h5",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#appsettings"},(0,r.kt)("inlineCode",{parentName:"a"},"AppSettings"))),(0,r.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L36"},"packages/core/src/Bootstrap.ts:36")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"loadedresources"},"LoadedResources"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"LoadedResources"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"Intersection"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"Partial"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"Matching"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">",">",">",", ",(0,r.kt)("inlineCode",{parentName:"p"},"Required"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"NonMatching"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">",">",">",">"),(0,r.kt)("h4",{id:"type-parameters-5"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/controller/Controller.ts#L27"},"packages/core/src/controller/Controller.ts:27")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"localizationfunction"},"LocalizationFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"LocalizationFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"parameters"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#objectparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectParameters")),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"type-declaration-18"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"parameters"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h5",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"parameters")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#objectparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectParameters")))))),(0,r.kt)("h5",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/dictionary/Dictionary.ts#L12"},"packages/core/src/dictionary/Dictionary.ts:12")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"manageargs"},"ManageArgs"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"ManageArgs"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-19"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"action?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.PageAction"},(0,r.kt)("inlineCode",{parentName:"a"},"PageAction")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"route")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"InstanceType"),"")))),(0,r.kt)("h4",{id:"defined-in-29"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/manager/PageManager.ts#L5"},"packages/core/src/page/manager/PageManager.ts:5")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"managedpage"},"ManagedPage"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"ManagedPage"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-20"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controller")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controllerInstance")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Controller"},(0,r.kt)("inlineCode",{parentName:"a"},"Controller")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"decoratedController")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ControllerDecorator"},(0,r.kt)("inlineCode",{parentName:"a"},"ControllerDecorator")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"route")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"InstanceType"),"")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state")),(0,r.kt)("td",{parentName:"tr",align:"left"},"{ ",(0,r.kt)("inlineCode",{parentName:"td"},"abort?"),": { ",(0,r.kt)("inlineCode",{parentName:"td"},"promise"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"void"),">"," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"reject"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"resolve"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," } ; ",(0,r.kt)("inlineCode",{parentName:"td"},"activated"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"cancelled"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"executed"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"initialized"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"mounted"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"page"),": { ",(0,r.kt)("inlineCode",{parentName:"td"},"promise"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"void"),">"," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"reject"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"resolve"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," } }")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.abort?")),(0,r.kt)("td",{parentName:"tr",align:"left"},"{ ",(0,r.kt)("inlineCode",{parentName:"td"},"promise"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"void"),">"," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"reject"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"resolve"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," }")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.abort.promise")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"void"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.abort.reject")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.abort.resolve")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.activated")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.cancelled")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.executed")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.initialized")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.mounted")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.page")),(0,r.kt)("td",{parentName:"tr",align:"left"},"{ ",(0,r.kt)("inlineCode",{parentName:"td"},"promise"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"void"),">"," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"reject"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"resolve"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," }")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.page.promise")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"void"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.page.reject")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.page.resolve")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"view")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"viewInstance")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"defined-in-30"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/PageTypes.ts#L11"},"packages/core/src/page/PageTypes.ts:11")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"metaattributes"},"MetaAttributes"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"MetaAttributes"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Record"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#metavalue"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaValue")),">"),(0,r.kt)("h4",{id:"defined-in-31"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/meta/MetaManager.ts#L2"},"packages/core/src/meta/MetaManager.ts:2")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"metamanagerrecord"},"MetaManagerRecord"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"MetaManagerRecord"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"K"),">",": { ","[key in K]",": MetaValue } & ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#metaattributes"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaAttributes"))),(0,r.kt)("h4",{id:"type-parameters-6"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"K")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#metamanagerrecordkeys"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaManagerRecordKeys")))))),(0,r.kt)("h4",{id:"defined-in-32"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/meta/MetaManager.ts#L5"},"packages/core/src/meta/MetaManager.ts:5")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"metamanagerrecordkeys"},"MetaManagerRecordKeys"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"MetaManagerRecordKeys"),": ",(0,r.kt)("inlineCode",{parentName:"p"},'"content"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"href"')),(0,r.kt)("h4",{id:"defined-in-33"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/meta/MetaManager.ts#L4"},"packages/core/src/meta/MetaManager.ts:4")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"metavalue"},"MetaValue"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"MetaValue"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined")),(0,r.kt)("h4",{id:"defined-in-34"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/meta/MetaManager.ts#L1"},"packages/core/src/meta/MetaManager.ts:1")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"nativelistener"},"NativeListener"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"NativeListener"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"event"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"CustomEvent")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Event"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"type-declaration-21"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h5",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"CustomEvent")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Event"))))),(0,r.kt)("h5",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in-35"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/EventBus.ts#L7"},"packages/core/src/event/EventBus.ts:7")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"ocinjectable"},"OCInjectable"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"OCInjectable"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"," & ",(0,r.kt)("inlineCode",{parentName:"p"},"WithDependencies")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"," & ",(0,r.kt)("inlineCode",{parentName:"p"},"Partial"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"WithDependencies"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Function")," & { ",(0,r.kt)("inlineCode",{parentName:"p"},"prototype"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"T")," } & ",(0,r.kt)("inlineCode",{parentName:"p"},"Partial"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"WithDependencies"),">"),(0,r.kt)("h4",{id:"type-parameters-7"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"defined-in-36"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L18"},"packages/core/src/oc/ObjectContainer.ts:18")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"ocinstance"},"OCInstance"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"OCInstance"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"T")," extends keyof ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#decoratedocaliasmap"},(0,r.kt)("inlineCode",{parentName:"a"},"DecoratedOCAliasMap"))," ? ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#decoratedocaliasmap"},(0,r.kt)("inlineCode",{parentName:"a"},"DecoratedOCAliasMap")),"[",(0,r.kt)("inlineCode",{parentName:"p"},"T"),"]"," : ",(0,r.kt)("inlineCode",{parentName:"p"},"T")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">"," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"InstanceType"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"," : ",(0,r.kt)("inlineCode",{parentName:"p"},"T")," extends ","[",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",", { ",(0,r.kt)("inlineCode",{parentName:"p"},"optional"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," }]"," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"InstanceType"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),"[",(0,r.kt)("inlineCode",{parentName:"p"},"0"),"]",">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"T")),(0,r.kt)("h4",{id:"type-parameters-8"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinstanceconstrain"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInstanceConstrain")))))),(0,r.kt)("h4",{id:"defined-in-37"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L40"},"packages/core/src/oc/ObjectContainer.ts:40")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"ocinstanceconstrain"},"OCInstanceConstrain"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"OCInstanceConstrain"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",": keyof ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#decoratedocaliasmap"},(0,r.kt)("inlineCode",{parentName:"a"},"DecoratedOCAliasMap"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"," ","|"," ","[",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",", { ",(0,r.kt)("inlineCode",{parentName:"p"},"optional"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," }]"),(0,r.kt)("h4",{id:"type-parameters-9"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"defined-in-38"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L34"},"packages/core/src/oc/ObjectContainer.ts:34")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"objectparameters"},"ObjectParameters"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"ObjectParameters"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature-3"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Date")),(0,r.kt)("h4",{id:"defined-in-39"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L30"},"packages/core/src/types.ts:30")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"pagedata"},"PageData"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"PageData"),": { ",(0,r.kt)("inlineCode",{parentName:"p"},"status"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," } & ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))),(0,r.kt)("h4",{id:"defined-in-40"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/PageTypes.ts#L50"},"packages/core/src/page/PageTypes.ts:50")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"pagestate"},"PageState"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"PageState"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature-4"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"any")),(0,r.kt)("h4",{id:"defined-in-41"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManager.ts#L1"},"packages/core/src/page/state/PageStateManager.ts:1")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"plugininitbindfunction"},"PluginInitBindFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"PluginInitBindFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Required"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),">","[",(0,r.kt)("inlineCode",{parentName:"p"},'"bind"'),"]",", ",(0,r.kt)("inlineCode",{parentName:"p"},"isDynamicallyLoaded"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"name?"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-declaration-22"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"isDynamicallyLoaded"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"name?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters-10"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ns")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"config")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Required"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),">","[",(0,r.kt)("inlineCode",{parentName:"td"},'"bind"'),"]")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"isDynamicallyLoaded")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h5",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-42"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L42"},"packages/core/src/Bootstrap.ts:42")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"plugininitservicesfunction"},"PluginInitServicesFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"PluginInitServicesFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"p"},'"services"'),"]",", ",(0,r.kt)("inlineCode",{parentName:"p"},"isDynamicallyLoaded"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-declaration-23"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"isDynamicallyLoaded"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters-11"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ns")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"config")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"td"},'"services"'),"]")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"isDynamicallyLoaded")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))))),(0,r.kt)("h5",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-43"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L50"},"packages/core/src/Bootstrap.ts:50")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"plugininitsettingsfunction"},"PluginInitSettingsFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"PluginInitSettingsFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"p"},'"settings"'),"]",", ",(0,r.kt)("inlineCode",{parentName:"p"},"isDynamicallyLoaded"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"PartialDeep"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#appsettings"},(0,r.kt)("inlineCode",{parentName:"a"},"AppSettings")),">"),(0,r.kt)("h4",{id:"type-declaration-24"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"isDynamicallyLoaded"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"PartialDeep"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#appsettings"},(0,r.kt)("inlineCode",{parentName:"a"},"AppSettings")),">"),(0,r.kt)("h5",{id:"parameters-12"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ns")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"config")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"td"},'"settings"'),"]")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"isDynamicallyLoaded")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))))),(0,r.kt)("h5",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"PartialDeep"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#appsettings"},(0,r.kt)("inlineCode",{parentName:"a"},"AppSettings")),">"),(0,r.kt)("h4",{id:"defined-in-44"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L57"},"packages/core/src/Bootstrap.ts:57")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"resource"},"Resource"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"Resource"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," [",(0,r.kt)("inlineCode",{parentName:"p"},"string"),", { ",(0,r.kt)("inlineCode",{parentName:"p"},"[attribute: string]"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),"; ",(0,r.kt)("inlineCode",{parentName:"p"},"fallback"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," }]"),(0,r.kt)("h4",{id:"defined-in-45"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L37"},"packages/core/src/boot.ts:37")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"routecontroller"},"RouteController"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"RouteController"),": keyof ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Controller"},(0,r.kt)("inlineCode",{parentName:"a"},"Controller")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Controller"},(0,r.kt)("inlineCode",{parentName:"a"},"Controller")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"),(0,r.kt)("h4",{id:"defined-in-46"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRoute.ts#L15"},"packages/core/src/router/AbstractRoute.ts:15")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"routeparams"},"RouteParams"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"RouteParams"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"Partial"),"<{ ","[K in keyof T]",": T","[K]"," }",">"," & { ",(0,r.kt)("inlineCode",{parentName:"p"},"[key: string]"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.GenericError"},(0,r.kt)("inlineCode",{parentName:"a"},"GenericError")),"; }"),(0,r.kt)("h4",{id:"type-parameters-10"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"{}")))),(0,r.kt)("h4",{id:"defined-in-47"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRoute.ts#L9"},"packages/core/src/router/AbstractRoute.ts:9")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"routepathexpression"},"RoutePathExpression"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"RoutePathExpression"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"Path expression type used for router routes definition."),(0,r.kt)("h4",{id:"type-declaration-25"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"extractParameters")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"trimmedPath"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"additionalData"),": { ",(0,r.kt)("inlineCode",{parentName:"td"},"path"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"query"),": ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams"))," }) => ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"Function which takes care of parsing url params from given path. It returns object of key/value pairs which correspond to expected path url params and their values.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"matcher")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"RegExp")),(0,r.kt)("td",{parentName:"tr",align:"left"},"RegExp use in router for path matching to current route.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"toPath")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"params"),": ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Function that generates valid path from given route params.")))),(0,r.kt)("h4",{id:"defined-in-48"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/DynamicRoute.ts#L23"},"packages/core/src/router/DynamicRoute.ts:23")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"routeview"},"RouteView"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"RouteView"),": keyof ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">"," ","|"," (...",(0,r.kt)("inlineCode",{parentName:"p"},"args"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),"[]) => ",(0,r.kt)("inlineCode",{parentName:"p"},"any")),(0,r.kt)("h4",{id:"defined-in-49"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/AbstractRoute.ts#L20"},"packages/core/src/router/AbstractRoute.ts:20")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"routermiddleware"},"RouterMiddleware"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"RouterMiddleware"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"params"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"locals"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteLocals"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteLocals")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"next?"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"result"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void"),") => ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"type-declaration-26"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"params"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"locals"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"next?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h5",{id:"parameters-13"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"locals")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteLocals"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteLocals")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"next?")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"result"),": ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))))),(0,r.kt)("h5",{id:"returns-13"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"defined-in-50"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/router/Router.ts#L29"},"packages/core/src/router/Router.ts:29")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"serializedcacheentry"},"SerializedCacheEntry"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"SerializedCacheEntry"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"V"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-parameters-11"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"V"))))),(0,r.kt)("h4",{id:"type-declaration-27"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ttl")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"V"))))),(0,r.kt)("h4",{id:"defined-in-51"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/cache/CacheEntry.ts#L1"},"packages/core/src/cache/CacheEntry.ts:1")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"serializeddata"},"SerializedData"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"SerializedData"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"V"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-parameters-12"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"V")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"index-signature-5"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": { ",(0,r.kt)("inlineCode",{parentName:"p"},"ttl"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"value"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"V")," }"),(0,r.kt)("h4",{id:"defined-in-52"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/cache/Cache.ts#L1"},"packages/core/src/cache/Cache.ts:1")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringparameters"},"StringParameters"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"StringParameters"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature-6"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"defined-in-53"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L14"},"packages/core/src/types.ts:14")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unknownparameters"},"UnknownParameters"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"UnknownParameters"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature-7"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in-54"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L18"},"packages/core/src/types.ts:18")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unknownpromiseparameters"},"UnknownPromiseParameters"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"UnknownPromiseParameters"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature-8"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"defined-in-55"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/types.ts#L26"},"packages/core/src/types.ts:26")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"windoweventtargets"},"WindowEventTargets"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"WindowEventTargets"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Document")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"globalThis.Window")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLBodyElement")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"SVGSVGElement")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"SVGElement")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLMediaElement")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLVideoElement")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Element")),(0,r.kt)("h4",{id:"defined-in-56"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/window/Window.ts#L4"},"packages/core/src/window/Window.ts:4")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"windoweventtargetsmap"},"WindowEventTargetsMap"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"WindowEventTargetsMap"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"E")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"Document")," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"DocumentEventMap")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"E")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"globalThis.Window")," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"WindowEventMap")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"E")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLBodyElement")," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLBodyElementEventMap")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"E")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"SVGSVGElement")," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"SVGSVGElementEventMap")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"E")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"SVGElement")," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"SVGElementEventMap")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"E")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLMediaElement")," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLMediaElementEventMap")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"E")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLVideoElement")," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLVideoElementEventMap")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLElementEventMap")," & ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.WindowCustomEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"WindowCustomEventsMap"))),(0,r.kt)("h4",{id:"type-parameters-13"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#windoweventtargets"},(0,r.kt)("inlineCode",{parentName:"a"},"WindowEventTargets")))))),(0,r.kt)("h4",{id:"defined-in-57"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/window/Window.ts#L14"},"packages/core/src/window/Window.ts:14")),(0,r.kt)("h2",{id:"variables"},"Variables"),(0,r.kt)("h3",{id:"ns"},"ns"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Const")," ",(0,r.kt)("strong",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace"))),(0,r.kt)("h4",{id:"defined-in-58"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Namespace.ts#L123"},"packages/core/src/Namespace.ts:123")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"pluginloader"},"pluginLoader"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Const")," ",(0,r.kt)("strong",{parentName:"p"},"pluginLoader"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PluginLoader"},(0,r.kt)("inlineCode",{parentName:"a"},"PluginLoader"))),(0,r.kt)("h4",{id:"defined-in-59"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/pluginLoader.ts#L93"},"packages/core/src/pluginLoader.ts:93")),(0,r.kt)("h2",{id:"functions"},"Functions"),(0,r.kt)("h3",{id:"bootclientapp"},"bootClientApp"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"bootClientApp"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"app"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"bootConfig"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"parameters-14"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"app")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Object"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"app.bootstrap")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Bootstrap"},(0,r.kt)("inlineCode",{parentName:"a"},"Bootstrap")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"app.oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"bootConfig")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")))))),(0,r.kt)("h4",{id:"returns-14"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"bootstrap")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Bootstrap"},(0,r.kt)("inlineCode",{parentName:"a"},"Bootstrap")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))))),(0,r.kt)("h4",{id:"defined-in-60"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L254"},"packages/core/src/boot.ts:254")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"createimaapp"},"createImaApp"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"createImaApp"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"returns-15"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"bootstrap")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Bootstrap"},(0,r.kt)("inlineCode",{parentName:"a"},"Bootstrap")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))))),(0,r.kt)("h4",{id:"defined-in-61"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L182"},"packages/core/src/boot.ts:182")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getclientbootconfig"},"getClientBootConfig"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getClientBootConfig"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"initialAppConfigFunctions"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig"))),(0,r.kt)("h4",{id:"parameters-15"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"initialAppConfigFunctions")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.InitAppConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"InitAppConfig")))))),(0,r.kt)("h4",{id:"returns-16"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig"))),(0,r.kt)("h4",{id:"defined-in-62"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L190"},"packages/core/src/boot.ts:190")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getinitialimaconfigfunctions"},"getInitialImaConfigFunctions"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getInitialImaConfigFunctions"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.InitImaConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"InitImaConfig"))),(0,r.kt)("h4",{id:"returns-17"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.InitImaConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"InitImaConfig"))),(0,r.kt)("h4",{id:"defined-in-63"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L166"},"packages/core/src/boot.ts:166")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getinitialpluginconfig"},"getInitialPluginConfig"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getInitialPluginConfig"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"returns-18"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"plugins")),(0,r.kt)("td",{parentName:"tr",align:"left"},"{ ",(0,r.kt)("inlineCode",{parentName:"td"},"name"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"plugin"),": ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.InitPluginConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"InitPluginConfig"))," }[]")))),(0,r.kt)("h4",{id:"defined-in-64"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L170"},"packages/core/src/boot.ts:170")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getnamespace"},"getNamespace"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getNamespace"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace"))),(0,r.kt)("h4",{id:"returns-19"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace"))),(0,r.kt)("h4",{id:"defined-in-65"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Namespace.ts#L125"},"packages/core/src/Namespace.ts:125")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"onload"},"onLoad"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"onLoad"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"returns-20"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"defined-in-66"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L310"},"packages/core/src/boot.ts:310")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"reviveclientapp"},"reviveClientApp"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"reviveClientApp"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"initialAppConfigFunctions"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," & { ",(0,r.kt)("inlineCode",{parentName:"p"},"app"),": { ",(0,r.kt)("inlineCode",{parentName:"p"},"bootstrap"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Bootstrap"},(0,r.kt)("inlineCode",{parentName:"a"},"Bootstrap"))," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))," } ; ",(0,r.kt)("inlineCode",{parentName:"p"},"bootConfig"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig"))," }",">"),(0,r.kt)("h4",{id:"parameters-16"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"initialAppConfigFunctions")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.InitAppConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"InitAppConfig")))))),(0,r.kt)("h4",{id:"returns-21"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," & { ",(0,r.kt)("inlineCode",{parentName:"p"},"app"),": { ",(0,r.kt)("inlineCode",{parentName:"p"},"bootstrap"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Bootstrap"},(0,r.kt)("inlineCode",{parentName:"a"},"Bootstrap"))," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))," } ; ",(0,r.kt)("inlineCode",{parentName:"p"},"bootConfig"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig"))," }",">"),(0,r.kt)("h4",{id:"defined-in-67"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L289"},"packages/core/src/boot.ts:289")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"routeclientapp"},"routeClientApp"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"routeClientApp"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"app"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,r.kt)("h4",{id:"parameters-17"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"app")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Object"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"app.bootstrap")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Bootstrap"},(0,r.kt)("inlineCode",{parentName:"a"},"Bootstrap")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"app.oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))))),(0,r.kt)("h4",{id:"returns-22"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,r.kt)("h4",{id:"defined-in-68"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L269"},"packages/core/src/boot.ts:269")))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1bd618df.b8c27984.js b/assets/js/1bd618df.b8c27984.js new file mode 100644 index 0000000000..2b02e88e28 --- /dev/null +++ b/assets/js/1bd618df.b8c27984.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[1987],{3905:(e,t,a)=>{a.d(t,{Zo:()=>m,kt:()=>c});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),d=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},m=function(e){var t=d(e.components);return n.createElement(o.Provider,{value:t},e.children)},k="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},N=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),k=d(a),N=r,c=k["".concat(o,".").concat(N)]||k[N]||s[N]||i;return a?n.createElement(c,l(l({ref:t},m),{},{components:a})):n.createElement(c,l({ref:t},m))}));function c(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=N;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[k]="string"==typeof e?e:r,l[1]=p;for(var d=2;d{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>s,frontMatter:()=>i,metadata:()=>p,toc:()=>d});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_core",title:"Module: @ima/core",sidebar_label:"@ima/core",sidebar_position:0,custom_edit_url:null},l=void 0,p={unversionedId:"api/modules/ima_core",id:"api/modules/ima_core",title:"Module: @ima/core",description:"Enumerations",source:"@site/../docs/api/modules/ima_core.md",sourceDirName:"api/modules",slug:"/api/modules/ima_core",permalink:"/api/modules/ima_core",draft:!1,editUrl:null,tags:[],version:"current",sidebarPosition:0,frontMatter:{id:"ima_core",title:"Module: @ima/core",sidebar_label:"@ima/core",sidebar_position:0,custom_edit_url:null},sidebar:"api",previous:{title:"@ima/cli",permalink:"/api/modules/ima_cli"},next:{title:"@ima/dev-utils",permalink:"/api/modules/ima_dev_utils"}},o={},d=[{value:"Enumerations",id:"enumerations",level:2},{value:"Classes",id:"classes",level:2},{value:"Interfaces",id:"interfaces",level:2},{value:"Type Aliases",id:"type-aliases",level:2},{value:"AnyParameters",id:"anyparameters",level:3},{value:"Index signature",id:"index-signature",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"AppSettings",id:"appsettings",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"AsyncRouteController",id:"asyncroutecontroller",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"AsyncRouteView",id:"asyncrouteview",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"BootSettings",id:"bootsettings",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"Cookie",id:"cookie",level:3},{value:"Type declaration",id:"type-declaration-1",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"CookieOptions",id:"cookieoptions",level:3},{value:"Type declaration",id:"type-declaration-2",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"CookieTransformFunction",id:"cookietransformfunction",level:3},{value:"Type declaration",id:"type-declaration-3",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"DecoratedOCAliasMap",id:"decoratedocaliasmap",level:3},{value:"Defined in",id:"defined-in-8",level:4},{value:"Dependencies",id:"dependencies",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"Dependency",id:"dependency",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"DictionaryConfig",id:"dictionaryconfig",level:3},{value:"Type declaration",id:"type-declaration-4",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"DictionaryData",id:"dictionarydata",level:3},{value:"Index signature",id:"index-signature-1",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"DispatcherListener",id:"dispatcherlistener",level:3},{value:"Type parameters",id:"type-parameters-2",level:4},{value:"Type declaration",id:"type-declaration-5",level:4},{value:"Parameters",id:"parameters",level:5},{value:"Returns",id:"returns",level:5},{value:"Defined in",id:"defined-in-13",level:4},{value:"EntryOptions",id:"entryoptions",level:3},{value:"Type declaration",id:"type-declaration-6",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"EventBusEventHandler",id:"eventbuseventhandler",level:3},{value:"Type declaration",id:"type-declaration-7",level:4},{value:"Parameters",id:"parameters-1",level:5},{value:"Returns",id:"returns-1",level:5},{value:"Defined in",id:"defined-in-15",level:4},{value:"EventBusListener",id:"eventbuslistener",level:3},{value:"Type declaration",id:"type-declaration-8",level:4},{value:"Parameters",id:"parameters-2",level:5},{value:"Returns",id:"returns-2",level:5},{value:"Defined in",id:"defined-in-16",level:4},{value:"EventBusOptions",id:"eventbusoptions",level:3},{value:"Type declaration",id:"type-declaration-9",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"ExecutionJob",id:"executionjob",level:3},{value:"Type declaration",id:"type-declaration-10",level:4},{value:"Parameters",id:"parameters-3",level:5},{value:"Returns",id:"returns-3",level:5},{value:"Defined in",id:"defined-in-18",level:4},{value:"GenericErrorParams",id:"genericerrorparams",level:3},{value:"Index signature",id:"index-signature-2",level:4},{value:"Type declaration",id:"type-declaration-11",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"HttpAgentResponse",id:"httpagentresponse",level:3},{value:"Type parameters",id:"type-parameters-3",level:4},{value:"Type declaration",id:"type-declaration-12",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"HttpProxyErrorParams",id:"httpproxyerrorparams",level:3},{value:"Type parameters",id:"type-parameters-4",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"HttpProxyRequestParams",id:"httpproxyrequestparams",level:3},{value:"Type declaration",id:"type-declaration-13",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"InitBindFunction",id:"initbindfunction",level:3},{value:"Type declaration",id:"type-declaration-14",level:4},{value:"Parameters",id:"parameters-4",level:5},{value:"Returns",id:"returns-4",level:5},{value:"Defined in",id:"defined-in-23",level:4},{value:"InitRoutesFunction",id:"initroutesfunction",level:3},{value:"Type declaration",id:"type-declaration-15",level:4},{value:"Parameters",id:"parameters-5",level:5},{value:"Returns",id:"returns-5",level:5},{value:"Defined in",id:"defined-in-24",level:4},{value:"InitServicesFunction",id:"initservicesfunction",level:3},{value:"Type declaration",id:"type-declaration-16",level:4},{value:"Parameters",id:"parameters-6",level:5},{value:"Returns",id:"returns-6",level:5},{value:"Defined in",id:"defined-in-25",level:4},{value:"InitSettingsFunction",id:"initsettingsfunction",level:3},{value:"Type declaration",id:"type-declaration-17",level:4},{value:"Parameters",id:"parameters-7",level:5},{value:"Returns",id:"returns-7",level:5},{value:"Defined in",id:"defined-in-26",level:4},{value:"LoadedResources",id:"loadedresources",level:3},{value:"Type parameters",id:"type-parameters-5",level:4},{value:"Defined in",id:"defined-in-27",level:4},{value:"LocalizationFunction",id:"localizationfunction",level:3},{value:"Type declaration",id:"type-declaration-18",level:4},{value:"Parameters",id:"parameters-8",level:5},{value:"Returns",id:"returns-8",level:5},{value:"Defined in",id:"defined-in-28",level:4},{value:"ManageArgs",id:"manageargs",level:3},{value:"Type declaration",id:"type-declaration-19",level:4},{value:"Defined in",id:"defined-in-29",level:4},{value:"ManagedPage",id:"managedpage",level:3},{value:"Type declaration",id:"type-declaration-20",level:4},{value:"Defined in",id:"defined-in-30",level:4},{value:"MetaAttributes",id:"metaattributes",level:3},{value:"Defined in",id:"defined-in-31",level:4},{value:"MetaManagerRecord",id:"metamanagerrecord",level:3},{value:"Type parameters",id:"type-parameters-6",level:4},{value:"Defined in",id:"defined-in-32",level:4},{value:"MetaManagerRecordKeys",id:"metamanagerrecordkeys",level:3},{value:"Defined in",id:"defined-in-33",level:4},{value:"MetaValue",id:"metavalue",level:3},{value:"Defined in",id:"defined-in-34",level:4},{value:"NativeListener",id:"nativelistener",level:3},{value:"Type declaration",id:"type-declaration-21",level:4},{value:"Parameters",id:"parameters-9",level:5},{value:"Returns",id:"returns-9",level:5},{value:"Defined in",id:"defined-in-35",level:4},{value:"OCInjectable",id:"ocinjectable",level:3},{value:"Type parameters",id:"type-parameters-7",level:4},{value:"Defined in",id:"defined-in-36",level:4},{value:"OCInstance",id:"ocinstance",level:3},{value:"Type parameters",id:"type-parameters-8",level:4},{value:"Defined in",id:"defined-in-37",level:4},{value:"OCInstanceConstrain",id:"ocinstanceconstrain",level:3},{value:"Type parameters",id:"type-parameters-9",level:4},{value:"Defined in",id:"defined-in-38",level:4},{value:"ObjectParameters",id:"objectparameters",level:3},{value:"Index signature",id:"index-signature-3",level:4},{value:"Defined in",id:"defined-in-39",level:4},{value:"PageData",id:"pagedata",level:3},{value:"Defined in",id:"defined-in-40",level:4},{value:"PageState",id:"pagestate",level:3},{value:"Index signature",id:"index-signature-4",level:4},{value:"Defined in",id:"defined-in-41",level:4},{value:"PluginInitBindFunction",id:"plugininitbindfunction",level:3},{value:"Type declaration",id:"type-declaration-22",level:4},{value:"Parameters",id:"parameters-10",level:5},{value:"Returns",id:"returns-10",level:5},{value:"Defined in",id:"defined-in-42",level:4},{value:"PluginInitServicesFunction",id:"plugininitservicesfunction",level:3},{value:"Type declaration",id:"type-declaration-23",level:4},{value:"Parameters",id:"parameters-11",level:5},{value:"Returns",id:"returns-11",level:5},{value:"Defined in",id:"defined-in-43",level:4},{value:"PluginInitSettingsFunction",id:"plugininitsettingsfunction",level:3},{value:"Type declaration",id:"type-declaration-24",level:4},{value:"Parameters",id:"parameters-12",level:5},{value:"Returns",id:"returns-12",level:5},{value:"Defined in",id:"defined-in-44",level:4},{value:"Resource",id:"resource",level:3},{value:"Defined in",id:"defined-in-45",level:4},{value:"RouteController",id:"routecontroller",level:3},{value:"Defined in",id:"defined-in-46",level:4},{value:"RouteParams",id:"routeparams",level:3},{value:"Type parameters",id:"type-parameters-10",level:4},{value:"Defined in",id:"defined-in-47",level:4},{value:"RoutePathExpression",id:"routepathexpression",level:3},{value:"Type declaration",id:"type-declaration-25",level:4},{value:"Defined in",id:"defined-in-48",level:4},{value:"RouteView",id:"routeview",level:3},{value:"Defined in",id:"defined-in-49",level:4},{value:"RouterMiddleware",id:"routermiddleware",level:3},{value:"Type declaration",id:"type-declaration-26",level:4},{value:"Parameters",id:"parameters-13",level:5},{value:"Returns",id:"returns-13",level:5},{value:"Defined in",id:"defined-in-50",level:4},{value:"SerializedCacheEntry",id:"serializedcacheentry",level:3},{value:"Type parameters",id:"type-parameters-11",level:4},{value:"Type declaration",id:"type-declaration-27",level:4},{value:"Defined in",id:"defined-in-51",level:4},{value:"SerializedData",id:"serializeddata",level:3},{value:"Type parameters",id:"type-parameters-12",level:4},{value:"Index signature",id:"index-signature-5",level:4},{value:"Defined in",id:"defined-in-52",level:4},{value:"StringParameters",id:"stringparameters",level:3},{value:"Index signature",id:"index-signature-6",level:4},{value:"Defined in",id:"defined-in-53",level:4},{value:"UnknownParameters",id:"unknownparameters",level:3},{value:"Index signature",id:"index-signature-7",level:4},{value:"Defined in",id:"defined-in-54",level:4},{value:"UnknownPromiseParameters",id:"unknownpromiseparameters",level:3},{value:"Index signature",id:"index-signature-8",level:4},{value:"Defined in",id:"defined-in-55",level:4},{value:"WindowEventTargets",id:"windoweventtargets",level:3},{value:"Defined in",id:"defined-in-56",level:4},{value:"WindowEventTargetsMap",id:"windoweventtargetsmap",level:3},{value:"Type parameters",id:"type-parameters-13",level:4},{value:"Defined in",id:"defined-in-57",level:4},{value:"Variables",id:"variables",level:2},{value:"ns",id:"ns",level:3},{value:"Defined in",id:"defined-in-58",level:4},{value:"pluginLoader",id:"pluginloader",level:3},{value:"Defined in",id:"defined-in-59",level:4},{value:"Functions",id:"functions",level:2},{value:"bootClientApp",id:"bootclientapp",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-14",level:4},{value:"Defined in",id:"defined-in-60",level:4},{value:"createImaApp",id:"createimaapp",level:3},{value:"Returns",id:"returns-15",level:4},{value:"Defined in",id:"defined-in-61",level:4},{value:"getClientBootConfig",id:"getclientbootconfig",level:3},{value:"Parameters",id:"parameters-15",level:4},{value:"Returns",id:"returns-16",level:4},{value:"Defined in",id:"defined-in-62",level:4},{value:"getInitialImaConfigFunctions",id:"getinitialimaconfigfunctions",level:3},{value:"Returns",id:"returns-17",level:4},{value:"Defined in",id:"defined-in-63",level:4},{value:"getInitialPluginConfig",id:"getinitialpluginconfig",level:3},{value:"Returns",id:"returns-18",level:4},{value:"Defined in",id:"defined-in-64",level:4},{value:"getNamespace",id:"getnamespace",level:3},{value:"Returns",id:"returns-19",level:4},{value:"Defined in",id:"defined-in-65",level:4},{value:"onLoad",id:"onload",level:3},{value:"Returns",id:"returns-20",level:4},{value:"Defined in",id:"defined-in-66",level:4},{value:"reviveClientApp",id:"reviveclientapp",level:3},{value:"Parameters",id:"parameters-16",level:4},{value:"Returns",id:"returns-21",level:4},{value:"Defined in",id:"defined-in-67",level:4},{value:"routeClientApp",id:"routeclientapp",level:3},{value:"Parameters",id:"parameters-17",level:4},{value:"Returns",id:"returns-22",level:4},{value:"Defined in",id:"defined-in-68",level:4}],m={toc:d},k="wrapper";function s(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"enumerations"},"Enumerations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.ActionTypes"},"ActionTypes")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.BindingState"},"BindingState")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.HttpStatusCode"},"HttpStatusCode")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.RendererEvents"},"RendererEvents")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.RendererTypes"},"RendererTypes")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.RouteNames"},"RouteNames")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.RouterEvents"},"RouterEvents")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/enums/ima_core.StateEvents"},"StateEvents"))),(0,r.kt)("h2",{id:"classes"},"Classes"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.AbstractController"},"AbstractController")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.AbstractExecution"},"AbstractExecution")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.AbstractExtension"},"AbstractExtension")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.AbstractPageManager"},"AbstractPageManager")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.AbstractRoute"},"AbstractRoute")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.AbstractRouter"},"AbstractRouter")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Bootstrap"},"Bootstrap")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Cache"},"Cache")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.CacheEntry"},"CacheEntry")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.CacheFactory"},"CacheFactory")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.CacheImpl"},"CacheImpl")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.CancelError"},"CancelError")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ClientPageManager"},"ClientPageManager")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ClientRouter"},"ClientRouter")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ClientWindow"},"ClientWindow")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ComponentUtils"},"ComponentUtils")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Controller"},"Controller")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ControllerDecorator"},"ControllerDecorator")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.CookieStorage"},"CookieStorage")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Dictionary"},"Dictionary")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Dispatcher"},"Dispatcher")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.DispatcherImpl"},"DispatcherImpl")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.DynamicRoute"},"DynamicRoute")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Entry"},"Entry")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Error"},"Error")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.EventBus"},"EventBus")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.EventBusImpl"},"EventBusImpl")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Execution"},"Execution")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Extension"},"Extension")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.GenericError"},"GenericError")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.HttpAgent"},"HttpAgent")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.HttpAgentImpl"},"HttpAgentImpl")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.HttpProxy"},"HttpProxy")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.MapStorage"},"MapStorage")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.MessageFormatDictionary"},"MessageFormatDictionary")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.MetaManager"},"MetaManager")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.MetaManagerImpl"},"MetaManagerImpl")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Namespace"},"Namespace")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ObjectContainer"},"ObjectContainer")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Observable"},"Observable")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ObservableImpl"},"ObservableImpl")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageFactory"},"PageFactory")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageHandler"},"PageHandler")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageHandlerRegistry"},"PageHandlerRegistry")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageManager"},"PageManager")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageMetaHandler"},"PageMetaHandler")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageNavigationHandler"},"PageNavigationHandler")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageRenderer"},"PageRenderer")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageStateManagerDecorator"},"PageStateManagerDecorator")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PageStateManagerImpl"},"PageStateManagerImpl")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.PluginLoader"},"PluginLoader")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Request"},"Request")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Response"},"Response")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.RouteFactory"},"RouteFactory")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Router"},"Router")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.SerialBatch"},"SerialBatch")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ServerPageManager"},"ServerPageManager")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ServerRouter"},"ServerRouter")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.ServerWindow"},"ServerWindow")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.SessionMapStorage"},"SessionMapStorage")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.SessionStorage"},"SessionStorage")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.StaticRoute"},"StaticRoute")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Storage"},"Storage")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.UrlTransformer"},"UrlTransformer")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.WeakMapStorage"},"WeakMapStorage")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/classes/ima_core.Window"},"Window"))),(0,r.kt)("h2",{id:"interfaces"},"Interfaces"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.AppEnvironment"},"AppEnvironment")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.BootConfig"},"BootConfig")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.BootServices"},"BootServices")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.DictionaryMap"},"DictionaryMap")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.DispatcherEventsMap"},"DispatcherEventsMap")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.Environment"},"Environment")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.GlobalImaObject"},"GlobalImaObject")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.HttpAgentRequestOptions"},"HttpAgentRequestOptions")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.ImaRequestInit"},"ImaRequestInit")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.InitAppConfig"},"InitAppConfig")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.InitImaConfig"},"InitImaConfig")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.InitPluginConfig"},"InitPluginConfig")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.Manifest"},"Manifest")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.ManifestAsset"},"ManifestAsset")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.OCAliasMap"},"OCAliasMap")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.PageAction"},"PageAction")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.PageRendererSettings"},"PageRendererSettings")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.Resources"},"Resources")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.RouteAction"},"RouteAction")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.RouteFactoryOptions"},"RouteFactoryOptions")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.RouteLocals"},"RouteLocals")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.RouteOptions"},"RouteOptions")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.Settings"},"Settings")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.Utils"},"Utils")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/api/interfaces/ima_core.WindowCustomEventsMap"},"WindowCustomEventsMap"))),(0,r.kt)("h2",{id:"type-aliases"},"Type Aliases"),(0,r.kt)("h3",{id:"anyparameters"},"AnyParameters"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"AnyParameters"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L22"},"packages/core/src/types.ts:22")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"appsettings"},"AppSettings"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"AppSettings"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"App settings function, used in ./app/config/settings.js"),(0,r.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dev?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"PartialDeep"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.Settings"},(0,r.kt)("inlineCode",{parentName:"a"},"Settings")),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prod")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.Settings"},(0,r.kt)("inlineCode",{parentName:"a"},"Settings")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"regression?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"PartialDeep"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.Settings"},(0,r.kt)("inlineCode",{parentName:"a"},"Settings")),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"test?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"PartialDeep"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.Settings"},(0,r.kt)("inlineCode",{parentName:"a"},"Settings")),">")))),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L159"},"packages/core/src/boot.ts:159")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"asyncroutecontroller"},"AsyncRouteController"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"AsyncRouteController"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"WithAsync"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController")),">"),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRoute.ts#L27"},"packages/core/src/router/AbstractRoute.ts:27")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"asyncrouteview"},"AsyncRouteView"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"AsyncRouteView"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"WithAsync"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routeview"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteView")),">"),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRoute.ts#L28"},"packages/core/src/router/AbstractRoute.ts:28")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"bootsettings"},"BootSettings"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"BootSettings"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Pick"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.GlobalImaObject"},(0,r.kt)("inlineCode",{parentName:"a"},"GlobalImaObject")),", ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Version"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Debug"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Env"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Version"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$App"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Protocol"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Language"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Host"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Path"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$Root"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"$LanguagePartPath"'),">"),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L82"},"packages/core/src/Bootstrap.ts:82")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cookie"},"Cookie"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"Cookie"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-1"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#cookieoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieOptions")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Date")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"undefined"))))),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L33"},"packages/core/src/storage/CookieStorage.ts:33")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cookieoptions"},"CookieOptions"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"CookieOptions"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-2"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"domain?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"expires?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Date"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"httpOnly?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"maxAge?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"partitioned?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"path?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"sameSite?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},'"none"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},'"lax"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},'"strict"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"secure?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))))),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L22"},"packages/core/src/storage/CookieStorage.ts:22")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cookietransformfunction"},"CookieTransformFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"CookieTransformFunction"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-3"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"decode")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"value"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string"),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"encode")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"value"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string"),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Response.ts#L10"},"packages/core/src/router/Response.ts:10")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"decoratedocaliasmap"},"DecoratedOCAliasMap"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"DecoratedOCAliasMap"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"AddOCChaining"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap")),">"," & ",(0,r.kt)("inlineCode",{parentName:"p"},"WithOCOptional"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap")),">"," & ",(0,r.kt)("inlineCode",{parentName:"p"},"WithOCOptionalSpread"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap")),">"," & ",(0,r.kt)("inlineCode",{parentName:"p"},"WithOCSpread"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap")),">"),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/config/bind.ts#L68"},"packages/core/src/config/bind.ts:68")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"dependencies"},"Dependencies"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"Dependencies"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","[]"),(0,r.kt)("h4",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L23"},"packages/core/src/oc/ObjectContainer.ts:23")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"dependency"},"Dependency"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"Dependency"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",": keyof ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#decoratedocaliasmap"},(0,r.kt)("inlineCode",{parentName:"a"},"DecoratedOCAliasMap"))," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#ocinjectable"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInjectable")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"," ","|"," [",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#ocinjectable"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInjectable")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",", { ",(0,r.kt)("inlineCode",{parentName:"p"},"optional"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," }]"),(0,r.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L24"},"packages/core/src/oc/ObjectContainer.ts:24")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"dictionaryconfig"},"DictionaryConfig"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"DictionaryConfig"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-4"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"$Language")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dictionary")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dictionarydata"},(0,r.kt)("inlineCode",{parentName:"a"},"DictionaryData")))))),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/dictionary/Dictionary.ts#L3"},"packages/core/src/dictionary/Dictionary.ts:3")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"dictionarydata"},"DictionaryData"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"DictionaryData"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature-1"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dictionarydata"},(0,r.kt)("inlineCode",{parentName:"a"},"DictionaryData"))," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#localizationfunction"},(0,r.kt)("inlineCode",{parentName:"a"},"LocalizationFunction"))),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/dictionary/Dictionary.ts#L8"},"packages/core/src/dictionary/Dictionary.ts:8")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"dispatcherlistener"},"DispatcherListener"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"DispatcherListener"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"D"),">",": (",(0,r.kt)("inlineCode",{parentName:"p"},"data"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"D"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"D"))))),(0,r.kt)("h4",{id:"type-declaration-5"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"data"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"D"))))),(0,r.kt)("h5",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/Dispatcher.ts#L12"},"packages/core/src/event/Dispatcher.ts:12")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"entryoptions"},"EntryOptions"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"EntryOptions"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-6"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"writeable")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))))),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/Entry.ts#L7"},"packages/core/src/oc/Entry.ts:7")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"eventbuseventhandler"},"EventBusEventHandler"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"EventBusEventHandler"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"data?"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-declaration-7"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"data?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))))),(0,r.kt)("h5",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/EventBus.ts#L5"},"packages/core/src/event/EventBus.ts:5")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"eventbuslistener"},"EventBusListener"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"EventBusListener"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"event"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"CustomEvent"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"type-declaration-8"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h5",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"CustomEvent"))))),(0,r.kt)("h5",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/EventBus.ts#L3"},"packages/core/src/event/EventBus.ts:3")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"eventbusoptions"},"EventBusOptions"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"EventBusOptions"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-9"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"bubbles?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"cancelable?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"composed?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))))),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/EventBus.ts#L9"},"packages/core/src/event/EventBus.ts:9")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"executionjob"},"ExecutionJob"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"ExecutionJob"),": (...",(0,r.kt)("inlineCode",{parentName:"p"},"args"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),"[]) => ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"type-declaration-10"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"...args"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h5",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"...args")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"),"[]")))),(0,r.kt)("h5",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/execution/Execution.ts#L1"},"packages/core/src/execution/Execution.ts:1")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"genericerrorparams"},"GenericErrorParams"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"GenericErrorParams"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature-2"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"type-declaration-11"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"cause?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Error")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"status?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number"))))),(0,r.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/error/GenericError.ts#L3"},"packages/core/src/error/GenericError.ts:3")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"httpagentresponse"},"HttpAgentResponse"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"HttpAgentResponse"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"B"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"A response from the server."),(0,r.kt)("h4",{id:"type-parameters-3"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"B"))))),(0,r.kt)("h4",{id:"type-declaration-12"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"body")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"B"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"cached")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"headers")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#stringparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"StringParameters")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"headersRaw?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Headers"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#httpproxyrequestparams"},(0,r.kt)("inlineCode",{parentName:"a"},"HttpProxyRequestParams")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"status")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number"))))),(0,r.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/http/HttpAgent.ts#L55"},"packages/core/src/http/HttpAgent.ts:55")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"httpproxyerrorparams"},"HttpProxyErrorParams"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"HttpProxyErrorParams"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"B"),">",": { ",(0,r.kt)("inlineCode",{parentName:"p"},"body"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"B")," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"cause"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Error")," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"errorName"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"status"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," } & ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#httpproxyrequestparams"},(0,r.kt)("inlineCode",{parentName:"a"},"HttpProxyRequestParams"))),(0,r.kt)("p",null,"An object that describes a failed HTTP request, providing\ninformation about both the failure reported by the server and how the\nrequest has been sent to the server."),(0,r.kt)("h4",{id:"type-parameters-4"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"B")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/http/HttpProxy.ts#L51"},"packages/core/src/http/HttpProxy.ts:51")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"httpproxyrequestparams"},"HttpProxyRequestParams"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"HttpProxyRequestParams"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"An object representing the complete request parameters used to create and\nsend the HTTP request."),(0,r.kt)("h4",{id:"type-declaration-13"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"method")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.HttpAgentRequestOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"HttpAgentRequestOptions")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"transformedUrl")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"url")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/http/HttpProxy.ts#L27"},"packages/core/src/http/HttpProxy.ts:27")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"initbindfunction"},"InitBindFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"InitBindFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Required"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),">","[",(0,r.kt)("inlineCode",{parentName:"p"},'"bind"'),"]",", ",(0,r.kt)("inlineCode",{parentName:"p"},"state"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/enums/ima_core.BindingState"},(0,r.kt)("inlineCode",{parentName:"a"},"BindingState")),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-declaration-14"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"state"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ns")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"config")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Required"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),">","[",(0,r.kt)("inlineCode",{parentName:"td"},'"bind"'),"]")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/enums/ima_core.BindingState"},(0,r.kt)("inlineCode",{parentName:"a"},"BindingState")))))),(0,r.kt)("h5",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L16"},"packages/core/src/Bootstrap.ts:16")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"initroutesfunction"},"InitRoutesFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"InitRoutesFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"routes"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"router"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Router"},(0,r.kt)("inlineCode",{parentName:"a"},"Router")),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-declaration-15"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"routes"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"router"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ns")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"routes")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"undefined"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"router")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Router"},(0,r.kt)("inlineCode",{parentName:"a"},"Router")))))),(0,r.kt)("h5",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L23"},"packages/core/src/Bootstrap.ts:23")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"initservicesfunction"},"InitServicesFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"InitServicesFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"p"},'"services"'),"]",") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-declaration-16"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ns")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"config")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"td"},'"services"'),"]")))),(0,r.kt)("h5",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L30"},"packages/core/src/Bootstrap.ts:30")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"initsettingsfunction"},"InitSettingsFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"InitSettingsFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"p"},'"settings"'),"]",") => ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#appsettings"},(0,r.kt)("inlineCode",{parentName:"a"},"AppSettings"))),(0,r.kt)("h4",{id:"type-declaration-17"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#appsettings"},(0,r.kt)("inlineCode",{parentName:"a"},"AppSettings"))),(0,r.kt)("h5",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ns")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"config")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"td"},'"settings"'),"]")))),(0,r.kt)("h5",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#appsettings"},(0,r.kt)("inlineCode",{parentName:"a"},"AppSettings"))),(0,r.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L36"},"packages/core/src/Bootstrap.ts:36")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"loadedresources"},"LoadedResources"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"LoadedResources"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"Intersection"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"Partial"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"Matching"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">",">",">",", ",(0,r.kt)("inlineCode",{parentName:"p"},"Required"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"NonMatching"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">",">",">",">"),(0,r.kt)("h4",{id:"type-parameters-5"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/controller/Controller.ts#L27"},"packages/core/src/controller/Controller.ts:27")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"localizationfunction"},"LocalizationFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"LocalizationFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"parameters"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#objectparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectParameters")),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"type-declaration-18"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"parameters"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h5",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"parameters")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#objectparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectParameters")))))),(0,r.kt)("h5",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/dictionary/Dictionary.ts#L12"},"packages/core/src/dictionary/Dictionary.ts:12")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"manageargs"},"ManageArgs"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"ManageArgs"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-19"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"action?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.PageAction"},(0,r.kt)("inlineCode",{parentName:"a"},"PageAction")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"route")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"InstanceType"),"")))),(0,r.kt)("h4",{id:"defined-in-29"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/manager/PageManager.ts#L5"},"packages/core/src/page/manager/PageManager.ts:5")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"managedpage"},"ManagedPage"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"ManagedPage"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-declaration-20"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controller")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routecontroller"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteController")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"controllerInstance")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Controller"},(0,r.kt)("inlineCode",{parentName:"a"},"Controller")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"decoratedController")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ControllerDecorator"},(0,r.kt)("inlineCode",{parentName:"a"},"ControllerDecorator")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteOptions")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"route")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"InstanceType"),"")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state")),(0,r.kt)("td",{parentName:"tr",align:"left"},"{ ",(0,r.kt)("inlineCode",{parentName:"td"},"abort?"),": { ",(0,r.kt)("inlineCode",{parentName:"td"},"promise"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"void"),">"," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"reject"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"resolve"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," } ; ",(0,r.kt)("inlineCode",{parentName:"td"},"activated"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"cancelled"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"executed"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"initialized"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"mounted"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"page"),": { ",(0,r.kt)("inlineCode",{parentName:"td"},"promise"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"void"),">"," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"reject"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"resolve"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," } }")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.abort?")),(0,r.kt)("td",{parentName:"tr",align:"left"},"{ ",(0,r.kt)("inlineCode",{parentName:"td"},"promise"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"void"),">"," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"reject"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"resolve"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," }")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.abort.promise")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"void"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.abort.reject")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.abort.resolve")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.activated")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.cancelled")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.executed")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.initialized")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.mounted")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.page")),(0,r.kt)("td",{parentName:"tr",align:"left"},"{ ",(0,r.kt)("inlineCode",{parentName:"td"},"promise"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"void"),">"," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"reject"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"resolve"),": () => ",(0,r.kt)("inlineCode",{parentName:"td"},"void")," }")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.page.promise")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"void"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.page.reject")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"state.page.resolve")),(0,r.kt)("td",{parentName:"tr",align:"left"},"() => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"view")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"viewInstance")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"defined-in-30"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/PageTypes.ts#L11"},"packages/core/src/page/PageTypes.ts:11")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"metaattributes"},"MetaAttributes"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"MetaAttributes"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Record"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#metavalue"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaValue")),">"),(0,r.kt)("h4",{id:"defined-in-31"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/meta/MetaManager.ts#L2"},"packages/core/src/meta/MetaManager.ts:2")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"metamanagerrecord"},"MetaManagerRecord"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"MetaManagerRecord"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"K"),">",": { ","[key in K]",": MetaValue } & ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#metaattributes"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaAttributes"))),(0,r.kt)("h4",{id:"type-parameters-6"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"K")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#metamanagerrecordkeys"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaManagerRecordKeys")))))),(0,r.kt)("h4",{id:"defined-in-32"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/meta/MetaManager.ts#L5"},"packages/core/src/meta/MetaManager.ts:5")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"metamanagerrecordkeys"},"MetaManagerRecordKeys"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"MetaManagerRecordKeys"),": ",(0,r.kt)("inlineCode",{parentName:"p"},'"content"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},'"href"')),(0,r.kt)("h4",{id:"defined-in-33"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/meta/MetaManager.ts#L4"},"packages/core/src/meta/MetaManager.ts:4")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"metavalue"},"MetaValue"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"MetaValue"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined")),(0,r.kt)("h4",{id:"defined-in-34"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/meta/MetaManager.ts#L1"},"packages/core/src/meta/MetaManager.ts:1")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"nativelistener"},"NativeListener"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"NativeListener"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"event"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"CustomEvent")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Event"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"type-declaration-21"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"event"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h5",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"CustomEvent")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Event"))))),(0,r.kt)("h5",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in-35"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/EventBus.ts#L7"},"packages/core/src/event/EventBus.ts:7")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"ocinjectable"},"OCInjectable"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"OCInjectable"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"," & ",(0,r.kt)("inlineCode",{parentName:"p"},"WithDependencies")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"," & ",(0,r.kt)("inlineCode",{parentName:"p"},"Partial"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"WithDependencies"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Function")," & { ",(0,r.kt)("inlineCode",{parentName:"p"},"prototype"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"T")," } & ",(0,r.kt)("inlineCode",{parentName:"p"},"Partial"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"WithDependencies"),">"),(0,r.kt)("h4",{id:"type-parameters-7"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"defined-in-36"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L18"},"packages/core/src/oc/ObjectContainer.ts:18")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"ocinstance"},"OCInstance"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"OCInstance"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"T")," extends keyof ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#decoratedocaliasmap"},(0,r.kt)("inlineCode",{parentName:"a"},"DecoratedOCAliasMap"))," ? ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#decoratedocaliasmap"},(0,r.kt)("inlineCode",{parentName:"a"},"DecoratedOCAliasMap")),"[",(0,r.kt)("inlineCode",{parentName:"p"},"T"),"]"," : ",(0,r.kt)("inlineCode",{parentName:"p"},"T")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">"," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"InstanceType"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"," : ",(0,r.kt)("inlineCode",{parentName:"p"},"T")," extends ","[",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",", { ",(0,r.kt)("inlineCode",{parentName:"p"},"optional"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," }]"," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"InstanceType"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),"[",(0,r.kt)("inlineCode",{parentName:"p"},"0"),"]",">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"T")),(0,r.kt)("h4",{id:"type-parameters-8"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinstanceconstrain"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInstanceConstrain")))))),(0,r.kt)("h4",{id:"defined-in-37"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L40"},"packages/core/src/oc/ObjectContainer.ts:40")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"ocinstanceconstrain"},"OCInstanceConstrain"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"OCInstanceConstrain"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",": keyof ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#decoratedocaliasmap"},(0,r.kt)("inlineCode",{parentName:"a"},"DecoratedOCAliasMap"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"," ","|"," ","[",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",", { ",(0,r.kt)("inlineCode",{parentName:"p"},"optional"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," }]"),(0,r.kt)("h4",{id:"type-parameters-9"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"defined-in-38"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L34"},"packages/core/src/oc/ObjectContainer.ts:34")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"objectparameters"},"ObjectParameters"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"ObjectParameters"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature-3"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Date")),(0,r.kt)("h4",{id:"defined-in-39"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L30"},"packages/core/src/types.ts:30")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"pagedata"},"PageData"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"PageData"),": { ",(0,r.kt)("inlineCode",{parentName:"p"},"status"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," } & ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))),(0,r.kt)("h4",{id:"defined-in-40"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/PageTypes.ts#L50"},"packages/core/src/page/PageTypes.ts:50")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"pagestate"},"PageState"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"PageState"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature-4"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"any")),(0,r.kt)("h4",{id:"defined-in-41"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManager.ts#L1"},"packages/core/src/page/state/PageStateManager.ts:1")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"plugininitbindfunction"},"PluginInitBindFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"PluginInitBindFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Required"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),">","[",(0,r.kt)("inlineCode",{parentName:"p"},'"bind"'),"]",", ",(0,r.kt)("inlineCode",{parentName:"p"},"isDynamicallyLoaded"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"name?"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-declaration-22"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"isDynamicallyLoaded"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"name?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters-10"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ns")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"config")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Required"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),">","[",(0,r.kt)("inlineCode",{parentName:"td"},'"bind"'),"]")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"isDynamicallyLoaded")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h5",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-42"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L42"},"packages/core/src/Bootstrap.ts:42")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"plugininitservicesfunction"},"PluginInitServicesFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"PluginInitServicesFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"p"},'"services"'),"]",", ",(0,r.kt)("inlineCode",{parentName:"p"},"isDynamicallyLoaded"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-declaration-23"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"isDynamicallyLoaded"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters-11"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ns")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"config")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"td"},'"services"'),"]")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"isDynamicallyLoaded")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))))),(0,r.kt)("h5",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-43"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L50"},"packages/core/src/Bootstrap.ts:50")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"plugininitsettingsfunction"},"PluginInitSettingsFunction"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"PluginInitSettingsFunction"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"p"},'"settings"'),"]",", ",(0,r.kt)("inlineCode",{parentName:"p"},"isDynamicallyLoaded"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"PartialDeep"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#appsettings"},(0,r.kt)("inlineCode",{parentName:"a"},"AppSettings")),">"),(0,r.kt)("h4",{id:"type-declaration-24"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"ns"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"config"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"isDynamicallyLoaded"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"PartialDeep"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#appsettings"},(0,r.kt)("inlineCode",{parentName:"a"},"AppSettings")),">"),(0,r.kt)("h5",{id:"parameters-12"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ns")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"config")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")),"[",(0,r.kt)("inlineCode",{parentName:"td"},'"settings"'),"]")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"isDynamicallyLoaded")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))))),(0,r.kt)("h5",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"PartialDeep"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#appsettings"},(0,r.kt)("inlineCode",{parentName:"a"},"AppSettings")),">"),(0,r.kt)("h4",{id:"defined-in-44"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L57"},"packages/core/src/Bootstrap.ts:57")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"resource"},"Resource"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"Resource"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," [",(0,r.kt)("inlineCode",{parentName:"p"},"string"),", { ",(0,r.kt)("inlineCode",{parentName:"p"},"[attribute: string]"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),"; ",(0,r.kt)("inlineCode",{parentName:"p"},"fallback"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," }]"),(0,r.kt)("h4",{id:"defined-in-45"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L37"},"packages/core/src/boot.ts:37")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"routecontroller"},"RouteController"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"RouteController"),": keyof ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Controller"},(0,r.kt)("inlineCode",{parentName:"a"},"Controller")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Controller"},(0,r.kt)("inlineCode",{parentName:"a"},"Controller")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"),(0,r.kt)("h4",{id:"defined-in-46"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRoute.ts#L15"},"packages/core/src/router/AbstractRoute.ts:15")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"routeparams"},"RouteParams"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"RouteParams"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"Partial"),"<{ ","[K in keyof T]",": T","[K]"," }",">"," & { ",(0,r.kt)("inlineCode",{parentName:"p"},"[key: string]"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.GenericError"},(0,r.kt)("inlineCode",{parentName:"a"},"GenericError")),"; }"),(0,r.kt)("h4",{id:"type-parameters-10"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"{}")))),(0,r.kt)("h4",{id:"defined-in-47"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRoute.ts#L9"},"packages/core/src/router/AbstractRoute.ts:9")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"routepathexpression"},"RoutePathExpression"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"RoutePathExpression"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"Path expression type used for router routes definition."),(0,r.kt)("h4",{id:"type-declaration-25"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"extractParameters")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"trimmedPath"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"additionalData"),": { ",(0,r.kt)("inlineCode",{parentName:"td"},"path"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"query"),": ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams"))," }) => ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"Function which takes care of parsing url params from given path. It returns object of key/value pairs which correspond to expected path url params and their values.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"matcher")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"RegExp")),(0,r.kt)("td",{parentName:"tr",align:"left"},"RegExp use in router for path matching to current route.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"toPath")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"params"),": ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Function that generates valid path from given route params.")))),(0,r.kt)("h4",{id:"defined-in-48"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/DynamicRoute.ts#L23"},"packages/core/src/router/DynamicRoute.ts:23")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"routeview"},"RouteView"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"RouteView"),": keyof ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">"," ","|"," (...",(0,r.kt)("inlineCode",{parentName:"p"},"args"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),"[]) => ",(0,r.kt)("inlineCode",{parentName:"p"},"any")),(0,r.kt)("h4",{id:"defined-in-49"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/AbstractRoute.ts#L20"},"packages/core/src/router/AbstractRoute.ts:20")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"routermiddleware"},"RouterMiddleware"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"RouterMiddleware"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"params"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"locals"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.RouteLocals"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteLocals")),", ",(0,r.kt)("inlineCode",{parentName:"p"},"next?"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"result"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void"),") => ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"type-declaration-26"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"params"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"locals"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"next?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h5",{id:"parameters-13"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"locals")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteLocals"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteLocals")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"next?")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"result"),": ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"void"))))),(0,r.kt)("h5",{id:"returns-13"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"defined-in-50"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/router/Router.ts#L29"},"packages/core/src/router/Router.ts:29")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"serializedcacheentry"},"SerializedCacheEntry"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"SerializedCacheEntry"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"V"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-parameters-11"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"V"))))),(0,r.kt)("h4",{id:"type-declaration-27"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ttl")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"V"))))),(0,r.kt)("h4",{id:"defined-in-51"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/cache/CacheEntry.ts#L1"},"packages/core/src/cache/CacheEntry.ts:1")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"serializeddata"},"SerializedData"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"SerializedData"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"V"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"type-parameters-12"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"V")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"index-signature-5"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": { ",(0,r.kt)("inlineCode",{parentName:"p"},"ttl"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"value"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"V")," }"),(0,r.kt)("h4",{id:"defined-in-52"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/cache/Cache.ts#L1"},"packages/core/src/cache/Cache.ts:1")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"stringparameters"},"StringParameters"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"StringParameters"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature-6"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"defined-in-53"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L14"},"packages/core/src/types.ts:14")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unknownparameters"},"UnknownParameters"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"UnknownParameters"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature-7"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")),(0,r.kt)("h4",{id:"defined-in-54"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L18"},"packages/core/src/types.ts:18")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unknownpromiseparameters"},"UnknownPromiseParameters"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"UnknownPromiseParameters"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"index-signature-8"},"Index signature"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"unknown")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"defined-in-55"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/types.ts#L26"},"packages/core/src/types.ts:26")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"windoweventtargets"},"WindowEventTargets"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"WindowEventTargets"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Document")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"globalThis.Window")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLBodyElement")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"SVGSVGElement")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"SVGElement")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLMediaElement")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLVideoElement")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Element")),(0,r.kt)("h4",{id:"defined-in-56"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/window/Window.ts#L4"},"packages/core/src/window/Window.ts:4")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"windoweventtargetsmap"},"WindowEventTargetsMap"),(0,r.kt)("p",null,"\u01ac ",(0,r.kt)("strong",{parentName:"p"},"WindowEventTargetsMap"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">",": ",(0,r.kt)("inlineCode",{parentName:"p"},"E")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"Document")," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"DocumentEventMap")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"E")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"globalThis.Window")," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"WindowEventMap")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"E")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLBodyElement")," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLBodyElementEventMap")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"E")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"SVGSVGElement")," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"SVGSVGElementEventMap")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"E")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"SVGElement")," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"SVGElementEventMap")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"E")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLMediaElement")," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLMediaElementEventMap")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"E")," extends ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLVideoElement")," ? ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLVideoElementEventMap")," : ",(0,r.kt)("inlineCode",{parentName:"p"},"HTMLElementEventMap")," & ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.WindowCustomEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"WindowCustomEventsMap"))),(0,r.kt)("h4",{id:"type-parameters-13"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#windoweventtargets"},(0,r.kt)("inlineCode",{parentName:"a"},"WindowEventTargets")))))),(0,r.kt)("h4",{id:"defined-in-57"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/window/Window.ts#L14"},"packages/core/src/window/Window.ts:14")),(0,r.kt)("h2",{id:"variables"},"Variables"),(0,r.kt)("h3",{id:"ns"},"ns"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Const")," ",(0,r.kt)("strong",{parentName:"p"},"ns"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace"))),(0,r.kt)("h4",{id:"defined-in-58"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Namespace.ts#L123"},"packages/core/src/Namespace.ts:123")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"pluginloader"},"pluginLoader"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Const")," ",(0,r.kt)("strong",{parentName:"p"},"pluginLoader"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PluginLoader"},(0,r.kt)("inlineCode",{parentName:"a"},"PluginLoader"))),(0,r.kt)("h4",{id:"defined-in-59"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/pluginLoader.ts#L93"},"packages/core/src/pluginLoader.ts:93")),(0,r.kt)("h2",{id:"functions"},"Functions"),(0,r.kt)("h3",{id:"bootclientapp"},"bootClientApp"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"bootClientApp"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"app"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"bootConfig"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"parameters-14"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"app")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Object"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"app.bootstrap")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Bootstrap"},(0,r.kt)("inlineCode",{parentName:"a"},"Bootstrap")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"app.oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"bootConfig")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig")))))),(0,r.kt)("h4",{id:"returns-14"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"bootstrap")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Bootstrap"},(0,r.kt)("inlineCode",{parentName:"a"},"Bootstrap")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))))),(0,r.kt)("h4",{id:"defined-in-60"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L254"},"packages/core/src/boot.ts:254")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"createimaapp"},"createImaApp"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"createImaApp"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"returns-15"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"bootstrap")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Bootstrap"},(0,r.kt)("inlineCode",{parentName:"a"},"Bootstrap")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))))),(0,r.kt)("h4",{id:"defined-in-61"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L182"},"packages/core/src/boot.ts:182")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getclientbootconfig"},"getClientBootConfig"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getClientBootConfig"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"initialAppConfigFunctions"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig"))),(0,r.kt)("h4",{id:"parameters-15"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"initialAppConfigFunctions")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.InitAppConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"InitAppConfig")))))),(0,r.kt)("h4",{id:"returns-16"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig"))),(0,r.kt)("h4",{id:"defined-in-62"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L190"},"packages/core/src/boot.ts:190")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getinitialimaconfigfunctions"},"getInitialImaConfigFunctions"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getInitialImaConfigFunctions"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.InitImaConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"InitImaConfig"))),(0,r.kt)("h4",{id:"returns-17"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.InitImaConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"InitImaConfig"))),(0,r.kt)("h4",{id:"defined-in-63"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L166"},"packages/core/src/boot.ts:166")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getinitialpluginconfig"},"getInitialPluginConfig"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getInitialPluginConfig"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("h4",{id:"returns-18"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"plugins")),(0,r.kt)("td",{parentName:"tr",align:"left"},"{ ",(0,r.kt)("inlineCode",{parentName:"td"},"name"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ; ",(0,r.kt)("inlineCode",{parentName:"td"},"plugin"),": ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.InitPluginConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"InitPluginConfig"))," }[]")))),(0,r.kt)("h4",{id:"defined-in-64"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L170"},"packages/core/src/boot.ts:170")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getnamespace"},"getNamespace"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getNamespace"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace"))),(0,r.kt)("h4",{id:"returns-19"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace"))),(0,r.kt)("h4",{id:"defined-in-65"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Namespace.ts#L125"},"packages/core/src/Namespace.ts:125")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"onload"},"onLoad"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"onLoad"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"returns-20"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"defined-in-66"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L310"},"packages/core/src/boot.ts:310")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"reviveclientapp"},"reviveClientApp"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"reviveClientApp"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"initialAppConfigFunctions"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," & { ",(0,r.kt)("inlineCode",{parentName:"p"},"app"),": { ",(0,r.kt)("inlineCode",{parentName:"p"},"bootstrap"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Bootstrap"},(0,r.kt)("inlineCode",{parentName:"a"},"Bootstrap"))," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))," } ; ",(0,r.kt)("inlineCode",{parentName:"p"},"bootConfig"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig"))," }",">"),(0,r.kt)("h4",{id:"parameters-16"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"initialAppConfigFunctions")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.InitAppConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"InitAppConfig")))))),(0,r.kt)("h4",{id:"returns-21"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))," & { ",(0,r.kt)("inlineCode",{parentName:"p"},"app"),": { ",(0,r.kt)("inlineCode",{parentName:"p"},"bootstrap"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Bootstrap"},(0,r.kt)("inlineCode",{parentName:"a"},"Bootstrap"))," ; ",(0,r.kt)("inlineCode",{parentName:"p"},"oc"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))," } ; ",(0,r.kt)("inlineCode",{parentName:"p"},"bootConfig"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.BootConfig"},(0,r.kt)("inlineCode",{parentName:"a"},"BootConfig"))," }",">"),(0,r.kt)("h4",{id:"defined-in-67"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L289"},"packages/core/src/boot.ts:289")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"routeclientapp"},"routeClientApp"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"routeClientApp"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"app"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,r.kt)("h4",{id:"parameters-17"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"app")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Object"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"app.bootstrap")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Bootstrap"},(0,r.kt)("inlineCode",{parentName:"a"},"Bootstrap")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"app.oc")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer")))))),(0,r.kt)("h4",{id:"returns-22"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#unknownparameters"},(0,r.kt)("inlineCode",{parentName:"a"},"UnknownParameters")),">"),(0,r.kt)("h4",{id:"defined-in-68"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L269"},"packages/core/src/boot.ts:269")))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1d150b43.57f1a0a4.js b/assets/js/1d150b43.f5fd4582.js similarity index 96% rename from assets/js/1d150b43.57f1a0a4.js rename to assets/js/1d150b43.f5fd4582.js index 89d3ad105d..ec4b901647 100644 --- a/assets/js/1d150b43.57f1a0a4.js +++ b/assets/js/1d150b43.f5fd4582.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[752],{3905:(e,n,t)=>{t.d(n,{Zo:()=>s,kt:()=>d});var i=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function o(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var c=i.createContext({}),p=function(e){var n=i.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},s=function(e){var n=p(e.components);return i.createElement(c.Provider,{value:n},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var n=e.children;return i.createElement(i.Fragment,{},n)}},m=i.forwardRef((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(t),m=r,d=u["".concat(c,".").concat(m)]||u[m]||f[m]||a;return t?i.createElement(d,o(o({ref:n},s),{},{components:t})):i.createElement(d,o({ref:n},s))}));function d(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,o=new Array(a);o[0]=m;var l={};for(var c in n)hasOwnProperty.call(n,c)&&(l[c]=n[c]);l.originalType=e,l[u]="string"==typeof e?e:r,o[1]=l;for(var p=2;p{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>f,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var i=t(5773),r=(t(7294),t(3905));const a={id:"ima_core.InitPluginConfig",title:"Interface: InitPluginConfig",sidebar_label:"@ima/core.InitPluginConfig",custom_edit_url:null},o=void 0,l={unversionedId:"api/interfaces/ima_core.InitPluginConfig",id:"api/interfaces/ima_core.InitPluginConfig",title:"Interface: InitPluginConfig",description:"@ima/core.InitPluginConfig",source:"@site/../docs/api/interfaces/ima_core.InitPluginConfig.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.InitPluginConfig",permalink:"/api/interfaces/ima_core.InitPluginConfig",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.InitPluginConfig",title:"Interface: InitPluginConfig",sidebar_label:"@ima/core.InitPluginConfig",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.InitImaConfig",permalink:"/api/interfaces/ima_core.InitImaConfig"},next:{title:"@ima/core.Manifest",permalink:"/api/interfaces/ima_core.Manifest"}},c={},p=[{value:"Properties",id:"properties",level:2},{value:"initBind",id:"initbind",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"initServices",id:"initservices",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"initSettings",id:"initsettings",level:3},{value:"Defined in",id:"defined-in-2",level:4}],s={toc:p},u="wrapper";function f(e){let{components:n,...t}=e;return(0,r.kt)(u,(0,i.Z)({},s,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".InitPluginConfig"),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"initbind"},"initBind"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"initBind"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#plugininitbindfunction"},(0,r.kt)("inlineCode",{parentName:"a"},"PluginInitBindFunction"))),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L66"},"packages/core/src/Bootstrap.ts:66")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"initservices"},"initServices"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"initServices"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#plugininitservicesfunction"},(0,r.kt)("inlineCode",{parentName:"a"},"PluginInitServicesFunction"))),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L65"},"packages/core/src/Bootstrap.ts:65")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"initsettings"},"initSettings"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"initSettings"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#plugininitsettingsfunction"},(0,r.kt)("inlineCode",{parentName:"a"},"PluginInitSettingsFunction"))),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/Bootstrap.ts#L67"},"packages/core/src/Bootstrap.ts:67")))}f.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[752],{3905:(e,n,t)=>{t.d(n,{Zo:()=>s,kt:()=>d});var i=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function o(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var c=i.createContext({}),p=function(e){var n=i.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},s=function(e){var n=p(e.components);return i.createElement(c.Provider,{value:n},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var n=e.children;return i.createElement(i.Fragment,{},n)}},m=i.forwardRef((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(t),m=r,d=u["".concat(c,".").concat(m)]||u[m]||f[m]||a;return t?i.createElement(d,o(o({ref:n},s),{},{components:t})):i.createElement(d,o({ref:n},s))}));function d(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,o=new Array(a);o[0]=m;var l={};for(var c in n)hasOwnProperty.call(n,c)&&(l[c]=n[c]);l.originalType=e,l[u]="string"==typeof e?e:r,o[1]=l;for(var p=2;p{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>f,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var i=t(5773),r=(t(7294),t(3905));const a={id:"ima_core.InitPluginConfig",title:"Interface: InitPluginConfig",sidebar_label:"@ima/core.InitPluginConfig",custom_edit_url:null},o=void 0,l={unversionedId:"api/interfaces/ima_core.InitPluginConfig",id:"api/interfaces/ima_core.InitPluginConfig",title:"Interface: InitPluginConfig",description:"@ima/core.InitPluginConfig",source:"@site/../docs/api/interfaces/ima_core.InitPluginConfig.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.InitPluginConfig",permalink:"/api/interfaces/ima_core.InitPluginConfig",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.InitPluginConfig",title:"Interface: InitPluginConfig",sidebar_label:"@ima/core.InitPluginConfig",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.InitImaConfig",permalink:"/api/interfaces/ima_core.InitImaConfig"},next:{title:"@ima/core.Manifest",permalink:"/api/interfaces/ima_core.Manifest"}},c={},p=[{value:"Properties",id:"properties",level:2},{value:"initBind",id:"initbind",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"initServices",id:"initservices",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"initSettings",id:"initsettings",level:3},{value:"Defined in",id:"defined-in-2",level:4}],s={toc:p},u="wrapper";function f(e){let{components:n,...t}=e;return(0,r.kt)(u,(0,i.Z)({},s,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".InitPluginConfig"),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"initbind"},"initBind"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"initBind"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#plugininitbindfunction"},(0,r.kt)("inlineCode",{parentName:"a"},"PluginInitBindFunction"))),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L66"},"packages/core/src/Bootstrap.ts:66")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"initservices"},"initServices"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"initServices"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#plugininitservicesfunction"},(0,r.kt)("inlineCode",{parentName:"a"},"PluginInitServicesFunction"))),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L65"},"packages/core/src/Bootstrap.ts:65")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"initsettings"},"initSettings"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"initSettings"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#plugininitsettingsfunction"},(0,r.kt)("inlineCode",{parentName:"a"},"PluginInitSettingsFunction"))),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/Bootstrap.ts#L67"},"packages/core/src/Bootstrap.ts:67")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/201713f2.0b71da4d.js b/assets/js/201713f2.0b71da4d.js deleted file mode 100644 index 2c0728ed07..0000000000 --- a/assets/js/201713f2.0b71da4d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[1560],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>v});var a=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),u=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,l=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),c=u(r),m=n,v=c["".concat(s,".").concat(m)]||c[m]||d[m]||l;return r?a.createElement(v,i(i({ref:t},p),{},{components:r})):a.createElement(v,i({ref:t},p))}));function v(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=r.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[c]="string"==typeof e?e:n,i[1]=o;for(var u=2;u{r.d(t,{Z:()=>i});var a=r(7294),n=r(8944);const l={tabItem:"tabItem_Ymn6"};function i(e){let{children:t,hidden:r,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,n.Z)(l.tabItem,i),hidden:r},t)}},6745:(e,t,r)=>{r.d(t,{Z:()=>N});var a=r(5773),n=r(7294),l=r(8944),i=r(2466),o=r(3620),s=r(1980),u=r(7392),p=r(12);function c(e){return function(e){return n.Children.map(e,(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:r,attributes:a,default:n}}=e;return{value:t,label:r,attributes:a,default:n}}))}function d(e){const{values:t,children:r}=e;return(0,n.useMemo)((()=>{const e=t??c(r);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function m(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function v(e){let{queryString:t=!1,groupId:r}=e;const a=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,s._X)(l),(0,n.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function g(e){const{defaultValue:t,queryString:r=!1,groupId:a}=e,l=d(e),[i,o]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=r.find((e=>e.default))??r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[s,u]=v({queryString:r,groupId:a}),[c,g]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,p.Nk)(r);return[a,(0,n.useCallback)((e=>{r&&l.set(e)}),[r,l])]}({groupId:a}),k=(()=>{const e=s??c;return m({value:e,tabValues:l})?e:null})();(0,n.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,n.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),g(e)}),[u,g,l]),tabValues:l}}var k=r(2389);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function b(e){let{className:t,block:r,selectedValue:o,selectValue:s,tabValues:u}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.o5)(),d=e=>{const t=e.currentTarget,r=p.indexOf(t),a=u[r].value;a!==o&&(c(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const r=p.indexOf(e.currentTarget)+1;t=p[r]??p[0];break}case"ArrowLeft":{const r=p.indexOf(e.currentTarget)-1;t=p[r]??p[p.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":r},t)},u.map((e=>{let{value:t,label:r,attributes:i}=e;return n.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>p.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",f.tabItem,i?.className,{"tabs__item--active":o===t})}),r??t)})))}function h(e){let{lazy:t,children:r,selectedValue:a}=e;const l=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function y(e){const t=g(e);return n.createElement("div",{className:(0,l.Z)("tabs-container",f.tabList)},n.createElement(b,(0,a.Z)({},e,t)),n.createElement(h,(0,a.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return n.createElement(y,(0,a.Z)({key:String(t)},e))}},1564:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>v,frontMatter:()=>o,metadata:()=>u,toc:()=>c});var a=r(5773),n=(r(7294),r(3905)),l=r(6745),i=r(1683);const o={title:"Migration 18.0.0",description:"Migration > Migration to version 18.0.0"},s=void 0,u={unversionedId:"migration/migration-18.0.0",id:"migration/migration-18.0.0",title:"Migration 18.0.0",description:"Migration > Migration to version 18.0.0",source:"@site/../docs/migration/migration-18.0.0.md",sourceDirName:"migration",slug:"/migration/migration-18.0.0",permalink:"/migration/migration-18.0.0",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/migration/migration-18.0.0.md",tags:[],version:"current",lastUpdatedBy:"Filip Satek",lastUpdatedAt:1734590310,formattedLastUpdatedAt:"Dec 19, 2024",frontMatter:{title:"Migration 18.0.0",description:"Migration > Migration to version 18.0.0"},sidebar:"docs",previous:{title:"Migration 17.0.0",permalink:"/migration/migration-17.0.0"},next:{title:"Migration 19.0.0",permalink:"/migration/migration-19.0.0"}},p={},c=[{value:"Update requirements",id:"update-requirements",level:2},{value:"Moved from gulp to webpack",id:"moved-from-gulp-to-webpack",level:2},{value:"Change scripts in package.json",id:"change-scripts-in-packagejson",level:3},{value:"Update settings.js",id:"update-settingsjs",level:3},{value:"Remove gulp specific things",id:"remove-gulp-specific-things",level:3},{value:"Removed build.js, optionally add ima.config.js file to root",id:"removed-buildjs-optionally-add-imaconfigjs-file-to-root",level:3},{value:"Moved from babel to swc",id:"moved-from-babel-to-swc",level:2},{value:"New React-page-renderer",id:"new-react-page-renderer",level:2},{value:"Update EventBus",id:"update-eventbus",level:3},{value:"Update DocumentView",id:"update-documentview",level:2},{value:"Update Server",id:"update-server",level:2},{value:"Split server.js -> server.js and app.js",id:"split-serverjs---serverjs-and-appjs",level:3},{value:"Server changes",id:"server-changes",level:3},{value:"Move environment.js file",id:"move-environmentjs-file",level:3},{value:"Templates",id:"templates",level:3},{value:"Update DocumentView",id:"update-documentview-1",level:3},{value:"Assets => app/public",id:"assets--apppublic",level:2},{value:"Styles",id:"styles",level:2},{value:"Tests",id:"tests",level:2},{value:"Other changes",id:"other-changes",level:2},{value:"Deleted packages",id:"deleted-packages",level:2},{value:"IMA.js Plugins",id:"imajs-plugins",level:2}],d={toc:c},m="wrapper";function v(e){let{components:t,...r}=e;return(0,n.kt)(m,(0,a.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"IMA.js brings few major breaking changes. For more information read below."),(0,n.kt)("h2",{id:"update-requirements"},"Update requirements"),(0,n.kt)("p",null,"IMA.js v18 requires node >= 18, npm >= 8 and react 18."),(0,n.kt)("h2",{id:"moved-from-gulp-to-webpack"},"Moved from gulp to webpack"),(0,n.kt)("p",null,"You can remove gulp things. There is new @ima/cli plugin for helping with webpack.\nFrom now, you have to import everything you want to be present in your bundle (that's how webpack works)."),(0,n.kt)("h3",{id:"change-scripts-in-packagejson"},"Change scripts in package.json"),(0,n.kt)("p",null,"There is new @ima/cli used in scripts instead of gulp."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Example:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},'...\n "scripts": {\n "test": "jest",\n "lint": "eslint \'./**/*.{js,jsx,ts,tsx}\'",\n "dev": "ima dev",\n "build": "NODE_ENV=production ima build",\n "start": "NODE_ENV=production node server/server.js"\n},\n...\n')),(0,n.kt)("p",null,"Remove ",(0,n.kt)("inlineCode",{parentName:"p"},'"main": "build/server.js"')," from ",(0,n.kt)("inlineCode",{parentName:"p"},"package.json")," too. (Server is not anymore in build/server.js.)"),(0,n.kt)("h3",{id:"update-settingsjs"},"Update settings.js"),(0,n.kt)("p",null,"Remove scripts and esScripts from $Page.$Render (IMA process this things now by manifest and contentVariables)."),(0,n.kt)("h3",{id:"remove-gulp-specific-things"},"Remove gulp specific things"),(0,n.kt)("p",null,"Dependencies:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"@ima/gulp-task-loader"),(0,n.kt)("li",{parentName:"ul"},"@ima/gulp-tasks")),(0,n.kt)("p",null,"Files:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"gulpfile.js"),(0,n.kt)("li",{parentName:"ul"},"gulpConfig.js")),(0,n.kt)("h3",{id:"removed-buildjs-optionally-add-imaconfigjs-file-to-root"},"Removed build.js, optionally add ima.config.js file to root"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"look at ",(0,n.kt)("a",{parentName:"li",href:"../cli/ima-config-js"},"ima.config.js")," "),(0,n.kt)("li",{parentName:"ul"},"definition of languages moved from ",(0,n.kt)("inlineCode",{parentName:"li"},"build.js")," to ",(0,n.kt)("inlineCode",{parentName:"li"},"ima.config.js")),(0,n.kt)("li",{parentName:"ul"},"definition of less file pathes is not needed - see section Styles below")),(0,n.kt)("h2",{id:"moved-from-babel-to-swc"},"Moved from babel to swc"),(0,n.kt)("p",null,"You can remove @babel dependencies (except for eslint specific). "),(0,n.kt)("p",null,"Add ",(0,n.kt)("inlineCode",{parentName:"p"},"@swc/jest")," devDependency for tests."),(0,n.kt)("h2",{id:"new-react-page-renderer"},"New React-page-renderer"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"React-page-renderer moved to new package @ima/react-page-renderer ")),(0,n.kt)(l.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,n.kt)(i.Z,{value:"npm",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"npm i @ima/react-page-renderer\n"))),(0,n.kt)(i.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"yarn add @ima/react-page-renderer\n"))),(0,n.kt)(i.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"pnpm add @ima/react-page-renderer\n")))),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("p",{parentName:"li"},"You can use codemod ",(0,n.kt)("inlineCode",{parentName:"p"},"npx @cns/web-plugins-codemods")," -> ima18: react page renderer imports")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("p",{parentName:"li"},"Update DocumentView - use AbstractPureComponent from @ima/react-page-renderer instead of AbstractDocumentView"))),(0,n.kt)("h3",{id:"update-eventbus"},"Update EventBus"),(0,n.kt)("p",null,"You have to add target as the second argument for EventBus fire, listen/unlisten."),(0,n.kt)("h2",{id:"update-documentview"},"Update DocumentView"),(0,n.kt)("p",null,"Rewrite your DocumentView similar like in create-ima-app."),(0,n.kt)("h2",{id:"update-server"},"Update Server"),(0,n.kt)("p",null,"You have to add dependency to ",(0,n.kt)("inlineCode",{parentName:"p"},"error-to-json")," on your own. It was removed from @ima/server."),(0,n.kt)("p",null,"Replace"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},"let errorToJSON = require('error-to-json');\n")),(0,n.kt)("p",null,"by"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},"const errorToJSON = require('error-to-json').default;\n")),(0,n.kt)("h3",{id:"split-serverjs---serverjs-and-appjs"},"Split server.js -> server.js and app.js"),(0,n.kt)("p",null,"This change is optionally, but we use it in our create-ima-app."),(0,n.kt)("h3",{id:"server-changes"},"Server changes"),(0,n.kt)("p",null,"Remove:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},"'use strict';\n\nrequire('@ima/core/polyfill/imaLoader.js');\nrequire('@ima/core/polyfill/imaRunner.js');\n")),(0,n.kt)("p",null,"Replace this part:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},"let imaServer = require('@ima/server');\n\nlet clientApp = imaServer.clientApp;\nlet urlParser = imaServer.urlParser;\nlet environment = imaServer.environment;\nlet logger = imaServer.logger;\nlet cache = imaServer.cache;\n")),(0,n.kt)("p",null,"by"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},"const imaServer = require('@ima/server')();\nconst { serverApp, urlParser, environment, logger, cache, memStaticProxy } =\n imaServer;\n\nrequire('@ima/react-page-renderer/hook/server')(imaServer);\n")),(0,n.kt)("p",null,"Replace clientApp.requestHandler by serverApp.requestHandlerMiddleware."),(0,n.kt)("p",null,"Remove staticErrorPage and replace errorHandler function by"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},"function renderError(error, req, res, next) {\n serverApp\n .errorHandlerMiddleware(error, req, res, next)\n .then(response => {\n logger.error(response.error);\n })\n .catch(next);\n}\n")),(0,n.kt)("h3",{id:"move-environmentjs-file"},"Move environment.js file"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"File ",(0,n.kt)("inlineCode",{parentName:"li"},"app/environment.js")," was moved to location ",(0,n.kt)("inlineCode",{parentName:"li"},"/server/config/environment.js"),"\nThere was removed ",(0,n.kt)("strong",{parentName:"li"},"test")," env.")),(0,n.kt)("h3",{id:"templates"},"Templates"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"400, 500, spa templates are in ",(0,n.kt)("inlineCode",{parentName:"li"},"server/template")," (look at ",(0,n.kt)("a",{parentName:"li",href:"https://github.com/seznam/ima/tree/master/packages/create-ima-app/template/server/template"},"create-ima-app"),")")),(0,n.kt)("h3",{id:"update-documentview-1"},"Update DocumentView"),(0,n.kt)("p",null,"You can remove getAsyncScripts method and body content replace with:\n(You have to add $Page.$Render.masterElementId property to settings.js)"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-jsx"}," \n {'#{revivalCache}'}\n {'#{revivalSettings}'}\n {'#{runner}'}\n")),(0,n.kt)("p",null,"Instead of app css loading use:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"}," {'#{styles}'}\n")),(0,n.kt)("h2",{id:"assets--apppublic"},"Assets => app/public"),(0,n.kt)("p",null,"Everything from folder app/public is moved to build folder into static folder."),(0,n.kt)("h2",{id:"styles"},"Styles"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Remove files mark as ",(0,n.kt)("inlineCode",{parentName:"li"},"FAKE FILE FOR GULP LESS")),(0,n.kt)("li",{parentName:"ul"},"Move less files from ",(0,n.kt)("inlineCode",{parentName:"li"},"assets/less")," to ",(0,n.kt)("inlineCode",{parentName:"li"},"app/less")),(0,n.kt)("li",{parentName:"ul"},'You have to move definition of less files pathes from build.js to "imports" - you have two options:',(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},"import less files per component"),(0,n.kt)("li",{parentName:"ul"},"import root less file e.g. in main.js and use glob pattern to import other less files similar like it was in build.js"))),(0,n.kt)("li",{parentName:"ul"},"app/less/globals.less - this file is prepending to every less file so that you can import here variables, mixins, etc."),(0,n.kt)("li",{parentName:"ul"},"strictMaths is enabled")),(0,n.kt)("h2",{id:"tests"},"Tests"),(0,n.kt)("p",null,"Add ",(0,n.kt)("inlineCode",{parentName:"p"},"@swc/jest")," dependency.\nAdd ",(0,n.kt)("inlineCode",{parentName:"p"},"identity-obj-proxy")," for css/less in jest.\nReplace ",(0,n.kt)("inlineCode",{parentName:"p"},"enzyme-adapter-react-16")," with ",(0,n.kt)("inlineCode",{parentName:"p"},"@cfaester/enzyme-adapter-react-18"),"."),(0,n.kt)("h2",{id:"other-changes"},"Other changes"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Prepared for typescript")),(0,n.kt)("h2",{id:"deleted-packages"},"Deleted packages"),(0,n.kt)("p",null,"You can remove following packages:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"@ima/react-hooks - functionality moved to @ima/react-page-renderer"),(0,n.kt)("li",{parentName:"ul"},"@ima/plugin-less-constants moved to @ima/cli-plugin-less-constants"),(0,n.kt)("li",{parentName:"ul"},"@ima/plugin-hot-reload"),(0,n.kt)("li",{parentName:"ul"},"@ima/plugin-websocket"),(0,n.kt)("li",{parentName:"ul"},"@ima/gulp-task-loader"),(0,n.kt)("li",{parentName:"ul"},"@ima/gulp-tasks")),(0,n.kt)("h2",{id:"imajs-plugins"},"IMA.js Plugins"),(0,n.kt)("p",null,"All IMA.js plugins need to be updated to the latest version. Older versions won't work."))}v.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/201713f2.aa2aab5e.js b/assets/js/201713f2.aa2aab5e.js new file mode 100644 index 0000000000..c200ae7927 --- /dev/null +++ b/assets/js/201713f2.aa2aab5e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[1560],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>v});var a=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),u=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,l=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),c=u(r),m=n,v=c["".concat(s,".").concat(m)]||c[m]||d[m]||l;return r?a.createElement(v,i(i({ref:t},p),{},{components:r})):a.createElement(v,i({ref:t},p))}));function v(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=r.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[c]="string"==typeof e?e:n,i[1]=o;for(var u=2;u{r.d(t,{Z:()=>i});var a=r(7294),n=r(8944);const l={tabItem:"tabItem_Ymn6"};function i(e){let{children:t,hidden:r,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,n.Z)(l.tabItem,i),hidden:r},t)}},6745:(e,t,r)=>{r.d(t,{Z:()=>N});var a=r(5773),n=r(7294),l=r(8944),i=r(2466),o=r(3620),s=r(1980),u=r(7392),p=r(12);function c(e){return function(e){return n.Children.map(e,(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:r,attributes:a,default:n}}=e;return{value:t,label:r,attributes:a,default:n}}))}function d(e){const{values:t,children:r}=e;return(0,n.useMemo)((()=>{const e=t??c(r);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function m(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function v(e){let{queryString:t=!1,groupId:r}=e;const a=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,s._X)(l),(0,n.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function g(e){const{defaultValue:t,queryString:r=!1,groupId:a}=e,l=d(e),[i,o]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=r.find((e=>e.default))??r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[s,u]=v({queryString:r,groupId:a}),[c,g]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,p.Nk)(r);return[a,(0,n.useCallback)((e=>{r&&l.set(e)}),[r,l])]}({groupId:a}),k=(()=>{const e=s??c;return m({value:e,tabValues:l})?e:null})();(0,n.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,n.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),g(e)}),[u,g,l]),tabValues:l}}var k=r(2389);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function b(e){let{className:t,block:r,selectedValue:o,selectValue:s,tabValues:u}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.o5)(),d=e=>{const t=e.currentTarget,r=p.indexOf(t),a=u[r].value;a!==o&&(c(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const r=p.indexOf(e.currentTarget)+1;t=p[r]??p[0];break}case"ArrowLeft":{const r=p.indexOf(e.currentTarget)-1;t=p[r]??p[p.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":r},t)},u.map((e=>{let{value:t,label:r,attributes:i}=e;return n.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>p.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",f.tabItem,i?.className,{"tabs__item--active":o===t})}),r??t)})))}function h(e){let{lazy:t,children:r,selectedValue:a}=e;const l=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function y(e){const t=g(e);return n.createElement("div",{className:(0,l.Z)("tabs-container",f.tabList)},n.createElement(b,(0,a.Z)({},e,t)),n.createElement(h,(0,a.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return n.createElement(y,(0,a.Z)({key:String(t)},e))}},1564:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>v,frontMatter:()=>o,metadata:()=>u,toc:()=>c});var a=r(5773),n=(r(7294),r(3905)),l=r(6745),i=r(1683);const o={title:"Migration 18.0.0",description:"Migration > Migration to version 18.0.0"},s=void 0,u={unversionedId:"migration/migration-18.0.0",id:"migration/migration-18.0.0",title:"Migration 18.0.0",description:"Migration > Migration to version 18.0.0",source:"@site/../docs/migration/migration-18.0.0.md",sourceDirName:"migration",slug:"/migration/migration-18.0.0",permalink:"/migration/migration-18.0.0",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/migration/migration-18.0.0.md",tags:[],version:"current",lastUpdatedBy:"PS",lastUpdatedAt:1736522400,formattedLastUpdatedAt:"Jan 10, 2025",frontMatter:{title:"Migration 18.0.0",description:"Migration > Migration to version 18.0.0"},sidebar:"docs",previous:{title:"Migration 17.0.0",permalink:"/migration/migration-17.0.0"},next:{title:"Migration 19.0.0",permalink:"/migration/migration-19.0.0"}},p={},c=[{value:"Update requirements",id:"update-requirements",level:2},{value:"Moved from gulp to webpack",id:"moved-from-gulp-to-webpack",level:2},{value:"Change scripts in package.json",id:"change-scripts-in-packagejson",level:3},{value:"Update settings.js",id:"update-settingsjs",level:3},{value:"Remove gulp specific things",id:"remove-gulp-specific-things",level:3},{value:"Removed build.js, optionally add ima.config.js file to root",id:"removed-buildjs-optionally-add-imaconfigjs-file-to-root",level:3},{value:"Moved from babel to swc",id:"moved-from-babel-to-swc",level:2},{value:"New React-page-renderer",id:"new-react-page-renderer",level:2},{value:"Update EventBus",id:"update-eventbus",level:3},{value:"Update DocumentView",id:"update-documentview",level:2},{value:"Update Server",id:"update-server",level:2},{value:"Split server.js -> server.js and app.js",id:"split-serverjs---serverjs-and-appjs",level:3},{value:"Server changes",id:"server-changes",level:3},{value:"Move environment.js file",id:"move-environmentjs-file",level:3},{value:"Templates",id:"templates",level:3},{value:"Update DocumentView",id:"update-documentview-1",level:3},{value:"Assets => app/public",id:"assets--apppublic",level:2},{value:"Styles",id:"styles",level:2},{value:"Tests",id:"tests",level:2},{value:"Other changes",id:"other-changes",level:2},{value:"Deleted packages",id:"deleted-packages",level:2},{value:"IMA.js Plugins",id:"imajs-plugins",level:2}],d={toc:c},m="wrapper";function v(e){let{components:t,...r}=e;return(0,n.kt)(m,(0,a.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"IMA.js brings few major breaking changes. For more information read below."),(0,n.kt)("h2",{id:"update-requirements"},"Update requirements"),(0,n.kt)("p",null,"IMA.js v18 requires node >= 18, npm >= 8 and react 18."),(0,n.kt)("h2",{id:"moved-from-gulp-to-webpack"},"Moved from gulp to webpack"),(0,n.kt)("p",null,"You can remove gulp things. There is new @ima/cli plugin for helping with webpack.\nFrom now, you have to import everything you want to be present in your bundle (that's how webpack works)."),(0,n.kt)("h3",{id:"change-scripts-in-packagejson"},"Change scripts in package.json"),(0,n.kt)("p",null,"There is new @ima/cli used in scripts instead of gulp."),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Example:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},'...\n "scripts": {\n "test": "jest",\n "lint": "eslint \'./**/*.{js,jsx,ts,tsx}\'",\n "dev": "ima dev",\n "build": "NODE_ENV=production ima build",\n "start": "NODE_ENV=production node server/server.js"\n},\n...\n')),(0,n.kt)("p",null,"Remove ",(0,n.kt)("inlineCode",{parentName:"p"},'"main": "build/server.js"')," from ",(0,n.kt)("inlineCode",{parentName:"p"},"package.json")," too. (Server is not anymore in build/server.js.)"),(0,n.kt)("h3",{id:"update-settingsjs"},"Update settings.js"),(0,n.kt)("p",null,"Remove scripts and esScripts from $Page.$Render (IMA process this things now by manifest and contentVariables)."),(0,n.kt)("h3",{id:"remove-gulp-specific-things"},"Remove gulp specific things"),(0,n.kt)("p",null,"Dependencies:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"@ima/gulp-task-loader"),(0,n.kt)("li",{parentName:"ul"},"@ima/gulp-tasks")),(0,n.kt)("p",null,"Files:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"gulpfile.js"),(0,n.kt)("li",{parentName:"ul"},"gulpConfig.js")),(0,n.kt)("h3",{id:"removed-buildjs-optionally-add-imaconfigjs-file-to-root"},"Removed build.js, optionally add ima.config.js file to root"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"look at ",(0,n.kt)("a",{parentName:"li",href:"../cli/ima-config-js"},"ima.config.js")," "),(0,n.kt)("li",{parentName:"ul"},"definition of languages moved from ",(0,n.kt)("inlineCode",{parentName:"li"},"build.js")," to ",(0,n.kt)("inlineCode",{parentName:"li"},"ima.config.js")),(0,n.kt)("li",{parentName:"ul"},"definition of less file pathes is not needed - see section Styles below")),(0,n.kt)("h2",{id:"moved-from-babel-to-swc"},"Moved from babel to swc"),(0,n.kt)("p",null,"You can remove @babel dependencies (except for eslint specific). "),(0,n.kt)("p",null,"Add ",(0,n.kt)("inlineCode",{parentName:"p"},"@swc/jest")," devDependency for tests."),(0,n.kt)("h2",{id:"new-react-page-renderer"},"New React-page-renderer"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"React-page-renderer moved to new package @ima/react-page-renderer ")),(0,n.kt)(l.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,n.kt)(i.Z,{value:"npm",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"npm i @ima/react-page-renderer\n"))),(0,n.kt)(i.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"yarn add @ima/react-page-renderer\n"))),(0,n.kt)(i.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"pnpm add @ima/react-page-renderer\n")))),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("p",{parentName:"li"},"You can use codemod ",(0,n.kt)("inlineCode",{parentName:"p"},"npx @cns/web-plugins-codemods")," -> ima18: react page renderer imports")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("p",{parentName:"li"},"Update DocumentView - use AbstractPureComponent from @ima/react-page-renderer instead of AbstractDocumentView"))),(0,n.kt)("h3",{id:"update-eventbus"},"Update EventBus"),(0,n.kt)("p",null,"You have to add target as the second argument for EventBus fire, listen/unlisten."),(0,n.kt)("h2",{id:"update-documentview"},"Update DocumentView"),(0,n.kt)("p",null,"Rewrite your DocumentView similar like in create-ima-app."),(0,n.kt)("h2",{id:"update-server"},"Update Server"),(0,n.kt)("p",null,"You have to add dependency to ",(0,n.kt)("inlineCode",{parentName:"p"},"error-to-json")," on your own. It was removed from @ima/server."),(0,n.kt)("p",null,"Replace"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},"let errorToJSON = require('error-to-json');\n")),(0,n.kt)("p",null,"by"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},"const errorToJSON = require('error-to-json').default;\n")),(0,n.kt)("h3",{id:"split-serverjs---serverjs-and-appjs"},"Split server.js -> server.js and app.js"),(0,n.kt)("p",null,"This change is optionally, but we use it in our create-ima-app."),(0,n.kt)("h3",{id:"server-changes"},"Server changes"),(0,n.kt)("p",null,"Remove:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},"'use strict';\n\nrequire('@ima/core/polyfill/imaLoader.js');\nrequire('@ima/core/polyfill/imaRunner.js');\n")),(0,n.kt)("p",null,"Replace this part:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},"let imaServer = require('@ima/server');\n\nlet clientApp = imaServer.clientApp;\nlet urlParser = imaServer.urlParser;\nlet environment = imaServer.environment;\nlet logger = imaServer.logger;\nlet cache = imaServer.cache;\n")),(0,n.kt)("p",null,"by"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},"const imaServer = require('@ima/server')();\nconst { serverApp, urlParser, environment, logger, cache, memStaticProxy } =\n imaServer;\n\nrequire('@ima/react-page-renderer/hook/server')(imaServer);\n")),(0,n.kt)("p",null,"Replace clientApp.requestHandler by serverApp.requestHandlerMiddleware."),(0,n.kt)("p",null,"Remove staticErrorPage and replace errorHandler function by"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},"function renderError(error, req, res, next) {\n serverApp\n .errorHandlerMiddleware(error, req, res, next)\n .then(response => {\n logger.error(response.error);\n })\n .catch(next);\n}\n")),(0,n.kt)("h3",{id:"move-environmentjs-file"},"Move environment.js file"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"File ",(0,n.kt)("inlineCode",{parentName:"li"},"app/environment.js")," was moved to location ",(0,n.kt)("inlineCode",{parentName:"li"},"/server/config/environment.js"),"\nThere was removed ",(0,n.kt)("strong",{parentName:"li"},"test")," env.")),(0,n.kt)("h3",{id:"templates"},"Templates"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"400, 500, spa templates are in ",(0,n.kt)("inlineCode",{parentName:"li"},"server/template")," (look at ",(0,n.kt)("a",{parentName:"li",href:"https://github.com/seznam/ima/tree/master/packages/create-ima-app/template/server/template"},"create-ima-app"),")")),(0,n.kt)("h3",{id:"update-documentview-1"},"Update DocumentView"),(0,n.kt)("p",null,"You can remove getAsyncScripts method and body content replace with:\n(You have to add $Page.$Render.masterElementId property to settings.js)"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-jsx"}," \n {'#{revivalCache}'}\n {'#{revivalSettings}'}\n {'#{runner}'}\n")),(0,n.kt)("p",null,"Instead of app css loading use:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"}," {'#{styles}'}\n")),(0,n.kt)("h2",{id:"assets--apppublic"},"Assets => app/public"),(0,n.kt)("p",null,"Everything from folder app/public is moved to build folder into static folder."),(0,n.kt)("h2",{id:"styles"},"Styles"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Remove files mark as ",(0,n.kt)("inlineCode",{parentName:"li"},"FAKE FILE FOR GULP LESS")),(0,n.kt)("li",{parentName:"ul"},"Move less files from ",(0,n.kt)("inlineCode",{parentName:"li"},"assets/less")," to ",(0,n.kt)("inlineCode",{parentName:"li"},"app/less")),(0,n.kt)("li",{parentName:"ul"},'You have to move definition of less files pathes from build.js to "imports" - you have two options:',(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},"import less files per component"),(0,n.kt)("li",{parentName:"ul"},"import root less file e.g. in main.js and use glob pattern to import other less files similar like it was in build.js"))),(0,n.kt)("li",{parentName:"ul"},"app/less/globals.less - this file is prepending to every less file so that you can import here variables, mixins, etc."),(0,n.kt)("li",{parentName:"ul"},"strictMaths is enabled")),(0,n.kt)("h2",{id:"tests"},"Tests"),(0,n.kt)("p",null,"Add ",(0,n.kt)("inlineCode",{parentName:"p"},"@swc/jest")," dependency.\nAdd ",(0,n.kt)("inlineCode",{parentName:"p"},"identity-obj-proxy")," for css/less in jest.\nReplace ",(0,n.kt)("inlineCode",{parentName:"p"},"enzyme-adapter-react-16")," with ",(0,n.kt)("inlineCode",{parentName:"p"},"@cfaester/enzyme-adapter-react-18"),"."),(0,n.kt)("h2",{id:"other-changes"},"Other changes"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Prepared for typescript")),(0,n.kt)("h2",{id:"deleted-packages"},"Deleted packages"),(0,n.kt)("p",null,"You can remove following packages:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"@ima/react-hooks - functionality moved to @ima/react-page-renderer"),(0,n.kt)("li",{parentName:"ul"},"@ima/plugin-less-constants moved to @ima/cli-plugin-less-constants"),(0,n.kt)("li",{parentName:"ul"},"@ima/plugin-hot-reload"),(0,n.kt)("li",{parentName:"ul"},"@ima/plugin-websocket"),(0,n.kt)("li",{parentName:"ul"},"@ima/gulp-task-loader"),(0,n.kt)("li",{parentName:"ul"},"@ima/gulp-tasks")),(0,n.kt)("h2",{id:"imajs-plugins"},"IMA.js Plugins"),(0,n.kt)("p",null,"All IMA.js plugins need to be updated to the latest version. Older versions won't work."))}v.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/212e3b5d.3bf9aa05.js b/assets/js/212e3b5d.ef391f40.js similarity index 98% rename from assets/js/212e3b5d.3bf9aa05.js rename to assets/js/212e3b5d.ef391f40.js index 4e70264d03..7a113ece48 100644 --- a/assets/js/212e3b5d.3bf9aa05.js +++ b/assets/js/212e3b5d.ef391f40.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[8266],{3905:(e,r,t)=>{t.d(r,{Zo:()=>s,kt:()=>m});var n=t(7294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function p(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c=n.createContext({}),l=function(e){var r=n.useContext(c),t=r;return e&&(t="function"==typeof e?e(r):p(p({},r),e)),t},s=function(e){var r=l(e.components);return n.createElement(c.Provider,{value:r},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},f=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),u=l(t),f=a,m=u["".concat(c,".").concat(f)]||u[f]||d[f]||i;return t?n.createElement(m,p(p({ref:r},s),{},{components:t})):n.createElement(m,p({ref:r},s))}));function m(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var i=t.length,p=new Array(i);p[0]=f;var o={};for(var c in r)hasOwnProperty.call(r,c)&&(o[c]=r[c]);o.originalType=e,o[u]="string"==typeof e?e:a,p[1]=o;for(var l=2;l{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>p,default:()=>d,frontMatter:()=>i,metadata:()=>o,toc:()=>l});var n=t(5773),a=(t(7294),t(3905));const i={id:"ima_react_page_renderer.PageContextType",title:"Interface: PageContextType",sidebar_label:"@ima/react-page-renderer.PageContextType",custom_edit_url:null},p=void 0,o={unversionedId:"api/interfaces/ima_react_page_renderer.PageContextType",id:"api/interfaces/ima_react_page_renderer.PageContextType",title:"Interface: PageContextType",description:"@ima/react-page-renderer.PageContextType",source:"@site/../docs/api/interfaces/ima_react_page_renderer.PageContextType.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_react_page_renderer.PageContextType",permalink:"/api/interfaces/ima_react_page_renderer.PageContextType",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_react_page_renderer.PageContextType",title:"Interface: PageContextType",sidebar_label:"@ima/react-page-renderer.PageContextType",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/plugin-cli.Source",permalink:"/api/interfaces/ima_plugin_cli.Source"},next:{title:"@ima/react-page-renderer.ViewAdapterProps",permalink:"/api/interfaces/ima_react_page_renderer.ViewAdapterProps"}},c={},l=[{value:"Properties",id:"properties",level:2},{value:"$Utils",id:"utils",level:3},{value:"Defined in",id:"defined-in",level:4}],s={toc:l},u="wrapper";function d(e){let{components:r,...t}=e;return(0,a.kt)(u,(0,n.Z)({},s,t,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/modules/ima_react_page_renderer"},"@ima/react-page-renderer"),".PageContextType"),(0,a.kt)("h2",{id:"properties"},"Properties"),(0,a.kt)("h3",{id:"utils"},"$Utils"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"$Utils"),": ",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,a.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,a.kt)("h4",{id:"defined-in"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/PageContext.ts#L5"},"packages/react-page-renderer/src/PageContext.ts:5")))}d.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[8266],{3905:(e,r,t)=>{t.d(r,{Zo:()=>s,kt:()=>m});var n=t(7294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function p(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c=n.createContext({}),l=function(e){var r=n.useContext(c),t=r;return e&&(t="function"==typeof e?e(r):p(p({},r),e)),t},s=function(e){var r=l(e.components);return n.createElement(c.Provider,{value:r},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},f=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),u=l(t),f=a,m=u["".concat(c,".").concat(f)]||u[f]||d[f]||i;return t?n.createElement(m,p(p({ref:r},s),{},{components:t})):n.createElement(m,p({ref:r},s))}));function m(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var i=t.length,p=new Array(i);p[0]=f;var o={};for(var c in r)hasOwnProperty.call(r,c)&&(o[c]=r[c]);o.originalType=e,o[u]="string"==typeof e?e:a,p[1]=o;for(var l=2;l{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>p,default:()=>d,frontMatter:()=>i,metadata:()=>o,toc:()=>l});var n=t(5773),a=(t(7294),t(3905));const i={id:"ima_react_page_renderer.PageContextType",title:"Interface: PageContextType",sidebar_label:"@ima/react-page-renderer.PageContextType",custom_edit_url:null},p=void 0,o={unversionedId:"api/interfaces/ima_react_page_renderer.PageContextType",id:"api/interfaces/ima_react_page_renderer.PageContextType",title:"Interface: PageContextType",description:"@ima/react-page-renderer.PageContextType",source:"@site/../docs/api/interfaces/ima_react_page_renderer.PageContextType.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_react_page_renderer.PageContextType",permalink:"/api/interfaces/ima_react_page_renderer.PageContextType",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_react_page_renderer.PageContextType",title:"Interface: PageContextType",sidebar_label:"@ima/react-page-renderer.PageContextType",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/plugin-cli.Source",permalink:"/api/interfaces/ima_plugin_cli.Source"},next:{title:"@ima/react-page-renderer.ViewAdapterProps",permalink:"/api/interfaces/ima_react_page_renderer.ViewAdapterProps"}},c={},l=[{value:"Properties",id:"properties",level:2},{value:"$Utils",id:"utils",level:3},{value:"Defined in",id:"defined-in",level:4}],s={toc:l},u="wrapper";function d(e){let{components:r,...t}=e;return(0,a.kt)(u,(0,n.Z)({},s,t,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/modules/ima_react_page_renderer"},"@ima/react-page-renderer"),".PageContextType"),(0,a.kt)("h2",{id:"properties"},"Properties"),(0,a.kt)("h3",{id:"utils"},"$Utils"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"$Utils"),": ",(0,a.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Utils"},(0,a.kt)("inlineCode",{parentName:"a"},"Utils"))),(0,a.kt)("h4",{id:"defined-in"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/PageContext.ts#L5"},"packages/react-page-renderer/src/PageContext.ts:5")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/214956d8.30cf7083.js b/assets/js/214956d8.8187daa0.js similarity index 99% rename from assets/js/214956d8.30cf7083.js rename to assets/js/214956d8.8187daa0.js index 2801e51a51..632d7eee2a 100644 --- a/assets/js/214956d8.30cf7083.js +++ b/assets/js/214956d8.8187daa0.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[5566],{3905:(e,t,i)=>{i.d(t,{Zo:()=>s,kt:()=>f});var n=i(7294);function r(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function l(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function a(e){for(var t=1;t=0||(r[i]=e[i]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}var o=n.createContext({}),p=function(e){var t=n.useContext(o),i=t;return e&&(i="function"==typeof e?e(t):a(a({},t),e)),i},s=function(e){var t=p(e.components);return n.createElement(o.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var i=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,s=d(e,["components","mdxType","originalType","parentName"]),u=p(i),c=r,f=u["".concat(o,".").concat(c)]||u[c]||m[c]||l;return i?n.createElement(f,a(a({ref:t},s),{},{components:i})):n.createElement(f,a({ref:t},s))}));function f(e,t){var i=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=i.length,a=new Array(l);a[0]=c;var d={};for(var o in t)hasOwnProperty.call(t,o)&&(d[o]=t[o]);d.originalType=e,d[u]="string"==typeof e?e:r,a[1]=d;for(var p=2;p{i.r(t),i.d(t,{assets:()=>o,contentTitle:()=>a,default:()=>m,frontMatter:()=>l,metadata:()=>d,toc:()=>p});var n=i(5773),r=(i(7294),i(3905));const l={id:"ima_core.ImaRequestInit",title:"Interface: ImaRequestInit",sidebar_label:"@ima/core.ImaRequestInit",custom_edit_url:null},a=void 0,d={unversionedId:"api/interfaces/ima_core.ImaRequestInit",id:"api/interfaces/ima_core.ImaRequestInit",title:"Interface: ImaRequestInit",description:"@ima/core.ImaRequestInit",source:"@site/../docs/api/interfaces/ima_core.ImaRequestInit.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.ImaRequestInit",permalink:"/api/interfaces/ima_core.ImaRequestInit",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.ImaRequestInit",title:"Interface: ImaRequestInit",sidebar_label:"@ima/core.ImaRequestInit",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.HttpAgentRequestOptions",permalink:"/api/interfaces/ima_core.HttpAgentRequestOptions"},next:{title:"@ima/core.InitAppConfig",permalink:"/api/interfaces/ima_core.InitAppConfig"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:"cache",id:"cache",level:3},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"credentials",id:"credentials",level:3},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"headers",id:"headers",level:3},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"integrity",id:"integrity",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"keepalive",id:"keepalive",level:3},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"method",id:"method",level:3},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"mode",id:"mode",level:3},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"redirect",id:"redirect",level:3},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"referrer",id:"referrer",level:3},{value:"Inherited from",id:"inherited-from-7",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"referrerPolicy",id:"referrerpolicy",level:3},{value:"Inherited from",id:"inherited-from-8",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"signal",id:"signal",level:3},{value:"Inherited from",id:"inherited-from-9",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"window",id:"window",level:3},{value:"Inherited from",id:"inherited-from-10",level:4},{value:"Defined in",id:"defined-in-11",level:4}],s={toc:p},u="wrapper";function m(e){let{components:t,...i}=e;return(0,r.kt)(u,(0,n.Z)({},s,i,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".ImaRequestInit"),(0,r.kt)("p",null,"Options for a request sent using the HTTP agent."),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"Omit"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"RequestInit"),", ",(0,r.kt)("inlineCode",{parentName:"p"},'"body"'),">"),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"ImaRequestInit"))))),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"cache"},"cache"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"cache"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"RequestCache")),(0,r.kt)("p",null,"Flag that enables caching the HTTP request\n(enabled by default, also applies to requests in progress)."),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,"Omit.cache"),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1676"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"credentials"},"credentials"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"credentials"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"RequestCredentials")),(0,r.kt)("p",null,"A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials."),(0,r.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,r.kt)("p",null,"Omit.credentials"),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1678"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"headers"},"headers"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"headers"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Record"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),">"),(0,r.kt)("p",null,"Sets the additional request\nheaders (the keys are case-insensitive header names, the values\nare header values)."),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,"Omit.headers"),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/http/HttpAgent.ts#L27"},"packages/core/src/http/HttpAgent.ts:27")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"integrity"},"integrity"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"integrity"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"A cryptographic hash of the resource to be fetched by request. Sets request's integrity."),(0,r.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,r.kt)("p",null,"Omit.integrity"),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1682"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"keepalive"},"keepalive"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"keepalive"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"A boolean to set request's keepalive."),(0,r.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,r.kt)("p",null,"Omit.keepalive"),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1684"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"method"},"method"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"method"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"A string to set request's method."),(0,r.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,r.kt)("p",null,"Omit.method"),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1686"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"mode"},"mode"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"mode"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"RequestMode")),(0,r.kt)("p",null,"A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode."),(0,r.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,r.kt)("p",null,"Omit.mode"),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1688"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"redirect"},"redirect"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"redirect"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"RequestRedirect")),(0,r.kt)("p",null,"A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect."),(0,r.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,r.kt)("p",null,"Omit.redirect"),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1690"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"referrer"},"referrer"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"referrer"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,'A string whose value is a same-origin URL, "about:client", or the empty string, to set request\'s referrer.'),(0,r.kt)("h4",{id:"inherited-from-7"},"Inherited from"),(0,r.kt)("p",null,"Omit.referrer"),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1692"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"referrerpolicy"},"referrerPolicy"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"referrerPolicy"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"ReferrerPolicy")),(0,r.kt)("p",null,"A referrer policy to set request's referrerPolicy."),(0,r.kt)("h4",{id:"inherited-from-8"},"Inherited from"),(0,r.kt)("p",null,"Omit.referrerPolicy"),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1694"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"signal"},"signal"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"signal"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbortSignal")),(0,r.kt)("p",null,"An AbortSignal to set request's signal."),(0,r.kt)("h4",{id:"inherited-from-9"},"Inherited from"),(0,r.kt)("p",null,"Omit.signal"),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1696"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"window"},"window"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"window"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"null")),(0,r.kt)("p",null,"Can only be null. Used to disassociate request from any Window."),(0,r.kt)("h4",{id:"inherited-from-10"},"Inherited from"),(0,r.kt)("p",null,"Omit.window"),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1698"))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[5566],{3905:(e,t,i)=>{i.d(t,{Zo:()=>s,kt:()=>f});var n=i(7294);function r(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function l(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function a(e){for(var t=1;t=0||(r[i]=e[i]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}var o=n.createContext({}),p=function(e){var t=n.useContext(o),i=t;return e&&(i="function"==typeof e?e(t):a(a({},t),e)),i},s=function(e){var t=p(e.components);return n.createElement(o.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var i=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,s=d(e,["components","mdxType","originalType","parentName"]),u=p(i),c=r,f=u["".concat(o,".").concat(c)]||u[c]||m[c]||l;return i?n.createElement(f,a(a({ref:t},s),{},{components:i})):n.createElement(f,a({ref:t},s))}));function f(e,t){var i=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=i.length,a=new Array(l);a[0]=c;var d={};for(var o in t)hasOwnProperty.call(t,o)&&(d[o]=t[o]);d.originalType=e,d[u]="string"==typeof e?e:r,a[1]=d;for(var p=2;p{i.r(t),i.d(t,{assets:()=>o,contentTitle:()=>a,default:()=>m,frontMatter:()=>l,metadata:()=>d,toc:()=>p});var n=i(5773),r=(i(7294),i(3905));const l={id:"ima_core.ImaRequestInit",title:"Interface: ImaRequestInit",sidebar_label:"@ima/core.ImaRequestInit",custom_edit_url:null},a=void 0,d={unversionedId:"api/interfaces/ima_core.ImaRequestInit",id:"api/interfaces/ima_core.ImaRequestInit",title:"Interface: ImaRequestInit",description:"@ima/core.ImaRequestInit",source:"@site/../docs/api/interfaces/ima_core.ImaRequestInit.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.ImaRequestInit",permalink:"/api/interfaces/ima_core.ImaRequestInit",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.ImaRequestInit",title:"Interface: ImaRequestInit",sidebar_label:"@ima/core.ImaRequestInit",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.HttpAgentRequestOptions",permalink:"/api/interfaces/ima_core.HttpAgentRequestOptions"},next:{title:"@ima/core.InitAppConfig",permalink:"/api/interfaces/ima_core.InitAppConfig"}},o={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Properties",id:"properties",level:2},{value:"cache",id:"cache",level:3},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"credentials",id:"credentials",level:3},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"headers",id:"headers",level:3},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"integrity",id:"integrity",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"keepalive",id:"keepalive",level:3},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"method",id:"method",level:3},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"mode",id:"mode",level:3},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"redirect",id:"redirect",level:3},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"referrer",id:"referrer",level:3},{value:"Inherited from",id:"inherited-from-7",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"referrerPolicy",id:"referrerpolicy",level:3},{value:"Inherited from",id:"inherited-from-8",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"signal",id:"signal",level:3},{value:"Inherited from",id:"inherited-from-9",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"window",id:"window",level:3},{value:"Inherited from",id:"inherited-from-10",level:4},{value:"Defined in",id:"defined-in-11",level:4}],s={toc:p},u="wrapper";function m(e){let{components:t,...i}=e;return(0,r.kt)(u,(0,n.Z)({},s,i,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".ImaRequestInit"),(0,r.kt)("p",null,"Options for a request sent using the HTTP agent."),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"Omit"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"RequestInit"),", ",(0,r.kt)("inlineCode",{parentName:"p"},'"body"'),">"),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"ImaRequestInit"))))),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"cache"},"cache"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"cache"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"RequestCache")),(0,r.kt)("p",null,"Flag that enables caching the HTTP request\n(enabled by default, also applies to requests in progress)."),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,"Omit.cache"),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1676"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"credentials"},"credentials"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"credentials"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"RequestCredentials")),(0,r.kt)("p",null,"A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials."),(0,r.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,r.kt)("p",null,"Omit.credentials"),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1678"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"headers"},"headers"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"headers"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Record"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),">"),(0,r.kt)("p",null,"Sets the additional request\nheaders (the keys are case-insensitive header names, the values\nare header values)."),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,"Omit.headers"),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/http/HttpAgent.ts#L27"},"packages/core/src/http/HttpAgent.ts:27")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"integrity"},"integrity"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"integrity"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"A cryptographic hash of the resource to be fetched by request. Sets request's integrity."),(0,r.kt)("h4",{id:"inherited-from-2"},"Inherited from"),(0,r.kt)("p",null,"Omit.integrity"),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1682"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"keepalive"},"keepalive"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"keepalive"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"A boolean to set request's keepalive."),(0,r.kt)("h4",{id:"inherited-from-3"},"Inherited from"),(0,r.kt)("p",null,"Omit.keepalive"),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1684"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"method"},"method"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"method"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"A string to set request's method."),(0,r.kt)("h4",{id:"inherited-from-4"},"Inherited from"),(0,r.kt)("p",null,"Omit.method"),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1686"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"mode"},"mode"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"mode"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"RequestMode")),(0,r.kt)("p",null,"A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode."),(0,r.kt)("h4",{id:"inherited-from-5"},"Inherited from"),(0,r.kt)("p",null,"Omit.mode"),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1688"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"redirect"},"redirect"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"redirect"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"RequestRedirect")),(0,r.kt)("p",null,"A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect."),(0,r.kt)("h4",{id:"inherited-from-6"},"Inherited from"),(0,r.kt)("p",null,"Omit.redirect"),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1690"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"referrer"},"referrer"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"referrer"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,'A string whose value is a same-origin URL, "about:client", or the empty string, to set request\'s referrer.'),(0,r.kt)("h4",{id:"inherited-from-7"},"Inherited from"),(0,r.kt)("p",null,"Omit.referrer"),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1692"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"referrerpolicy"},"referrerPolicy"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"referrerPolicy"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"ReferrerPolicy")),(0,r.kt)("p",null,"A referrer policy to set request's referrerPolicy."),(0,r.kt)("h4",{id:"inherited-from-8"},"Inherited from"),(0,r.kt)("p",null,"Omit.referrerPolicy"),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1694"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"signal"},"signal"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"signal"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"AbortSignal")),(0,r.kt)("p",null,"An AbortSignal to set request's signal."),(0,r.kt)("h4",{id:"inherited-from-9"},"Inherited from"),(0,r.kt)("p",null,"Omit.signal"),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1696"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"window"},"window"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"window"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"null")),(0,r.kt)("p",null,"Can only be null. Used to disassociate request from any Window."),(0,r.kt)("h4",{id:"inherited-from-10"},"Inherited from"),(0,r.kt)("p",null,"Omit.window"),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,"node_modules/typescript/lib/lib.dom.d.ts:1698"))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/21ee5e18.5389ec9a.js b/assets/js/21ee5e18.5389ec9a.js new file mode 100644 index 0000000000..677fb8d89d --- /dev/null +++ b/assets/js/21ee5e18.5389ec9a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[5371],{3905:(e,n,t)=>{t.d(n,{Zo:()=>l,kt:()=>f});var r=t(7294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var c=r.createContext({}),p=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},l=function(e){var n=p(e.components);return r.createElement(c.Provider,{value:n},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,a=e.originalType,c=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),d=p(t),m=i,f=d["".concat(c,".").concat(m)]||d[m]||u[m]||a;return t?r.createElement(f,o(o({ref:n},l),{},{components:t})):r.createElement(f,o({ref:n},l))}));function f(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var a=t.length,o=new Array(a);o[0]=m;var s={};for(var c in n)hasOwnProperty.call(n,c)&&(s[c]=n[c]);s.originalType=e,s[d]="string"==typeof e?e:i,o[1]=s;for(var p=2;p{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>p});var r=t(5773),i=(t(7294),t(3905));const a={title:"Object Container",description:"Basic features > Object Container and IMA.js dependency injection"},o=void 0,s={unversionedId:"basic-features/object-container",id:"basic-features/object-container",title:"Object Container",description:"Basic features > Object Container and IMA.js dependency injection",source:"@site/../docs/basic-features/object-container.md",sourceDirName:"basic-features",slug:"/basic-features/object-container",permalink:"/basic-features/object-container",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/basic-features/object-container.md",tags:[],version:"current",lastUpdatedBy:"PS",lastUpdatedAt:1736522400,formattedLastUpdatedAt:"Jan 10, 2025",frontMatter:{title:"Object Container",description:"Basic features > Object Container and IMA.js dependency injection"},sidebar:"docs",previous:{title:"Extensions",permalink:"/basic-features/extensions"},next:{title:"Rendering process",permalink:"/basic-features/rendering-process"}},c={},p=[{value:"Automatic registration with Object Container",id:"automatic-registration-with-object-container",level:2},{value:"Manually registering dependencies",id:"manually-registering-dependencies",level:2},{value:"1. bind()",id:"1-bind",level:3},{value:"2. constant()",id:"2-constant",level:3},{value:"3. inject()",id:"3-inject",level:3},{value:"4. provide()",id:"4-provide",level:3},{value:"Obtaining dependencies",id:"obtaining-dependencies",level:2},{value:"1. Dependency Injection",id:"1-dependency-injection",level:3},{value:"Optional dependencies",id:"optional-dependencies",level:4},{value:"Spread dependencies",id:"spread-dependencies",level:4},{value:"2. get()",id:"2-get",level:3},{value:"3. create()",id:"3-create",level:3},{value:"Other methods",id:"other-methods",level:2}],l={toc:p},d="wrapper";function u(e){let{components:n,...t}=e;return(0,i.kt)(d,(0,r.Z)({},l,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"The ",(0,i.kt)("strong",{parentName:"p"},"Object Container (OC)")," is an enhanced dependency injector with support for aliases and constants. It is sophisticated and registers everything it comes across but only if it actually matters."),(0,i.kt)("p",null,"By registering controllers and views the OC can simply follow your dependency tree and register everything you might possibly need. Below is a diagram of simple dependency tree."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"app/config/routes.js\n\u251c\u2500 OrderController\n| \u251c\u2500 OrderService / OrderEntity\n| | \u2514\u2500 RestClient\n| | \u251c\u2500 $HttpAgent\n| | \u251c\u2500 $Cache\n| | \u2514\u2500 LinkGenerator\n| | \u2514\u2500 $Router\n| \u2514\u2500 UserService / UserEntity\n| \u2514\u2500 RestClient\n| \u251c\u2500 $HttpAgent\n| \u251c\u2500 $Cache\n| \u2514\u2500 LinkGenerator\n| \u2514\u2500 $Router\n\u2514\u2500 UserController\n \u251c\u2500 ...\n \u2514\u2500 ...\n")),(0,i.kt)("h2",{id:"automatic-registration-with-object-container"},"Automatic registration with Object Container"),(0,i.kt)("p",null,"Every class that defines static property ",(0,i.kt)("inlineCode",{parentName:"p"},"$dependencies")," which exports array of dependencies is automatically registered to ",(0,i.kt)("inlineCode",{parentName:"p"},"oc")," and instanced when it is used (this can happen lazily upon first usage)."),(0,i.kt)("h2",{id:"manually-registering-dependencies"},"Manually registering dependencies"),(0,i.kt)("p",null,"Since the OC cannot discover everything and doesn't know about interfaces you can register your dependencies in a file ",(0,i.kt)("inlineCode",{parentName:"p"},"app/config/bind.js"),".\nThis file contains a function that receives the namespace register\n",(0,i.kt)("em",{parentName:"p"},"(deprecated)"),", OC instance and a config object."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/config/bind.js\nexport let init = (ns, oc, config) => {\n // Register stuff here\n}\n")),(0,i.kt)("p",null,"OC handles ",(0,i.kt)("em",{parentName:"p"},"instances")," of registered dependencies. When registering a class, be aware that its static methods and properties won't be available through OC."),(0,i.kt)("p",null,"Below is list of methods that the OC provides to register your dependencies."),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},(0,i.kt)("strong",{parentName:"p"},"Note:")," Every method returns the OC itself so you can chain them together.")),(0,i.kt)("h3",{id:"1-bind"},"1. ",(0,i.kt)("inlineCode",{parentName:"h3"},"bind()")),(0,i.kt)("p",null,"Binds the specified class or factory function and dependencies to the\nspecified alias.\nThis allows to create new instances of the class or the\nfunction by referencing the alias. Same goes for specifying the class of\nthe function as a dependency."),(0,i.kt)("p",null,"Also note that the same class or function may be bound to several\naliases and each may use different dependencies."),(0,i.kt)("p",null,"The alias will use the current dependencies bound to the class if no\ndependencies are provided."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/config/bind.js\n//\n// Binding custom router implementation and\n// UserAgent class from IMA.js user-agent plugin\n\nimport { UserAgent } from '@ima/plugin-useragent';\nimport { CustomRouter } from 'app/your-custom-overrides/Router';\n\nexport let init = (ns, oc, config) => {\n // Simple alias\n oc.bind('UserAgent', UserAgent);\n\n // Alias with dependencies\n // Override of the IMA.js router implementation\n oc.bind('$Router', CustomRouter, [\n '$PageManager', '$RouteFactory', '$Dispatcher', Window\n ]);\n\n // ...\n}\n")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},(0,i.kt)("strong",{parentName:"p"},"Note:")," The dollar-sign ",(0,i.kt)("inlineCode",{parentName:"p"},"$")," at the beginning of an alias marks IMA.js\ninternal component.")),(0,i.kt)("h3",{id:"2-constant"},"2. ",(0,i.kt)("inlineCode",{parentName:"h3"},"constant()")),(0,i.kt)("p",null,"Defines a new constant registered within the OC. Note that\nthis is the only way of passing ",(0,i.kt)("inlineCode",{parentName:"p"},"string")," values to constructors\nbecause the OC treats strings as class, interface, alias\nor constant names. Once the constant is defined it cannot be redefined."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/config/bind.js\n//\n// Assigning API root URL to a constant that can be later used as a dependency\n// (for example in IMA.js RestAPI client)\n\nexport let init = (ns, oc, config) => {\n oc.constant('REST_API_ROOT_URL', config.api.url);\n}\n")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},(0,i.kt)("strong",{parentName:"p"},"Note:"),"\xa0Constants are not limited to primitive values but can also\ntake objects.")),(0,i.kt)("h3",{id:"3-inject"},"3. ",(0,i.kt)("inlineCode",{parentName:"h3"},"inject()")),(0,i.kt)("p",null,"Configures the object loader with the specified default dependencies for\nthe specified class."),(0,i.kt)("p",null,"New instances of the class created by the OC will receive the provided\ndependencies into constructor unless custom dependencies are provided."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/config/bind.js\n//\n// Injecting the rest client.\n// Notice how we used the REST_API_ROOT_URL constant\n\nimport Cache from 'ima/cache/Cache';\nimport HttpAgent from 'ima/http/HttpAgent';\nimport SimpleRestClient from 'app/rest-client-impl/SimpleRestClient';\nimport LinkGenerator from 'app/rest-client-impl/LinkGenerator';\n\nexport let init = (ns, oc, config) => {\n oc.inject(SimpleRestClient, [\n HttpAgent, Cache, 'REST_API_ROOT_URL', LinkGenerator\n ]);\n}\n")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},(0,i.kt)("strong",{parentName:"p"},"Note:")," For more information about the IMA.js REST Client see ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/jurca/IMA-plugin-rest-client"},"IMA-plugin-rest-client")," repository.")),(0,i.kt)("h3",{id:"4-provide"},"4. ",(0,i.kt)("inlineCode",{parentName:"h3"},"provide()")),(0,i.kt)("p",null,"Configures the default implementation of the specified interface.\nWhen the interface is requested from the OC the default implementation\nis provided."),(0,i.kt)("p",null,"The implementation constructor will obtain the provided default\ndependencies or the dependencies provided to the ",(0,i.kt)("a",{parentName:"p",href:"#3-create"},(0,i.kt)("inlineCode",{parentName:"a"},"create()"))," method."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/config/bind.js\n//\n//\n\nimport { AbstractRestClient } from 'ima-plugin-rest-client';\nimport SimpleRestClient from 'app/rest-client-impl/SimpleRestClient';\n\nexport let init = (ns, oc, config) => {\n oc.provide(AbstractRestClient, SimpleRestClient);\n\n // We didn't specify any dependencies on purpose\n // they were set in the previous example.\n // Otherwise it would be like this:\n\n oc.provide(\n AbstractRestClient,\n SimpleRestClient,\n [\n HttpAgent, Cache, 'REST_API_ROOT_URL', LinkGenerator\n ]\n );\n}\n")),(0,i.kt)("h2",{id:"obtaining-dependencies"},"Obtaining dependencies"),(0,i.kt)("p",null,"In IMA.js application you can obtain dependencies using many different methods, where each one can be useful in different situation and environment."),(0,i.kt)("h3",{id:"1-dependency-injection"},"1. Dependency Injection"),(0,i.kt)("p",null,"Apart from defining dependencies manually in ",(0,i.kt)("inlineCode",{parentName:"p"},"app/config/bind.js")," can every class (discovered by the OC) define a static getter ",(0,i.kt)("inlineCode",{parentName:"p"},"$dependencies"),". This getter should return list of dependencies specified by a class constructor or a ",(0,i.kt)("inlineCode",{parentName:"p"},"string")," alias."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/page/order/OrderController.js\n//\n// OrderController is discovered by the OC\n// because it's registered in app/config/routes.js\n\nimport { AbstractController } from '@ima/core';\nimport OrderService from 'app/model/order/OrderService.js';\nimport UserService from 'app/model/user/UserService.js';\n\nexport default class OrderController extends AbstractController {\n\n static get $dependencies() {\n return [\n OrderService,\n UserService,\n '$Router'\n ];\n }\n\n // ...\n")),(0,i.kt)("p",null,"Once you've defined the dependencies the constructor of the class will receive their instances."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"}," constructor(orderService, userService, $router) {\n super();\n\n this._orderService = orderService;\n this._userService = userService;\n this._$router = $router;\n }\n\n // ...\n\n")),(0,i.kt)("h4",{id:"optional-dependencies"},"Optional dependencies"),(0,i.kt)("p",null,"Dependencies can also be defined as optional.\nIf those dependencies are present in the OC, the constructor of the class will receive their instances.\nOtherwise it will receive ",(0,i.kt)("inlineCode",{parentName:"p"},"undefined"),"."),(0,i.kt)("p",null,"To use optional dependency, prefix ",(0,i.kt)("inlineCode",{parentName:"p"},"?")," is added before the string alias or the dependency is wrapped in array, with option specifying if it's optional or not."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/page/order/OrderController.js\n//\n// OrderController using optional dependencies\n\nimport { AbstractController } from '@ima/core';\nimport OrderService from 'app/model/order/OrderService.js';\nimport UserService from 'app/model/user/UserService.js';\n\nexport default class OrderController extends AbstractController {\n\n static get $dependencies() {\n return [\n [OrderService, { optional: true }],\n [UserService, { optional: false }],\n '?$Settings.api.serverApiUrl'\n ];\n }\n\n // ...\n")),(0,i.kt)("h4",{id:"spread-dependencies"},"Spread dependencies"),(0,i.kt)("p",null,"Dependencies can be added to array registered in the OC. These dependencies can be then spread to the class constructor using spread operator ",(0,i.kt)("inlineCode",{parentName:"p"},"..."),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/config/bind.js\n//\n// Creating array of dependencies\n\nimport OrderService from 'app/model/order/OrderService.js';\nimport UserService from 'app/model/user/UserService.js';\n\nexport let init = (ns, oc, config) => {\n oc.constant('$spreadDependencies', [OrderService, UserService]);\n}\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/page/order/OrderController.js\n//\n// OrderController using spread dependencies\n\nimport { AbstractController } from '@ima/core';\n\nexport default class OrderController extends AbstractController {\n\n static get $dependencies() {\n return ['...$spreadDependencies'];\n }\n\n constructor(orderService, userService) {\n super();\n\n this._orderService = orderService;\n this._userService = userService;\n }\n\n // ...\n")),(0,i.kt)("p",null,"Spread and optional dependencies can be combined."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// ...\nstatic get $dependencies() {\n return ['...?$spreadDependencies'];\n}\n// ...\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// ...\nstatic get $dependencies() {\n return [['...$spreadDependencies', { optional: true }]];\n}\n// ...\n")),(0,i.kt)("h3",{id:"2-get"},"2. ",(0,i.kt)("inlineCode",{parentName:"h3"},"get()")),(0,i.kt)("p",null,"Retrieves the ",(0,i.kt)("strong",{parentName:"p"},"shared instance")," or value of the specified constant, alias,\nclass or factory function, interface, or fully qualified namespace path\n(the method checks these in this order in case of a name clash)."),(0,i.kt)("p",null,"The instance or value is created lazily the first time it is requested."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"oc.get('REST_API_ROOT_URL');\noc.get('UserAgent');\noc.get(AbstractRestClient); // This returns instance of `SimpleRestClient` as we defined in the previous example\n")),(0,i.kt)("h3",{id:"3-create"},"3. ",(0,i.kt)("inlineCode",{parentName:"h3"},"create()")),(0,i.kt)("p",null,"Creates a ",(0,i.kt)("strong",{parentName:"p"},"new instance")," of the class or retrieves the value generated by\nthe factory function identified by the provided name, class, interface,\nor factory function, passing in the provided dependencies."),(0,i.kt)("p",null,"The method uses the dependencies specified when the class, interface or\nfactory function has been registered with the object container if no\ncustom dependencies are provided."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"import { Cache, HttpAgent } from '@ima/core';\nimport SimpleRestClient from 'app/rest-client-impl/SimpleRestClient';\nimport LinkGenerator from 'app/rest-client-impl/LinkGenerator';\n\noc.create('UserAgent');\noc.create(\n SimpleRestClient,\n [\n HttpAgent, Cache, 'REST_API_ROOT_URL', LinkGenerator\n ]\n);\n")),(0,i.kt)("p",null,"The last two method are not used as much as the first one but can be\nuseful inside the ",(0,i.kt)("inlineCode",{parentName:"p"},"app/config/bind.js")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"app/config/routes.js")),(0,i.kt)("h2",{id:"other-methods"},"Other methods"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"has()")," returns ",(0,i.kt)("inlineCode",{parentName:"li"},"true")," if the specified object, class or resource is registered\nwithin the OC.")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"if (oc.has('UserAgent') && oc.get('UserAgent').isMobile()) {\n // Register conditional stuff here...\n}\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"getConstructorOf()")," returns the class constructor function of the specified class or alias.")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/21ee5e18.743c6d14.js b/assets/js/21ee5e18.743c6d14.js deleted file mode 100644 index 583b9e0996..0000000000 --- a/assets/js/21ee5e18.743c6d14.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[5371],{3905:(e,n,t)=>{t.d(n,{Zo:()=>l,kt:()=>f});var r=t(7294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var c=r.createContext({}),p=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},l=function(e){var n=p(e.components);return r.createElement(c.Provider,{value:n},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,a=e.originalType,c=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),d=p(t),m=i,f=d["".concat(c,".").concat(m)]||d[m]||u[m]||a;return t?r.createElement(f,o(o({ref:n},l),{},{components:t})):r.createElement(f,o({ref:n},l))}));function f(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var a=t.length,o=new Array(a);o[0]=m;var s={};for(var c in n)hasOwnProperty.call(n,c)&&(s[c]=n[c]);s.originalType=e,s[d]="string"==typeof e?e:i,o[1]=s;for(var p=2;p{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>p});var r=t(5773),i=(t(7294),t(3905));const a={title:"Object Container",description:"Basic features > Object Container and IMA.js dependency injection"},o=void 0,s={unversionedId:"basic-features/object-container",id:"basic-features/object-container",title:"Object Container",description:"Basic features > Object Container and IMA.js dependency injection",source:"@site/../docs/basic-features/object-container.md",sourceDirName:"basic-features",slug:"/basic-features/object-container",permalink:"/basic-features/object-container",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/basic-features/object-container.md",tags:[],version:"current",lastUpdatedBy:"Filip Satek",lastUpdatedAt:1734590310,formattedLastUpdatedAt:"Dec 19, 2024",frontMatter:{title:"Object Container",description:"Basic features > Object Container and IMA.js dependency injection"},sidebar:"docs",previous:{title:"Extensions",permalink:"/basic-features/extensions"},next:{title:"Rendering process",permalink:"/basic-features/rendering-process"}},c={},p=[{value:"Automatic registration with Object Container",id:"automatic-registration-with-object-container",level:2},{value:"Manually registering dependencies",id:"manually-registering-dependencies",level:2},{value:"1. bind()",id:"1-bind",level:3},{value:"2. constant()",id:"2-constant",level:3},{value:"3. inject()",id:"3-inject",level:3},{value:"4. provide()",id:"4-provide",level:3},{value:"Obtaining dependencies",id:"obtaining-dependencies",level:2},{value:"1. Dependency Injection",id:"1-dependency-injection",level:3},{value:"Optional dependencies",id:"optional-dependencies",level:4},{value:"Spread dependencies",id:"spread-dependencies",level:4},{value:"2. get()",id:"2-get",level:3},{value:"3. create()",id:"3-create",level:3},{value:"Other methods",id:"other-methods",level:2}],l={toc:p},d="wrapper";function u(e){let{components:n,...t}=e;return(0,i.kt)(d,(0,r.Z)({},l,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"The ",(0,i.kt)("strong",{parentName:"p"},"Object Container (OC)")," is an enhanced dependency injector with support for aliases and constants. It is sophisticated and registers everything it comes across but only if it actually matters."),(0,i.kt)("p",null,"By registering controllers and views the OC can simply follow your dependency tree and register everything you might possibly need. Below is a diagram of simple dependency tree."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"app/config/routes.js\n\u251c\u2500 OrderController\n| \u251c\u2500 OrderService / OrderEntity\n| | \u2514\u2500 RestClient\n| | \u251c\u2500 $HttpAgent\n| | \u251c\u2500 $Cache\n| | \u2514\u2500 LinkGenerator\n| | \u2514\u2500 $Router\n| \u2514\u2500 UserService / UserEntity\n| \u2514\u2500 RestClient\n| \u251c\u2500 $HttpAgent\n| \u251c\u2500 $Cache\n| \u2514\u2500 LinkGenerator\n| \u2514\u2500 $Router\n\u2514\u2500 UserController\n \u251c\u2500 ...\n \u2514\u2500 ...\n")),(0,i.kt)("h2",{id:"automatic-registration-with-object-container"},"Automatic registration with Object Container"),(0,i.kt)("p",null,"Every class that defines static property ",(0,i.kt)("inlineCode",{parentName:"p"},"$dependencies")," which exports array of dependencies is automatically registered to ",(0,i.kt)("inlineCode",{parentName:"p"},"oc")," and instanced when it is used (this can happen lazily upon first usage)."),(0,i.kt)("h2",{id:"manually-registering-dependencies"},"Manually registering dependencies"),(0,i.kt)("p",null,"Since the OC cannot discover everything and doesn't know about interfaces you can register your dependencies in a file ",(0,i.kt)("inlineCode",{parentName:"p"},"app/config/bind.js"),".\nThis file contains a function that receives the namespace register\n",(0,i.kt)("em",{parentName:"p"},"(deprecated)"),", OC instance and a config object."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/config/bind.js\nexport let init = (ns, oc, config) => {\n // Register stuff here\n}\n")),(0,i.kt)("p",null,"OC handles ",(0,i.kt)("em",{parentName:"p"},"instances")," of registered dependencies. When registering a class, be aware that its static methods and properties won't be available through OC."),(0,i.kt)("p",null,"Below is list of methods that the OC provides to register your dependencies."),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},(0,i.kt)("strong",{parentName:"p"},"Note:")," Every method returns the OC itself so you can chain them together.")),(0,i.kt)("h3",{id:"1-bind"},"1. ",(0,i.kt)("inlineCode",{parentName:"h3"},"bind()")),(0,i.kt)("p",null,"Binds the specified class or factory function and dependencies to the\nspecified alias.\nThis allows to create new instances of the class or the\nfunction by referencing the alias. Same goes for specifying the class of\nthe function as a dependency."),(0,i.kt)("p",null,"Also note that the same class or function may be bound to several\naliases and each may use different dependencies."),(0,i.kt)("p",null,"The alias will use the current dependencies bound to the class if no\ndependencies are provided."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/config/bind.js\n//\n// Binding custom router implementation and\n// UserAgent class from IMA.js user-agent plugin\n\nimport { UserAgent } from '@ima/plugin-useragent';\nimport { CustomRouter } from 'app/your-custom-overrides/Router';\n\nexport let init = (ns, oc, config) => {\n // Simple alias\n oc.bind('UserAgent', UserAgent);\n\n // Alias with dependencies\n // Override of the IMA.js router implementation\n oc.bind('$Router', CustomRouter, [\n '$PageManager', '$RouteFactory', '$Dispatcher', Window\n ]);\n\n // ...\n}\n")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},(0,i.kt)("strong",{parentName:"p"},"Note:")," The dollar-sign ",(0,i.kt)("inlineCode",{parentName:"p"},"$")," at the beginning of an alias marks IMA.js\ninternal component.")),(0,i.kt)("h3",{id:"2-constant"},"2. ",(0,i.kt)("inlineCode",{parentName:"h3"},"constant()")),(0,i.kt)("p",null,"Defines a new constant registered within the OC. Note that\nthis is the only way of passing ",(0,i.kt)("inlineCode",{parentName:"p"},"string")," values to constructors\nbecause the OC treats strings as class, interface, alias\nor constant names. Once the constant is defined it cannot be redefined."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/config/bind.js\n//\n// Assigning API root URL to a constant that can be later used as a dependency\n// (for example in IMA.js RestAPI client)\n\nexport let init = (ns, oc, config) => {\n oc.constant('REST_API_ROOT_URL', config.api.url);\n}\n")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},(0,i.kt)("strong",{parentName:"p"},"Note:"),"\xa0Constants are not limited to primitive values but can also\ntake objects.")),(0,i.kt)("h3",{id:"3-inject"},"3. ",(0,i.kt)("inlineCode",{parentName:"h3"},"inject()")),(0,i.kt)("p",null,"Configures the object loader with the specified default dependencies for\nthe specified class."),(0,i.kt)("p",null,"New instances of the class created by the OC will receive the provided\ndependencies into constructor unless custom dependencies are provided."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/config/bind.js\n//\n// Injecting the rest client.\n// Notice how we used the REST_API_ROOT_URL constant\n\nimport Cache from 'ima/cache/Cache';\nimport HttpAgent from 'ima/http/HttpAgent';\nimport SimpleRestClient from 'app/rest-client-impl/SimpleRestClient';\nimport LinkGenerator from 'app/rest-client-impl/LinkGenerator';\n\nexport let init = (ns, oc, config) => {\n oc.inject(SimpleRestClient, [\n HttpAgent, Cache, 'REST_API_ROOT_URL', LinkGenerator\n ]);\n}\n")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},(0,i.kt)("strong",{parentName:"p"},"Note:")," For more information about the IMA.js REST Client see ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/jurca/IMA-plugin-rest-client"},"IMA-plugin-rest-client")," repository.")),(0,i.kt)("h3",{id:"4-provide"},"4. ",(0,i.kt)("inlineCode",{parentName:"h3"},"provide()")),(0,i.kt)("p",null,"Configures the default implementation of the specified interface.\nWhen the interface is requested from the OC the default implementation\nis provided."),(0,i.kt)("p",null,"The implementation constructor will obtain the provided default\ndependencies or the dependencies provided to the ",(0,i.kt)("a",{parentName:"p",href:"#3-create"},(0,i.kt)("inlineCode",{parentName:"a"},"create()"))," method."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/config/bind.js\n//\n//\n\nimport { AbstractRestClient } from 'ima-plugin-rest-client';\nimport SimpleRestClient from 'app/rest-client-impl/SimpleRestClient';\n\nexport let init = (ns, oc, config) => {\n oc.provide(AbstractRestClient, SimpleRestClient);\n\n // We didn't specify any dependencies on purpose\n // they were set in the previous example.\n // Otherwise it would be like this:\n\n oc.provide(\n AbstractRestClient,\n SimpleRestClient,\n [\n HttpAgent, Cache, 'REST_API_ROOT_URL', LinkGenerator\n ]\n );\n}\n")),(0,i.kt)("h2",{id:"obtaining-dependencies"},"Obtaining dependencies"),(0,i.kt)("p",null,"In IMA.js application you can obtain dependencies using many different methods, where each one can be useful in different situation and environment."),(0,i.kt)("h3",{id:"1-dependency-injection"},"1. Dependency Injection"),(0,i.kt)("p",null,"Apart from defining dependencies manually in ",(0,i.kt)("inlineCode",{parentName:"p"},"app/config/bind.js")," can every class (discovered by the OC) define a static getter ",(0,i.kt)("inlineCode",{parentName:"p"},"$dependencies"),". This getter should return list of dependencies specified by a class constructor or a ",(0,i.kt)("inlineCode",{parentName:"p"},"string")," alias."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/page/order/OrderController.js\n//\n// OrderController is discovered by the OC\n// because it's registered in app/config/routes.js\n\nimport { AbstractController } from '@ima/core';\nimport OrderService from 'app/model/order/OrderService.js';\nimport UserService from 'app/model/user/UserService.js';\n\nexport default class OrderController extends AbstractController {\n\n static get $dependencies() {\n return [\n OrderService,\n UserService,\n '$Router'\n ];\n }\n\n // ...\n")),(0,i.kt)("p",null,"Once you've defined the dependencies the constructor of the class will receive their instances."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"}," constructor(orderService, userService, $router) {\n super();\n\n this._orderService = orderService;\n this._userService = userService;\n this._$router = $router;\n }\n\n // ...\n\n")),(0,i.kt)("h4",{id:"optional-dependencies"},"Optional dependencies"),(0,i.kt)("p",null,"Dependencies can also be defined as optional.\nIf those dependencies are present in the OC, the constructor of the class will receive their instances.\nOtherwise it will receive ",(0,i.kt)("inlineCode",{parentName:"p"},"undefined"),"."),(0,i.kt)("p",null,"To use optional dependency, prefix ",(0,i.kt)("inlineCode",{parentName:"p"},"?")," is added before the string alias or the dependency is wrapped in array, with option specifying if it's optional or not."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/page/order/OrderController.js\n//\n// OrderController using optional dependencies\n\nimport { AbstractController } from '@ima/core';\nimport OrderService from 'app/model/order/OrderService.js';\nimport UserService from 'app/model/user/UserService.js';\n\nexport default class OrderController extends AbstractController {\n\n static get $dependencies() {\n return [\n [OrderService, { optional: true }],\n [UserService, { optional: false }],\n '?$Settings.api.serverApiUrl'\n ];\n }\n\n // ...\n")),(0,i.kt)("h4",{id:"spread-dependencies"},"Spread dependencies"),(0,i.kt)("p",null,"Dependencies can be added to array registered in the OC. These dependencies can be then spread to the class constructor using spread operator ",(0,i.kt)("inlineCode",{parentName:"p"},"..."),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/config/bind.js\n//\n// Creating array of dependencies\n\nimport OrderService from 'app/model/order/OrderService.js';\nimport UserService from 'app/model/user/UserService.js';\n\nexport let init = (ns, oc, config) => {\n oc.constant('$spreadDependencies', [OrderService, UserService]);\n}\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/page/order/OrderController.js\n//\n// OrderController using spread dependencies\n\nimport { AbstractController } from '@ima/core';\n\nexport default class OrderController extends AbstractController {\n\n static get $dependencies() {\n return ['...$spreadDependencies'];\n }\n\n constructor(orderService, userService) {\n super();\n\n this._orderService = orderService;\n this._userService = userService;\n }\n\n // ...\n")),(0,i.kt)("p",null,"Spread and optional dependencies can be combined."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// ...\nstatic get $dependencies() {\n return ['...?$spreadDependencies'];\n}\n// ...\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"// ...\nstatic get $dependencies() {\n return [['...$spreadDependencies', { optional: true }]];\n}\n// ...\n")),(0,i.kt)("h3",{id:"2-get"},"2. ",(0,i.kt)("inlineCode",{parentName:"h3"},"get()")),(0,i.kt)("p",null,"Retrieves the ",(0,i.kt)("strong",{parentName:"p"},"shared instance")," or value of the specified constant, alias,\nclass or factory function, interface, or fully qualified namespace path\n(the method checks these in this order in case of a name clash)."),(0,i.kt)("p",null,"The instance or value is created lazily the first time it is requested."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"oc.get('REST_API_ROOT_URL');\noc.get('UserAgent');\noc.get(AbstractRestClient); // This returns instance of `SimpleRestClient` as we defined in the previous example\n")),(0,i.kt)("h3",{id:"3-create"},"3. ",(0,i.kt)("inlineCode",{parentName:"h3"},"create()")),(0,i.kt)("p",null,"Creates a ",(0,i.kt)("strong",{parentName:"p"},"new instance")," of the class or retrieves the value generated by\nthe factory function identified by the provided name, class, interface,\nor factory function, passing in the provided dependencies."),(0,i.kt)("p",null,"The method uses the dependencies specified when the class, interface or\nfactory function has been registered with the object container if no\ncustom dependencies are provided."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"import { Cache, HttpAgent } from '@ima/core';\nimport SimpleRestClient from 'app/rest-client-impl/SimpleRestClient';\nimport LinkGenerator from 'app/rest-client-impl/LinkGenerator';\n\noc.create('UserAgent');\noc.create(\n SimpleRestClient,\n [\n HttpAgent, Cache, 'REST_API_ROOT_URL', LinkGenerator\n ]\n);\n")),(0,i.kt)("p",null,"The last two method are not used as much as the first one but can be\nuseful inside the ",(0,i.kt)("inlineCode",{parentName:"p"},"app/config/bind.js")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"app/config/routes.js")),(0,i.kt)("h2",{id:"other-methods"},"Other methods"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"has()")," returns ",(0,i.kt)("inlineCode",{parentName:"li"},"true")," if the specified object, class or resource is registered\nwithin the OC.")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},"if (oc.has('UserAgent') && oc.get('UserAgent').isMobile()) {\n // Register conditional stuff here...\n}\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"getConstructorOf()")," returns the class constructor function of the specified class or alias.")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/23f47465.3c0d0cae.js b/assets/js/23f47465.3c0d0cae.js new file mode 100644 index 0000000000..719f1266bb --- /dev/null +++ b/assets/js/23f47465.3c0d0cae.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[9456],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>b});var a=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},u=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,l=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=p(n),m=o,b=c["".concat(s,".").concat(m)]||c[m]||d[m]||l;return n?a.createElement(b,r(r({ref:t},u),{},{components:n})):a.createElement(b,r({ref:t},u))}));function b(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var l=n.length,r=new Array(l);r[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[c]="string"==typeof e?e:o,r[1]=i;for(var p=2;p{n.d(t,{Z:()=>r});var a=n(7294),o=n(8944);const l={tabItem:"tabItem_Ymn6"};function r(e){let{children:t,hidden:n,className:r}=e;return a.createElement("div",{role:"tabpanel",className:(0,o.Z)(l.tabItem,r),hidden:n},t)}},6745:(e,t,n)=>{n.d(t,{Z:()=>w});var a=n(5773),o=n(7294),l=n(8944),r=n(2466),i=n(3620),s=n(1980),p=n(7392),u=n(12);function c(e){return function(e){return o.Children.map(e,(e=>{if(!e||(0,o.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:o}}=e;return{value:t,label:n,attributes:a,default:o}}))}function d(e){const{values:t,children:n}=e;return(0,o.useMemo)((()=>{const e=t??c(n);return function(e){const t=(0,p.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(l),(0,o.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function h(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[r,i]=(0,o.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[s,p]=b({queryString:n,groupId:a}),[c,h]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,u.Nk)(n);return[a,(0,o.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),k=(()=>{const e=s??c;return m({value:e,tabValues:l})?e:null})();(0,o.useLayoutEffect)((()=>{k&&i(k)}),[k]);return{selectedValue:r,selectValue:(0,o.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),p(e),h(e)}),[p,h,l]),tabValues:l}}var k=n(2389);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:p}=e;const u=[],{blockElementScrollPositionUntilNextRender:c}=(0,r.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=p[n].value;a!==i&&(c(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return o.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},p.map((e=>{let{value:t,label:n,attributes:r}=e;return o.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},r,{className:(0,l.Z)("tabs__item",f.tabItem,r?.className,{"tabs__item--active":i===t})}),n??t)})))}function g(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,o.cloneElement)(e,{className:"margin-top--md"}):null}return o.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,o.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function y(e){const t=h(e);return o.createElement("div",{className:(0,l.Z)("tabs-container",f.tabList)},o.createElement(v,(0,a.Z)({},e,t)),o.createElement(g,(0,a.Z)({},e,t)))}function w(e){const t=(0,k.Z)();return o.createElement(y,(0,a.Z)({key:String(t)},e))}},9340:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>b,frontMatter:()=>i,metadata:()=>p,toc:()=>c});var a=n(5773),o=(n(7294),n(3905)),l=n(6745),r=n(1683);const i={title:"Introduction to @ima/cli",description:"CLI > Introduction to @ima/cli"},s=void 0,p={unversionedId:"cli/cli",id:"cli/cli",title:"Introduction to @ima/cli",description:"CLI > Introduction to @ima/cli",source:"@site/../docs/cli/cli.md",sourceDirName:"cli",slug:"/cli/",permalink:"/cli/",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/cli/cli.md",tags:[],version:"current",lastUpdatedBy:"PS",lastUpdatedAt:1736522400,formattedLastUpdatedAt:"Jan 10, 2025",frontMatter:{title:"Introduction to @ima/cli",description:"CLI > Introduction to @ima/cli"},sidebar:"docs",previous:{title:"Dynamic imports",permalink:"/advanced-features/dynamic-imports"},next:{title:"Compiler features",permalink:"/cli/compiler-features"}},u={},c=[{value:"Development",id:"development",level:2},{value:"Build",id:"build",level:2},{value:"CLI options",id:"cli-options",level:2},{value:"--version",id:"--version",level:3},{value:"--help",id:"--help",level:3},{value:"--clean",id:"--clean",level:3},{value:"--clearCache",id:"--clearcache",level:3},{value:"--verbose",id:"--verbose",level:3},{value:"--inspect",id:"--inspect",level:3},{value:"--ignoreWarnings",id:"--ignorewarnings",level:3},{value:"--open",id:"--open",level:3},{value:"--openUrl",id:"--openurl",level:3},{value:"--legacy",id:"--legacy",level:3},{value:"--forceLegacy",id:"--forcelegacy",level:3},{value:"--forceSPA",id:"--forcespa",level:3},{value:"--profile",id:"--profile",level:3},{value:"--writeToDisk",id:"--writetodisk",level:3},{value:"--reactRefresh",id:"--reactrefresh",level:3},{value:"--lazyServer",id:"--lazyserver",level:3},{value:"Dev server options",id:"dev-server-options",level:2},{value:"--port",id:"--port",level:3},{value:"--hostname",id:"--hostname",level:3},{value:"--publicUrl",id:"--publicurl",level:3}],d={toc:c},m="wrapper";function b(e){let{components:t,...n}=e;return(0,o.kt)(m,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The ",(0,o.kt)("strong",{parentName:"p"},"IMA.js CLI")," allows you to build and watch your application for changes during development. These features are handle by the only two currently supported commands ",(0,o.kt)("inlineCode",{parentName:"p"},"build")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"dev"),"."),(0,o.kt)("p",null,"You can always list available commands by running:"),(0,o.kt)(l.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"npm",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"npx ima --help\n"))),(0,o.kt)(r.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"npx ima --help\n"))),(0,o.kt)(r.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"npx ima --help\n")))),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},(0,o.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/npx"},"npx")," comes pre-installed with npm 5.2+ and higher.")),(0,o.kt)("p",null,"This should produce following output:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"Usage: ima \n\nCommands:\n ima build Build an application for production\n ima dev Run application in development watch mode\n\nOptions:\n --version Show version number [boolean]\n --help Show help [boolean]\n")),(0,o.kt)("h2",{id:"development"},"Development"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"npx ima dev")," command starts the application in the ",(0,o.kt)("strong",{parentName:"p"},"development")," mode with HMR, error-overlay, source maps and other debugging tools enabled."),(0,o.kt)("p",null,"By default the application starts on ",(0,o.kt)("a",{parentName:"p",href:"http://localhost:3001"},"http://localhost:3001")," with ",(0,o.kt)("a",{parentName:"p",href:"./advanced-features#dev-server"},"companion dev server")," running at ",(0,o.kt)("a",{parentName:"p",href:"http://localhost:3101"},"http://localhost:3101"),". These can be further customized through the app ",(0,o.kt)("strong",{parentName:"p"},"environment")," settings and CLI arguments."),(0,o.kt)("p",null,"You can also run ",(0,o.kt)("inlineCode",{parentName:"p"},"npx ima dev --help")," to list all available options that you can use:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"ima dev\n\nRun application in development watch mode\n\nOptions:\n --version Show version number [boolean]\n --help Show help [boolean]\n --clean Clean build folder before building the application [boolean] [default: true]\n --clearCache Deletes node_modules/.cache directory to invalidate loaders cache [boolean]\n --verbose Use default webpack CLI output instead of custom one [boolean]\n --inspect Enable Node inspector mode [boolean]\n --ignoreWarnings Webpack will no longer print warnings during compilation [boolean]\n --open Opens browser window after server has been started [boolean] [default: true]\n --openUrl Custom URL used when opening browser window [string]\n --legacy Runs application in legacy mode [boolean] [default: false]\n --forceLegacy Forces runner.js to execute legacy client code [boolean] [default: false]\n --forceSPA Forces application to run in SPA mode [boolean] [default: false]\n --writeToDisk Write static files to disk, instead of serving it from memory [boolean] [default: false]\n --reactRefresh Enable/disable react fast refresh for React components [boolean] [default: true]\n --lazyServer Enable/disable lazy init of server app factory [boolean] [default: true]\n --port Dev server port (overrides ima.config.js settings) [number]\n --hostname Dev server hostname (overrides ima.config.js settings) [string]\n --publicUrl Dev server publicUrl (overrides ima.config.js settings) [string]\n")),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"Any of the above mentioned options can be combined together in all different combinations and all options have specified default value. This means that in normal cases you can run ",(0,o.kt)("inlineCode",{parentName:"p"},"npx ima dev")," without any additional arguments.")),(0,o.kt)("h2",{id:"build"},"Build"),(0,o.kt)("p",null,"Builds the application in production mode with all optimizations enabled (compression, minification, etc.). The ",(0,o.kt)("inlineCode",{parentName:"p"},"build")," command drops some options compared to the ",(0,o.kt)("inlineCode",{parentName:"p"},"dev")," command. While adding few build specific commands. ",(0,o.kt)("inlineCode",{parentName:"p"},"npx build --help")," produces:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"ima build\n\nBuild an application for production\n\nOptions:\n --version Show version number [boolean]\n --help Show help [boolean]\n --clean Clean build folder before building the application [boolean] [default: true]\n --clearCache Deletes node_modules/.cache directory to invalidate loaders cache [boolean]\n --verbose Use default webpack CLI output instead of custom one [boolean]\n --ignoreWarnings Webpack will no longer print warnings during compilation [boolean]\n --profile Turn on profiling support in production [boolean] [default: false]\n")),(0,o.kt)("h2",{id:"cli-options"},"CLI options"),(0,o.kt)("p",null,"Most of the following options are available for both ",(0,o.kt)("inlineCode",{parentName:"p"},"dev")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"build")," commands, however some may be exclusive to only one of them. You can always use the ",(0,o.kt)("inlineCode",{parentName:"p"},"--help")," argument to show all available options for each command."),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"When you run into any issues with the application build, you can always run the app with ",(0,o.kt)("inlineCode",{parentName:"p"},"npx ima dev --clearCache")," to make sure that all cache and tmp files are deleted before next build and see if this resolves your issues."),(0,o.kt)("p",{parentName:"admonition"},"Similarly you can use the ",(0,o.kt)("inlineCode",{parentName:"p"},"--verbose")," option to show more information during build that can aid you in ",(0,o.kt)("strong",{parentName:"p"},"debugging process")," in case anything happens.")),(0,o.kt)("h3",{id:"--version"},"--version"),(0,o.kt)("p",null,"Prints ",(0,o.kt)("inlineCode",{parentName:"p"},"@ima/cli")," version."),(0,o.kt)("h3",{id:"--help"},"--help"),(0,o.kt)("p",null,"Prints help dialog."),(0,o.kt)("h3",{id:"--clean"},"--clean"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,o.kt)("p",null,"Deletes ",(0,o.kt)("inlineCode",{parentName:"p"},"./build")," folder before running the application."),(0,o.kt)("h3",{id:"--clearcache"},"--clearCache"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"Clears ",(0,o.kt)("inlineCode",{parentName:"p"},"./node_modules/.cache")," folder. This is used to store webpack filesystem cache and other webpack loader and plugins cache."),(0,o.kt)("h3",{id:"--verbose"},"--verbose"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"Disables custom CLI logging style in favor of default webpack CLI verbose. This can be useful for debugging."),(0,o.kt)("h3",{id:"--inspect"},"--inspect"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"Disable/enable node ",(0,o.kt)("a",{parentName:"p",href:"https://nodejs.org/en/docs/guides/debugging-getting-started"},"inspector")," mode."),(0,o.kt)("h3",{id:"--ignorewarnings"},"--ignoreWarnings"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"Ignore reporting of webpack warning messages. The CLI automatically caches all existing warnings and shows just new warnings rebuilds in watch mode."),(0,o.kt)("h3",{id:"--open"},"--open"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,o.kt)("p",null,"Enable/disable auto opening of app URL in the browser window on startup."),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"If you find this option annoying, you can completely ",(0,o.kt)("strong",{parentName:"p"},"disable this feature across all IMA.js applications")," by putting ",(0,o.kt)("inlineCode",{parentName:"p"},"IMA_CLI_OPEN=false")," in your environment.")),(0,o.kt)("h3",{id:"--openurl"},"--openUrl"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,o.kt)("p",null,"Allows you to customize URL which is opened when the server starts in development mode."),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"You can also use ",(0,o.kt)("inlineCode",{parentName:"p"},"IMA_CLI_OPEN_URL='http://ima.dev:3001'")," env variable to set this option."),(0,o.kt)("p",{parentName:"admonition"},"This is usefull when you have project-specific URLs. You can then set this environment variable in application's ",(0,o.kt)("inlineCode",{parentName:"p"},"ima.config.js")," and don't have to worry about using ",(0,o.kt)("inlineCode",{parentName:"p"},"--openUrl")," CLI argument everytime you're starting the application in dev mode.")),(0,o.kt)("h3",{id:"--legacy"},"--legacy"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"By default the CLI only builds ",(0,o.kt)("inlineCode",{parentName:"p"},"es")," version of JS files in development mode. Use this option to enable ",(0,o.kt)("a",{parentName:"p",href:"./compiler-features#server-and-client-bundles"},"additional build of non es version"),"."),(0,o.kt)("h3",{id:"--forcelegacy"},"--forceLegacy"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"Enables ",(0,o.kt)("inlineCode",{parentName:"p"},"legacy")," mode and forces runner.js to load legacy code even if targeted browser supports the latest client es version."),(0,o.kt)("h3",{id:"--forcespa"},"--forceSPA"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"Forces the application to run in SPA mode."),(0,o.kt)("h3",{id:"--profile"},"--profile"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"Disables some optimizations to allow for better debugging while also trying to be as close to the production build as possible. Currently this option disables mangling of classes and functions, which produces more readable stack traces."),(0,o.kt)("h3",{id:"--writetodisk"},"--writeToDisk"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"By default the app ",(0,o.kt)("strong",{parentName:"p"},"client static files are served from memory")," in dev mode. Using this option you can force webpack to write these files and serve them from the disk."),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"This option can be useful in some cases where you need to take a look at the compile source code, where it's easier to browse these files locally, rather than on the static server.")),(0,o.kt)("h3",{id:"--reactrefresh"},"--reactRefresh"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,o.kt)("p",null,"Disable/enable ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/pmmmwh/react-refresh-webpack-plugin"},"react fast refresh")," for React components."),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"Disable this option if you are watching and editing ",(0,o.kt)("inlineCode",{parentName:"p"},"node_modules")," files, this may result in less performant but more stable HMR experience.")),(0,o.kt)("h3",{id:"--lazyserver"},"--lazyServer"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,o.kt)("p",null,"Disable/enable lazy init of server app factory."),(0,o.kt)("h2",{id:"dev-server-options"},"Dev server options"),(0,o.kt)("p",null,"Following options are used to customize the companion dev server location (only for ",(0,o.kt)("inlineCode",{parentName:"p"},"dev")," command). These can be useful if you have some special dev environment, where you have an issue with the default configuration."),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"If you provide ",(0,o.kt)("inlineCode",{parentName:"p"},"port")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"hostname"),", you don't need to define the ",(0,o.kt)("inlineCode",{parentName:"p"},"publicUrl"),", the CLI will create it automatically, unless the ",(0,o.kt)("inlineCode",{parentName:"p"},"publicUrl")," is completely different than the ",(0,o.kt)("inlineCode",{parentName:"p"},"hostname")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"port")," provided.")),(0,o.kt)("h3",{id:"--port"},"--port"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"number"))),(0,o.kt)("p",null,"Dev server port."),(0,o.kt)("h3",{id:"--hostname"},"--hostname"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"string"))),(0,o.kt)("p",null,"Dev server hostname, for example: ",(0,o.kt)("inlineCode",{parentName:"p"},"localhost"),", or ",(0,o.kt)("inlineCode",{parentName:"p"},"127.0.0.1"),"."),(0,o.kt)("h3",{id:"--publicurl"},"--publicUrl"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"string"))),(0,o.kt)("p",null,"Dev server public url, for example: ",(0,o.kt)("inlineCode",{parentName:"p"},"http://localhost:3101"),"."))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/23f47465.ce7fea0c.js b/assets/js/23f47465.ce7fea0c.js deleted file mode 100644 index 669dae21f5..0000000000 --- a/assets/js/23f47465.ce7fea0c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[9456],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>b});var a=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},u=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,l=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=p(n),m=o,b=c["".concat(s,".").concat(m)]||c[m]||d[m]||l;return n?a.createElement(b,r(r({ref:t},u),{},{components:n})):a.createElement(b,r({ref:t},u))}));function b(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var l=n.length,r=new Array(l);r[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[c]="string"==typeof e?e:o,r[1]=i;for(var p=2;p{n.d(t,{Z:()=>r});var a=n(7294),o=n(8944);const l={tabItem:"tabItem_Ymn6"};function r(e){let{children:t,hidden:n,className:r}=e;return a.createElement("div",{role:"tabpanel",className:(0,o.Z)(l.tabItem,r),hidden:n},t)}},6745:(e,t,n)=>{n.d(t,{Z:()=>w});var a=n(5773),o=n(7294),l=n(8944),r=n(2466),i=n(3620),s=n(1980),p=n(7392),u=n(12);function c(e){return function(e){return o.Children.map(e,(e=>{if(!e||(0,o.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:o}}=e;return{value:t,label:n,attributes:a,default:o}}))}function d(e){const{values:t,children:n}=e;return(0,o.useMemo)((()=>{const e=t??c(n);return function(e){const t=(0,p.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(l),(0,o.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function h(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[r,i]=(0,o.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[s,p]=b({queryString:n,groupId:a}),[c,h]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,u.Nk)(n);return[a,(0,o.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),k=(()=>{const e=s??c;return m({value:e,tabValues:l})?e:null})();(0,o.useLayoutEffect)((()=>{k&&i(k)}),[k]);return{selectedValue:r,selectValue:(0,o.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),p(e),h(e)}),[p,h,l]),tabValues:l}}var k=n(2389);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:p}=e;const u=[],{blockElementScrollPositionUntilNextRender:c}=(0,r.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=p[n].value;a!==i&&(c(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return o.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},p.map((e=>{let{value:t,label:n,attributes:r}=e;return o.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},r,{className:(0,l.Z)("tabs__item",f.tabItem,r?.className,{"tabs__item--active":i===t})}),n??t)})))}function g(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,o.cloneElement)(e,{className:"margin-top--md"}):null}return o.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,o.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function y(e){const t=h(e);return o.createElement("div",{className:(0,l.Z)("tabs-container",f.tabList)},o.createElement(v,(0,a.Z)({},e,t)),o.createElement(g,(0,a.Z)({},e,t)))}function w(e){const t=(0,k.Z)();return o.createElement(y,(0,a.Z)({key:String(t)},e))}},9340:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>b,frontMatter:()=>i,metadata:()=>p,toc:()=>c});var a=n(5773),o=(n(7294),n(3905)),l=n(6745),r=n(1683);const i={title:"Introduction to @ima/cli",description:"CLI > Introduction to @ima/cli"},s=void 0,p={unversionedId:"cli/cli",id:"cli/cli",title:"Introduction to @ima/cli",description:"CLI > Introduction to @ima/cli",source:"@site/../docs/cli/cli.md",sourceDirName:"cli",slug:"/cli/",permalink:"/cli/",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/cli/cli.md",tags:[],version:"current",lastUpdatedBy:"Filip Satek",lastUpdatedAt:1734590310,formattedLastUpdatedAt:"Dec 19, 2024",frontMatter:{title:"Introduction to @ima/cli",description:"CLI > Introduction to @ima/cli"},sidebar:"docs",previous:{title:"Dynamic imports",permalink:"/advanced-features/dynamic-imports"},next:{title:"Compiler features",permalink:"/cli/compiler-features"}},u={},c=[{value:"Development",id:"development",level:2},{value:"Build",id:"build",level:2},{value:"CLI options",id:"cli-options",level:2},{value:"--version",id:"--version",level:3},{value:"--help",id:"--help",level:3},{value:"--clean",id:"--clean",level:3},{value:"--clearCache",id:"--clearcache",level:3},{value:"--verbose",id:"--verbose",level:3},{value:"--inspect",id:"--inspect",level:3},{value:"--ignoreWarnings",id:"--ignorewarnings",level:3},{value:"--open",id:"--open",level:3},{value:"--openUrl",id:"--openurl",level:3},{value:"--legacy",id:"--legacy",level:3},{value:"--forceLegacy",id:"--forcelegacy",level:3},{value:"--forceSPA",id:"--forcespa",level:3},{value:"--profile",id:"--profile",level:3},{value:"--writeToDisk",id:"--writetodisk",level:3},{value:"--reactRefresh",id:"--reactrefresh",level:3},{value:"--lazyServer",id:"--lazyserver",level:3},{value:"Dev server options",id:"dev-server-options",level:2},{value:"--port",id:"--port",level:3},{value:"--hostname",id:"--hostname",level:3},{value:"--publicUrl",id:"--publicurl",level:3}],d={toc:c},m="wrapper";function b(e){let{components:t,...n}=e;return(0,o.kt)(m,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The ",(0,o.kt)("strong",{parentName:"p"},"IMA.js CLI")," allows you to build and watch your application for changes during development. These features are handle by the only two currently supported commands ",(0,o.kt)("inlineCode",{parentName:"p"},"build")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"dev"),"."),(0,o.kt)("p",null,"You can always list available commands by running:"),(0,o.kt)(l.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,o.kt)(r.Z,{value:"npm",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"npx ima --help\n"))),(0,o.kt)(r.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"npx ima --help\n"))),(0,o.kt)(r.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"npx ima --help\n")))),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},(0,o.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/npx"},"npx")," comes pre-installed with npm 5.2+ and higher.")),(0,o.kt)("p",null,"This should produce following output:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"Usage: ima \n\nCommands:\n ima build Build an application for production\n ima dev Run application in development watch mode\n\nOptions:\n --version Show version number [boolean]\n --help Show help [boolean]\n")),(0,o.kt)("h2",{id:"development"},"Development"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"npx ima dev")," command starts the application in the ",(0,o.kt)("strong",{parentName:"p"},"development")," mode with HMR, error-overlay, source maps and other debugging tools enabled."),(0,o.kt)("p",null,"By default the application starts on ",(0,o.kt)("a",{parentName:"p",href:"http://localhost:3001"},"http://localhost:3001")," with ",(0,o.kt)("a",{parentName:"p",href:"./advanced-features#dev-server"},"companion dev server")," running at ",(0,o.kt)("a",{parentName:"p",href:"http://localhost:3101"},"http://localhost:3101"),". These can be further customized through the app ",(0,o.kt)("strong",{parentName:"p"},"environment")," settings and CLI arguments."),(0,o.kt)("p",null,"You can also run ",(0,o.kt)("inlineCode",{parentName:"p"},"npx ima dev --help")," to list all available options that you can use:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"ima dev\n\nRun application in development watch mode\n\nOptions:\n --version Show version number [boolean]\n --help Show help [boolean]\n --clean Clean build folder before building the application [boolean] [default: true]\n --clearCache Deletes node_modules/.cache directory to invalidate loaders cache [boolean]\n --verbose Use default webpack CLI output instead of custom one [boolean]\n --inspect Enable Node inspector mode [boolean]\n --ignoreWarnings Webpack will no longer print warnings during compilation [boolean]\n --open Opens browser window after server has been started [boolean] [default: true]\n --openUrl Custom URL used when opening browser window [string]\n --legacy Runs application in legacy mode [boolean] [default: false]\n --forceLegacy Forces runner.js to execute legacy client code [boolean] [default: false]\n --forceSPA Forces application to run in SPA mode [boolean] [default: false]\n --writeToDisk Write static files to disk, instead of serving it from memory [boolean] [default: false]\n --reactRefresh Enable/disable react fast refresh for React components [boolean] [default: true]\n --lazyServer Enable/disable lazy init of server app factory [boolean] [default: true]\n --port Dev server port (overrides ima.config.js settings) [number]\n --hostname Dev server hostname (overrides ima.config.js settings) [string]\n --publicUrl Dev server publicUrl (overrides ima.config.js settings) [string]\n")),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"Any of the above mentioned options can be combined together in all different combinations and all options have specified default value. This means that in normal cases you can run ",(0,o.kt)("inlineCode",{parentName:"p"},"npx ima dev")," without any additional arguments.")),(0,o.kt)("h2",{id:"build"},"Build"),(0,o.kt)("p",null,"Builds the application in production mode with all optimizations enabled (compression, minification, etc.). The ",(0,o.kt)("inlineCode",{parentName:"p"},"build")," command drops some options compared to the ",(0,o.kt)("inlineCode",{parentName:"p"},"dev")," command. While adding few build specific commands. ",(0,o.kt)("inlineCode",{parentName:"p"},"npx build --help")," produces:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"ima build\n\nBuild an application for production\n\nOptions:\n --version Show version number [boolean]\n --help Show help [boolean]\n --clean Clean build folder before building the application [boolean] [default: true]\n --clearCache Deletes node_modules/.cache directory to invalidate loaders cache [boolean]\n --verbose Use default webpack CLI output instead of custom one [boolean]\n --ignoreWarnings Webpack will no longer print warnings during compilation [boolean]\n --profile Turn on profiling support in production [boolean] [default: false]\n")),(0,o.kt)("h2",{id:"cli-options"},"CLI options"),(0,o.kt)("p",null,"Most of the following options are available for both ",(0,o.kt)("inlineCode",{parentName:"p"},"dev")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"build")," commands, however some may be exclusive to only one of them. You can always use the ",(0,o.kt)("inlineCode",{parentName:"p"},"--help")," argument to show all available options for each command."),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"When you run into any issues with the application build, you can always run the app with ",(0,o.kt)("inlineCode",{parentName:"p"},"npx ima dev --clearCache")," to make sure that all cache and tmp files are deleted before next build and see if this resolves your issues."),(0,o.kt)("p",{parentName:"admonition"},"Similarly you can use the ",(0,o.kt)("inlineCode",{parentName:"p"},"--verbose")," option to show more information during build that can aid you in ",(0,o.kt)("strong",{parentName:"p"},"debugging process")," in case anything happens.")),(0,o.kt)("h3",{id:"--version"},"--version"),(0,o.kt)("p",null,"Prints ",(0,o.kt)("inlineCode",{parentName:"p"},"@ima/cli")," version."),(0,o.kt)("h3",{id:"--help"},"--help"),(0,o.kt)("p",null,"Prints help dialog."),(0,o.kt)("h3",{id:"--clean"},"--clean"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,o.kt)("p",null,"Deletes ",(0,o.kt)("inlineCode",{parentName:"p"},"./build")," folder before running the application."),(0,o.kt)("h3",{id:"--clearcache"},"--clearCache"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"Clears ",(0,o.kt)("inlineCode",{parentName:"p"},"./node_modules/.cache")," folder. This is used to store webpack filesystem cache and other webpack loader and plugins cache."),(0,o.kt)("h3",{id:"--verbose"},"--verbose"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"Disables custom CLI logging style in favor of default webpack CLI verbose. This can be useful for debugging."),(0,o.kt)("h3",{id:"--inspect"},"--inspect"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"Disable/enable node ",(0,o.kt)("a",{parentName:"p",href:"https://nodejs.org/en/docs/guides/debugging-getting-started"},"inspector")," mode."),(0,o.kt)("h3",{id:"--ignorewarnings"},"--ignoreWarnings"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"Ignore reporting of webpack warning messages. The CLI automatically caches all existing warnings and shows just new warnings rebuilds in watch mode."),(0,o.kt)("h3",{id:"--open"},"--open"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,o.kt)("p",null,"Enable/disable auto opening of app URL in the browser window on startup."),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"If you find this option annoying, you can completely ",(0,o.kt)("strong",{parentName:"p"},"disable this feature across all IMA.js applications")," by putting ",(0,o.kt)("inlineCode",{parentName:"p"},"IMA_CLI_OPEN=false")," in your environment.")),(0,o.kt)("h3",{id:"--openurl"},"--openUrl"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,o.kt)("p",null,"Allows you to customize URL which is opened when the server starts in development mode."),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"You can also use ",(0,o.kt)("inlineCode",{parentName:"p"},"IMA_CLI_OPEN_URL='http://ima.dev:3001'")," env variable to set this option."),(0,o.kt)("p",{parentName:"admonition"},"This is usefull when you have project-specific URLs. You can then set this environment variable in application's ",(0,o.kt)("inlineCode",{parentName:"p"},"ima.config.js")," and don't have to worry about using ",(0,o.kt)("inlineCode",{parentName:"p"},"--openUrl")," CLI argument everytime you're starting the application in dev mode.")),(0,o.kt)("h3",{id:"--legacy"},"--legacy"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"By default the CLI only builds ",(0,o.kt)("inlineCode",{parentName:"p"},"es")," version of JS files in development mode. Use this option to enable ",(0,o.kt)("a",{parentName:"p",href:"./compiler-features#server-and-client-bundles"},"additional build of non es version"),"."),(0,o.kt)("h3",{id:"--forcelegacy"},"--forceLegacy"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"Enables ",(0,o.kt)("inlineCode",{parentName:"p"},"legacy")," mode and forces runner.js to load legacy code even if targeted browser supports the latest client es version."),(0,o.kt)("h3",{id:"--forcespa"},"--forceSPA"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"Forces the application to run in SPA mode."),(0,o.kt)("h3",{id:"--profile"},"--profile"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"Disables some optimizations to allow for better debugging while also trying to be as close to the production build as possible. Currently this option disables mangling of classes and functions, which produces more readable stack traces."),(0,o.kt)("h3",{id:"--writetodisk"},"--writeToDisk"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = false"))),(0,o.kt)("p",null,"By default the app ",(0,o.kt)("strong",{parentName:"p"},"client static files are served from memory")," in dev mode. Using this option you can force webpack to write these files and serve them from the disk."),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"This option can be useful in some cases where you need to take a look at the compile source code, where it's easier to browse these files locally, rather than on the static server.")),(0,o.kt)("h3",{id:"--reactrefresh"},"--reactRefresh"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,o.kt)("p",null,"Disable/enable ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/pmmmwh/react-refresh-webpack-plugin"},"react fast refresh")," for React components."),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"Disable this option if you are watching and editing ",(0,o.kt)("inlineCode",{parentName:"p"},"node_modules")," files, this may result in less performant but more stable HMR experience.")),(0,o.kt)("h3",{id:"--lazyserver"},"--lazyServer"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,o.kt)("p",null,"Disable/enable lazy init of server app factory."),(0,o.kt)("h2",{id:"dev-server-options"},"Dev server options"),(0,o.kt)("p",null,"Following options are used to customize the companion dev server location (only for ",(0,o.kt)("inlineCode",{parentName:"p"},"dev")," command). These can be useful if you have some special dev environment, where you have an issue with the default configuration."),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"If you provide ",(0,o.kt)("inlineCode",{parentName:"p"},"port")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"hostname"),", you don't need to define the ",(0,o.kt)("inlineCode",{parentName:"p"},"publicUrl"),", the CLI will create it automatically, unless the ",(0,o.kt)("inlineCode",{parentName:"p"},"publicUrl")," is completely different than the ",(0,o.kt)("inlineCode",{parentName:"p"},"hostname")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"port")," provided.")),(0,o.kt)("h3",{id:"--port"},"--port"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"number"))),(0,o.kt)("p",null,"Dev server port."),(0,o.kt)("h3",{id:"--hostname"},"--hostname"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"string"))),(0,o.kt)("p",null,"Dev server hostname, for example: ",(0,o.kt)("inlineCode",{parentName:"p"},"localhost"),", or ",(0,o.kt)("inlineCode",{parentName:"p"},"127.0.0.1"),"."),(0,o.kt)("h3",{id:"--publicurl"},"--publicUrl"),(0,o.kt)("blockquote",null,(0,o.kt)("p",{parentName:"blockquote"},(0,o.kt)("inlineCode",{parentName:"p"},"string"))),(0,o.kt)("p",null,"Dev server public url, for example: ",(0,o.kt)("inlineCode",{parentName:"p"},"http://localhost:3101"),"."))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/25accc40.713a0f48.js b/assets/js/25accc40.713a0f48.js new file mode 100644 index 0000000000..c2465a7038 --- /dev/null +++ b/assets/js/25accc40.713a0f48.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[9562],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>N});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var d=n.createContext({}),o=function(e){var t=n.useContext(d),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},s=function(e){var t=o(e.components);return n.createElement(d.Provider,{value:t},e.children)},m="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,d=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),m=o(a),c=r,N=m["".concat(d,".").concat(c)]||m[c]||k[c]||i;return a?n.createElement(N,l(l({ref:t},s),{},{components:a})):n.createElement(N,l({ref:t},s))}));function N(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=c;var p={};for(var d in t)hasOwnProperty.call(t,d)&&(p[d]=t[d]);p.originalType=e,p[m]="string"==typeof e?e:r,l[1]=p;for(var o=2;o{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>k,frontMatter:()=>i,metadata:()=>p,toc:()=>o});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_core.ObjectContainer",title:"Class: ObjectContainer",sidebar_label:"@ima/core.ObjectContainer",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_core.ObjectContainer",id:"api/classes/ima_core.ObjectContainer",title:"Class: ObjectContainer",description:"@ima/core.ObjectContainer",source:"@site/../docs/api/classes/ima_core.ObjectContainer.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.ObjectContainer",permalink:"/api/classes/ima_core.ObjectContainer",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.ObjectContainer",title:"Class: ObjectContainer",sidebar_label:"@ima/core.ObjectContainer",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.Namespace",permalink:"/api/classes/ima_core.Namespace"},next:{title:"@ima/core.Observable",permalink:"/api/classes/ima_core.Observable"}},d={},o=[{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"_bindingPlugin",id:"_bindingplugin",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"_bindingState",id:"_bindingstate",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"_entries",id:"_entries",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"_namespace",id:"_namespace",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"Methods",id:"methods",level:2},{value:"#getDebugName",id:"getdebugname",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"_createEntry",id:"_createentry",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"_createInstanceFromEntry",id:"_createinstancefromentry",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"_getEntry",id:"_getentry",level:3},{value:"Type parameters",id:"type-parameters-2",level:4},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"_getEntryFromClassConstructor",id:"_getentryfromclassconstructor",level:3},{value:"Type parameters",id:"type-parameters-3",level:4},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"_getEntryFromConstant",id:"_getentryfromconstant",level:3},{value:"Type parameters",id:"type-parameters-4",level:4},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"_getEntryFromNamespace",id:"_getentryfromnamespace",level:3},{value:"Type parameters",id:"type-parameters-5",level:4},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"_isOptional",id:"_isoptional",level:3},{value:"Type parameters",id:"type-parameters-6",level:4},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-7",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"_isSpread",id:"_isspread",level:3},{value:"Type parameters",id:"type-parameters-7",level:4},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-8",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"_updateEntryValues",id:"_updateentryvalues",level:3},{value:"Type parameters",id:"type-parameters-8",level:4},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-9",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"bind",id:"bind",level:3},{value:"Type parameters",id:"type-parameters-9",level:4},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-10",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"clear",id:"clear",level:3},{value:"Returns",id:"returns-11",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"constant",id:"constant",level:3},{value:"Type parameters",id:"type-parameters-10",level:4},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-12",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"create",id:"create",level:3},{value:"Type parameters",id:"type-parameters-11",level:4},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-13",level:4},{value:"Defined in",id:"defined-in-18",level:4},{value:"get",id:"get",level:3},{value:"Type parameters",id:"type-parameters-12",level:4},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-14",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"getConstructorOf",id:"getconstructorof",level:3},{value:"Type parameters",id:"type-parameters-13",level:4},{value:"Parameters",id:"parameters-15",level:4},{value:"Returns",id:"returns-15",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"has",id:"has",level:3},{value:"Type parameters",id:"type-parameters-14",level:4},{value:"Parameters",id:"parameters-16",level:4},{value:"Returns",id:"returns-16",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"inject",id:"inject",level:3},{value:"Type parameters",id:"type-parameters-15",level:4},{value:"Parameters",id:"parameters-17",level:4},{value:"Returns",id:"returns-17",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"provide",id:"provide",level:3},{value:"Type parameters",id:"type-parameters-16",level:4},{value:"Parameters",id:"parameters-18",level:4},{value:"Returns",id:"returns-18",level:4},{value:"Defined in",id:"defined-in-23",level:4},{value:"setBindingState",id:"setbindingstate",level:3},{value:"Parameters",id:"parameters-19",level:4},{value:"Returns",id:"returns-19",level:4},{value:"Defined in",id:"defined-in-24",level:4}],s={toc:o},m="wrapper";function k(e){let{components:t,...a}=e;return(0,r.kt)(m,(0,n.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".ObjectContainer"),(0,r.kt)("p",null,"The Object Container is an enhanced dependency injector with support for\naliases and constants, and allowing to reference classes in the application\nnamespace by specifying their fully qualified names."),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new ObjectContainer"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"namespace"),")"),(0,r.kt)("p",null,"Initializes the object container."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"namespace")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The namespace container, used to access classes and values using their fully qualified names.")))),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L90"},"packages/core/src/oc/ObjectContainer.ts:90")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"_bindingplugin"},"_","bindingPlugin"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"_","bindingPlugin"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"The current plugin binding to OC."),(0,r.kt)("p",null,"The ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"()")," method may be called for changing\nobject container binding state only by the bootstrap script."),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L75"},"packages/core/src/oc/ObjectContainer.ts:75")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_bindingstate"},"_","bindingState"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"_","bindingState"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/enums/ima_core.BindingState"},(0,r.kt)("inlineCode",{parentName:"a"},"BindingState"))),(0,r.kt)("p",null,"The current binding state."),(0,r.kt)("p",null,"The ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"()")," method may be called for changing\nobject container binding state only by the bootstrap script."),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L67"},"packages/core/src/oc/ObjectContainer.ts:67")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_entries"},"_","entries"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","entries"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Map"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",", ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L76"},"packages/core/src/oc/ObjectContainer.ts:76")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_namespace"},"_","namespace"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","namespace"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace"))),(0,r.kt)("p",null,"The namespace container, used to access classes and values using\ntheir fully qualified names."),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L82"},"packages/core/src/oc/ObjectContainer.ts:82")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"getdebugname"},"#getDebugName"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#getDebugName"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Formats name, function, class constructor to more compact\nname/message to allow for cleaner debug Error messages."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L874"},"packages/core/src/oc/ObjectContainer.ts:874")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_createentry"},"_","createEntry"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_createEntry"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"classConstructor"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies?"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Creates a new entry for the provided class or factory function, the\nprovided dependencies and entry options."),(0,r.kt)("h4",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"classConstructor")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"EntryConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The class constructor or factory function.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dependencies?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The dependencies to pass into the constructor or factory function.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#entryoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"EntryOptions"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"-")))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Created instance or generated value."),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L647"},"packages/core/src/oc/ObjectContainer.ts:647")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_createinstancefromentry"},"_","createInstanceFromEntry"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_createInstanceFromEntry"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"entry"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"T")),(0,r.kt)("p",null,"Creates a new instance of the class or retrieves the value generated by\nthe factory function represented by the provided entry, passing in the\nprovided dependencies."),(0,r.kt)("p",null,"The method uses the dependencies specified by the entry if no custom\ndependencies are provided."),(0,r.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">")))),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Default value"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"entry")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"undefined")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The entry representing the class that should have its instance created or factory faction to use to create a value.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dependencies")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"[]")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The dependencies to pass into the constructor or factory function.")))),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"T")),(0,r.kt)("p",null,"Created instance or generated value."),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L686"},"packages/core/src/oc/ObjectContainer.ts:686")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getentry"},"_","getEntry"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_getEntry"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Retrieves the entry for the specified constant, alias, class or factory\nfunction, interface, or fully qualified namespace path (the method\nchecks these in this order in case of a name clash)."),(0,r.kt)("p",null,"The method retrieves an existing entry even if a qualified namespace\npath is provided (if the target class or interface has been configured\nin this object container)."),(0,r.kt)("p",null,"The method throws an ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Error"},"Error")," if no such constant, alias,\nregistry, interface implementation is known to this object container and\nthe provided identifier is not a valid namespace path specifying an\nexisting class, interface or value."),(0,r.kt)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"Name of a constant or alias, factory function, class or interface constructor, or a fully qualified namespace path.")))),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"The retrieved entry."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Throws"))),(0,r.kt)("p",null,"If no such constant, alias, registry, interface\nimplementation is known to this object container."),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L535"},"packages/core/src/oc/ObjectContainer.ts:535")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getentryfromclassconstructor"},"_","getEntryFromClassConstructor"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_getEntryFromClassConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"classConstructor"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Retrieves the class denoted by the provided class constructor."),(0,r.kt)("p",null,"The method then checks whether there are defined ",(0,r.kt)("inlineCode",{parentName:"p"},"$dependencies"),"\nproperty for class. Then the class is registered to this object\ncontainer."),(0,r.kt)("p",null,"The method returns the entry for the class if the specified class\ndoes not have defined ",(0,r.kt)("inlineCode",{parentName:"p"},"$dependencies")," property return\n",(0,r.kt)("inlineCode",{parentName:"p"},"null"),"."),(0,r.kt)("h4",{id:"type-parameters-3"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"classConstructor")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinjectable"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInjectable")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">")))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"An entry representing the value at the specified\nclassConstructor. The method returns ",(0,r.kt)("inlineCode",{parentName:"p"},"null"),"\nif the specified classConstructor does not have defined\n",(0,r.kt)("inlineCode",{parentName:"p"},"$dependencies"),"."),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L841"},"packages/core/src/oc/ObjectContainer.ts:841")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getentryfromconstant"},"_","getEntryFromConstant"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_getEntryFromConstant"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"compositionName"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<() => ",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Retrieves the constant value denoted by the provided fully qualified\ncomposition name."),(0,r.kt)("p",null,"The method returns the entry for the constant if the constant is registered\nwith this object container, otherwise return ",(0,r.kt)("inlineCode",{parentName:"p"},"null"),"."),(0,r.kt)("p",null,"Finally, if the constant composition name does not resolve to value,\nthe method return ",(0,r.kt)("inlineCode",{parentName:"p"},"null"),"."),(0,r.kt)("h4",{id:"type-parameters-4"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"compositionName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<() => ",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"An entry representing the value at the specified\ncomposition name in the constants. The method returns ",(0,r.kt)("inlineCode",{parentName:"p"},"null"),"\nif the specified composition name does not exist in the constants."),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L747"},"packages/core/src/oc/ObjectContainer.ts:747")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getentryfromnamespace"},"_","getEntryFromNamespace"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_getEntryFromNamespace"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"path"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Retrieves the class denoted by the provided fully qualified name within\nthe application namespace."),(0,r.kt)("p",null,'The method then checks whether there are dependencies configured for the\nclass, no matter whether the class is an implementation class or an\n"interface" class.'),(0,r.kt)("p",null,"The method returns the entry for the class if the class is registered\nwith this object container, otherwise an unregistered entry is created\nand returned."),(0,r.kt)("p",null,"Finally, if the namespace path does not resolve to a class, the method\nreturn an unregistered entry resolved to the value denoted by the\nnamespace path."),(0,r.kt)("p",null,"Alternatively, if a constructor function is passed in instead of a\nnamespace path, the method returns ",(0,r.kt)("inlineCode",{parentName:"p"},"null"),"."),(0,r.kt)("h4",{id:"type-parameters-5"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"path")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Namespace path pointing to a class or a value in the application namespace, or a constructor function.")))),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"An entry representing the value or class at the\nspecified path in the namespace. The method returns ",(0,r.kt)("inlineCode",{parentName:"p"},"null"),"\nif the specified path does not exist in the namespace."),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L803"},"packages/core/src/oc/ObjectContainer.ts:803")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_isoptional"},"_","isOptional"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_isOptional"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Checks whether the name is marked as optional."),(0,r.kt)("h4",{id:"type-parameters-6"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"Name of a constant or alias, factory function, class or interface constructor, or a fully qualified namespace path.")))),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L593"},"packages/core/src/oc/ObjectContainer.ts:593")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_isspread"},"_","isSpread"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_isSpread"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Checks whether the name is marked as spread."),(0,r.kt)("h4",{id:"type-parameters-7"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"Name of a constant or alias, factory function, class or interface constructor, or a fully qualified namespace path.")))),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L607"},"packages/core/src/oc/ObjectContainer.ts:607")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_updateentryvalues"},"_","updateEntryValues"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_updateEntryValues"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"entry"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"classConstructor"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"The method update classConstructor and dependencies for defined entry.\nThe entry throw Error for constants and if you try override dependencies\nmore than once."),(0,r.kt)("h4",{id:"type-parameters-8"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">")))),(0,r.kt)("h4",{id:"parameters-10"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"entry")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The entry representing the class that should have its instance created or factory faction to use to create a value.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"classConstructor")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinjectable"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInjectable")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The class constructor or factory function.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dependencies")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The dependencies to pass into the constructor or factory function.")))),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L626"},"packages/core/src/oc/ObjectContainer.ts:626")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"bind"},"bind"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"bind"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"C"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"classConstructor"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"Binds the specified class or factory function and dependencies to the\nspecified alias. Binding a class or factory function to an alias allows\nthe class or function to be specified as a dependency by specifying the\nalias and creating new instances by referring to the class or function\nby the alias."),(0,r.kt)("p",null,"Also note that the same class or function may be bound to several\naliases and each may use different dependencies."),(0,r.kt)("p",null,"The alias will use the default dependencies bound for the class if no\ndependencies are provided."),(0,r.kt)("h4",{id:"type-parameters-9"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"C")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"C"))))),(0,r.kt)("h4",{id:"parameters-11"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Alias name.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"classConstructor")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinjectable"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInjectable")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"C"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The class constructor or a factory function.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dependencies?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The dependencies to pass into the constructor or factory function.")))),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"This object container."),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L114"},"packages/core/src/oc/ObjectContainer.ts:114")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"clear"},"clear"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"clear"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"Clears all entries from this object container and resets the locking\nmechanism of this object container."),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"This object container."),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L485"},"packages/core/src/oc/ObjectContainer.ts:485")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"constant"},"constant"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"constant"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"V"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"value"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"Defines a new constant registered with this object container. Note that\nthis is the only way of passing ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," values to constructors\nbecause the object container treats strings as class, interface, alias\nor constant names."),(0,r.kt)("h4",{id:"type-parameters-10"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"V")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"V"))))),(0,r.kt)("h4",{id:"parameters-12"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The constant name.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"V")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The constant value.")))),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"This object container."),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L200"},"packages/core/src/oc/ObjectContainer.ts:200")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"create"},"create"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"create"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#ocinstance"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInstance")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Creates a new instance of the class or retrieves the value generated by\nthe factory function identified by the provided name, class, interface,\nor factory function, passing in the provided dependencies."),(0,r.kt)("p",null,"The method uses the dependencies specified when the class, interface or\nfactory function has been registered with the object container if no\ncustom dependencies are provided."),(0,r.kt)("h4",{id:"type-parameters-11"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinstanceconstrain"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInstanceConstrain")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")))),(0,r.kt)("h4",{id:"parameters-13"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Default value"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"undefined")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the alias, class, interface, or the class, interface or a factory function to use.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dependencies")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"[]")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The dependencies to pass into the constructor or factory function.")))),(0,r.kt)("h4",{id:"returns-13"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#ocinstance"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInstance")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Created instance or generated value."),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L463"},"packages/core/src/oc/ObjectContainer.ts:463")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"get"},"get"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"get"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#ocinstance"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInstance")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Retrieves the shared instance or value of the specified constant, alias,\nclass or factory function, interface, or fully qualified namespace path\n(the method checks these in this order in case of a name clash)."),(0,r.kt)("p",null,"The instance or value is created lazily the first time it is requested."),(0,r.kt)("h4",{id:"type-parameters-12"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinstanceconstrain"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInstanceConstrain")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")))),(0,r.kt)("h4",{id:"parameters-14"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the alias, class, interface, or the class, interface or a factory function.")))),(0,r.kt)("h4",{id:"returns-14"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#ocinstance"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInstance")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"The shared instance or value."),(0,r.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L400"},"packages/core/src/oc/ObjectContainer.ts:400")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getconstructorof"},"getConstructorOf"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getConstructorOf"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Returns the class constructor function of the specified class."),(0,r.kt)("h4",{id:"type-parameters-13"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")))),(0,r.kt)("h4",{id:"parameters-15"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name by which the class is registered with this object container.")))),(0,r.kt)("h4",{id:"returns-15"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"The constructor function."),(0,r.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L418"},"packages/core/src/oc/ObjectContainer.ts:418")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"has"},"has"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"has"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Returns ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the specified object, class or resource is\nregistered with this object container."),(0,r.kt)("h4",{id:"type-parameters-14"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-16"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},"keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap"))," ","|"," ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinjectable"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInjectable")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The resource name.")))),(0,r.kt)("h4",{id:"returns-16"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the specified object, class or\nresource is registered with this object container."),(0,r.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L438"},"packages/core/src/oc/ObjectContainer.ts:438")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"inject"},"inject"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"inject"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"classConstructor"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"Configures the object loader with the specified default dependencies for\nthe specified class."),(0,r.kt)("p",null,"New instances of the class created by this object container will receive\nthe provided dependencies into constructor unless custom dependencies\nare provided."),(0,r.kt)("h4",{id:"type-parameters-15"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-17"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"classConstructor")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The class constructor.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dependencies")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The dependencies to pass into the constructor function.")))),(0,r.kt)("h4",{id:"returns-17"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"This object container."),(0,r.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L244"},"packages/core/src/oc/ObjectContainer.ts:244")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"provide"},"provide"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"provide"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"I"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"interfaceConstructor"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"implementationConstructor"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"Configures the default implementation of the specified interface to use\nwhen an implementation provider of the specified interface is requested\nfrom this object container."),(0,r.kt)("p",null,"The implementation constructor will obtain the provided default\ndependencies or the dependencies provided to the ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"()"),"\nmethod."),(0,r.kt)("h4",{id:"type-parameters-16"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"I"))))),(0,r.kt)("h4",{id:"parameters-18"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"interfaceConstructor")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"I"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"I"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The constructor of the interface representing the service.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"implementationConstructor")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The constructor of the class implementing the service interface.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dependencies?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The dependencies to pass into the constructor function.")))),(0,r.kt)("h4",{id:"returns-18"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"This object container."),(0,r.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L319"},"packages/core/src/oc/ObjectContainer.ts:319")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setbindingstate"},"setBindingState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setBindingState"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"bindingState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"bindingPluginName?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-19"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"bindingState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/enums/ima_core.BindingState"},(0,r.kt)("inlineCode",{parentName:"a"},"BindingState")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"bindingPluginName?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"returns-19"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/oc/ObjectContainer.ts#L493"},"packages/core/src/oc/ObjectContainer.ts:493")))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/25accc40.8b4714d2.js b/assets/js/25accc40.8b4714d2.js deleted file mode 100644 index 9d4dd67ced..0000000000 --- a/assets/js/25accc40.8b4714d2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[9562],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>N});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var d=n.createContext({}),o=function(e){var t=n.useContext(d),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},s=function(e){var t=o(e.components);return n.createElement(d.Provider,{value:t},e.children)},m="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,d=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),m=o(a),c=r,N=m["".concat(d,".").concat(c)]||m[c]||k[c]||i;return a?n.createElement(N,l(l({ref:t},s),{},{components:a})):n.createElement(N,l({ref:t},s))}));function N(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=c;var p={};for(var d in t)hasOwnProperty.call(t,d)&&(p[d]=t[d]);p.originalType=e,p[m]="string"==typeof e?e:r,l[1]=p;for(var o=2;o{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>k,frontMatter:()=>i,metadata:()=>p,toc:()=>o});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_core.ObjectContainer",title:"Class: ObjectContainer",sidebar_label:"@ima/core.ObjectContainer",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_core.ObjectContainer",id:"api/classes/ima_core.ObjectContainer",title:"Class: ObjectContainer",description:"@ima/core.ObjectContainer",source:"@site/../docs/api/classes/ima_core.ObjectContainer.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.ObjectContainer",permalink:"/api/classes/ima_core.ObjectContainer",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.ObjectContainer",title:"Class: ObjectContainer",sidebar_label:"@ima/core.ObjectContainer",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.Namespace",permalink:"/api/classes/ima_core.Namespace"},next:{title:"@ima/core.PageFactory",permalink:"/api/classes/ima_core.PageFactory"}},d={},o=[{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"_bindingPlugin",id:"_bindingplugin",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"_bindingState",id:"_bindingstate",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"_entries",id:"_entries",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"_namespace",id:"_namespace",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"Methods",id:"methods",level:2},{value:"#getDebugName",id:"getdebugname",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"_createEntry",id:"_createentry",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"_createInstanceFromEntry",id:"_createinstancefromentry",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"_getEntry",id:"_getentry",level:3},{value:"Type parameters",id:"type-parameters-2",level:4},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"_getEntryFromClassConstructor",id:"_getentryfromclassconstructor",level:3},{value:"Type parameters",id:"type-parameters-3",level:4},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"_getEntryFromConstant",id:"_getentryfromconstant",level:3},{value:"Type parameters",id:"type-parameters-4",level:4},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"_getEntryFromNamespace",id:"_getentryfromnamespace",level:3},{value:"Type parameters",id:"type-parameters-5",level:4},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"_isOptional",id:"_isoptional",level:3},{value:"Type parameters",id:"type-parameters-6",level:4},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-7",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"_isSpread",id:"_isspread",level:3},{value:"Type parameters",id:"type-parameters-7",level:4},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-8",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"_updateEntryValues",id:"_updateentryvalues",level:3},{value:"Type parameters",id:"type-parameters-8",level:4},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-9",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"bind",id:"bind",level:3},{value:"Type parameters",id:"type-parameters-9",level:4},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-10",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"clear",id:"clear",level:3},{value:"Returns",id:"returns-11",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"constant",id:"constant",level:3},{value:"Type parameters",id:"type-parameters-10",level:4},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-12",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"create",id:"create",level:3},{value:"Type parameters",id:"type-parameters-11",level:4},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-13",level:4},{value:"Defined in",id:"defined-in-18",level:4},{value:"get",id:"get",level:3},{value:"Type parameters",id:"type-parameters-12",level:4},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-14",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"getConstructorOf",id:"getconstructorof",level:3},{value:"Type parameters",id:"type-parameters-13",level:4},{value:"Parameters",id:"parameters-15",level:4},{value:"Returns",id:"returns-15",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"has",id:"has",level:3},{value:"Type parameters",id:"type-parameters-14",level:4},{value:"Parameters",id:"parameters-16",level:4},{value:"Returns",id:"returns-16",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"inject",id:"inject",level:3},{value:"Type parameters",id:"type-parameters-15",level:4},{value:"Parameters",id:"parameters-17",level:4},{value:"Returns",id:"returns-17",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"provide",id:"provide",level:3},{value:"Type parameters",id:"type-parameters-16",level:4},{value:"Parameters",id:"parameters-18",level:4},{value:"Returns",id:"returns-18",level:4},{value:"Defined in",id:"defined-in-23",level:4},{value:"setBindingState",id:"setbindingstate",level:3},{value:"Parameters",id:"parameters-19",level:4},{value:"Returns",id:"returns-19",level:4},{value:"Defined in",id:"defined-in-24",level:4}],s={toc:o},m="wrapper";function k(e){let{components:t,...a}=e;return(0,r.kt)(m,(0,n.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".ObjectContainer"),(0,r.kt)("p",null,"The Object Container is an enhanced dependency injector with support for\naliases and constants, and allowing to reference classes in the application\nnamespace by specifying their fully qualified names."),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new ObjectContainer"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"namespace"),")"),(0,r.kt)("p",null,"Initializes the object container."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"namespace")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The namespace container, used to access classes and values using their fully qualified names.")))),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L90"},"packages/core/src/oc/ObjectContainer.ts:90")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"_bindingplugin"},"_","bindingPlugin"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"_","bindingPlugin"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"The current plugin binding to OC."),(0,r.kt)("p",null,"The ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"()")," method may be called for changing\nobject container binding state only by the bootstrap script."),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L75"},"packages/core/src/oc/ObjectContainer.ts:75")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_bindingstate"},"_","bindingState"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"_","bindingState"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/enums/ima_core.BindingState"},(0,r.kt)("inlineCode",{parentName:"a"},"BindingState"))),(0,r.kt)("p",null,"The current binding state."),(0,r.kt)("p",null,"The ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"()")," method may be called for changing\nobject container binding state only by the bootstrap script."),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L67"},"packages/core/src/oc/ObjectContainer.ts:67")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_entries"},"_","entries"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","entries"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Map"),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",", ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",">"),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L76"},"packages/core/src/oc/ObjectContainer.ts:76")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_namespace"},"_","namespace"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","namespace"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Namespace"},(0,r.kt)("inlineCode",{parentName:"a"},"Namespace"))),(0,r.kt)("p",null,"The namespace container, used to access classes and values using\ntheir fully qualified names."),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L82"},"packages/core/src/oc/ObjectContainer.ts:82")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"getdebugname"},"#getDebugName"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#getDebugName"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Formats name, function, class constructor to more compact\nname/message to allow for cleaner debug Error messages."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L874"},"packages/core/src/oc/ObjectContainer.ts:874")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_createentry"},"_","createEntry"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_createEntry"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"classConstructor"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies?"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Creates a new entry for the provided class or factory function, the\nprovided dependencies and entry options."),(0,r.kt)("h4",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"classConstructor")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"EntryConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The class constructor or factory function.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dependencies?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The dependencies to pass into the constructor or factory function.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#entryoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"EntryOptions"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"-")))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Created instance or generated value."),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L647"},"packages/core/src/oc/ObjectContainer.ts:647")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_createinstancefromentry"},"_","createInstanceFromEntry"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_createInstanceFromEntry"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"entry"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"T")),(0,r.kt)("p",null,"Creates a new instance of the class or retrieves the value generated by\nthe factory function represented by the provided entry, passing in the\nprovided dependencies."),(0,r.kt)("p",null,"The method uses the dependencies specified by the entry if no custom\ndependencies are provided."),(0,r.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">")))),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Default value"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"entry")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"undefined")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The entry representing the class that should have its instance created or factory faction to use to create a value.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dependencies")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"[]")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The dependencies to pass into the constructor or factory function.")))),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"T")),(0,r.kt)("p",null,"Created instance or generated value."),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L686"},"packages/core/src/oc/ObjectContainer.ts:686")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getentry"},"_","getEntry"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_getEntry"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Retrieves the entry for the specified constant, alias, class or factory\nfunction, interface, or fully qualified namespace path (the method\nchecks these in this order in case of a name clash)."),(0,r.kt)("p",null,"The method retrieves an existing entry even if a qualified namespace\npath is provided (if the target class or interface has been configured\nin this object container)."),(0,r.kt)("p",null,"The method throws an ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Error"},"Error")," if no such constant, alias,\nregistry, interface implementation is known to this object container and\nthe provided identifier is not a valid namespace path specifying an\nexisting class, interface or value."),(0,r.kt)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"Name of a constant or alias, factory function, class or interface constructor, or a fully qualified namespace path.")))),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"The retrieved entry."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Throws"))),(0,r.kt)("p",null,"If no such constant, alias, registry, interface\nimplementation is known to this object container."),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L535"},"packages/core/src/oc/ObjectContainer.ts:535")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getentryfromclassconstructor"},"_","getEntryFromClassConstructor"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_getEntryFromClassConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"classConstructor"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Retrieves the class denoted by the provided class constructor."),(0,r.kt)("p",null,"The method then checks whether there are defined ",(0,r.kt)("inlineCode",{parentName:"p"},"$dependencies"),"\nproperty for class. Then the class is registered to this object\ncontainer."),(0,r.kt)("p",null,"The method returns the entry for the class if the specified class\ndoes not have defined ",(0,r.kt)("inlineCode",{parentName:"p"},"$dependencies")," property return\n",(0,r.kt)("inlineCode",{parentName:"p"},"null"),"."),(0,r.kt)("h4",{id:"type-parameters-3"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"classConstructor")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinjectable"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInjectable")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">")))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"An entry representing the value at the specified\nclassConstructor. The method returns ",(0,r.kt)("inlineCode",{parentName:"p"},"null"),"\nif the specified classConstructor does not have defined\n",(0,r.kt)("inlineCode",{parentName:"p"},"$dependencies"),"."),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L841"},"packages/core/src/oc/ObjectContainer.ts:841")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getentryfromconstant"},"_","getEntryFromConstant"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_getEntryFromConstant"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"compositionName"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<() => ",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Retrieves the constant value denoted by the provided fully qualified\ncomposition name."),(0,r.kt)("p",null,"The method returns the entry for the constant if the constant is registered\nwith this object container, otherwise return ",(0,r.kt)("inlineCode",{parentName:"p"},"null"),"."),(0,r.kt)("p",null,"Finally, if the constant composition name does not resolve to value,\nthe method return ",(0,r.kt)("inlineCode",{parentName:"p"},"null"),"."),(0,r.kt)("h4",{id:"type-parameters-4"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"compositionName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<() => ",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"An entry representing the value at the specified\ncomposition name in the constants. The method returns ",(0,r.kt)("inlineCode",{parentName:"p"},"null"),"\nif the specified composition name does not exist in the constants."),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L747"},"packages/core/src/oc/ObjectContainer.ts:747")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_getentryfromnamespace"},"_","getEntryFromNamespace"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_getEntryFromNamespace"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"path"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Retrieves the class denoted by the provided fully qualified name within\nthe application namespace."),(0,r.kt)("p",null,'The method then checks whether there are dependencies configured for the\nclass, no matter whether the class is an implementation class or an\n"interface" class.'),(0,r.kt)("p",null,"The method returns the entry for the class if the class is registered\nwith this object container, otherwise an unregistered entry is created\nand returned."),(0,r.kt)("p",null,"Finally, if the namespace path does not resolve to a class, the method\nreturn an unregistered entry resolved to the value denoted by the\nnamespace path."),(0,r.kt)("p",null,"Alternatively, if a constructor function is passed in instead of a\nnamespace path, the method returns ",(0,r.kt)("inlineCode",{parentName:"p"},"null"),"."),(0,r.kt)("h4",{id:"type-parameters-5"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"path")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Namespace path pointing to a class or a value in the application namespace, or a constructor function.")))),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"An entry representing the value or class at the\nspecified path in the namespace. The method returns ",(0,r.kt)("inlineCode",{parentName:"p"},"null"),"\nif the specified path does not exist in the namespace."),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L803"},"packages/core/src/oc/ObjectContainer.ts:803")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_isoptional"},"_","isOptional"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_isOptional"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Checks whether the name is marked as optional."),(0,r.kt)("h4",{id:"type-parameters-6"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"Name of a constant or alias, factory function, class or interface constructor, or a fully qualified namespace path.")))),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L593"},"packages/core/src/oc/ObjectContainer.ts:593")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_isspread"},"_","isSpread"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_isSpread"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Checks whether the name is marked as spread."),(0,r.kt)("h4",{id:"type-parameters-7"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dependency"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependency")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"Name of a constant or alias, factory function, class or interface constructor, or a fully qualified namespace path.")))),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L607"},"packages/core/src/oc/ObjectContainer.ts:607")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_updateentryvalues"},"_","updateEntryValues"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_updateEntryValues"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"entry"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"classConstructor"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"The method update classConstructor and dependencies for defined entry.\nThe entry throw Error for constants and if you try override dependencies\nmore than once."),(0,r.kt)("h4",{id:"type-parameters-8"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Entry"},(0,r.kt)("inlineCode",{parentName:"a"},"Entry")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">")))),(0,r.kt)("h4",{id:"parameters-10"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"entry")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The entry representing the class that should have its instance created or factory faction to use to create a value.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"classConstructor")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinjectable"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInjectable")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The class constructor or factory function.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dependencies")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The dependencies to pass into the constructor or factory function.")))),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L626"},"packages/core/src/oc/ObjectContainer.ts:626")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"bind"},"bind"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"bind"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"C"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"classConstructor"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"Binds the specified class or factory function and dependencies to the\nspecified alias. Binding a class or factory function to an alias allows\nthe class or function to be specified as a dependency by specifying the\nalias and creating new instances by referring to the class or function\nby the alias."),(0,r.kt)("p",null,"Also note that the same class or function may be bound to several\naliases and each may use different dependencies."),(0,r.kt)("p",null,"The alias will use the default dependencies bound for the class if no\ndependencies are provided."),(0,r.kt)("h4",{id:"type-parameters-9"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"C")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"C"))))),(0,r.kt)("h4",{id:"parameters-11"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Alias name.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"classConstructor")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinjectable"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInjectable")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"C"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The class constructor or a factory function.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dependencies?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The dependencies to pass into the constructor or factory function.")))),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"This object container."),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L114"},"packages/core/src/oc/ObjectContainer.ts:114")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"clear"},"clear"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"clear"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"Clears all entries from this object container and resets the locking\nmechanism of this object container."),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"This object container."),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L485"},"packages/core/src/oc/ObjectContainer.ts:485")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"constant"},"constant"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"constant"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"V"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"value"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"Defines a new constant registered with this object container. Note that\nthis is the only way of passing ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," values to constructors\nbecause the object container treats strings as class, interface, alias\nor constant names."),(0,r.kt)("h4",{id:"type-parameters-10"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"V")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"V"))))),(0,r.kt)("h4",{id:"parameters-12"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The constant name.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"V")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The constant value.")))),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"This object container."),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L200"},"packages/core/src/oc/ObjectContainer.ts:200")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"create"},"create"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"create"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#ocinstance"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInstance")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Creates a new instance of the class or retrieves the value generated by\nthe factory function identified by the provided name, class, interface,\nor factory function, passing in the provided dependencies."),(0,r.kt)("p",null,"The method uses the dependencies specified when the class, interface or\nfactory function has been registered with the object container if no\ncustom dependencies are provided."),(0,r.kt)("h4",{id:"type-parameters-11"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinstanceconstrain"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInstanceConstrain")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")))),(0,r.kt)("h4",{id:"parameters-13"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Default value"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"undefined")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the alias, class, interface, or the class, interface or a factory function to use.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dependencies")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"[]")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The dependencies to pass into the constructor or factory function.")))),(0,r.kt)("h4",{id:"returns-13"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#ocinstance"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInstance")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Created instance or generated value."),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L463"},"packages/core/src/oc/ObjectContainer.ts:463")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"get"},"get"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"get"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#ocinstance"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInstance")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Retrieves the shared instance or value of the specified constant, alias,\nclass or factory function, interface, or fully qualified namespace path\n(the method checks these in this order in case of a name clash)."),(0,r.kt)("p",null,"The instance or value is created lazily the first time it is requested."),(0,r.kt)("h4",{id:"type-parameters-12"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinstanceconstrain"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInstanceConstrain")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")))),(0,r.kt)("h4",{id:"parameters-14"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the alias, class, interface, or the class, interface or a factory function.")))),(0,r.kt)("h4",{id:"returns-14"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#ocinstance"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInstance")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"The shared instance or value."),(0,r.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L400"},"packages/core/src/oc/ObjectContainer.ts:400")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getconstructorof"},"getConstructorOf"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getConstructorOf"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"Returns the class constructor function of the specified class."),(0,r.kt)("h4",{id:"type-parameters-13"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap"))," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")))),(0,r.kt)("h4",{id:"parameters-15"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name by which the class is registered with this object container.")))),(0,r.kt)("h4",{id:"returns-15"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">"),(0,r.kt)("p",null,"The constructor function."),(0,r.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L418"},"packages/core/src/oc/ObjectContainer.ts:418")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"has"},"has"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"has"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Returns ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the specified object, class or resource is\nregistered with this object container."),(0,r.kt)("h4",{id:"type-parameters-14"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-16"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},"keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.OCAliasMap"},(0,r.kt)("inlineCode",{parentName:"a"},"OCAliasMap"))," ","|"," ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#ocinjectable"},(0,r.kt)("inlineCode",{parentName:"a"},"OCInjectable")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The resource name.")))),(0,r.kt)("h4",{id:"returns-16"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the specified object, class or\nresource is registered with this object container."),(0,r.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L438"},"packages/core/src/oc/ObjectContainer.ts:438")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"inject"},"inject"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"inject"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"classConstructor"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"Configures the object loader with the specified default dependencies for\nthe specified class."),(0,r.kt)("p",null,"New instances of the class created by this object container will receive\nthe provided dependencies into constructor unless custom dependencies\nare provided."),(0,r.kt)("h4",{id:"type-parameters-15"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))))),(0,r.kt)("h4",{id:"parameters-17"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"classConstructor")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The class constructor.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dependencies")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The dependencies to pass into the constructor function.")))),(0,r.kt)("h4",{id:"returns-17"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"This object container."),(0,r.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L244"},"packages/core/src/oc/ObjectContainer.ts:244")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"provide"},"provide"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"provide"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"T"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"I"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"interfaceConstructor"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"implementationConstructor"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"dependencies?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"Configures the default implementation of the specified interface to use\nwhen an implementation provider of the specified interface is requested\nfrom this object container."),(0,r.kt)("p",null,"The implementation constructor will obtain the provided default\ndependencies or the dependencies provided to the ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"()"),"\nmethod."),(0,r.kt)("h4",{id:"type-parameters-16"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"T"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"I"))))),(0,r.kt)("h4",{id:"parameters-18"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"interfaceConstructor")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"I"),">"," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"AbstractConstructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"I"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The constructor of the interface representing the service.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"implementationConstructor")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Constructor"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"T"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The constructor of the class implementing the service interface.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dependencies?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The dependencies to pass into the constructor function.")))),(0,r.kt)("h4",{id:"returns-18"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.ObjectContainer"},(0,r.kt)("inlineCode",{parentName:"a"},"ObjectContainer"))),(0,r.kt)("p",null,"This object container."),(0,r.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L319"},"packages/core/src/oc/ObjectContainer.ts:319")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setbindingstate"},"setBindingState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setBindingState"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"bindingState"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"bindingPluginName?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"parameters-19"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"bindingState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/enums/ima_core.BindingState"},(0,r.kt)("inlineCode",{parentName:"a"},"BindingState")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"bindingPluginName?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"returns-19"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/oc/ObjectContainer.ts#L493"},"packages/core/src/oc/ObjectContainer.ts:493")))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/25aeb21c.4e3c9f61.js b/assets/js/25aeb21c.4e3c9f61.js deleted file mode 100644 index a0cffe8800..0000000000 --- a/assets/js/25aeb21c.4e3c9f61.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4489],{6065:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/diagram-router-683726941d228a587bbf7ffda06d3c45.png"},3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},d="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=p(n),m=a,k=d["".concat(s,".").concat(m)]||d[m]||c[m]||o;return n?r.createElement(k,i(i({ref:t},u),{},{components:n})):r.createElement(k,i({ref:t},u))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:a,i[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var r=n(5773),a=(n(7294),n(3905));const o={title:"Introduction",description:"Basic features > Routing >\xa0Introduction"},i=void 0,l={unversionedId:"basic-features/routing/introduction",id:"basic-features/routing/introduction",title:"Introduction",description:"Basic features > Routing >\xa0Introduction",source:"@site/../docs/basic-features/routing/introduction.md",sourceDirName:"basic-features/routing",slug:"/basic-features/routing/introduction",permalink:"/basic-features/routing/introduction",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/basic-features/routing/introduction.md",tags:[],version:"current",lastUpdatedBy:"Filip Satek",lastUpdatedAt:1734590310,formattedLastUpdatedAt:"Dec 19, 2024",frontMatter:{title:"Introduction",description:"Basic features > Routing >\xa0Introduction"},sidebar:"docs",previous:{title:"Data fetching",permalink:"/basic-features/data-fetching"},next:{title:"Dynamic Routes",permalink:"/basic-features/routing/dynamic-routes"}},s={},p=[{value:"Setting up Router",id:"setting-up-router",level:2},{value:"name",id:"name",level:3},{value:"pathExpression",id:"pathexpression",level:3},{value:"controller",id:"controller",level:3},{value:"view",id:"view",level:3},{value:"options",id:"options",level:3},{value:"onlyUpdate",id:"onlyupdate",level:4},{value:"autoScroll",id:"autoscroll",level:4},{value:"allowSPA",id:"allowspa",level:4},{value:"documentView",id:"documentview",level:4},{value:"managedRootView",id:"managedrootview",level:4},{value:"viewAdapter",id:"viewadapter",level:4},{value:"middlewares",id:"middlewares",level:4},{value:"Route params substitutions",id:"route-params-substitutions",level:2},{value:"Optional parameters",id:"optional-parameters",level:3},{value:"Linking between routes",id:"linking-between-routes",level:2},{value:"Generating links outside of app components",id:"generating-links-outside-of-app-components",level:3},{value:"Error and NotFound route names",id:"error-and-notfound-route-names",level:2},{value:"Redirects",id:"redirects",level:2},{value:"Method signature",id:"method-signature",level:3},{value:"url",id:"url",level:3},{value:"options",id:"options-1",level:3},{value:"httpStatus",id:"httpstatus",level:4},{value:"headers",id:"headers",level:4}],u={toc:p},d="wrapper";function c(e){let{components:t,...o}=e;return(0,a.kt)(d,(0,r.Z)({},u,o,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Routing is an essential part of every application that displays multiple pages. It allows to develop each part of an application separately and add new parts instantly. As it happens to be in MVC frameworks, each route targets specific controller which takes control over what happens next after a route is matched."),(0,a.kt)("p",null,(0,a.kt)("img",{src:n(6065).Z,width:"881",height:"421"})),(0,a.kt)("h2",{id:"setting-up-router"},"Setting up Router"),(0,a.kt)("p",null,"All routes in IMA.js are registered inside the ",(0,a.kt)("inlineCode",{parentName:"p"},"init")," function in ",(0,a.kt)("inlineCode",{parentName:"p"},"app/config/routes.js"),". Same ",(0,a.kt)("inlineCode",{parentName:"p"},"init")," function can be found in ",(0,a.kt)("inlineCode",{parentName:"p"},"app/config/bind.js"),". See ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/object-container"},"Object Container")," documentation for more information about the ",(0,a.kt)("inlineCode",{parentName:"p"},"oc.get()")," function."),(0,a.kt)("p",null,"Usually you should be oke with simple string defined ",(0,a.kt)("a",{parentName:"p",href:"/api/classes/ima_core.StaticRoute"},"StaticRoutes")," (the ones defined below), but the router also has support for more advanced and powerful ",(0,a.kt)("a",{parentName:"p",href:"/api/classes/ima_core.DynamicRoute"},"DynamicRoutes"),". For more information about these see the ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/routing/dynamic-routes"},"next section"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript",metastring:"title=./app/config/routes.js",title:"./app/config/routes.js"},"import { RouteNames } from '@ima/core';\n\nimport HomeController from 'app/page/home/HomeController';\nimport HomeView from 'app/page/home/HomeView';\n\nexport let init = (ns, oc, config) => {\n const router = oc.get('$Router');\n\n router\n .add('home', '/', HomeController, HomeView)\n .add(RouteNames.ERROR, '/error', ErrorController, ErrorView)\n .add(RouteNames.NOT_FOUND, '/not-found', NotFoundController, NotFoundView);\n}\n")),(0,a.kt)("p",null,"The router ",(0,a.kt)("inlineCode",{parentName:"p"},"add")," method has following signature:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"add(name, pathExpression, controller, view, options = undefined);\n")),(0,a.kt)("h3",{id:"name"},"name"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"\xa0",(0,a.kt)("inlineCode",{parentName:"p"},"string"))),(0,a.kt)("p",null,"This argument represents ",(0,a.kt)("strong",{parentName:"p"},"unique route name"),". You can use this name when ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/routing/introduction#linking-between-routes"},"linking between routes")," or getting the ",(0,a.kt)("inlineCode",{parentName:"p"},"route")," instance using ",(0,a.kt)("inlineCode",{parentName:"p"},"getRouteHandler()")," method."),(0,a.kt)("h3",{id:"pathexpression"},"pathExpression"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"string |\xa0object"))),(0,a.kt)("p",null,"This can be either ",(0,a.kt)("inlineCode",{parentName:"p"},"object")," for ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/routing/dynamic-routes"},"dynamic routes")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"string")," representing route path. The pathExpression supports **",(0,a.kt)("a",{parentName:"p",href:"/basic-features/routing/introduction#route-params-substitutions"},"parameter substitutions")),(0,a.kt)("h3",{id:"controller"},"controller"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"string | function"))),(0,a.kt)("p",null,"Route assigned ",(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("a",{parentName:"strong",href:"/basic-features/controller-lifecycle"},"Controller"))," class (can be a string alias, referring to the controller registered in the ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/object-container"},"Object Container"),"). It goes through its full ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/controller-lifecycle"},"lifecycle")," and renders the ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/views-and-components"},"View"),"."),(0,a.kt)("h3",{id:"view"},"view"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"string | function"))),(0,a.kt)("p",null,"Route assigned ",(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("a",{parentName:"strong",href:"/basic-features/views-and-components"},"View"))," class (also can be a string alias, referring to the view registered in the ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/object-container"},"Object Container"),"). Rendered by the route controller."),(0,a.kt)("h3",{id:"options"},"options"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"object = undefined"))),(0,a.kt)("p",null,"These are optional, however it accepts object with following properties and their respective defaults:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"{\n onlyUpdate: false,\n autoScroll: true,\n allowSPA: true,\n documentView: null,\n managedRootView: null,\n viewAdapter: null,\n middlewares: []\n}\n")),(0,a.kt)("h4",{id:"onlyupdate"},"onlyUpdate"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"boolean | function = false"))),(0,a.kt)("p",null,"When only the parameters of the current route change an ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/controller-lifecycle#update-client"},(0,a.kt)("inlineCode",{parentName:"a"},"update")," method")," of the active controller will be invoked instead of re-instantiating the controller and view. The ",(0,a.kt)("inlineCode",{parentName:"p"},"update")," method receives ",(0,a.kt)("inlineCode",{parentName:"p"},"prevParams")," object containing - as the name suggests - previous route parameters."),(0,a.kt)("p",null,"If you provide function to the ",(0,a.kt)("inlineCode",{parentName:"p"},"onlyUpdate")," option; it receives 2 arguments (instances of previous ",(0,a.kt)("strong",{parentName:"p"},"controller")," and ",(0,a.kt)("strong",{parentName:"p"},"view"),") and it should return ",(0,a.kt)("strong",{parentName:"p"},"boolean"),"."),(0,a.kt)("h4",{id:"autoscroll"},"autoScroll"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,a.kt)("p",null,"Determines whether the page should be ",(0,a.kt)("strong",{parentName:"p"},"scrolled to the top")," when the navigation occurs."),(0,a.kt)("h4",{id:"allowspa"},"allowSPA"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,a.kt)("p",null,"Can be used to make the route to be always served from the server and never using the SPA (when disabled) even if the server is overloaded."),(0,a.kt)("p",null,"This is useful for routes that use different document views (specified by the ",(0,a.kt)("inlineCode",{parentName:"p"},"documentView")," option), for example for rendering the content of iframes."),(0,a.kt)("h4",{id:"documentview"},"documentView"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"AbstractDocumentView = null"))),(0,a.kt)("p",null,"Custom ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/rendering-process#documentview"},"DocumentView"),", should extend the ",(0,a.kt)("inlineCode",{parentName:"p"},"AbstractDocumentView")," from ",(0,a.kt)("inlineCode",{parentName:"p"},"@ima/core"),"."),(0,a.kt)("h4",{id:"managedrootview"},"managedRootView"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"function = null"))),(0,a.kt)("p",null,"Custom ",(0,a.kt)("inlineCode",{parentName:"p"},"ManagedRootView")," component, for more information see ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/rendering-process#managedrootview"},"rendering process"),"."),(0,a.kt)("h4",{id:"viewadapter"},"viewAdapter"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"function = null"))),(0,a.kt)("p",null,"Custom ",(0,a.kt)("inlineCode",{parentName:"p"},"ViewAdapter")," component, for more information see ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/rendering-process#viewadapter"},"rendering process"),"."),(0,a.kt)("h4",{id:"middlewares"},"middlewares"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"function[] = []"))),(0,a.kt)("p",null,"Array of route-specific middlewares. See the ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/routing/middlewares"},"middlewares")," section for more information."),(0,a.kt)("h2",{id:"route-params-substitutions"},"Route params substitutions"),(0,a.kt)("p",null,"The parameter name can contain only letters ",(0,a.kt)("inlineCode",{parentName:"p"},"a-zA-Z"),", numbers ",(0,a.kt)("inlineCode",{parentName:"p"},"0-9"),", underscores ",(0,a.kt)("inlineCode",{parentName:"p"},"_")," and hyphens ",(0,a.kt)("inlineCode",{parentName:"p"},"-")," and is preceded by colon ",(0,a.kt)("inlineCode",{parentName:"p"},":"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"router.add(\n 'order-detail',\n // highlight-next-line\n '/user/:userId/orders/:orderId',\n OrderController,\n OrderView\n);\n")),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"userId")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"orderId")," parameters are then accessible in ",(0,a.kt)("inlineCode",{parentName:"p"},"OrderController")," via ",(0,a.kt)("inlineCode",{parentName:"p"},"this.params"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"import { AbstractController } from '@ima/core';\n\nclass OrderController extends AbstractController {\n load() {\n // highlight-next-line\n const userPromise = this._userService.get(this.params.userId);\n // highlight-next-line\n const orderPromise = this._orderService.get(this.params.orderId);\n\n return {\n user: userPromise,\n order: orderPromise\n }\n }\n}\n")),(0,a.kt)("h3",{id:"optional-parameters"},"Optional parameters"),(0,a.kt)("p",null,"Parameters can also be marked as ",(0,a.kt)("strong",{parentName:"p"},"optional")," by placing question mark ",(0,a.kt)("inlineCode",{parentName:"p"},"?")," after the colon ",(0,a.kt)("inlineCode",{parentName:"p"},":"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"router.add(\n 'user-detail',\n // highlight-next-line\n '/profile/:?userId',\n UserController,\n UserView\n);\n")),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"Optional parameters can be ",(0,a.kt)("strong",{parentName:"p"},"placed only after the last slash"),". Doing otherwise can cause unexpected behavior.")),(0,a.kt)("h2",{id:"linking-between-routes"},"Linking between routes"),(0,a.kt)("p",null,"URLs to routes can be generated via the ",(0,a.kt)("inlineCode",{parentName:"p"},"Router.link()")," public method. These can be then used in ordinary anchor tags and IMA.js makes sure, ",(0,a.kt)("strong",{parentName:"p"},"to handle the site routing in SPA mode"),", rather than doing redirect/reload of the whole page."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-jsx"},"import { AbstractComponent } from '@ima/react-page-renderer';\n\nclass OrderView extends AbstractComponent {\n render() {\n const { user, order } = this.props;\n\n const orderLink = this.link('order-detail', {\n userId: user.id,\n orderId: order.id\n });\n\n return View order\n }\n}\n")),(0,a.kt)("p",null,"This is done by listening to window ",(0,a.kt)("inlineCode",{parentName:"p"},"popstate")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"click")," events and reacting accordingly (in the ",(0,a.kt)("inlineCode",{parentName:"p"},"listen")," method of ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/next/packages/core/src/router/ClientRouter.js#L113"},"ClientRouter"),", which is called by IMA.js on client during app init). If the handled URL is not valid registered app route, it is handled normally (e.g you are redirected to the target URL)."),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"You can use ",(0,a.kt)("inlineCode",{parentName:"p"},"this.link")," helper method in IMA.js abstract component or the ",(0,a.kt)("inlineCode",{parentName:"p"},"useLink")," hook from the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/IMA.js-plugins/tree/master/packages/react-hooks"},"@ima/react-hooks")," plugin in your components and views to generate router links.")),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"Under the hood, ",(0,a.kt)("inlineCode",{parentName:"p"},"this.link()")," is only alias for ",(0,a.kt)("inlineCode",{parentName:"p"},"this.utils.$Router.link"),", where ",(0,a.kt)("inlineCode",{parentName:"p"},"this.utils")," is taken from ",(0,a.kt)("inlineCode",{parentName:"p"},"this.context.$Utils"),"."),(0,a.kt)("p",{parentName:"admonition"},"For more information about ",(0,a.kt)("inlineCode",{parentName:"p"},"this.utils")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"$Utils")," objects, take a look at the ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/rendering-process#react-context"},"React Context")," in the documentation.")),(0,a.kt)("h3",{id:"generating-links-outside-of-app-components"},"Generating links outside of app components"),(0,a.kt)("p",null,"Linking in ",(0,a.kt)("strong",{parentName:"p"},"Controllers"),", ",(0,a.kt)("strong",{parentName:"p"},"Extensions"),", ",(0,a.kt)("strong",{parentName:"p"},"Helpers")," and other ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/object-container"},"Object Container")," classes requires you to import ",(0,a.kt)("inlineCode",{parentName:"p"},"Router")," using ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/object-container#1-dependency-injection"},"dependency injection"),". To do that you can either use ",(0,a.kt)("inlineCode",{parentName:"p"},"Router")," class in the dependency array, or ",(0,a.kt)("inlineCode",{parentName:"p"},"$Router")," string alias:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"import { AbstractController } from '@ima/core';\n\nexport default class DetailController extends AbstractController {\n static get $dependencies() {\n return ['$Router'];\n }\n\n constructor(router) {\n this._router = router;\n }\n\n load() {\n // ...\n }\n}\n")),(0,a.kt)("p",null,"Then you get ",(0,a.kt)("inlineCode",{parentName:"p"},"Router")," instance as the constructor's first argument, which gives you access to it's ",(0,a.kt)("inlineCode",{parentName:"p"},"link")," public method (and many others), that you can use to generate your desired route URL:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"load() {\n const detailLink = this._router.link('order-detail', {\n userId: user.id,\n orderId: order.id\n });\n\n return { detailLink };\n}\n")),(0,a.kt)("h2",{id:"error-and-notfound-route-names"},"Error and NotFound route names"),(0,a.kt)("p",null,"There are two special route names that ",(0,a.kt)("inlineCode",{parentName:"p"},"@ima/core")," exports: ",(0,a.kt)("inlineCode",{parentName:"p"},"RouteNames.ERROR"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"RouteNames.NOT_FOUND"),". You can use these constants to provide custom views and controllers for error handling pages."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript",metastring:"title=./app/config/routes.js",title:"./app/config/routes.js"},"import { RouteNames } from '@ima/core';\n\nimport { ErrorController, ErrorView } from 'app/page/error';\nimport { NotFoundController, NotFoundView } from 'app/page/not-found';\n\nexport let init = (ns, oc, config) => {\n const router = oc.get('$Router');\n\n router\n .add('home', '/', HomeController, HomeView)\n .add(RouteNames.ERROR, '/error', ErrorController, ErrorView)\n .add(RouteNames.NOT_FOUND, '/not-found', NotFoundController, NotFoundView);\n}\n")),(0,a.kt)("h2",{id:"redirects"},"Redirects"),(0,a.kt)("p",null,"In addition to the ",(0,a.kt)("inlineCode",{parentName:"p"},"link")," method mentioned above (which handles URL generation for given routes), you can use ",(0,a.kt)("inlineCode",{parentName:"p"},"Router.redirect()")," method to ",(0,a.kt)("strong",{parentName:"p"},"redirect directly to the targeted URL"),"."),(0,a.kt)("p",null,"This URL can be either existing app route or external URL. As with links, in this case you also get SPA routing, in case of redirection to different IMA.js app route."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"import { AbstractController, Router } from '@ima/core';\n\nexport default class DetailController extends AbstractController {\n static get $dependencies() {\n return [\n Router // We're using class descriptor in this case for DI\n ];\n }\n\n constructor(router) {\n this._router = router;\n }\n\n init() {\n // highlight-next-line\n this._router.redirect(\n // highlight-next-line\n this._router.link('order-detail', {\n // highlight-next-line\n userId: user.id,\n // highlight-next-line\n orderId: order.id\n // highlight-next-line\n });\n // highlight-next-line\n );\n }\n}\n")),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"On client side, redirections are handled by simply changing the ",(0,a.kt)("inlineCode",{parentName:"p"},"window.location.href"),", while on server you're using the express native ",(0,a.kt)("inlineCode",{parentName:"p"},"res.redirect")," method.")),(0,a.kt)("h3",{id:"method-signature"},"Method signature"),(0,a.kt)("p",null,"The redirect method has following signature, while the options object is ",(0,a.kt)("strong",{parentName:"p"},"available only on server side"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"redirect(\n url = '',\n options = {} // Available only on server side\n)\n")),(0,a.kt)("h3",{id:"url"},"url"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"string"))),(0,a.kt)("p",null,"Target redirect URL."),(0,a.kt)("h3",{id:"options-1"},"options"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"object = {}"))),(0,a.kt)("p",null,"Additional options, used to customize redirect server response."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"{\n httpStatus: 302,\n headers: undefined,\n}\n")),(0,a.kt)("h4",{id:"httpstatus"},"httpStatus"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"number = 302"))),(0,a.kt)("p",null,"Custom redirect http status code."),(0,a.kt)("h4",{id:"headers"},"headers"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"object = undefined"))),(0,a.kt)("p",null,"Custom response headers."))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/25aeb21c.d3bd7fbb.js b/assets/js/25aeb21c.d3bd7fbb.js new file mode 100644 index 0000000000..3baf063660 --- /dev/null +++ b/assets/js/25aeb21c.d3bd7fbb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4489],{6065:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/diagram-router-683726941d228a587bbf7ffda06d3c45.png"},3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},d="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=p(n),m=a,k=d["".concat(s,".").concat(m)]||d[m]||c[m]||o;return n?r.createElement(k,i(i({ref:t},u),{},{components:n})):r.createElement(k,i({ref:t},u))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:a,i[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var r=n(5773),a=(n(7294),n(3905));const o={title:"Introduction",description:"Basic features > Routing >\xa0Introduction"},i=void 0,l={unversionedId:"basic-features/routing/introduction",id:"basic-features/routing/introduction",title:"Introduction",description:"Basic features > Routing >\xa0Introduction",source:"@site/../docs/basic-features/routing/introduction.md",sourceDirName:"basic-features/routing",slug:"/basic-features/routing/introduction",permalink:"/basic-features/routing/introduction",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/basic-features/routing/introduction.md",tags:[],version:"current",lastUpdatedBy:"PS",lastUpdatedAt:1736522400,formattedLastUpdatedAt:"Jan 10, 2025",frontMatter:{title:"Introduction",description:"Basic features > Routing >\xa0Introduction"},sidebar:"docs",previous:{title:"Data fetching",permalink:"/basic-features/data-fetching"},next:{title:"Dynamic Routes",permalink:"/basic-features/routing/dynamic-routes"}},s={},p=[{value:"Setting up Router",id:"setting-up-router",level:2},{value:"name",id:"name",level:3},{value:"pathExpression",id:"pathexpression",level:3},{value:"controller",id:"controller",level:3},{value:"view",id:"view",level:3},{value:"options",id:"options",level:3},{value:"onlyUpdate",id:"onlyupdate",level:4},{value:"autoScroll",id:"autoscroll",level:4},{value:"allowSPA",id:"allowspa",level:4},{value:"documentView",id:"documentview",level:4},{value:"managedRootView",id:"managedrootview",level:4},{value:"viewAdapter",id:"viewadapter",level:4},{value:"middlewares",id:"middlewares",level:4},{value:"Route params substitutions",id:"route-params-substitutions",level:2},{value:"Optional parameters",id:"optional-parameters",level:3},{value:"Linking between routes",id:"linking-between-routes",level:2},{value:"Generating links outside of app components",id:"generating-links-outside-of-app-components",level:3},{value:"Error and NotFound route names",id:"error-and-notfound-route-names",level:2},{value:"Redirects",id:"redirects",level:2},{value:"Method signature",id:"method-signature",level:3},{value:"url",id:"url",level:3},{value:"options",id:"options-1",level:3},{value:"httpStatus",id:"httpstatus",level:4},{value:"headers",id:"headers",level:4}],u={toc:p},d="wrapper";function c(e){let{components:t,...o}=e;return(0,a.kt)(d,(0,r.Z)({},u,o,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Routing is an essential part of every application that displays multiple pages. It allows to develop each part of an application separately and add new parts instantly. As it happens to be in MVC frameworks, each route targets specific controller which takes control over what happens next after a route is matched."),(0,a.kt)("p",null,(0,a.kt)("img",{src:n(6065).Z,width:"881",height:"421"})),(0,a.kt)("h2",{id:"setting-up-router"},"Setting up Router"),(0,a.kt)("p",null,"All routes in IMA.js are registered inside the ",(0,a.kt)("inlineCode",{parentName:"p"},"init")," function in ",(0,a.kt)("inlineCode",{parentName:"p"},"app/config/routes.js"),". Same ",(0,a.kt)("inlineCode",{parentName:"p"},"init")," function can be found in ",(0,a.kt)("inlineCode",{parentName:"p"},"app/config/bind.js"),". See ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/object-container"},"Object Container")," documentation for more information about the ",(0,a.kt)("inlineCode",{parentName:"p"},"oc.get()")," function."),(0,a.kt)("p",null,"Usually you should be oke with simple string defined ",(0,a.kt)("a",{parentName:"p",href:"/api/classes/ima_core.StaticRoute"},"StaticRoutes")," (the ones defined below), but the router also has support for more advanced and powerful ",(0,a.kt)("a",{parentName:"p",href:"/api/classes/ima_core.DynamicRoute"},"DynamicRoutes"),". For more information about these see the ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/routing/dynamic-routes"},"next section"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript",metastring:"title=./app/config/routes.js",title:"./app/config/routes.js"},"import { RouteNames } from '@ima/core';\n\nimport HomeController from 'app/page/home/HomeController';\nimport HomeView from 'app/page/home/HomeView';\n\nexport let init = (ns, oc, config) => {\n const router = oc.get('$Router');\n\n router\n .add('home', '/', HomeController, HomeView)\n .add(RouteNames.ERROR, '/error', ErrorController, ErrorView)\n .add(RouteNames.NOT_FOUND, '/not-found', NotFoundController, NotFoundView);\n}\n")),(0,a.kt)("p",null,"The router ",(0,a.kt)("inlineCode",{parentName:"p"},"add")," method has following signature:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"add(name, pathExpression, controller, view, options = undefined);\n")),(0,a.kt)("h3",{id:"name"},"name"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"\xa0",(0,a.kt)("inlineCode",{parentName:"p"},"string"))),(0,a.kt)("p",null,"This argument represents ",(0,a.kt)("strong",{parentName:"p"},"unique route name"),". You can use this name when ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/routing/introduction#linking-between-routes"},"linking between routes")," or getting the ",(0,a.kt)("inlineCode",{parentName:"p"},"route")," instance using ",(0,a.kt)("inlineCode",{parentName:"p"},"getRouteHandler()")," method."),(0,a.kt)("h3",{id:"pathexpression"},"pathExpression"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"string |\xa0object"))),(0,a.kt)("p",null,"This can be either ",(0,a.kt)("inlineCode",{parentName:"p"},"object")," for ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/routing/dynamic-routes"},"dynamic routes")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"string")," representing route path. The pathExpression supports **",(0,a.kt)("a",{parentName:"p",href:"/basic-features/routing/introduction#route-params-substitutions"},"parameter substitutions")),(0,a.kt)("h3",{id:"controller"},"controller"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"string | function"))),(0,a.kt)("p",null,"Route assigned ",(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("a",{parentName:"strong",href:"/basic-features/controller-lifecycle"},"Controller"))," class (can be a string alias, referring to the controller registered in the ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/object-container"},"Object Container"),"). It goes through its full ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/controller-lifecycle"},"lifecycle")," and renders the ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/views-and-components"},"View"),"."),(0,a.kt)("h3",{id:"view"},"view"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"string | function"))),(0,a.kt)("p",null,"Route assigned ",(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("a",{parentName:"strong",href:"/basic-features/views-and-components"},"View"))," class (also can be a string alias, referring to the view registered in the ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/object-container"},"Object Container"),"). Rendered by the route controller."),(0,a.kt)("h3",{id:"options"},"options"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"object = undefined"))),(0,a.kt)("p",null,"These are optional, however it accepts object with following properties and their respective defaults:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"{\n onlyUpdate: false,\n autoScroll: true,\n allowSPA: true,\n documentView: null,\n managedRootView: null,\n viewAdapter: null,\n middlewares: []\n}\n")),(0,a.kt)("h4",{id:"onlyupdate"},"onlyUpdate"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"boolean | function = false"))),(0,a.kt)("p",null,"When only the parameters of the current route change an ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/controller-lifecycle#update-client"},(0,a.kt)("inlineCode",{parentName:"a"},"update")," method")," of the active controller will be invoked instead of re-instantiating the controller and view. The ",(0,a.kt)("inlineCode",{parentName:"p"},"update")," method receives ",(0,a.kt)("inlineCode",{parentName:"p"},"prevParams")," object containing - as the name suggests - previous route parameters."),(0,a.kt)("p",null,"If you provide function to the ",(0,a.kt)("inlineCode",{parentName:"p"},"onlyUpdate")," option; it receives 2 arguments (instances of previous ",(0,a.kt)("strong",{parentName:"p"},"controller")," and ",(0,a.kt)("strong",{parentName:"p"},"view"),") and it should return ",(0,a.kt)("strong",{parentName:"p"},"boolean"),"."),(0,a.kt)("h4",{id:"autoscroll"},"autoScroll"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,a.kt)("p",null,"Determines whether the page should be ",(0,a.kt)("strong",{parentName:"p"},"scrolled to the top")," when the navigation occurs."),(0,a.kt)("h4",{id:"allowspa"},"allowSPA"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,a.kt)("p",null,"Can be used to make the route to be always served from the server and never using the SPA (when disabled) even if the server is overloaded."),(0,a.kt)("p",null,"This is useful for routes that use different document views (specified by the ",(0,a.kt)("inlineCode",{parentName:"p"},"documentView")," option), for example for rendering the content of iframes."),(0,a.kt)("h4",{id:"documentview"},"documentView"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"AbstractDocumentView = null"))),(0,a.kt)("p",null,"Custom ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/rendering-process#documentview"},"DocumentView"),", should extend the ",(0,a.kt)("inlineCode",{parentName:"p"},"AbstractDocumentView")," from ",(0,a.kt)("inlineCode",{parentName:"p"},"@ima/core"),"."),(0,a.kt)("h4",{id:"managedrootview"},"managedRootView"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"function = null"))),(0,a.kt)("p",null,"Custom ",(0,a.kt)("inlineCode",{parentName:"p"},"ManagedRootView")," component, for more information see ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/rendering-process#managedrootview"},"rendering process"),"."),(0,a.kt)("h4",{id:"viewadapter"},"viewAdapter"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"function = null"))),(0,a.kt)("p",null,"Custom ",(0,a.kt)("inlineCode",{parentName:"p"},"ViewAdapter")," component, for more information see ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/rendering-process#viewadapter"},"rendering process"),"."),(0,a.kt)("h4",{id:"middlewares"},"middlewares"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"function[] = []"))),(0,a.kt)("p",null,"Array of route-specific middlewares. See the ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/routing/middlewares"},"middlewares")," section for more information."),(0,a.kt)("h2",{id:"route-params-substitutions"},"Route params substitutions"),(0,a.kt)("p",null,"The parameter name can contain only letters ",(0,a.kt)("inlineCode",{parentName:"p"},"a-zA-Z"),", numbers ",(0,a.kt)("inlineCode",{parentName:"p"},"0-9"),", underscores ",(0,a.kt)("inlineCode",{parentName:"p"},"_")," and hyphens ",(0,a.kt)("inlineCode",{parentName:"p"},"-")," and is preceded by colon ",(0,a.kt)("inlineCode",{parentName:"p"},":"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"router.add(\n 'order-detail',\n // highlight-next-line\n '/user/:userId/orders/:orderId',\n OrderController,\n OrderView\n);\n")),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"userId")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"orderId")," parameters are then accessible in ",(0,a.kt)("inlineCode",{parentName:"p"},"OrderController")," via ",(0,a.kt)("inlineCode",{parentName:"p"},"this.params"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"import { AbstractController } from '@ima/core';\n\nclass OrderController extends AbstractController {\n load() {\n // highlight-next-line\n const userPromise = this._userService.get(this.params.userId);\n // highlight-next-line\n const orderPromise = this._orderService.get(this.params.orderId);\n\n return {\n user: userPromise,\n order: orderPromise\n }\n }\n}\n")),(0,a.kt)("h3",{id:"optional-parameters"},"Optional parameters"),(0,a.kt)("p",null,"Parameters can also be marked as ",(0,a.kt)("strong",{parentName:"p"},"optional")," by placing question mark ",(0,a.kt)("inlineCode",{parentName:"p"},"?")," after the colon ",(0,a.kt)("inlineCode",{parentName:"p"},":"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"router.add(\n 'user-detail',\n // highlight-next-line\n '/profile/:?userId',\n UserController,\n UserView\n);\n")),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"Optional parameters can be ",(0,a.kt)("strong",{parentName:"p"},"placed only after the last slash"),". Doing otherwise can cause unexpected behavior.")),(0,a.kt)("h2",{id:"linking-between-routes"},"Linking between routes"),(0,a.kt)("p",null,"URLs to routes can be generated via the ",(0,a.kt)("inlineCode",{parentName:"p"},"Router.link()")," public method. These can be then used in ordinary anchor tags and IMA.js makes sure, ",(0,a.kt)("strong",{parentName:"p"},"to handle the site routing in SPA mode"),", rather than doing redirect/reload of the whole page."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-jsx"},"import { AbstractComponent } from '@ima/react-page-renderer';\n\nclass OrderView extends AbstractComponent {\n render() {\n const { user, order } = this.props;\n\n const orderLink = this.link('order-detail', {\n userId: user.id,\n orderId: order.id\n });\n\n return View order\n }\n}\n")),(0,a.kt)("p",null,"This is done by listening to window ",(0,a.kt)("inlineCode",{parentName:"p"},"popstate")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"click")," events and reacting accordingly (in the ",(0,a.kt)("inlineCode",{parentName:"p"},"listen")," method of ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/next/packages/core/src/router/ClientRouter.js#L113"},"ClientRouter"),", which is called by IMA.js on client during app init). If the handled URL is not valid registered app route, it is handled normally (e.g you are redirected to the target URL)."),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"You can use ",(0,a.kt)("inlineCode",{parentName:"p"},"this.link")," helper method in IMA.js abstract component or the ",(0,a.kt)("inlineCode",{parentName:"p"},"useLink")," hook from the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/IMA.js-plugins/tree/master/packages/react-hooks"},"@ima/react-hooks")," plugin in your components and views to generate router links.")),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"Under the hood, ",(0,a.kt)("inlineCode",{parentName:"p"},"this.link()")," is only alias for ",(0,a.kt)("inlineCode",{parentName:"p"},"this.utils.$Router.link"),", where ",(0,a.kt)("inlineCode",{parentName:"p"},"this.utils")," is taken from ",(0,a.kt)("inlineCode",{parentName:"p"},"this.context.$Utils"),"."),(0,a.kt)("p",{parentName:"admonition"},"For more information about ",(0,a.kt)("inlineCode",{parentName:"p"},"this.utils")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"$Utils")," objects, take a look at the ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/rendering-process#react-context"},"React Context")," in the documentation.")),(0,a.kt)("h3",{id:"generating-links-outside-of-app-components"},"Generating links outside of app components"),(0,a.kt)("p",null,"Linking in ",(0,a.kt)("strong",{parentName:"p"},"Controllers"),", ",(0,a.kt)("strong",{parentName:"p"},"Extensions"),", ",(0,a.kt)("strong",{parentName:"p"},"Helpers")," and other ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/object-container"},"Object Container")," classes requires you to import ",(0,a.kt)("inlineCode",{parentName:"p"},"Router")," using ",(0,a.kt)("a",{parentName:"p",href:"/basic-features/object-container#1-dependency-injection"},"dependency injection"),". To do that you can either use ",(0,a.kt)("inlineCode",{parentName:"p"},"Router")," class in the dependency array, or ",(0,a.kt)("inlineCode",{parentName:"p"},"$Router")," string alias:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"import { AbstractController } from '@ima/core';\n\nexport default class DetailController extends AbstractController {\n static get $dependencies() {\n return ['$Router'];\n }\n\n constructor(router) {\n this._router = router;\n }\n\n load() {\n // ...\n }\n}\n")),(0,a.kt)("p",null,"Then you get ",(0,a.kt)("inlineCode",{parentName:"p"},"Router")," instance as the constructor's first argument, which gives you access to it's ",(0,a.kt)("inlineCode",{parentName:"p"},"link")," public method (and many others), that you can use to generate your desired route URL:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"load() {\n const detailLink = this._router.link('order-detail', {\n userId: user.id,\n orderId: order.id\n });\n\n return { detailLink };\n}\n")),(0,a.kt)("h2",{id:"error-and-notfound-route-names"},"Error and NotFound route names"),(0,a.kt)("p",null,"There are two special route names that ",(0,a.kt)("inlineCode",{parentName:"p"},"@ima/core")," exports: ",(0,a.kt)("inlineCode",{parentName:"p"},"RouteNames.ERROR"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"RouteNames.NOT_FOUND"),". You can use these constants to provide custom views and controllers for error handling pages."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript",metastring:"title=./app/config/routes.js",title:"./app/config/routes.js"},"import { RouteNames } from '@ima/core';\n\nimport { ErrorController, ErrorView } from 'app/page/error';\nimport { NotFoundController, NotFoundView } from 'app/page/not-found';\n\nexport let init = (ns, oc, config) => {\n const router = oc.get('$Router');\n\n router\n .add('home', '/', HomeController, HomeView)\n .add(RouteNames.ERROR, '/error', ErrorController, ErrorView)\n .add(RouteNames.NOT_FOUND, '/not-found', NotFoundController, NotFoundView);\n}\n")),(0,a.kt)("h2",{id:"redirects"},"Redirects"),(0,a.kt)("p",null,"In addition to the ",(0,a.kt)("inlineCode",{parentName:"p"},"link")," method mentioned above (which handles URL generation for given routes), you can use ",(0,a.kt)("inlineCode",{parentName:"p"},"Router.redirect()")," method to ",(0,a.kt)("strong",{parentName:"p"},"redirect directly to the targeted URL"),"."),(0,a.kt)("p",null,"This URL can be either existing app route or external URL. As with links, in this case you also get SPA routing, in case of redirection to different IMA.js app route."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"import { AbstractController, Router } from '@ima/core';\n\nexport default class DetailController extends AbstractController {\n static get $dependencies() {\n return [\n Router // We're using class descriptor in this case for DI\n ];\n }\n\n constructor(router) {\n this._router = router;\n }\n\n init() {\n // highlight-next-line\n this._router.redirect(\n // highlight-next-line\n this._router.link('order-detail', {\n // highlight-next-line\n userId: user.id,\n // highlight-next-line\n orderId: order.id\n // highlight-next-line\n });\n // highlight-next-line\n );\n }\n}\n")),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"On client side, redirections are handled by simply changing the ",(0,a.kt)("inlineCode",{parentName:"p"},"window.location.href"),", while on server you're using the express native ",(0,a.kt)("inlineCode",{parentName:"p"},"res.redirect")," method.")),(0,a.kt)("h3",{id:"method-signature"},"Method signature"),(0,a.kt)("p",null,"The redirect method has following signature, while the options object is ",(0,a.kt)("strong",{parentName:"p"},"available only on server side"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"redirect(\n url = '',\n options = {} // Available only on server side\n)\n")),(0,a.kt)("h3",{id:"url"},"url"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"string"))),(0,a.kt)("p",null,"Target redirect URL."),(0,a.kt)("h3",{id:"options-1"},"options"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"object = {}"))),(0,a.kt)("p",null,"Additional options, used to customize redirect server response."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"{\n httpStatus: 302,\n headers: undefined,\n}\n")),(0,a.kt)("h4",{id:"httpstatus"},"httpStatus"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"number = 302"))),(0,a.kt)("p",null,"Custom redirect http status code."),(0,a.kt)("h4",{id:"headers"},"headers"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},(0,a.kt)("inlineCode",{parentName:"p"},"object = undefined"))),(0,a.kt)("p",null,"Custom response headers."))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/27a3d74a.7f770a40.js b/assets/js/27a3d74a.c2f94954.js similarity index 88% rename from assets/js/27a3d74a.7f770a40.js rename to assets/js/27a3d74a.c2f94954.js index c48feb610e..f5bf38eb73 100644 --- a/assets/js/27a3d74a.7f770a40.js +++ b/assets/js/27a3d74a.c2f94954.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[1537],{3905:(e,n,t)=>{t.d(n,{Zo:()=>s,kt:()=>u});var r=t(7294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var l=r.createContext({}),c=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},s=function(e){var n=c(e.components);return r.createElement(l.Provider,{value:n},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},f=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),m=c(t),f=i,u=m["".concat(l,".").concat(f)]||m[f]||d[f]||a;return t?r.createElement(u,o(o({ref:n},s),{},{components:t})):r.createElement(u,o({ref:n},s))}));function u(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var a=t.length,o=new Array(a);o[0]=f;var p={};for(var l in n)hasOwnProperty.call(n,l)&&(p[l]=n[l]);p.originalType=e,p[m]="string"==typeof e?e:i,o[1]=p;for(var c=2;c{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>p,toc:()=>c});var r=t(5773),i=(t(7294),t(3905));const a={id:"ima_core.AppEnvironment",title:"Interface: AppEnvironment",sidebar_label:"@ima/core.AppEnvironment",custom_edit_url:null},o=void 0,p={unversionedId:"api/interfaces/ima_core.AppEnvironment",id:"api/interfaces/ima_core.AppEnvironment",title:"Interface: AppEnvironment",description:"@ima/core.AppEnvironment",source:"@site/../docs/api/interfaces/ima_core.AppEnvironment.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.AppEnvironment",permalink:"/api/interfaces/ima_core.AppEnvironment",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.AppEnvironment",title:"Interface: AppEnvironment",sidebar_label:"@ima/core.AppEnvironment",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/cli.ImaConfigurationContext",permalink:"/api/interfaces/ima_cli.ImaConfigurationContext"},next:{title:"@ima/core.BootConfig",permalink:"/api/interfaces/ima_core.BootConfig"}},l={},c=[{value:"Properties",id:"properties",level:2},{value:"dev",id:"dev",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"prod",id:"prod",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"regression",id:"regression",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"test",id:"test",level:3},{value:"Defined in",id:"defined-in-3",level:4}],s={toc:c},m="wrapper";function d(e){let{components:n,...t}=e;return(0,i.kt)(m,(0,r.Z)({},s,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".AppEnvironment"),(0,i.kt)("p",null,"App Environment structure, used in ./server/config/environment.js"),(0,i.kt)("h2",{id:"properties"},"Properties"),(0,i.kt)("h3",{id:"dev"},"dev"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"dev"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"PartialObjectDeep"),"<",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Environment"},(0,i.kt)("inlineCode",{parentName:"a"},"Environment")),", {}",">"),(0,i.kt)("h4",{id:"defined-in"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L118"},"packages/core/src/boot.ts:118")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"prod"},"prod"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"prod"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Environment"},(0,i.kt)("inlineCode",{parentName:"a"},"Environment"))),(0,i.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L117"},"packages/core/src/boot.ts:117")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"regression"},"regression"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"regression"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"PartialObjectDeep"),"<",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Environment"},(0,i.kt)("inlineCode",{parentName:"a"},"Environment")),", {}",">"),(0,i.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L120"},"packages/core/src/boot.ts:120")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"test"},"test"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"test"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"PartialObjectDeep"),"<",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Environment"},(0,i.kt)("inlineCode",{parentName:"a"},"Environment")),", {}",">"),(0,i.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/boot.ts#L119"},"packages/core/src/boot.ts:119")))}d.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[1537],{3905:(e,n,t)=>{t.d(n,{Zo:()=>s,kt:()=>f});var r=t(7294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var l=r.createContext({}),c=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},s=function(e){var n=c(e.components);return r.createElement(l.Provider,{value:n},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},u=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),m=c(t),u=i,f=m["".concat(l,".").concat(u)]||m[u]||d[u]||a;return t?r.createElement(f,o(o({ref:n},s),{},{components:t})):r.createElement(f,o({ref:n},s))}));function f(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var a=t.length,o=new Array(a);o[0]=u;var p={};for(var l in n)hasOwnProperty.call(n,l)&&(p[l]=n[l]);p.originalType=e,p[m]="string"==typeof e?e:i,o[1]=p;for(var c=2;c{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>p,toc:()=>c});var r=t(5773),i=(t(7294),t(3905));const a={id:"ima_core.AppEnvironment",title:"Interface: AppEnvironment",sidebar_label:"@ima/core.AppEnvironment",custom_edit_url:null},o=void 0,p={unversionedId:"api/interfaces/ima_core.AppEnvironment",id:"api/interfaces/ima_core.AppEnvironment",title:"Interface: AppEnvironment",description:"@ima/core.AppEnvironment",source:"@site/../docs/api/interfaces/ima_core.AppEnvironment.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_core.AppEnvironment",permalink:"/api/interfaces/ima_core.AppEnvironment",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.AppEnvironment",title:"Interface: AppEnvironment",sidebar_label:"@ima/core.AppEnvironment",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/cli.ImaConfigurationContext",permalink:"/api/interfaces/ima_cli.ImaConfigurationContext"},next:{title:"@ima/core.BootConfig",permalink:"/api/interfaces/ima_core.BootConfig"}},l={},c=[{value:"Properties",id:"properties",level:2},{value:"dev",id:"dev",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"prod",id:"prod",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"regression",id:"regression",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"test",id:"test",level:3},{value:"Defined in",id:"defined-in-3",level:4}],s={toc:c},m="wrapper";function d(e){let{components:n,...t}=e;return(0,i.kt)(m,(0,r.Z)({},s,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".AppEnvironment"),(0,i.kt)("p",null,"App Environment structure, used in ./server/config/environment.js"),(0,i.kt)("h2",{id:"properties"},"Properties"),(0,i.kt)("h3",{id:"dev"},"dev"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"dev"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"PartialObjectDeep"),"<",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Environment"},(0,i.kt)("inlineCode",{parentName:"a"},"Environment")),", {}",">"),(0,i.kt)("h4",{id:"defined-in"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L118"},"packages/core/src/boot.ts:118")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"prod"},"prod"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("strong",{parentName:"p"},"prod"),": ",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Environment"},(0,i.kt)("inlineCode",{parentName:"a"},"Environment"))),(0,i.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L117"},"packages/core/src/boot.ts:117")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"regression"},"regression"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"regression"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"PartialObjectDeep"),"<",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Environment"},(0,i.kt)("inlineCode",{parentName:"a"},"Environment")),", {}",">"),(0,i.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L120"},"packages/core/src/boot.ts:120")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"test"},"test"),(0,i.kt)("p",null,"\u2022 ",(0,i.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,i.kt)("strong",{parentName:"p"},"test"),": ",(0,i.kt)("inlineCode",{parentName:"p"},"PartialObjectDeep"),"<",(0,i.kt)("a",{parentName:"p",href:"/api/interfaces/ima_core.Environment"},(0,i.kt)("inlineCode",{parentName:"a"},"Environment")),", {}",">"),(0,i.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/boot.ts#L119"},"packages/core/src/boot.ts:119")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/27b4c996.db5c3515.js b/assets/js/27b4c996.895ab122.js similarity index 98% rename from assets/js/27b4c996.db5c3515.js rename to assets/js/27b4c996.895ab122.js index 9c2cd85e79..9019290589 100644 --- a/assets/js/27b4c996.db5c3515.js +++ b/assets/js/27b4c996.895ab122.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[301],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>k});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),p=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=p(e.components);return a.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(n),m=r,k=u["".concat(c,".").concat(m)]||u[m]||d[m]||i;return n?a.createElement(k,o(o({ref:t},s),{},{components:n})):a.createElement(k,o({ref:t},s))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[u]="string"==typeof e?e:r,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var a=n(5773),r=(n(7294),n(3905));const i={id:"ima_core.Execution",title:"Class: Execution",sidebar_label:"@ima/core.Execution",custom_edit_url:null},o=void 0,l={unversionedId:"api/classes/ima_core.Execution",id:"api/classes/ima_core.Execution",title:"Class: Execution",description:"@ima/core.Execution",source:"@site/../docs/api/classes/ima_core.Execution.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.Execution",permalink:"/api/classes/ima_core.Execution",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.Execution",title:"Class: Execution",sidebar_label:"@ima/core.Execution",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.EventBusImpl",permalink:"/api/classes/ima_core.EventBusImpl"},next:{title:"@ima/core.Extension",permalink:"/api/classes/ima_core.Extension"}},c={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Methods",id:"methods",level:2},{value:"append",id:"append",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"execute",id:"execute",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-1",level:4}],s={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".Execution"),(0,r.kt)("p",null,"Execution is an abstract class that defines a standard for executing jobs.\nThe execution can be either done in serial or in parallel way."),(0,r.kt)("p",null,"When executing jobs in parallel an option should define how to deal with\na result of each individual job execution. One option would be to return the\nresult of a job that completes first. Second option is to return result of\nall jobs once they're all complete."),(0,r.kt)("p",null,"For serial execution you should define an option that affects how arguments\npassed to the ",(0,r.kt)("inlineCode",{parentName:"p"},"execute")," method are distributed. They could be either\nsupplied to each job individually (thus meaning one job's mutation won't\naffect another job) or they could be supplied to the first job and then\npiped through other jobs."),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Execution"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExecution"},(0,r.kt)("inlineCode",{parentName:"a"},"AbstractExecution"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExecution"},(0,r.kt)("inlineCode",{parentName:"a"},"AbstractExecution"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new Execution"),"()"),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"append"},"append"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"append"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"jobs"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Adds a new job to be executed. The job is appended at the end of the\nlist of current jobs therefore is executed last."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"jobs")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#executionjob"},(0,r.kt)("inlineCode",{parentName:"a"},"ExecutionJob")),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The jobs to be executed.")))),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/execution/Execution.ts#L25"},"packages/core/src/execution/Execution.ts:25")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"execute"},"execute"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"execute"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"...args"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("p",null,"Start executing collected jobs. In the end a ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise")," is returned\nwith a resulting value. On the returned ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise")," a ",(0,r.kt)("inlineCode",{parentName:"p"},"catch"),"\nmethod can be called to prevent any unwanted interruption."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"...args")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"Arguments to be passed when executing jobs")))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/execution/Execution.ts#L36"},"packages/core/src/execution/Execution.ts:36")))}d.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[301],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>k});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),p=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=p(e.components);return a.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(n),m=r,k=u["".concat(c,".").concat(m)]||u[m]||d[m]||i;return n?a.createElement(k,o(o({ref:t},s),{},{components:n})):a.createElement(k,o({ref:t},s))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[u]="string"==typeof e?e:r,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var a=n(5773),r=(n(7294),n(3905));const i={id:"ima_core.Execution",title:"Class: Execution",sidebar_label:"@ima/core.Execution",custom_edit_url:null},o=void 0,l={unversionedId:"api/classes/ima_core.Execution",id:"api/classes/ima_core.Execution",title:"Class: Execution",description:"@ima/core.Execution",source:"@site/../docs/api/classes/ima_core.Execution.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.Execution",permalink:"/api/classes/ima_core.Execution",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.Execution",title:"Class: Execution",sidebar_label:"@ima/core.Execution",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.EventBusImpl",permalink:"/api/classes/ima_core.EventBusImpl"},next:{title:"@ima/core.Extension",permalink:"/api/classes/ima_core.Extension"}},c={},p=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Methods",id:"methods",level:2},{value:"append",id:"append",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"execute",id:"execute",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-1",level:4}],s={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".Execution"),(0,r.kt)("p",null,"Execution is an abstract class that defines a standard for executing jobs.\nThe execution can be either done in serial or in parallel way."),(0,r.kt)("p",null,"When executing jobs in parallel an option should define how to deal with\na result of each individual job execution. One option would be to return the\nresult of a job that completes first. Second option is to return result of\nall jobs once they're all complete."),(0,r.kt)("p",null,"For serial execution you should define an option that affects how arguments\npassed to the ",(0,r.kt)("inlineCode",{parentName:"p"},"execute")," method are distributed. They could be either\nsupplied to each job individually (thus meaning one job's mutation won't\naffect another job) or they could be supplied to the first job and then\npiped through other jobs."),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Execution"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExecution"},(0,r.kt)("inlineCode",{parentName:"a"},"AbstractExecution"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExecution"},(0,r.kt)("inlineCode",{parentName:"a"},"AbstractExecution"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new Execution"),"()"),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"append"},"append"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"append"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"jobs"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Adds a new job to be executed. The job is appended at the end of the\nlist of current jobs therefore is executed last."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"jobs")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#executionjob"},(0,r.kt)("inlineCode",{parentName:"a"},"ExecutionJob")),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The jobs to be executed.")))),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/execution/Execution.ts#L25"},"packages/core/src/execution/Execution.ts:25")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"execute"},"execute"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"execute"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"...args"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("p",null,"Start executing collected jobs. In the end a ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise")," is returned\nwith a resulting value. On the returned ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise")," a ",(0,r.kt)("inlineCode",{parentName:"p"},"catch"),"\nmethod can be called to prevent any unwanted interruption."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"...args")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"Arguments to be passed when executing jobs")))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"unknown"),">"),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/execution/Execution.ts#L36"},"packages/core/src/execution/Execution.ts:36")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/284c0bdc.2ec5055e.js b/assets/js/284c0bdc.2ec5055e.js deleted file mode 100644 index 32cfddee5c..0000000000 --- a/assets/js/284c0bdc.2ec5055e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[9752],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>g});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),p=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=p(n),d=r,g=u["".concat(l,".").concat(d)]||u[d]||m[d]||o;return n?a.createElement(g,i(i({ref:t},c),{},{components:n})):a.createElement(g,i({ref:t},c))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:r,i[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var a=n(5773),r=(n(7294),n(3905));const o={title:"Dictionary",description:"Basic features > Dictionary and language features"},i=void 0,s={unversionedId:"basic-features/dictionary",id:"basic-features/dictionary",title:"Dictionary",description:"Basic features > Dictionary and language features",source:"@site/../docs/basic-features/dictionary.md",sourceDirName:"basic-features",slug:"/basic-features/dictionary",permalink:"/basic-features/dictionary",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/basic-features/dictionary.md",tags:[],version:"current",lastUpdatedBy:"Filip Satek",lastUpdatedAt:1734590310,formattedLastUpdatedAt:"Dec 19, 2024",frontMatter:{title:"Dictionary",description:"Basic features > Dictionary and language features"},sidebar:"docs",previous:{title:"SEO & Meta Manager",permalink:"/basic-features/seo-and-meta-manager"},next:{title:"Error Handling",permalink:"/basic-features/error-handling"}},l={},p=[{value:"Configuration",id:"configuration",level:2},{value:"URL parser configuration",id:"url-parser-configuration",level:3},{value:":language placeholder",id:"language-placeholder",level:4},{value:"Language files",id:"language-files",level:3},{value:"Usage",id:"usage",level:2},{value:"Messageformat library",id:"messageformat-library",level:2}],c={toc:p},u="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Dictionary in IMA.js app serves many purposes. Simplest of them is keeping text strings out of component markup. More advanced one would be internationalization and in-text replacements."),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("p",null,"First we need to tell IMA.js where to look for dictionary files. Naming convention of the files is up to you, but it should be clear what language are the files meant for and ",(0,r.kt)("strong",{parentName:"p"},"glob\xa0pattern")," has to be able to match path to the files. IMA.js ",(0,r.kt)("strong",{parentName:"p"},"defaults to the following configuration:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"languages: {\n cs: ['./app/**/*CS.json'],\n en: ['./app/**/*EN.json']\n}\n")),(0,r.kt)("p",null,"However you can easily override this settings in ",(0,r.kt)("a",{parentName:"p",href:"/cli/ima-config-js#languages"},"ima.config.js")," (an example):"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript",metastring:'title="./ima.config.js"',title:'"./ima.config.js"'},"module.exports = {\n languages: {\n cs: [\n './app/component/**/*CS.json',\n './app/page/**/*CS.json'\n ],\n en: [\n './app/component/**/*EN.json',\n './app/page/**/*EN.json'\n ],\n de: [\n './app/component/**/*DE.json',\n './app/page/**/*DE.json'\n ]\n }\n}\n")),(0,r.kt)("h3",{id:"url-parser-configuration"},"URL parser configuration"),(0,r.kt)("p",null,"We also need to specify what language should be loaded. This is ",(0,r.kt)("strong",{parentName:"p"},"done dynamically depending on current URL"),". You can customize the URL patterns to language mapping in ",(0,r.kt)("strong",{parentName:"p"},"environment settings"),"."),(0,r.kt)("p",null,"The configuration consists of simple key-value pairs, that are used for configuring the languages used with specific hosts or starting paths:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"strong"},"key"))," - has to start with '//' instead of a protocol, and you can define the root path."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"strong"},"value"))," - is a language to use when the key is matched by the current URL.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js",metastring:'title="./server/config/environment.js"',title:'"./server/config/environment.js"'},"module.exports = (() => ({\n prod: {\n $Language: {\n '//*:*/cs': 'cs', // https://ima-app.com/cs/custom-route\n '//*:*/en': 'en', // https://ima-app.com/en/custom-route\n '//*:*': 'cs', // https://ima-app.com/custom-route\n },\n }\n}))();\n")),(0,r.kt)("h4",{id:"language-placeholder"},(0,r.kt)("inlineCode",{parentName:"h4"},":language")," placeholder"),(0,r.kt)("p",null,"To make the language definition a bit easier for multilingua applications, you can use ",(0,r.kt)("inlineCode",{parentName:"p"},":language")," placeholder in following way:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js",metastring:'title="./server/config/environment.js"',title:'"./server/config/environment.js"'},"module.exports = (() => ({\n prod: {\n $Language: {\n '//*:*/:language': ':language', // https://ima-app.com/[en|cs]/custom-route\n '//*:*': 'cs', // https://ima-app.com/custom-route\n },\n }\n}))();\n")),(0,r.kt)("h3",{id:"language-files"},"Language files"),(0,r.kt)("p",null,"The ",(0,r.kt)("a",{parentName:"p",href:"http://messageformat.github.io/messageformat/"},"messageformat")," compiler, which processes our language files, expects .JSON files on the input. Contents of these files are objects, which can be nested into multiple levels. These levels are then represtend as a namespace ",(0,r.kt)("inlineCode",{parentName:"p"},"key")," to the value in the dictionary."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js",metastring:"title=./pollVoteEN.json",title:"./pollVoteEN.json"},'{\n "resultTitle": "Result of {name}:",\n "result": {\n "voted": "{count, plural, =0{Found no results} one{Found one result} other{Found # results} }",\n "reader": "{gender, select, male{He said} female{She said} other{They said} }",\n }\n}\n')),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"File name is used as a namespace for strings it defines. String defined under key ",(0,r.kt)("inlineCode",{parentName:"p"},"submit")," in file ",(0,r.kt)("inlineCode",{parentName:"p"},"uploadFormCS.json")," will be accessible under ",(0,r.kt)("inlineCode",{parentName:"p"},"uploadForm.submit"),".")),(0,r.kt)("h2",{id:"usage"},"Usage"),(0,r.kt)("p",null,"Every component and view extending ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractComponent")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractPureComponent")," has access to ",(0,r.kt)("inlineCode",{parentName:"p"},"localize")," method from within its instance. This method is alias to a ",(0,r.kt)("inlineCode",{parentName:"p"},"get")," method from the Dictionary instance and takes 2 arguments:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"key")," - namespace and name of the localization string -> if you have ",(0,r.kt)("inlineCode",{parentName:"li"},"resultTitle")," string in file ",(0,r.kt)("inlineCode",{parentName:"li"},"pollVoteEN.json")," the key to this string would be ",(0,r.kt)("inlineCode",{parentName:"li"},"pollVote.resultTitle"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"parameters")," - Optional object with replacements and parameters for ",(0,r.kt)("a",{parentName:"li",href:"http://messageformat.github.io/messageformat/"},"messageformat")," syntax. For more info about the syntax check out ",(0,r.kt)("a",{parentName:"li",href:"http://userguide.icu-project.org/formatparse/messages"},"ICU guide"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"import { AbstractPureComponent } from '@ima/react-page-renderer';\n\nclass PollVote extends AbstractPureComponent {\n render() {\n return (\n
\n {this.localize('pollVote.resultTitle')}\n {this.localize('pollVote.result.voted', {count: 3})}\n
\n );\n }\n}\n")),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Use ",(0,r.kt)("inlineCode",{parentName:"p"},"useComponent().localize")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"useLocalize()")," hooks in functional components."),(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-jsx"},"import { useComponent, useLocalize } from '@ima/react-page-renderer';\n\nfunction PollVote() {\n // const { localize } = useComponent();\n const localize = useLocalize();\n\n return (\n
\n {localize('pollVote.resultTitle')}\n {localize('pollVote.result.voted', {count: 3})}\n
\n );\n}\n"))),(0,r.kt)("h2",{id:"messageformat-library"},"Messageformat library"),(0,r.kt)("p",null,"For more information on the available selectors, formatters, and other details, please see ",(0,r.kt)("a",{parentName:"p",href:"http://messageformat.github.io/messageformat/guide/"},"Format guide"),"."),(0,r.kt)("p",null,"Dictionary is also registered in ",(0,r.kt)("a",{parentName:"p",href:"/basic-features/object-container"},"Object Container")," and thus can be obtained in Controllers, Extensions and other classes constructed through OC."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/284c0bdc.5087c7c5.js b/assets/js/284c0bdc.5087c7c5.js new file mode 100644 index 0000000000..85aa29f447 --- /dev/null +++ b/assets/js/284c0bdc.5087c7c5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[9752],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>g});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),p=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=p(n),d=r,g=u["".concat(l,".").concat(d)]||u[d]||m[d]||o;return n?a.createElement(g,i(i({ref:t},c),{},{components:n})):a.createElement(g,i({ref:t},c))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:r,i[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var a=n(5773),r=(n(7294),n(3905));const o={title:"Dictionary",description:"Basic features > Dictionary and language features"},i=void 0,s={unversionedId:"basic-features/dictionary",id:"basic-features/dictionary",title:"Dictionary",description:"Basic features > Dictionary and language features",source:"@site/../docs/basic-features/dictionary.md",sourceDirName:"basic-features",slug:"/basic-features/dictionary",permalink:"/basic-features/dictionary",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/basic-features/dictionary.md",tags:[],version:"current",lastUpdatedBy:"PS",lastUpdatedAt:1736522400,formattedLastUpdatedAt:"Jan 10, 2025",frontMatter:{title:"Dictionary",description:"Basic features > Dictionary and language features"},sidebar:"docs",previous:{title:"SEO & Meta Manager",permalink:"/basic-features/seo-and-meta-manager"},next:{title:"Error Handling",permalink:"/basic-features/error-handling"}},l={},p=[{value:"Configuration",id:"configuration",level:2},{value:"URL parser configuration",id:"url-parser-configuration",level:3},{value:":language placeholder",id:"language-placeholder",level:4},{value:"Language files",id:"language-files",level:3},{value:"Usage",id:"usage",level:2},{value:"Messageformat library",id:"messageformat-library",level:2}],c={toc:p},u="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Dictionary in IMA.js app serves many purposes. Simplest of them is keeping text strings out of component markup. More advanced one would be internationalization and in-text replacements."),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("p",null,"First we need to tell IMA.js where to look for dictionary files. Naming convention of the files is up to you, but it should be clear what language are the files meant for and ",(0,r.kt)("strong",{parentName:"p"},"glob\xa0pattern")," has to be able to match path to the files. IMA.js ",(0,r.kt)("strong",{parentName:"p"},"defaults to the following configuration:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"languages: {\n cs: ['./app/**/*CS.json'],\n en: ['./app/**/*EN.json']\n}\n")),(0,r.kt)("p",null,"However you can easily override this settings in ",(0,r.kt)("a",{parentName:"p",href:"/cli/ima-config-js#languages"},"ima.config.js")," (an example):"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript",metastring:'title="./ima.config.js"',title:'"./ima.config.js"'},"module.exports = {\n languages: {\n cs: [\n './app/component/**/*CS.json',\n './app/page/**/*CS.json'\n ],\n en: [\n './app/component/**/*EN.json',\n './app/page/**/*EN.json'\n ],\n de: [\n './app/component/**/*DE.json',\n './app/page/**/*DE.json'\n ]\n }\n}\n")),(0,r.kt)("h3",{id:"url-parser-configuration"},"URL parser configuration"),(0,r.kt)("p",null,"We also need to specify what language should be loaded. This is ",(0,r.kt)("strong",{parentName:"p"},"done dynamically depending on current URL"),". You can customize the URL patterns to language mapping in ",(0,r.kt)("strong",{parentName:"p"},"environment settings"),"."),(0,r.kt)("p",null,"The configuration consists of simple key-value pairs, that are used for configuring the languages used with specific hosts or starting paths:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"strong"},"key"))," - has to start with '//' instead of a protocol, and you can define the root path."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"strong"},"value"))," - is a language to use when the key is matched by the current URL.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js",metastring:'title="./server/config/environment.js"',title:'"./server/config/environment.js"'},"module.exports = (() => ({\n prod: {\n $Language: {\n '//*:*/cs': 'cs', // https://ima-app.com/cs/custom-route\n '//*:*/en': 'en', // https://ima-app.com/en/custom-route\n '//*:*': 'cs', // https://ima-app.com/custom-route\n },\n }\n}))();\n")),(0,r.kt)("h4",{id:"language-placeholder"},(0,r.kt)("inlineCode",{parentName:"h4"},":language")," placeholder"),(0,r.kt)("p",null,"To make the language definition a bit easier for multilingua applications, you can use ",(0,r.kt)("inlineCode",{parentName:"p"},":language")," placeholder in following way:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js",metastring:'title="./server/config/environment.js"',title:'"./server/config/environment.js"'},"module.exports = (() => ({\n prod: {\n $Language: {\n '//*:*/:language': ':language', // https://ima-app.com/[en|cs]/custom-route\n '//*:*': 'cs', // https://ima-app.com/custom-route\n },\n }\n}))();\n")),(0,r.kt)("h3",{id:"language-files"},"Language files"),(0,r.kt)("p",null,"The ",(0,r.kt)("a",{parentName:"p",href:"http://messageformat.github.io/messageformat/"},"messageformat")," compiler, which processes our language files, expects .JSON files on the input. Contents of these files are objects, which can be nested into multiple levels. These levels are then represtend as a namespace ",(0,r.kt)("inlineCode",{parentName:"p"},"key")," to the value in the dictionary."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js",metastring:"title=./pollVoteEN.json",title:"./pollVoteEN.json"},'{\n "resultTitle": "Result of {name}:",\n "result": {\n "voted": "{count, plural, =0{Found no results} one{Found one result} other{Found # results} }",\n "reader": "{gender, select, male{He said} female{She said} other{They said} }",\n }\n}\n')),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"File name is used as a namespace for strings it defines. String defined under key ",(0,r.kt)("inlineCode",{parentName:"p"},"submit")," in file ",(0,r.kt)("inlineCode",{parentName:"p"},"uploadFormCS.json")," will be accessible under ",(0,r.kt)("inlineCode",{parentName:"p"},"uploadForm.submit"),".")),(0,r.kt)("h2",{id:"usage"},"Usage"),(0,r.kt)("p",null,"Every component and view extending ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractComponent")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractPureComponent")," has access to ",(0,r.kt)("inlineCode",{parentName:"p"},"localize")," method from within its instance. This method is alias to a ",(0,r.kt)("inlineCode",{parentName:"p"},"get")," method from the Dictionary instance and takes 2 arguments:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"key")," - namespace and name of the localization string -> if you have ",(0,r.kt)("inlineCode",{parentName:"li"},"resultTitle")," string in file ",(0,r.kt)("inlineCode",{parentName:"li"},"pollVoteEN.json")," the key to this string would be ",(0,r.kt)("inlineCode",{parentName:"li"},"pollVote.resultTitle"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"parameters")," - Optional object with replacements and parameters for ",(0,r.kt)("a",{parentName:"li",href:"http://messageformat.github.io/messageformat/"},"messageformat")," syntax. For more info about the syntax check out ",(0,r.kt)("a",{parentName:"li",href:"http://userguide.icu-project.org/formatparse/messages"},"ICU guide"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"import { AbstractPureComponent } from '@ima/react-page-renderer';\n\nclass PollVote extends AbstractPureComponent {\n render() {\n return (\n
\n {this.localize('pollVote.resultTitle')}\n {this.localize('pollVote.result.voted', {count: 3})}\n
\n );\n }\n}\n")),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Use ",(0,r.kt)("inlineCode",{parentName:"p"},"useComponent().localize")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"useLocalize()")," hooks in functional components."),(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-jsx"},"import { useComponent, useLocalize } from '@ima/react-page-renderer';\n\nfunction PollVote() {\n // const { localize } = useComponent();\n const localize = useLocalize();\n\n return (\n
\n {localize('pollVote.resultTitle')}\n {localize('pollVote.result.voted', {count: 3})}\n
\n );\n}\n"))),(0,r.kt)("h2",{id:"messageformat-library"},"Messageformat library"),(0,r.kt)("p",null,"For more information on the available selectors, formatters, and other details, please see ",(0,r.kt)("a",{parentName:"p",href:"http://messageformat.github.io/messageformat/guide/"},"Format guide"),"."),(0,r.kt)("p",null,"Dictionary is also registered in ",(0,r.kt)("a",{parentName:"p",href:"/basic-features/object-container"},"Object Container")," and thus can be obtained in Controllers, Extensions and other classes constructed through OC."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2c83167a.5f8dadf2.js b/assets/js/2c83167a.7ad9c4f6.js similarity index 97% rename from assets/js/2c83167a.5f8dadf2.js rename to assets/js/2c83167a.7ad9c4f6.js index 7e1260c55c..8d8552cda2 100644 --- a/assets/js/2c83167a.5f8dadf2.js +++ b/assets/js/2c83167a.7ad9c4f6.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[856],{3905:(e,t,a)=>{a.d(t,{Zo:()=>m,kt:()=>h});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),d=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},m=function(e){var t=d(e.components);return n.createElement(s.Provider,{value:t},e.children)},k="mdxType",o={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),k=d(a),c=r,h=k["".concat(s,".").concat(c)]||k[c]||o[c]||i;return a?n.createElement(h,l(l({ref:t},m),{},{components:a})):n.createElement(h,l({ref:t},m))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=c;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[k]="string"==typeof e?e:r,l[1]=p;for(var d=2;d{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>o,frontMatter:()=>i,metadata:()=>p,toc:()=>d});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_core.Dispatcher",title:"Class: Dispatcher",sidebar_label:"@ima/core.Dispatcher",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_core.Dispatcher",id:"api/classes/ima_core.Dispatcher",title:"Class: Dispatcher",description:"@ima/core.Dispatcher",source:"@site/../docs/api/classes/ima_core.Dispatcher.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.Dispatcher",permalink:"/api/classes/ima_core.Dispatcher",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.Dispatcher",title:"Class: Dispatcher",sidebar_label:"@ima/core.Dispatcher",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.Dictionary",permalink:"/api/classes/ima_core.Dictionary"},next:{title:"@ima/core.DispatcherImpl",permalink:"/api/classes/ima_core.DispatcherImpl"}},s={},d=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Methods",id:"methods",level:2},{value:"clear",id:"clear",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"fire",id:"fire",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"listen",id:"listen",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"listenAll",id:"listenall",level:3},{value:"Type parameters",id:"type-parameters-2",level:4},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"unlisten",id:"unlisten",level:3},{value:"Type parameters",id:"type-parameters-3",level:4},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-7",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-8",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"unlistenAll",id:"unlistenall",level:3},{value:"Type parameters",id:"type-parameters-4",level:4},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-9",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-10",level:4},{value:"Defined in",id:"defined-in-10",level:4}],m={toc:d},k="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".Dispatcher"),(0,r.kt)("p",null,"A Dispatcher is a utility that manager event listeners registered for events\nand allows distributing (firing) events to the listeners registered for the\ngiven event."),(0,r.kt)("p",null,"The dispatcher provides a single-node event bus and is usually used to\npropagate events from controllers to UI components when modifying/passing\nthe state is impractical for any reason."),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Dispatcher"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.DispatcherImpl"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherImpl"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.DispatcherImpl"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherImpl"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new Dispatcher"),"()"),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"clear"},"clear"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"clear"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"Deregisters all event listeners currently registered with this\ndispatcher."),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/Dispatcher.ts#L32"},"packages/core/src/event/Dispatcher.ts:32")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"fire"},"fire"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"fire"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"data"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"Fires a new event of the specified name, carrying the provided data."),(0,r.kt)("p",null,"The method will synchronously execute all event listeners registered for\nthe specified event, passing the provided data to them as the first\nargument."),(0,r.kt)("p",null,"It will also execute all event listeners registered to listen to all events."),(0,r.kt)("p",null,"Note that this method does not prevent the event listeners to modify the\ndata in any way. The order in which the event listeners will be executed\nis unspecified and should not be relied upon."),(0,r.kt)("h4",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")))))),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the event to fire.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")),"[",(0,r.kt)("inlineCode",{parentName:"td"},"E"),"]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The data to pass to the event listeners.")))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"This dispatcher."),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/Dispatcher.ts#L159"},"packages/core/src/event/Dispatcher.ts:159")),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"fire"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"data"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/Dispatcher.ts#L163"},"packages/core/src/event/Dispatcher.ts:163")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"listen"},"listen"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"listen"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"Registers the provided event listener to be executed when the specified\nevent is fired on this dispatcher."),(0,r.kt)("p",null,"When the specified event is fired, the event listener will be executed\nwith the data passed with the event as the first argument."),(0,r.kt)("p",null,"The order in which the event listeners will be executed is unspecified\nand should not be relied upon. Registering the same listener for the\nsame event and with the same scope multiple times has no effect."),(0,r.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")))))),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the event to listen for.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dispatcherlistener"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherListener")),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")),"[",(0,r.kt)("inlineCode",{parentName:"td"},"E"),"]",">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The event listener to register.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The object to which the ",(0,r.kt)("inlineCode",{parentName:"td"},"this")," keyword will be bound in the event listener.")))),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"This dispatcher."),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/Dispatcher.ts#L53"},"packages/core/src/event/Dispatcher.ts:53")),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"listen"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dispatcherlistener"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherListener")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/Dispatcher.ts#L58"},"packages/core/src/event/Dispatcher.ts:58")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"listenall"},"listenAll"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"listenAll"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"Registers the provided event listener to be executed when any event is fired\non this dispatcher."),(0,r.kt)("p",null,"When any event is fired, the event listener will be executed with the data\npassed with the event as the first argument."),(0,r.kt)("p",null,"The order in which the event listeners will be executed is unspecified\nand should not be relied upon. Registering the same listener with the same\nscope multiple times has no effect."),(0,r.kt)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")))))),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"DispatcherListenerAll"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")),"[",(0,r.kt)("inlineCode",{parentName:"td"},"E"),"]",">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The event listener to register.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The object to which the ",(0,r.kt)("inlineCode",{parentName:"td"},"this")," keyword will be bound in the event listener.")))),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"This dispatcher."),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/Dispatcher.ts#L87"},"packages/core/src/event/Dispatcher.ts:87")),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"listenAll"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"DispatcherListenerAll"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/Dispatcher.ts#L91"},"packages/core/src/event/Dispatcher.ts:91")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unlisten"},"unlisten"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"unlisten"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"Deregisters the provided event listener, so it will no longer be\nexecuted with the specified scope when the specified event is fired."),(0,r.kt)("h4",{id:"type-parameters-3"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")))))),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the event for which the listener should be deregistered.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dispatcherlistener"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherListener")),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")),"[",(0,r.kt)("inlineCode",{parentName:"td"},"E"),"]",">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The event listener to deregister.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The object to which the ",(0,r.kt)("inlineCode",{parentName:"td"},"this")," keyword would be bound in the event listener.")))),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"This dispatcher."),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/Dispatcher.ts#L107"},"packages/core/src/event/Dispatcher.ts:107")),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"unlisten"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dispatcherlistener"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherListener")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/Dispatcher.ts#L112"},"packages/core/src/event/Dispatcher.ts:112")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unlistenall"},"unlistenAll"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"unlistenAll"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"Deregisters the provided event listener, so it will no longer be\nexecuted when any event is fired."),(0,r.kt)("h4",{id:"type-parameters-4"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")))))),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"DispatcherListenerAll"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")),"[",(0,r.kt)("inlineCode",{parentName:"td"},"E"),"]",">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The event listener function to deregister for all events.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Optional. The object to which the ",(0,r.kt)("inlineCode",{parentName:"td"},"this")," keyword would be bound in the event listener.")))),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"This dispatcher instance."),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/Dispatcher.ts#L133"},"packages/core/src/event/Dispatcher.ts:133")),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"unlistenAll"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"DispatcherListenerAll"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/event/Dispatcher.ts#L137"},"packages/core/src/event/Dispatcher.ts:137")))}o.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[856],{3905:(e,t,a)=>{a.d(t,{Zo:()=>m,kt:()=>h});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),d=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},m=function(e){var t=d(e.components);return n.createElement(s.Provider,{value:t},e.children)},k="mdxType",o={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),k=d(a),c=r,h=k["".concat(s,".").concat(c)]||k[c]||o[c]||i;return a?n.createElement(h,l(l({ref:t},m),{},{components:a})):n.createElement(h,l({ref:t},m))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=c;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[k]="string"==typeof e?e:r,l[1]=p;for(var d=2;d{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>o,frontMatter:()=>i,metadata:()=>p,toc:()=>d});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_core.Dispatcher",title:"Class: Dispatcher",sidebar_label:"@ima/core.Dispatcher",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_core.Dispatcher",id:"api/classes/ima_core.Dispatcher",title:"Class: Dispatcher",description:"@ima/core.Dispatcher",source:"@site/../docs/api/classes/ima_core.Dispatcher.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.Dispatcher",permalink:"/api/classes/ima_core.Dispatcher",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.Dispatcher",title:"Class: Dispatcher",sidebar_label:"@ima/core.Dispatcher",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.Dictionary",permalink:"/api/classes/ima_core.Dictionary"},next:{title:"@ima/core.DispatcherImpl",permalink:"/api/classes/ima_core.DispatcherImpl"}},s={},d=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Methods",id:"methods",level:2},{value:"clear",id:"clear",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"fire",id:"fire",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"listen",id:"listen",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-3",level:4},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"listenAll",id:"listenall",level:3},{value:"Type parameters",id:"type-parameters-2",level:4},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-6",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"unlisten",id:"unlisten",level:3},{value:"Type parameters",id:"type-parameters-3",level:4},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-7",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-8",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"unlistenAll",id:"unlistenall",level:3},{value:"Type parameters",id:"type-parameters-4",level:4},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-9",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-10",level:4},{value:"Defined in",id:"defined-in-10",level:4}],m={toc:d},k="wrapper";function o(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".Dispatcher"),(0,r.kt)("p",null,"A Dispatcher is a utility that manager event listeners registered for events\nand allows distributing (firing) events to the listeners registered for the\ngiven event."),(0,r.kt)("p",null,"The dispatcher provides a single-node event bus and is usually used to\npropagate events from controllers to UI components when modifying/passing\nthe state is impractical for any reason."),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Dispatcher"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.DispatcherImpl"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherImpl"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.DispatcherImpl"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherImpl"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new Dispatcher"),"()"),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"clear"},"clear"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"clear"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"Deregisters all event listeners currently registered with this\ndispatcher."),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/Dispatcher.ts#L32"},"packages/core/src/event/Dispatcher.ts:32")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"fire"},"fire"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"fire"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"data"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"Fires a new event of the specified name, carrying the provided data."),(0,r.kt)("p",null,"The method will synchronously execute all event listeners registered for\nthe specified event, passing the provided data to them as the first\nargument."),(0,r.kt)("p",null,"It will also execute all event listeners registered to listen to all events."),(0,r.kt)("p",null,"Note that this method does not prevent the event listeners to modify the\ndata in any way. The order in which the event listeners will be executed\nis unspecified and should not be relied upon."),(0,r.kt)("h4",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")))))),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the event to fire.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")),"[",(0,r.kt)("inlineCode",{parentName:"td"},"E"),"]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The data to pass to the event listeners.")))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"This dispatcher."),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/Dispatcher.ts#L159"},"packages/core/src/event/Dispatcher.ts:159")),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"fire"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"data"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"data")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"any"))))),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/Dispatcher.ts#L163"},"packages/core/src/event/Dispatcher.ts:163")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"listen"},"listen"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"listen"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"Registers the provided event listener to be executed when the specified\nevent is fired on this dispatcher."),(0,r.kt)("p",null,"When the specified event is fired, the event listener will be executed\nwith the data passed with the event as the first argument."),(0,r.kt)("p",null,"The order in which the event listeners will be executed is unspecified\nand should not be relied upon. Registering the same listener for the\nsame event and with the same scope multiple times has no effect."),(0,r.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")))))),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the event to listen for.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dispatcherlistener"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherListener")),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")),"[",(0,r.kt)("inlineCode",{parentName:"td"},"E"),"]",">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The event listener to register.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The object to which the ",(0,r.kt)("inlineCode",{parentName:"td"},"this")," keyword will be bound in the event listener.")))),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"This dispatcher."),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/Dispatcher.ts#L53"},"packages/core/src/event/Dispatcher.ts:53")),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"listen"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dispatcherlistener"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherListener")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/Dispatcher.ts#L58"},"packages/core/src/event/Dispatcher.ts:58")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"listenall"},"listenAll"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"listenAll"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"Registers the provided event listener to be executed when any event is fired\non this dispatcher."),(0,r.kt)("p",null,"When any event is fired, the event listener will be executed with the data\npassed with the event as the first argument."),(0,r.kt)("p",null,"The order in which the event listeners will be executed is unspecified\nand should not be relied upon. Registering the same listener with the same\nscope multiple times has no effect."),(0,r.kt)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")))))),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"DispatcherListenerAll"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")),"[",(0,r.kt)("inlineCode",{parentName:"td"},"E"),"]",">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The event listener to register.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The object to which the ",(0,r.kt)("inlineCode",{parentName:"td"},"this")," keyword will be bound in the event listener.")))),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"This dispatcher."),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/Dispatcher.ts#L87"},"packages/core/src/event/Dispatcher.ts:87")),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"listenAll"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"DispatcherListenerAll"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/Dispatcher.ts#L91"},"packages/core/src/event/Dispatcher.ts:91")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unlisten"},"unlisten"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"unlisten"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"Deregisters the provided event listener, so it will no longer be\nexecuted with the specified scope when the specified event is fired."),(0,r.kt)("h4",{id:"type-parameters-3"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")))))),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The name of the event for which the listener should be deregistered.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dispatcherlistener"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherListener")),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")),"[",(0,r.kt)("inlineCode",{parentName:"td"},"E"),"]",">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The event listener to deregister.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The object to which the ",(0,r.kt)("inlineCode",{parentName:"td"},"this")," keyword would be bound in the event listener.")))),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"This dispatcher."),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/Dispatcher.ts#L107"},"packages/core/src/event/Dispatcher.ts:107")),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"unlisten"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"event"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"event")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#dispatcherlistener"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherListener")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/Dispatcher.ts#L112"},"packages/core/src/event/Dispatcher.ts:112")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"unlistenall"},"unlistenAll"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"unlistenAll"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"E"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"Deregisters the provided event listener, so it will no longer be\nexecuted when any event is fired."),(0,r.kt)("h4",{id:"type-parameters-4"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"E")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends keyof ",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")))))),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"DispatcherListenerAll"),"<",(0,r.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.DispatcherEventsMap"},(0,r.kt)("inlineCode",{parentName:"a"},"DispatcherEventsMap")),"[",(0,r.kt)("inlineCode",{parentName:"td"},"E"),"]",">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The event listener function to deregister for all events.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Optional. The object to which the ",(0,r.kt)("inlineCode",{parentName:"td"},"this")," keyword would be bound in the event listener.")))),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("p",null,"This dispatcher instance."),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/Dispatcher.ts#L133"},"packages/core/src/event/Dispatcher.ts:133")),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"unlistenAll"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"listener"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"scope?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"listener")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"DispatcherListenerAll"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"any"),">")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"scope?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"unknown"))))),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/event/Dispatcher.ts#L137"},"packages/core/src/event/Dispatcher.ts:137")))}o.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2ca52c80.3343b3e4.js b/assets/js/2ca52c80.39f587d7.js similarity index 96% rename from assets/js/2ca52c80.3343b3e4.js rename to assets/js/2ca52c80.39f587d7.js index 53853e740a..9c009e97b9 100644 --- a/assets/js/2ca52c80.3343b3e4.js +++ b/assets/js/2ca52c80.39f587d7.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4648],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>u});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function s(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),p=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},d=function(e){var t=p(e.components);return n.createElement(o.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},k=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),c=p(a),k=r,u=c["".concat(o,".").concat(k)]||c[k]||m[k]||i;return a?n.createElement(u,s(s({ref:t},d),{},{components:a})):n.createElement(u,s({ref:t},d))}));function u(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,s=new Array(i);s[0]=k;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l[c]="string"==typeof e?e:r,s[1]=l;for(var p=2;p{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>s,default:()=>m,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_core.AbstractExtension",title:"Class: AbstractExtension",sidebar_label:"@ima/core.AbstractExtension",custom_edit_url:null},s=void 0,l={unversionedId:"api/classes/ima_core.AbstractExtension",id:"api/classes/ima_core.AbstractExtension",title:"Class: AbstractExtension",description:"@ima/core.AbstractExtension",source:"@site/../docs/api/classes/ima_core.AbstractExtension.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.AbstractExtension",permalink:"/api/classes/ima_core.AbstractExtension",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.AbstractExtension",title:"Class: AbstractExtension",sidebar_label:"@ima/core.AbstractExtension",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.AbstractExecution",permalink:"/api/classes/ima_core.AbstractExecution"},next:{title:"@ima/core.AbstractPageManager",permalink:"/api/classes/ima_core.AbstractPageManager"}},o={},p=[{value:"Type parameters",id:"type-parameters",level:2},{value:"Hierarchy",id:"hierarchy",level:2},{value:"Indexable",id:"indexable",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Inherited from",id:"inherited-from",level:4},{value:"Properties",id:"properties",level:2},{value:"_pageStateManager",id:"_pagestatemanager",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"_partialStateSymbol",id:"_partialstatesymbol",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"_usingStateManager",id:"_usingstatemanager",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"params",id:"params",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"status",id:"status",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"$dependencies",id:"dependencies",level:3},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"$name",id:"name",level:3},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"Methods",id:"methods",level:2},{value:"activate",id:"activate",level:3},{value:"Returns",id:"returns",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"beginStateTransaction",id:"beginstatetransaction",level:3},{value:"Returns",id:"returns-1",level:4},{value:"Overrides",id:"overrides-3",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"cancelStateTransaction",id:"cancelstatetransaction",level:3},{value:"Returns",id:"returns-2",level:4},{value:"Overrides",id:"overrides-4",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"clearPartialState",id:"clearpartialstate",level:3},{value:"Returns",id:"returns-3",level:4},{value:"Overrides",id:"overrides-5",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"commitStateTransaction",id:"commitstatetransaction",level:3},{value:"Returns",id:"returns-4",level:4},{value:"Overrides",id:"overrides-6",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"deactivate",id:"deactivate",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Overrides",id:"overrides-7",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"destroy",id:"destroy",level:3},{value:"Returns",id:"returns-6",level:4},{value:"Overrides",id:"overrides-8",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"getAllowedStateKeys",id:"getallowedstatekeys",level:3},{value:"Returns",id:"returns-7",level:4},{value:"Overrides",id:"overrides-9",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"getHttpStatus",id:"gethttpstatus",level:3},{value:"Returns",id:"returns-8",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"getPartialState",id:"getpartialstate",level:3},{value:"Returns",id:"returns-9",level:4},{value:"Overrides",id:"overrides-10",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"getRouteParams",id:"getrouteparams",level:3},{value:"Returns",id:"returns-10",level:4},{value:"Overrides",id:"overrides-11",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"getState",id:"getstate",level:3},{value:"Returns",id:"returns-11",level:4},{value:"Overrides",id:"overrides-12",level:4},{value:"Defined in",id:"defined-in-18",level:4},{value:"init",id:"init",level:3},{value:"Returns",id:"returns-12",level:4},{value:"Overrides",id:"overrides-13",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"load",id:"load",level:3},{value:"Returns",id:"returns-13",level:4},{value:"Overrides",id:"overrides-14",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"setPageStateManager",id:"setpagestatemanager",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns-14",level:4},{value:"Overrides",id:"overrides-15",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"setPartialState",id:"setpartialstate",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-15",level:4},{value:"Overrides",id:"overrides-16",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"setRouteParams",id:"setrouteparams",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-16",level:4},{value:"Overrides",id:"overrides-17",level:4},{value:"Defined in",id:"defined-in-23",level:4},{value:"setState",id:"setstate",level:3},{value:"Type parameters",id:"type-parameters-2",level:4},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-17",level:4},{value:"Overrides",id:"overrides-18",level:4},{value:"Defined in",id:"defined-in-24",level:4},{value:"switchToPartialState",id:"switchtopartialstate",level:3},{value:"Returns",id:"returns-18",level:4},{value:"Overrides",id:"overrides-19",level:4},{value:"Defined in",id:"defined-in-25",level:4},{value:"switchToStateManager",id:"switchtostatemanager",level:3},{value:"Returns",id:"returns-19",level:4},{value:"Overrides",id:"overrides-20",level:4},{value:"Defined in",id:"defined-in-26",level:4},{value:"update",id:"update",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-20",level:4},{value:"Overrides",id:"overrides-21",level:4},{value:"Defined in",id:"defined-in-27",level:4}],d={toc:p},c="wrapper";function m(e){let{components:t,...a}=e;return(0,r.kt)(c,(0,n.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".AbstractExtension"),(0,r.kt)("p",null,"Abstract extension"),(0,r.kt)("h2",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#pagestate"},(0,r.kt)("inlineCode",{parentName:"a"},"PageState"))," = {}")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"R")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams"))," = {}")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"S")," = ",(0,r.kt)("inlineCode",{parentName:"td"},"S"))))),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"R"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">"),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"AbstractExtension"))))),(0,r.kt)("h2",{id:"indexable"},"Indexable"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"PropertyKey"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"any")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#eventbuseventhandler"},(0,r.kt)("inlineCode",{parentName:"a"},"EventBusEventHandler"))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new AbstractExtension"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"R"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">","()"),(0,r.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#pagestate"},(0,r.kt)("inlineCode",{parentName:"a"},"PageState"))," = {}")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"R")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams"))," = {}")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#pagestate"},(0,r.kt)("inlineCode",{parentName:"a"},"PageState"))," = ",(0,r.kt)("inlineCode",{parentName:"td"},"S"))))),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#constructor"},"constructor")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"_pagestatemanager"},"_","pageStateManager"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"_","pageStateManager"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},(0,r.kt)("inlineCode",{parentName:"a"},"PageStateManager")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">"),(0,r.kt)("p",null,"State manager."),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L24"},"packages/core/src/extension/AbstractExtension.ts:24")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_partialstatesymbol"},"_","partialStateSymbol"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","partialStateSymbol"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"symbol")),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L30"},"packages/core/src/extension/AbstractExtension.ts:30")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_usingstatemanager"},"_","usingStateManager"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","usingStateManager"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"false")),(0,r.kt)("p",null,"Flag indicating whether the PageStateManager should be used instead\nof partial state."),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L29"},"packages/core/src/extension/AbstractExtension.ts:29")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"params"},"params"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"params"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"R")),(0,r.kt)("p",null,"The route parameters extracted from the current route."),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L39"},"packages/core/src/extension/AbstractExtension.ts:39")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"status"},"status"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"status"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"200")),(0,r.kt)("p",null,"The HTTP response code to send to the client."),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L35"},"packages/core/src/extension/AbstractExtension.ts:35")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"dependencies"},"$dependencies"),(0,r.kt)("p",null,"\u25aa ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("strong",{parentName:"p"},"$dependencies"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#$dependencies"},"$dependencies")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L17"},"packages/core/src/extension/AbstractExtension.ts:17")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"name"},"$name"),(0,r.kt)("p",null,"\u25aa ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"$name"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"overrides-1"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#$name"},"$name")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L16"},"packages/core/src/extension/AbstractExtension.ts:16")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"activate"},"activate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"activate"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Callback for activating the extension in the UI. This is the last\nmethod invoked during controller (and extensions) initialization, called\nafter all the promises returned from the ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#load"},"load")," method have\nbeen resolved and the controller has configured the meta manager."),(0,r.kt)("p",null,"The extension may register any React and DOM event listeners in this\nmethod. The extension may start receiving event bus event after this\nmethod completes."),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"overrides-2"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#activate"},"activate")),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L58"},"packages/core/src/extension/AbstractExtension.ts:58")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"beginstatetransaction"},"beginStateTransaction"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"beginStateTransaction"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Starts queueing state patches off the controller state. While the transaction\nis active every ",(0,r.kt)("inlineCode",{parentName:"p"},"setState")," call has no effect on the current state."),(0,r.kt)("p",null,"Note that call to ",(0,r.kt)("inlineCode",{parentName:"p"},"getState")," after the transaction has begun will\nreturn state as it was before the transaction."),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-3"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#beginstatetransaction"},"beginStateTransaction")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L109"},"packages/core/src/extension/AbstractExtension.ts:109")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cancelstatetransaction"},"cancelStateTransaction"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"cancelStateTransaction"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Cancels ongoing state transaction. Uncommitted state changes are lost."),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-4"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#cancelstatetransaction"},"cancelStateTransaction")),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L127"},"packages/core/src/extension/AbstractExtension.ts:127")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"clearpartialstate"},"clearPartialState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"clearPartialState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Clears the current partial state of the extension and sets it value to empty object."),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-5"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#clearpartialstate"},"clearPartialState")),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L155"},"packages/core/src/extension/AbstractExtension.ts:155")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"commitstatetransaction"},"commitStateTransaction"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"commitStateTransaction"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Applies queued state patches to the controller state. All patches are squashed\nand applied with one ",(0,r.kt)("inlineCode",{parentName:"p"},"setState")," call."),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-6"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#commitstatetransaction"},"commitStateTransaction")),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L118"},"packages/core/src/extension/AbstractExtension.ts:118")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"deactivate"},"deactivate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"deactivate"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Callback for deactivating the extension in the UI. This is the first\nmethod invoked during extension deinitialization. This usually happens\nwhen the user navigates to a different URL."),(0,r.kt)("p",null,"This method is the lifecycle counterpart of the ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#activate"},"activate"),"\nmethod."),(0,r.kt)("p",null,"The extension should deregister listeners registered and release all\nresources obtained in the ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#activate"},"activate")," method."),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"overrides-7"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#deactivate"},"deactivate")),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L65"},"packages/core/src/extension/AbstractExtension.ts:65")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"destroy"},"destroy"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"destroy"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Finalization callback, called when the controller is being discarded by\nthe application. This usually happens when the user navigates to a\ndifferent URL."),(0,r.kt)("p",null,"This method is the lifecycle counterpart of the ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#init"},"init"),"\nmethod."),(0,r.kt)("p",null,"The extension should release all resources obtained in the\n",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#init"},"init")," method. The extension must release any resources\nthat might not be released automatically when the extensions's instance\nis destroyed by the garbage collector."),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"overrides-8"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#destroy"},"destroy")),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L51"},"packages/core/src/extension/AbstractExtension.ts:51")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getallowedstatekeys"},"getAllowedStateKeys"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getAllowedStateKeys"),"(): keyof ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),"[]"),(0,r.kt)("p",null,"Returns array of allowed state keys for extension."),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,"keyof ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),"[]"),(0,r.kt)("h4",{id:"overrides-9"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#getallowedstatekeys"},"getAllowedStateKeys")),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L204"},"packages/core/src/extension/AbstractExtension.ts:204")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"gethttpstatus"},"getHttpStatus"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getHttpStatus"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"number")),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"number")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Inherit Doc"))),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L197"},"packages/core/src/extension/AbstractExtension.ts:197")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getpartialstate"},"getPartialState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getPartialState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Partial"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">"),(0,r.kt)("p",null,"Returns the current partial state of the extension."),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Partial"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">"),(0,r.kt)("p",null,"The current partial state of the extension."),(0,r.kt)("h4",{id:"overrides-10"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#getpartialstate"},"getPartialState")),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L148"},"packages/core/src/extension/AbstractExtension.ts:148")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getrouteparams"},"getRouteParams"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getRouteParams"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"R")),(0,r.kt)("p",null,"Returns the current route parameters."),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"R")),(0,r.kt)("p",null,"The current route parameters."),(0,r.kt)("h4",{id:"overrides-11"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#getrouteparams"},"getRouteParams")),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L169"},"packages/core/src/extension/AbstractExtension.ts:169")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getstate"},"getState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"SS")),(0,r.kt)("p",null,"Returns the current state of the controller using this extension."),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"SS")),(0,r.kt)("p",null,"The current state of the controller."),(0,r.kt)("h4",{id:"overrides-12"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#getstate"},"getState")),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L98"},"packages/core/src/extension/AbstractExtension.ts:98")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"init"},"init"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"init"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Callback for initializing the controller extension after the route\nparameters have been set on this extension."),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"overrides-13"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#init"},"init")),(0,r.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L44"},"packages/core/src/extension/AbstractExtension.ts:44")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"load"},"load"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"load"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">"),(0,r.kt)("p",null,"Callback the extension uses to request the resources it needs to render\nits related parts of the view. This method is invoked after the\n",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#init"},"init")," method."),(0,r.kt)("p",null,"The extension should request all resources it needs in this method, and\nrepresent each resource request as a promise that will resolve once the\nresource is ready for use (these can be data fetched over HTTP(S),\ndatabase connections, etc)."),(0,r.kt)("p",null,"The method must return a plain flat object. The field names of the\nobject identify the resources being fetched and prepared, each value\nmust be either the resource (e.g. view configuration or a value\nretrieved synchronously) or a Promise that will resolve to the resource."),(0,r.kt)("p",null,"The IMA will use the object to set the state of the controller."),(0,r.kt)("p",null,"Any returned promise that gets rejected will redirect the application to\nthe error page. The error page that will be used depends on the status\ncode of the error."),(0,r.kt)("h4",{id:"returns-13"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">"),(0,r.kt)("p",null,"A map object of promises resolved when all resources the controller\nrequires are ready. The resolved values will be pushed to the\ncontroller's state."),(0,r.kt)("h4",{id:"overrides-14"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#load"},"load")),(0,r.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L72"},"packages/core/src/extension/AbstractExtension.ts:72")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setpagestatemanager"},"setPageStateManager"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setPageStateManager"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"pageStateManager?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Sets the state manager used to manage the controller's state.."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"pageStateManager?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.PageStateManager"},(0,r.kt)("inlineCode",{parentName:"a"},"PageStateManager")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"SS"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The current state manager to use.")))),(0,r.kt)("h4",{id:"returns-14"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-15"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#setpagestatemanager"},"setPageStateManager")),(0,r.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L176"},"packages/core/src/extension/AbstractExtension.ts:176")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setpartialstate"},"setPartialState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setPartialState"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"partialStatePatch"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Patches the partial state of the extension. The extension is able\nduring its load and update phase receive state from active controller\nusing this extension and from previously loaded/updated extensions."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"partialStatePatch")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Patch of the controller's state to apply.")))),(0,r.kt)("h4",{id:"returns-15"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-16"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#setpartialstate"},"setPartialState")),(0,r.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L136"},"packages/core/src/extension/AbstractExtension.ts:136")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setrouteparams"},"setRouteParams"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setRouteParams"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"params?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Sets the current route parameters. This method is invoked before the\n",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#init"},"init")," method."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"R")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The current route parameters.")))),(0,r.kt)("h4",{id:"returns-16"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-17"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#setrouteparams"},"setRouteParams")),(0,r.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L162"},"packages/core/src/extension/AbstractExtension.ts:162")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setstate"},"setState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setState"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"K"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"statePatch"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Patches the state of the controller using this extension by using the\nprovided object by copying the provided patch object fields to the\ncontroller's state object."),(0,r.kt)("p",null,"Note that the state is not patched recursively but by replacing the\nvalues of the top-level fields of the state object."),(0,r.kt)("p",null,"Note that the extension may modify only the fields of the state that it\nhas specified by its ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#getallowedstatekeys"},"getAllowedStateKeys")," method."),(0,r.kt)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"K")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"symbol"))))),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"statePatch")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"K"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"Patch of the controller's state to apply.")))),(0,r.kt)("h4",{id:"returns-17"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-18"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#setstate"},"setState")),(0,r.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L89"},"packages/core/src/extension/AbstractExtension.ts:89")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"switchtopartialstate"},"switchToPartialState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"switchToPartialState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Disables using PageStateManager for getting state."),(0,r.kt)("h4",{id:"returns-18"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-19"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#switchtopartialstate"},"switchToPartialState")),(0,r.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L190"},"packages/core/src/extension/AbstractExtension.ts:190")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"switchtostatemanager"},"switchToStateManager"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"switchToStateManager"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Enables using PageStateManager for getting state."),(0,r.kt)("h4",{id:"returns-19"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-20"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#switchtostatemanager"},"switchToStateManager")),(0,r.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L183"},"packages/core/src/extension/AbstractExtension.ts:183")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"update"},"update"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"update"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prevParams?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">"),(0,r.kt)("p",null,"Callback for updating the extension after a route update. This method\nis invoked if the current route has the ",(0,r.kt)("inlineCode",{parentName:"p"},"onlyUpdate")," flag set to ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," and\nthe current controller and view match those used by the previously active\nroute, or, the ",(0,r.kt)("inlineCode",{parentName:"p"},"onlyUpdate")," option of the current route is a callback and\nreturned ",(0,r.kt)("inlineCode",{parentName:"p"},"true"),"."),(0,r.kt)("p",null,"The method must return an object with the same semantics as the result\nof the ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#load"},"load")," method. The controller's state will then be\npatched by the returned object."),(0,r.kt)("p",null,"The other extension lifecycle callbacks (",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#init"},"init"),",\n",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#load"},"load"),", ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#activate"},"activate"),",\n",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#deactivate"},"deactivate"),", Extension#deinit) are not call in\ncase this method is used."),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevParams")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"R")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Previous route parameters.")))),(0,r.kt)("h4",{id:"returns-20"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">"),(0,r.kt)("p",null,"A map object of promises resolved when all resources the controller\nrequires are ready. The resolved values will be pushed to the\ncontroller's state."),(0,r.kt)("h4",{id:"overrides-21"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#update"},"update")),(0,r.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/extension/AbstractExtension.ts#L82"},"packages/core/src/extension/AbstractExtension.ts:82")))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4648],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>u});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function s(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),p=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},d=function(e){var t=p(e.components);return n.createElement(o.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},k=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),c=p(a),k=r,u=c["".concat(o,".").concat(k)]||c[k]||m[k]||i;return a?n.createElement(u,s(s({ref:t},d),{},{components:a})):n.createElement(u,s({ref:t},d))}));function u(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,s=new Array(i);s[0]=k;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l[c]="string"==typeof e?e:r,s[1]=l;for(var p=2;p{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>s,default:()=>m,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_core.AbstractExtension",title:"Class: AbstractExtension",sidebar_label:"@ima/core.AbstractExtension",custom_edit_url:null},s=void 0,l={unversionedId:"api/classes/ima_core.AbstractExtension",id:"api/classes/ima_core.AbstractExtension",title:"Class: AbstractExtension",description:"@ima/core.AbstractExtension",source:"@site/../docs/api/classes/ima_core.AbstractExtension.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.AbstractExtension",permalink:"/api/classes/ima_core.AbstractExtension",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.AbstractExtension",title:"Class: AbstractExtension",sidebar_label:"@ima/core.AbstractExtension",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.AbstractExecution",permalink:"/api/classes/ima_core.AbstractExecution"},next:{title:"@ima/core.AbstractPageManager",permalink:"/api/classes/ima_core.AbstractPageManager"}},o={},p=[{value:"Type parameters",id:"type-parameters",level:2},{value:"Hierarchy",id:"hierarchy",level:2},{value:"Indexable",id:"indexable",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Inherited from",id:"inherited-from",level:4},{value:"Properties",id:"properties",level:2},{value:"_pageStateManager",id:"_pagestatemanager",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"_partialStateSymbol",id:"_partialstatesymbol",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"_usingStateManager",id:"_usingstatemanager",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"params",id:"params",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"status",id:"status",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"$dependencies",id:"dependencies",level:3},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"$name",id:"name",level:3},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"Methods",id:"methods",level:2},{value:"activate",id:"activate",level:3},{value:"Returns",id:"returns",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"beginStateTransaction",id:"beginstatetransaction",level:3},{value:"Returns",id:"returns-1",level:4},{value:"Overrides",id:"overrides-3",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"cancelStateTransaction",id:"cancelstatetransaction",level:3},{value:"Returns",id:"returns-2",level:4},{value:"Overrides",id:"overrides-4",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"clearPartialState",id:"clearpartialstate",level:3},{value:"Returns",id:"returns-3",level:4},{value:"Overrides",id:"overrides-5",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"commitStateTransaction",id:"commitstatetransaction",level:3},{value:"Returns",id:"returns-4",level:4},{value:"Overrides",id:"overrides-6",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"deactivate",id:"deactivate",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Overrides",id:"overrides-7",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"destroy",id:"destroy",level:3},{value:"Returns",id:"returns-6",level:4},{value:"Overrides",id:"overrides-8",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"getAllowedStateKeys",id:"getallowedstatekeys",level:3},{value:"Returns",id:"returns-7",level:4},{value:"Overrides",id:"overrides-9",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"getHttpStatus",id:"gethttpstatus",level:3},{value:"Returns",id:"returns-8",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"getPartialState",id:"getpartialstate",level:3},{value:"Returns",id:"returns-9",level:4},{value:"Overrides",id:"overrides-10",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"getRouteParams",id:"getrouteparams",level:3},{value:"Returns",id:"returns-10",level:4},{value:"Overrides",id:"overrides-11",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"getState",id:"getstate",level:3},{value:"Returns",id:"returns-11",level:4},{value:"Overrides",id:"overrides-12",level:4},{value:"Defined in",id:"defined-in-18",level:4},{value:"init",id:"init",level:3},{value:"Returns",id:"returns-12",level:4},{value:"Overrides",id:"overrides-13",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"load",id:"load",level:3},{value:"Returns",id:"returns-13",level:4},{value:"Overrides",id:"overrides-14",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"setPageStateManager",id:"setpagestatemanager",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns-14",level:4},{value:"Overrides",id:"overrides-15",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"setPartialState",id:"setpartialstate",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-15",level:4},{value:"Overrides",id:"overrides-16",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"setRouteParams",id:"setrouteparams",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-16",level:4},{value:"Overrides",id:"overrides-17",level:4},{value:"Defined in",id:"defined-in-23",level:4},{value:"setState",id:"setstate",level:3},{value:"Type parameters",id:"type-parameters-2",level:4},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-17",level:4},{value:"Overrides",id:"overrides-18",level:4},{value:"Defined in",id:"defined-in-24",level:4},{value:"switchToPartialState",id:"switchtopartialstate",level:3},{value:"Returns",id:"returns-18",level:4},{value:"Overrides",id:"overrides-19",level:4},{value:"Defined in",id:"defined-in-25",level:4},{value:"switchToStateManager",id:"switchtostatemanager",level:3},{value:"Returns",id:"returns-19",level:4},{value:"Overrides",id:"overrides-20",level:4},{value:"Defined in",id:"defined-in-26",level:4},{value:"update",id:"update",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-20",level:4},{value:"Overrides",id:"overrides-21",level:4},{value:"Defined in",id:"defined-in-27",level:4}],d={toc:p},c="wrapper";function m(e){let{components:t,...a}=e;return(0,r.kt)(c,(0,n.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".AbstractExtension"),(0,r.kt)("p",null,"Abstract extension"),(0,r.kt)("h2",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#pagestate"},(0,r.kt)("inlineCode",{parentName:"a"},"PageState"))," = {}")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"R")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams"))," = {}")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"S")," = ",(0,r.kt)("inlineCode",{parentName:"td"},"S"))))),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},(0,r.kt)("inlineCode",{parentName:"a"},"Extension")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"R"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">"),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"AbstractExtension"))))),(0,r.kt)("h2",{id:"indexable"},"Indexable"),(0,r.kt)("p",null,"\u25aa ","[key: ",(0,r.kt)("inlineCode",{parentName:"p"},"PropertyKey"),"]",": ",(0,r.kt)("inlineCode",{parentName:"p"},"any")," ","|"," ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#eventbuseventhandler"},(0,r.kt)("inlineCode",{parentName:"a"},"EventBusEventHandler"))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new AbstractExtension"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"R"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">","()"),(0,r.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#pagestate"},(0,r.kt)("inlineCode",{parentName:"a"},"PageState"))," = {}")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"R")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#routeparams"},(0,r.kt)("inlineCode",{parentName:"a"},"RouteParams"))," = {}")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"SS")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#pagestate"},(0,r.kt)("inlineCode",{parentName:"a"},"PageState"))," = ",(0,r.kt)("inlineCode",{parentName:"td"},"S"))))),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#constructor"},"constructor")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"_pagestatemanager"},"_","pageStateManager"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"_","pageStateManager"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},(0,r.kt)("inlineCode",{parentName:"a"},"PageStateManager")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">"),(0,r.kt)("p",null,"State manager."),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L24"},"packages/core/src/extension/AbstractExtension.ts:24")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_partialstatesymbol"},"_","partialStateSymbol"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","partialStateSymbol"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"symbol")),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L30"},"packages/core/src/extension/AbstractExtension.ts:30")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_usingstatemanager"},"_","usingStateManager"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Protected")," ",(0,r.kt)("strong",{parentName:"p"},"_","usingStateManager"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"false")),(0,r.kt)("p",null,"Flag indicating whether the PageStateManager should be used instead\nof partial state."),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L29"},"packages/core/src/extension/AbstractExtension.ts:29")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"params"},"params"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"params"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"R")),(0,r.kt)("p",null,"The route parameters extracted from the current route."),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L39"},"packages/core/src/extension/AbstractExtension.ts:39")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"status"},"status"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"status"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"200")),(0,r.kt)("p",null,"The HTTP response code to send to the client."),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L35"},"packages/core/src/extension/AbstractExtension.ts:35")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"dependencies"},"$dependencies"),(0,r.kt)("p",null,"\u25aa ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("strong",{parentName:"p"},"$dependencies"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#$dependencies"},"$dependencies")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L17"},"packages/core/src/extension/AbstractExtension.ts:17")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"name"},"$name"),(0,r.kt)("p",null,"\u25aa ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"$name"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"overrides-1"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#$name"},"$name")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L16"},"packages/core/src/extension/AbstractExtension.ts:16")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"activate"},"activate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"activate"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Callback for activating the extension in the UI. This is the last\nmethod invoked during controller (and extensions) initialization, called\nafter all the promises returned from the ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#load"},"load")," method have\nbeen resolved and the controller has configured the meta manager."),(0,r.kt)("p",null,"The extension may register any React and DOM event listeners in this\nmethod. The extension may start receiving event bus event after this\nmethod completes."),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"overrides-2"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#activate"},"activate")),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L58"},"packages/core/src/extension/AbstractExtension.ts:58")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"beginstatetransaction"},"beginStateTransaction"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"beginStateTransaction"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Starts queueing state patches off the controller state. While the transaction\nis active every ",(0,r.kt)("inlineCode",{parentName:"p"},"setState")," call has no effect on the current state."),(0,r.kt)("p",null,"Note that call to ",(0,r.kt)("inlineCode",{parentName:"p"},"getState")," after the transaction has begun will\nreturn state as it was before the transaction."),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-3"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#beginstatetransaction"},"beginStateTransaction")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L109"},"packages/core/src/extension/AbstractExtension.ts:109")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"cancelstatetransaction"},"cancelStateTransaction"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"cancelStateTransaction"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Cancels ongoing state transaction. Uncommitted state changes are lost."),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-4"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#cancelstatetransaction"},"cancelStateTransaction")),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L127"},"packages/core/src/extension/AbstractExtension.ts:127")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"clearpartialstate"},"clearPartialState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"clearPartialState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Clears the current partial state of the extension and sets it value to empty object."),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-5"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#clearpartialstate"},"clearPartialState")),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L155"},"packages/core/src/extension/AbstractExtension.ts:155")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"commitstatetransaction"},"commitStateTransaction"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"commitStateTransaction"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Applies queued state patches to the controller state. All patches are squashed\nand applied with one ",(0,r.kt)("inlineCode",{parentName:"p"},"setState")," call."),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-6"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#commitstatetransaction"},"commitStateTransaction")),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L118"},"packages/core/src/extension/AbstractExtension.ts:118")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"deactivate"},"deactivate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"deactivate"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Callback for deactivating the extension in the UI. This is the first\nmethod invoked during extension deinitialization. This usually happens\nwhen the user navigates to a different URL."),(0,r.kt)("p",null,"This method is the lifecycle counterpart of the ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#activate"},"activate"),"\nmethod."),(0,r.kt)("p",null,"The extension should deregister listeners registered and release all\nresources obtained in the ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#activate"},"activate")," method."),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"overrides-7"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#deactivate"},"deactivate")),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L65"},"packages/core/src/extension/AbstractExtension.ts:65")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"destroy"},"destroy"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"destroy"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Finalization callback, called when the controller is being discarded by\nthe application. This usually happens when the user navigates to a\ndifferent URL."),(0,r.kt)("p",null,"This method is the lifecycle counterpart of the ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#init"},"init"),"\nmethod."),(0,r.kt)("p",null,"The extension should release all resources obtained in the\n",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#init"},"init")," method. The extension must release any resources\nthat might not be released automatically when the extensions's instance\nis destroyed by the garbage collector."),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"overrides-8"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#destroy"},"destroy")),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L51"},"packages/core/src/extension/AbstractExtension.ts:51")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getallowedstatekeys"},"getAllowedStateKeys"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getAllowedStateKeys"),"(): keyof ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),"[]"),(0,r.kt)("p",null,"Returns array of allowed state keys for extension."),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,"keyof ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),"[]"),(0,r.kt)("h4",{id:"overrides-9"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#getallowedstatekeys"},"getAllowedStateKeys")),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L204"},"packages/core/src/extension/AbstractExtension.ts:204")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"gethttpstatus"},"getHttpStatus"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getHttpStatus"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"number")),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"number")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Inherit Doc"))),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L197"},"packages/core/src/extension/AbstractExtension.ts:197")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getpartialstate"},"getPartialState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getPartialState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Partial"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">"),(0,r.kt)("p",null,"Returns the current partial state of the extension."),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Partial"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"SS"),">"),(0,r.kt)("p",null,"The current partial state of the extension."),(0,r.kt)("h4",{id:"overrides-10"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#getpartialstate"},"getPartialState")),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L148"},"packages/core/src/extension/AbstractExtension.ts:148")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getrouteparams"},"getRouteParams"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getRouteParams"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"R")),(0,r.kt)("p",null,"Returns the current route parameters."),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"R")),(0,r.kt)("p",null,"The current route parameters."),(0,r.kt)("h4",{id:"overrides-11"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#getrouteparams"},"getRouteParams")),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L169"},"packages/core/src/extension/AbstractExtension.ts:169")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getstate"},"getState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"SS")),(0,r.kt)("p",null,"Returns the current state of the controller using this extension."),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"SS")),(0,r.kt)("p",null,"The current state of the controller."),(0,r.kt)("h4",{id:"overrides-12"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#getstate"},"getState")),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L98"},"packages/core/src/extension/AbstractExtension.ts:98")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"init"},"init"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"init"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("p",null,"Callback for initializing the controller extension after the route\nparameters have been set on this extension."),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,r.kt)("h4",{id:"overrides-13"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#init"},"init")),(0,r.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L44"},"packages/core/src/extension/AbstractExtension.ts:44")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"load"},"load"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"load"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">"),(0,r.kt)("p",null,"Callback the extension uses to request the resources it needs to render\nits related parts of the view. This method is invoked after the\n",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#init"},"init")," method."),(0,r.kt)("p",null,"The extension should request all resources it needs in this method, and\nrepresent each resource request as a promise that will resolve once the\nresource is ready for use (these can be data fetched over HTTP(S),\ndatabase connections, etc)."),(0,r.kt)("p",null,"The method must return a plain flat object. The field names of the\nobject identify the resources being fetched and prepared, each value\nmust be either the resource (e.g. view configuration or a value\nretrieved synchronously) or a Promise that will resolve to the resource."),(0,r.kt)("p",null,"The IMA will use the object to set the state of the controller."),(0,r.kt)("p",null,"Any returned promise that gets rejected will redirect the application to\nthe error page. The error page that will be used depends on the status\ncode of the error."),(0,r.kt)("h4",{id:"returns-13"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">"),(0,r.kt)("p",null,"A map object of promises resolved when all resources the controller\nrequires are ready. The resolved values will be pushed to the\ncontroller's state."),(0,r.kt)("h4",{id:"overrides-14"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#load"},"load")),(0,r.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L72"},"packages/core/src/extension/AbstractExtension.ts:72")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setpagestatemanager"},"setPageStateManager"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setPageStateManager"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"pageStateManager?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Sets the state manager used to manage the controller's state.."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"pageStateManager?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.PageStateManager"},(0,r.kt)("inlineCode",{parentName:"a"},"PageStateManager")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"SS"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The current state manager to use.")))),(0,r.kt)("h4",{id:"returns-14"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-15"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#setpagestatemanager"},"setPageStateManager")),(0,r.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L176"},"packages/core/src/extension/AbstractExtension.ts:176")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setpartialstate"},"setPartialState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setPartialState"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"partialStatePatch"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Patches the partial state of the extension. The extension is able\nduring its load and update phase receive state from active controller\nusing this extension and from previously loaded/updated extensions."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"partialStatePatch")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Patch of the controller's state to apply.")))),(0,r.kt)("h4",{id:"returns-15"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-16"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#setpartialstate"},"setPartialState")),(0,r.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L136"},"packages/core/src/extension/AbstractExtension.ts:136")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setrouteparams"},"setRouteParams"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setRouteParams"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"params?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Sets the current route parameters. This method is invoked before the\n",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#init"},"init")," method."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"params")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"R")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The current route parameters.")))),(0,r.kt)("h4",{id:"returns-16"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-17"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#setrouteparams"},"setRouteParams")),(0,r.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L162"},"packages/core/src/extension/AbstractExtension.ts:162")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setstate"},"setState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setState"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"K"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"statePatch"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Patches the state of the controller using this extension by using the\nprovided object by copying the provided patch object fields to the\ncontroller's state object."),(0,r.kt)("p",null,"Note that the state is not patched recursively but by replacing the\nvalues of the top-level fields of the state object."),(0,r.kt)("p",null,"Note that the extension may modify only the fields of the state that it\nhas specified by its ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#getallowedstatekeys"},"getAllowedStateKeys")," method."),(0,r.kt)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"K")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"symbol"))))),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"statePatch")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"K"),">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"Patch of the controller's state to apply.")))),(0,r.kt)("h4",{id:"returns-17"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-18"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#setstate"},"setState")),(0,r.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L89"},"packages/core/src/extension/AbstractExtension.ts:89")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"switchtopartialstate"},"switchToPartialState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"switchToPartialState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Disables using PageStateManager for getting state."),(0,r.kt)("h4",{id:"returns-18"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-19"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#switchtopartialstate"},"switchToPartialState")),(0,r.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L190"},"packages/core/src/extension/AbstractExtension.ts:190")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"switchtostatemanager"},"switchToStateManager"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"switchToStateManager"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Enables using PageStateManager for getting state."),(0,r.kt)("h4",{id:"returns-19"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-20"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#switchtostatemanager"},"switchToStateManager")),(0,r.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L183"},"packages/core/src/extension/AbstractExtension.ts:183")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"update"},"update"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"update"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"prevParams?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">"),(0,r.kt)("p",null,"Callback for updating the extension after a route update. This method\nis invoked if the current route has the ",(0,r.kt)("inlineCode",{parentName:"p"},"onlyUpdate")," flag set to ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," and\nthe current controller and view match those used by the previously active\nroute, or, the ",(0,r.kt)("inlineCode",{parentName:"p"},"onlyUpdate")," option of the current route is a callback and\nreturned ",(0,r.kt)("inlineCode",{parentName:"p"},"true"),"."),(0,r.kt)("p",null,"The method must return an object with the same semantics as the result\nof the ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#load"},"load")," method. The controller's state will then be\npatched by the returned object."),(0,r.kt)("p",null,"The other extension lifecycle callbacks (",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#init"},"init"),",\n",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#load"},"load"),", ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#activate"},"activate"),",\n",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.AbstractExtension#deactivate"},"deactivate"),", Extension#deinit) are not call in\ncase this method is used."),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"prevParams")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"R")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Previous route parameters.")))),(0,r.kt)("h4",{id:"returns-20"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">"),(0,r.kt)("p",null,"A map object of promises resolved when all resources the controller\nrequires are ready. The resolved values will be pushed to the\ncontroller's state."),(0,r.kt)("h4",{id:"overrides-21"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension"},"Extension"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Extension#update"},"update")),(0,r.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/extension/AbstractExtension.ts#L82"},"packages/core/src/extension/AbstractExtension.ts:82")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2e35e39d.2fd20775.js b/assets/js/2e35e39d.e0cea43d.js similarity index 95% rename from assets/js/2e35e39d.2fd20775.js rename to assets/js/2e35e39d.e0cea43d.js index 28bedfcb4d..428f3d1f1c 100644 --- a/assets/js/2e35e39d.2fd20775.js +++ b/assets/js/2e35e39d.e0cea43d.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[5326],{3905:(e,a,t)=>{t.d(a,{Zo:()=>o,kt:()=>u});var n=t(7294);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function i(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var p=n.createContext({}),s=function(e){var a=n.useContext(p),t=a;return e&&(t="function"==typeof e?e(a):l(l({},a),e)),t},o=function(e){var a=s(e.components);return n.createElement(p.Provider,{value:a},e.children)},m="mdxType",k={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},c=n.forwardRef((function(e,a){var t=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,o=d(e,["components","mdxType","originalType","parentName"]),m=s(t),c=r,u=m["".concat(p,".").concat(c)]||m[c]||k[c]||i;return t?n.createElement(u,l(l({ref:a},o),{},{components:t})):n.createElement(u,l({ref:a},o))}));function u(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var i=t.length,l=new Array(i);l[0]=c;var d={};for(var p in a)hasOwnProperty.call(a,p)&&(d[p]=a[p]);d.originalType=e,d[m]="string"==typeof e?e:r,l[1]=d;for(var s=2;s{t.r(a),t.d(a,{assets:()=>p,contentTitle:()=>l,default:()=>k,frontMatter:()=>i,metadata:()=>d,toc:()=>s});var n=t(5773),r=(t(7294),t(3905));const i={id:"ima_core.PageMetaHandler",title:"Class: PageMetaHandler",sidebar_label:"@ima/core.PageMetaHandler",custom_edit_url:null},l=void 0,d={unversionedId:"api/classes/ima_core.PageMetaHandler",id:"api/classes/ima_core.PageMetaHandler",title:"Class: PageMetaHandler",description:"@ima/core.PageMetaHandler",source:"@site/../docs/api/classes/ima_core.PageMetaHandler.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.PageMetaHandler",permalink:"/api/classes/ima_core.PageMetaHandler",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.PageMetaHandler",title:"Class: PageMetaHandler",sidebar_label:"@ima/core.PageMetaHandler",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.PageManager",permalink:"/api/classes/ima_core.PageManager"},next:{title:"@ima/core.PageNavigationHandler",permalink:"/api/classes/ima_core.PageNavigationHandler"}},p={},s=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"#managed",id:"managed",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"#metaManager",id:"metamanager",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"#window",id:"window",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"Accessors",id:"accessors",level:2},{value:"$dependencies",id:"dependencies",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"Methods",id:"methods",level:2},{value:"#sanitizeValue",id:"sanitizevalue",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"#selectMetaTags",id:"selectmetatags",level:3},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"#updateMetaAttributes",id:"updatemetaattributes",level:3},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"#updateMetaTag",id:"updatemetatag",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"destroy",id:"destroy",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"handlePostManagedState",id:"handlepostmanagedstate",level:3},{value:"Returns",id:"returns-6",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"handlePreManagedState",id:"handlepremanagedstate",level:3},{value:"Returns",id:"returns-7",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"init",id:"init",level:3},{value:"Returns",id:"returns-8",level:4},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-12",level:4}],o={toc:s},m="wrapper";function k(e){let{components:a,...t}=e;return(0,r.kt)(m,(0,n.Z)({},o,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".PageMetaHandler"),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},(0,r.kt)("inlineCode",{parentName:"a"},"PageHandler"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"PageMetaHandler"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new PageMetaHandler"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"window"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"metaManager"),")"),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"window")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"metaManager")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.MetaManager"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaManager")))))),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#constructor"},"constructor")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageMetaHandler.ts#L21"},"packages/core/src/page/handler/PageMetaHandler.ts:21")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"managed"},"#managed"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#managed"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"false")),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageMetaHandler.ts#L15"},"packages/core/src/page/handler/PageMetaHandler.ts:15")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"metamanager"},"#metaManager"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#metaManager"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MetaManager"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaManager"))),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageMetaHandler.ts#L14"},"packages/core/src/page/handler/PageMetaHandler.ts:14")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"window"},"#window"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#window"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageMetaHandler.ts#L13"},"packages/core/src/page/handler/PageMetaHandler.ts:13")),(0,r.kt)("h2",{id:"accessors"},"Accessors"),(0,r.kt)("h3",{id:"dependencies"},"$dependencies"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("inlineCode",{parentName:"p"},"get")," ",(0,r.kt)("strong",{parentName:"p"},"$dependencies"),"(): (typeof ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))," ","|"," typeof ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MetaManager"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaManager")),")[]"),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,"(typeof ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))," ","|"," typeof ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MetaManager"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaManager")),")[]"),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageMetaHandler.ts#L17"},"packages/core/src/page/handler/PageMetaHandler.ts:17")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"sanitizevalue"},"#sanitizeValue"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#sanitizeValue"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"value"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#metavalue"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaValue")))))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageMetaHandler.ts#L124"},"packages/core/src/page/handler/PageMetaHandler.ts:124")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"selectmetatags"},"#selectMetaTags"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#selectMetaTags"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"NodeList")),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"NodeList")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageMetaHandler.ts#L128"},"packages/core/src/page/handler/PageMetaHandler.ts:128")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"updatemetaattributes"},"#updateMetaAttributes"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#updateMetaAttributes"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Update specified meta or link tags in DOM."),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageMetaHandler.ts#L59"},"packages/core/src/page/handler/PageMetaHandler.ts:59")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"updatemetatag"},"#updateMetaTag"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#updateMetaTag"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"K"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"iterator"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"tagName"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"keyName"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Helper to update specific meta tags in page document."),(0,r.kt)("h4",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"K")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#metamanagerrecordkeys"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaManagerRecordKeys")))))),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"iterator")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"never"),"[] ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"IterableIterator"),"<[",(0,r.kt)("inlineCode",{parentName:"td"},"string"),", ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#metamanagerrecord"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaManagerRecord")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"K"),">","]",">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"Collection of meta records to update.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"tagName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},'"link"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},'"meta"')),(0,r.kt)("td",{parentName:"tr",align:"left"},"Tag name for the given collection.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"keyName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},'"name"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},'"rel"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},'"property"')),(0,r.kt)("td",{parentName:"tr",align:"left"},"-")))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageMetaHandler.ts#L93"},"packages/core/src/page/handler/PageMetaHandler.ts:93")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"destroy"},"destroy"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"destroy"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Finalization callback, called when the page manager is being discarded.\nThis usually happens when the page is hot-reloaded at the client side."),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#destroy"},"destroy")),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageHandler.ts#L50"},"packages/core/src/page/handler/PageHandler.ts:50")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"handlepostmanagedstate"},"handlePostManagedState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"handlePostManagedState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called after a PageManager finishes transition from previous page to\na new one."),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-1"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#handlepostmanagedstate"},"handlePostManagedState")),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageMetaHandler.ts#L38"},"packages/core/src/page/handler/PageMetaHandler.ts:38")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"handlepremanagedstate"},"handlePreManagedState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"handlePreManagedState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called before a PageManager starts to transition from previous page to\na new one."),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-2"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#handlepremanagedstate"},"handlePreManagedState")),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageMetaHandler.ts#L31"},"packages/core/src/page/handler/PageMetaHandler.ts:31")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"init"},"init"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"init"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Initializes the page handler."),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#init"},"init")),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/handler/PageHandler.ts#L7"},"packages/core/src/page/handler/PageHandler.ts:7")))}k.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[5326],{3905:(e,a,t)=>{t.d(a,{Zo:()=>o,kt:()=>u});var n=t(7294);function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function i(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var p=n.createContext({}),s=function(e){var a=n.useContext(p),t=a;return e&&(t="function"==typeof e?e(a):l(l({},a),e)),t},o=function(e){var a=s(e.components);return n.createElement(p.Provider,{value:a},e.children)},m="mdxType",k={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},c=n.forwardRef((function(e,a){var t=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,o=d(e,["components","mdxType","originalType","parentName"]),m=s(t),c=r,u=m["".concat(p,".").concat(c)]||m[c]||k[c]||i;return t?n.createElement(u,l(l({ref:a},o),{},{components:t})):n.createElement(u,l({ref:a},o))}));function u(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var i=t.length,l=new Array(i);l[0]=c;var d={};for(var p in a)hasOwnProperty.call(a,p)&&(d[p]=a[p]);d.originalType=e,d[m]="string"==typeof e?e:r,l[1]=d;for(var s=2;s{t.r(a),t.d(a,{assets:()=>p,contentTitle:()=>l,default:()=>k,frontMatter:()=>i,metadata:()=>d,toc:()=>s});var n=t(5773),r=(t(7294),t(3905));const i={id:"ima_core.PageMetaHandler",title:"Class: PageMetaHandler",sidebar_label:"@ima/core.PageMetaHandler",custom_edit_url:null},l=void 0,d={unversionedId:"api/classes/ima_core.PageMetaHandler",id:"api/classes/ima_core.PageMetaHandler",title:"Class: PageMetaHandler",description:"@ima/core.PageMetaHandler",source:"@site/../docs/api/classes/ima_core.PageMetaHandler.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.PageMetaHandler",permalink:"/api/classes/ima_core.PageMetaHandler",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.PageMetaHandler",title:"Class: PageMetaHandler",sidebar_label:"@ima/core.PageMetaHandler",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.PageManager",permalink:"/api/classes/ima_core.PageManager"},next:{title:"@ima/core.PageNavigationHandler",permalink:"/api/classes/ima_core.PageNavigationHandler"}},p={},s=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"#managed",id:"managed",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"#metaManager",id:"metamanager",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"#window",id:"window",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"Accessors",id:"accessors",level:2},{value:"$dependencies",id:"dependencies",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-4",level:4},{value:"Methods",id:"methods",level:2},{value:"#sanitizeValue",id:"sanitizevalue",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-5",level:4},{value:"#selectMetaTags",id:"selectmetatags",level:3},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"#updateMetaAttributes",id:"updatemetaattributes",level:3},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"#updateMetaTag",id:"updatemetatag",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"destroy",id:"destroy",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"handlePostManagedState",id:"handlepostmanagedstate",level:3},{value:"Returns",id:"returns-6",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"handlePreManagedState",id:"handlepremanagedstate",level:3},{value:"Returns",id:"returns-7",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"init",id:"init",level:3},{value:"Returns",id:"returns-8",level:4},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"Defined in",id:"defined-in-12",level:4}],o={toc:s},m="wrapper";function k(e){let{components:a,...t}=e;return(0,r.kt)(m,(0,n.Z)({},o,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".PageMetaHandler"),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},(0,r.kt)("inlineCode",{parentName:"a"},"PageHandler"))),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"PageMetaHandler"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new PageMetaHandler"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"window"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"metaManager"),")"),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"window")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"metaManager")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.MetaManager"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaManager")))))),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#constructor"},"constructor")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageMetaHandler.ts#L21"},"packages/core/src/page/handler/PageMetaHandler.ts:21")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"managed"},"#managed"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#managed"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"false")),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageMetaHandler.ts#L15"},"packages/core/src/page/handler/PageMetaHandler.ts:15")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"metamanager"},"#metaManager"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#metaManager"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MetaManager"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaManager"))),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageMetaHandler.ts#L14"},"packages/core/src/page/handler/PageMetaHandler.ts:14")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"window"},"#window"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#window"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageMetaHandler.ts#L13"},"packages/core/src/page/handler/PageMetaHandler.ts:13")),(0,r.kt)("h2",{id:"accessors"},"Accessors"),(0,r.kt)("h3",{id:"dependencies"},"$dependencies"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("inlineCode",{parentName:"p"},"get")," ",(0,r.kt)("strong",{parentName:"p"},"$dependencies"),"(): (typeof ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))," ","|"," typeof ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MetaManager"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaManager")),")[]"),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,"(typeof ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))," ","|"," typeof ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.MetaManager"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaManager")),")[]"),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageMetaHandler.ts#L17"},"packages/core/src/page/handler/PageMetaHandler.ts:17")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"sanitizevalue"},"#sanitizeValue"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#sanitizeValue"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"value"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#metavalue"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaValue")))))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageMetaHandler.ts#L124"},"packages/core/src/page/handler/PageMetaHandler.ts:124")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"selectmetatags"},"#selectMetaTags"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#selectMetaTags"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"NodeList")),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"NodeList")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageMetaHandler.ts#L128"},"packages/core/src/page/handler/PageMetaHandler.ts:128")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"updatemetaattributes"},"#updateMetaAttributes"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#updateMetaAttributes"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Update specified meta or link tags in DOM."),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageMetaHandler.ts#L59"},"packages/core/src/page/handler/PageMetaHandler.ts:59")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"updatemetatag"},"#updateMetaTag"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#updateMetaTag"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"K"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"iterator"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"tagName"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"keyName"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Helper to update specific meta tags in page document."),(0,r.kt)("h4",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"K")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#metamanagerrecordkeys"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaManagerRecordKeys")))))),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"iterator")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"never"),"[] ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"IterableIterator"),"<[",(0,r.kt)("inlineCode",{parentName:"td"},"string"),", ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#metamanagerrecord"},(0,r.kt)("inlineCode",{parentName:"a"},"MetaManagerRecord")),"<",(0,r.kt)("inlineCode",{parentName:"td"},"K"),">","]",">"),(0,r.kt)("td",{parentName:"tr",align:"left"},"Collection of meta records to update.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"tagName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},'"link"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},'"meta"')),(0,r.kt)("td",{parentName:"tr",align:"left"},"Tag name for the given collection.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"keyName")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},'"name"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},'"rel"')," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},'"property"')),(0,r.kt)("td",{parentName:"tr",align:"left"},"-")))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageMetaHandler.ts#L93"},"packages/core/src/page/handler/PageMetaHandler.ts:93")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"destroy"},"destroy"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"destroy"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Finalization callback, called when the page manager is being discarded.\nThis usually happens when the page is hot-reloaded at the client side."),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#destroy"},"destroy")),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageHandler.ts#L50"},"packages/core/src/page/handler/PageHandler.ts:50")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"handlepostmanagedstate"},"handlePostManagedState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"handlePostManagedState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called after a PageManager finishes transition from previous page to\na new one."),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-1"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#handlepostmanagedstate"},"handlePostManagedState")),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageMetaHandler.ts#L38"},"packages/core/src/page/handler/PageMetaHandler.ts:38")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"handlepremanagedstate"},"handlePreManagedState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"handlePreManagedState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Called before a PageManager starts to transition from previous page to\na new one."),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-2"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#handlepremanagedstate"},"handlePreManagedState")),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageMetaHandler.ts#L31"},"packages/core/src/page/handler/PageMetaHandler.ts:31")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"init"},"init"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"init"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Initializes the page handler."),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from-1"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler"},"PageHandler"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageHandler#init"},"init")),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/handler/PageHandler.ts#L7"},"packages/core/src/page/handler/PageHandler.ts:7")))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2ece5d09.dd5c4254.js b/assets/js/2ece5d09.31114042.js similarity index 59% rename from assets/js/2ece5d09.dd5c4254.js rename to assets/js/2ece5d09.31114042.js index 1dd45e4260..8a6391731e 100644 --- a/assets/js/2ece5d09.dd5c4254.js +++ b/assets/js/2ece5d09.31114042.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[2387],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>b});var a=n(7294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var u=a.createContext({}),s=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=s(e.components);return a.createElement(u.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,l=e.mdxType,r=e.originalType,u=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),c=s(n),m=l,b=c["".concat(u,".").concat(m)]||c[m]||d[m]||r;return n?a.createElement(b,i(i({ref:t},p),{},{components:n})):a.createElement(b,i({ref:t},p))}));function b(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var r=n.length,i=new Array(r);i[0]=m;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o[c]="string"==typeof e?e:l,i[1]=o;for(var s=2;s{n.d(t,{Z:()=>i});var a=n(7294),l=n(8944);const r={tabItem:"tabItem_Ymn6"};function i(e){let{children:t,hidden:n,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,l.Z)(r.tabItem,i),hidden:n},t)}},6745:(e,t,n)=>{n.d(t,{Z:()=>w});var a=n(5773),l=n(7294),r=n(8944),i=n(2466),o=n(3620),u=n(1980),s=n(7392),p=n(12);function c(e){return function(e){return l.Children.map(e,(e=>{if(!e||(0,l.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:l}}=e;return{value:t,label:n,attributes:a,default:l}}))}function d(e){const{values:t,children:n}=e;return(0,l.useMemo)((()=>{const e=t??c(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const a=(0,o.k6)(),r=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,u._X)(r),(0,l.useCallback)((e=>{if(!r)return;const t=new URLSearchParams(a.location.search);t.set(r,e),a.replace({...a.location,search:t.toString()})}),[r,a])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,r=d(e),[i,o]=(0,l.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:r}))),[u,s]=b({queryString:n,groupId:a}),[c,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,r]=(0,p.Nk)(n);return[a,(0,l.useCallback)((e=>{n&&r.set(e)}),[n,r])]}({groupId:a}),g=(()=>{const e=u??c;return m({value:e,tabValues:r})?e:null})();(0,l.useLayoutEffect)((()=>{g&&o(g)}),[g]);return{selectedValue:i,selectValue:(0,l.useCallback)((e=>{if(!m({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);o(e),s(e),f(e)}),[s,f,r]),tabValues:r}}var g=n(2389);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function y(e){let{className:t,block:n,selectedValue:o,selectValue:u,tabValues:s}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.o5)(),d=e=>{const t=e.currentTarget,n=p.indexOf(t),a=s[n].value;a!==o&&(c(t),u(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=p.indexOf(e.currentTarget)+1;t=p[n]??p[0];break}case"ArrowLeft":{const n=p.indexOf(e.currentTarget)-1;t=p[n]??p[p.length-1];break}}t?.focus()};return l.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:i}=e;return l.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>p.push(e),onKeyDown:m,onClick:d},i,{className:(0,r.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),n??t)})))}function k(e){let{lazy:t,children:n,selectedValue:a}=e;const r=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=r.find((e=>e.props.value===a));return e?(0,l.cloneElement)(e,{className:"margin-top--md"}):null}return l.createElement("div",{className:"margin-top--md"},r.map(((e,t)=>(0,l.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=f(e);return l.createElement("div",{className:(0,r.Z)("tabs-container",h.tabList)},l.createElement(y,(0,a.Z)({},e,t)),l.createElement(k,(0,a.Z)({},e,t)))}function w(e){const t=(0,g.Z)();return l.createElement(v,(0,a.Z)({key:String(t)},e))}},2324:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>u,default:()=>b,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=n(5773),l=(n(7294),n(3905)),r=n(6745),i=n(1683);const o={title:"Analyze Plugin",description:"CLI > CLI Plugins and their API > Analyze Plugin"},u=void 0,s={unversionedId:"cli/plugins/analyze-plugin",id:"cli/plugins/analyze-plugin",title:"Analyze Plugin",description:"CLI > CLI Plugins and their API > Analyze Plugin",source:"@site/../docs/cli/plugins/analyze-plugin.md",sourceDirName:"cli/plugins",slug:"/cli/plugins/analyze-plugin",permalink:"/cli/plugins/analyze-plugin",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/cli/plugins/analyze-plugin.md",tags:[],version:"current",lastUpdatedBy:"Filip Satek",lastUpdatedAt:1734590310,formattedLastUpdatedAt:"Dec 19, 2024",frontMatter:{title:"Analyze Plugin",description:"CLI > CLI Plugins and their API > Analyze Plugin"},sidebar:"docs",previous:{title:"CLI Plugins API",permalink:"/cli/cli-plugins-api"},next:{title:"ScrambleCSS Plugin",permalink:"/cli/plugins/scramble-css-plugin"}},p={},c=[{value:"Installation",id:"installation",level:2},{value:"Usage",id:"usage",level:2},{value:"CLI Arguments",id:"cli-arguments",level:2},{value:"--analyze",id:"--analyze",level:3},{value:"Options",id:"options",level:2},{value:"open",id:"open",level:3},{value:"bundleStatsOptions",id:"bundlestatsoptions",level:3},{value:"bundleAnalyzerOptions",id:"bundleanalyzeroptions",level:3}],d={toc:c},m="wrapper";function b(e){let{components:t,...n}=e;return(0,l.kt)(m,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Pre-configures ",(0,l.kt)("a",{parentName:"p",href:"https://npmjs.com/package/bundle-stats-webpack-plugin"},"bundle-stats-webpack-plugin")," and ",(0,l.kt)("a",{parentName:"p",href:"https://npmjs.com/package/webpack-bundle-analyzer"},"webpack-bundle-analyzer")," webpack plugins for fast and easy bundle analyzing."),(0,l.kt)("p",null,"This plugin provides easy way to ",(0,l.kt)("strong",{parentName:"p"},"analyze webpack bundle"),". Apart from pre-configuring the forementioned plugins, it also outputs ",(0,l.kt)("inlineCode",{parentName:"p"},"stats.json")," file which can be used in multiple other online webpack bundle analyzer tools. For example:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://alexkuz.github.io/webpack-chart/"},"Webpack Chart")," - interactive pie chart"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://chrisbateman.github.io/webpack-visualizer/"},"Webpack Visualizer")," - visualize and analyze bundle"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://webpack.jakoblind.no/optimize/"},"Bundle optimize helper")," - analyze and optimize bundle"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://statoscope.tech/"},"Statoscope")," - detailed webpack stats analyzer")),(0,l.kt)("admonition",{type:"note"},(0,l.kt)("p",{parentName:"admonition"},"The plugin also prints these links directly into the console when the build finishes, for easier access.")),(0,l.kt)("h2",{id:"installation"},"Installation"),(0,l.kt)(r.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"npm",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"npm install @ima/cli-plugin-analyze -D\n"))),(0,l.kt)(i.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"yarn add @ima/cli-plugin-analyze --dev\n"))),(0,l.kt)(i.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"pnpm add @ima/cli-plugin-analyze -D\n")))),(0,l.kt)("h2",{id:"usage"},"Usage"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js",metastring:"title=./ima.config.js",title:"./ima.config.js"},"const { AnalyzePlugin } = require('@ima/cli-plugin-analyze');\n\n/**\n * @type import('@ima/cli').ImaConfig\n */\nmodule.exports = {\n plugins: [new AnalyzePlugin()],\n};\n")),(0,l.kt)("h2",{id:"cli-arguments"},"CLI Arguments"),(0,l.kt)("h3",{id:"--analyze"},"--analyze"),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},(0,l.kt)("inlineCode",{parentName:"p"},"client |\xa0client.es | server"))),(0,l.kt)("p",null,"Run the ima build command with ",(0,l.kt)("inlineCode",{parentName:"p"},"--analyze")," argument and pick one of the three produced bundles you want to analyze. For example: ",(0,l.kt)("inlineCode",{parentName:"p"},"npx ima build --analyze=client"),"."),(0,l.kt)("h2",{id:"options"},"Options"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"new AnalyzePlugin(options: {\n open?: boolean;\n bundleStatsOptions?: BundleStatsWebpackPlugin.Options;\n bundleAnalyzerOptions?: BundleAnalyzerPlugin.Options;\n});\n")),(0,l.kt)("h3",{id:"open"},"open"),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},(0,l.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,l.kt)("p",null,"Set to false if you don't want to automatically open the browser window with the html reports when the build finishes."),(0,l.kt)("h3",{id:"bundlestatsoptions"},"bundleStatsOptions"),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},(0,l.kt)("inlineCode",{parentName:"p"},"object"))),(0,l.kt)("p",null,"Pass any option that the ",(0,l.kt)("inlineCode",{parentName:"p"},"BundleStatsWebpackPlugin")," accepts. These are then merged with some of our custom defaults."),(0,l.kt)("h3",{id:"bundleanalyzeroptions"},"bundleAnalyzerOptions"),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},(0,l.kt)("inlineCode",{parentName:"p"},"object"))),(0,l.kt)("p",null,"Pass any option that the ",(0,l.kt)("inlineCode",{parentName:"p"},"BundleAnalyzerPlugin")," accepts. These are then merged with some of our custom defaults."))}b.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[2387],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>b});var a=n(7294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var u=a.createContext({}),s=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=s(e.components);return a.createElement(u.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,l=e.mdxType,r=e.originalType,u=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),c=s(n),m=l,b=c["".concat(u,".").concat(m)]||c[m]||d[m]||r;return n?a.createElement(b,i(i({ref:t},p),{},{components:n})):a.createElement(b,i({ref:t},p))}));function b(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var r=n.length,i=new Array(r);i[0]=m;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o[c]="string"==typeof e?e:l,i[1]=o;for(var s=2;s{n.d(t,{Z:()=>i});var a=n(7294),l=n(8944);const r={tabItem:"tabItem_Ymn6"};function i(e){let{children:t,hidden:n,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,l.Z)(r.tabItem,i),hidden:n},t)}},6745:(e,t,n)=>{n.d(t,{Z:()=>w});var a=n(5773),l=n(7294),r=n(8944),i=n(2466),o=n(3620),u=n(1980),s=n(7392),p=n(12);function c(e){return function(e){return l.Children.map(e,(e=>{if(!e||(0,l.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:l}}=e;return{value:t,label:n,attributes:a,default:l}}))}function d(e){const{values:t,children:n}=e;return(0,l.useMemo)((()=>{const e=t??c(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const a=(0,o.k6)(),r=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,u._X)(r),(0,l.useCallback)((e=>{if(!r)return;const t=new URLSearchParams(a.location.search);t.set(r,e),a.replace({...a.location,search:t.toString()})}),[r,a])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,r=d(e),[i,o]=(0,l.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:r}))),[u,s]=b({queryString:n,groupId:a}),[c,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,r]=(0,p.Nk)(n);return[a,(0,l.useCallback)((e=>{n&&r.set(e)}),[n,r])]}({groupId:a}),g=(()=>{const e=u??c;return m({value:e,tabValues:r})?e:null})();(0,l.useLayoutEffect)((()=>{g&&o(g)}),[g]);return{selectedValue:i,selectValue:(0,l.useCallback)((e=>{if(!m({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);o(e),s(e),f(e)}),[s,f,r]),tabValues:r}}var g=n(2389);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function y(e){let{className:t,block:n,selectedValue:o,selectValue:u,tabValues:s}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.o5)(),d=e=>{const t=e.currentTarget,n=p.indexOf(t),a=s[n].value;a!==o&&(c(t),u(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=p.indexOf(e.currentTarget)+1;t=p[n]??p[0];break}case"ArrowLeft":{const n=p.indexOf(e.currentTarget)-1;t=p[n]??p[p.length-1];break}}t?.focus()};return l.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:i}=e;return l.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>p.push(e),onKeyDown:m,onClick:d},i,{className:(0,r.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),n??t)})))}function k(e){let{lazy:t,children:n,selectedValue:a}=e;const r=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=r.find((e=>e.props.value===a));return e?(0,l.cloneElement)(e,{className:"margin-top--md"}):null}return l.createElement("div",{className:"margin-top--md"},r.map(((e,t)=>(0,l.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=f(e);return l.createElement("div",{className:(0,r.Z)("tabs-container",h.tabList)},l.createElement(y,(0,a.Z)({},e,t)),l.createElement(k,(0,a.Z)({},e,t)))}function w(e){const t=(0,g.Z)();return l.createElement(v,(0,a.Z)({key:String(t)},e))}},2324:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>u,default:()=>b,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=n(5773),l=(n(7294),n(3905)),r=n(6745),i=n(1683);const o={title:"Analyze Plugin",description:"CLI > CLI Plugins and their API > Analyze Plugin"},u=void 0,s={unversionedId:"cli/plugins/analyze-plugin",id:"cli/plugins/analyze-plugin",title:"Analyze Plugin",description:"CLI > CLI Plugins and their API > Analyze Plugin",source:"@site/../docs/cli/plugins/analyze-plugin.md",sourceDirName:"cli/plugins",slug:"/cli/plugins/analyze-plugin",permalink:"/cli/plugins/analyze-plugin",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/cli/plugins/analyze-plugin.md",tags:[],version:"current",lastUpdatedBy:"PS",lastUpdatedAt:1736522400,formattedLastUpdatedAt:"Jan 10, 2025",frontMatter:{title:"Analyze Plugin",description:"CLI > CLI Plugins and their API > Analyze Plugin"},sidebar:"docs",previous:{title:"CLI Plugins API",permalink:"/cli/cli-plugins-api"},next:{title:"ScrambleCSS Plugin",permalink:"/cli/plugins/scramble-css-plugin"}},p={},c=[{value:"Installation",id:"installation",level:2},{value:"Usage",id:"usage",level:2},{value:"CLI Arguments",id:"cli-arguments",level:2},{value:"--analyze",id:"--analyze",level:3},{value:"Options",id:"options",level:2},{value:"open",id:"open",level:3},{value:"bundleStatsOptions",id:"bundlestatsoptions",level:3},{value:"bundleAnalyzerOptions",id:"bundleanalyzeroptions",level:3}],d={toc:c},m="wrapper";function b(e){let{components:t,...n}=e;return(0,l.kt)(m,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Pre-configures ",(0,l.kt)("a",{parentName:"p",href:"https://npmjs.com/package/bundle-stats-webpack-plugin"},"bundle-stats-webpack-plugin")," and ",(0,l.kt)("a",{parentName:"p",href:"https://npmjs.com/package/webpack-bundle-analyzer"},"webpack-bundle-analyzer")," webpack plugins for fast and easy bundle analyzing."),(0,l.kt)("p",null,"This plugin provides easy way to ",(0,l.kt)("strong",{parentName:"p"},"analyze webpack bundle"),". Apart from pre-configuring the forementioned plugins, it also outputs ",(0,l.kt)("inlineCode",{parentName:"p"},"stats.json")," file which can be used in multiple other online webpack bundle analyzer tools. For example:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://alexkuz.github.io/webpack-chart/"},"Webpack Chart")," - interactive pie chart"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://chrisbateman.github.io/webpack-visualizer/"},"Webpack Visualizer")," - visualize and analyze bundle"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://webpack.jakoblind.no/optimize/"},"Bundle optimize helper")," - analyze and optimize bundle"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://statoscope.tech/"},"Statoscope")," - detailed webpack stats analyzer")),(0,l.kt)("admonition",{type:"note"},(0,l.kt)("p",{parentName:"admonition"},"The plugin also prints these links directly into the console when the build finishes, for easier access.")),(0,l.kt)("h2",{id:"installation"},"Installation"),(0,l.kt)(r.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"npm",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"npm install @ima/cli-plugin-analyze -D\n"))),(0,l.kt)(i.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"yarn add @ima/cli-plugin-analyze --dev\n"))),(0,l.kt)(i.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash"},"pnpm add @ima/cli-plugin-analyze -D\n")))),(0,l.kt)("h2",{id:"usage"},"Usage"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js",metastring:"title=./ima.config.js",title:"./ima.config.js"},"const { AnalyzePlugin } = require('@ima/cli-plugin-analyze');\n\n/**\n * @type import('@ima/cli').ImaConfig\n */\nmodule.exports = {\n plugins: [new AnalyzePlugin()],\n};\n")),(0,l.kt)("h2",{id:"cli-arguments"},"CLI Arguments"),(0,l.kt)("h3",{id:"--analyze"},"--analyze"),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},(0,l.kt)("inlineCode",{parentName:"p"},"client |\xa0client.es | server"))),(0,l.kt)("p",null,"Run the ima build command with ",(0,l.kt)("inlineCode",{parentName:"p"},"--analyze")," argument and pick one of the three produced bundles you want to analyze. For example: ",(0,l.kt)("inlineCode",{parentName:"p"},"npx ima build --analyze=client"),"."),(0,l.kt)("h2",{id:"options"},"Options"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"new AnalyzePlugin(options: {\n open?: boolean;\n bundleStatsOptions?: BundleStatsWebpackPlugin.Options;\n bundleAnalyzerOptions?: BundleAnalyzerPlugin.Options;\n});\n")),(0,l.kt)("h3",{id:"open"},"open"),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},(0,l.kt)("inlineCode",{parentName:"p"},"boolean = true"))),(0,l.kt)("p",null,"Set to false if you don't want to automatically open the browser window with the html reports when the build finishes."),(0,l.kt)("h3",{id:"bundlestatsoptions"},"bundleStatsOptions"),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},(0,l.kt)("inlineCode",{parentName:"p"},"object"))),(0,l.kt)("p",null,"Pass any option that the ",(0,l.kt)("inlineCode",{parentName:"p"},"BundleStatsWebpackPlugin")," accepts. These are then merged with some of our custom defaults."),(0,l.kt)("h3",{id:"bundleanalyzeroptions"},"bundleAnalyzerOptions"),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},(0,l.kt)("inlineCode",{parentName:"p"},"object"))),(0,l.kt)("p",null,"Pass any option that the ",(0,l.kt)("inlineCode",{parentName:"p"},"BundleAnalyzerPlugin")," accepts. These are then merged with some of our custom defaults."))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2fa7fbb9.3732a372.js b/assets/js/2fa7fbb9.3732a372.js new file mode 100644 index 0000000000..bece327303 --- /dev/null +++ b/assets/js/2fa7fbb9.3732a372.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4191],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>g});var a=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=a.createContext({}),p=function(e){var n=a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},u=function(e){var n=p(e.components);return a.createElement(s.Provider,{value:n},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},d=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(t),d=r,g=c["".concat(s,".").concat(d)]||c[d]||m[d]||o;return t?a.createElement(g,i(i({ref:n},u),{},{components:t})):a.createElement(g,i({ref:n},u))}));function g(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=d;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[c]="string"==typeof e?e:r,i[1]=l;for(var p=2;p{t.d(n,{Z:()=>i});var a=t(7294),r=t(8944);const o={tabItem:"tabItem_Ymn6"};function i(e){let{children:n,hidden:t,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(o.tabItem,i),hidden:t},n)}},6745:(e,n,t)=>{t.d(n,{Z:()=>j});var a=t(5773),r=t(7294),o=t(8944),i=t(2466),l=t(3620),s=t(1980),p=t(7392),u=t(12);function c(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:n,label:t,attributes:a,default:r}}=e;return{value:n,label:t,attributes:a,default:r}}))}function m(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??c(t);return function(e){const n=(0,p.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function d(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function g(e){let{queryString:n=!1,groupId:t}=e;const a=(0,l.k6)(),o=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,s._X)(o),(0,r.useCallback)((e=>{if(!o)return;const n=new URLSearchParams(a.location.search);n.set(o,e),a.replace({...a.location,search:n.toString()})}),[o,a])]}function f(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,o=m(e),[i,l]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!d({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=t.find((e=>e.default))??t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:o}))),[s,p]=g({queryString:t,groupId:a}),[c,f]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,o]=(0,u.Nk)(t);return[a,(0,r.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:a}),k=(()=>{const e=s??c;return d({value:e,tabValues:o})?e:null})();(0,r.useLayoutEffect)((()=>{k&&l(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),p(e),f(e)}),[p,f,o]),tabValues:o}}var k=t(2389);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function h(e){let{className:n,block:t,selectedValue:l,selectValue:s,tabValues:p}=e;const u=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.o5)(),m=e=>{const n=e.currentTarget,t=u.indexOf(n),a=p[t].value;a!==l&&(c(n),s(a))},d=e=>{let n=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const t=u.indexOf(e.currentTarget)+1;n=u[t]??u[0];break}case"ArrowLeft":{const t=u.indexOf(e.currentTarget)-1;n=u[t]??u[u.length-1];break}}n?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":t},n)},p.map((e=>{let{value:n,label:t,attributes:i}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:l===n?0:-1,"aria-selected":l===n,key:n,ref:e=>u.push(e),onKeyDown:d,onClick:m},i,{className:(0,o.Z)("tabs__item",b.tabItem,i?.className,{"tabs__item--active":l===n})}),t??n)})))}function v(e){let{lazy:n,children:t,selectedValue:a}=e;const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=o.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},o.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a}))))}function y(e){const n=f(e);return r.createElement("div",{className:(0,o.Z)("tabs-container",b.tabList)},r.createElement(h,(0,a.Z)({},e,n)),r.createElement(v,(0,a.Z)({},e,n)))}function j(e){const n=(0,k.Z)();return r.createElement(y,(0,a.Z)({key:String(n)},e))}},2500:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>s,default:()=>g,frontMatter:()=>l,metadata:()=>p,toc:()=>c});var a=t(5773),r=(t(7294),t(3905)),o=t(6745),i=t(1683);const l={title:"Migration 17.0.0",description:"Migration > Migration to version 17.0.0"},s=void 0,p={unversionedId:"migration/migration-17.0.0",id:"migration/migration-17.0.0",title:"Migration 17.0.0",description:"Migration > Migration to version 17.0.0",source:"@site/../docs/migration/migration-17.0.0.md",sourceDirName:"migration",slug:"/migration/migration-17.0.0",permalink:"/migration/migration-17.0.0",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/migration/migration-17.0.0.md",tags:[],version:"current",lastUpdatedBy:"PS",lastUpdatedAt:1736522400,formattedLastUpdatedAt:"Jan 10, 2025",frontMatter:{title:"Migration 17.0.0",description:"Migration > Migration to version 17.0.0"},sidebar:"docs",previous:{title:"Migration 0.16.0",permalink:"/migration/migration-0.16.0"},next:{title:"Migration 18.0.0",permalink:"/migration/migration-18.0.0"}},u={},c=[{value:"Imports",id:"imports",level:2},{value:"Context API",id:"context-api",level:2},{value:"Utils Registration",id:"utils-registration",level:2},{value:"IMA.js bundle for client/server",id:"imajs-bundle-for-clientserver",level:2},{value:"Language Key in Config",id:"language-key-in-config",level:2},{value:"Hot Reload",id:"hot-reload",level:2},{value:"IMA.js Plugins",id:"imajs-plugins",level:2}],m={toc:c},d="wrapper";function g(e){let{components:n,...t}=e;return(0,r.kt)(d,(0,a.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"IMA.js brings few major breaking changes, notably in the renaming of all packages. We've tried to make this process as easy as possible\nthrough the provided jscodeshift transform scripts. For more information read below."),(0,r.kt)("h2",{id:"imports"},"Imports"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"ima-")," packages (even plugins) has been renamed to ",(0,r.kt)("inlineCode",{parentName:"p"},"@ima/")," scoped packages and ",(0,r.kt)("inlineCode",{parentName:"p"},"ima")," core package has been renamed to ",(0,r.kt)("inlineCode",{parentName:"p"},"@ima/core"),". The core package is now bundled with ",(0,r.kt)("a",{parentName:"p",href:"https://rollupjs.org/guide/en/"},"rollup"),", so you can no longer import a file from specific path (i.e. ",(0,r.kt)("inlineCode",{parentName:"p"},"import GenericError from 'ima/error/GenericError'"),"), but you can import it directly from ",(0,r.kt)("inlineCode",{parentName:"p"},"@ima/core")," (i.e. ",(0,r.kt)("inlineCode",{parentName:"p"},"import { GenericError } from '@ima/core'"),")."),(0,r.kt)("p",null,"All of this can be done automatically for a whole project using following jscodeshift script."),(0,r.kt)(o.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,r.kt)(i.Z,{value:"npm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx jscodeshift -t node_modules/@ima/core/transform/import-v17.js --extensions jsx,js --ignore-config=.gitignore ./\n"))),(0,r.kt)(i.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx jscodeshift -t node_modules/@ima/core/transform/import-v17.js --extensions jsx,js --ignore-config=.gitignore ./\n"))),(0,r.kt)(i.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx jscodeshift -t node_modules/@ima/core/transform/import-v17.js --extensions jsx,js --ignore-config=.gitignore ./\n")))),(0,r.kt)("p",null,"Also replace paths which contain ",(0,r.kt)("inlineCode",{parentName:"p"},"ima")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"@ima/core")," in ",(0,r.kt)("inlineCode",{parentName:"p"},"package.json")," (setupFiles in jest) and ",(0,r.kt)("inlineCode",{parentName:"p"},"server.js"),"."),(0,r.kt)("p",null,"Following packages have been renamed."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"ima-gulp-task-loader -> @ima/gulp-task-loader\nima-gulp-tasks -> @ima/gulp-tasks\nima-helpers -> @ima/helpers\nima-server -> @ima/server\n")),(0,r.kt)("p",null,"Following packages have been removed."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"ima-examples\nima-skeleton\n")),(0,r.kt)("p",null,"And as a replacement, following package has been created."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"create-ima-app\n")),(0,r.kt)("p",null,"Also all plugins have been renamed from ",(0,r.kt)("inlineCode",{parentName:"p"},"ima-plugin-*")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"@ima/plugin-*"),"."),(0,r.kt)("h2",{id:"context-api"},"Context API"),(0,r.kt)("p",null,"IMA.js v17 no longer uses ",(0,r.kt)("inlineCode",{parentName:"p"},"prop-types")," in ",(0,r.kt)("inlineCode",{parentName:"p"},"contextTypes")," of ",(0,r.kt)("inlineCode",{parentName:"p"},"React")," components. Instead, you should use ",(0,r.kt)("inlineCode",{parentName:"p"},"PageContext")," from ",(0,r.kt)("inlineCode",{parentName:"p"},"@ima/core"),". Also, ",(0,r.kt)("inlineCode",{parentName:"p"},"prop-types")," has been removed from ",(0,r.kt)("inlineCode",{parentName:"p"},"IMA.js")," dependencies, so if you need it for some reason, make sure it is installed as a project dependency."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Example:")),(0,r.kt)("p",null,"This is original IMA.js v16 code."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"import PropTypes from 'prop-types';\n\nexport default class MyComponent extends AbstractComponent {\n static get contextTypes() {\n return {\n $Utils: PropTypes.object,\n urlParams: PropTypes.object\n };\n }\n}\n")),(0,r.kt)("p",null,"This should be the new IMA.js v17 code."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"import { PageContext } from '@ima/core';\n\nexport default class MyComponent extends AbstractComponent {\n static get contextType() {\n return PageContext;\n }\n}\n")),(0,r.kt)("p",null,"All of this can be done automatically for a whole project using following jscodeshift script."),(0,r.kt)(o.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,r.kt)(i.Z,{value:"npm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx jscodeshift -t node_modules/@ima/core/transform/context-api-v17.js --extensions jsx,js --ignore-config=.gitignore ./\n"))),(0,r.kt)(i.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx jscodeshift -t node_modules/@ima/core/transform/context-api-v17.js --extensions jsx,js --ignore-config=.gitignore ./\n"))),(0,r.kt)(i.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx jscodeshift -t node_modules/@ima/core/transform/context-api-v17.js --extensions jsx,js --ignore-config=.gitignore ./\n")))),(0,r.kt)("h2",{id:"utils-registration"},"Utils Registration"),(0,r.kt)("p",null,"There is a new way of defining component utils. You can no longer define ",(0,r.kt)("inlineCode",{parentName:"p"},"oc.constant('$Utils', {...})")," in ",(0,r.kt)("inlineCode",{parentName:"p"},"app/conf/bind.js"),", you have to use ",(0,r.kt)("inlineCode",{parentName:"p"},"oc.get(ComponentUtils).register({...})")," instead. Also, following component utils are predefined by default, so you don't have to define them yourself."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"oc.get(ComponentUtils).register({\n $CssClasses: '$CssClasses',\n $Dictionary: Dictionary,\n $Dispatcher: Dispatcher,\n $EventBus: EventBus,\n $Helper: '$Helper',\n $Http: HttpAgent,\n $PageStateManager: PageStateManager,\n $Router: Router,\n $Settings: '$Settings',\n $Window: Window\n});\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Example:")),(0,r.kt)("p",null,"Following definition of utils is no longer supported."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"oc.constant('$Utils', {\n $MyCustomHelper: oc.get(MyCustomHelper),\n ...\n});\n")),(0,r.kt)("p",null,"And must be replaced with following."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"oc.get(ComponentUtils).register({\n $MyCustomHelper: MyCustomHelper,\n ...\n});\n")),(0,r.kt)("h2",{id:"imajs-bundle-for-clientserver"},"IMA.js bundle for client/server"),(0,r.kt)("p",null,"IMA.js v17 comes bundled for server and client side. This means smaller bundle for clients. To benefit from this, you should update ",(0,r.kt)("inlineCode",{parentName:"p"},"vendors")," in your ",(0,r.kt)("inlineCode",{parentName:"p"},"app/build.js")," as following."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"let vendors = {\n- common: ['@ima/core'],\n+ common: [],\n\n- server: [],\n+ server: [{ '@ima/core': '@ima/core/dist/ima.server.cjs.js' }],\n\n- client: [],\n+ client: [{ '@ima/core': '@ima/core/dist/ima.client.cjs.js' }],\n\n test: []\n};\n")),(0,r.kt)("h2",{id:"language-key-in-config"},"Language Key in Config"),(0,r.kt)("p",null,"Config key ",(0,r.kt)("inlineCode",{parentName:"p"},"language")," (mostly used in ",(0,r.kt)("inlineCode",{parentName:"p"},"app/config/*.js")," boot methods) has been renamed to ",(0,r.kt)("inlineCode",{parentName:"p"},"$Language"),". You can search whole project for ",(0,r.kt)("inlineCode",{parentName:"p"},"config.language")," and replace it with ",(0,r.kt)("inlineCode",{parentName:"p"},"config.$Language"),", but most likely, it will be used only in ",(0,r.kt)("inlineCode",{parentName:"p"},"app/config/settings.js"),"."),(0,r.kt)("h2",{id:"hot-reload"},"Hot Reload"),(0,r.kt)("p",null,"Hot Reload has been rewritten and published as ima plugin. Old hot reloading will no longer work. You should delete ",(0,r.kt)("inlineCode",{parentName:"p"},"app/assets/js/hot.reload.js")," from your project, then install the plugin via ",(0,r.kt)("inlineCode",{parentName:"p"},"npm install --save-dev @ima/plugin-websocket @ima/plugin-hot-reload")," and add following lines to your ",(0,r.kt)("inlineCode",{parentName:"p"},"app/build.js"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"// You can add this somewhere below the vendors variable initialization\nif (\n process.env.NODE_ENV === 'dev' ||\n process.env.NODE_ENV === 'development' ||\n process.env.NODE_ENV === undefined\n) {\n vendors.common.push('@ima/plugin-websocket');\n vendors.common.push('@ima/plugin-hot-reload');\n}\n")),(0,r.kt)("h2",{id:"imajs-plugins"},"IMA.js Plugins"),(0,r.kt)("p",null,"All IMA.js plugins need to be updated to the latest version. Older versions won't work."))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2fa7fbb9.96de13a2.js b/assets/js/2fa7fbb9.96de13a2.js deleted file mode 100644 index 5770cd1138..0000000000 --- a/assets/js/2fa7fbb9.96de13a2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4191],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>g});var a=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=a.createContext({}),p=function(e){var n=a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},u=function(e){var n=p(e.components);return a.createElement(s.Provider,{value:n},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},d=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(t),d=r,g=c["".concat(s,".").concat(d)]||c[d]||m[d]||o;return t?a.createElement(g,i(i({ref:n},u),{},{components:t})):a.createElement(g,i({ref:n},u))}));function g(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=d;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[c]="string"==typeof e?e:r,i[1]=l;for(var p=2;p{t.d(n,{Z:()=>i});var a=t(7294),r=t(8944);const o={tabItem:"tabItem_Ymn6"};function i(e){let{children:n,hidden:t,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(o.tabItem,i),hidden:t},n)}},6745:(e,n,t)=>{t.d(n,{Z:()=>j});var a=t(5773),r=t(7294),o=t(8944),i=t(2466),l=t(3620),s=t(1980),p=t(7392),u=t(12);function c(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:n,label:t,attributes:a,default:r}}=e;return{value:n,label:t,attributes:a,default:r}}))}function m(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??c(t);return function(e){const n=(0,p.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function d(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function g(e){let{queryString:n=!1,groupId:t}=e;const a=(0,l.k6)(),o=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,s._X)(o),(0,r.useCallback)((e=>{if(!o)return;const n=new URLSearchParams(a.location.search);n.set(o,e),a.replace({...a.location,search:n.toString()})}),[o,a])]}function f(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,o=m(e),[i,l]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!d({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=t.find((e=>e.default))??t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:o}))),[s,p]=g({queryString:t,groupId:a}),[c,f]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,o]=(0,u.Nk)(t);return[a,(0,r.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:a}),k=(()=>{const e=s??c;return d({value:e,tabValues:o})?e:null})();(0,r.useLayoutEffect)((()=>{k&&l(k)}),[k]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),p(e),f(e)}),[p,f,o]),tabValues:o}}var k=t(2389);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function h(e){let{className:n,block:t,selectedValue:l,selectValue:s,tabValues:p}=e;const u=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.o5)(),m=e=>{const n=e.currentTarget,t=u.indexOf(n),a=p[t].value;a!==l&&(c(n),s(a))},d=e=>{let n=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const t=u.indexOf(e.currentTarget)+1;n=u[t]??u[0];break}case"ArrowLeft":{const t=u.indexOf(e.currentTarget)-1;n=u[t]??u[u.length-1];break}}n?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":t},n)},p.map((e=>{let{value:n,label:t,attributes:i}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:l===n?0:-1,"aria-selected":l===n,key:n,ref:e=>u.push(e),onKeyDown:d,onClick:m},i,{className:(0,o.Z)("tabs__item",b.tabItem,i?.className,{"tabs__item--active":l===n})}),t??n)})))}function v(e){let{lazy:n,children:t,selectedValue:a}=e;const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=o.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},o.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a}))))}function y(e){const n=f(e);return r.createElement("div",{className:(0,o.Z)("tabs-container",b.tabList)},r.createElement(h,(0,a.Z)({},e,n)),r.createElement(v,(0,a.Z)({},e,n)))}function j(e){const n=(0,k.Z)();return r.createElement(y,(0,a.Z)({key:String(n)},e))}},2500:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>s,default:()=>g,frontMatter:()=>l,metadata:()=>p,toc:()=>c});var a=t(5773),r=(t(7294),t(3905)),o=t(6745),i=t(1683);const l={title:"Migration 17.0.0",description:"Migration > Migration to version 17.0.0"},s=void 0,p={unversionedId:"migration/migration-17.0.0",id:"migration/migration-17.0.0",title:"Migration 17.0.0",description:"Migration > Migration to version 17.0.0",source:"@site/../docs/migration/migration-17.0.0.md",sourceDirName:"migration",slug:"/migration/migration-17.0.0",permalink:"/migration/migration-17.0.0",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/migration/migration-17.0.0.md",tags:[],version:"current",lastUpdatedBy:"Filip Satek",lastUpdatedAt:1734590310,formattedLastUpdatedAt:"Dec 19, 2024",frontMatter:{title:"Migration 17.0.0",description:"Migration > Migration to version 17.0.0"},sidebar:"docs",previous:{title:"Migration 0.16.0",permalink:"/migration/migration-0.16.0"},next:{title:"Migration 18.0.0",permalink:"/migration/migration-18.0.0"}},u={},c=[{value:"Imports",id:"imports",level:2},{value:"Context API",id:"context-api",level:2},{value:"Utils Registration",id:"utils-registration",level:2},{value:"IMA.js bundle for client/server",id:"imajs-bundle-for-clientserver",level:2},{value:"Language Key in Config",id:"language-key-in-config",level:2},{value:"Hot Reload",id:"hot-reload",level:2},{value:"IMA.js Plugins",id:"imajs-plugins",level:2}],m={toc:c},d="wrapper";function g(e){let{components:n,...t}=e;return(0,r.kt)(d,(0,a.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"IMA.js brings few major breaking changes, notably in the renaming of all packages. We've tried to make this process as easy as possible\nthrough the provided jscodeshift transform scripts. For more information read below."),(0,r.kt)("h2",{id:"imports"},"Imports"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"ima-")," packages (even plugins) has been renamed to ",(0,r.kt)("inlineCode",{parentName:"p"},"@ima/")," scoped packages and ",(0,r.kt)("inlineCode",{parentName:"p"},"ima")," core package has been renamed to ",(0,r.kt)("inlineCode",{parentName:"p"},"@ima/core"),". The core package is now bundled with ",(0,r.kt)("a",{parentName:"p",href:"https://rollupjs.org/guide/en/"},"rollup"),", so you can no longer import a file from specific path (i.e. ",(0,r.kt)("inlineCode",{parentName:"p"},"import GenericError from 'ima/error/GenericError'"),"), but you can import it directly from ",(0,r.kt)("inlineCode",{parentName:"p"},"@ima/core")," (i.e. ",(0,r.kt)("inlineCode",{parentName:"p"},"import { GenericError } from '@ima/core'"),")."),(0,r.kt)("p",null,"All of this can be done automatically for a whole project using following jscodeshift script."),(0,r.kt)(o.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,r.kt)(i.Z,{value:"npm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx jscodeshift -t node_modules/@ima/core/transform/import-v17.js --extensions jsx,js --ignore-config=.gitignore ./\n"))),(0,r.kt)(i.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx jscodeshift -t node_modules/@ima/core/transform/import-v17.js --extensions jsx,js --ignore-config=.gitignore ./\n"))),(0,r.kt)(i.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx jscodeshift -t node_modules/@ima/core/transform/import-v17.js --extensions jsx,js --ignore-config=.gitignore ./\n")))),(0,r.kt)("p",null,"Also replace paths which contain ",(0,r.kt)("inlineCode",{parentName:"p"},"ima")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"@ima/core")," in ",(0,r.kt)("inlineCode",{parentName:"p"},"package.json")," (setupFiles in jest) and ",(0,r.kt)("inlineCode",{parentName:"p"},"server.js"),"."),(0,r.kt)("p",null,"Following packages have been renamed."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"ima-gulp-task-loader -> @ima/gulp-task-loader\nima-gulp-tasks -> @ima/gulp-tasks\nima-helpers -> @ima/helpers\nima-server -> @ima/server\n")),(0,r.kt)("p",null,"Following packages have been removed."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"ima-examples\nima-skeleton\n")),(0,r.kt)("p",null,"And as a replacement, following package has been created."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"create-ima-app\n")),(0,r.kt)("p",null,"Also all plugins have been renamed from ",(0,r.kt)("inlineCode",{parentName:"p"},"ima-plugin-*")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"@ima/plugin-*"),"."),(0,r.kt)("h2",{id:"context-api"},"Context API"),(0,r.kt)("p",null,"IMA.js v17 no longer uses ",(0,r.kt)("inlineCode",{parentName:"p"},"prop-types")," in ",(0,r.kt)("inlineCode",{parentName:"p"},"contextTypes")," of ",(0,r.kt)("inlineCode",{parentName:"p"},"React")," components. Instead, you should use ",(0,r.kt)("inlineCode",{parentName:"p"},"PageContext")," from ",(0,r.kt)("inlineCode",{parentName:"p"},"@ima/core"),". Also, ",(0,r.kt)("inlineCode",{parentName:"p"},"prop-types")," has been removed from ",(0,r.kt)("inlineCode",{parentName:"p"},"IMA.js")," dependencies, so if you need it for some reason, make sure it is installed as a project dependency."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Example:")),(0,r.kt)("p",null,"This is original IMA.js v16 code."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"import PropTypes from 'prop-types';\n\nexport default class MyComponent extends AbstractComponent {\n static get contextTypes() {\n return {\n $Utils: PropTypes.object,\n urlParams: PropTypes.object\n };\n }\n}\n")),(0,r.kt)("p",null,"This should be the new IMA.js v17 code."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"import { PageContext } from '@ima/core';\n\nexport default class MyComponent extends AbstractComponent {\n static get contextType() {\n return PageContext;\n }\n}\n")),(0,r.kt)("p",null,"All of this can be done automatically for a whole project using following jscodeshift script."),(0,r.kt)(o.Z,{groupId:"npm2yarn",mdxType:"Tabs"},(0,r.kt)(i.Z,{value:"npm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx jscodeshift -t node_modules/@ima/core/transform/context-api-v17.js --extensions jsx,js --ignore-config=.gitignore ./\n"))),(0,r.kt)(i.Z,{value:"yarn",label:"Yarn",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx jscodeshift -t node_modules/@ima/core/transform/context-api-v17.js --extensions jsx,js --ignore-config=.gitignore ./\n"))),(0,r.kt)(i.Z,{value:"pnpm",label:"pnpm",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx jscodeshift -t node_modules/@ima/core/transform/context-api-v17.js --extensions jsx,js --ignore-config=.gitignore ./\n")))),(0,r.kt)("h2",{id:"utils-registration"},"Utils Registration"),(0,r.kt)("p",null,"There is a new way of defining component utils. You can no longer define ",(0,r.kt)("inlineCode",{parentName:"p"},"oc.constant('$Utils', {...})")," in ",(0,r.kt)("inlineCode",{parentName:"p"},"app/conf/bind.js"),", you have to use ",(0,r.kt)("inlineCode",{parentName:"p"},"oc.get(ComponentUtils).register({...})")," instead. Also, following component utils are predefined by default, so you don't have to define them yourself."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"oc.get(ComponentUtils).register({\n $CssClasses: '$CssClasses',\n $Dictionary: Dictionary,\n $Dispatcher: Dispatcher,\n $EventBus: EventBus,\n $Helper: '$Helper',\n $Http: HttpAgent,\n $PageStateManager: PageStateManager,\n $Router: Router,\n $Settings: '$Settings',\n $Window: Window\n});\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Example:")),(0,r.kt)("p",null,"Following definition of utils is no longer supported."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"oc.constant('$Utils', {\n $MyCustomHelper: oc.get(MyCustomHelper),\n ...\n});\n")),(0,r.kt)("p",null,"And must be replaced with following."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"oc.get(ComponentUtils).register({\n $MyCustomHelper: MyCustomHelper,\n ...\n});\n")),(0,r.kt)("h2",{id:"imajs-bundle-for-clientserver"},"IMA.js bundle for client/server"),(0,r.kt)("p",null,"IMA.js v17 comes bundled for server and client side. This means smaller bundle for clients. To benefit from this, you should update ",(0,r.kt)("inlineCode",{parentName:"p"},"vendors")," in your ",(0,r.kt)("inlineCode",{parentName:"p"},"app/build.js")," as following."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"let vendors = {\n- common: ['@ima/core'],\n+ common: [],\n\n- server: [],\n+ server: [{ '@ima/core': '@ima/core/dist/ima.server.cjs.js' }],\n\n- client: [],\n+ client: [{ '@ima/core': '@ima/core/dist/ima.client.cjs.js' }],\n\n test: []\n};\n")),(0,r.kt)("h2",{id:"language-key-in-config"},"Language Key in Config"),(0,r.kt)("p",null,"Config key ",(0,r.kt)("inlineCode",{parentName:"p"},"language")," (mostly used in ",(0,r.kt)("inlineCode",{parentName:"p"},"app/config/*.js")," boot methods) has been renamed to ",(0,r.kt)("inlineCode",{parentName:"p"},"$Language"),". You can search whole project for ",(0,r.kt)("inlineCode",{parentName:"p"},"config.language")," and replace it with ",(0,r.kt)("inlineCode",{parentName:"p"},"config.$Language"),", but most likely, it will be used only in ",(0,r.kt)("inlineCode",{parentName:"p"},"app/config/settings.js"),"."),(0,r.kt)("h2",{id:"hot-reload"},"Hot Reload"),(0,r.kt)("p",null,"Hot Reload has been rewritten and published as ima plugin. Old hot reloading will no longer work. You should delete ",(0,r.kt)("inlineCode",{parentName:"p"},"app/assets/js/hot.reload.js")," from your project, then install the plugin via ",(0,r.kt)("inlineCode",{parentName:"p"},"npm install --save-dev @ima/plugin-websocket @ima/plugin-hot-reload")," and add following lines to your ",(0,r.kt)("inlineCode",{parentName:"p"},"app/build.js"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"// You can add this somewhere below the vendors variable initialization\nif (\n process.env.NODE_ENV === 'dev' ||\n process.env.NODE_ENV === 'development' ||\n process.env.NODE_ENV === undefined\n) {\n vendors.common.push('@ima/plugin-websocket');\n vendors.common.push('@ima/plugin-hot-reload');\n}\n")),(0,r.kt)("h2",{id:"imajs-plugins"},"IMA.js Plugins"),(0,r.kt)("p",null,"All IMA.js plugins need to be updated to the latest version. Older versions won't work."))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/30c3cb5b.673ac379.js b/assets/js/30c3cb5b.2acd37db.js similarity index 98% rename from assets/js/30c3cb5b.673ac379.js rename to assets/js/30c3cb5b.2acd37db.js index 91226a4b30..93085f06f8 100644 --- a/assets/js/30c3cb5b.673ac379.js +++ b/assets/js/30c3cb5b.2acd37db.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[1817],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>k});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var p=r.createContext({}),d=function(e){var t=r.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},s=function(e){var t=d(e.components);return r.createElement(p.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},c=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,p=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),m=d(a),c=n,k=m["".concat(p,".").concat(c)]||m[c]||u[c]||i;return a?r.createElement(k,l(l({ref:t},s),{},{components:a})):r.createElement(k,l({ref:t},s))}));function k(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,l=new Array(i);l[0]=c;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[m]="string"==typeof e?e:n,l[1]=o;for(var d=2;d{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var r=a(5773),n=(a(7294),a(3905));const i={id:"ima_core.PageRenderer",title:"Class: PageRenderer",sidebar_label:"@ima/core.PageRenderer",custom_edit_url:null},l=void 0,o={unversionedId:"api/classes/ima_core.PageRenderer",id:"api/classes/ima_core.PageRenderer",title:"Class: PageRenderer",description:"@ima/core.PageRenderer",source:"@site/../docs/api/classes/ima_core.PageRenderer.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.PageRenderer",permalink:"/api/classes/ima_core.PageRenderer",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.PageRenderer",title:"Class: PageRenderer",sidebar_label:"@ima/core.PageRenderer",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.PageNavigationHandler",permalink:"/api/classes/ima_core.PageNavigationHandler"},next:{title:"@ima/core.PageStateManager",permalink:"/api/classes/ima_core.PageStateManager"}},p={},d=[{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Methods",id:"methods",level:2},{value:"mount",id:"mount",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"setState",id:"setstate",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"unmount",id:"unmount",level:3},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"update",id:"update",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-3",level:4}],s={toc:d},m="wrapper";function u(e){let{components:t,...a}=e;return(0,n.kt)(m,(0,r.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".PageRenderer"),(0,n.kt)("p",null,"The page renderer is a utility for rendering the page at either the\nclient-side or the server-side, handling the differences in the environment."),(0,n.kt)("h2",{id:"constructors"},"Constructors"),(0,n.kt)("h3",{id:"constructor"},"constructor"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("strong",{parentName:"p"},"new PageRenderer"),"()"),(0,n.kt)("h2",{id:"methods"},"Methods"),(0,n.kt)("h3",{id:"mount"},"mount"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"mount"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"controller"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"view"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"pageResources"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"routeOptions"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,n.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,n.kt)("p",null,"Renders the page using the provided controller and view. The actual\nbehavior of this method differs at the client-side and the at\nserver-side in the following way:"),(0,n.kt)("p",null,"At the server, the method first waits for all the resources to load, and\nthen renders the page to a string containing HTML markup to send to the\nclient."),(0,n.kt)("p",null,"At the client, the method uses the already available resources to render\nthe page into DOM, re-using the DOM created from the HTML markup send by\nthe server if possible. After this the method will re-render the page\nevery time another resource being loaded finishes its loading and\nbecomes available."),(0,n.kt)("p",null,"Note that the method renders the page at the client-side only after all\nresources have been loaded if this is the first time this method is\ninvoked at the client."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"controller")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Controller"},(0,n.kt)("inlineCode",{parentName:"a"},"Controller")),"<{}, {}, {}",">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"The current page controller.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"view")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"unknown")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The page's view.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"pageResources")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownpromiseparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownPromiseParameters"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The resources for the view loaded by the controller.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"routeOptions")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The current route options.")))),(0,n.kt)("h4",{id:"returns"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,n.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,n.kt)("p",null,"A promise that will resolve to information about the\nrendered page. The ",(0,n.kt)("inlineCode",{parentName:"p"},"status")," will contain the HTTP status\ncode to send to the client (at the server side) or determine the\ntype of error page to navigate to (at the client side)."),(0,n.kt)("h4",{id:"defined-in"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/renderer/PageRenderer.ts#L62"},"packages/core/src/page/renderer/PageRenderer.ts:62")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"setstate"},"setState"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"setState"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"state"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,n.kt)("p",null,"Sets the provided state to the currently rendered view."),(0,n.kt)("p",null,"This method has no effect at the server-side."),(0,n.kt)("h4",{id:"parameters-1"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"state")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The state to set to the currently rendered view.")))),(0,n.kt)("h4",{id:"returns-1"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,n.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/renderer/PageRenderer.ts#L119"},"packages/core/src/page/renderer/PageRenderer.ts:119")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"unmount"},"unmount"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"unmount"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("p",null,"Unmounts the view from the DOM."),(0,n.kt)("p",null,"This method has no effect at the server-side."),(0,n.kt)("h4",{id:"returns-2"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/renderer/PageRenderer.ts#L107"},"packages/core/src/page/renderer/PageRenderer.ts:107")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"update"},"update"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"update"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"controller"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"view"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"resourcesUpdate"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"routeOptions"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,n.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,n.kt)("p",null,"Handles update of the current route that does not replace the current\ncontroller and view."),(0,n.kt)("p",null,"The method will use the already available resource to update the\ncontroller's state and the view immediately. After that, the method will\nupdate the controller's state and view with every resource that becomes\nresolved."),(0,n.kt)("h4",{id:"parameters-2"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"controller")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Controller"},(0,n.kt)("inlineCode",{parentName:"a"},"Controller")),"<{}, {}, {}",">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"The current page controller.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"view")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"unknown")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The page's view.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"resourcesUpdate")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownpromiseparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownPromiseParameters"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The resources that represent the update the of current state according to the current route and its parameters.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"routeOptions")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The current route options.")))),(0,n.kt)("h4",{id:"returns-3"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,n.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,n.kt)("p",null,"A promise that will resolve to information about the\nrendered page. The ",(0,n.kt)("inlineCode",{parentName:"p"},"status")," will contain the HTTP status\ncode to send to the client (at the server side) or determine the\ntype of error page to navigate to (at the client side).\nThe ",(0,n.kt)("inlineCode",{parentName:"p"},"content")," field will contain the rendered markup of\nthe page at the server-side, or ",(0,n.kt)("inlineCode",{parentName:"p"},"null")," at the client-side."),(0,n.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/renderer/PageRenderer.ts#L93"},"packages/core/src/page/renderer/PageRenderer.ts:93")))}u.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[1817],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>k});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var p=r.createContext({}),d=function(e){var t=r.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},s=function(e){var t=d(e.components);return r.createElement(p.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},c=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,p=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),m=d(a),c=n,k=m["".concat(p,".").concat(c)]||m[c]||u[c]||i;return a?r.createElement(k,l(l({ref:t},s),{},{components:a})):r.createElement(k,l({ref:t},s))}));function k(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,l=new Array(i);l[0]=c;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[m]="string"==typeof e?e:n,l[1]=o;for(var d=2;d{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var r=a(5773),n=(a(7294),a(3905));const i={id:"ima_core.PageRenderer",title:"Class: PageRenderer",sidebar_label:"@ima/core.PageRenderer",custom_edit_url:null},l=void 0,o={unversionedId:"api/classes/ima_core.PageRenderer",id:"api/classes/ima_core.PageRenderer",title:"Class: PageRenderer",description:"@ima/core.PageRenderer",source:"@site/../docs/api/classes/ima_core.PageRenderer.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.PageRenderer",permalink:"/api/classes/ima_core.PageRenderer",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.PageRenderer",title:"Class: PageRenderer",sidebar_label:"@ima/core.PageRenderer",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.PageNavigationHandler",permalink:"/api/classes/ima_core.PageNavigationHandler"},next:{title:"@ima/core.PageStateManager",permalink:"/api/classes/ima_core.PageStateManager"}},p={},d=[{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Methods",id:"methods",level:2},{value:"mount",id:"mount",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"setState",id:"setstate",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-1",level:4},{value:"unmount",id:"unmount",level:3},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"update",id:"update",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-3",level:4}],s={toc:d},m="wrapper";function u(e){let{components:t,...a}=e;return(0,n.kt)(m,(0,r.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".PageRenderer"),(0,n.kt)("p",null,"The page renderer is a utility for rendering the page at either the\nclient-side or the server-side, handling the differences in the environment."),(0,n.kt)("h2",{id:"constructors"},"Constructors"),(0,n.kt)("h3",{id:"constructor"},"constructor"),(0,n.kt)("p",null,"\u2022 ",(0,n.kt)("strong",{parentName:"p"},"new PageRenderer"),"()"),(0,n.kt)("h2",{id:"methods"},"Methods"),(0,n.kt)("h3",{id:"mount"},"mount"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"mount"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"controller"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"view"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"pageResources"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"routeOptions"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,n.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,n.kt)("p",null,"Renders the page using the provided controller and view. The actual\nbehavior of this method differs at the client-side and the at\nserver-side in the following way:"),(0,n.kt)("p",null,"At the server, the method first waits for all the resources to load, and\nthen renders the page to a string containing HTML markup to send to the\nclient."),(0,n.kt)("p",null,"At the client, the method uses the already available resources to render\nthe page into DOM, re-using the DOM created from the HTML markup send by\nthe server if possible. After this the method will re-render the page\nevery time another resource being loaded finishes its loading and\nbecomes available."),(0,n.kt)("p",null,"Note that the method renders the page at the client-side only after all\nresources have been loaded if this is the first time this method is\ninvoked at the client."),(0,n.kt)("h4",{id:"parameters"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"controller")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Controller"},(0,n.kt)("inlineCode",{parentName:"a"},"Controller")),"<{}, {}, {}",">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"The current page controller.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"view")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"unknown")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The page's view.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"pageResources")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownpromiseparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownPromiseParameters"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The resources for the view loaded by the controller.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"routeOptions")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The current route options.")))),(0,n.kt)("h4",{id:"returns"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,n.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,n.kt)("p",null,"A promise that will resolve to information about the\nrendered page. The ",(0,n.kt)("inlineCode",{parentName:"p"},"status")," will contain the HTTP status\ncode to send to the client (at the server side) or determine the\ntype of error page to navigate to (at the client side)."),(0,n.kt)("h4",{id:"defined-in"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/renderer/PageRenderer.ts#L62"},"packages/core/src/page/renderer/PageRenderer.ts:62")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"setstate"},"setState"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"setState"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"state"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,n.kt)("p",null,"Sets the provided state to the currently rendered view."),(0,n.kt)("p",null,"This method has no effect at the server-side."),(0,n.kt)("h4",{id:"parameters-1"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"state")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownParameters"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The state to set to the currently rendered view.")))),(0,n.kt)("h4",{id:"returns-1"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void"),">"),(0,n.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/renderer/PageRenderer.ts#L119"},"packages/core/src/page/renderer/PageRenderer.ts:119")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"unmount"},"unmount"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"unmount"),"(): ",(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("p",null,"Unmounts the view from the DOM."),(0,n.kt)("p",null,"This method has no effect at the server-side."),(0,n.kt)("h4",{id:"returns-2"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"void")),(0,n.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/renderer/PageRenderer.ts#L107"},"packages/core/src/page/renderer/PageRenderer.ts:107")),(0,n.kt)("hr",null),(0,n.kt)("h3",{id:"update"},"update"),(0,n.kt)("p",null,"\u25b8 ",(0,n.kt)("strong",{parentName:"p"},"update"),"(",(0,n.kt)("inlineCode",{parentName:"p"},"controller"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"view"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"resourcesUpdate"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"routeOptions"),"): ",(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,n.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,n.kt)("p",null,"Handles update of the current route that does not replace the current\ncontroller and view."),(0,n.kt)("p",null,"The method will use the already available resource to update the\ncontroller's state and the view immediately. After that, the method will\nupdate the controller's state and view with every resource that becomes\nresolved."),(0,n.kt)("h4",{id:"parameters-2"},"Parameters"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,n.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"controller")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Controller"},(0,n.kt)("inlineCode",{parentName:"a"},"Controller")),"<{}, {}, {}",">"),(0,n.kt)("td",{parentName:"tr",align:"left"},"The current page controller.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"view")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"unknown")),(0,n.kt)("td",{parentName:"tr",align:"left"},"The page's view.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"resourcesUpdate")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/modules/ima_core#unknownpromiseparameters"},(0,n.kt)("inlineCode",{parentName:"a"},"UnknownPromiseParameters"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The resources that represent the update the of current state according to the current route and its parameters.")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("inlineCode",{parentName:"td"},"routeOptions")),(0,n.kt)("td",{parentName:"tr",align:"left"},(0,n.kt)("a",{parentName:"td",href:"/api/interfaces/ima_core.RouteOptions"},(0,n.kt)("inlineCode",{parentName:"a"},"RouteOptions"))),(0,n.kt)("td",{parentName:"tr",align:"left"},"The current route options.")))),(0,n.kt)("h4",{id:"returns-3"},"Returns"),(0,n.kt)("p",null,(0,n.kt)("inlineCode",{parentName:"p"},"Promise"),"<",(0,n.kt)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,n.kt)("a",{parentName:"p",href:"/api/modules/ima_core#pagedata"},(0,n.kt)("inlineCode",{parentName:"a"},"PageData")),">"),(0,n.kt)("p",null,"A promise that will resolve to information about the\nrendered page. The ",(0,n.kt)("inlineCode",{parentName:"p"},"status")," will contain the HTTP status\ncode to send to the client (at the server side) or determine the\ntype of error page to navigate to (at the client side).\nThe ",(0,n.kt)("inlineCode",{parentName:"p"},"content")," field will contain the rendered markup of\nthe page at the server-side, or ",(0,n.kt)("inlineCode",{parentName:"p"},"null")," at the client-side."),(0,n.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/renderer/PageRenderer.ts#L93"},"packages/core/src/page/renderer/PageRenderer.ts:93")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3149f580.15649ff4.js b/assets/js/3149f580.e6982776.js similarity index 96% rename from assets/js/3149f580.15649ff4.js rename to assets/js/3149f580.e6982776.js index 550b686c73..2be6fbaa1c 100644 --- a/assets/js/3149f580.15649ff4.js +++ b/assets/js/3149f580.e6982776.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4966],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>c});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=n.createContext({}),s=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},d=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},k="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),k=s(a),u=r,c=k["".concat(p,".").concat(u)]||k[u]||m[u]||i;return a?n.createElement(c,o(o({ref:t},d),{},{components:a})):n.createElement(c,o({ref:t},d))}));function c(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,o=new Array(i);o[0]=u;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[k]="string"==typeof e?e:r,o[1]=l;for(var s=2;s{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>m,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_core.CookieStorage",title:"Class: CookieStorage",sidebar_label:"@ima/core.CookieStorage",custom_edit_url:null},o=void 0,l={unversionedId:"api/classes/ima_core.CookieStorage",id:"api/classes/ima_core.CookieStorage",title:"Class: CookieStorage",description:"@ima/core.CookieStorage",source:"@site/../docs/api/classes/ima_core.CookieStorage.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.CookieStorage",permalink:"/api/classes/ima_core.CookieStorage",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.CookieStorage",title:"Class: CookieStorage",sidebar_label:"@ima/core.CookieStorage",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.ControllerDecorator",permalink:"/api/classes/ima_core.ControllerDecorator"},next:{title:"@ima/core.Dictionary",permalink:"/api/classes/ima_core.Dictionary"}},p={},s=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"#memoParseRawCookies",id:"memoparserawcookies",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"_options",id:"_options",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"_request",id:"_request",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"_response",id:"_response",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"_storage",id:"_storage",level:3},{value:"Defined in",id:"defined-in-5",level:4},{value:"_transformFunction",id:"_transformfunction",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"_window",id:"_window",level:3},{value:"Defined in",id:"defined-in-7",level:4},{value:"Accessors",id:"accessors",level:2},{value:"$dependencies",id:"dependencies",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"Methods",id:"methods",level:2},{value:"#extractCookie",id:"extractcookie",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"#extractNameAndValue",id:"extractnameandvalue",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"#firstLetterToLowerCase",id:"firstlettertolowercase",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"#generateCookieString",id:"generatecookiestring",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"#parseRawCookies",id:"parserawcookies",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"clear",id:"clear",level:3},{value:"Returns",id:"returns-6",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"delete",id:"delete",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-7",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"get",id:"get",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-8",level:4},{value:"Overrides",id:"overrides-3",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"getCookiesStringForCookieHeader",id:"getcookiesstringforcookieheader",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-9",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"getExpirationAsDate",id:"getexpirationasdate",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-10",level:4},{value:"Defined in",id:"defined-in-18",level:4},{value:"has",id:"has",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-11",level:4},{value:"Overrides",id:"overrides-4",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"init",id:"init",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-12",level:4},{value:"Overrides",id:"overrides-5",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"keys",id:"keys",level:3},{value:"Returns",id:"returns-13",level:4},{value:"Overrides",id:"overrides-6",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"parse",id:"parse",level:3},{value:"Returns",id:"returns-14",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"parseFromSetCookieHeader",id:"parsefromsetcookieheader",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-15",level:4},{value:"Defined in",id:"defined-in-23",level:4},{value:"recomputeCookieMaxAgeAndExpires",id:"recomputecookiemaxageandexpires",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-16",level:4},{value:"Defined in",id:"defined-in-24",level:4},{value:"sanitizeCookieValue",id:"sanitizecookievalue",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-17",level:4},{value:"Defined in",id:"defined-in-25",level:4},{value:"set",id:"set",level:3},{value:"Parameters",id:"parameters-15",level:4},{value:"Returns",id:"returns-18",level:4},{value:"Overrides",id:"overrides-7",level:4},{value:"Defined in",id:"defined-in-26",level:4},{value:"size",id:"size",level:3},{value:"Returns",id:"returns-19",level:4},{value:"Overrides",id:"overrides-8",level:4},{value:"Defined in",id:"defined-in-27",level:4},{value:"validateCookieSecurity",id:"validatecookiesecurity",level:3},{value:"Parameters",id:"parameters-16",level:4},{value:"Returns",id:"returns-20",level:4},{value:"Defined in",id:"defined-in-28",level:4}],d={toc:s},k="wrapper";function m(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".CookieStorage"),(0,r.kt)("p",null,"Storage of cookies, mirroring the cookies to the current request / response\nat the server side and the ",(0,r.kt)("inlineCode",{parentName:"p"},"document.cookie")," property at the client\nside. The storage caches the cookies internally."),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,r.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#cookie"},(0,r.kt)("inlineCode",{parentName:"a"},"Cookie")),"[",(0,r.kt)("inlineCode",{parentName:"p"},'"value"'),"]",">"),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"CookieStorage"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new CookieStorage"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"window"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"request"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"response"),")"),(0,r.kt)("p",null,"Initializes the cookie storage."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"window")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The window utility.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"request")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Request"},(0,r.kt)("inlineCode",{parentName:"a"},"Request"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The current HTTP request.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"response")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Response"},(0,r.kt)("inlineCode",{parentName:"a"},"Response"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The current HTTP response.")))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Example"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"cookie.set('cookie', 'value', { expires: 10 }); // cookie expires\n // after 10s\n cookie.set('cookie'); // delete cookie\n")),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#constructor"},"constructor")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L182"},"packages/core/src/storage/CookieStorage.ts:182")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"memoparserawcookies"},"#memoParseRawCookies"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#memoParseRawCookies"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"MemoizedFn"),"<(",(0,r.kt)("inlineCode",{parentName:"p"},"rawCookies"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"[]",">"),(0,r.kt)("p",null,"Memoized function of private parseRawCookies function"),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L93"},"packages/core/src/storage/CookieStorage.ts:93")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_options"},"_","options"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","options"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#cookieoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieOptions"))),(0,r.kt)("p",null,"The overriding cookie attribute values."),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L68"},"packages/core/src/storage/CookieStorage.ts:68")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_request"},"_","request"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","request"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Request"},(0,r.kt)("inlineCode",{parentName:"a"},"Request"))),(0,r.kt)("p",null,"The current HTTP request. This field is used at the server side."),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L53"},"packages/core/src/storage/CookieStorage.ts:53")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_response"},"_","response"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","response"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Response"},(0,r.kt)("inlineCode",{parentName:"a"},"Response"))),(0,r.kt)("p",null,"The current HTTP response. This field is used at the server side."),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L58"},"packages/core/src/storage/CookieStorage.ts:58")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_storage"},"_","storage"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","storage"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Map"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#cookie"},(0,r.kt)("inlineCode",{parentName:"a"},"Cookie")),">"),(0,r.kt)("p",null,"The internal storage of entries."),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L63"},"packages/core/src/storage/CookieStorage.ts:63")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_transformfunction"},"_","transformFunction"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","transformFunction"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"Transform encode and decode functions for cookie value."),(0,r.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"decode")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"value"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string"),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"encode")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"value"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string"),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L82"},"packages/core/src/storage/CookieStorage.ts:82")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_window"},"_","window"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","window"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))),(0,r.kt)("p",null,"The window utility used to determine whether the IMA is being run\nat the client or at the server."),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L48"},"packages/core/src/storage/CookieStorage.ts:48")),(0,r.kt)("h2",{id:"accessors"},"Accessors"),(0,r.kt)("h3",{id:"dependencies"},"$dependencies"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("inlineCode",{parentName:"p"},"get")," ",(0,r.kt)("strong",{parentName:"p"},"$dependencies"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L95"},"packages/core/src/storage/CookieStorage.ts:95")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"extractcookie"},"#extractCookie"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#extractCookie"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"cookieString"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#cookie"},(0,r.kt)("inlineCode",{parentName:"a"},"Cookie"))," & { ",(0,r.kt)("inlineCode",{parentName:"p"},"name?"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," }"),(0,r.kt)("p",null,"Extract cookie name, value and options from cookie string."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"cookieString")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The value of the ",(0,r.kt)("inlineCode",{parentName:"td"},"Set-Cookie")," HTTP header.")))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#cookie"},(0,r.kt)("inlineCode",{parentName:"a"},"Cookie"))," & { ",(0,r.kt)("inlineCode",{parentName:"p"},"name?"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," }"),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L590"},"packages/core/src/storage/CookieStorage.ts:590")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"extractnameandvalue"},"#extractNameAndValue"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#extractNameAndValue"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"pair"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"pairIndex"),"): ","[",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Date"),"]"),(0,r.kt)("p",null,"Extract name and value for defined pair and pair index."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"pair")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"pairIndex")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number"))))),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,"[",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Date"),"]"),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L620"},"packages/core/src/storage/CookieStorage.ts:620")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"firstlettertolowercase"},"#firstLetterToLowerCase"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#firstLetterToLowerCase"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"word"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Creates a copy of the provided word (or text) that has its first\ncharacter converted to lower case."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"word")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The word (or any text) that should have its first character converted to lower case.")))),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"A copy of the provided string with its first character\nconverted to lower case."),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L539"},"packages/core/src/storage/CookieStorage.ts:539")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"generatecookiestring"},"#generateCookieString"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#generateCookieString"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"value"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Generates a string representing the specified cookie, usable either\nwith the ",(0,r.kt)("inlineCode",{parentName:"p"},"document.cookie")," property or the ",(0,r.kt)("inlineCode",{parentName:"p"},"Set-Cookie")," HTTP\nheader."),(0,r.kt)("p",null,"(Note that the ",(0,r.kt)("inlineCode",{parentName:"p"},"Cookie")," HTTP header uses a slightly different\nsyntax.)"),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The cookie name.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Date")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The cookie value, will be converted to string.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#cookieoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieOptions"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"Cookie attributes. Only the attributes listed in the type annotation of this field are supported. For documentation and full list of cookie attributes see ",(0,r.kt)("a",{parentName:"td",href:"http://tools.ietf.org/html/rfc2965#page-5"},"http://tools.ietf.org/html/rfc2965#page-5"))))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"A string representing the cookie. Setting this string\nto the ",(0,r.kt)("inlineCode",{parentName:"p"},"document.cookie")," property will set the cookie to\nthe browser's cookie storage."),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L562"},"packages/core/src/storage/CookieStorage.ts:562")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"parserawcookies"},"#parseRawCookies"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#parseRawCookies"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"rawCookies"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"[]"),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"rawCookies")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string"),"[]"),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L495"},"packages/core/src/storage/CookieStorage.ts:495")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"clear"},"clear"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"clear"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"Clears the storage of all entries."),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"This storage."),(0,r.kt)("h4",{id:"overrides-1"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#clear"},"clear")),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L280"},"packages/core/src/storage/CookieStorage.ts:280")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"delete"},"delete"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"delete"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"Deletes the cookie identified by the specified name."),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Name identifying the cookie.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#cookieoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieOptions"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The cookie options. The ",(0,r.kt)("inlineCode",{parentName:"td"},"domain")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"path")," specify the cookie's domain and path. The ",(0,r.kt)("inlineCode",{parentName:"td"},"httpOnly")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"secure")," flags set the flags of the same name of the cookie.")))),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"This storage."),(0,r.kt)("h4",{id:"overrides-2"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#delete"},"delete")),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L268"},"packages/core/src/storage/CookieStorage.ts:268")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"get"},"get"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"get"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Date")),(0,r.kt)("p",null,"Retrieves the value of the entry identified by the specified . The\nmethod returns ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined")," if the entry does not exists."),(0,r.kt)("p",null,"Entries set to the ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined")," value can be tested for existence\nusing the ",(0,r.kt)("inlineCode",{parentName:"p"},"link has")," method."),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The key identifying the storage entry.")))),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Date")),(0,r.kt)("p",null,"The value of the storage entry."),(0,r.kt)("h4",{id:"overrides-3"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#get"},"get")),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L216"},"packages/core/src/storage/CookieStorage.ts:216")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getcookiesstringforcookieheader"},"getCookiesStringForCookieHeader"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getCookiesStringForCookieHeader"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"url?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Returns all cookies in this storage serialized to a string compatible\nwith the ",(0,r.kt)("inlineCode",{parentName:"p"},"Cookie")," HTTP header."),(0,r.kt)("p",null,"When ",(0,r.kt)("inlineCode",{parentName:"p"},"url")," is provided, the method validates the cookie security based on\nthe ",(0,r.kt)("inlineCode",{parentName:"p"},"url")," and the cookie's domain, path, and secure attributes."),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"url?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"All cookies in this storage serialized to a string\ncompatible with the ",(0,r.kt)("inlineCode",{parentName:"p"},"Cookie")," HTTP header."),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L318"},"packages/core/src/storage/CookieStorage.ts:318")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getexpirationasdate"},"getExpirationAsDate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getExpirationAsDate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"expiration"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Date")),(0,r.kt)("p",null,"Converts the provided cookie expiration to a ",(0,r.kt)("inlineCode",{parentName:"p"},"Date")," instance."),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"expiration")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Date")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Cookie expiration in seconds from now, or as a string compatible with the ",(0,r.kt)("inlineCode",{parentName:"td"},"Date")," constructor.")))),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Date")),(0,r.kt)("p",null,"Cookie expiration as a ",(0,r.kt)("inlineCode",{parentName:"p"},"Date")," instance."),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L481"},"packages/core/src/storage/CookieStorage.ts:481")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"has"},"has"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"has"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Returns ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the entry identified by the specified key exists\nin this storage."),(0,r.kt)("h4",{id:"parameters-10"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The key identifying the storage entry.")))),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the storage entry exists."),(0,r.kt)("h4",{id:"overrides-4"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#has"},"has")),(0,r.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L207"},"packages/core/src/storage/CookieStorage.ts:207")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"init"},"init"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"init"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"transformFunction?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"This method is used to finalize the initialization of the storage after\nthe dependencies provided through the constructor have been prepared for\nuse."),(0,r.kt)("p",null,"This method must be invoked only once and it must be the first method\ninvoked on this instance."),(0,r.kt)("h4",{id:"parameters-11"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#cookieoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieOptions")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"transformFunction")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Object"))))),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"This storage."),(0,r.kt)("h4",{id:"overrides-5"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#init"},"init")),(0,r.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L193"},"packages/core/src/storage/CookieStorage.ts:193")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"keys"},"keys"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"keys"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Iterable"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"string"),">"),(0,r.kt)("p",null,"Returns an iterator for traversing the keys in this storage. The order\nin which the keys are traversed is undefined."),(0,r.kt)("h4",{id:"returns-13"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Iterable"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"string"),">"),(0,r.kt)("p",null,"An iterator for traversing the keys in this\nstorage. The iterator also implements the iterable protocol,\nreturning itself as its own iterator, allowing it to be used in\na ",(0,r.kt)("inlineCode",{parentName:"p"},"for..of")," loop."),(0,r.kt)("h4",{id:"overrides-6"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#keys"},"keys")),(0,r.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L293"},"packages/core/src/storage/CookieStorage.ts:293")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"parse"},"parse"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"parse"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Parses cookies from a cookie string and sets the parsed cookies to the\ninternal storage."),(0,r.kt)("p",null,"The method obtains the cookie string from the request's ",(0,r.kt)("inlineCode",{parentName:"p"},"Cookie"),"\nHTTP header when used at the server side, and the ",(0,r.kt)("inlineCode",{parentName:"p"},"document.cookie"),"\nproperty at the client side."),(0,r.kt)("h4",{id:"returns-14"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L393"},"packages/core/src/storage/CookieStorage.ts:393")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"parsefromsetcookieheader"},"parseFromSetCookieHeader"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"parseFromSetCookieHeader"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"cookiesString"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"url?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Parses cookies from the provided ",(0,r.kt)("inlineCode",{parentName:"p"},"Set-Cookie")," HTTP header value."),(0,r.kt)("p",null,"When ",(0,r.kt)("inlineCode",{parentName:"p"},"url")," is provided, the method validates the cookie security based on\nthe ",(0,r.kt)("inlineCode",{parentName:"p"},"url")," and the cookie's domain, path, and secure attributes."),(0,r.kt)("p",null,"The parsed cookies will be set to the internal storage, and the current\nHTTP response (via the ",(0,r.kt)("inlineCode",{parentName:"p"},"Set-Cookie")," HTTP header) if at the server\nside, or the browser (via the ",(0,r.kt)("inlineCode",{parentName:"p"},"document.cookie")," property)."),(0,r.kt)("h4",{id:"parameters-12"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"cookiesString")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The value of the ",(0,r.kt)("inlineCode",{parentName:"td"},"Set-Cookie")," HTTP header. When there are multiple cookies, the value can be provided as an array of strings.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"url?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"-")))),(0,r.kt)("h4",{id:"returns-15"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L357"},"packages/core/src/storage/CookieStorage.ts:357")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"recomputecookiemaxageandexpires"},"recomputeCookieMaxAgeAndExpires"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"recomputeCookieMaxAgeAndExpires"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"options"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Recomputes cookie's attributes maxAge and expires between each other."),(0,r.kt)("h4",{id:"parameters-13"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#cookieoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieOptions"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"Cookie attributes. Only the attributes listed in the type annotation of this field are supported. For documentation and full list of cookie attributes see ",(0,r.kt)("a",{parentName:"td",href:"http://tools.ietf.org/html/rfc2965#page-5"},"http://tools.ietf.org/html/rfc2965#page-5"))))),(0,r.kt)("h4",{id:"returns-16"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L459"},"packages/core/src/storage/CookieStorage.ts:459")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"sanitizecookievalue"},"sanitizeCookieValue"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"sanitizeCookieValue"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"value"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Sanitize cookie value by rules in\n(@see ",(0,r.kt)("a",{parentName:"p",href:"http://tools.ietf.org/html/rfc6265#section-4r.1.1"},"http://tools.ietf.org/html/rfc6265#section-4r.1.1"),"). Erase all\ninvalid characters from cookie value."),(0,r.kt)("h4",{id:"parameters-14"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Date")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Cookie value")))),(0,r.kt)("h4",{id:"returns-17"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Sanitized value"),(0,r.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L417"},"packages/core/src/storage/CookieStorage.ts:417")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"set"},"set"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"set"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"value"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"Sets the storage entry identified by the specified key to the provided\nvalue. The method creates the entry if it does not exist already."),(0,r.kt)("h4",{id:"parameters-15"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The key identifying the storage entry.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Date")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The storage entry value.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#cookieoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieOptions"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The cookie options. The ",(0,r.kt)("inlineCode",{parentName:"td"},"maxAge")," is the maximum age in seconds of the cookie before it will be deleted, the ",(0,r.kt)("inlineCode",{parentName:"td"},"expires")," is an alternative to that, specifying the moment at which the cookie will be discarded. The ",(0,r.kt)("inlineCode",{parentName:"td"},"domain")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"path")," specify the cookie's domain and path. The ",(0,r.kt)("inlineCode",{parentName:"td"},"httpOnly")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"secure")," flags set the flags of the same name of the cookie.")))),(0,r.kt)("h4",{id:"returns-18"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"This storage."),(0,r.kt)("h4",{id:"overrides-7"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#set"},"set")),(0,r.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L234"},"packages/core/src/storage/CookieStorage.ts:234")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"size"},"size"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"size"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"number")),(0,r.kt)("p",null,"Returns the number of entries in this storage."),(0,r.kt)("h4",{id:"returns-19"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"number")),(0,r.kt)("p",null,"The number of entries in this storage."),(0,r.kt)("h4",{id:"overrides-8"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#size"},"size")),(0,r.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L302"},"packages/core/src/storage/CookieStorage.ts:302")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"validatecookiesecurity"},"validateCookieSecurity"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("strong",{parentName:"p"},"validateCookieSecurity"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"cookie"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"url"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Filters invalid cookies based on the provided url.\nWe try to check validity of the domain based on secure, path and\ndomain definitions."),(0,r.kt)("h4",{id:"parameters-16"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"cookie")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#cookie"},(0,r.kt)("inlineCode",{parentName:"a"},"Cookie")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"url")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"returns-20"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/storage/CookieStorage.ts#L104"},"packages/core/src/storage/CookieStorage.ts:104")))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4966],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>c});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=n.createContext({}),s=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},d=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},k="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),k=s(a),u=r,c=k["".concat(p,".").concat(u)]||k[u]||m[u]||i;return a?n.createElement(c,o(o({ref:t},d),{},{components:a})):n.createElement(c,o({ref:t},d))}));function c(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,o=new Array(i);o[0]=u;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[k]="string"==typeof e?e:r,o[1]=l;for(var s=2;s{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>m,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_core.CookieStorage",title:"Class: CookieStorage",sidebar_label:"@ima/core.CookieStorage",custom_edit_url:null},o=void 0,l={unversionedId:"api/classes/ima_core.CookieStorage",id:"api/classes/ima_core.CookieStorage",title:"Class: CookieStorage",description:"@ima/core.CookieStorage",source:"@site/../docs/api/classes/ima_core.CookieStorage.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.CookieStorage",permalink:"/api/classes/ima_core.CookieStorage",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.CookieStorage",title:"Class: CookieStorage",sidebar_label:"@ima/core.CookieStorage",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.ControllerDecorator",permalink:"/api/classes/ima_core.ControllerDecorator"},next:{title:"@ima/core.Dictionary",permalink:"/api/classes/ima_core.Dictionary"}},p={},s=[{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"#memoParseRawCookies",id:"memoparserawcookies",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"_options",id:"_options",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"_request",id:"_request",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"_response",id:"_response",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"_storage",id:"_storage",level:3},{value:"Defined in",id:"defined-in-5",level:4},{value:"_transformFunction",id:"_transformfunction",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"_window",id:"_window",level:3},{value:"Defined in",id:"defined-in-7",level:4},{value:"Accessors",id:"accessors",level:2},{value:"$dependencies",id:"dependencies",level:3},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"Methods",id:"methods",level:2},{value:"#extractCookie",id:"extractcookie",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"#extractNameAndValue",id:"extractnameandvalue",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"#firstLetterToLowerCase",id:"firstlettertolowercase",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"#generateCookieString",id:"generatecookiestring",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"#parseRawCookies",id:"parserawcookies",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-5",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"clear",id:"clear",level:3},{value:"Returns",id:"returns-6",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"delete",id:"delete",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-7",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"get",id:"get",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-8",level:4},{value:"Overrides",id:"overrides-3",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"getCookiesStringForCookieHeader",id:"getcookiesstringforcookieheader",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-9",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"getExpirationAsDate",id:"getexpirationasdate",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-10",level:4},{value:"Defined in",id:"defined-in-18",level:4},{value:"has",id:"has",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-11",level:4},{value:"Overrides",id:"overrides-4",level:4},{value:"Defined in",id:"defined-in-19",level:4},{value:"init",id:"init",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-12",level:4},{value:"Overrides",id:"overrides-5",level:4},{value:"Defined in",id:"defined-in-20",level:4},{value:"keys",id:"keys",level:3},{value:"Returns",id:"returns-13",level:4},{value:"Overrides",id:"overrides-6",level:4},{value:"Defined in",id:"defined-in-21",level:4},{value:"parse",id:"parse",level:3},{value:"Returns",id:"returns-14",level:4},{value:"Defined in",id:"defined-in-22",level:4},{value:"parseFromSetCookieHeader",id:"parsefromsetcookieheader",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-15",level:4},{value:"Defined in",id:"defined-in-23",level:4},{value:"recomputeCookieMaxAgeAndExpires",id:"recomputecookiemaxageandexpires",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-16",level:4},{value:"Defined in",id:"defined-in-24",level:4},{value:"sanitizeCookieValue",id:"sanitizecookievalue",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-17",level:4},{value:"Defined in",id:"defined-in-25",level:4},{value:"set",id:"set",level:3},{value:"Parameters",id:"parameters-15",level:4},{value:"Returns",id:"returns-18",level:4},{value:"Overrides",id:"overrides-7",level:4},{value:"Defined in",id:"defined-in-26",level:4},{value:"size",id:"size",level:3},{value:"Returns",id:"returns-19",level:4},{value:"Overrides",id:"overrides-8",level:4},{value:"Defined in",id:"defined-in-27",level:4},{value:"validateCookieSecurity",id:"validatecookiesecurity",level:3},{value:"Parameters",id:"parameters-16",level:4},{value:"Returns",id:"returns-20",level:4},{value:"Defined in",id:"defined-in-28",level:4}],d={toc:s},k="wrapper";function m(e){let{components:t,...a}=e;return(0,r.kt)(k,(0,n.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".CookieStorage"),(0,r.kt)("p",null,"Storage of cookies, mirroring the cookies to the current request / response\nat the server side and the ",(0,r.kt)("inlineCode",{parentName:"p"},"document.cookie")," property at the client\nside. The storage caches the cookies internally."),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},(0,r.kt)("inlineCode",{parentName:"a"},"Storage")),"<",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#cookie"},(0,r.kt)("inlineCode",{parentName:"a"},"Cookie")),"[",(0,r.kt)("inlineCode",{parentName:"p"},'"value"'),"]",">"),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"CookieStorage"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new CookieStorage"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"window"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"request"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"response"),")"),(0,r.kt)("p",null,"Initializes the cookie storage."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"window")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The window utility.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"request")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Request"},(0,r.kt)("inlineCode",{parentName:"a"},"Request"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The current HTTP request.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"response")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Response"},(0,r.kt)("inlineCode",{parentName:"a"},"Response"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The current HTTP response.")))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"Example"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"cookie.set('cookie', 'value', { expires: 10 }); // cookie expires\n // after 10s\n cookie.set('cookie'); // delete cookie\n")),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#constructor"},"constructor")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L182"},"packages/core/src/storage/CookieStorage.ts:182")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"memoparserawcookies"},"#memoParseRawCookies"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#memoParseRawCookies"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"MemoizedFn"),"<(",(0,r.kt)("inlineCode",{parentName:"p"},"rawCookies"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"[]",">"),(0,r.kt)("p",null,"Memoized function of private parseRawCookies function"),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L93"},"packages/core/src/storage/CookieStorage.ts:93")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_options"},"_","options"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","options"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#cookieoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieOptions"))),(0,r.kt)("p",null,"The overriding cookie attribute values."),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L68"},"packages/core/src/storage/CookieStorage.ts:68")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_request"},"_","request"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","request"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Request"},(0,r.kt)("inlineCode",{parentName:"a"},"Request"))),(0,r.kt)("p",null,"The current HTTP request. This field is used at the server side."),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L53"},"packages/core/src/storage/CookieStorage.ts:53")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_response"},"_","response"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","response"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Response"},(0,r.kt)("inlineCode",{parentName:"a"},"Response"))),(0,r.kt)("p",null,"The current HTTP response. This field is used at the server side."),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L58"},"packages/core/src/storage/CookieStorage.ts:58")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_storage"},"_","storage"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","storage"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Map"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#cookie"},(0,r.kt)("inlineCode",{parentName:"a"},"Cookie")),">"),(0,r.kt)("p",null,"The internal storage of entries."),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L63"},"packages/core/src/storage/CookieStorage.ts:63")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_transformfunction"},"_","transformFunction"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","transformFunction"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"Object")),(0,r.kt)("p",null,"Transform encode and decode functions for cookie value."),(0,r.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"decode")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"value"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string"),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"encode")),(0,r.kt)("td",{parentName:"tr",align:"left"},"(",(0,r.kt)("inlineCode",{parentName:"td"},"value"),": ",(0,r.kt)("inlineCode",{parentName:"td"},"string"),") => ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L82"},"packages/core/src/storage/CookieStorage.ts:82")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_window"},"_","window"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","window"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Window"},(0,r.kt)("inlineCode",{parentName:"a"},"Window"))),(0,r.kt)("p",null,"The window utility used to determine whether the IMA is being run\nat the client or at the server."),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L48"},"packages/core/src/storage/CookieStorage.ts:48")),(0,r.kt)("h2",{id:"accessors"},"Accessors"),(0,r.kt)("h3",{id:"dependencies"},"$dependencies"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("inlineCode",{parentName:"p"},"get")," ",(0,r.kt)("strong",{parentName:"p"},"$dependencies"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#dependencies"},(0,r.kt)("inlineCode",{parentName:"a"},"Dependencies"))),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L95"},"packages/core/src/storage/CookieStorage.ts:95")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"extractcookie"},"#extractCookie"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#extractCookie"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"cookieString"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#cookie"},(0,r.kt)("inlineCode",{parentName:"a"},"Cookie"))," & { ",(0,r.kt)("inlineCode",{parentName:"p"},"name?"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," }"),(0,r.kt)("p",null,"Extract cookie name, value and options from cookie string."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"cookieString")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The value of the ",(0,r.kt)("inlineCode",{parentName:"td"},"Set-Cookie")," HTTP header.")))),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core#cookie"},(0,r.kt)("inlineCode",{parentName:"a"},"Cookie"))," & { ",(0,r.kt)("inlineCode",{parentName:"p"},"name?"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," }"),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L590"},"packages/core/src/storage/CookieStorage.ts:590")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"extractnameandvalue"},"#extractNameAndValue"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#extractNameAndValue"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"pair"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"pairIndex"),"): ","[",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Date"),"]"),(0,r.kt)("p",null,"Extract name and value for defined pair and pair index."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"pair")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"pairIndex")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"number"))))),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,"[",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Date"),"]"),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L620"},"packages/core/src/storage/CookieStorage.ts:620")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"firstlettertolowercase"},"#firstLetterToLowerCase"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#firstLetterToLowerCase"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"word"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Creates a copy of the provided word (or text) that has its first\ncharacter converted to lower case."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"word")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The word (or any text) that should have its first character converted to lower case.")))),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"A copy of the provided string with its first character\nconverted to lower case."),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L539"},"packages/core/src/storage/CookieStorage.ts:539")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"generatecookiestring"},"#generateCookieString"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#generateCookieString"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"value"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Generates a string representing the specified cookie, usable either\nwith the ",(0,r.kt)("inlineCode",{parentName:"p"},"document.cookie")," property or the ",(0,r.kt)("inlineCode",{parentName:"p"},"Set-Cookie")," HTTP\nheader."),(0,r.kt)("p",null,"(Note that the ",(0,r.kt)("inlineCode",{parentName:"p"},"Cookie")," HTTP header uses a slightly different\nsyntax.)"),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The cookie name.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Date")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The cookie value, will be converted to string.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#cookieoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieOptions"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"Cookie attributes. Only the attributes listed in the type annotation of this field are supported. For documentation and full list of cookie attributes see ",(0,r.kt)("a",{parentName:"td",href:"http://tools.ietf.org/html/rfc2965#page-5"},"http://tools.ietf.org/html/rfc2965#page-5"))))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"A string representing the cookie. Setting this string\nto the ",(0,r.kt)("inlineCode",{parentName:"p"},"document.cookie")," property will set the cookie to\nthe browser's cookie storage."),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L562"},"packages/core/src/storage/CookieStorage.ts:562")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"parserawcookies"},"#parseRawCookies"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"#parseRawCookies"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"rawCookies"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"[]"),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"rawCookies")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string"),"[]"),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L495"},"packages/core/src/storage/CookieStorage.ts:495")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"clear"},"clear"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"clear"),"(): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"Clears the storage of all entries."),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"This storage."),(0,r.kt)("h4",{id:"overrides-1"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#clear"},"clear")),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L280"},"packages/core/src/storage/CookieStorage.ts:280")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"delete"},"delete"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"delete"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"Deletes the cookie identified by the specified name."),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Name identifying the cookie.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#cookieoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieOptions"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The cookie options. The ",(0,r.kt)("inlineCode",{parentName:"td"},"domain")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"path")," specify the cookie's domain and path. The ",(0,r.kt)("inlineCode",{parentName:"td"},"httpOnly")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"secure")," flags set the flags of the same name of the cookie.")))),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"This storage."),(0,r.kt)("h4",{id:"overrides-2"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#delete"},"delete")),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L268"},"packages/core/src/storage/CookieStorage.ts:268")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"get"},"get"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"get"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Date")),(0,r.kt)("p",null,"Retrieves the value of the entry identified by the specified . The\nmethod returns ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined")," if the entry does not exists."),(0,r.kt)("p",null,"Entries set to the ",(0,r.kt)("inlineCode",{parentName:"p"},"undefined")," value can be tested for existence\nusing the ",(0,r.kt)("inlineCode",{parentName:"p"},"link has")," method."),(0,r.kt)("h4",{id:"parameters-7"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The key identifying the storage entry.")))),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Date")),(0,r.kt)("p",null,"The value of the storage entry."),(0,r.kt)("h4",{id:"overrides-3"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#get"},"get")),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L216"},"packages/core/src/storage/CookieStorage.ts:216")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getcookiesstringforcookieheader"},"getCookiesStringForCookieHeader"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getCookiesStringForCookieHeader"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"url?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Returns all cookies in this storage serialized to a string compatible\nwith the ",(0,r.kt)("inlineCode",{parentName:"p"},"Cookie")," HTTP header."),(0,r.kt)("p",null,"When ",(0,r.kt)("inlineCode",{parentName:"p"},"url")," is provided, the method validates the cookie security based on\nthe ",(0,r.kt)("inlineCode",{parentName:"p"},"url")," and the cookie's domain, path, and secure attributes."),(0,r.kt)("h4",{id:"parameters-8"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"url?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"All cookies in this storage serialized to a string\ncompatible with the ",(0,r.kt)("inlineCode",{parentName:"p"},"Cookie")," HTTP header."),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L318"},"packages/core/src/storage/CookieStorage.ts:318")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getexpirationasdate"},"getExpirationAsDate"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getExpirationAsDate"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"expiration"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"Date")),(0,r.kt)("p",null,"Converts the provided cookie expiration to a ",(0,r.kt)("inlineCode",{parentName:"p"},"Date")," instance."),(0,r.kt)("h4",{id:"parameters-9"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"expiration")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Date")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Cookie expiration in seconds from now, or as a string compatible with the ",(0,r.kt)("inlineCode",{parentName:"td"},"Date")," constructor.")))),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Date")),(0,r.kt)("p",null,"Cookie expiration as a ",(0,r.kt)("inlineCode",{parentName:"p"},"Date")," instance."),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L481"},"packages/core/src/storage/CookieStorage.ts:481")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"has"},"has"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"has"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Returns ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the entry identified by the specified key exists\nin this storage."),(0,r.kt)("h4",{id:"parameters-10"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The key identifying the storage entry.")))),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"true")," if the storage entry exists."),(0,r.kt)("h4",{id:"overrides-4"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#has"},"has")),(0,r.kt)("h4",{id:"defined-in-19"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L207"},"packages/core/src/storage/CookieStorage.ts:207")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"init"},"init"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"init"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"transformFunction?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"This method is used to finalize the initialization of the storage after\nthe dependencies provided through the constructor have been prepared for\nuse."),(0,r.kt)("p",null,"This method must be invoked only once and it must be the first method\ninvoked on this instance."),(0,r.kt)("h4",{id:"parameters-11"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#cookieoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieOptions")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"transformFunction")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"Object"))))),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"This storage."),(0,r.kt)("h4",{id:"overrides-5"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#init"},"init")),(0,r.kt)("h4",{id:"defined-in-20"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L193"},"packages/core/src/storage/CookieStorage.ts:193")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"keys"},"keys"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"keys"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"Iterable"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"string"),">"),(0,r.kt)("p",null,"Returns an iterator for traversing the keys in this storage. The order\nin which the keys are traversed is undefined."),(0,r.kt)("h4",{id:"returns-13"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Iterable"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"string"),">"),(0,r.kt)("p",null,"An iterator for traversing the keys in this\nstorage. The iterator also implements the iterable protocol,\nreturning itself as its own iterator, allowing it to be used in\na ",(0,r.kt)("inlineCode",{parentName:"p"},"for..of")," loop."),(0,r.kt)("h4",{id:"overrides-6"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#keys"},"keys")),(0,r.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L293"},"packages/core/src/storage/CookieStorage.ts:293")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"parse"},"parse"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"parse"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Parses cookies from a cookie string and sets the parsed cookies to the\ninternal storage."),(0,r.kt)("p",null,"The method obtains the cookie string from the request's ",(0,r.kt)("inlineCode",{parentName:"p"},"Cookie"),"\nHTTP header when used at the server side, and the ",(0,r.kt)("inlineCode",{parentName:"p"},"document.cookie"),"\nproperty at the client side."),(0,r.kt)("h4",{id:"returns-14"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L393"},"packages/core/src/storage/CookieStorage.ts:393")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"parsefromsetcookieheader"},"parseFromSetCookieHeader"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"parseFromSetCookieHeader"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"cookiesString"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"url?"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Parses cookies from the provided ",(0,r.kt)("inlineCode",{parentName:"p"},"Set-Cookie")," HTTP header value."),(0,r.kt)("p",null,"When ",(0,r.kt)("inlineCode",{parentName:"p"},"url")," is provided, the method validates the cookie security based on\nthe ",(0,r.kt)("inlineCode",{parentName:"p"},"url")," and the cookie's domain, path, and secure attributes."),(0,r.kt)("p",null,"The parsed cookies will be set to the internal storage, and the current\nHTTP response (via the ",(0,r.kt)("inlineCode",{parentName:"p"},"Set-Cookie")," HTTP header) if at the server\nside, or the browser (via the ",(0,r.kt)("inlineCode",{parentName:"p"},"document.cookie")," property)."),(0,r.kt)("h4",{id:"parameters-12"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"cookiesString")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string"),"[]"),(0,r.kt)("td",{parentName:"tr",align:"left"},"The value of the ",(0,r.kt)("inlineCode",{parentName:"td"},"Set-Cookie")," HTTP header. When there are multiple cookies, the value can be provided as an array of strings.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"url?")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"-")))),(0,r.kt)("h4",{id:"returns-15"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-23"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L357"},"packages/core/src/storage/CookieStorage.ts:357")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"recomputecookiemaxageandexpires"},"recomputeCookieMaxAgeAndExpires"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"recomputeCookieMaxAgeAndExpires"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"options"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Recomputes cookie's attributes maxAge and expires between each other."),(0,r.kt)("h4",{id:"parameters-13"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#cookieoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieOptions"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"Cookie attributes. Only the attributes listed in the type annotation of this field are supported. For documentation and full list of cookie attributes see ",(0,r.kt)("a",{parentName:"td",href:"http://tools.ietf.org/html/rfc2965#page-5"},"http://tools.ietf.org/html/rfc2965#page-5"))))),(0,r.kt)("h4",{id:"returns-16"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L459"},"packages/core/src/storage/CookieStorage.ts:459")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"sanitizecookievalue"},"sanitizeCookieValue"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"sanitizeCookieValue"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"value"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Sanitize cookie value by rules in\n(@see ",(0,r.kt)("a",{parentName:"p",href:"http://tools.ietf.org/html/rfc6265#section-4r.1.1"},"http://tools.ietf.org/html/rfc6265#section-4r.1.1"),"). Erase all\ninvalid characters from cookie value."),(0,r.kt)("h4",{id:"parameters-14"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Date")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Cookie value")))),(0,r.kt)("h4",{id:"returns-17"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"string")),(0,r.kt)("p",null,"Sanitized value"),(0,r.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L417"},"packages/core/src/storage/CookieStorage.ts:417")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"set"},"set"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"set"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"name"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"value"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"Sets the storage entry identified by the specified key to the provided\nvalue. The method creates the entry if it does not exist already."),(0,r.kt)("h4",{id:"parameters-15"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"name")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The key identifying the storage entry.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"value")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"undefined")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"boolean")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Date")),(0,r.kt)("td",{parentName:"tr",align:"left"},"The storage entry value.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"options")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#cookieoptions"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieOptions"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"The cookie options. The ",(0,r.kt)("inlineCode",{parentName:"td"},"maxAge")," is the maximum age in seconds of the cookie before it will be deleted, the ",(0,r.kt)("inlineCode",{parentName:"td"},"expires")," is an alternative to that, specifying the moment at which the cookie will be discarded. The ",(0,r.kt)("inlineCode",{parentName:"td"},"domain")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"path")," specify the cookie's domain and path. The ",(0,r.kt)("inlineCode",{parentName:"td"},"httpOnly")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"secure")," flags set the flags of the same name of the cookie.")))),(0,r.kt)("h4",{id:"returns-18"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.CookieStorage"},(0,r.kt)("inlineCode",{parentName:"a"},"CookieStorage"))),(0,r.kt)("p",null,"This storage."),(0,r.kt)("h4",{id:"overrides-7"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#set"},"set")),(0,r.kt)("h4",{id:"defined-in-26"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L234"},"packages/core/src/storage/CookieStorage.ts:234")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"size"},"size"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"size"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"number")),(0,r.kt)("p",null,"Returns the number of entries in this storage."),(0,r.kt)("h4",{id:"returns-19"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"number")),(0,r.kt)("p",null,"The number of entries in this storage."),(0,r.kt)("h4",{id:"overrides-8"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage"},"Storage"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Storage#size"},"size")),(0,r.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L302"},"packages/core/src/storage/CookieStorage.ts:302")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"validatecookiesecurity"},"validateCookieSecurity"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("strong",{parentName:"p"},"validateCookieSecurity"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"cookie"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"url"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("p",null,"Filters invalid cookies based on the provided url.\nWe try to check validity of the domain based on secure, path and\ndomain definitions."),(0,r.kt)("h4",{id:"parameters-16"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"cookie")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#cookie"},(0,r.kt)("inlineCode",{parentName:"a"},"Cookie")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"url")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))),(0,r.kt)("h4",{id:"returns-20"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"boolean")),(0,r.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/storage/CookieStorage.ts#L104"},"packages/core/src/storage/CookieStorage.ts:104")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/321fbd12.6bda35be.js b/assets/js/321fbd12.d336d4cd.js similarity index 95% rename from assets/js/321fbd12.6bda35be.js rename to assets/js/321fbd12.d336d4cd.js index 982a5cec62..864046030e 100644 --- a/assets/js/321fbd12.6bda35be.js +++ b/assets/js/321fbd12.d336d4cd.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[5419],{3905:(e,t,a)=>{a.d(t,{Zo:()=>o,kt:()=>g});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),d=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},o=function(e){var t=d(e.components);return n.createElement(s.Provider,{value:t},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},k=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,o=p(e,["components","mdxType","originalType","parentName"]),m=d(a),k=r,g=m["".concat(s,".").concat(k)]||m[k]||c[k]||i;return a?n.createElement(g,l(l({ref:t},o),{},{components:a})):n.createElement(g,l({ref:t},o))}));function g(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=k;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[m]="string"==typeof e?e:r,l[1]=p;for(var d=2;d{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>c,frontMatter:()=>i,metadata:()=>p,toc:()=>d});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_core.PageStateManagerImpl",title:"Class: PageStateManagerImpl",sidebar_label:"@ima/core.PageStateManagerImpl",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_core.PageStateManagerImpl",id:"api/classes/ima_core.PageStateManagerImpl",title:"Class: PageStateManagerImpl",description:"@ima/core.PageStateManagerImpl",source:"@site/../docs/api/classes/ima_core.PageStateManagerImpl.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.PageStateManagerImpl",permalink:"/api/classes/ima_core.PageStateManagerImpl",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.PageStateManagerImpl",title:"Class: PageStateManagerImpl",sidebar_label:"@ima/core.PageStateManagerImpl",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.PageStateManagerDecorator",permalink:"/api/classes/ima_core.PageStateManagerDecorator"},next:{title:"@ima/core.PluginLoader",permalink:"/api/classes/ima_core.PluginLoader"}},s={},d=[{value:"Type parameters",id:"type-parameters",level:2},{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Parameters",id:"parameters",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"_cursor",id:"_cursor",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"_dispatcher",id:"_dispatcher",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"_ongoingTransaction",id:"_ongoingtransaction",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"_statePatchQueue",id:"_statepatchqueue",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"_states",id:"_states",level:3},{value:"Defined in",id:"defined-in-5",level:4},{value:"onChange",id:"onchange",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Parameters",id:"parameters-1",level:5},{value:"Returns",id:"returns",level:5},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"Accessors",id:"accessors",level:2},{value:"$dependencies",id:"dependencies",level:3},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"Methods",id:"methods",level:2},{value:"_callOnChangeCallback",id:"_callonchangecallback",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"_eraseExcessHistory",id:"_eraseexcesshistory",level:3},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"_pushToHistory",id:"_pushtohistory",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"beginTransaction",id:"begintransaction",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"cancelTransaction",id:"canceltransaction",level:3},{value:"Returns",id:"returns-6",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"clear",id:"clear",level:3},{value:"Returns",id:"returns-7",level:4},{value:"Overrides",id:"overrides-3",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"commitTransaction",id:"committransaction",level:3},{value:"Returns",id:"returns-8",level:4},{value:"Overrides",id:"overrides-4",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"getAllStates",id:"getallstates",level:3},{value:"Returns",id:"returns-9",level:4},{value:"Overrides",id:"overrides-5",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"getState",id:"getstate",level:3},{value:"Returns",id:"returns-10",level:4},{value:"Overrides",id:"overrides-6",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"getTransactionStatePatches",id:"gettransactionstatepatches",level:3},{value:"Returns",id:"returns-11",level:4},{value:"Overrides",id:"overrides-7",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"setState",id:"setstate",level:3},{value:"Type parameters",id:"type-parameters-2",level:4},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-12",level:4},{value:"Overrides",id:"overrides-8",level:4},{value:"Defined in",id:"defined-in-18",level:4}],o={toc:d},m="wrapper";function c(e){let{components:t,...a}=e;return(0,r.kt)(m,(0,n.Z)({},o,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".PageStateManagerImpl"),(0,r.kt)("p",null,"The implementation of the ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager")," interface."),(0,r.kt)("h2",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#pagestate"},(0,r.kt)("inlineCode",{parentName:"a"},"PageState"))," = {}")))),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},(0,r.kt)("inlineCode",{parentName:"a"},"PageStateManager")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">"),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"PageStateManagerImpl"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new PageStateManagerImpl"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"dispatcher"),")"),(0,r.kt)("p",null,"Initializes the page state manager."),(0,r.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#pagestate"},(0,r.kt)("inlineCode",{parentName:"a"},"PageState"))," = {}")))),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dispatcher")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"Dispatcher fires events to app.")))),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#constructor"},"constructor")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L40"},"packages/core/src/page/state/PageStateManagerImpl.ts:40")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"_cursor"},"_","cursor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","cursor"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"-1")),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L25"},"packages/core/src/page/state/PageStateManagerImpl.ts:25")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_dispatcher"},"_","dispatcher"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","dispatcher"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L26"},"packages/core/src/page/state/PageStateManagerImpl.ts:26")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_ongoingtransaction"},"_","ongoingTransaction"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","ongoingTransaction"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"false")),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L27"},"packages/core/src/page/state/PageStateManagerImpl.ts:27")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_statepatchqueue"},"_","statePatchQueue"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","statePatchQueue"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",")[] = ",(0,r.kt)("inlineCode",{parentName:"p"},"[]")),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L28"},"packages/core/src/page/state/PageStateManagerImpl.ts:28")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_states"},"_","states"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","states"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),"[] = ",(0,r.kt)("inlineCode",{parentName:"p"},"[]")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L29"},"packages/core/src/page/state/PageStateManagerImpl.ts:29")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"onchange"},"onChange"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"onChange"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"newState"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"newState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"newState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S"))))),(0,r.kt)("h5",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#onchange"},"onChange")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManager.ts#L7"},"packages/core/src/page/state/PageStateManager.ts:7")),(0,r.kt)("h2",{id:"accessors"},"Accessors"),(0,r.kt)("h3",{id:"dependencies"},"$dependencies"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("inlineCode",{parentName:"p"},"get")," ",(0,r.kt)("strong",{parentName:"p"},"$dependencies"),"(): typeof ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher")),"[]"),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,"typeof ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher")),"[]"),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L31"},"packages/core/src/page/state/PageStateManagerImpl.ts:31")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"_callonchangecallback"},"_","callOnChangeCallback"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_callOnChangeCallback"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"newState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Call registered callback function on (@link onChange) with newState."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"newState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S"))))),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L175"},"packages/core/src/page/state/PageStateManagerImpl.ts:175")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_eraseexcesshistory"},"_","eraseExcessHistory"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_eraseExcessHistory"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Erase the oldest state from storage only if it exceed max\ndefined size of history."),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L157"},"packages/core/src/page/state/PageStateManagerImpl.ts:157")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_pushtohistory"},"_","pushToHistory"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_pushToHistory"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"newState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Push new state to history storage."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"newState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S"))))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L167"},"packages/core/src/page/state/PageStateManagerImpl.ts:167")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"begintransaction"},"beginTransaction"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"beginTransaction"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Starts queueing state patches off the main state. While the transaction\nis active every ",(0,r.kt)("inlineCode",{parentName:"p"},"setState")," call has no effect on the current state."),(0,r.kt)("p",null,"Note that call to ",(0,r.kt)("inlineCode",{parentName:"p"},"getState")," after the transaction has begun will\nreturn state as it was before the transaction."),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-1"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#begintransaction"},"beginTransaction")),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L106"},"packages/core/src/page/state/PageStateManagerImpl.ts:106")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"canceltransaction"},"cancelTransaction"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"cancelTransaction"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Cancels ongoing transaction. Uncommitted state changes are lost."),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-2"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#canceltransaction"},"cancelTransaction")),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L148"},"packages/core/src/page/state/PageStateManagerImpl.ts:148")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"clear"},"clear"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"clear"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Clears the state history."),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-3"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#clear"},"clear")),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L49"},"packages/core/src/page/state/PageStateManagerImpl.ts:49")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"committransaction"},"commitTransaction"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"commitTransaction"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Applies queued state patches to the main state. All patches are squashed\nand applied with one ",(0,r.kt)("inlineCode",{parentName:"p"},"setState")," call."),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-4"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#committransaction"},"commitTransaction")),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L123"},"packages/core/src/page/state/PageStateManagerImpl.ts:123")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getallstates"},"getAllStates"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getAllStates"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),"[]"),(0,r.kt)("p",null,"Returns the recorded history of page states. The states will be\nchronologically sorted from the oldest to the newest."),(0,r.kt)("p",null,"Note that the implementation may limit the size of the recorded history,\ntherefore the complete history may not be available."),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"S"),"[]"),(0,r.kt)("p",null,"The recorded history of page states."),(0,r.kt)("h4",{id:"overrides-5"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#getallstates"},"getAllStates")),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L92"},"packages/core/src/page/state/PageStateManagerImpl.ts:92")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getstate"},"getState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"S")),(0,r.kt)("p",null,"Returns the current page state."),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"S")),(0,r.kt)("p",null,"The current page state."),(0,r.kt)("h4",{id:"overrides-6"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#getstate"},"getState")),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L85"},"packages/core/src/page/state/PageStateManagerImpl.ts:85")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"gettransactionstatepatches"},"getTransactionStatePatches"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getTransactionStatePatches"),"(): (",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",")[]"),(0,r.kt)("p",null,"Returns queueing state patches off the main state from the begin of transaction."),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,"(",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",")[]"),(0,r.kt)("p",null,"State patches from the begin of transaction."),(0,r.kt)("h4",{id:"overrides-7"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#gettransactionstatepatches"},"getTransactionStatePatches")),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L99"},"packages/core/src/page/state/PageStateManagerImpl.ts:99")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setstate"},"setState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setState"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"K"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"patchState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Sets a new page state by applying the provided patch to the current\nstate."),(0,r.kt)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"K")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"symbol"))))),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"patchState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"K"),">")))),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-8"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#setstate"},"setState")),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/core/src/page/state/PageStateManagerImpl.ts#L59"},"packages/core/src/page/state/PageStateManagerImpl.ts:59")))}c.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[5419],{3905:(e,t,a)=>{a.d(t,{Zo:()=>o,kt:()=>g});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),d=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},o=function(e){var t=d(e.components);return n.createElement(s.Provider,{value:t},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},k=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,o=p(e,["components","mdxType","originalType","parentName"]),m=d(a),k=r,g=m["".concat(s,".").concat(k)]||m[k]||c[k]||i;return a?n.createElement(g,l(l({ref:t},o),{},{components:a})):n.createElement(g,l({ref:t},o))}));function g(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=k;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[m]="string"==typeof e?e:r,l[1]=p;for(var d=2;d{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>c,frontMatter:()=>i,metadata:()=>p,toc:()=>d});var n=a(5773),r=(a(7294),a(3905));const i={id:"ima_core.PageStateManagerImpl",title:"Class: PageStateManagerImpl",sidebar_label:"@ima/core.PageStateManagerImpl",custom_edit_url:null},l=void 0,p={unversionedId:"api/classes/ima_core.PageStateManagerImpl",id:"api/classes/ima_core.PageStateManagerImpl",title:"Class: PageStateManagerImpl",description:"@ima/core.PageStateManagerImpl",source:"@site/../docs/api/classes/ima_core.PageStateManagerImpl.md",sourceDirName:"api/classes",slug:"/api/classes/ima_core.PageStateManagerImpl",permalink:"/api/classes/ima_core.PageStateManagerImpl",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_core.PageStateManagerImpl",title:"Class: PageStateManagerImpl",sidebar_label:"@ima/core.PageStateManagerImpl",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/core.PageStateManagerDecorator",permalink:"/api/classes/ima_core.PageStateManagerDecorator"},next:{title:"@ima/core.PluginLoader",permalink:"/api/classes/ima_core.PluginLoader"}},s={},d=[{value:"Type parameters",id:"type-parameters",level:2},{value:"Hierarchy",id:"hierarchy",level:2},{value:"Constructors",id:"constructors",level:2},{value:"constructor",id:"constructor",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Parameters",id:"parameters",level:4},{value:"Overrides",id:"overrides",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Properties",id:"properties",level:2},{value:"_cursor",id:"_cursor",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"_dispatcher",id:"_dispatcher",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"_ongoingTransaction",id:"_ongoingtransaction",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"_statePatchQueue",id:"_statepatchqueue",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"_states",id:"_states",level:3},{value:"Defined in",id:"defined-in-5",level:4},{value:"onChange",id:"onchange",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Parameters",id:"parameters-1",level:5},{value:"Returns",id:"returns",level:5},{value:"Inherited from",id:"inherited-from",level:4},{value:"Defined in",id:"defined-in-6",level:4},{value:"Accessors",id:"accessors",level:2},{value:"$dependencies",id:"dependencies",level:3},{value:"Returns",id:"returns-1",level:4},{value:"Defined in",id:"defined-in-7",level:4},{value:"Methods",id:"methods",level:2},{value:"_callOnChangeCallback",id:"_callonchangecallback",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"Defined in",id:"defined-in-8",level:4},{value:"_eraseExcessHistory",id:"_eraseexcesshistory",level:3},{value:"Returns",id:"returns-3",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"_pushToHistory",id:"_pushtohistory",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-4",level:4},{value:"Defined in",id:"defined-in-10",level:4},{value:"beginTransaction",id:"begintransaction",level:3},{value:"Returns",id:"returns-5",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"cancelTransaction",id:"canceltransaction",level:3},{value:"Returns",id:"returns-6",level:4},{value:"Overrides",id:"overrides-2",level:4},{value:"Defined in",id:"defined-in-12",level:4},{value:"clear",id:"clear",level:3},{value:"Returns",id:"returns-7",level:4},{value:"Overrides",id:"overrides-3",level:4},{value:"Defined in",id:"defined-in-13",level:4},{value:"commitTransaction",id:"committransaction",level:3},{value:"Returns",id:"returns-8",level:4},{value:"Overrides",id:"overrides-4",level:4},{value:"Defined in",id:"defined-in-14",level:4},{value:"getAllStates",id:"getallstates",level:3},{value:"Returns",id:"returns-9",level:4},{value:"Overrides",id:"overrides-5",level:4},{value:"Defined in",id:"defined-in-15",level:4},{value:"getState",id:"getstate",level:3},{value:"Returns",id:"returns-10",level:4},{value:"Overrides",id:"overrides-6",level:4},{value:"Defined in",id:"defined-in-16",level:4},{value:"getTransactionStatePatches",id:"gettransactionstatepatches",level:3},{value:"Returns",id:"returns-11",level:4},{value:"Overrides",id:"overrides-7",level:4},{value:"Defined in",id:"defined-in-17",level:4},{value:"setState",id:"setstate",level:3},{value:"Type parameters",id:"type-parameters-2",level:4},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-12",level:4},{value:"Overrides",id:"overrides-8",level:4},{value:"Defined in",id:"defined-in-18",level:4}],o={toc:d},m="wrapper";function c(e){let{components:t,...a}=e;return(0,r.kt)(m,(0,n.Z)({},o,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/modules/ima_core"},"@ima/core"),".PageStateManagerImpl"),(0,r.kt)("p",null,"The implementation of the ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager")," interface."),(0,r.kt)("h2",{id:"type-parameters"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#pagestate"},(0,r.kt)("inlineCode",{parentName:"a"},"PageState"))," = {}")))),(0,r.kt)("h2",{id:"hierarchy"},"Hierarchy"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},(0,r.kt)("inlineCode",{parentName:"a"},"PageStateManager")),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">"),(0,r.kt)("p",{parentName:"li"},"\u21b3 ",(0,r.kt)("strong",{parentName:"p"},(0,r.kt)("inlineCode",{parentName:"strong"},"PageStateManagerImpl"))))),(0,r.kt)("h2",{id:"constructors"},"Constructors"),(0,r.kt)("h3",{id:"constructor"},"constructor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("strong",{parentName:"p"},"new PageStateManagerImpl"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"dispatcher"),")"),(0,r.kt)("p",null,"Initializes the page state manager."),(0,r.kt)("h4",{id:"type-parameters-1"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("a",{parentName:"td",href:"/api/modules/ima_core#pagestate"},(0,r.kt)("inlineCode",{parentName:"a"},"PageState"))," = {}")))),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"dispatcher")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("a",{parentName:"td",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("td",{parentName:"tr",align:"left"},"Dispatcher fires events to app.")))),(0,r.kt)("h4",{id:"overrides"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#constructor"},"constructor")),(0,r.kt)("h4",{id:"defined-in"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L40"},"packages/core/src/page/state/PageStateManagerImpl.ts:40")),(0,r.kt)("h2",{id:"properties"},"Properties"),(0,r.kt)("h3",{id:"_cursor"},"_","cursor"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","cursor"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"-1")),(0,r.kt)("h4",{id:"defined-in-1"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L25"},"packages/core/src/page/state/PageStateManagerImpl.ts:25")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_dispatcher"},"_","dispatcher"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","dispatcher"),": ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher"))),(0,r.kt)("h4",{id:"defined-in-2"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L26"},"packages/core/src/page/state/PageStateManagerImpl.ts:26")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_ongoingtransaction"},"_","ongoingTransaction"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","ongoingTransaction"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," = ",(0,r.kt)("inlineCode",{parentName:"p"},"false")),(0,r.kt)("h4",{id:"defined-in-3"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L27"},"packages/core/src/page/state/PageStateManagerImpl.ts:27")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_statepatchqueue"},"_","statePatchQueue"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","statePatchQueue"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",")[] = ",(0,r.kt)("inlineCode",{parentName:"p"},"[]")),(0,r.kt)("h4",{id:"defined-in-4"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L28"},"packages/core/src/page/state/PageStateManagerImpl.ts:28")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_states"},"_","states"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Private")," ",(0,r.kt)("strong",{parentName:"p"},"_","states"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),"[] = ",(0,r.kt)("inlineCode",{parentName:"p"},"[]")),(0,r.kt)("h4",{id:"defined-in-5"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L29"},"packages/core/src/page/state/PageStateManagerImpl.ts:29")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"onchange"},"onChange"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Optional")," ",(0,r.kt)("strong",{parentName:"p"},"onChange"),": (",(0,r.kt)("inlineCode",{parentName:"p"},"newState"),": ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),") => ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,r.kt)("p",null,"\u25b8 (",(0,r.kt)("inlineCode",{parentName:"p"},"newState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h5",{id:"parameters-1"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"newState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S"))))),(0,r.kt)("h5",{id:"returns"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"inherited-from"},"Inherited from"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#onchange"},"onChange")),(0,r.kt)("h4",{id:"defined-in-6"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManager.ts#L7"},"packages/core/src/page/state/PageStateManager.ts:7")),(0,r.kt)("h2",{id:"accessors"},"Accessors"),(0,r.kt)("h3",{id:"dependencies"},"$dependencies"),(0,r.kt)("p",null,"\u2022 ",(0,r.kt)("inlineCode",{parentName:"p"},"Static")," ",(0,r.kt)("inlineCode",{parentName:"p"},"get")," ",(0,r.kt)("strong",{parentName:"p"},"$dependencies"),"(): typeof ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher")),"[]"),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,"typeof ",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.Dispatcher"},(0,r.kt)("inlineCode",{parentName:"a"},"Dispatcher")),"[]"),(0,r.kt)("h4",{id:"defined-in-7"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L31"},"packages/core/src/page/state/PageStateManagerImpl.ts:31")),(0,r.kt)("h2",{id:"methods"},"Methods"),(0,r.kt)("h3",{id:"_callonchangecallback"},"_","callOnChangeCallback"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_callOnChangeCallback"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"newState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Call registered callback function on (@link onChange) with newState."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"newState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S"))))),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-8"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L175"},"packages/core/src/page/state/PageStateManagerImpl.ts:175")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_eraseexcesshistory"},"_","eraseExcessHistory"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_eraseExcessHistory"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Erase the oldest state from storage only if it exceed max\ndefined size of history."),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-9"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L157"},"packages/core/src/page/state/PageStateManagerImpl.ts:157")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"_pushtohistory"},"_","pushToHistory"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"_pushToHistory"),"(",(0,r.kt)("inlineCode",{parentName:"p"},"newState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Push new state to history storage."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"newState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"S"))))),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"defined-in-10"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L167"},"packages/core/src/page/state/PageStateManagerImpl.ts:167")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"begintransaction"},"beginTransaction"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"beginTransaction"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Starts queueing state patches off the main state. While the transaction\nis active every ",(0,r.kt)("inlineCode",{parentName:"p"},"setState")," call has no effect on the current state."),(0,r.kt)("p",null,"Note that call to ",(0,r.kt)("inlineCode",{parentName:"p"},"getState")," after the transaction has begun will\nreturn state as it was before the transaction."),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-1"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#begintransaction"},"beginTransaction")),(0,r.kt)("h4",{id:"defined-in-11"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L106"},"packages/core/src/page/state/PageStateManagerImpl.ts:106")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"canceltransaction"},"cancelTransaction"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"cancelTransaction"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Cancels ongoing transaction. Uncommitted state changes are lost."),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-2"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#canceltransaction"},"cancelTransaction")),(0,r.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L148"},"packages/core/src/page/state/PageStateManagerImpl.ts:148")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"clear"},"clear"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"clear"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Clears the state history."),(0,r.kt)("h4",{id:"returns-7"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-3"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#clear"},"clear")),(0,r.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L49"},"packages/core/src/page/state/PageStateManagerImpl.ts:49")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"committransaction"},"commitTransaction"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"commitTransaction"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Applies queued state patches to the main state. All patches are squashed\nand applied with one ",(0,r.kt)("inlineCode",{parentName:"p"},"setState")," call."),(0,r.kt)("h4",{id:"returns-8"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-4"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#committransaction"},"commitTransaction")),(0,r.kt)("h4",{id:"defined-in-14"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L123"},"packages/core/src/page/state/PageStateManagerImpl.ts:123")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getallstates"},"getAllStates"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getAllStates"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"S"),"[]"),(0,r.kt)("p",null,"Returns the recorded history of page states. The states will be\nchronologically sorted from the oldest to the newest."),(0,r.kt)("p",null,"Note that the implementation may limit the size of the recorded history,\ntherefore the complete history may not be available."),(0,r.kt)("h4",{id:"returns-9"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"S"),"[]"),(0,r.kt)("p",null,"The recorded history of page states."),(0,r.kt)("h4",{id:"overrides-5"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#getallstates"},"getAllStates")),(0,r.kt)("h4",{id:"defined-in-15"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L92"},"packages/core/src/page/state/PageStateManagerImpl.ts:92")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"getstate"},"getState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getState"),"(): ",(0,r.kt)("inlineCode",{parentName:"p"},"S")),(0,r.kt)("p",null,"Returns the current page state."),(0,r.kt)("h4",{id:"returns-10"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"S")),(0,r.kt)("p",null,"The current page state."),(0,r.kt)("h4",{id:"overrides-6"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#getstate"},"getState")),(0,r.kt)("h4",{id:"defined-in-16"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L85"},"packages/core/src/page/state/PageStateManagerImpl.ts:85")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"gettransactionstatepatches"},"getTransactionStatePatches"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"getTransactionStatePatches"),"(): (",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",")[]"),(0,r.kt)("p",null,"Returns queueing state patches off the main state from the begin of transaction."),(0,r.kt)("h4",{id:"returns-11"},"Returns"),(0,r.kt)("p",null,"(",(0,r.kt)("inlineCode",{parentName:"p"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"any"),">",")[]"),(0,r.kt)("p",null,"State patches from the begin of transaction."),(0,r.kt)("h4",{id:"overrides-7"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#gettransactionstatepatches"},"getTransactionStatePatches")),(0,r.kt)("h4",{id:"defined-in-17"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L99"},"packages/core/src/page/state/PageStateManagerImpl.ts:99")),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"setstate"},"setState"),(0,r.kt)("p",null,"\u25b8 ",(0,r.kt)("strong",{parentName:"p"},"setState"),"<",(0,r.kt)("inlineCode",{parentName:"p"},"K"),">","(",(0,r.kt)("inlineCode",{parentName:"p"},"patchState"),"): ",(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("p",null,"Sets a new page state by applying the provided patch to the current\nstate."),(0,r.kt)("h4",{id:"type-parameters-2"},"Type parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"K")),(0,r.kt)("td",{parentName:"tr",align:"left"},"extends ",(0,r.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"symbol"))))),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"patchState")),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"S")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"td"},"Pick"),"<",(0,r.kt)("inlineCode",{parentName:"td"},"S"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"K"),">")))),(0,r.kt)("h4",{id:"returns-12"},"Returns"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"number")," ","|"," ",(0,r.kt)("inlineCode",{parentName:"p"},"void")),(0,r.kt)("h4",{id:"overrides-8"},"Overrides"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager"},"PageStateManager"),".",(0,r.kt)("a",{parentName:"p",href:"/api/classes/ima_core.PageStateManager#setstate"},"setState")),(0,r.kt)("h4",{id:"defined-in-18"},"Defined in"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/core/src/page/state/PageStateManagerImpl.ts#L59"},"packages/core/src/page/state/PageStateManagerImpl.ts:59")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/327389ac.7cc3ec04.js b/assets/js/327389ac.7cc3ec04.js deleted file mode 100644 index 93766c113e..0000000000 --- a/assets/js/327389ac.7cc3ec04.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[2950],{6117:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/diagram-page-state-5512b3a2b5f48555cf76c83172bf4788.png"},3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>h});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function s(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=n.createContext({}),c=function(e){var t=n.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},p=function(e){var t=c(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=c(a),m=r,h=d["".concat(l,".").concat(m)]||d[m]||u[m]||o;return a?n.createElement(h,s(s({ref:t},p),{},{components:a})):n.createElement(h,s({ref:t},p))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,s=new Array(o);s[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[d]="string"==typeof e?e:r,s[1]=i;for(var c=2;c{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var n=a(5773),r=(a(7294),a(3905));const o={title:"Page State",description:"Basic features > Page State and it's usage"},s=void 0,i={unversionedId:"basic-features/page-state",id:"basic-features/page-state",title:"Page State",description:"Basic features > Page State and it's usage",source:"@site/../docs/basic-features/page-state.md",sourceDirName:"basic-features",slug:"/basic-features/page-state",permalink:"/basic-features/page-state",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/basic-features/page-state.md",tags:[],version:"current",lastUpdatedBy:"Filip Satek",lastUpdatedAt:1734590310,formattedLastUpdatedAt:"Dec 19, 2024",frontMatter:{title:"Page State",description:"Basic features > Page State and it's usage"},sidebar:"docs",previous:{title:"Events",permalink:"/basic-features/events"},next:{title:"SEO & Meta Manager",permalink:"/basic-features/seo-and-meta-manager"}},l={},c=[{value:"Get &\xa0Set",id:"get-set",level:2},{value:"Initial page state",id:"initial-page-state",level:2},{value:"Partial state",id:"partial-state",level:2},{value:"State transactions",id:"state-transactions",level:2}],p={toc:c},d="wrapper";function u(e){let{components:t,...o}=e;return(0,r.kt)(d,(0,n.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Core of each application is the data the app is working with. The data needs to be managed in some manner and user needs to be able to manipulate with the data during application run. IMA.js adopted a React style of state management."),(0,r.kt)("p",null,(0,r.kt)("img",{src:a(6117).Z,width:"881",height:"421"})),(0,r.kt)("p",null,"A ",(0,r.kt)("strong",{parentName:"p"},"PageStateManager")," class is used for managing ",(0,r.kt)("strong",{parentName:"p"},"page state")," and is in tight cooperation with ",(0,r.kt)("strong",{parentName:"p"},"PageManager"),".\nPageManager need state manager to collect initial state from Controller and registered extension, and to be informed about every state change that happens inside Controller or Extension."),(0,r.kt)("h2",{id:"get-set"},"Get &\xa0Set"),(0,r.kt)("p",null,"As we've mentioned before, IMA.js state management is inspired by React. In every Controller and Extension you can call ",(0,r.kt)("inlineCode",{parentName:"p"},"this.setState(patchObject)")," method that will update page state and trigger new rendering of a View. Counterpart to ",(0,r.kt)("inlineCode",{parentName:"p"},"setState")," is ",(0,r.kt)("inlineCode",{parentName:"p"},"getState"),". This method returns current state that is shared among controller and all its registered extensions."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/page/home/HomeController.js\n\nonVisibilityToggle() {\n const {\xa0visibility } = this.getState();\n\n this.setState({ visibility: !visibility });\n}\n")),(0,r.kt)("h2",{id:"initial-page-state"},"Initial page state"),(0,r.kt)("p",null,"First additions to page state are set when ",(0,r.kt)("inlineCode",{parentName:"p"},"load")," method of a Controller and Extensions returns an object of resources. These resources may be plain data or (un)resolved promises. Promises are handled differently on server vs. client. This behavior is described in Controller's ",(0,r.kt)("a",{parentName:"p",href:"./controller-lifecycle#load-serverclient"},(0,r.kt)("inlineCode",{parentName:"a"},"load")," method documentation"),"."),(0,r.kt)("h2",{id:"partial-state"},"Partial state"),(0,r.kt)("p",null,"Since Extensions also have a word in loading resources it may be necessary to share resources between Controller and Extensions. Here comes partial state into play. It allows you to call ",(0,r.kt)("inlineCode",{parentName:"p"},"getState")," method in ",(0,r.kt)("inlineCode",{parentName:"p"},"load")," method of an Extension. Received state consists of states collected from loaded Controller and Extensions loaded prior to the current Extension. Extensions are loaded in the same order as they were registered in a Controller."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Note"),": Promises in received state may not be resolved. Therefore you need to chain promises or use ",(0,r.kt)("inlineCode",{parentName:"p"},"async/await"),".")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Note"),": If you'll use ",(0,r.kt)("inlineCode",{parentName:"p"},"async/await")," execution will not be parallel relative to other promises.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/page/home/HomeController.js\nexport default class HomeController extends AbstractController {\n\n load() {\n const userPromise = this._userService.load(this.params.userId);\n\n return {\n user: userPromise\n };\n }\n}\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/component/poll/PollExtension.js\nexport default class PollExtension extends AbstractExtension {\n getAllowedStateKeys() {\n return ['pollVotes'];\n }\n\n load() {\n const { user: userPromise } = this.getState();\n const pollVotesPromise = userPromise.then(\n user => this._pollService.getVotes(user.id)\n );\n\n return {\n pollVotes: pollVotesPromise\n };\n }\n}\n")),(0,r.kt)("h2",{id:"state-transactions"},"State transactions"),(0,r.kt)("p",null,"State transactions, similarly to SQL transactions, provide a way to queue state patches and then commit them as a one to the original state."),(0,r.kt)("p",null,"They're here for use cases where you'd in you workflow call ",(0,r.kt)("inlineCode",{parentName:"p"},"setState")," method multiple times or you'd have to collect state patches in a separate variable (this is hard to do across multiple methods)."),(0,r.kt)("p",null,"Transaction is initiated with ",(0,r.kt)("inlineCode",{parentName:"p"},"beginStateTransaction()")," in Controller/Extension. After that\nevery setState call is queued and doesn't change the state or re-render anything. If there\nis another transaction initiated before you commit you'll lost your patches."),(0,r.kt)("p",null,"If you want to see what changes are in queue from the begin of transaction call ",(0,r.kt)("inlineCode",{parentName:"p"},"getTransactionStatePatches()")," method."),(0,r.kt)("p",null,"To finish the transaction you have to call ",(0,r.kt)("inlineCode",{parentName:"p"},"commitStateTransaction()")," method. It will squash\nall the patches made during the transaction into a one and apply it to the original state.\nTherefore your application will re-render only once and you'll also receive ",(0,r.kt)("a",{parentName:"p",href:"./events#stateeventsbefore_change_state"},"state events")," only once."),(0,r.kt)("p",null,"Another way to finish the transaction is to cancel it via ",(0,r.kt)("inlineCode",{parentName:"p"},"cancelStateTransaction()")," method."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Note"),": Call to ",(0,r.kt)("inlineCode",{parentName:"p"},"getState")," method after the transaction has begun will return state as it was before the transaction eg. the returned state doesn't include changes from the transaction period until the transaction is committed.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"async onFormSubmit({ content, deleteRevisions = false }) {\n const { article } = this.getState();\n\n this.beginStateTransaction();\n\n const result = await this._http.put(/* ... */);\n\n if (deleteRevisions) {\n await this.deleteArticleRevisions();\n }\n\n this.setState({ article: Object.assign({}, article, {\xa0content }) });\n this.commitStateTransaction();\n}\n\nasync deleteArticleRevisions() {\n const { article, revisions } = this.getState();\n\n await this._http.delete(/* ... */);\n\n this.setState({ revisions: [] });\n}\n")),(0,r.kt)("p",null,"In the example above, after the form is submitted with ",(0,r.kt)("inlineCode",{parentName:"p"},"deleteRevisions = true"),":"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Two ",(0,r.kt)("inlineCode",{parentName:"li"},"setState")," calls are made"),(0,r.kt)("li",{parentName:"ul"},"Only one render is triggered after the ",(0,r.kt)("inlineCode",{parentName:"li"},"commitStateTransaction")," call")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/327389ac.e67cd381.js b/assets/js/327389ac.e67cd381.js new file mode 100644 index 0000000000..eb8d4052e3 --- /dev/null +++ b/assets/js/327389ac.e67cd381.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[2950],{6117:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/diagram-page-state-5512b3a2b5f48555cf76c83172bf4788.png"},3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>h});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function s(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=n.createContext({}),c=function(e){var t=n.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},p=function(e){var t=c(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=c(a),m=r,h=d["".concat(l,".").concat(m)]||d[m]||u[m]||o;return a?n.createElement(h,s(s({ref:t},p),{},{components:a})):n.createElement(h,s({ref:t},p))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,s=new Array(o);s[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[d]="string"==typeof e?e:r,s[1]=i;for(var c=2;c{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var n=a(5773),r=(a(7294),a(3905));const o={title:"Page State",description:"Basic features > Page State and it's usage"},s=void 0,i={unversionedId:"basic-features/page-state",id:"basic-features/page-state",title:"Page State",description:"Basic features > Page State and it's usage",source:"@site/../docs/basic-features/page-state.md",sourceDirName:"basic-features",slug:"/basic-features/page-state",permalink:"/basic-features/page-state",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/basic-features/page-state.md",tags:[],version:"current",lastUpdatedBy:"PS",lastUpdatedAt:1736522400,formattedLastUpdatedAt:"Jan 10, 2025",frontMatter:{title:"Page State",description:"Basic features > Page State and it's usage"},sidebar:"docs",previous:{title:"Events",permalink:"/basic-features/events"},next:{title:"SEO & Meta Manager",permalink:"/basic-features/seo-and-meta-manager"}},l={},c=[{value:"Get &\xa0Set",id:"get-set",level:2},{value:"Initial page state",id:"initial-page-state",level:2},{value:"Partial state",id:"partial-state",level:2},{value:"State transactions",id:"state-transactions",level:2}],p={toc:c},d="wrapper";function u(e){let{components:t,...o}=e;return(0,r.kt)(d,(0,n.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Core of each application is the data the app is working with. The data needs to be managed in some manner and user needs to be able to manipulate with the data during application run. IMA.js adopted a React style of state management."),(0,r.kt)("p",null,(0,r.kt)("img",{src:a(6117).Z,width:"881",height:"421"})),(0,r.kt)("p",null,"A ",(0,r.kt)("strong",{parentName:"p"},"PageStateManager")," class is used for managing ",(0,r.kt)("strong",{parentName:"p"},"page state")," and is in tight cooperation with ",(0,r.kt)("strong",{parentName:"p"},"PageManager"),".\nPageManager need state manager to collect initial state from Controller and registered extension, and to be informed about every state change that happens inside Controller or Extension."),(0,r.kt)("h2",{id:"get-set"},"Get &\xa0Set"),(0,r.kt)("p",null,"As we've mentioned before, IMA.js state management is inspired by React. In every Controller and Extension you can call ",(0,r.kt)("inlineCode",{parentName:"p"},"this.setState(patchObject)")," method that will update page state and trigger new rendering of a View. Counterpart to ",(0,r.kt)("inlineCode",{parentName:"p"},"setState")," is ",(0,r.kt)("inlineCode",{parentName:"p"},"getState"),". This method returns current state that is shared among controller and all its registered extensions."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/page/home/HomeController.js\n\nonVisibilityToggle() {\n const {\xa0visibility } = this.getState();\n\n this.setState({ visibility: !visibility });\n}\n")),(0,r.kt)("h2",{id:"initial-page-state"},"Initial page state"),(0,r.kt)("p",null,"First additions to page state are set when ",(0,r.kt)("inlineCode",{parentName:"p"},"load")," method of a Controller and Extensions returns an object of resources. These resources may be plain data or (un)resolved promises. Promises are handled differently on server vs. client. This behavior is described in Controller's ",(0,r.kt)("a",{parentName:"p",href:"./controller-lifecycle#load-serverclient"},(0,r.kt)("inlineCode",{parentName:"a"},"load")," method documentation"),"."),(0,r.kt)("h2",{id:"partial-state"},"Partial state"),(0,r.kt)("p",null,"Since Extensions also have a word in loading resources it may be necessary to share resources between Controller and Extensions. Here comes partial state into play. It allows you to call ",(0,r.kt)("inlineCode",{parentName:"p"},"getState")," method in ",(0,r.kt)("inlineCode",{parentName:"p"},"load")," method of an Extension. Received state consists of states collected from loaded Controller and Extensions loaded prior to the current Extension. Extensions are loaded in the same order as they were registered in a Controller."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Note"),": Promises in received state may not be resolved. Therefore you need to chain promises or use ",(0,r.kt)("inlineCode",{parentName:"p"},"async/await"),".")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Note"),": If you'll use ",(0,r.kt)("inlineCode",{parentName:"p"},"async/await")," execution will not be parallel relative to other promises.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/page/home/HomeController.js\nexport default class HomeController extends AbstractController {\n\n load() {\n const userPromise = this._userService.load(this.params.userId);\n\n return {\n user: userPromise\n };\n }\n}\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"// app/component/poll/PollExtension.js\nexport default class PollExtension extends AbstractExtension {\n getAllowedStateKeys() {\n return ['pollVotes'];\n }\n\n load() {\n const { user: userPromise } = this.getState();\n const pollVotesPromise = userPromise.then(\n user => this._pollService.getVotes(user.id)\n );\n\n return {\n pollVotes: pollVotesPromise\n };\n }\n}\n")),(0,r.kt)("h2",{id:"state-transactions"},"State transactions"),(0,r.kt)("p",null,"State transactions, similarly to SQL transactions, provide a way to queue state patches and then commit them as a one to the original state."),(0,r.kt)("p",null,"They're here for use cases where you'd in you workflow call ",(0,r.kt)("inlineCode",{parentName:"p"},"setState")," method multiple times or you'd have to collect state patches in a separate variable (this is hard to do across multiple methods)."),(0,r.kt)("p",null,"Transaction is initiated with ",(0,r.kt)("inlineCode",{parentName:"p"},"beginStateTransaction()")," in Controller/Extension. After that\nevery setState call is queued and doesn't change the state or re-render anything. If there\nis another transaction initiated before you commit you'll lost your patches."),(0,r.kt)("p",null,"If you want to see what changes are in queue from the begin of transaction call ",(0,r.kt)("inlineCode",{parentName:"p"},"getTransactionStatePatches()")," method."),(0,r.kt)("p",null,"To finish the transaction you have to call ",(0,r.kt)("inlineCode",{parentName:"p"},"commitStateTransaction()")," method. It will squash\nall the patches made during the transaction into a one and apply it to the original state.\nTherefore your application will re-render only once and you'll also receive ",(0,r.kt)("a",{parentName:"p",href:"./events#stateeventsbefore_change_state"},"state events")," only once."),(0,r.kt)("p",null,"Another way to finish the transaction is to cancel it via ",(0,r.kt)("inlineCode",{parentName:"p"},"cancelStateTransaction()")," method."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Note"),": Call to ",(0,r.kt)("inlineCode",{parentName:"p"},"getState")," method after the transaction has begun will return state as it was before the transaction eg. the returned state doesn't include changes from the transaction period until the transaction is committed.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"async onFormSubmit({ content, deleteRevisions = false }) {\n const { article } = this.getState();\n\n this.beginStateTransaction();\n\n const result = await this._http.put(/* ... */);\n\n if (deleteRevisions) {\n await this.deleteArticleRevisions();\n }\n\n this.setState({ article: Object.assign({}, article, {\xa0content }) });\n this.commitStateTransaction();\n}\n\nasync deleteArticleRevisions() {\n const { article, revisions } = this.getState();\n\n await this._http.delete(/* ... */);\n\n this.setState({ revisions: [] });\n}\n")),(0,r.kt)("p",null,"In the example above, after the form is submitted with ",(0,r.kt)("inlineCode",{parentName:"p"},"deleteRevisions = true"),":"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Two ",(0,r.kt)("inlineCode",{parentName:"li"},"setState")," calls are made"),(0,r.kt)("li",{parentName:"ul"},"Only one render is triggered after the ",(0,r.kt)("inlineCode",{parentName:"li"},"commitStateTransaction")," call")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/327aa04a.af50d9c6.js b/assets/js/327aa04a.83f660dd.js similarity index 99% rename from assets/js/327aa04a.af50d9c6.js rename to assets/js/327aa04a.83f660dd.js index c273d8fd30..ada008f50c 100644 --- a/assets/js/327aa04a.af50d9c6.js +++ b/assets/js/327aa04a.83f660dd.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[9990],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=r.createContext({}),s=function(e){var t=r.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},d=function(e){var t=s(e.components);return r.createElement(o.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,f=u["".concat(o,".").concat(m)]||u[m]||c[m]||i;return n?r.createElement(f,p(p({ref:t},d),{},{components:n})):r.createElement(f,p({ref:t},d))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,p=new Array(i);p[0]=m;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l[u]="string"==typeof e?e:a,p[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>p,default:()=>c,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var r=n(5773),a=(n(7294),n(3905));const i={id:"ima_react_page_renderer.useEventBusType",title:"Interface: useEventBusType",sidebar_label:"@ima/react-page-renderer.useEventBusType",custom_edit_url:null},p=void 0,l={unversionedId:"api/interfaces/ima_react_page_renderer.useEventBusType",id:"api/interfaces/ima_react_page_renderer.useEventBusType",title:"Interface: useEventBusType",description:"@ima/react-page-renderer.useEventBusType",source:"@site/../docs/api/interfaces/ima_react_page_renderer.useEventBusType.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_react_page_renderer.useEventBusType",permalink:"/api/interfaces/ima_react_page_renderer.useEventBusType",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_react_page_renderer.useEventBusType",title:"Interface: useEventBusType",sidebar_label:"@ima/react-page-renderer.useEventBusType",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/react-page-renderer.useDispatcherType",permalink:"/api/interfaces/ima_react_page_renderer.useDispatcherType"}},o={},s=[{value:"Properties",id:"properties",level:2},{value:"fire",id:"fire",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Parameters",id:"parameters",level:5},{value:"Returns",id:"returns",level:5},{value:"Defined in",id:"defined-in",level:4}],d={toc:s},u="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/modules/ima_react_page_renderer"},"@ima/react-page-renderer"),".useEventBusType"),(0,a.kt)("h2",{id:"properties"},"Properties"),(0,a.kt)("h3",{id:"fire"},"fire"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"fire"),": (",(0,a.kt)("inlineCode",{parentName:"p"},"eventTarget"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"EventTarget"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"eventName"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"data?"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"options?"),": ",(0,a.kt)("a",{parentName:"p",href:"/api/modules/ima_core#eventbusoptions"},(0,a.kt)("inlineCode",{parentName:"a"},"EventBusOptions")),") => ",(0,a.kt)("a",{parentName:"p",href:"/api/classes/ima_core.EventBus"},(0,a.kt)("inlineCode",{parentName:"a"},"EventBus"))),(0,a.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,a.kt)("p",null,"\u25b8 (",(0,a.kt)("inlineCode",{parentName:"p"},"eventTarget"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"eventName"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"data?"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,a.kt)("a",{parentName:"p",href:"/api/classes/ima_core.EventBus"},(0,a.kt)("inlineCode",{parentName:"a"},"EventBus"))),(0,a.kt)("p",null,"Fires a new custom event of the specified name, carrying the provided\ndata."),(0,a.kt)("p",null,"Note that this method does not prevent the event listeners to modify the\ndata in any way. The order in which the event listeners will be executed\nis unspecified and should not be relied upon."),(0,a.kt)("p",null,"Note that the default options are\n",(0,a.kt)("inlineCode",{parentName:"p"},"{ bubbles: true, cancelable: true }"),", which is different from the\ndefault values used in the native custom events\n(",(0,a.kt)("inlineCode",{parentName:"p"},"{ bubbles: false, cancelable: false }"),")."),(0,a.kt)("h5",{id:"parameters"},"Parameters"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"eventTarget")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"EventTarget")),(0,a.kt)("td",{parentName:"tr",align:"left"},"The event target at which the event will be dispatched (e.g. element/document/window).")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"eventName")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"The name of the event to fire.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"data?")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"any")),(0,a.kt)("td",{parentName:"tr",align:"left"},"The data to pass to the event listeners.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"options?")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("a",{parentName:"td",href:"/api/modules/ima_core#eventbusoptions"},(0,a.kt)("inlineCode",{parentName:"a"},"EventBusOptions"))),(0,a.kt)("td",{parentName:"tr",align:"left"},"The override of the default options passed to the constructor of the custom event fired by this event bus. The default options passed to the custom event constructor are ",(0,a.kt)("inlineCode",{parentName:"td"},"{ bubbles: true, cancelable: true }"),".")))),(0,a.kt)("h5",{id:"returns"},"Returns"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/classes/ima_core.EventBus"},(0,a.kt)("inlineCode",{parentName:"a"},"EventBus"))),(0,a.kt)("p",null,"This custom event bus."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("inlineCode",{parentName:"strong"},"Throws"))),(0,a.kt)("p",null,"Thrown if the provided event target cannot be used to\nfire the event."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("inlineCode",{parentName:"strong"},"See"))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/API/Event/Event"},"https://developer.mozilla.org/en-US/docs/Web/API/Event/Event")),(0,a.kt)("h4",{id:"defined-in"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a2e444f/packages/react-page-renderer/src/hooks/eventBus.ts#L7"},"packages/react-page-renderer/src/hooks/eventBus.ts:7")))}c.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[9990],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=r.createContext({}),s=function(e){var t=r.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},d=function(e){var t=s(e.components);return r.createElement(o.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,f=u["".concat(o,".").concat(m)]||u[m]||c[m]||i;return n?r.createElement(f,p(p({ref:t},d),{},{components:n})):r.createElement(f,p({ref:t},d))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,p=new Array(i);p[0]=m;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l[u]="string"==typeof e?e:a,p[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>p,default:()=>c,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var r=n(5773),a=(n(7294),n(3905));const i={id:"ima_react_page_renderer.useEventBusType",title:"Interface: useEventBusType",sidebar_label:"@ima/react-page-renderer.useEventBusType",custom_edit_url:null},p=void 0,l={unversionedId:"api/interfaces/ima_react_page_renderer.useEventBusType",id:"api/interfaces/ima_react_page_renderer.useEventBusType",title:"Interface: useEventBusType",description:"@ima/react-page-renderer.useEventBusType",source:"@site/../docs/api/interfaces/ima_react_page_renderer.useEventBusType.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ima_react_page_renderer.useEventBusType",permalink:"/api/interfaces/ima_react_page_renderer.useEventBusType",draft:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"ima_react_page_renderer.useEventBusType",title:"Interface: useEventBusType",sidebar_label:"@ima/react-page-renderer.useEventBusType",custom_edit_url:null},sidebar:"api",previous:{title:"@ima/react-page-renderer.useDispatcherType",permalink:"/api/interfaces/ima_react_page_renderer.useDispatcherType"}},o={},s=[{value:"Properties",id:"properties",level:2},{value:"fire",id:"fire",level:3},{value:"Type declaration",id:"type-declaration",level:4},{value:"Parameters",id:"parameters",level:5},{value:"Returns",id:"returns",level:5},{value:"Defined in",id:"defined-in",level:4}],d={toc:s},u="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/modules/ima_react_page_renderer"},"@ima/react-page-renderer"),".useEventBusType"),(0,a.kt)("h2",{id:"properties"},"Properties"),(0,a.kt)("h3",{id:"fire"},"fire"),(0,a.kt)("p",null,"\u2022 ",(0,a.kt)("strong",{parentName:"p"},"fire"),": (",(0,a.kt)("inlineCode",{parentName:"p"},"eventTarget"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"EventTarget"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"eventName"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"string"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"data?"),": ",(0,a.kt)("inlineCode",{parentName:"p"},"any"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"options?"),": ",(0,a.kt)("a",{parentName:"p",href:"/api/modules/ima_core#eventbusoptions"},(0,a.kt)("inlineCode",{parentName:"a"},"EventBusOptions")),") => ",(0,a.kt)("a",{parentName:"p",href:"/api/classes/ima_core.EventBus"},(0,a.kt)("inlineCode",{parentName:"a"},"EventBus"))),(0,a.kt)("h4",{id:"type-declaration"},"Type declaration"),(0,a.kt)("p",null,"\u25b8 (",(0,a.kt)("inlineCode",{parentName:"p"},"eventTarget"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"eventName"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"data?"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,a.kt)("a",{parentName:"p",href:"/api/classes/ima_core.EventBus"},(0,a.kt)("inlineCode",{parentName:"a"},"EventBus"))),(0,a.kt)("p",null,"Fires a new custom event of the specified name, carrying the provided\ndata."),(0,a.kt)("p",null,"Note that this method does not prevent the event listeners to modify the\ndata in any way. The order in which the event listeners will be executed\nis unspecified and should not be relied upon."),(0,a.kt)("p",null,"Note that the default options are\n",(0,a.kt)("inlineCode",{parentName:"p"},"{ bubbles: true, cancelable: true }"),", which is different from the\ndefault values used in the native custom events\n(",(0,a.kt)("inlineCode",{parentName:"p"},"{ bubbles: false, cancelable: false }"),")."),(0,a.kt)("h5",{id:"parameters"},"Parameters"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"eventTarget")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"EventTarget")),(0,a.kt)("td",{parentName:"tr",align:"left"},"The event target at which the event will be dispatched (e.g. element/document/window).")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"eventName")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"The name of the event to fire.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"data?")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"any")),(0,a.kt)("td",{parentName:"tr",align:"left"},"The data to pass to the event listeners.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"options?")),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("a",{parentName:"td",href:"/api/modules/ima_core#eventbusoptions"},(0,a.kt)("inlineCode",{parentName:"a"},"EventBusOptions"))),(0,a.kt)("td",{parentName:"tr",align:"left"},"The override of the default options passed to the constructor of the custom event fired by this event bus. The default options passed to the custom event constructor are ",(0,a.kt)("inlineCode",{parentName:"td"},"{ bubbles: true, cancelable: true }"),".")))),(0,a.kt)("h5",{id:"returns"},"Returns"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"/api/classes/ima_core.EventBus"},(0,a.kt)("inlineCode",{parentName:"a"},"EventBus"))),(0,a.kt)("p",null,"This custom event bus."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("inlineCode",{parentName:"strong"},"Throws"))),(0,a.kt)("p",null,"Thrown if the provided event target cannot be used to\nfire the event."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("inlineCode",{parentName:"strong"},"See"))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/API/Event/Event"},"https://developer.mozilla.org/en-US/docs/Web/API/Event/Event")),(0,a.kt)("h4",{id:"defined-in"},"Defined in"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/seznam/ima/blob/a80eb3a/packages/react-page-renderer/src/hooks/eventBus.ts#L7"},"packages/react-page-renderer/src/hooks/eventBus.ts:7")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/33fd58a6.3dd68c23.js b/assets/js/33fd58a6.3dd68c23.js new file mode 100644 index 0000000000..2ca408cc3f --- /dev/null +++ b/assets/js/33fd58a6.3dd68c23.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_ima_docs=self.webpackChunk_ima_docs||[]).push([[4751],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>g});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),p=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(l.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,l=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),m=p(n),d=r,g=m["".concat(l,".").concat(d)]||m[d]||u[d]||s;return n?a.createElement(g,i(i({ref:t},c),{},{components:n})):a.createElement(g,i({ref:t},c))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,i=new Array(s);i[0]=d;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[m]="string"==typeof e?e:r,i[1]=o;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>s,metadata:()=>o,toc:()=>p});var a=n(5773),r=(n(7294),n(3905));const s={title:"Migration 0.15.0",description:"Migration > Migration to version 0.15.0"},i=void 0,o={unversionedId:"migration/migration-0.15.0",id:"migration/migration-0.15.0",title:"Migration 0.15.0",description:"Migration > Migration to version 0.15.0",source:"@site/../docs/migration/migration-0.15.0.md",sourceDirName:"migration",slug:"/migration/migration-0.15.0",permalink:"/migration/migration-0.15.0",draft:!1,editUrl:"https://github.com/seznam/ima/tree/master/docs/../docs/migration/migration-0.15.0.md",tags:[],version:"current",lastUpdatedBy:"PS",lastUpdatedAt:1736522400,formattedLastUpdatedAt:"Jan 10, 2025",frontMatter:{title:"Migration 0.15.0",description:"Migration > Migration to version 0.15.0"},sidebar:"docs",previous:{title:"Migration 0.14.0",permalink:"/migration/migration-0.14.0"},next:{title:"Migration 0.16.0",permalink:"/migration/migration-0.16.0"}},l={},p=[{value:"Build",id:"build",level:2},{value:"Karma removed instead of that added Jest",id:"karma-removed-instead-of-that-added-jest",level:3},{value:"Server",id:"server",level:2},{value:"DocumentView",id:"documentview",level:2},{value:"SPA",id:"spa",level:2},{value:"Removed namespaces",id:"removed-namespaces",level:2},{value:"Others",id:"others",level:2}],c={toc:p},m="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"In order to upgrade to IMA.js 0.15.0, start ba adding these new dependencies to package.json:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json"},'"prop-types": "15.6.0",\n"react": "16.2.0",\n"react-dom": "16.2.0",\n"express-http-proxy": "^1.0.7"\n')),(0,r.kt)("h2",{id:"build"},"Build"),(0,r.kt)("p",null,"If you are overriding polyfills or shims (for example using some custom polyfills) you need to change polyfills or shims structure in gulpConfig.js . Now it has to be structure for js, es and fetch polyfills.\nIf you are't overriding polyfills or shims, you can skip this step."),(0,r.kt)("p",null,"Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"shim: {\n js: {\n name: 'shim.js',\n src: ['./node_modules/ima/polyfill/collectionEnumeration.js'],\n dest: {\n client: './build/static/js/'\n }\n },\n es: {\n name: 'shim.es.js',\n src: [],\n dest: {\n client: './build/static/js/',\n server: './build/ima/'\n }\n }\n\n\npolyfill: {\n js: {\n name: 'polyfill.js',\n src: [\n './node_modules/babel-polyfill/dist/polyfill.min.js',\n './node_modules/custom-event-polyfill/custom-event-polyfill.js'\n ],\n dest: {\n client: './build/static/js/'\n }\n },\n es: {\n name: 'polyfill.es.js',\n src: ['./node_modules/custom-event-polyfill/custom-event-polyfill.js'],\n dest: {\n client: './build/static/js/'\n }\n },\n fetch: {\n name: 'fetch-polyfill.js',\n src: [\n './node_modules/core-js/client/shim.min.js',\n './node_modules/whatwg-fetch/fetch.js'\n ],\n dest: {\n client: './build/static/js/'\n }\n },\n ima: {\n name: 'ima-polyfill.js',\n src: [\n './node_modules/ima/polyfill/imaLoader.js',\n './node_modules/ima/polyfill/imaRunner.js'\n ],\n dest: {\n client: './build/static/js/'\n }\n }\n }\n\n")),(0,r.kt)("p",null,"In build.js add new property 'es' to bundle object:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"es: [\n './build/static/js/polyfill.es.js',\n './build/static/js/shim.es.js',\n './build/static/js/vendor.client.es.js',\n './build/static/js/app.client.es.js'\n]\n")),(0,r.kt)("p",null,"Add to your settings.js ",(0,r.kt)("strong",{parentName:"p"},"prod"),".$Page.$Render new property esScripts like this:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"esScripts: [\n '/static/js/locale/' + config.$Language + '.js' + versionStamp,\n '/static/js/app.bundle.es.min.js' + versionStamp\n]\n")),(0,r.kt)("p",null,"Add to your settings.js ",(0,r.kt)("strong",{parentName:"p"},"dev"),".$Page.$Render new property esScripts like this:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"esScripts: [\n '/static/js/polyfill.es.js' + versionStamp,\n '/static/js/shim.es.js' + versionStamp,\n '/static/js/vendor.client.es.js' + versionStamp,\n `/static/js/locale/${config.$Language}.js${versionStamp}`,\n '/static/js/app.client.es.js' + versionStamp,\n '/static/js/hot.reload.js' + versionStamp\n]\n")),(0,r.kt)("h3",{id:"karma-removed-instead-of-that-added-jest"},"Karma removed instead of that added Jest"),(0,r.kt)("p",null,"If you are overriding gulpfile.js you need to make following changes:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"remove from gulpConfig.tasks.dev task ",(0,r.kt)("inlineCode",{parentName:"li"},"test:unit:karma:dev")),(0,r.kt)("li",{parentName:"ul"},"remove from gulpConfig.tasks.dev and gulpConfig.tasks.build task ",(0,r.kt)("inlineCode",{parentName:"li"},"Es6ToEs5:vendor:client:test")),(0,r.kt)("li",{parentName:"ul"},"remove from function buildExample task ",(0,r.kt)("inlineCode",{parentName:"li"},"Es6ToEs5:vendor:client:test"))),(0,r.kt)("p",null,"If you are overriding gulpConfig.tasks.build in gulpConfig.js you need to add ",(0,r.kt)("inlineCode",{parentName:"p"},"bundle:es:app")," into bundles section."),(0,r.kt)("h2",{id:"server"},"Server"),(0,r.kt)("p",null,"In server.js"),(0,r.kt)("p",null,"Add at the top into import sections:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"require('ima/polyfill/imaLoader.js');\nrequire('ima/polyfill/imaRunner.js');\n")),(0,r.kt)("p",null,"add proxy into middlewares imports section"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"let proxy = require('express-http-proxy');\n")),(0,r.kt)("p",null,"change line"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},".use(environment.$Proxy.path + '/', proxy)\n")),(0,r.kt)("p",null,"to"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},".use(environment.$Proxy.path + '/', proxy(environment.$Proxy.server))\n")),(0,r.kt)("h2",{id:"documentview"},"DocumentView"),(0,r.kt)("p",null,"In DocumentView.jsx we united sync and async scripts."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"remove ",(0,r.kt)("inlineCode",{parentName:"li"},"getSyncScripts")," function."),(0,r.kt)("li",{parentName:"ul"},"update ",(0,r.kt)("inlineCode",{parentName:"li"},"getAsyncScripts")," function to")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript"},"getAsyncScripts() {\n let scriptResources = `
@@ -23,8 +23,8 @@ method invoked during controller deinitialization. This usually happens when the user navigates to a different URL.

This method is the lifecycle counterpart of the activate() method. When the activate() method has not been called deactivate() won't be called either.

The controller should deregister listeners and release all resources obtained in the activate() method.

destroy() @client

Finalization callback, called when the controller is being discarded by the application. This usually happens when the user navigates to a different URL.

This method is the lifecycle counterpart of the init() method.

The controller should release all resources obtained in the init() method. The controller must release any resources that might not be released automatically when the controller's instance -is destroyed by the garbage collector.

- - +is destroyed by the garbage collector.

+ + \ No newline at end of file diff --git a/basic-features/data-fetching/index.html b/basic-features/data-fetching/index.html index ee95eaf102..dbb59e06df 100644 --- a/basic-features/data-fetching/index.html +++ b/basic-features/data-fetching/index.html @@ -4,13 +4,13 @@ Data fetching | IMA.js - - + +
-

Data fetching

HttpAgent allows you to isomorphically fetch data in IMA.js applications. It is a simple wrapper around native fetch with additional features like caching, proxy support and others.

Cancellable requests

The HttpAgent has support for AbortController to cancel requests in native way. There are two ways you can provide custom instance of AbortController to the HttpAgent, where each has it's own benefits.

options.abortController

Using this approach has the added benefit of HttpAgent being able to additionally reuse this controller for cancelation of timeout requests.

const controller = new AbortController();

httpAgent.get('<uri>', '<data>', {
abortController: controller,
});

// Cancel the request
controller.abort();
info

If you don't provide custom instance of AbortController the agent uses it's own instance internally to cancel running timeout requests.

options.fetchOptions.signal

This approach is more similar to native fetch definition. However since currently you can only provide one signal to fetch request and we don't have access to the controller instance (from within the HttpAgent), we are unable to abort time out requests in this case.

const controller = new AbortController();

httpAgent.get('<uri>', '<data>', {
fetchOptions: {
signal: controller.signal,
}
});

// Cancel the request
controller.abort();
note

The time out requests still throw the same timeout error, however they are not canceled (aborted). This is the only difference between the two forementioned methods.

- - +

Data fetching

HttpAgent allows you to isomorphically fetch data in IMA.js applications. It is a simple wrapper around native fetch with additional features like caching, proxy support and others.

Cancellable requests

The HttpAgent has support for AbortController to cancel requests in native way. There are two ways you can provide custom instance of AbortController to the HttpAgent, where each has it's own benefits.

options.abortController

Using this approach has the added benefit of HttpAgent being able to additionally reuse this controller for cancelation of timeout requests.

const controller = new AbortController();

httpAgent.get('<uri>', '<data>', {
abortController: controller,
});

// Cancel the request
controller.abort();
info

If you don't provide custom instance of AbortController the agent uses it's own instance internally to cancel running timeout requests.

options.fetchOptions.signal

This approach is more similar to native fetch definition. However since currently you can only provide one signal to fetch request and we don't have access to the controller instance (from within the HttpAgent), we are unable to abort time out requests in this case.

const controller = new AbortController();

httpAgent.get('<uri>', '<data>', {
fetchOptions: {
signal: controller.signal,
}
});

// Cancel the request
controller.abort();
note

The time out requests still throw the same timeout error, however they are not canceled (aborted). This is the only difference between the two forementioned methods.

+ + \ No newline at end of file diff --git a/basic-features/dictionary/index.html b/basic-features/dictionary/index.html index 8e3f7a723f..d6c8e7f73d 100644 --- a/basic-features/dictionary/index.html +++ b/basic-features/dictionary/index.html @@ -4,13 +4,13 @@ Dictionary | IMA.js - - + +
-

Dictionary

Dictionary in IMA.js app serves many purposes. Simplest of them is keeping text strings out of component markup. More advanced one would be internationalization and in-text replacements.

Configuration

First we need to tell IMA.js where to look for dictionary files. Naming convention of the files is up to you, but it should be clear what language are the files meant for and glob pattern has to be able to match path to the files. IMA.js defaults to the following configuration:

languages: {
cs: ['./app/**/*CS.json'],
en: ['./app/**/*EN.json']
}

However you can easily override this settings in ima.config.js (an example):

./ima.config.js
module.exports = {
languages: {
cs: [
'./app/component/**/*CS.json',
'./app/page/**/*CS.json'
],
en: [
'./app/component/**/*EN.json',
'./app/page/**/*EN.json'
],
de: [
'./app/component/**/*DE.json',
'./app/page/**/*DE.json'
]
}
}

URL parser configuration

We also need to specify what language should be loaded. This is done dynamically depending on current URL. You can customize the URL patterns to language mapping in environment settings.

The configuration consists of simple key-value pairs, that are used for configuring the languages used with specific hosts or starting paths:

  • key - has to start with '//' instead of a protocol, and you can define the root path.
  • value - is a language to use when the key is matched by the current URL.
./server/config/environment.js
module.exports = (() => ({
prod: {
$Language: {
'//*:*/cs': 'cs', // https://ima-app.com/cs/custom-route
'//*:*/en': 'en', // https://ima-app.com/en/custom-route
'//*:*': 'cs', // https://ima-app.com/custom-route
},
}
}))();

:language placeholder

To make the language definition a bit easier for multilingua applications, you can use :language placeholder in following way:

./server/config/environment.js
module.exports = (() => ({
prod: {
$Language: {
'//*:*/:language': ':language', // https://ima-app.com/[en|cs]/custom-route
'//*:*': 'cs', // https://ima-app.com/custom-route
},
}
}))();

Language files

The messageformat compiler, which processes our language files, expects .JSON files on the input. Contents of these files are objects, which can be nested into multiple levels. These levels are then represtend as a namespace key to the value in the dictionary.

./pollVoteEN.json
{
"resultTitle": "Result of {name}:",
"result": {
"voted": "{count, plural, =0{Found no results} one{Found one result} other{Found # results} }",
"reader": "{gender, select, male{He said} female{She said} other{They said} }",
}
}
info

File name is used as a namespace for strings it defines. String defined under key submit in file uploadFormCS.json will be accessible under uploadForm.submit.

Usage

Every component and view extending AbstractComponent or AbstractPureComponent has access to localize method from within its instance. This method is alias to a get method from the Dictionary instance and takes 2 arguments:

  • key - namespace and name of the localization string -> if you have resultTitle string in file pollVoteEN.json the key to this string would be pollVote.resultTitle.
  • parameters - Optional object with replacements and parameters for messageformat syntax. For more info about the syntax check out ICU guide.
import { AbstractPureComponent } from '@ima/react-page-renderer';

class PollVote extends AbstractPureComponent {
render() {
return (
<div>
{this.localize('pollVote.resultTitle')}
{this.localize('pollVote.result.voted', {count: 3})}
</div>
);
}
}
tip

Use useComponent().localize or useLocalize() hooks in functional components.

import { useComponent, useLocalize } from '@ima/react-page-renderer';

function PollVote() {
// const { localize } = useComponent();
const localize = useLocalize();

return (
<div>
{localize('pollVote.resultTitle')}
{localize('pollVote.result.voted', {count: 3})}
</div>
);
}

Messageformat library

For more information on the available selectors, formatters, and other details, please see Format guide.

Dictionary is also registered in Object Container and thus can be obtained in Controllers, Extensions and other classes constructed through OC.

- - +

Dictionary

Dictionary in IMA.js app serves many purposes. Simplest of them is keeping text strings out of component markup. More advanced one would be internationalization and in-text replacements.

Configuration

First we need to tell IMA.js where to look for dictionary files. Naming convention of the files is up to you, but it should be clear what language are the files meant for and glob pattern has to be able to match path to the files. IMA.js defaults to the following configuration:

languages: {
cs: ['./app/**/*CS.json'],
en: ['./app/**/*EN.json']
}

However you can easily override this settings in ima.config.js (an example):

./ima.config.js
module.exports = {
languages: {
cs: [
'./app/component/**/*CS.json',
'./app/page/**/*CS.json'
],
en: [
'./app/component/**/*EN.json',
'./app/page/**/*EN.json'
],
de: [
'./app/component/**/*DE.json',
'./app/page/**/*DE.json'
]
}
}

URL parser configuration

We also need to specify what language should be loaded. This is done dynamically depending on current URL. You can customize the URL patterns to language mapping in environment settings.

The configuration consists of simple key-value pairs, that are used for configuring the languages used with specific hosts or starting paths:

  • key - has to start with '//' instead of a protocol, and you can define the root path.
  • value - is a language to use when the key is matched by the current URL.
./server/config/environment.js
module.exports = (() => ({
prod: {
$Language: {
'//*:*/cs': 'cs', // https://ima-app.com/cs/custom-route
'//*:*/en': 'en', // https://ima-app.com/en/custom-route
'//*:*': 'cs', // https://ima-app.com/custom-route
},
}
}))();

:language placeholder

To make the language definition a bit easier for multilingua applications, you can use :language placeholder in following way:

./server/config/environment.js
module.exports = (() => ({
prod: {
$Language: {
'//*:*/:language': ':language', // https://ima-app.com/[en|cs]/custom-route
'//*:*': 'cs', // https://ima-app.com/custom-route
},
}
}))();

Language files

The messageformat compiler, which processes our language files, expects .JSON files on the input. Contents of these files are objects, which can be nested into multiple levels. These levels are then represtend as a namespace key to the value in the dictionary.

./pollVoteEN.json
{
"resultTitle": "Result of {name}:",
"result": {
"voted": "{count, plural, =0{Found no results} one{Found one result} other{Found # results} }",
"reader": "{gender, select, male{He said} female{She said} other{They said} }",
}
}
info

File name is used as a namespace for strings it defines. String defined under key submit in file uploadFormCS.json will be accessible under uploadForm.submit.

Usage

Every component and view extending AbstractComponent or AbstractPureComponent has access to localize method from within its instance. This method is alias to a get method from the Dictionary instance and takes 2 arguments:

  • key - namespace and name of the localization string -> if you have resultTitle string in file pollVoteEN.json the key to this string would be pollVote.resultTitle.
  • parameters - Optional object with replacements and parameters for messageformat syntax. For more info about the syntax check out ICU guide.
import { AbstractPureComponent } from '@ima/react-page-renderer';

class PollVote extends AbstractPureComponent {
render() {
return (
<div>
{this.localize('pollVote.resultTitle')}
{this.localize('pollVote.result.voted', {count: 3})}
</div>
);
}
}
tip

Use useComponent().localize or useLocalize() hooks in functional components.

import { useComponent, useLocalize } from '@ima/react-page-renderer';

function PollVote() {
// const { localize } = useComponent();
const localize = useLocalize();

return (
<div>
{localize('pollVote.resultTitle')}
{localize('pollVote.result.voted', {count: 3})}
</div>
);
}

Messageformat library

For more information on the available selectors, formatters, and other details, please see Format guide.

Dictionary is also registered in Object Container and thus can be obtained in Controllers, Extensions and other classes constructed through OC.

+ + \ No newline at end of file diff --git a/basic-features/error-handling/index.html b/basic-features/error-handling/index.html index b44fcc84a9..810b920d76 100644 --- a/basic-features/error-handling/index.html +++ b/basic-features/error-handling/index.html @@ -4,13 +4,13 @@ Error Handling | IMA.js - - + +
-

Error Handling

This sections focuses on client and server-side error handling during development and in production.

GenericError

Represents custom error class that poses a structure for http errors. This should be preferred way of throwing custom errors as it adds an ability to define http status code with additional custom params. To create such error you need to import GenericError from @ima/core and instantiate it:

import { GenericError } from '@ima/core';

throw new GenericError(
'Something went wrong.',
{ status: 500, custom: 'param' } // error parameters
);

GenericError instance has 2 methods:

  • getParams() - Returns params argument (2nd argument) provided to the constructor.
  • getHttpStatus() - Returns status property from the params.
- - +

Error Handling

This sections focuses on client and server-side error handling during development and in production.

GenericError

Represents custom error class that poses a structure for http errors. This should be preferred way of throwing custom errors as it adds an ability to define http status code with additional custom params. To create such error you need to import GenericError from @ima/core and instantiate it:

import { GenericError } from '@ima/core';

throw new GenericError(
'Something went wrong.',
{ status: 500, custom: 'param' } // error parameters
);

GenericError instance has 2 methods:

  • getParams() - Returns params argument (2nd argument) provided to the constructor.
  • getHttpStatus() - Returns status property from the params.
+ + \ No newline at end of file diff --git a/basic-features/events/index.html b/basic-features/events/index.html index 051a296895..bf9bf77d5d 100644 --- a/basic-features/events/index.html +++ b/basic-features/events/index.html @@ -4,8 +4,8 @@ Events | IMA.js - - + +
@@ -51,8 +51,8 @@ loaded be the new Controller are resolved.

StateEvents.BEFORE_CHANGE_STATE

An event fired before the page state changes. The handler of this event receives following data:

{
// The state object derived from the oldState and patchState
newState,
// The current state
oldState,
// The data that were passed to the `setState` method
patchState
}

Note: You can mutate the newState object if you wish. Mutating oldState and patchState will have no effect.

StateEvents.AFTER_CHANGE_STATE

An event fired after the page state changes. The data passed with this event -contain only the newState object.

RendererEvents.MOUNTED

PageRenderer fires this event after current page view is mounted to the DOM. Event's data contain { type: String } Where type can be one of constants located in @ima/core/page/renderer/Types.

RendererEvents.UPDATED

PageRenderer fires this event after current state is updated in the DOM. Event's data contain { state: Object<string, *>}.

RendererEvents.UNMOUNTED

PageRenderer fires this event after current view is unmounted from the DOM. Event's data contain { type: String } Where type can be one of constants located in @ima/core/page/renderer/Types.

RendererEvents.ERROR

PageRenderer fires this event when there is no _viewContainer in _renderToDOM method. Event's data contain { message: string }.

- - +contain only the newState object.

RendererEvents.MOUNTED

PageRenderer fires this event after current page view is mounted to the DOM. Event's data contain { type: String } Where type can be one of constants located in @ima/core/page/renderer/Types.

RendererEvents.UPDATED

PageRenderer fires this event after current state is updated in the DOM. Event's data contain { state: Object<string, *>}.

RendererEvents.UNMOUNTED

PageRenderer fires this event after current view is unmounted from the DOM. Event's data contain { type: String } Where type can be one of constants located in @ima/core/page/renderer/Types.

RendererEvents.ERROR

PageRenderer fires this event when there is no _viewContainer in _renderToDOM method. Event's data contain { message: string }.

+ + \ No newline at end of file diff --git a/basic-features/extensions/index.html b/basic-features/extensions/index.html index b676039bd1..a1d6297ff3 100644 --- a/basic-features/extensions/index.html +++ b/basic-features/extensions/index.html @@ -4,8 +4,8 @@ Extensions | IMA.js - - + +
@@ -27,8 +27,8 @@ ima/extension/AbstractExtension with the same methods as you'd use in the controller. In addition you should implement getAllowedStateKeys() method which returns array of keys the extension is allowed to change in controller's state. (If the extension itself creates the state key, it does not have to be claimed this way - the extension has access to it automatically.)

Note: List and description of controller methods can be seen in Controller lifecycle.

// app/component/gallery/GalleryExtension.js
import { AbstractExtension } from '@ima/core';

export default class GalleryExtension extends AbstractExtension {
static get $dependencies() {
return [];
}

load() {
// Where the magic happens...
}
}

All extensions to be used on a page must be added to the current controller via $extensions getter. After that, the extensions will go through the same lifecycle as the controller.

import { AbstractController } from '@ima/core';
import GalleryExtension from 'app/component/gallery/GalleryExtension';

export default class PostController extends AbstractController {
static get $dependencies() {
return [];
}

static get $extensions() {
return [GalleryExtension];
}

constructor() {
//If needed, extension instance can be retrieved using getExtension();
this._galleryExtension = this.getExtension(GalleryExtension);
}

...
}

Extensions can be also defined within routes.

//routes.js

import PostController from 'app/page/post/PostController';
import PostView from 'app/page/post/PostView';
import GalleryExtension from 'app/component/gallery/GalleryExtension';

export default (ns, oc, routesConfig, router) =>
router
.add('home', '/', PostController, PostView, {
extensions: [GalleryExtension],
});

Extensions can be defined in global array of extensions. -This array can be registered in the OC as constant:


//bind.js
import Extension1 from 'app/component/gallery/GalleryExtension';
import Extension2 from 'app/component/gallery/GalleryExtension2';
...
export default (ns, oc, config) => {
oc.constant('$galleryExtensions', [Extension, Extension2]);
}

//PostController.js
import { AbstractController } from '@ima/core';
import GalleryExtension from 'app/component/gallery/GalleryExtension';

export default class PostController extends AbstractController {

...

static get $extensions() {
return ['...$galleryExtensions'];
}

...
}

//Or in routes.js
...
router
.add('home', '/', PostController, PostView, {
extensions: ['...$galleryExtensions'],
});
...

Or just exported array:


//GalleryExtensions.js
import Extension1 from 'app/component/gallery/GalleryExtension';
import Extension2 from 'app/component/gallery/GalleryExtension2';

export const GalleryExtensions = [Extension, Extension2];


//PostController.js
import { AbstractController } from '@ima/core';
import { GalleryExtensions } from 'app/component/gallery/GalleryExtensions';

export default class PostController extends AbstractController {

...

static get $extensions() {
return [...GalleryExtensions];
}

...
}

Passing partial state from controllers

During any lifecycle phase of the page the controller's lifecycle method is called first and then the same method is called on every extension registered in the controller. Order of the extensions is crucial and the same as in which the extensions were registered.

Since v16 you can access the state loaded in controller and preceding extensions (hence the cruciality of extensions order). Bear in mind that the accessed state may contain unresolved promises that need to be treated differently.

Addition of async/await functionality in v17 can lead to dramatic performance drop if not used well. Keep in mind that every await in Controller's or Extension's load method will delay execution of next load method until the asynchronous operation finishes.

// app/component/gallery/GalleryExtension.js

load() {
const {
user: userPromise, // needs to be chained with .then()
userGroupName,
} = this.getState();

const galleryPromise = userPromise.then(user => {
// Calling this.getState() here would still give us unresolved promises.
return this._galleryService.loadByUserName(user.name);
});

return {
gallery: galleryPromise
};
}
- - +This array can be registered in the OC as constant:


//bind.js
import Extension1 from 'app/component/gallery/GalleryExtension';
import Extension2 from 'app/component/gallery/GalleryExtension2';
...
export default (ns, oc, config) => {
oc.constant('$galleryExtensions', [Extension, Extension2]);
}

//PostController.js
import { AbstractController } from '@ima/core';
import GalleryExtension from 'app/component/gallery/GalleryExtension';

export default class PostController extends AbstractController {

...

static get $extensions() {
return ['...$galleryExtensions'];
}

...
}

//Or in routes.js
...
router
.add('home', '/', PostController, PostView, {
extensions: ['...$galleryExtensions'],
});
...

Or just exported array:


//GalleryExtensions.js
import Extension1 from 'app/component/gallery/GalleryExtension';
import Extension2 from 'app/component/gallery/GalleryExtension2';

export const GalleryExtensions = [Extension, Extension2];


//PostController.js
import { AbstractController } from '@ima/core';
import { GalleryExtensions } from 'app/component/gallery/GalleryExtensions';

export default class PostController extends AbstractController {

...

static get $extensions() {
return [...GalleryExtensions];
}

...
}

Passing partial state from controllers

During any lifecycle phase of the page the controller's lifecycle method is called first and then the same method is called on every extension registered in the controller. Order of the extensions is crucial and the same as in which the extensions were registered.

Since v16 you can access the state loaded in controller and preceding extensions (hence the cruciality of extensions order). Bear in mind that the accessed state may contain unresolved promises that need to be treated differently.

Addition of async/await functionality in v17 can lead to dramatic performance drop if not used well. Keep in mind that every await in Controller's or Extension's load method will delay execution of next load method until the asynchronous operation finishes.

// app/component/gallery/GalleryExtension.js

load() {
const {
user: userPromise, // needs to be chained with .then()
userGroupName,
} = this.getState();

const galleryPromise = userPromise.then(user => {
// Calling this.getState() here would still give us unresolved promises.
return this._galleryService.loadByUserName(user.name);
});

return {
gallery: galleryPromise
};
}
+ + \ No newline at end of file diff --git a/basic-features/handling-scripts-and-styles/index.html b/basic-features/handling-scripts-and-styles/index.html index 026a33e4d5..763bba02b0 100644 --- a/basic-features/handling-scripts-and-styles/index.html +++ b/basic-features/handling-scripts-and-styles/index.html @@ -4,13 +4,13 @@ Handling scripts and styles | IMA.js - - + + - - +
+ + \ No newline at end of file diff --git a/basic-features/object-container/index.html b/basic-features/object-container/index.html index de081d934a..899eaf7da3 100644 --- a/basic-features/object-container/index.html +++ b/basic-features/object-container/index.html @@ -4,8 +4,8 @@ Object Container | IMA.js - - + +
@@ -37,8 +37,8 @@ factory function has been registered with the object container if no custom dependencies are provided.

import { Cache, HttpAgent } from '@ima/core';
import SimpleRestClient from 'app/rest-client-impl/SimpleRestClient';
import LinkGenerator from 'app/rest-client-impl/LinkGenerator';

oc.create('UserAgent');
oc.create(
SimpleRestClient,
[
HttpAgent, Cache, 'REST_API_ROOT_URL', LinkGenerator
]
);

The last two method are not used as much as the first one but can be useful inside the app/config/bind.js and app/config/routes.js

Other methods

  • has() returns true if the specified object, class or resource is registered -within the OC.
if (oc.has('UserAgent') && oc.get('UserAgent').isMobile()) {
// Register conditional stuff here...
}
  • getConstructorOf() returns the class constructor function of the specified class or alias.
- - +within the OC.
if (oc.has('UserAgent') && oc.get('UserAgent').isMobile()) {
// Register conditional stuff here...
}
  • getConstructorOf() returns the class constructor function of the specified class or alias.
+ + \ No newline at end of file diff --git a/basic-features/page-manager/index.html b/basic-features/page-manager/index.html index 6806938aa1..df9196fd44 100644 --- a/basic-features/page-manager/index.html +++ b/basic-features/page-manager/index.html @@ -4,15 +4,15 @@ Page Manager | IMA.js - - + +

Page Manager

Page Manager is an essential part of IMA.js. It's something like a puppeteer that manipulates with pages and views. Once a router matches URL to one of route's path the page manager takes care of the rest.

Managing process

If the new matched route has onlyUpdate option set to true and the controller and view hasn't changed the route transition is dispatched only through update method of the controller.

In every other case the manager goes through it's full process:

  1. Unload previous controller and extensions - To make room for the new, manager has to get rid of the old controller and extensions. First calls deactivate method on every extension registered in the old controller and then the same method on the controller itself. Same process follows with destroy method.

  2. Clear state and unmount view - After unloading controller and extensions the page state is cleared and view (starting from ManagedRootView) is unmounted. However if the DocumentView, ViewAdapter and ManagedRootView are the same for the new route the view is cleared rather then unmounted. This way you can achieve component persistency.

  3. Loading new controller and extensions - After the manager is done with clearing previous resource it initializes the new ones. First the init method is called on controller then on every extension (Extensions may be initialized during the controllers init method call). -When the initialization is complete manager starts loading resources via load method of the controller and extensions. For detailed explanation see the load method documentation.

  4. Rendering new view - After the load method has been called a view for the controller is rendered. It doesn't matter if all promises returned by the load method have been resolved. The process of handling promises is described in the load method documentation. Following rendering process is described on a page Rendering process and View & Components.

Intervene into the process

It's possible for you to intervene into the process before it starts and after it finished. One way is to listen to BEFORE_HANDLE_ROUTE and AFTER_HANDLE_ROUTE dispatcher events. However from inside event listeners you cannot intercept or modify the process. For this purpose we've introduced PageManagerHandlers in v16

PageManagerHandlers

PageManagerHandler is a simple class that extends ima/page/handler/PageHandler. It can obtain dependencies through dependency injection. Each handler should contain 4 methods:

1. init() method

For purpose of initializing.

2. handlePreManagedState() method

This method is called before the page manager start taking any action. It receives 3 arguments managedPage, nextManagedPage and action. managedPage holds information about current page, nextManagedPage about following page. Each of the "managed page" arguments has following shape:

{
controller: ?(string|function(new: Controller)), // controller class
controllerInstance: ?Controller, // instantiated controller
decoratedController: ?Controller, // controller decorator created from controller instance
view: ?React.Component, // view class/component
viewInstance: ?React.Element, // instantiated view
route: ?Route, // matched route that leads to the controller
options: ?RouteOptions, // route options
params: ?Object<string, string>, // route parameters and their values
state: {
activated: boolean // if the page has been activated
}
}

and finally the action is an object describing what triggered the routing. If a PopStateEvent triggered the routing the action object will look like this: { type: 'popstate', event: PopStateEvent } otherwise the event property will contain MouseEvent (e.g. clicked on a link) and type property will have value 'redirect', 'click' or 'error'.

3. handlePostManagedState() method

This method is a counterpart to handlePreManagedState() method. It's called after page transition is finished. It receives similar arguments (managedPage, previousManagedPage and action). previousManagedPage holds information about previous page.

Note: handlePreManagedState() and handlePostManagedState() methods can interrupt transition process by throwing an error. The thrown error should be instance of GenericError with a status code specified. That way the router can handle thrown error accordingly.

4. destroy() method

For purpose of destructing

Registering PageManagerHandlers

PageManagerHandlers have their own registry PageHandlerRegistry. Every handler you create should be registered as a dependency of this registry.

// app/config/bind.js
import { PageHandlerRegistry, Window } from '@ima/core';
import MyOwnHandler from 'app/handler/MyOwnHandler';

export let init = (ns, oc, config) => {
// ...

if (oc.get(Window).isClient()) { // register different handlers for client and server
oc.inject(PageHandlerRegistry, [MyOwnHandler]);
} else {
oc.inject(PageHandlerRegistry, []);
}
};

Note: Handlers are executed in series and each one waits for the previous one to complete its task.

With introduction of PageManagerHandlers in v16 we've moved some functionality to predefined handler PageNavigationHandler. This handler takes care of saving scroll position, restoring scroll position and settings browser's address bar URL. You're free to extend it, override it or whatever else you want.

PageNavigationHandler is registered by default, but when you register your own handlers you need to specify PageNavigationHandler as well.

import { PageHandlerRegistry, PageNavigationHandler } from '@ima/core';
import MyOwnHandler from 'app/handler/MyOwnHandler';

export let init = (ns, oc, config) => {
// ...
oc.inject(PageHandlerRegistry, [PageNavigationHandler, MyOwnHandler]);
};
- - +When the initialization is complete manager starts loading resources via load method of the controller and extensions. For detailed explanation see the load method documentation.

  • Rendering new view - After the load method has been called a view for the controller is rendered. It doesn't matter if all promises returned by the load method have been resolved. The process of handling promises is described in the load method documentation. Following rendering process is described on a page Rendering process and View & Components.

  • Intervene into the process

    It's possible for you to intervene into the process before it starts and after it finished. One way is to listen to BEFORE_HANDLE_ROUTE and AFTER_HANDLE_ROUTE dispatcher events. However from inside event listeners you cannot intercept or modify the process. For this purpose we've introduced PageManagerHandlers in v16

    PageManagerHandlers

    PageManagerHandler is a simple class that extends ima/page/handler/PageHandler. It can obtain dependencies through dependency injection. Each handler should contain 4 methods:

    1. init() method

    For purpose of initializing.

    2. handlePreManagedState() method

    This method is called before the page manager start taking any action. It receives 3 arguments managedPage, nextManagedPage and action. managedPage holds information about current page, nextManagedPage about following page. Each of the "managed page" arguments has following shape:

    {
    controller: ?(string|function(new: Controller)), // controller class
    controllerInstance: ?Controller, // instantiated controller
    decoratedController: ?Controller, // controller decorator created from controller instance
    view: ?React.Component, // view class/component
    viewInstance: ?React.Element, // instantiated view
    route: ?Route, // matched route that leads to the controller
    options: ?RouteOptions, // route options
    params: ?Object<string, string>, // route parameters and their values
    state: {
    activated: boolean // if the page has been activated
    }
    }

    and finally the action is an object describing what triggered the routing. If a PopStateEvent triggered the routing the action object will look like this: { type: 'popstate', event: PopStateEvent } otherwise the event property will contain MouseEvent (e.g. clicked on a link) and type property will have value 'redirect', 'click' or 'error'.

    3. handlePostManagedState() method

    This method is a counterpart to handlePreManagedState() method. It's called after page transition is finished. It receives similar arguments (managedPage, previousManagedPage and action). previousManagedPage holds information about previous page.

    Note: handlePreManagedState() and handlePostManagedState() methods can interrupt transition process by throwing an error. The thrown error should be instance of GenericError with a status code specified. That way the router can handle thrown error accordingly.

    4. destroy() method

    For purpose of destructing

    Registering PageManagerHandlers

    PageManagerHandlers have their own registry PageHandlerRegistry. Every handler you create should be registered as a dependency of this registry.

    // app/config/bind.js
    import { PageHandlerRegistry, Window } from '@ima/core';
    import MyOwnHandler from 'app/handler/MyOwnHandler';

    export let init = (ns, oc, config) => {
    // ...

    if (oc.get(Window).isClient()) { // register different handlers for client and server
    oc.inject(PageHandlerRegistry, [MyOwnHandler]);
    } else {
    oc.inject(PageHandlerRegistry, []);
    }
    };

    Note: Handlers are executed in series and each one waits for the previous one to complete its task.

    With introduction of PageManagerHandlers in v16 we've moved some functionality to predefined handler PageNavigationHandler. This handler takes care of saving scroll position, restoring scroll position and settings browser's address bar URL. You're free to extend it, override it or whatever else you want.

    PageNavigationHandler is registered by default, but when you register your own handlers you need to specify PageNavigationHandler as well.

    import { PageHandlerRegistry, PageNavigationHandler } from '@ima/core';
    import MyOwnHandler from 'app/handler/MyOwnHandler';

    export let init = (ns, oc, config) => {
    // ...
    oc.inject(PageHandlerRegistry, [PageNavigationHandler, MyOwnHandler]);
    };
    + + \ No newline at end of file diff --git a/basic-features/page-state/index.html b/basic-features/page-state/index.html index 119a9f0333..bf8ef0fc98 100644 --- a/basic-features/page-state/index.html +++ b/basic-features/page-state/index.html @@ -4,8 +4,8 @@ Page State | IMA.js - - + +
    @@ -14,8 +14,8 @@ every setState call is queued and doesn't change the state or re-render anything. If there is another transaction initiated before you commit you'll lost your patches.

    If you want to see what changes are in queue from the begin of transaction call getTransactionStatePatches() method.

    To finish the transaction you have to call commitStateTransaction() method. It will squash all the patches made during the transaction into a one and apply it to the original state. -Therefore your application will re-render only once and you'll also receive state events only once.

    Another way to finish the transaction is to cancel it via cancelStateTransaction() method.

    Note: Call to getState method after the transaction has begun will return state as it was before the transaction eg. the returned state doesn't include changes from the transaction period until the transaction is committed.

    async onFormSubmit({ content, deleteRevisions = false }) {
    const { article } = this.getState();

    this.beginStateTransaction();

    const result = await this._http.put(/* ... */);

    if (deleteRevisions) {
    await this.deleteArticleRevisions();
    }

    this.setState({ article: Object.assign({}, article, { content }) });
    this.commitStateTransaction();
    }

    async deleteArticleRevisions() {
    const { article, revisions } = this.getState();

    await this._http.delete(/* ... */);

    this.setState({ revisions: [] });
    }

    In the example above, after the form is submitted with deleteRevisions = true:

    • Two setState calls are made
    • Only one render is triggered after the commitStateTransaction call
    - - +Therefore your application will re-render only once and you'll also receive state events only once.

    Another way to finish the transaction is to cancel it via cancelStateTransaction() method.

    Note: Call to getState method after the transaction has begun will return state as it was before the transaction eg. the returned state doesn't include changes from the transaction period until the transaction is committed.

    async onFormSubmit({ content, deleteRevisions = false }) {
    const { article } = this.getState();

    this.beginStateTransaction();

    const result = await this._http.put(/* ... */);

    if (deleteRevisions) {
    await this.deleteArticleRevisions();
    }

    this.setState({ article: Object.assign({}, article, { content }) });
    this.commitStateTransaction();
    }

    async deleteArticleRevisions() {
    const { article, revisions } = this.getState();

    await this._http.delete(/* ... */);

    this.setState({ revisions: [] });
    }

    In the example above, after the form is submitted with deleteRevisions = true:

    • Two setState calls are made
    • Only one render is triggered after the commitStateTransaction call
    + + \ No newline at end of file diff --git a/basic-features/rendering-process/index.html b/basic-features/rendering-process/index.html index 52230bd9f4..071d22200d 100644 --- a/basic-features/rendering-process/index.html +++ b/basic-features/rendering-process/index.html @@ -4,8 +4,8 @@ Rendering process | IMA.js - - + +
    @@ -49,8 +49,8 @@ https://www.kiwi.com/en/search/, https://airbnb.com/).

    // app/page/MapManagedRootView.js

    import { BlankManagedRootView } from '@ima/core';
    import PropTypes from 'prop-types';
    import React from 'react';
    import Map from 'app/component/map/Map';
    import MapResult from 'app/component/map/MapResult';

    export default class MapManagedRootView extends BlankManagedRootView {

    // ...

    render() {
    // Obtain search results and map settings from page state.
    const { searchResults, mapType } = this.props;

    return (
    <React.Fragment>
    {super.render()}
    <Map
    type = { mapType }
    centerOnResults = { true }>
    { searchResults.map(result => (
    <MapResult place = { result }/>
    ))}
    </Map>
    </React.Fragment>
    );
    }
    }

    Then the MapManagedRootView can be used in app/config/setting.js (property managedRootView) or in route options the same way as DocumentView or ViewAdapter.

    As you may have notices MapManagedRootView extends BlankManagedRootView which is also the default ManagedRootView when you don't specify your own. render() method of BlankManagedRootView simply renders View for current route with props containing current page state.

    Now when you know how a big part of the rendering process goes it's time to -have a look subsequent View and Component rendering.

    - - +have a look subsequent View and Component rendering.

    + + \ No newline at end of file diff --git a/basic-features/routing/async-routing/index.html b/basic-features/routing/async-routing/index.html index be4346ad02..b01f739f09 100644 --- a/basic-features/routing/async-routing/index.html +++ b/basic-features/routing/async-routing/index.html @@ -4,13 +4,13 @@ Async Routing | IMA.js - - + +
    -

    Async Routing

    Async routing allows you to split views and controllers into separate bundles and load them dynamically. This can be useful for some specific routes, that are not visited regularly and contain large amounts of unique code.

    To take advantage of this feature, you simply wrap your controller and view arguments into async function which calls a dynamic import():

    ./app/config/routes.js
    import { RouteNames } from '@ima/core';

    export let init = (ns, oc, config) => {
    const router = oc.get('$Router');

    router
    .add(
    'home',
    '/',
    async() => import('app/page/home/HomeController'),
    async() => import('app/page/home/HomeView')
    )
    }
    tip

    When using default exports, you don't have to explicitly set the import promise to the default export, the router does this by default.

    However when using named exports you need to let the router know, where is the controller/view located in the resolved promise:

    async() => import('app/page/home/HomeView').then(module => module.HomeView);

    Merging view and controller imports into one

    Since the method above produces 2 separate JS chunk files (can depend on the actual environment). If you have really small controller and view files, you can help webpack in creating only one small chunk file which usually loads faster.

    This can be done by exporting view and controller from the same file:

    ./app/page/home/index.js
    export { default as HomeView } from './HomeView';
    export { default as HomeController } from './HomeController';

    And then merging those two dynamic imports into one:

    ./app/config/routes.js
    import { RouteNames } from '@ima/core';

    const homeModules = async () => import('app/page/home');

    export let init = (ns, oc, config) => {
    const router = oc.get('$Router');

    router
    .add(
    'home',
    '/',
    async () => homeModules().then(module => module.HomeController),
    async () => homeModules().then(module => module.HomeView)
    )
    }

    Preloading routeHandlers

    Each route handler exposes preload() method, which can be used to programmatically trigger preload of the dynamic imports for specific route.

    tip

    Use this in situations when the browser is idle and you want to preload some specific route handlers that the user will probably go next. This speeds up the responsiveness of your application dramatically.

    To call the preload() method, you first need to get access to the Router instance (we can use useComponentUtils hook in this example) and then you can use getRouteHandler() method to get specific route handler instance. After that just call preload() on this handler:

    ./app/config/routes.js
    import { useComponentUtils } from '@ima/react-hooks';

    export default function Card() {
    const { $Router } = useComponentUtils();
    const homeRouteHandler = $Router.getRouteHandler('home');

    useEffect(() => {
    homeRouteHandler.preload();
    }, [])

    return (
    <a href={$Router.link('home')}>Home</a>
    );
    }

    The method returns a promise, which resolves to tuple of [controller, view] instances.

    Prefetching/Preloading modules

    As with the dynamic imports, you can also use webpack directives for prefetching and preloading. Simply use the inline commend as it is mentioned in the webpack documentation.

    ./app/config/routes.js
    // ...
    async() => import(/* webpackPrefetch: true */ 'app/page/home/HomeController'),
    async() => import(/* webpackPreload: true */ 'app/page/home/HomeView')
    // ...
    - - +

    Async Routing

    Async routing allows you to split views and controllers into separate bundles and load them dynamically. This can be useful for some specific routes, that are not visited regularly and contain large amounts of unique code.

    To take advantage of this feature, you simply wrap your controller and view arguments into async function which calls a dynamic import():

    ./app/config/routes.js
    import { RouteNames } from '@ima/core';

    export let init = (ns, oc, config) => {
    const router = oc.get('$Router');

    router
    .add(
    'home',
    '/',
    async() => import('app/page/home/HomeController'),
    async() => import('app/page/home/HomeView')
    )
    }
    tip

    When using default exports, you don't have to explicitly set the import promise to the default export, the router does this by default.

    However when using named exports you need to let the router know, where is the controller/view located in the resolved promise:

    async() => import('app/page/home/HomeView').then(module => module.HomeView);

    Merging view and controller imports into one

    Since the method above produces 2 separate JS chunk files (can depend on the actual environment). If you have really small controller and view files, you can help webpack in creating only one small chunk file which usually loads faster.

    This can be done by exporting view and controller from the same file:

    ./app/page/home/index.js
    export { default as HomeView } from './HomeView';
    export { default as HomeController } from './HomeController';

    And then merging those two dynamic imports into one:

    ./app/config/routes.js
    import { RouteNames } from '@ima/core';

    const homeModules = async () => import('app/page/home');

    export let init = (ns, oc, config) => {
    const router = oc.get('$Router');

    router
    .add(
    'home',
    '/',
    async () => homeModules().then(module => module.HomeController),
    async () => homeModules().then(module => module.HomeView)
    )
    }

    Preloading routeHandlers

    Each route handler exposes preload() method, which can be used to programmatically trigger preload of the dynamic imports for specific route.

    tip

    Use this in situations when the browser is idle and you want to preload some specific route handlers that the user will probably go next. This speeds up the responsiveness of your application dramatically.

    To call the preload() method, you first need to get access to the Router instance (we can use useComponentUtils hook in this example) and then you can use getRouteHandler() method to get specific route handler instance. After that just call preload() on this handler:

    ./app/config/routes.js
    import { useComponentUtils } from '@ima/react-hooks';

    export default function Card() {
    const { $Router } = useComponentUtils();
    const homeRouteHandler = $Router.getRouteHandler('home');

    useEffect(() => {
    homeRouteHandler.preload();
    }, [])

    return (
    <a href={$Router.link('home')}>Home</a>
    );
    }

    The method returns a promise, which resolves to tuple of [controller, view] instances.

    Prefetching/Preloading modules

    As with the dynamic imports, you can also use webpack directives for prefetching and preloading. Simply use the inline commend as it is mentioned in the webpack documentation.

    ./app/config/routes.js
    // ...
    async() => import(/* webpackPrefetch: true */ 'app/page/home/HomeController'),
    async() => import(/* webpackPreload: true */ 'app/page/home/HomeView')
    // ...
    + + \ No newline at end of file diff --git a/basic-features/routing/dynamic-routes/index.html b/basic-features/routing/dynamic-routes/index.html index 28b4f2bb86..b00004a3e6 100644 --- a/basic-features/routing/dynamic-routes/index.html +++ b/basic-features/routing/dynamic-routes/index.html @@ -4,13 +4,13 @@ Dynamic Routes | IMA.js - - + +
    -

    Dynamic Routes

    Dynamic routes allows you to take control of route matching, route parameters parsing and generation of router links.

    They are really powerful and can help you cover those edge cases that cannot be done using basic string route expressions.

    This can be achieved by defining custom route matcher in form of a regular expression and custom functions to parse router params from path and, the other way, from route params to path.

    note

    The power of dynamic routes comes at a cost. You have to be really sure to define your matchers and function overrides correctly, so you don't end up with false positive route matches. We advise to cover these matchers heavily with tests in order to prevent potential failures.

    Creating Dynamic Routes

    Dynamic routes can be created just like the regular (static routes). The only thing that's different is the pathExpression positional argument, which is now object with three properties: matcher, toPath and extractParameters.

    The following example parses /category/subcategory/post/124 url formats with optional categories, and extract them along with the post itemId:

    ./app/config/routes.js
    import { AbstractRoute } from '@ima/core';

    import PostController from 'app/page/post/PostController';
    import PostView from 'app/page/post/PostView';

    const POST_MATCHER = /([\w-]+)?\/?([\w-]+)?\/post\/(\d+)/i;

    export let init = (ns, oc, config) => {
    const router = oc.get('$Router');

    router.add(
    'post',
    {
    matcher: POST_MATCHER,
    extractParameters: (trimmedPath, ({ query, path })) => {
    const [match, category, subcategory, itemId] =
    POST_MATCHER.exec((trimmedPath)));

    return {
    category,
    subcategory,
    itemId,
    };
    },
    toPath: params => {
    const { category, subcategory, itemId, ...restParams } = params;
    const query = new URLSearchParams(restParams).toString();

    return [category, subcategory, itemId].filter(i => !!i).join('/') +
    (query ? `?${query}` : '');
    }
    },
    PostController,
    PostView
    );
    }
    info

    Notice that in the toPath function, we're appending other unused params to the final path as query params. This is to mimic the same functionality as the StaticRoutes provide by default.

    To make this process easier you can use the AbstractRoute.paramsToQuery() helper method, which filters and transforms object key-value pairs to query params string.

    matcher

    RegExp

    Regular expression used in route matching. The router tries to match path, stripped from trailing slashes, against this regular expression.

    extractParameters

    (trimmedPath: string, { query: RouteParams; path: string }) => RouteParams

    Function used to extract route params from given path. It receives path trimmed from trailing slashes and query params as first argument.

    For more control, you can use additional data in form of query and path which contain query params extracted from trimmed path and full path without any modifications.

    note

    When using StaticRoutes, query parameters are automatically merged with extracted route params. If you want to mimic this behavior, don't forget to merge query params into your final route params object.

    toPath

    (params: RouteParams) => string

    Function used to create path from given params (including query params). It is used mainly in the router link creation.

    note

    It is a good practice to append any unused params as query params to the path (you can use the static AbstractRoute.paramsToQuery() static helper to do that).

    - - +

    Dynamic Routes

    Dynamic routes allows you to take control of route matching, route parameters parsing and generation of router links.

    They are really powerful and can help you cover those edge cases that cannot be done using basic string route expressions.

    This can be achieved by defining custom route matcher in form of a regular expression and custom functions to parse router params from path and, the other way, from route params to path.

    note

    The power of dynamic routes comes at a cost. You have to be really sure to define your matchers and function overrides correctly, so you don't end up with false positive route matches. We advise to cover these matchers heavily with tests in order to prevent potential failures.

    Creating Dynamic Routes

    Dynamic routes can be created just like the regular (static routes). The only thing that's different is the pathExpression positional argument, which is now object with three properties: matcher, toPath and extractParameters.

    The following example parses /category/subcategory/post/124 url formats with optional categories, and extract them along with the post itemId:

    ./app/config/routes.js
    import { AbstractRoute } from '@ima/core';

    import PostController from 'app/page/post/PostController';
    import PostView from 'app/page/post/PostView';

    const POST_MATCHER = /([\w-]+)?\/?([\w-]+)?\/post\/(\d+)/i;

    export let init = (ns, oc, config) => {
    const router = oc.get('$Router');

    router.add(
    'post',
    {
    matcher: POST_MATCHER,
    extractParameters: (trimmedPath, ({ query, path })) => {
    const [match, category, subcategory, itemId] =
    POST_MATCHER.exec((trimmedPath)));

    return {
    category,
    subcategory,
    itemId,
    };
    },
    toPath: params => {
    const { category, subcategory, itemId, ...restParams } = params;
    const query = new URLSearchParams(restParams).toString();

    return [category, subcategory, itemId].filter(i => !!i).join('/') +
    (query ? `?${query}` : '');
    }
    },
    PostController,
    PostView
    );
    }
    info

    Notice that in the toPath function, we're appending other unused params to the final path as query params. This is to mimic the same functionality as the StaticRoutes provide by default.

    To make this process easier you can use the AbstractRoute.paramsToQuery() helper method, which filters and transforms object key-value pairs to query params string.

    matcher

    RegExp

    Regular expression used in route matching. The router tries to match path, stripped from trailing slashes, against this regular expression.

    extractParameters

    (trimmedPath: string, { query: RouteParams; path: string }) => RouteParams

    Function used to extract route params from given path. It receives path trimmed from trailing slashes and query params as first argument.

    For more control, you can use additional data in form of query and path which contain query params extracted from trimmed path and full path without any modifications.

    note

    When using StaticRoutes, query parameters are automatically merged with extracted route params. If you want to mimic this behavior, don't forget to merge query params into your final route params object.

    toPath

    (params: RouteParams) => string

    Function used to create path from given params (including query params). It is used mainly in the router link creation.

    note

    It is a good practice to append any unused params as query params to the path (you can use the static AbstractRoute.paramsToQuery() static helper to do that).

    + + \ No newline at end of file diff --git a/basic-features/routing/introduction/index.html b/basic-features/routing/introduction/index.html index 3f611e81f5..98d5c1df20 100644 --- a/basic-features/routing/introduction/index.html +++ b/basic-features/routing/introduction/index.html @@ -4,13 +4,13 @@ Introduction | IMA.js - - + +
    -

    Introduction

    Routing is an essential part of every application that displays multiple pages. It allows to develop each part of an application separately and add new parts instantly. As it happens to be in MVC frameworks, each route targets specific controller which takes control over what happens next after a route is matched.

    Setting up Router

    All routes in IMA.js are registered inside the init function in app/config/routes.js. Same init function can be found in app/config/bind.js. See Object Container documentation for more information about the oc.get() function.

    Usually you should be oke with simple string defined StaticRoutes (the ones defined below), but the router also has support for more advanced and powerful DynamicRoutes. For more information about these see the next section.

    ./app/config/routes.js
    import { RouteNames } from '@ima/core';

    import HomeController from 'app/page/home/HomeController';
    import HomeView from 'app/page/home/HomeView';

    export let init = (ns, oc, config) => {
    const router = oc.get('$Router');

    router
    .add('home', '/', HomeController, HomeView)
    .add(RouteNames.ERROR, '/error', ErrorController, ErrorView)
    .add(RouteNames.NOT_FOUND, '/not-found', NotFoundController, NotFoundView);
    }

    The router add method has following signature:

    add(name, pathExpression, controller, view, options = undefined);

    name

     string

    This argument represents unique route name. You can use this name when linking between routes or getting the route instance using getRouteHandler() method.

    pathExpression

    string | object

    This can be either object for dynamic routes or string representing route path. The pathExpression supports **parameter substitutions

    controller

    string | function

    Route assigned Controller class (can be a string alias, referring to the controller registered in the Object Container). It goes through its full lifecycle and renders the View.

    view

    string | function

    Route assigned View class (also can be a string alias, referring to the view registered in the Object Container). Rendered by the route controller.

    options

    object = undefined

    These are optional, however it accepts object with following properties and their respective defaults:

    {
    onlyUpdate: false,
    autoScroll: true,
    allowSPA: true,
    documentView: null,
    managedRootView: null,
    viewAdapter: null,
    middlewares: []
    }

    onlyUpdate

    boolean | function = false

    When only the parameters of the current route change an update method of the active controller will be invoked instead of re-instantiating the controller and view. The update method receives prevParams object containing - as the name suggests - previous route parameters.

    If you provide function to the onlyUpdate option; it receives 2 arguments (instances of previous controller and view) and it should return boolean.

    autoScroll

    boolean = true

    Determines whether the page should be scrolled to the top when the navigation occurs.

    allowSPA

    boolean = true

    Can be used to make the route to be always served from the server and never using the SPA (when disabled) even if the server is overloaded.

    This is useful for routes that use different document views (specified by the documentView option), for example for rendering the content of iframes.

    documentView

    AbstractDocumentView = null

    Custom DocumentView, should extend the AbstractDocumentView from @ima/core.

    managedRootView

    function = null

    Custom ManagedRootView component, for more information see rendering process.

    viewAdapter

    function = null

    Custom ViewAdapter component, for more information see rendering process.

    middlewares

    function[] = []

    Array of route-specific middlewares. See the middlewares section for more information.

    Route params substitutions

    The parameter name can contain only letters a-zA-Z, numbers 0-9, underscores _ and hyphens - and is preceded by colon :.

    router.add(
    'order-detail',
    '/user/:userId/orders/:orderId',
    OrderController,
    OrderView
    );

    The userId and orderId parameters are then accessible in OrderController via this.params:

    import { AbstractController } from '@ima/core';

    class OrderController extends AbstractController {
    load() {
    const userPromise = this._userService.get(this.params.userId);
    const orderPromise = this._orderService.get(this.params.orderId);

    return {
    user: userPromise,
    order: orderPromise
    }
    }
    }

    Optional parameters

    Parameters can also be marked as optional by placing question mark ? after the colon :.

    router.add(
    'user-detail',
    '/profile/:?userId',
    UserController,
    UserView
    );
    caution

    Optional parameters can be placed only after the last slash. Doing otherwise can cause unexpected behavior.

    Linking between routes

    URLs to routes can be generated via the Router.link() public method. These can be then used in ordinary anchor tags and IMA.js makes sure, to handle the site routing in SPA mode, rather than doing redirect/reload of the whole page.

    import { AbstractComponent } from '@ima/react-page-renderer';

    class OrderView extends AbstractComponent {
    render() {
    const { user, order } = this.props;

    const orderLink = this.link('order-detail', {
    userId: user.id,
    orderId: order.id
    });

    return <a href={orderLink}>View order</a>
    }
    }

    This is done by listening to window popstate and click events and reacting accordingly (in the listen method of ClientRouter, which is called by IMA.js on client during app init). If the handled URL is not valid registered app route, it is handled normally (e.g you are redirected to the target URL).

    tip

    You can use this.link helper method in IMA.js abstract component or the useLink hook from the @ima/react-hooks plugin in your components and views to generate router links.

    note

    Under the hood, this.link() is only alias for this.utils.$Router.link, where this.utils is taken from this.context.$Utils.

    For more information about this.utils and $Utils objects, take a look at the React Context in the documentation.

    Linking in Controllers, Extensions, Helpers and other Object Container classes requires you to import Router using dependency injection. To do that you can either use Router class in the dependency array, or $Router string alias:

    import { AbstractController } from '@ima/core';

    export default class DetailController extends AbstractController {
    static get $dependencies() {
    return ['$Router'];
    }

    constructor(router) {
    this._router = router;
    }

    load() {
    // ...
    }
    }

    Then you get Router instance as the constructor's first argument, which gives you access to it's link public method (and many others), that you can use to generate your desired route URL:

    load() {
    const detailLink = this._router.link('order-detail', {
    userId: user.id,
    orderId: order.id
    });

    return { detailLink };
    }

    Error and NotFound route names

    There are two special route names that @ima/core exports: RouteNames.ERROR, RouteNames.NOT_FOUND. You can use these constants to provide custom views and controllers for error handling pages.

    ./app/config/routes.js
    import { RouteNames } from '@ima/core';

    import { ErrorController, ErrorView } from 'app/page/error';
    import { NotFoundController, NotFoundView } from 'app/page/not-found';

    export let init = (ns, oc, config) => {
    const router = oc.get('$Router');

    router
    .add('home', '/', HomeController, HomeView)
    .add(RouteNames.ERROR, '/error', ErrorController, ErrorView)
    .add(RouteNames.NOT_FOUND, '/not-found', NotFoundController, NotFoundView);
    }

    Redirects

    In addition to the link method mentioned above (which handles URL generation for given routes), you can use Router.redirect() method to redirect directly to the targeted URL.

    This URL can be either existing app route or external URL. As with links, in this case you also get SPA routing, in case of redirection to different IMA.js app route.

    import { AbstractController, Router } from '@ima/core';

    export default class DetailController extends AbstractController {
    static get $dependencies() {
    return [
    Router // We're using class descriptor in this case for DI
    ];
    }

    constructor(router) {
    this._router = router;
    }

    init() {
    this._router.redirect(
    this._router.link('order-detail', {
    userId: user.id,
    orderId: order.id
    });
    );
    }
    }
    info

    On client side, redirections are handled by simply changing the window.location.href, while on server you're using the express native res.redirect method.

    Method signature

    The redirect method has following signature, while the options object is available only on server side:

    redirect(
    url = '',
    options = {} // Available only on server side
    )

    url

    string

    Target redirect URL.

    options

    object = {}

    Additional options, used to customize redirect server response.

    {
    httpStatus: 302,
    headers: undefined,
    }

    httpStatus

    number = 302

    Custom redirect http status code.

    headers

    object = undefined

    Custom response headers.

    - - +

    Introduction

    Routing is an essential part of every application that displays multiple pages. It allows to develop each part of an application separately and add new parts instantly. As it happens to be in MVC frameworks, each route targets specific controller which takes control over what happens next after a route is matched.

    Setting up Router

    All routes in IMA.js are registered inside the init function in app/config/routes.js. Same init function can be found in app/config/bind.js. See Object Container documentation for more information about the oc.get() function.

    Usually you should be oke with simple string defined StaticRoutes (the ones defined below), but the router also has support for more advanced and powerful DynamicRoutes. For more information about these see the next section.

    ./app/config/routes.js
    import { RouteNames } from '@ima/core';

    import HomeController from 'app/page/home/HomeController';
    import HomeView from 'app/page/home/HomeView';

    export let init = (ns, oc, config) => {
    const router = oc.get('$Router');

    router
    .add('home', '/', HomeController, HomeView)
    .add(RouteNames.ERROR, '/error', ErrorController, ErrorView)
    .add(RouteNames.NOT_FOUND, '/not-found', NotFoundController, NotFoundView);
    }

    The router add method has following signature:

    add(name, pathExpression, controller, view, options = undefined);

    name

     string

    This argument represents unique route name. You can use this name when linking between routes or getting the route instance using getRouteHandler() method.

    pathExpression

    string | object

    This can be either object for dynamic routes or string representing route path. The pathExpression supports **parameter substitutions

    controller

    string | function

    Route assigned Controller class (can be a string alias, referring to the controller registered in the Object Container). It goes through its full lifecycle and renders the View.

    view

    string | function

    Route assigned View class (also can be a string alias, referring to the view registered in the Object Container). Rendered by the route controller.

    options

    object = undefined

    These are optional, however it accepts object with following properties and their respective defaults:

    {
    onlyUpdate: false,
    autoScroll: true,
    allowSPA: true,
    documentView: null,
    managedRootView: null,
    viewAdapter: null,
    middlewares: []
    }

    onlyUpdate

    boolean | function = false

    When only the parameters of the current route change an update method of the active controller will be invoked instead of re-instantiating the controller and view. The update method receives prevParams object containing - as the name suggests - previous route parameters.

    If you provide function to the onlyUpdate option; it receives 2 arguments (instances of previous controller and view) and it should return boolean.

    autoScroll

    boolean = true

    Determines whether the page should be scrolled to the top when the navigation occurs.

    allowSPA

    boolean = true

    Can be used to make the route to be always served from the server and never using the SPA (when disabled) even if the server is overloaded.

    This is useful for routes that use different document views (specified by the documentView option), for example for rendering the content of iframes.

    documentView

    AbstractDocumentView = null

    Custom DocumentView, should extend the AbstractDocumentView from @ima/core.

    managedRootView

    function = null

    Custom ManagedRootView component, for more information see rendering process.

    viewAdapter

    function = null

    Custom ViewAdapter component, for more information see rendering process.

    middlewares

    function[] = []

    Array of route-specific middlewares. See the middlewares section for more information.

    Route params substitutions

    The parameter name can contain only letters a-zA-Z, numbers 0-9, underscores _ and hyphens - and is preceded by colon :.

    router.add(
    'order-detail',
    '/user/:userId/orders/:orderId',
    OrderController,
    OrderView
    );

    The userId and orderId parameters are then accessible in OrderController via this.params:

    import { AbstractController } from '@ima/core';

    class OrderController extends AbstractController {
    load() {
    const userPromise = this._userService.get(this.params.userId);
    const orderPromise = this._orderService.get(this.params.orderId);

    return {
    user: userPromise,
    order: orderPromise
    }
    }
    }

    Optional parameters

    Parameters can also be marked as optional by placing question mark ? after the colon :.

    router.add(
    'user-detail',
    '/profile/:?userId',
    UserController,
    UserView
    );
    caution

    Optional parameters can be placed only after the last slash. Doing otherwise can cause unexpected behavior.

    Linking between routes

    URLs to routes can be generated via the Router.link() public method. These can be then used in ordinary anchor tags and IMA.js makes sure, to handle the site routing in SPA mode, rather than doing redirect/reload of the whole page.

    import { AbstractComponent } from '@ima/react-page-renderer';

    class OrderView extends AbstractComponent {
    render() {
    const { user, order } = this.props;

    const orderLink = this.link('order-detail', {
    userId: user.id,
    orderId: order.id
    });

    return <a href={orderLink}>View order</a>
    }
    }

    This is done by listening to window popstate and click events and reacting accordingly (in the listen method of ClientRouter, which is called by IMA.js on client during app init). If the handled URL is not valid registered app route, it is handled normally (e.g you are redirected to the target URL).

    tip

    You can use this.link helper method in IMA.js abstract component or the useLink hook from the @ima/react-hooks plugin in your components and views to generate router links.

    note

    Under the hood, this.link() is only alias for this.utils.$Router.link, where this.utils is taken from this.context.$Utils.

    For more information about this.utils and $Utils objects, take a look at the React Context in the documentation.

    Linking in Controllers, Extensions, Helpers and other Object Container classes requires you to import Router using dependency injection. To do that you can either use Router class in the dependency array, or $Router string alias:

    import { AbstractController } from '@ima/core';

    export default class DetailController extends AbstractController {
    static get $dependencies() {
    return ['$Router'];
    }

    constructor(router) {
    this._router = router;
    }

    load() {
    // ...
    }
    }

    Then you get Router instance as the constructor's first argument, which gives you access to it's link public method (and many others), that you can use to generate your desired route URL:

    load() {
    const detailLink = this._router.link('order-detail', {
    userId: user.id,
    orderId: order.id
    });

    return { detailLink };
    }

    Error and NotFound route names

    There are two special route names that @ima/core exports: RouteNames.ERROR, RouteNames.NOT_FOUND. You can use these constants to provide custom views and controllers for error handling pages.

    ./app/config/routes.js
    import { RouteNames } from '@ima/core';

    import { ErrorController, ErrorView } from 'app/page/error';
    import { NotFoundController, NotFoundView } from 'app/page/not-found';

    export let init = (ns, oc, config) => {
    const router = oc.get('$Router');

    router
    .add('home', '/', HomeController, HomeView)
    .add(RouteNames.ERROR, '/error', ErrorController, ErrorView)
    .add(RouteNames.NOT_FOUND, '/not-found', NotFoundController, NotFoundView);
    }

    Redirects

    In addition to the link method mentioned above (which handles URL generation for given routes), you can use Router.redirect() method to redirect directly to the targeted URL.

    This URL can be either existing app route or external URL. As with links, in this case you also get SPA routing, in case of redirection to different IMA.js app route.

    import { AbstractController, Router } from '@ima/core';

    export default class DetailController extends AbstractController {
    static get $dependencies() {
    return [
    Router // We're using class descriptor in this case for DI
    ];
    }

    constructor(router) {
    this._router = router;
    }

    init() {
    this._router.redirect(
    this._router.link('order-detail', {
    userId: user.id,
    orderId: order.id
    });
    );
    }
    }
    info

    On client side, redirections are handled by simply changing the window.location.href, while on server you're using the express native res.redirect method.

    Method signature

    The redirect method has following signature, while the options object is available only on server side:

    redirect(
    url = '',
    options = {} // Available only on server side
    )

    url

    string

    Target redirect URL.

    options

    object = {}

    Additional options, used to customize redirect server response.

    {
    httpStatus: 302,
    headers: undefined,
    }

    httpStatus

    number = 302

    Custom redirect http status code.

    headers

    object = undefined

    Custom response headers.

    + + \ No newline at end of file diff --git a/basic-features/routing/middlewares/index.html b/basic-features/routing/middlewares/index.html index f03bf888d9..4ea73662bd 100644 --- a/basic-features/routing/middlewares/index.html +++ b/basic-features/routing/middlewares/index.html @@ -4,13 +4,13 @@ Middlewares | IMA.js - - + +
    -

    Middlewares

    Middlewares are simple functions that run before/after route handlers. They can be used to restrict access to certain set of routes or act based on parsed route params.

    There are two types of middleware global and local. As the names suggest the first one is defined globally on the router instance using use() method and the second type is bound to specific route and is defined in the route options.middlewares property.

    ./app/config/routes.js
    // The imports are stripped for compactness.
    export let init = (ns, oc, config) => {
    const router = oc.get('$Router');

    router
    .use(async (params, locals) => {
    console.log('Global middleware', params, locals, locals.route, locals.action);
    locals.counter = 0;
    });
    .add('home', '/', HomeController, HomeView, {
    middlewares: [
    async (params, locals, next) => {
    next({ counter: counter++ });
    }
    ]
    })
    .add(RouteNames.ERROR, '/error', ErrorController, ErrorView)
    .add(RouteNames.NOT_FOUND, '/not-found', NotFoundController, NotFoundView);
    }
    tip

    Since you have access to the object container (oc), you can basically do anything you want in the middlewares.

    You can easily define authentication middlewares or access-restricting middlewares since throwing an error from the middleware is handled the same way as any other error in the application.

    Function arguments

    Each middleware can be async and the functions can use up to three arguments: params, locals and next. params specifically allows you to modify route params, locals is used to pass data between middlewares and next callback provides additional

    params

    object = {}

    Contains route params extracted by the currently matched route handler. Can be empty if there was no route match before execution of concrete middleware.

    locals

    RouteLocals = {}

    Mutable object you can use to pass data between middlewares. It is passed across all middlewares, so anything you define here, is available in following middleware functions.

    tip

    In addition to mutating the original object, you can also return object values from middlewares or pass them as an argument in the next() function. These are then merged into the locals upon it's execution.

    async (params, locals) => {
    locals.counter++;
    }

    // or

    async (params, locals) => {
    return { counter: counter++ };
    }

    // or

    async (params, locals, next) => {
    next({ counter: counter++ });
    }

    Additionally it always contains following keys:

    route

    AbstractRoute

    Instance of currently matched route.

    action

    RouteAction = {}

    An action object describing what triggered this routing (can be empty).

    next

    (result?: object) => void

    When called, this function (as the name suggest) allows you to continue with execution of other route handlers. Apart from other frameworks that use similar feature, when you define next argument in your middleware, you have to execute it in order to continue. Otherwise the router will not proceed any further even if the middleware function content finished it's execution.

    This is intentional as it allows you to have more control over the middleware execution and gives you ability to stop the routing process completely.

    tip

    This is can be usefull in situations when for example you want to do a redirect, which is synchronous but takes a while until the window is reloaded. Without stopping the middleware execution (by defining the next callback and not calling it), you could get a glimpse of Error Page that is rendered before the redirect takes places, because the router continued it's processing.

    async (params, locals, next) => {
    if (await oc.get('User').isLoggedIn()) {
    // Continue normally
    return next();
    }

    // Stop execution by not calling `next()` and do a redirect
    oc.get('$Router').redirect('/');
    }

    Execution order

    Middleware functions are resolved from top to bottom sequentially. In case of the code above, when routing to home route, following things would have happened:

    1. Global middlewares defined above currently matched route are executed (in this case we have only one global middleware, defined above all routes).
    2. Params extraction from currently matched route handler (home) is executed.
    3. Local route middlewares are executed (with newly extracted route params).

    In case of an error or not found page, the execution order is still the same, meaning the global and route middlewares are executed as with any other route.

    caution

    There's only one exception, since the locals object is cleared to an empty object before route handling, if an error occurs during route handling and execution is internally passed to error handling (displaying error page), the locals object may retain values that were there for the previous route matching. However the locals.route object will still be up to date and equal to currently routed route (error in this case).

    Execution timeout

    To prevent middlewares from freezing the application, for example when the middlewares takes too long to execute, we've implemented execution timeout, which prevents them from running indefinitely.

    You can customize the timeout value in app settings:

    ./app/config/settings.js
    export default (ns, oc, config) => {
    return {
    prod: {
    $Router: {
    middlewareTimeout: 30000, // ms
    },
    },
    };
    };
    - - +

    Middlewares

    Middlewares are simple functions that run before/after route handlers. They can be used to restrict access to certain set of routes or act based on parsed route params.

    There are two types of middleware global and local. As the names suggest the first one is defined globally on the router instance using use() method and the second type is bound to specific route and is defined in the route options.middlewares property.

    ./app/config/routes.js
    // The imports are stripped for compactness.
    export let init = (ns, oc, config) => {
    const router = oc.get('$Router');

    router
    .use(async (params, locals) => {
    console.log('Global middleware', params, locals, locals.route, locals.action);
    locals.counter = 0;
    });
    .add('home', '/', HomeController, HomeView, {
    middlewares: [
    async (params, locals, next) => {
    next({ counter: counter++ });
    }
    ]
    })
    .add(RouteNames.ERROR, '/error', ErrorController, ErrorView)
    .add(RouteNames.NOT_FOUND, '/not-found', NotFoundController, NotFoundView);
    }
    tip

    Since you have access to the object container (oc), you can basically do anything you want in the middlewares.

    You can easily define authentication middlewares or access-restricting middlewares since throwing an error from the middleware is handled the same way as any other error in the application.

    Function arguments

    Each middleware can be async and the functions can use up to three arguments: params, locals and next. params specifically allows you to modify route params, locals is used to pass data between middlewares and next callback provides additional

    params

    object = {}

    Contains route params extracted by the currently matched route handler. Can be empty if there was no route match before execution of concrete middleware.

    locals

    RouteLocals = {}

    Mutable object you can use to pass data between middlewares. It is passed across all middlewares, so anything you define here, is available in following middleware functions.

    tip

    In addition to mutating the original object, you can also return object values from middlewares or pass them as an argument in the next() function. These are then merged into the locals upon it's execution.

    async (params, locals) => {
    locals.counter++;
    }

    // or

    async (params, locals) => {
    return { counter: counter++ };
    }

    // or

    async (params, locals, next) => {
    next({ counter: counter++ });
    }

    Additionally it always contains following keys:

    route

    AbstractRoute

    Instance of currently matched route.

    action

    RouteAction = {}

    An action object describing what triggered this routing (can be empty).

    next

    (result?: object) => void

    When called, this function (as the name suggest) allows you to continue with execution of other route handlers. Apart from other frameworks that use similar feature, when you define next argument in your middleware, you have to execute it in order to continue. Otherwise the router will not proceed any further even if the middleware function content finished it's execution.

    This is intentional as it allows you to have more control over the middleware execution and gives you ability to stop the routing process completely.

    tip

    This is can be usefull in situations when for example you want to do a redirect, which is synchronous but takes a while until the window is reloaded. Without stopping the middleware execution (by defining the next callback and not calling it), you could get a glimpse of Error Page that is rendered before the redirect takes places, because the router continued it's processing.

    async (params, locals, next) => {
    if (await oc.get('User').isLoggedIn()) {
    // Continue normally
    return next();
    }

    // Stop execution by not calling `next()` and do a redirect
    oc.get('$Router').redirect('/');
    }

    Execution order

    Middleware functions are resolved from top to bottom sequentially. In case of the code above, when routing to home route, following things would have happened:

    1. Global middlewares defined above currently matched route are executed (in this case we have only one global middleware, defined above all routes).
    2. Params extraction from currently matched route handler (home) is executed.
    3. Local route middlewares are executed (with newly extracted route params).

    In case of an error or not found page, the execution order is still the same, meaning the global and route middlewares are executed as with any other route.

    caution

    There's only one exception, since the locals object is cleared to an empty object before route handling, if an error occurs during route handling and execution is internally passed to error handling (displaying error page), the locals object may retain values that were there for the previous route matching. However the locals.route object will still be up to date and equal to currently routed route (error in this case).

    Execution timeout

    To prevent middlewares from freezing the application, for example when the middlewares takes too long to execute, we've implemented execution timeout, which prevents them from running indefinitely.

    You can customize the timeout value in app settings:

    ./app/config/settings.js
    export default (ns, oc, config) => {
    return {
    prod: {
    $Router: {
    middlewareTimeout: 30000, // ms
    },
    },
    };
    };
    + + \ No newline at end of file diff --git a/basic-features/seo-and-meta-manager/index.html b/basic-features/seo-and-meta-manager/index.html index 0bba8a5778..4aa8893f1c 100644 --- a/basic-features/seo-and-meta-manager/index.html +++ b/basic-features/seo-and-meta-manager/index.html @@ -4,8 +4,8 @@ SEO & Meta Manager | IMA.js - - + +
    @@ -13,8 +13,8 @@ probably come along the setMetaParams method. This method is dedicated to set meta information for a specific page and you are provided with everything you need (current state, MetaManager, -router, dictionary and settings).

    Meta manager offers many methods to work with document meta data. From #{meta} content variable, to methods for managing title and other meta tags collections.

    Managing meta tags

    As mentioned above, all meta management is done in setMetaParams method in route controller. Using metaManager and provied setters for title, meta name, meta properties and link collections, you can manage contents of your meta tags easily with the help of additional arguments that provide everything you need (current state, MetaManager, router, dictionary and settings).

    ./app/page/order/OrderController.js
    setMetaParams(loadedResources, metaManager, router, dictionary, settings) {
    const { order } = loadedResources;

    metaManager.setTitle(`Order #${order.id} - ${settings.general.appTitle}`);
    metaManager.setMetaName(
    'description',
    'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
    );

    metaManager.setMetaProperty('og:image', order.thumbnailUrl);

    const orderDetailLink = router.link('order-detail', {
    orderId: order.id
    });

    metaManager.setLink('canonical', orderDetailLink);
    }
    info

    undefined and null values are filtered out when rendering meta tags. If you still want to render meta tags with empty values, use empty strings ''.

    setTitle()

    (title: string) => MetaManager

    Use to set document title.

    setMetaName()

    (name: string, content: MetaValue, attr?: MetaAttributes) => MetaManager

    Sets the information to be used in <meta name="..." content="..." />.

    setMetaProperty()

    (name: string, property: MetaValue, attr?: MetaAttributes) => MetaManager

    These methods are similar to the two above except that these are used for <meta property="..." content="..." />.

    (relation: string, href: MetaValue, attr?: MetaAttributes) => MetaManager

    Adds information to the MetaManager to be later used in <link rel="..." href="..." /> tag.

    tip

    All 3 methods defined above also supports additional optional attributes. This is an object of key-value pairs representing additional meta tag attributes that are used in certain situations.


    metaManager.setMetaProperty('og:image', order.thumbnailUrl, {
    size: 'large',
    authorUrl: 'https://mysite.com'
    });

    Meta value getters

    Each setter has corresponding getter returning and object with key-value pairs representing the meta tag values. Additionally you can use key and value iterator methods.

    • getTitle()
    • getMetaName(), getMetaNames(), getMetaNamesIterator()
    • getMetaProperty(), setMetaProperties(), setMetaPropertiesIterator()
    • getLink(), getLinks(), getLinksIterator()
    tip

    Since the getter methods return object with key-value attributes where their names correspond to the html tag attribute name, you can use following shortcuts to render (these include optional attributes):

    <meta
    property="og:image"
    {...this.props.metaManager.getMetaProperty('og:image')}
    />
    <meta
    link="canonical"
    {...this.props.metaManager.getLink('canonical')}
    />

    Rendering meta tags

    Meta tags are handled differently on server an client, see following sections for more information on this matter.

    Rendering on server using the #{meta} content variable

    While you can manually render meta tags in the document view using metaManger and any of the provided getter methods or iterators, we also render these tags automatically into #{meta} content variable.

    You can then use this content variable in DocumentView to easily render whole meta collection (including document title) matching meta information set for current controller in setMetaParams method.

    ./app/document/DocumentView.jsx
    <head>
    {'#{meta}'}
    {'#{styles}'}
    {'#{revivalSettings}'}
    {'#{runner}'}
    </head>
    note

    While you can also use this content variable in spa.ejs, it will always be empty, since client rendering is handled separately. See the next section for more information.

    Rendering on client using PageMetaHandler

    You may have noticed that the server-side rendered meta tags have data-ima-meta data attribute. This serves as an identification for meta tags that are handled by IMA.js (both on server and client). These also correspond to the values you have set using metaManager setters.

    <meta data-ima-meta name="twitter:title" content="IMA.js">

    While navigating between pages in SPA, the meta tags are updated automatically using PageMetaHandler. This manager always removes old meta tags identified by the data attribute, before rendering new ones. And since metaManager clears it's meta collection between routes, this means that each page renders only those tags that are set in metaManager in current page controller using setMetaParams method.

    Global meta tags

    Now that you know how IMA.js handles meta tag updates between routes, you may ask yourself a question "how to handle global meta tags like viewport, charset etc.?"

    The solution is pretty simple - just define them in DocumentView and spa.ejs templates, tags that don't have data-ima-meta attribute are not touched at all by the PageMetaHandler.

    ./app/document/DocumentView.jsx
    <head>
    <meta charSet='utf-8' />
    <meta httpEquiv='X-UA-Compatible' content='IE=edge' />
    <meta name='viewport' content='width=device-width, initial-scale=1' />
    </head>

    Alternative solution is to always set these values in every page controller you have. For this you can use helpers or create custom AbstractController.

    - - +router, dictionary and settings).

    Meta manager offers many methods to work with document meta data. From #{meta} content variable, to methods for managing title and other meta tags collections.

    Managing meta tags

    As mentioned above, all meta management is done in setMetaParams method in route controller. Using metaManager and provied setters for title, meta name, meta properties and link collections, you can manage contents of your meta tags easily with the help of additional arguments that provide everything you need (current state, MetaManager, router, dictionary and settings).

    ./app/page/order/OrderController.js
    setMetaParams(loadedResources, metaManager, router, dictionary, settings) {
    const { order } = loadedResources;

    metaManager.setTitle(`Order #${order.id} - ${settings.general.appTitle}`);
    metaManager.setMetaName(
    'description',
    'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
    );

    metaManager.setMetaProperty('og:image', order.thumbnailUrl);

    const orderDetailLink = router.link('order-detail', {
    orderId: order.id
    });

    metaManager.setLink('canonical', orderDetailLink);
    }
    info

    undefined and null values are filtered out when rendering meta tags. If you still want to render meta tags with empty values, use empty strings ''.

    setTitle()

    (title: string) => MetaManager

    Use to set document title.

    setMetaName()

    (name: string, content: MetaValue, attr?: MetaAttributes) => MetaManager

    Sets the information to be used in <meta name="..." content="..." />.

    setMetaProperty()

    (name: string, property: MetaValue, attr?: MetaAttributes) => MetaManager

    These methods are similar to the two above except that these are used for <meta property="..." content="..." />.

    (relation: string, href: MetaValue, attr?: MetaAttributes) => MetaManager

    Adds information to the MetaManager to be later used in <link rel="..." href="..." /> tag.

    tip

    All 3 methods defined above also supports additional optional attributes. This is an object of key-value pairs representing additional meta tag attributes that are used in certain situations.


    metaManager.setMetaProperty('og:image', order.thumbnailUrl, {
    size: 'large',
    authorUrl: 'https://mysite.com'
    });

    Meta value getters

    Each setter has corresponding getter returning and object with key-value pairs representing the meta tag values. Additionally you can use key and value iterator methods.

    • getTitle()
    • getMetaName(), getMetaNames(), getMetaNamesIterator()
    • getMetaProperty(), setMetaProperties(), setMetaPropertiesIterator()
    • getLink(), getLinks(), getLinksIterator()
    tip

    Since the getter methods return object with key-value attributes where their names correspond to the html tag attribute name, you can use following shortcuts to render (these include optional attributes):

    <meta
    property="og:image"
    {...this.props.metaManager.getMetaProperty('og:image')}
    />
    <meta
    link="canonical"
    {...this.props.metaManager.getLink('canonical')}
    />

    Rendering meta tags

    Meta tags are handled differently on server an client, see following sections for more information on this matter.

    Rendering on server using the #{meta} content variable

    While you can manually render meta tags in the document view using metaManger and any of the provided getter methods or iterators, we also render these tags automatically into #{meta} content variable.

    You can then use this content variable in DocumentView to easily render whole meta collection (including document title) matching meta information set for current controller in setMetaParams method.

    ./app/document/DocumentView.jsx
    <head>
    {'#{meta}'}
    {'#{styles}'}
    {'#{revivalSettings}'}
    {'#{runner}'}
    </head>
    note

    While you can also use this content variable in spa.ejs, it will always be empty, since client rendering is handled separately. See the next section for more information.

    Rendering on client using PageMetaHandler

    You may have noticed that the server-side rendered meta tags have data-ima-meta data attribute. This serves as an identification for meta tags that are handled by IMA.js (both on server and client). These also correspond to the values you have set using metaManager setters.

    <meta data-ima-meta name="twitter:title" content="IMA.js">

    While navigating between pages in SPA, the meta tags are updated automatically using PageMetaHandler. This manager always removes old meta tags identified by the data attribute, before rendering new ones. And since metaManager clears it's meta collection between routes, this means that each page renders only those tags that are set in metaManager in current page controller using setMetaParams method.

    Global meta tags

    Now that you know how IMA.js handles meta tag updates between routes, you may ask yourself a question "how to handle global meta tags like viewport, charset etc.?"

    The solution is pretty simple - just define them in DocumentView and spa.ejs templates, tags that don't have data-ima-meta attribute are not touched at all by the PageMetaHandler.

    ./app/document/DocumentView.jsx
    <head>
    <meta charSet='utf-8' />
    <meta httpEquiv='X-UA-Compatible' content='IE=edge' />
    <meta name='viewport' content='width=device-width, initial-scale=1' />
    </head>

    Alternative solution is to always set these values in every page controller you have. For this you can use helpers or create custom AbstractController.

    + + \ No newline at end of file diff --git a/basic-features/testing/index.html b/basic-features/testing/index.html index 717546cca7..868af25ac3 100644 --- a/basic-features/testing/index.html +++ b/basic-features/testing/index.html @@ -4,13 +4,13 @@ Testing | IMA.js - - + +
    -

    Testing

    The @ima/testing-library contains utilities for testing IMA.js applications. It provides integration with Jest, React Testing Library and Testing Library Jest DOM. If you initialized your project via create-ima-app, the testing setup is already included in your project. If not, check @ima/testing-library README for more information about how to setup testing in your project.

    API

    IMA Testing Library is re-exporting everything from @testing-library/react. You should always import React Testing Library functions from @ima/testing-library as we might add some additional functionality / wrappers in the future. As such, it provides the same API as @testing-library/react with some additional features.

    renderWithContext

    async function renderWithContext(
    ui: ReactElement,
    options?: RenderOptions & { contextValue?: ContextValue; app?: ImaApp }
    ): Promise<ReturnType<typeof render> & { app: ImaApp | null; contextValue: ContextValue; }>

    renderWithContext is a wrapper around render from @testing-library/react. It sets wrapper option in render method to a real IMA.js context wrapper. It can take additional optional IMA specific options:

    • contextValue - the result of getContextValue
    • app - the result of initImaApp (if you provide contextValue, it does not make any sense to provide app as the app is only used to generate the contextValue)

    If any of the options is not provided, it will be generated automatically.

    Example usage:

    import { useLocalize } from '@ima/react-page-renderer';
    import { renderWithContext } from '@ima/testing-library';

    function Component({ children }) {
    const localize = useLocalize(); // Get localize function from IMA.js context

    return <div>{localize('my.translation.key')} {children}</div>;
    }

    test('renders component with localized string', async () => {
    const { getByText } = await renderWithContext(<Component>My Text</Component>);
    const textElement = getByText(/My Text/i);

    expect(textElement).toBeInTheDocument();
    });

    If you had used render from @testing-library/react directly, the test would have failed because the useLocalize hook would be missing the context. The renderWithContext function provides the necessary context and making it easier to test components that depend on the IMA.js context.

    getContextValue

    async function getContextValue(app?: ImaApp): Promise<ContextValue>

    getContextValue is a helper function that returns the context value from the IMA.js app. It can take an optional app parameter, which is the result of initImaApp.

    Example usage:

    test('renders component with custom context value', async () => {
    const contextValue = await getContextValue(); // Generate default context value

    contextValue.$Utils.$Foo = jest.fn(() => 'bar'); // Mock some part of the context

    const { getByText } = await renderWithContext(<Component>My Text</Component>, {
    contextValue, // Provide the custom context value
    });
    const textElement = getByText(/My Text/i);

    expect(textElement).toBeInTheDocument();
    });

    initImaApp

    async function initImaApp(): Promise<ImaApp>

    initImaApp is a helper function that initializes the IMA.js app.

    test('renders component with custom app configuration', async () => {
    const app = await initImaApp(); // Initialize the app

    app.oc.get('$Utils').$Foo = jest.fn(() => 'bar'); // Mock some part of the app

    const { getByText } = await renderWithContext(<Component>My Text</Component>, {
    app, // Provide the custom app
    });
    const textElement = getByText(/My Text/i);

    expect(textElement).toBeInTheDocument();
    });

    renderHookWithContext

    async function renderHookWithContext<TResult, TProps>(
    hook: (props: TProps) => TResult,
    options?: { contextValue?: ContextValue; app?: ImaApp }
    ): Promise<ReturnType<typeof renderHook<TResult, TProps>> & { app: ImaApp | null; contextValue: ContextValue; }>

    renderHookWithContext is a wrapper around renderHook from @testing-library/react. It uses the same logic as renderWithContext to provide the IMA.js context. See the renderWithContext section for more information.

    Extending IMA boot config methods

    You can extend IMA boot config by using IMA pluginLoader.register method. Use the same approach as in IMA plugins.

    You can either register a plugin loader for all tests by setting it up in a setup file.

    // jestSetup.js
    import { pluginLoader } from '@ima/core';

    // If you don't care, if this plugin loader is registered first, or last
    pluginLoader.register('jestSetup.js', () => {
    return {
    initSettings: () => {
    return {
    prod: {
    customSetting: 'customValue'
    }
    }
    }
    };
    });

    // If you need to register the plugin loader after all other plugin loaders
    beforeAll(() => {
    pluginLoader.register('jestSetup.js', () => {
    return {
    initSettings: () => {
    return {
    prod: {
    customSetting: 'customValue'
    }
    }
    }
    };
    });
    });

    // jest.config.js
    module.exports = {
    // Add this line to your jest config
    setupFilesAfterEnv: ['./jestSetup.js']
    };

    Or you can register a plugin loader for a specific test file.

    // mySpec.js
    import { pluginLoader } from '@ima/core';

    beforeAll(() => {
    pluginLoader.register('mySpec', () => {
    return {
    initSettings: () => {
    return {
    prod: {
    customSetting: 'customValue'
    }
    }
    }
    };
    });
    });

    test('renders component with custom app configuration', async () => {
    const { getByText } = await renderWithContext(<Component>My Text</Component>);
    const textElement = getByText(/My Text/i);

    expect(textElement).toBeInTheDocument();
    });

    Or you can register a plugin loader for a test file, but make the boot config methods dynamic so you can change them for each test.

    // mySpec.js
    import { pluginLoader } from '@ima/core';

    // We create a placeholder for the plugin loader, so we can change it later
    let initSettings = () => {};

    beforeAll(() => {
    pluginLoader.register('mySpec', (...args) => {
    return {
    initSettings: (...args) => {
    return initSettings(...args); // Here we call our overridable function
    }
    };
    });
    });

    afterEach(() => {
    initSettings = () => {}; // Reset the plugin loader so it is not called for other tests
    });

    test('renders component with custom app configuration', async () => {
    initSettings = () => {
    return {
    prod: {
    customSetting: 'customValue'
    }
    }
    };

    const { getByText } = await renderWithContext(<Component>My Text</Component>);
    const textElement = getByText(/My Text/i);

    expect(textElement).toBeInTheDocument();
    });

    Note, that the plugin loader register method evaluates the second argument right away, but the specific boot config methods are evaluated during renderWithContext (or initImaApp if you are using it directly).

    - - +

    Testing

    The @ima/testing-library contains utilities for testing IMA.js applications. It provides integration with Jest, React Testing Library and Testing Library Jest DOM. If you initialized your project via create-ima-app, the testing setup is already included in your project. If not, check @ima/testing-library README for more information about how to setup testing in your project.

    API

    IMA Testing Library is re-exporting everything from @testing-library/react. You should always import React Testing Library functions from @ima/testing-library as we might add some additional functionality / wrappers in the future. As such, it provides the same API as @testing-library/react with some additional features.

    renderWithContext

    async function renderWithContext(
    ui: ReactElement,
    options?: RenderOptions & { contextValue?: ContextValue; app?: ImaApp }
    ): Promise<ReturnType<typeof render> & { app: ImaApp | null; contextValue: ContextValue; }>

    renderWithContext is a wrapper around render from @testing-library/react. It sets wrapper option in render method to a real IMA.js context wrapper. It can take additional optional IMA specific options:

    • contextValue - the result of getContextValue
    • app - the result of initImaApp (if you provide contextValue, it does not make any sense to provide app as the app is only used to generate the contextValue)

    If any of the options is not provided, it will be generated automatically.

    Example usage:

    import { useLocalize } from '@ima/react-page-renderer';
    import { renderWithContext } from '@ima/testing-library';

    function Component({ children }) {
    const localize = useLocalize(); // Get localize function from IMA.js context

    return <div>{localize('my.translation.key')} {children}</div>;
    }

    test('renders component with localized string', async () => {
    const { getByText } = await renderWithContext(<Component>My Text</Component>);
    const textElement = getByText(/My Text/i);

    expect(textElement).toBeInTheDocument();
    });

    If you had used render from @testing-library/react directly, the test would have failed because the useLocalize hook would be missing the context. The renderWithContext function provides the necessary context and making it easier to test components that depend on the IMA.js context.

    getContextValue

    async function getContextValue(app?: ImaApp): Promise<ContextValue>

    getContextValue is a helper function that returns the context value from the IMA.js app. It can take an optional app parameter, which is the result of initImaApp.

    Example usage:

    test('renders component with custom context value', async () => {
    const contextValue = await getContextValue(); // Generate default context value

    contextValue.$Utils.$Foo = jest.fn(() => 'bar'); // Mock some part of the context

    const { getByText } = await renderWithContext(<Component>My Text</Component>, {
    contextValue, // Provide the custom context value
    });
    const textElement = getByText(/My Text/i);

    expect(textElement).toBeInTheDocument();
    });

    initImaApp

    async function initImaApp(): Promise<ImaApp>

    initImaApp is a helper function that initializes the IMA.js app.

    test('renders component with custom app configuration', async () => {
    const app = await initImaApp(); // Initialize the app

    app.oc.get('$Utils').$Foo = jest.fn(() => 'bar'); // Mock some part of the app

    const { getByText } = await renderWithContext(<Component>My Text</Component>, {
    app, // Provide the custom app
    });
    const textElement = getByText(/My Text/i);

    expect(textElement).toBeInTheDocument();
    });

    renderHookWithContext

    async function renderHookWithContext<TResult, TProps>(
    hook: (props: TProps) => TResult,
    options?: { contextValue?: ContextValue; app?: ImaApp }
    ): Promise<ReturnType<typeof renderHook<TResult, TProps>> & { app: ImaApp | null; contextValue: ContextValue; }>

    renderHookWithContext is a wrapper around renderHook from @testing-library/react. It uses the same logic as renderWithContext to provide the IMA.js context. See the renderWithContext section for more information.

    Extending IMA boot config methods

    You can extend IMA boot config by using IMA pluginLoader.register method. Use the same approach as in IMA plugins.

    You can either register a plugin loader for all tests by setting it up in a setup file.

    // jestSetup.js
    import { pluginLoader } from '@ima/core';

    // If you don't care, if this plugin loader is registered first, or last
    pluginLoader.register('jestSetup.js', () => {
    return {
    initSettings: () => {
    return {
    prod: {
    customSetting: 'customValue'
    }
    }
    }
    };
    });

    // If you need to register the plugin loader after all other plugin loaders
    beforeAll(() => {
    pluginLoader.register('jestSetup.js', () => {
    return {
    initSettings: () => {
    return {
    prod: {
    customSetting: 'customValue'
    }
    }
    }
    };
    });
    });

    // jest.config.js
    module.exports = {
    // Add this line to your jest config
    setupFilesAfterEnv: ['./jestSetup.js']
    };

    Or you can register a plugin loader for a specific test file.

    // mySpec.js
    import { pluginLoader } from '@ima/core';

    beforeAll(() => {
    pluginLoader.register('mySpec', () => {
    return {
    initSettings: () => {
    return {
    prod: {
    customSetting: 'customValue'
    }
    }
    }
    };
    });
    });

    test('renders component with custom app configuration', async () => {
    const { getByText } = await renderWithContext(<Component>My Text</Component>);
    const textElement = getByText(/My Text/i);

    expect(textElement).toBeInTheDocument();
    });

    Or you can register a plugin loader for a test file, but make the boot config methods dynamic so you can change them for each test.

    // mySpec.js
    import { pluginLoader } from '@ima/core';

    // We create a placeholder for the plugin loader, so we can change it later
    let initSettings = () => {};

    beforeAll(() => {
    pluginLoader.register('mySpec', (...args) => {
    return {
    initSettings: (...args) => {
    return initSettings(...args); // Here we call our overridable function
    }
    };
    });
    });

    afterEach(() => {
    initSettings = () => {}; // Reset the plugin loader so it is not called for other tests
    });

    test('renders component with custom app configuration', async () => {
    initSettings = () => {
    return {
    prod: {
    customSetting: 'customValue'
    }
    }
    };

    const { getByText } = await renderWithContext(<Component>My Text</Component>);
    const textElement = getByText(/My Text/i);

    expect(textElement).toBeInTheDocument();
    });

    Note, that the plugin loader register method evaluates the second argument right away, but the specific boot config methods are evaluated during renderWithContext (or initImaApp if you are using it directly).

    + + \ No newline at end of file diff --git a/basic-features/typescript/index.html b/basic-features/typescript/index.html index 2b80c9bc12..24263d26ae 100644 --- a/basic-features/typescript/index.html +++ b/basic-features/typescript/index.html @@ -4,13 +4,13 @@ TypeScript | IMA.js - - + +
    -

    TypeScript

    Since IMA.js v18 we provide support for Typescript in your application code with proper type declarations from the core packages.

    To enable TypeScript in your project, first you need to add typescript to your app dependencies:

    npm i -D typescript

    tsconfig.json

    Now create tsconfig.json file (that may look something like this):

    ./tsconfig.json
    {
    "compilerOptions": {
    "allowJs": true,
    "target": "ES2022",
    "lib": [
    "ES2022",
    "DOM",
    "DOM.Iterable"
    ],
    "module": "ES2022",
    "moduleResolution": "Node16",
    "strict": true,
    "resolveJsonModule": true,
    "jsx": "react-jsx",
    "baseUrl": ".",
    "outDir": "./build/ts-cache",
    "paths": {
    "app/*": [
    "app/*"
    ],
    }
    },
    "include": ["./app/**/*", "./build/tmp/types/**/*"],
    "exclude": ["./**/__tests__"]
    }

    When CLI detects existence of the tsconfig.json file, it automatically starts type checking and compiling files with *.ts and *.tsx extensions.

    Keep in mind that the code is still compiled using swc, the same way JS code is. This means that certain settings in tsconfig.json only applies to type checking (like target, moduleResolution, etc.), but compilation uses it's own settings to match the JS code.

    tip

    You will also probably need to install additional @types/* type definition libs to ensure proper support, like react types:

    npm i -D @types/react @types/react-dom

    ima-env.d.ts

    Additionally we recommend creating a new ima-env.d.ts file in root of your ./app folder with following contents:

    ./app/ima-env.d.ts
    /// <reference types="@ima/cli/global" />

    This adds proper types support for webpack specific imports like images and other files.

    create-ima-app support

    You can also easily create a typescript base IMA.js application using --typescript cli argument when running create-ima-app command:

    npx create-ima-app ~/Desktop/ima-ts --typescript

    Controller generic types

    The AbstractController class follows similar principles used in React AbstractComponent type. There are 3 generic types you can define on the class definition itself.

    AbstractController.ts
    export class AbstractController<
    S extends PageState = {},
    R extends RouteParams = {},
    SS extends S = S
    > extends Controller<S, R, SS>;
    • S - Use to define shape of your controller managed state.
    • R - Use to define controller's route route params that are extracted to this.params.
    • SS - Defaults to S, however when you are using any extensions in your controller, that have their own state, you can merge those state types in this generic value, to have proper type support for this.getState() method (this will now include all state keys, including ones used in extensions).
    HomeController.ts
    import { TestExtension, GalleryExtensionState } from './GalleryExtension';

    export type HomeControllerState = {
    cards: Promise<CardData>;
    message: string;
    name: string;
    };

    export class HomeController extends AbstractController<
    HomeControllerState,
    { detailId?: string },
    HomeControllerState & GalleryExtensionState
    >{
    static $extensions?: Dependencies<Extension<any, any>> = [GalleryExtension];

    load(): HomeControllerState {
    const cardsPromise = this.#httpAgent
    .get<CardData>('http://localhost:3001/static/static/public/cards.json')
    .then(response => response.body);

    // `state` contains all merged types from `SS` generic value.
    const state = this.getState();

    return {
    message: 'test',
    cards: cardsPromise,
    name: 'nam',
    };
    }
    }

    Extending existing interfaces

    Since you can extend certain features like ComponentUtils or settings from within your application or through plugins, and in order to provide type checking for these, we are using specific interfaces that you can extend using Declaration Merging feature.

    This ensures (when used correctly), that you always have correct static types when using these interfaces, even when they are extended in multiple places.

    Extending Utils

    When using component utils, in addition to registering your classes using ComponentUtils helper, make sure to also extend Utils interface. This adds autocomplete and typechecking to this.utils() and useComponentUtils in your components.

    ./app/config/bind.ts
    declare module '@ima/core' {
    interface Utils {
    $CssClasses: typeof defaultCssClasses;
    }
    }

    export const initBindApp: InitBindFunction = (ns, oc) => {
    oc.get(ComponentUtils).register({
    $CssClasses: '$CssClasses',
    });
    };

    Extending ObjectContainer

    Same goes for defining string aliases in Object container. This adds proper type checking to dependencies definition and oc.get autocomplete.

    ./app/config/bind.ts
    declare module '@ima/core' {
    interface OCAliasMap {
    $CssClasses: () => typeof cssClassNameProcessor;
    $PageRendererFactory: PageRendererFactory;
    API_KEY: string;
    }
    }

    export const initBindApp: InitBindFunction = (ns, oc) => {
    oc.bind('$CssClasses', function () { return cssClassNameProcessor; });
    oc.bind('$PageRendererFactory', PageRendererFactory);
    oc.constant('API_KEY', '14fasdf');
    };

    Extending Settings

    This makes sure you don't have any missing or additional fields in your app settings. Other environments than prod have all fields made optional, since they are deeply merged with the prod settings.

    tip

    Use ?: for settings with default values. This applies mostly to plugins.

    ./app/config/settings.ts
    declare module '@ima/core' {
    interface Settings {
    links: Record<'documentation' | 'tutorial' | 'plugins' | 'api', string>;
    }
    }

    export const initSettings: InitSettingsFunction = (ns, oc, config) => {
    return {
    prod: {
    links: {
    documentation: 'https://imajs.io/docs',
    api: 'https://imajs.io/api',
    },
    }
    }
    }

    Dictionary localization keys

    When compiling app language files, we also generate dictionary keys during runtime. These are then stored in './build/tmp/types/dictionary.ts' file. Don't forget to include this file in tsconfig.json source files array, to have correct static type checking:

    ./tsconfig.json
    {
    "include": ["./app/**/*", "./build/tmp/types/**/*"],
    }
    note

    When used in IMA.js plugins, you can manually extend the DictionaryMap interface:

    declare module '@ima/core' {
    interface DictionaryMap {
    'home.intro': string;
    }
    }

    export {};
    - - +

    TypeScript

    Since IMA.js v18 we provide support for Typescript in your application code with proper type declarations from the core packages.

    To enable TypeScript in your project, first you need to add typescript to your app dependencies:

    npm i -D typescript

    tsconfig.json

    Now create tsconfig.json file (that may look something like this):

    ./tsconfig.json
    {
    "compilerOptions": {
    "allowJs": true,
    "target": "ES2022",
    "lib": [
    "ES2022",
    "DOM",
    "DOM.Iterable"
    ],
    "module": "ES2022",
    "moduleResolution": "Node16",
    "strict": true,
    "resolveJsonModule": true,
    "jsx": "react-jsx",
    "baseUrl": ".",
    "outDir": "./build/ts-cache",
    "paths": {
    "app/*": [
    "app/*"
    ],
    }
    },
    "include": ["./app/**/*", "./build/tmp/types/**/*"],
    "exclude": ["./**/__tests__"]
    }

    When CLI detects existence of the tsconfig.json file, it automatically starts type checking and compiling files with *.ts and *.tsx extensions.

    Keep in mind that the code is still compiled using swc, the same way JS code is. This means that certain settings in tsconfig.json only applies to type checking (like target, moduleResolution, etc.), but compilation uses it's own settings to match the JS code.

    tip

    You will also probably need to install additional @types/* type definition libs to ensure proper support, like react types:

    npm i -D @types/react @types/react-dom

    ima-env.d.ts

    Additionally we recommend creating a new ima-env.d.ts file in root of your ./app folder with following contents:

    ./app/ima-env.d.ts
    /// <reference types="@ima/cli/global" />

    This adds proper types support for webpack specific imports like images and other files.

    create-ima-app support

    You can also easily create a typescript base IMA.js application using --typescript cli argument when running create-ima-app command:

    npx create-ima-app ~/Desktop/ima-ts --typescript

    Controller generic types

    The AbstractController class follows similar principles used in React AbstractComponent type. There are 3 generic types you can define on the class definition itself.

    AbstractController.ts
    export class AbstractController<
    S extends PageState = {},
    R extends RouteParams = {},
    SS extends S = S
    > extends Controller<S, R, SS>;
    • S - Use to define shape of your controller managed state.
    • R - Use to define controller's route route params that are extracted to this.params.
    • SS - Defaults to S, however when you are using any extensions in your controller, that have their own state, you can merge those state types in this generic value, to have proper type support for this.getState() method (this will now include all state keys, including ones used in extensions).
    HomeController.ts
    import { TestExtension, GalleryExtensionState } from './GalleryExtension';

    export type HomeControllerState = {
    cards: Promise<CardData>;
    message: string;
    name: string;
    };

    export class HomeController extends AbstractController<
    HomeControllerState,
    { detailId?: string },
    HomeControllerState & GalleryExtensionState
    >{
    static $extensions?: Dependencies<Extension<any, any>> = [GalleryExtension];

    load(): HomeControllerState {
    const cardsPromise = this.#httpAgent
    .get<CardData>('http://localhost:3001/static/static/public/cards.json')
    .then(response => response.body);

    // `state` contains all merged types from `SS` generic value.
    const state = this.getState();

    return {
    message: 'test',
    cards: cardsPromise,
    name: 'nam',
    };
    }
    }

    Extending existing interfaces

    Since you can extend certain features like ComponentUtils or settings from within your application or through plugins, and in order to provide type checking for these, we are using specific interfaces that you can extend using Declaration Merging feature.

    This ensures (when used correctly), that you always have correct static types when using these interfaces, even when they are extended in multiple places.

    Extending Utils

    When using component utils, in addition to registering your classes using ComponentUtils helper, make sure to also extend Utils interface. This adds autocomplete and typechecking to this.utils() and useComponentUtils in your components.

    ./app/config/bind.ts
    declare module '@ima/core' {
    interface Utils {
    $CssClasses: typeof defaultCssClasses;
    }
    }

    export const initBindApp: InitBindFunction = (ns, oc) => {
    oc.get(ComponentUtils).register({
    $CssClasses: '$CssClasses',
    });
    };

    Extending ObjectContainer

    Same goes for defining string aliases in Object container. This adds proper type checking to dependencies definition and oc.get autocomplete.

    ./app/config/bind.ts
    declare module '@ima/core' {
    interface OCAliasMap {
    $CssClasses: () => typeof cssClassNameProcessor;
    $PageRendererFactory: PageRendererFactory;
    API_KEY: string;
    }
    }

    export const initBindApp: InitBindFunction = (ns, oc) => {
    oc.bind('$CssClasses', function () { return cssClassNameProcessor; });
    oc.bind('$PageRendererFactory', PageRendererFactory);
    oc.constant('API_KEY', '14fasdf');
    };

    Extending Settings

    This makes sure you don't have any missing or additional fields in your app settings. Other environments than prod have all fields made optional, since they are deeply merged with the prod settings.

    tip

    Use ?: for settings with default values. This applies mostly to plugins.

    ./app/config/settings.ts
    declare module '@ima/core' {
    interface Settings {
    links: Record<'documentation' | 'tutorial' | 'plugins' | 'api', string>;
    }
    }

    export const initSettings: InitSettingsFunction = (ns, oc, config) => {
    return {
    prod: {
    links: {
    documentation: 'https://imajs.io/docs',
    api: 'https://imajs.io/api',
    },
    }
    }
    }

    Dictionary localization keys

    When compiling app language files, we also generate dictionary keys during runtime. These are then stored in './build/tmp/types/dictionary.ts' file. Don't forget to include this file in tsconfig.json source files array, to have correct static type checking:

    ./tsconfig.json
    {
    "include": ["./app/**/*", "./build/tmp/types/**/*"],
    }
    note

    When used in IMA.js plugins, you can manually extend the DictionaryMap interface:

    declare module '@ima/core' {
    interface DictionaryMap {
    'home.intro': string;
    }
    }

    export {};
    + + \ No newline at end of file diff --git a/basic-features/views-and-components/index.html b/basic-features/views-and-components/index.html index be2a3cc765..d7828572ea 100644 --- a/basic-features/views-and-components/index.html +++ b/basic-features/views-and-components/index.html @@ -4,8 +4,8 @@ Views & Components | IMA.js - - + +
    @@ -30,8 +30,8 @@ affecting how the rendered View looks and what it displays. A problem arises when a View wants to tell Controller to load or change something. The solution to this are event handling utils EventBus and -Dispatcher.

    Utilities shared across Views and Components

    At some point you'll come to a situation when it'd be nice to have a function or set of functions shared between multiple components. Great example would be custom link generation, page elements manipulation (modal, lightbox) or adverts and analytics.

    These cases are covered by ComponentUtils that allow you to register classes (utilities) that are then shared across every View and Component. Utilities are instantiated through OC therefore you can get access to other utilities or IMA.js components.

    Example Utility class would look like this. Simple class with dependency injection.

    // app/helper/LightboxHelper.js
    import { Router } from '@ima/core';

    export default class LightboxHelper {
    static get $dependencies() {
    return [Router];
    }

    showLightbox(content) {
    ...
    }
    }

    Then to register the utility class:

    // app/config/bind.js
    import { ComponentUtils } from '@ima/core';
    import LightboxHelper from 'app/helper/LightboxHelper';
    import AnalyticsUtils from 'app/helper/AnalyticsUtils';

    export default (ns, oc, config) => {
    const ComponentUtils = oc.get(ComponentUtils); // or oc.get('$ComponentUtils');

    ComponentUtils.register('Lightbox', LightboxHelper);
    // OR to register multiple utilities at once
    ComponentUtils.register({
    Lightbox: LightboxHelper,
    AnalyticsUtils
    });
    };

    Finally, what'd be the point to register these classes if we were not to use them... All of the utilities are present in utils property on AbstractComponent.

    // app/component/gallery/Gallery.jsx
    import { AbstractComponent } from '@ima/react-page-renderer';

    export default class Gallery extends AbstractComponent {

    onPhotoClick(photoId) {
    const { Lightbox } = this.utils;

    Lightbox.showLightbox(...);
    }
    }

    For some heavy-used utilities we've created a shortcut methods in AbstractComponent.

    One special case would be cssClasses shortcut which is by default alias for classnames package. You can overwrite this behavior by registering you own helper in ComponentUtils under $CssClasses alias.

    • cssClasses(classRules, includeComponentClassName = this.utils.$CssClasses()
    - - +Dispatcher.

    Utilities shared across Views and Components

    At some point you'll come to a situation when it'd be nice to have a function or set of functions shared between multiple components. Great example would be custom link generation, page elements manipulation (modal, lightbox) or adverts and analytics.

    These cases are covered by ComponentUtils that allow you to register classes (utilities) that are then shared across every View and Component. Utilities are instantiated through OC therefore you can get access to other utilities or IMA.js components.

    Example Utility class would look like this. Simple class with dependency injection.

    // app/helper/LightboxHelper.js
    import { Router } from '@ima/core';

    export default class LightboxHelper {
    static get $dependencies() {
    return [Router];
    }

    showLightbox(content) {
    ...
    }
    }

    Then to register the utility class:

    // app/config/bind.js
    import { ComponentUtils } from '@ima/core';
    import LightboxHelper from 'app/helper/LightboxHelper';
    import AnalyticsUtils from 'app/helper/AnalyticsUtils';

    export default (ns, oc, config) => {
    const ComponentUtils = oc.get(ComponentUtils); // or oc.get('$ComponentUtils');

    ComponentUtils.register('Lightbox', LightboxHelper);
    // OR to register multiple utilities at once
    ComponentUtils.register({
    Lightbox: LightboxHelper,
    AnalyticsUtils
    });
    };

    Finally, what'd be the point to register these classes if we were not to use them... All of the utilities are present in utils property on AbstractComponent.

    // app/component/gallery/Gallery.jsx
    import { AbstractComponent } from '@ima/react-page-renderer';

    export default class Gallery extends AbstractComponent {

    onPhotoClick(photoId) {
    const { Lightbox } = this.utils;

    Lightbox.showLightbox(...);
    }
    }

    For some heavy-used utilities we've created a shortcut methods in AbstractComponent.

    One special case would be cssClasses shortcut which is by default alias for classnames package. You can overwrite this behavior by registering you own helper in ComponentUtils under $CssClasses alias.

    • cssClasses(classRules, includeComponentClassName = this.utils.$CssClasses()
    + + \ No newline at end of file diff --git a/cli/additional-features/index.html b/cli/additional-features/index.html index af392a10c8..6cd6da8039 100644 --- a/cli/additional-features/index.html +++ b/cli/additional-features/index.html @@ -4,13 +4,13 @@ Additional features | IMA.js - - + +
    -

    Additional features

    This section describes multiple additional features that are either directly provided by the CLI or indirectly with the help of additional development packages @ima/hmr-client, @ima/error-overlay, @ima/dev-utils.

    Polyfills

    Sometimes you may need to include additional custom polyfills to fully support your application in multiple environments. There are multiple ways to achieve this.

    Static files in public folder

    The easies way, is to put your polyfill files directly into the app/public folder and load them either by extending the $Source configuration in the app environment or customizing the application's DocumentView.jsx and spa.html templates with custom script tags:

    ./app/document/DocumentView.jsx
    {/* ... */}
    <body>
    <script src='/static/public/custom-polyfill.js' />
    <div
    id={this.constructor.masterElementId}
    dangerouslySetInnerHTML={{ __html: this.props.page }}
    />
    <script
    id='revivalSettings'
    dangerouslySetInnerHTML={{ __html: this.props.revivalSettings }}
    />
    </body>
    {/* ... */}

    Importing polyfills at top of the main.js file

    Additionally you can import (or put) polyfills at the top of the ./app/main.js entry point.

    ./app/main.js
    import 'abortcontroller-polyfill/dist/polyfill-patch-fetch';

    import './less/app.less';

    import * as ima from '@ima/core';
    import initBindApp from 'app/config/bind';
    //...

    Optional polyfill.js and polyfill.es.js entry points

    Lastly there are special polyfill.js and polyfill.es.js files that you can create in the root of the app directory. These, when bundled through webpack are available as separate JS files and are not part of the final app.bundle.js file.

    As with the previous option, you can either import the polyfills from the node_modules packages, or use their source code directly, by copying it into this file.

    info

    Both files are optional, this means that you can use, either one of those or don't use them at all. Similarly to the first option, don't forget to add the newly generated polyfill.js files somewhere in the source, so they are loaded on app startup.

    IMA.js Runtime

    In the Compiler features section, we mentioned that the CLI is compiling 3 separate bundles, mainly two distinct client bundles, where each targets certain ECMAScript version. This approach has 2 main advantages:

    1. We're still able to support pretty much every currently supported browser version (in case of the es2018 version).
    2. We're also serving the latest native version to the modern browsers that support's it (es2022 version). This bundle is also much smaller since it contains very low amount of core-js polyfills and should have better performance, because native implementations of existing APIs are usually faster than provided polyfills.

    You can customize source files for both versions in the $Source option of the app environment configuration file. This sources definition is then used by the IMA.js Runner, which then chooses (on the client side before app init) the most suitable version for the current browser environment and injects associated scripts into the DOM.

    This is done by executing few small scripts, where each script target's certain ECMAScript feature. Based on these results, the runner injects the best version of client bundle suitable for that concrete browser environment. It also makes sure to wait until all scripts have loaded before executing the webpack runtime.

    This makes sure that all external scripts that the app depends on (languages) are loaded correctly before it's execution and allows them to be loaded async to improve page load times.

    runner.ejs

    The IMA.js runner is simple snippet of JS code, that is injected into the page automatically within the app revivalSettings. It can be completely customizable by defining the runner overrides on the client window before it is injected into the DOM. It will then merge any existing overrides to the original runner before it's execution.

    info

    The runner script is intentionally written in es5 compatible syntax to make sure, that it can be executed on any environment and report using onUnsupported callback, when current browser can't even interpret the es2018 version of the bundle. In this case the application then runs in MPA mode

    Extending default script

    As mentioned before the runner script is fully extensible. For example to implement custom onUnsupported() and onError() callbacks, you'd do something like this:

    ./app/document/DocumentView.jsx
    <body>
    {/* ... */}
    <script>
    window.$IMA = window.$IMA || {};
    window.$IMA.$Runner = {
    /**
    * Optional onError handler. It is triggered in case the runtime
    * code fails to run the application.
    */
    onError: function (error) {
    throw new Error(error);
    },

    /**
    * Optional onUnsupported handler. It is triggered in case tests
    * for es and legacy version fails, which means that the APP runtime
    * code is never executed.
    */
    onUnsupported: function() {
    // Hit analytics with unsupported browser info
    },
    }
    </script>
    <script
    id='revivalSettings'
    dangerouslySetInnerHTML={{ __html: this.props.revivalSettings }}
    />
    </body>
    {/* ... */}

    Don't forget to apply the same changes to the spa.html, otherwise only SSR rendered pages will contain this override.

    note

    Since you will usually never want to change anything on the IMA.js Runner (apart from the previously mentioned callbacks), we won't go much deeper into it's the source code. You can always check it here and use it as a reference for custom overrides.

    However simply keeping your @ima/* dependencies up to will make sure, that you always receive the latest version of the runner script, which may evolve overtime.

    GenerateRuntimePlugin

    Since the webpack runtime is unique for every built, usually quite small, have to be loaded synchronously (which can impact the page load performance) and you would need to manually handle loading it's source code to the DOM, we have created GenerateRuntimePlugin to solve these issues.

    This plugin takes care of automatically generating the runtime consisting of the IMA.js runner code and webpack runtime (for both client bundles), which is then injected directly into the SPA template or SSR rendered html page. This means that you really don't have to worry about the existence of IMA.js runtime (while it's good to know that it does exist), since the framework handles all the hard work for you.

    It also comes with some performance benefits, since inlining these small scripts directly into the HTML removes the need to load additional 2 scripts synchronously, after browser parses the initial DOM.

    Dev server

    When you run your app using npx ima dev command, apart from building your application in development mode with HMR and all other dev features enabled, the CLI also starts companion express server - the dev server.

    By default it runs on http://localhost:3101 (this can be customized through ima.config.js or CLI options) and defines middlewares that are used mainly by the @ima/error-overlay (to properly display parsed error code snippets). Additionally it uses webpack-hot-middleware and webpack-dev-middleware to enable support for HMR.

    Using separate small server to host these middleware doesn't force us to define them directly on the app server, which could essentially produce some errors in certain situations.

    note

    Usually you don't have to think about the dev server during development and can simply pretend that it doesn't exist, since it is handled entirely by the CLI scripts. You can always have a look at the source code to learn more.

    - - +

    Additional features

    This section describes multiple additional features that are either directly provided by the CLI or indirectly with the help of additional development packages @ima/hmr-client, @ima/error-overlay, @ima/dev-utils.

    Polyfills

    Sometimes you may need to include additional custom polyfills to fully support your application in multiple environments. There are multiple ways to achieve this.

    Static files in public folder

    The easies way, is to put your polyfill files directly into the app/public folder and load them either by extending the $Source configuration in the app environment or customizing the application's DocumentView.jsx and spa.html templates with custom script tags:

    ./app/document/DocumentView.jsx
    {/* ... */}
    <body>
    <script src='/static/public/custom-polyfill.js' />
    <div
    id={this.constructor.masterElementId}
    dangerouslySetInnerHTML={{ __html: this.props.page }}
    />
    <script
    id='revivalSettings'
    dangerouslySetInnerHTML={{ __html: this.props.revivalSettings }}
    />
    </body>
    {/* ... */}

    Importing polyfills at top of the main.js file

    Additionally you can import (or put) polyfills at the top of the ./app/main.js entry point.

    ./app/main.js
    import 'abortcontroller-polyfill/dist/polyfill-patch-fetch';

    import './less/app.less';

    import * as ima from '@ima/core';
    import initBindApp from 'app/config/bind';
    //...

    Optional polyfill.js and polyfill.es.js entry points

    Lastly there are special polyfill.js and polyfill.es.js files that you can create in the root of the app directory. These, when bundled through webpack are available as separate JS files and are not part of the final app.bundle.js file.

    As with the previous option, you can either import the polyfills from the node_modules packages, or use their source code directly, by copying it into this file.

    info

    Both files are optional, this means that you can use, either one of those or don't use them at all. Similarly to the first option, don't forget to add the newly generated polyfill.js files somewhere in the source, so they are loaded on app startup.

    IMA.js Runtime

    In the Compiler features section, we mentioned that the CLI is compiling 3 separate bundles, mainly two distinct client bundles, where each targets certain ECMAScript version. This approach has 2 main advantages:

    1. We're still able to support pretty much every currently supported browser version (in case of the es2018 version).
    2. We're also serving the latest native version to the modern browsers that support's it (es2022 version). This bundle is also much smaller since it contains very low amount of core-js polyfills and should have better performance, because native implementations of existing APIs are usually faster than provided polyfills.

    You can customize source files for both versions in the $Source option of the app environment configuration file. This sources definition is then used by the IMA.js Runner, which then chooses (on the client side before app init) the most suitable version for the current browser environment and injects associated scripts into the DOM.

    This is done by executing few small scripts, where each script target's certain ECMAScript feature. Based on these results, the runner injects the best version of client bundle suitable for that concrete browser environment. It also makes sure to wait until all scripts have loaded before executing the webpack runtime.

    This makes sure that all external scripts that the app depends on (languages) are loaded correctly before it's execution and allows them to be loaded async to improve page load times.

    runner.ejs

    The IMA.js runner is simple snippet of JS code, that is injected into the page automatically within the app revivalSettings. It can be completely customizable by defining the runner overrides on the client window before it is injected into the DOM. It will then merge any existing overrides to the original runner before it's execution.

    info

    The runner script is intentionally written in es5 compatible syntax to make sure, that it can be executed on any environment and report using onUnsupported callback, when current browser can't even interpret the es2018 version of the bundle. In this case the application then runs in MPA mode

    Extending default script

    As mentioned before the runner script is fully extensible. For example to implement custom onUnsupported() and onError() callbacks, you'd do something like this:

    ./app/document/DocumentView.jsx
    <body>
    {/* ... */}
    <script>
    window.$IMA = window.$IMA || {};
    window.$IMA.$Runner = {
    /**
    * Optional onError handler. It is triggered in case the runtime
    * code fails to run the application.
    */
    onError: function (error) {
    throw new Error(error);
    },

    /**
    * Optional onUnsupported handler. It is triggered in case tests
    * for es and legacy version fails, which means that the APP runtime
    * code is never executed.
    */
    onUnsupported: function() {
    // Hit analytics with unsupported browser info
    },
    }
    </script>
    <script
    id='revivalSettings'
    dangerouslySetInnerHTML={{ __html: this.props.revivalSettings }}
    />
    </body>
    {/* ... */}

    Don't forget to apply the same changes to the spa.html, otherwise only SSR rendered pages will contain this override.

    note

    Since you will usually never want to change anything on the IMA.js Runner (apart from the previously mentioned callbacks), we won't go much deeper into it's the source code. You can always check it here and use it as a reference for custom overrides.

    However simply keeping your @ima/* dependencies up to will make sure, that you always receive the latest version of the runner script, which may evolve overtime.

    GenerateRuntimePlugin

    Since the webpack runtime is unique for every built, usually quite small, have to be loaded synchronously (which can impact the page load performance) and you would need to manually handle loading it's source code to the DOM, we have created GenerateRuntimePlugin to solve these issues.

    This plugin takes care of automatically generating the runtime consisting of the IMA.js runner code and webpack runtime (for both client bundles), which is then injected directly into the SPA template or SSR rendered html page. This means that you really don't have to worry about the existence of IMA.js runtime (while it's good to know that it does exist), since the framework handles all the hard work for you.

    It also comes with some performance benefits, since inlining these small scripts directly into the HTML removes the need to load additional 2 scripts synchronously, after browser parses the initial DOM.

    Dev server

    When you run your app using npx ima dev command, apart from building your application in development mode with HMR and all other dev features enabled, the CLI also starts companion express server - the dev server.

    By default it runs on http://localhost:3101 (this can be customized through ima.config.js or CLI options) and defines middlewares that are used mainly by the @ima/error-overlay (to properly display parsed error code snippets). Additionally it uses webpack-hot-middleware and webpack-dev-middleware to enable support for HMR.

    Using separate small server to host these middleware doesn't force us to define them directly on the app server, which could essentially produce some errors in certain situations.

    note

    Usually you don't have to think about the dev server during development and can simply pretend that it doesn't exist, since it is handled entirely by the CLI scripts. You can always have a look at the source code to learn more.

    + + \ No newline at end of file diff --git a/cli/advanced-features/index.html b/cli/advanced-features/index.html index a6abec3c2c..8ec4c87c1e 100644 --- a/cli/advanced-features/index.html +++ b/cli/advanced-features/index.html @@ -4,13 +4,13 @@ Advanced Features | IMA.js - - + +
    -

    Error-overlay

    filesystem cache

    polyfill.js

    GenerateRunnerPlugin

    dynamic imports

    dev server

    - - +

    Error-overlay

    filesystem cache

    polyfill.js

    GenerateRunnerPlugin

    dynamic imports

    dev server

    + + \ No newline at end of file diff --git a/cli/cli-plugins-api/index.html b/cli/cli-plugins-api/index.html index fdc0e00f1d..c14e7549b8 100644 --- a/cli/cli-plugins-api/index.html +++ b/cli/cli-plugins-api/index.html @@ -4,13 +4,13 @@ CLI Plugins API | IMA.js - - + +
    -

    CLI Plugins API

    The CLI comes with built-in support for plugins. Plugins are used to extend or modify existing webpack config very easily or even run some pre/post processing scripts during the build process.

    The CLI plugin is usually a class or an object implementing ImaCliPlugin interface. This instance is then added to the plugins array field in the ima.config.js, which registers the plugin to the build process. Additionally to extending the webpack config, you have ability to provide additional custom CLI arguments.

    CLI Plugins API

    Each plugin has to comply with the following interface. Even though almost v everything method is not required and marked as optional, your plugin should implement at least one of the following methods in order to be of any use. Otherwise it would still work but the plugin would not do anything.

    /**
    * Interface for ima/cli plugins that can be defined in plugins field in ima.conf.js. These can be used
    * to extend functionality of default CLI with custom cli arguments and webpack config overrides.
    */
    export interface ImaCliPlugin {
    /**
    * Plugin name, used mainly for better debugging messages.
    */
    readonly name: string;

    /**
    * Optional additional CLI arguments to extend the set of existing ones.
    */
    readonly cliArgs?: Partial<Record<ImaCliCommand, CommandBuilder>>;

    /**
    * Optional plugin hook to do some pre processing right after the cli args are processed
    * and the imaConfig is loaded, before the webpack config creation and compiler run.
    */
    preProcess?(args: ImaCliArgs, imaConfig: ImaConfig): Promise<void>;

    /**
    * Called right before creating webpack configurations after preProcess call.
    * This hook lets you customize configuration contexts for each webpack config
    * that will be generated. This is usefull when you need to overrite configuration
    * contexts for values that are not editable anywhere else (like output folders).
    */
    prepareConfigurations?(
    configurations: ImaConfigurationContext[],
    imaConfig: ImaConfig,
    args: ImaCliArgs
    ): Promise<ImaConfigurationContext[]>;

    /**
    * Webpack callback function used by plugins to customize/extend ima webpack config before it's run.
    */
    webpack?(
    config: Configuration,
    ctx: ImaConfigurationContext,
    imaConfig: ImaConfig
    ): Promise<Configuration>;

    /**
    * Optional plugin hook to do some custom processing after the compilation has finished.
    * Attention! This hook runs only for build command.
    */
    postProcess?(args: ImaCliArgs, imaConfig: ImaConfig): Promise<void>;
    }

    Creating a CLI plugin

    In this section we're going to create custom plugin, which generates assets manifest json file. To achieve this we'll use WebpackManifestPlugin and extend our webpack config. We'll also define some additional CLI arguments that will enable us to overwrite certain settings on demand.

    First we're going to install the webpack-manifest-plugin:

    npm install webpack-manifest-plugin -D

    Then we need to define base class for our new CLI plugin. To make things easier we're going to work directly in the ima.config.js but in reality you'd be better of creating separate npm package for easier sharing between multiple IMA.js projects.

    ./ima.config.js
    class CliManifestPlugin {
    name = 'CliManifestPlugin';

    webpack(config, ctx, imaConfig) {}
    }

    module.exports = {
    plugins: [new CliManifestPlugin()],
    };

    Extending the webpack config

    Now we're going to initialize our manifest plugin. But we only want to do this when we are building the final bundle using the build command. For that we can use the ctx: ImaContext variable, which contains multiple flags and values describing current build context. One of those values is ctx.command which can be either dev or build.

    We are also going to make sure that we can provide options to our CLI plugin that are in this case passed directly to the webpack plugin.

    ./ima.config.js
    const { WebpackManifestPlugin } = require('webpack-manifest-plugin');

    class CliManifestPlugin {
    //...
    #options = {};

    constructor(options) {
    this.#options = options;
    }

    webpack(config, ctx, imaConfig) {
    if (ctx.command === 'build') {
    config.plugins.push(new WebpackManifestPlugin(this.#options));
    }

    return config;
    }
    //...
    }
    tip

    Feel free to print the ctx object into the console and examine it's properties.

    Similarly to the ctx you can also use the imaConfig parameter, which contains loaded ima.config.js file. You can use this feature to have some additional custom plugin-specific definitions in the ima.config.js file too, or use existing settings for some additional functionality.

    We're now going to use these options and pass seed argument to the plugin. The seed object is used to share data between multiple manifest plugin instances (in our case multiple webpack compilations). This makes sure that the final manifest.json file contains paths to all generated assets and is not overwritten by each finished webpack compilation.

    ./ima.config.js
    //...
    const manifestSeed = {};

    module.exports = {
    plugins: [new CliManifestPlugin({ seed: manifestSeed })],
    };

    Custom CLI arguments

    There may be times you'd like to customize or enable/disable certain features on demand using CLI arguments. To demonstrate this we're going to define manifestBasePath CIL argument which will overwrite the basePath plugin option.

    You can define CLI arguments for each command separately, in our case, since the plugin does something only in build command, we're gonna do the same for the CLI arguments:

    ./ima.config.js
    class CliManifestPlugin {
    //...
    cliArgs = {
    dev: undefined, // Dev args will go here
    build: {
    manifestBasePath: {
    desc: 'Overwrite basePath default value',
    type: 'string',
    },
    },
    };
    //...
    }

    The argument definition is passed directly to the yargs parser, so anything that yargs options accept can be passed here. If you've done everything correctly you should even see the new argument in the command --help option:

    npx ima build --help

    ima build

    Build an application for production

    Options:
    --manifestBasePath Overwrite basePath default value [string]

    Accessing CLI arguments

    CLI argument values are merged into the ctx parameter, so you can access them here. In our case we would like to extend the plugin options with the CLI override:

    ./ima.config.js
    const { WebpackManifestPlugin } = require('webpack-manifest-plugin');

    class CliManifestPlugin {
    //...
    webpack(config, ctx, imaConfig) {
    if (ctx.command === 'build') {
    config.plugins.push(
    new WebpackManifestPlugin({
    ...this.#options,
    basePath: ctx.manifestBasePath ?? '',
    })
    );
    }

    return config;
    }
    //...
    }

    Running npx ima build --manifestBasePath=path/prefix should be reflected in the generated manifest.json file in the ./build directory.

    Final results

    Below is the entire content of the ima.config.js file we've been building so far that you can use as a reference.

    ./ima.config.js
    const { WebpackManifestPlugin } = require('webpack-manifest-plugin');

    class CliManifestPlugin {
    #options = {};

    name = 'CliManifestPlugin';

    cliArgs = {
    dev: undefined, // Dev args will go here
    build: {
    manifestBasePath: {
    desc: 'Overwrite basePath default value',
    type: 'string',
    },
    },
    };

    constructor(options) {
    this.#options = options;
    }

    webpack(config, ctx, imaConfig) {
    if (ctx.command === 'build') {
    config.plugins.push(
    new WebpackManifestPlugin({
    ...this.#options,
    basePath: ctx.manifestBasePath ?? '',
    })
    );
    }

    return config;
    }
    }

    const manifestSeed = {};

    module.exports = {
    plugins: [new CliManifestPlugin({ seed: manifestSeed })],
    };

    Using TypeScript

    Since the @ima/cli is written in TypeScript, there are TypeScript definitions you can use while defining your plugin. All types and interfaces are available as exports from the @ima/cli package while you can always have a look at our existing plugins, which are also written in TypeScript for an inspiration.

    Existing CLI plugins

    Currently we maintain 3 distinct CLI plugins that we actively use in our applications. These enables us to extend the feature set of the IMA.js CLI with additional functionality, which is not really suited to be available by default in the original CLI config, since their use is very situational. However you can almost certainly benefit from using these in your application.

    Most of these plugins also provide additional functionality that can be used outside of the CLI plugin definition, but it is essential for it to work properly.

    - - +

    CLI Plugins API

    The CLI comes with built-in support for plugins. Plugins are used to extend or modify existing webpack config very easily or even run some pre/post processing scripts during the build process.

    The CLI plugin is usually a class or an object implementing ImaCliPlugin interface. This instance is then added to the plugins array field in the ima.config.js, which registers the plugin to the build process. Additionally to extending the webpack config, you have ability to provide additional custom CLI arguments.

    CLI Plugins API

    Each plugin has to comply with the following interface. Even though almost v everything method is not required and marked as optional, your plugin should implement at least one of the following methods in order to be of any use. Otherwise it would still work but the plugin would not do anything.

    /**
    * Interface for ima/cli plugins that can be defined in plugins field in ima.conf.js. These can be used
    * to extend functionality of default CLI with custom cli arguments and webpack config overrides.
    */
    export interface ImaCliPlugin {
    /**
    * Plugin name, used mainly for better debugging messages.
    */
    readonly name: string;

    /**
    * Optional additional CLI arguments to extend the set of existing ones.
    */
    readonly cliArgs?: Partial<Record<ImaCliCommand, CommandBuilder>>;

    /**
    * Optional plugin hook to do some pre processing right after the cli args are processed
    * and the imaConfig is loaded, before the webpack config creation and compiler run.
    */
    preProcess?(args: ImaCliArgs, imaConfig: ImaConfig): Promise<void>;

    /**
    * Called right before creating webpack configurations after preProcess call.
    * This hook lets you customize configuration contexts for each webpack config
    * that will be generated. This is usefull when you need to overrite configuration
    * contexts for values that are not editable anywhere else (like output folders).
    */
    prepareConfigurations?(
    configurations: ImaConfigurationContext[],
    imaConfig: ImaConfig,
    args: ImaCliArgs
    ): Promise<ImaConfigurationContext[]>;

    /**
    * Webpack callback function used by plugins to customize/extend ima webpack config before it's run.
    */
    webpack?(
    config: Configuration,
    ctx: ImaConfigurationContext,
    imaConfig: ImaConfig
    ): Promise<Configuration>;

    /**
    * Optional plugin hook to do some custom processing after the compilation has finished.
    * Attention! This hook runs only for build command.
    */
    postProcess?(args: ImaCliArgs, imaConfig: ImaConfig): Promise<void>;
    }

    Creating a CLI plugin

    In this section we're going to create custom plugin, which generates assets manifest json file. To achieve this we'll use WebpackManifestPlugin and extend our webpack config. We'll also define some additional CLI arguments that will enable us to overwrite certain settings on demand.

    First we're going to install the webpack-manifest-plugin:

    npm install webpack-manifest-plugin -D

    Then we need to define base class for our new CLI plugin. To make things easier we're going to work directly in the ima.config.js but in reality you'd be better of creating separate npm package for easier sharing between multiple IMA.js projects.

    ./ima.config.js
    class CliManifestPlugin {
    name = 'CliManifestPlugin';

    webpack(config, ctx, imaConfig) {}
    }

    module.exports = {
    plugins: [new CliManifestPlugin()],
    };

    Extending the webpack config

    Now we're going to initialize our manifest plugin. But we only want to do this when we are building the final bundle using the build command. For that we can use the ctx: ImaContext variable, which contains multiple flags and values describing current build context. One of those values is ctx.command which can be either dev or build.

    We are also going to make sure that we can provide options to our CLI plugin that are in this case passed directly to the webpack plugin.

    ./ima.config.js
    const { WebpackManifestPlugin } = require('webpack-manifest-plugin');

    class CliManifestPlugin {
    //...
    #options = {};

    constructor(options) {
    this.#options = options;
    }

    webpack(config, ctx, imaConfig) {
    if (ctx.command === 'build') {
    config.plugins.push(new WebpackManifestPlugin(this.#options));
    }

    return config;
    }
    //...
    }
    tip

    Feel free to print the ctx object into the console and examine it's properties.

    Similarly to the ctx you can also use the imaConfig parameter, which contains loaded ima.config.js file. You can use this feature to have some additional custom plugin-specific definitions in the ima.config.js file too, or use existing settings for some additional functionality.

    We're now going to use these options and pass seed argument to the plugin. The seed object is used to share data between multiple manifest plugin instances (in our case multiple webpack compilations). This makes sure that the final manifest.json file contains paths to all generated assets and is not overwritten by each finished webpack compilation.

    ./ima.config.js
    //...
    const manifestSeed = {};

    module.exports = {
    plugins: [new CliManifestPlugin({ seed: manifestSeed })],
    };

    Custom CLI arguments

    There may be times you'd like to customize or enable/disable certain features on demand using CLI arguments. To demonstrate this we're going to define manifestBasePath CIL argument which will overwrite the basePath plugin option.

    You can define CLI arguments for each command separately, in our case, since the plugin does something only in build command, we're gonna do the same for the CLI arguments:

    ./ima.config.js
    class CliManifestPlugin {
    //...
    cliArgs = {
    dev: undefined, // Dev args will go here
    build: {
    manifestBasePath: {
    desc: 'Overwrite basePath default value',
    type: 'string',
    },
    },
    };
    //...
    }

    The argument definition is passed directly to the yargs parser, so anything that yargs options accept can be passed here. If you've done everything correctly you should even see the new argument in the command --help option:

    npx ima build --help

    ima build

    Build an application for production

    Options:
    --manifestBasePath Overwrite basePath default value [string]

    Accessing CLI arguments

    CLI argument values are merged into the ctx parameter, so you can access them here. In our case we would like to extend the plugin options with the CLI override:

    ./ima.config.js
    const { WebpackManifestPlugin } = require('webpack-manifest-plugin');

    class CliManifestPlugin {
    //...
    webpack(config, ctx, imaConfig) {
    if (ctx.command === 'build') {
    config.plugins.push(
    new WebpackManifestPlugin({
    ...this.#options,
    basePath: ctx.manifestBasePath ?? '',
    })
    );
    }

    return config;
    }
    //...
    }

    Running npx ima build --manifestBasePath=path/prefix should be reflected in the generated manifest.json file in the ./build directory.

    Final results

    Below is the entire content of the ima.config.js file we've been building so far that you can use as a reference.

    ./ima.config.js
    const { WebpackManifestPlugin } = require('webpack-manifest-plugin');

    class CliManifestPlugin {
    #options = {};

    name = 'CliManifestPlugin';

    cliArgs = {
    dev: undefined, // Dev args will go here
    build: {
    manifestBasePath: {
    desc: 'Overwrite basePath default value',
    type: 'string',
    },
    },
    };

    constructor(options) {
    this.#options = options;
    }

    webpack(config, ctx, imaConfig) {
    if (ctx.command === 'build') {
    config.plugins.push(
    new WebpackManifestPlugin({
    ...this.#options,
    basePath: ctx.manifestBasePath ?? '',
    })
    );
    }

    return config;
    }
    }

    const manifestSeed = {};

    module.exports = {
    plugins: [new CliManifestPlugin({ seed: manifestSeed })],
    };

    Using TypeScript

    Since the @ima/cli is written in TypeScript, there are TypeScript definitions you can use while defining your plugin. All types and interfaces are available as exports from the @ima/cli package while you can always have a look at our existing plugins, which are also written in TypeScript for an inspiration.

    Existing CLI plugins

    Currently we maintain 3 distinct CLI plugins that we actively use in our applications. These enables us to extend the feature set of the IMA.js CLI with additional functionality, which is not really suited to be available by default in the original CLI config, since their use is very situational. However you can almost certainly benefit from using these in your application.

    Most of these plugins also provide additional functionality that can be used outside of the CLI plugin definition, but it is essential for it to work properly.

    + + \ No newline at end of file diff --git a/cli/compiler-features/index.html b/cli/compiler-features/index.html index 941d31c13d..2e3b66f434 100644 --- a/cli/compiler-features/index.html +++ b/cli/compiler-features/index.html @@ -4,13 +4,13 @@ Compiler features | IMA.js - - + +
    -

    Compiler features

    The IMA.js CLI uses webpack behind the scenes to compile, minify and run the application in dev mode. It comes pre-configured with some options, plugins and loaders, which are described in the following sections.

    Server and client bundles

    The CLI creates 3 separate bundles (2 in dev mode for performance reasons) with their own configurations. One server bundle (used in express for SSR) and two client bundles - client and client.es, where one targets the es2018 and the other es2022 version of the javascript.

    This can be further customized using the disableLegacyBuilt option in ima.config.js.

    tip

    To make the CLI build both es versions in dev mode, run it with npx ima dev --legacy option.

    Keep in mind that hot module replacement (HMR) is configured to work only with the latest es version (manual browser reload is required to see any changes on the legacy version).

    Filesystem Cache

    The webpack filesystem cache feature is enabled by default to improve consecutive build times in development and production mode.

    The CLI automatically generates cache key based on used set of CLI options, which somehow affect the produced output. Not all options affect cache key generation, however you may notice that sometimes the build speeds can behave as if there is no filesystem cache. To see which options affect the cache key generation, take a look at the createCacheKey() function.

    note

    Note that each command and bundle maintains it's own set of coexisting cache. To clear the cache, use --clearCache option in build or dev commands.

    JavaScript/React

    To bundle JS files we opted to use swc, a Rust-based JavaScript compiler. This decision was based on our results from testing and measuring build times, where we saw 2-3 times the speed benefit (depending on the application size) of using swc over babel compiler.

    By default the application compiles both, the application files (sourced from ./app folder) and vendor files (sourced from ./node_modules directory) to make sure that it can run in targeted environments without any issues.

    The swc compiler is configured to leverage the power of "env" functionality (preset-env in babel), in combination with core-js to automatically polyfill missing APIs that are used throughout the codebase, that the targeted environment doesn't support.

    This configuration can be easily customized using swc option in ima.config.js.

    note

    This means that you can write your code using the latest and greatest from the ECMAscript language and the swc makes sure to compile these features down to the latest supported syntax or automatically inject core-js polyfills.

    danger

    Keep in mind that overuse of these may result in larger JS bundles due to the need to inject more core-js polyfills. Also browser APIs like for example AbortController or fetch are not handled by the core-js and must be included manually. See polyfills in advanced features section.

    React

    In dev we use the development version of react library (for better debugging) and react-refresh for HMR. This is switched to production for production builds. By default the compiler is configured to work with automatic JSX runtime, so there's no need to import react library at top of every jsx file. This can be changed to classic in ima.config.js.

    Typescript

    From IMA.js v18 we've introduced support for Typescript in your application code. To enable it, simply install typescript dependency and create tsconfig.json file in the root of your project.

    tip

    For more information and additional tips about TypeScript usage in IMA.js applications, see the TypeScript section.

    CSS/LESS

    There's built in support for CSS and LESS preprocessor. Both of these have the same featureset. To use any CSS you have to import the files anywhere in your application. These imports are then combined and extracted to single app.css file.

    tip

    ./app/main.js is a good place to use for global CSS files, since it is an entry point to IMA.js application and these imports will be included at top of the built app.css file.

    CSS Modules

    Both loaders fully support CSS Modules for files with *.modules.css or *.modules.less postfixes, with local as default scoping.

    ./app/page/home/home.module.less
    :global {
    :root: {
    --bg-color: #fff;
    }
    }

    .home {
    background: var(--bg-color);
    }
    ./app/page/home/Home.jsx
    import styles from './home.module.less';

    function Home() {
    return
    <div className={styles.home}>HomePage</div>
    );
    }

    globals.less

    This file is located at ./app/less/globals.less and it is automatically imported on top of every other processed LESS file. It allows you to easily share globals across less files.

    tip

    Use this file to import other mixins and global variables which are then available in all other *.less files automatically, without the need to import them explicitly.

    ./app/less/globals.less
    @import './mixins/*.less';

    @global-red: red;
    ./app/less/app.less
    body {
    // No direct import of 'globals.less' is needed.
    background: @global-red;
    }

    Glob less imports

    The less-loader uses less-plugin-glob by default in it's configuration. This means that glob imports are fully supported.

    ./app/less/app.less
    @import './mixins/*.less';

    /* Non-relative imports are resolved through node resolver. */
    @import "@ima/**/atoms/**/*.less";
    @import "@ima/**/molecules/**/*.less";
    @import "@ima/**/organisms/**/*.less";

    PostCSS

    IMA.js has built-in support for PostCSS during CSS/LESS compilation.

    Out of the box without any additional configuration, it comes pre-configured with following plugins:

    1. postcss-flexbugs-fixes - tries to fix all known flexbox issues.
    2. postcss-preset-env - converts modern CSS back into something the old browsers can understand (back to IE11). It comes with: autoprefixer, stage 3 and custom-properties: false features.

    All these features can be easily customized using postcss option in ima.config.js.

    Assets

    All other assets are either inlined as base64 encoded string or copied to the ./build/static/media folder, where default import represents assets's public URL.

    Images

    Images (bmp, gif, jpeg, png, webp, svg) are automatically inlined if their size is below imageInlineSizeLimit, which can be configured in ima.config.js, with default value of 8Kb. Images exceeding this size limit are copied to the static media folder and import return's their public URL.

    To enforce either one of the two modes, you can use ?external or ?inline query parameter in the import path:

    // This always converts the image to base64 encoded string and inlines it.
    import InlineImage from './image.png?inline';

    // This always returns image public URL, no matter it's size
    import ImageURL from './image.png?external';

    Text files

    When you import one of these text files - csv, txt, html, you receive their contents. Similarly to the images, you can enforce getting their public URL by using the ?external query parameter.

    // Returns file contents in the default import
    import IndexSource from './index.html';

    // Returns the file public URL
    import IndexURL from './index.html?external';

    ./app/public folder

    Everything in this folder is copied to the ./build/static/public and available through the express static files route (http://localhost:3001/static/public/).

    Compression

    When you built the application bundle, all static assets are additionally compressed using brotli and gzip compression (with .br and .gz extensions respectively). To customize this behavior, take a look at ima.config.js configuration section.

    Languages

    The language files are compile using messageformat library.

    - - +

    Compiler features

    The IMA.js CLI uses webpack behind the scenes to compile, minify and run the application in dev mode. It comes pre-configured with some options, plugins and loaders, which are described in the following sections.

    Server and client bundles

    The CLI creates 3 separate bundles (2 in dev mode for performance reasons) with their own configurations. One server bundle (used in express for SSR) and two client bundles - client and client.es, where one targets the es2018 and the other es2022 version of the javascript.

    This can be further customized using the disableLegacyBuilt option in ima.config.js.

    tip

    To make the CLI build both es versions in dev mode, run it with npx ima dev --legacy option.

    Keep in mind that hot module replacement (HMR) is configured to work only with the latest es version (manual browser reload is required to see any changes on the legacy version).

    Filesystem Cache

    The webpack filesystem cache feature is enabled by default to improve consecutive build times in development and production mode.

    The CLI automatically generates cache key based on used set of CLI options, which somehow affect the produced output. Not all options affect cache key generation, however you may notice that sometimes the build speeds can behave as if there is no filesystem cache. To see which options affect the cache key generation, take a look at the createCacheKey() function.

    note

    Note that each command and bundle maintains it's own set of coexisting cache. To clear the cache, use --clearCache option in build or dev commands.

    JavaScript/React

    To bundle JS files we opted to use swc, a Rust-based JavaScript compiler. This decision was based on our results from testing and measuring build times, where we saw 2-3 times the speed benefit (depending on the application size) of using swc over babel compiler.

    By default the application compiles both, the application files (sourced from ./app folder) and vendor files (sourced from ./node_modules directory) to make sure that it can run in targeted environments without any issues.

    The swc compiler is configured to leverage the power of "env" functionality (preset-env in babel), in combination with core-js to automatically polyfill missing APIs that are used throughout the codebase, that the targeted environment doesn't support.

    This configuration can be easily customized using swc option in ima.config.js.

    note

    This means that you can write your code using the latest and greatest from the ECMAscript language and the swc makes sure to compile these features down to the latest supported syntax or automatically inject core-js polyfills.

    danger

    Keep in mind that overuse of these may result in larger JS bundles due to the need to inject more core-js polyfills. Also browser APIs like for example AbortController or fetch are not handled by the core-js and must be included manually. See polyfills in advanced features section.

    React

    In dev we use the development version of react library (for better debugging) and react-refresh for HMR. This is switched to production for production builds. By default the compiler is configured to work with automatic JSX runtime, so there's no need to import react library at top of every jsx file. This can be changed to classic in ima.config.js.

    Typescript

    From IMA.js v18 we've introduced support for Typescript in your application code. To enable it, simply install typescript dependency and create tsconfig.json file in the root of your project.

    tip

    For more information and additional tips about TypeScript usage in IMA.js applications, see the TypeScript section.

    CSS/LESS

    There's built in support for CSS and LESS preprocessor. Both of these have the same featureset. To use any CSS you have to import the files anywhere in your application. These imports are then combined and extracted to single app.css file.

    tip

    ./app/main.js is a good place to use for global CSS files, since it is an entry point to IMA.js application and these imports will be included at top of the built app.css file.

    CSS Modules

    Both loaders fully support CSS Modules for files with *.modules.css or *.modules.less postfixes, with local as default scoping.

    ./app/page/home/home.module.less
    :global {
    :root: {
    --bg-color: #fff;
    }
    }

    .home {
    background: var(--bg-color);
    }
    ./app/page/home/Home.jsx
    import styles from './home.module.less';

    function Home() {
    return
    <div className={styles.home}>HomePage</div>
    );
    }

    globals.less

    This file is located at ./app/less/globals.less and it is automatically imported on top of every other processed LESS file. It allows you to easily share globals across less files.

    tip

    Use this file to import other mixins and global variables which are then available in all other *.less files automatically, without the need to import them explicitly.

    ./app/less/globals.less
    @import './mixins/*.less';

    @global-red: red;
    ./app/less/app.less
    body {
    // No direct import of 'globals.less' is needed.
    background: @global-red;
    }

    Glob less imports

    The less-loader uses less-plugin-glob by default in it's configuration. This means that glob imports are fully supported.

    ./app/less/app.less
    @import './mixins/*.less';

    /* Non-relative imports are resolved through node resolver. */
    @import "@ima/**/atoms/**/*.less";
    @import "@ima/**/molecules/**/*.less";
    @import "@ima/**/organisms/**/*.less";

    PostCSS

    IMA.js has built-in support for PostCSS during CSS/LESS compilation.

    Out of the box without any additional configuration, it comes pre-configured with following plugins:

    1. postcss-flexbugs-fixes - tries to fix all known flexbox issues.
    2. postcss-preset-env - converts modern CSS back into something the old browsers can understand (back to IE11). It comes with: autoprefixer, stage 3 and custom-properties: false features.

    All these features can be easily customized using postcss option in ima.config.js.

    Assets

    All other assets are either inlined as base64 encoded string or copied to the ./build/static/media folder, where default import represents assets's public URL.

    Images

    Images (bmp, gif, jpeg, png, webp, svg) are automatically inlined if their size is below imageInlineSizeLimit, which can be configured in ima.config.js, with default value of 8Kb. Images exceeding this size limit are copied to the static media folder and import return's their public URL.

    To enforce either one of the two modes, you can use ?external or ?inline query parameter in the import path:

    // This always converts the image to base64 encoded string and inlines it.
    import InlineImage from './image.png?inline';

    // This always returns image public URL, no matter it's size
    import ImageURL from './image.png?external';

    Text files

    When you import one of these text files - csv, txt, html, you receive their contents. Similarly to the images, you can enforce getting their public URL by using the ?external query parameter.

    // Returns file contents in the default import
    import IndexSource from './index.html';

    // Returns the file public URL
    import IndexURL from './index.html?external';

    ./app/public folder

    Everything in this folder is copied to the ./build/static/public and available through the express static files route (http://localhost:3001/static/public/).

    Compression

    When you built the application bundle, all static assets are additionally compressed using brotli and gzip compression (with .br and .gz extensions respectively). To customize this behavior, take a look at ima.config.js configuration section.

    Languages

    The language files are compile using messageformat library.

    + + \ No newline at end of file diff --git a/cli/ima-config-js/index.html b/cli/ima-config-js/index.html index b9f072d4f6..15a4b28d7b 100644 --- a/cli/ima-config-js/index.html +++ b/cli/ima-config-js/index.html @@ -4,14 +4,14 @@ ima.config.js | IMA.js - - + +

    ima.config.js

    To additionally customize the build configuration of IMA.js, you can create a ima.config.js file in the root of your project (next to package.json).

    ima.config.js is regular JavaScript module that is loaded during the build configuration initialization (in Node.js environment) and it is not included in the final application bundle.

    An example of ima.config.js file can look something like this:

    ./ima.config.js
    const postcssUnmq = require('postcss-unmq');
    const { AnalyzePlugin } = require('@ima/cli');

    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    publicPath: '/public/',
    watchOptions: {
    ignored: /(node_modules|build|.husky|_templates|.git)\/(?!@ima).*/
    },
    plugins: [
    new AnalyzePlugin()
    ],
    webpack: async (config, ctx) => {
    // Enable webpack infrastructure logging
    if (ctx.command === 'dev') {
    config.infrastructureLogging = {
    level: 'info',
    };
    }

    return config;
    },
    postcss: (config, ctx) => {
    config.postcssOptions.plugins.push(postcssUnmq({ width: 540 }));

    return config;
    },
    languages: {
    cs: [
    './node_modules/@ima/**/*CS.json',
    './app/**/*CS.json'
    ],
    en: [
    './node_modules/@ima/**/*EN.json',
    './app/**/*EN.json'
    ]
    }
    };
    tip

    Use the @type jsdoc annotation to enable ts-types code completions.

    Configuration options

    The ima.config.js file should export an object with any combination of the following configuration options.

    webpack

    async function(config, ctx, imaConfig): config

    This is the most advanced and versatile configuration option, allowing you to change the generated webpack configuration directly before it's passed to the compiler. This function is executed last in the whole configuration pipeline, meaning that all default configurations and CLI plugin configurations are already merged into the config value. This allows you to completely customize the final config form.

    The function receives 3 arguments and has to always return (mutated) config object:

    • config - webpack configuration object (just like the one you usually define in webpack.config.js).
    • ctx - current configuration context. As we mentioned in the compiler features, the app builds 3 different bundles. Using ctx.name you can find out which configuration you are currently editing. There are many additional values that help you identify current build state. You can use these to further customize the config only in some cases or for certain bundles. For more information take a look at the argument type.
    • imaConfig - loaded ima.config.js file, with defaults.

    The following example turns on minification for server bundle for build command:

    ./ima.config.js
    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    webpack: async (config, ctx) => {
    if (ctx.command === 'build' && ctx.name === 'server') {
    config.optimization.minimize = true;
    }

    return config;
    },
    };

    :::Note

    Since this function can be implemented in ima.config.js and also CLI plugins, the resolve order is following default @ima/cli config -> CLI plugin configs -> ima.config.js.

    :::

    swc

    async function(swcLoaderOptions, ctx): swcLoaderOptions

    Similarly to webpack, this function is executed with the swc-loader default options and it's result is then passed to the loader itself. This allows you to customize the swc compiler options in easier and more direct way than you'd have to do when using the webpack option.

    For example, to enable support for the ECMAScript proposals core-js feature, you would do the following:

    ./ima.config.js
    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    swc: async (swcLoaderOptions, ctx) => {
    swcLoaderOptions.env.shippedProposals = true;

    return swcLoaderOptions;
    },
    };

    swcVendor

    async function(swcLoaderOptions, ctx): swcLoaderOptions

    Works same as the aforementioned swc options, except this config is applied to vendor files that match regular expressions defined in the transformVendorPaths settings.

    postcss

    async function(postCssLoaderOptions, ctx): postCssLoaderOptions

    Lastly, this function is used to customize the postcss-loader options. Among the rest you can easily define custom PostCSS plugins or completely overwrite the default set:

    ./ima.config.js
    const postcssUnmq = require('postcss-unmq');

    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    swc: async (postCssLoaderOptions, ctx) => {
    postCssLoaderOptions.postcssOptions.plugins.push(
    postcssUnmq({ width: 540 })
    );

    return postCssLoaderOptions;
    },
    };
    info

    The webpack configuration intentionally ignores any .postcssrc configuration files to prevent potential conflicts with multiple config files.

    prepareConfigurations

    async function(configurations: ImaConfigurationContext[], imaConfig: ImaConfig, args: ImaCliArgs): Promise<ImaConfigurationContext[]>

    Called right before creating webpack configurations after preProcess call. This hook lets you customize configuration contexts for each webpack config that will be generated. This allows you to override values of context variables like useHMR, useTypeScript which define -how the final webpack config is generated, without the need to customize the config itself.

    languages

    object

    i18n language files configuration. The language option expects an object with key/value pairs, where key represents the language and value an array of messageformat compliant JSON files. For more information about localization, see the dictionary section.

    note

    Globs are fully supported and resolved through globby npm package.

    ./ima.config.js
    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    languages: {
    cs: [
    './node_modules/@ima/**/*CS.json',
    './node_modules/@cns/**/*CS.json',
    './app/**/*CS.json'
    ],
    en: [
    './node_modules/@ima/**/*EN.json',
    './node_modules/@cns/**/*EN.json',
    './app/**/*EN.json'
    ]
    }
    }

    jsxRuntime

    'classic' | 'automatic' = 'automatic'

    Use jsxRuntime option to enable classic or automatic mode for jsx transformations. For more information see Introducing the New JSX Transform.

    webpackAliases

    object

    The webpackAliases options is passed directly to the webpack resolve.alias configuration. You can use this to define additional path aliases to the already existing app/* alias, which points to the ./app directory.

    To have the ability to use absolute paths, which are resolved from the ./app/components and ./app/pages directory:

    import Home from 'components/home/Home';
    import DetailView from 'pages/detail/DetailView';

    The webpackAliases option configuration could look something like this:

    ./ima.config.js
    const path = require('path');

    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    webpackAliases: {
    'components': path.resolve('./app/components'),
    'pages': path.resolve('./app/pages'),
    };
    };

    sourceMaps

    boolean | string = false

    The sourceMaps option enables source maps in the production build. Use true for 'source-map' or any other string value compatible with webpack devtool option.

    devServer

    object

    Similarly to the CLI options, you can use the devServer option to override defaults for our companion dev server.

    The only thing that's configurable through the ima.config.js only, is the writeToDiskFilter function. This allows you to force the dev server to write certain files to disk, even if you're serving them from memory in the watch mode.

    ./ima.config.js
    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    devServer: {
    port: 3101,
    hostname: 'localhost',
    publicUrl: 'http://localhost:3101',
    writeToDiskFilter: (filePath) => false,
    // Use to define custom origin for CORS headers on dev server
    origin: 'http://localhost:3001',
    };
    };
    note

    The CLI arguments always take precedence over any other configurations.

    publicPath

    string = '/'

    The publicPath option is used to specify base path for all assets within the application. (see more at webpack public path).

    tip

    Use this option to change base public path for static served files, for example when uploading static files to CDN.

    Runtime public path

    When you want to change public path during runtime, you can use IMA_PUBLIC_PATH env variable, when starting the application server. This variable takes preference before the ima config publicPath option.

    IMA_PUBLIC_PATH="https://cdn.basePath/cd_F/" node ./server/server.js

    Additionally, when used, runner.js injected scripts and styles have defined fallback to local static files, in case the runtime public path assets are not available (CDN is down for example).

    Default settings

    If you want to serve your static files on a different route (default is /static), customize the staticPath option in ./server/config/environment.js file and change publicPath option accordingly:

    ./server/config/environment.js
    module.exports = (() => {
    return {
    prod: {
    $Server: {
    /**
    * The built static files are served on the
    * http://localhost:3001/pro/static base url
    */
    staticPath: '/pro/static',
    }
    }
    }
    });
    ./ima.config.js
    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    publicPath: '/pro/static/',
    };

    compress

    boolean = true

    Enables brotli and gzip compression for production assets (in build command). Set to false to disable this feature.

    imageInlineSizeLimit

    number = 8192

    The imageInlineSizeLimit configuration option is already described in the compiler features section. Essentially it's a image size threshold for it's automatic inlining as a base64 string.

    disableLegacyBuild

    boolean

    Set to true to disable building of the client bundle (older ECMAScript target).

    Don't forget to remove script sources from the $Source option in app environment config

    caution

    The application will now only execute the modern version of the client bundle (client.es), meaning that the it will only work on the latest versions of modern browsers.

    This can be useful if you're building an app, where you are able to set constrains for the supported browsers (e.g. internal admin page).

    transformVendorPaths

    { include?: RegExp[]; exclude?: RegExp[]; }

    caution

    This is an advanced feature.

    Using this option you can include/exclude array of regular expressions that are matched against file paths of processed vendor files (= imported files from node_modules). These files are then processed through swc-loader that makes sure to compile their syntax to currently supported target (ES9). This transformation is executed only for the legacy client bundle.

    By default the CLI always matches all files under the @ima namespace, since we release our plugins in latest ECMA syntax and they need to be compiled down to older syntaxes with proper core-js polyfills.

    tip

    If you use any 3rd party libraries that you are not sure if they support your currently supported browser environments, add their package names as regular expressions to this array and they will be compiled using swc-loader with proper polyfill injections from the core-js package.

    watchOptions

    object

    watchOptions is an object, passed to the webpack watch compiler. You can customize watchOptions.ignored files settings or watchOptions.aggregateTimeout if you have any issues with the default values.

    For more information visit the webpack documentation.

    tip

    If you have any issues with webpack compilation launching multiple times per one file save, try to increase the watchOptions.aggregateTimeout number and see if it helps.

    experiments

    object

    This is a place where you can enable IMA.js configuration experiments. Don't confuse this with the webpack experiments field, this is used only for our potential future configuration updates or changes, which may be enabled by default in the future (much like webpack does).

    Currently there's only one running experiment option experiments.css, that uses webpack native CSS support which completely replaces the css-loader and mini-css-extract-plugin libraries.

    plugins

    ImaCliPlugin[]

    Array of IMA.js CLI plugin instances. For more information about CLI plugins, see Plugins API section.

    - - +how the final webpack config is generated, without the need to customize the config itself.

    languages

    object

    i18n language files configuration. The language option expects an object with key/value pairs, where key represents the language and value an array of messageformat compliant JSON files. For more information about localization, see the dictionary section.

    note

    Globs are fully supported and resolved through globby npm package.

    ./ima.config.js
    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    languages: {
    cs: [
    './node_modules/@ima/**/*CS.json',
    './node_modules/@cns/**/*CS.json',
    './app/**/*CS.json'
    ],
    en: [
    './node_modules/@ima/**/*EN.json',
    './node_modules/@cns/**/*EN.json',
    './app/**/*EN.json'
    ]
    }
    }

    jsxRuntime

    'classic' | 'automatic' = 'automatic'

    Use jsxRuntime option to enable classic or automatic mode for jsx transformations. For more information see Introducing the New JSX Transform.

    webpackAliases

    object

    The webpackAliases options is passed directly to the webpack resolve.alias configuration. You can use this to define additional path aliases to the already existing app/* alias, which points to the ./app directory.

    To have the ability to use absolute paths, which are resolved from the ./app/components and ./app/pages directory:

    import Home from 'components/home/Home';
    import DetailView from 'pages/detail/DetailView';

    The webpackAliases option configuration could look something like this:

    ./ima.config.js
    const path = require('path');

    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    webpackAliases: {
    'components': path.resolve('./app/components'),
    'pages': path.resolve('./app/pages'),
    };
    };

    sourceMaps

    boolean | string = false

    The sourceMaps option enables source maps in the production build. Use true for 'source-map' or any other string value compatible with webpack devtool option.

    devServer

    object

    Similarly to the CLI options, you can use the devServer option to override defaults for our companion dev server.

    The only thing that's configurable through the ima.config.js only, is the writeToDiskFilter function. This allows you to force the dev server to write certain files to disk, even if you're serving them from memory in the watch mode.

    ./ima.config.js
    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    devServer: {
    port: 3101,
    hostname: 'localhost',
    publicUrl: 'http://localhost:3101',
    writeToDiskFilter: (filePath) => false,
    // Use to define custom origin for CORS headers on dev server
    origin: 'http://localhost:3001',
    };
    };
    note

    The CLI arguments always take precedence over any other configurations.

    publicPath

    string = '/'

    The publicPath option is used to specify base path for all assets within the application. (see more at webpack public path).

    tip

    Use this option to change base public path for static served files, for example when uploading static files to CDN.

    Runtime public path

    When you want to change public path during runtime, you can use IMA_PUBLIC_PATH env variable, when starting the application server. This variable takes preference before the ima config publicPath option.

    IMA_PUBLIC_PATH="https://cdn.basePath/cd_F/" node ./server/server.js

    Additionally, when used, runner.js injected scripts and styles have defined fallback to local static files, in case the runtime public path assets are not available (CDN is down for example).

    Default settings

    If you want to serve your static files on a different route (default is /static), customize the staticPath option in ./server/config/environment.js file and change publicPath option accordingly:

    ./server/config/environment.js
    module.exports = (() => {
    return {
    prod: {
    $Server: {
    /**
    * The built static files are served on the
    * http://localhost:3001/pro/static base url
    */
    staticPath: '/pro/static',
    }
    }
    }
    });
    ./ima.config.js
    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    publicPath: '/pro/static/',
    };

    compress

    boolean = true

    Enables brotli and gzip compression for production assets (in build command). Set to false to disable this feature.

    imageInlineSizeLimit

    number = 8192

    The imageInlineSizeLimit configuration option is already described in the compiler features section. Essentially it's a image size threshold for it's automatic inlining as a base64 string.

    disableLegacyBuild

    boolean

    Set to true to disable building of the client bundle (older ECMAScript target).

    Don't forget to remove script sources from the $Source option in app environment config

    caution

    The application will now only execute the modern version of the client bundle (client.es), meaning that the it will only work on the latest versions of modern browsers.

    This can be useful if you're building an app, where you are able to set constrains for the supported browsers (e.g. internal admin page).

    transformVendorPaths

    { include?: RegExp[]; exclude?: RegExp[]; }

    caution

    This is an advanced feature.

    Using this option you can include/exclude array of regular expressions that are matched against file paths of processed vendor files (= imported files from node_modules). These files are then processed through swc-loader that makes sure to compile their syntax to currently supported target (ES9). This transformation is executed only for the legacy client bundle.

    By default the CLI always matches all files under the @ima namespace, since we release our plugins in latest ECMA syntax and they need to be compiled down to older syntaxes with proper core-js polyfills.

    tip

    If you use any 3rd party libraries that you are not sure if they support your currently supported browser environments, add their package names as regular expressions to this array and they will be compiled using swc-loader with proper polyfill injections from the core-js package.

    watchOptions

    object

    watchOptions is an object, passed to the webpack watch compiler. You can customize watchOptions.ignored files settings or watchOptions.aggregateTimeout if you have any issues with the default values.

    For more information visit the webpack documentation.

    tip

    If you have any issues with webpack compilation launching multiple times per one file save, try to increase the watchOptions.aggregateTimeout number and see if it helps.

    experiments

    object

    This is a place where you can enable IMA.js configuration experiments. Don't confuse this with the webpack experiments field, this is used only for our potential future configuration updates or changes, which may be enabled by default in the future (much like webpack does).

    Currently there's only one running experiment option experiments.css, that uses webpack native CSS support which completely replaces the css-loader and mini-css-extract-plugin libraries.

    plugins

    ImaCliPlugin[]

    Array of IMA.js CLI plugin instances. For more information about CLI plugins, see Plugins API section.

    + + \ No newline at end of file diff --git a/cli/index.html b/cli/index.html index 9b50c391e3..d1e898c7c4 100644 --- a/cli/index.html +++ b/cli/index.html @@ -4,13 +4,13 @@ Introduction to @ima/cli | IMA.js - - + +
    -

    Introduction to @ima/cli

    The IMA.js CLI allows you to build and watch your application for changes during development. These features are handle by the only two currently supported commands build and dev.

    You can always list available commands by running:

    npx ima --help
    note

    npx comes pre-installed with npm 5.2+ and higher.

    This should produce following output:

    Usage: ima <command>

    Commands:
    ima build Build an application for production
    ima dev Run application in development watch mode

    Options:
    --version Show version number [boolean]
    --help Show help [boolean]

    Development

    The npx ima dev command starts the application in the development mode with HMR, error-overlay, source maps and other debugging tools enabled.

    By default the application starts on http://localhost:3001 with companion dev server running at http://localhost:3101. These can be further customized through the app environment settings and CLI arguments.

    You can also run npx ima dev --help to list all available options that you can use:

    ima dev

    Run application in development watch mode

    Options:
    --version Show version number [boolean]
    --help Show help [boolean]
    --clean Clean build folder before building the application [boolean] [default: true]
    --clearCache Deletes node_modules/.cache directory to invalidate loaders cache [boolean]
    --verbose Use default webpack CLI output instead of custom one [boolean]
    --inspect Enable Node inspector mode [boolean]
    --ignoreWarnings Webpack will no longer print warnings during compilation [boolean]
    --open Opens browser window after server has been started [boolean] [default: true]
    --openUrl Custom URL used when opening browser window [string]
    --legacy Runs application in legacy mode [boolean] [default: false]
    --forceLegacy Forces runner.js to execute legacy client code [boolean] [default: false]
    --forceSPA Forces application to run in SPA mode [boolean] [default: false]
    --writeToDisk Write static files to disk, instead of serving it from memory [boolean] [default: false]
    --reactRefresh Enable/disable react fast refresh for React components [boolean] [default: true]
    --lazyServer Enable/disable lazy init of server app factory [boolean] [default: true]
    --port Dev server port (overrides ima.config.js settings) [number]
    --hostname Dev server hostname (overrides ima.config.js settings) [string]
    --publicUrl Dev server publicUrl (overrides ima.config.js settings) [string]
    info

    Any of the above mentioned options can be combined together in all different combinations and all options have specified default value. This means that in normal cases you can run npx ima dev without any additional arguments.

    Build

    Builds the application in production mode with all optimizations enabled (compression, minification, etc.). The build command drops some options compared to the dev command. While adding few build specific commands. npx build --help produces:

    ima build

    Build an application for production

    Options:
    --version Show version number [boolean]
    --help Show help [boolean]
    --clean Clean build folder before building the application [boolean] [default: true]
    --clearCache Deletes node_modules/.cache directory to invalidate loaders cache [boolean]
    --verbose Use default webpack CLI output instead of custom one [boolean]
    --ignoreWarnings Webpack will no longer print warnings during compilation [boolean]
    --profile Turn on profiling support in production [boolean] [default: false]

    CLI options

    Most of the following options are available for both dev and build commands, however some may be exclusive to only one of them. You can always use the --help argument to show all available options for each command.

    tip

    When you run into any issues with the application build, you can always run the app with npx ima dev --clearCache to make sure that all cache and tmp files are deleted before next build and see if this resolves your issues.

    Similarly you can use the --verbose option to show more information during build that can aid you in debugging process in case anything happens.

    --version

    Prints @ima/cli version.

    --help

    Prints help dialog.

    --clean

    boolean = true

    Deletes ./build folder before running the application.

    --clearCache

    boolean = false

    Clears ./node_modules/.cache folder. This is used to store webpack filesystem cache and other webpack loader and plugins cache.

    --verbose

    boolean = false

    Disables custom CLI logging style in favor of default webpack CLI verbose. This can be useful for debugging.

    --inspect

    boolean = false

    Disable/enable node inspector mode.

    --ignoreWarnings

    boolean = false

    Ignore reporting of webpack warning messages. The CLI automatically caches all existing warnings and shows just new warnings rebuilds in watch mode.

    --open

    boolean = true

    Enable/disable auto opening of app URL in the browser window on startup.

    tip

    If you find this option annoying, you can completely disable this feature across all IMA.js applications by putting IMA_CLI_OPEN=false in your environment.

    --openUrl

    boolean = true

    Allows you to customize URL which is opened when the server starts in development mode.

    tip

    You can also use IMA_CLI_OPEN_URL='http://ima.dev:3001' env variable to set this option.

    This is usefull when you have project-specific URLs. You can then set this environment variable in application's ima.config.js and don't have to worry about using --openUrl CLI argument everytime you're starting the application in dev mode.

    --legacy

    boolean = false

    By default the CLI only builds es version of JS files in development mode. Use this option to enable additional build of non es version.

    --forceLegacy

    boolean = false

    Enables legacy mode and forces runner.js to load legacy code even if targeted browser supports the latest client es version.

    --forceSPA

    boolean = false

    Forces the application to run in SPA mode.

    --profile

    boolean = false

    Disables some optimizations to allow for better debugging while also trying to be as close to the production build as possible. Currently this option disables mangling of classes and functions, which produces more readable stack traces.

    --writeToDisk

    boolean = false

    By default the app client static files are served from memory in dev mode. Using this option you can force webpack to write these files and serve them from the disk.

    tip

    This option can be useful in some cases where you need to take a look at the compile source code, where it's easier to browse these files locally, rather than on the static server.

    --reactRefresh

    boolean = true

    Disable/enable react fast refresh for React components.

    tip

    Disable this option if you are watching and editing node_modules files, this may result in less performant but more stable HMR experience.

    --lazyServer

    boolean = true

    Disable/enable lazy init of server app factory.

    Dev server options

    Following options are used to customize the companion dev server location (only for dev command). These can be useful if you have some special dev environment, where you have an issue with the default configuration.

    note

    If you provide port and hostname, you don't need to define the publicUrl, the CLI will create it automatically, unless the publicUrl is completely different than the hostname and port provided.

    --port

    number

    Dev server port.

    --hostname

    string

    Dev server hostname, for example: localhost, or 127.0.0.1.

    --publicUrl

    string

    Dev server public url, for example: http://localhost:3101.

    - - +

    Introduction to @ima/cli

    The IMA.js CLI allows you to build and watch your application for changes during development. These features are handle by the only two currently supported commands build and dev.

    You can always list available commands by running:

    npx ima --help
    note

    npx comes pre-installed with npm 5.2+ and higher.

    This should produce following output:

    Usage: ima <command>

    Commands:
    ima build Build an application for production
    ima dev Run application in development watch mode

    Options:
    --version Show version number [boolean]
    --help Show help [boolean]

    Development

    The npx ima dev command starts the application in the development mode with HMR, error-overlay, source maps and other debugging tools enabled.

    By default the application starts on http://localhost:3001 with companion dev server running at http://localhost:3101. These can be further customized through the app environment settings and CLI arguments.

    You can also run npx ima dev --help to list all available options that you can use:

    ima dev

    Run application in development watch mode

    Options:
    --version Show version number [boolean]
    --help Show help [boolean]
    --clean Clean build folder before building the application [boolean] [default: true]
    --clearCache Deletes node_modules/.cache directory to invalidate loaders cache [boolean]
    --verbose Use default webpack CLI output instead of custom one [boolean]
    --inspect Enable Node inspector mode [boolean]
    --ignoreWarnings Webpack will no longer print warnings during compilation [boolean]
    --open Opens browser window after server has been started [boolean] [default: true]
    --openUrl Custom URL used when opening browser window [string]
    --legacy Runs application in legacy mode [boolean] [default: false]
    --forceLegacy Forces runner.js to execute legacy client code [boolean] [default: false]
    --forceSPA Forces application to run in SPA mode [boolean] [default: false]
    --writeToDisk Write static files to disk, instead of serving it from memory [boolean] [default: false]
    --reactRefresh Enable/disable react fast refresh for React components [boolean] [default: true]
    --lazyServer Enable/disable lazy init of server app factory [boolean] [default: true]
    --port Dev server port (overrides ima.config.js settings) [number]
    --hostname Dev server hostname (overrides ima.config.js settings) [string]
    --publicUrl Dev server publicUrl (overrides ima.config.js settings) [string]
    info

    Any of the above mentioned options can be combined together in all different combinations and all options have specified default value. This means that in normal cases you can run npx ima dev without any additional arguments.

    Build

    Builds the application in production mode with all optimizations enabled (compression, minification, etc.). The build command drops some options compared to the dev command. While adding few build specific commands. npx build --help produces:

    ima build

    Build an application for production

    Options:
    --version Show version number [boolean]
    --help Show help [boolean]
    --clean Clean build folder before building the application [boolean] [default: true]
    --clearCache Deletes node_modules/.cache directory to invalidate loaders cache [boolean]
    --verbose Use default webpack CLI output instead of custom one [boolean]
    --ignoreWarnings Webpack will no longer print warnings during compilation [boolean]
    --profile Turn on profiling support in production [boolean] [default: false]

    CLI options

    Most of the following options are available for both dev and build commands, however some may be exclusive to only one of them. You can always use the --help argument to show all available options for each command.

    tip

    When you run into any issues with the application build, you can always run the app with npx ima dev --clearCache to make sure that all cache and tmp files are deleted before next build and see if this resolves your issues.

    Similarly you can use the --verbose option to show more information during build that can aid you in debugging process in case anything happens.

    --version

    Prints @ima/cli version.

    --help

    Prints help dialog.

    --clean

    boolean = true

    Deletes ./build folder before running the application.

    --clearCache

    boolean = false

    Clears ./node_modules/.cache folder. This is used to store webpack filesystem cache and other webpack loader and plugins cache.

    --verbose

    boolean = false

    Disables custom CLI logging style in favor of default webpack CLI verbose. This can be useful for debugging.

    --inspect

    boolean = false

    Disable/enable node inspector mode.

    --ignoreWarnings

    boolean = false

    Ignore reporting of webpack warning messages. The CLI automatically caches all existing warnings and shows just new warnings rebuilds in watch mode.

    --open

    boolean = true

    Enable/disable auto opening of app URL in the browser window on startup.

    tip

    If you find this option annoying, you can completely disable this feature across all IMA.js applications by putting IMA_CLI_OPEN=false in your environment.

    --openUrl

    boolean = true

    Allows you to customize URL which is opened when the server starts in development mode.

    tip

    You can also use IMA_CLI_OPEN_URL='http://ima.dev:3001' env variable to set this option.

    This is usefull when you have project-specific URLs. You can then set this environment variable in application's ima.config.js and don't have to worry about using --openUrl CLI argument everytime you're starting the application in dev mode.

    --legacy

    boolean = false

    By default the CLI only builds es version of JS files in development mode. Use this option to enable additional build of non es version.

    --forceLegacy

    boolean = false

    Enables legacy mode and forces runner.js to load legacy code even if targeted browser supports the latest client es version.

    --forceSPA

    boolean = false

    Forces the application to run in SPA mode.

    --profile

    boolean = false

    Disables some optimizations to allow for better debugging while also trying to be as close to the production build as possible. Currently this option disables mangling of classes and functions, which produces more readable stack traces.

    --writeToDisk

    boolean = false

    By default the app client static files are served from memory in dev mode. Using this option you can force webpack to write these files and serve them from the disk.

    tip

    This option can be useful in some cases where you need to take a look at the compile source code, where it's easier to browse these files locally, rather than on the static server.

    --reactRefresh

    boolean = true

    Disable/enable react fast refresh for React components.

    tip

    Disable this option if you are watching and editing node_modules files, this may result in less performant but more stable HMR experience.

    --lazyServer

    boolean = true

    Disable/enable lazy init of server app factory.

    Dev server options

    Following options are used to customize the companion dev server location (only for dev command). These can be useful if you have some special dev environment, where you have an issue with the default configuration.

    note

    If you provide port and hostname, you don't need to define the publicUrl, the CLI will create it automatically, unless the publicUrl is completely different than the hostname and port provided.

    --port

    number

    Dev server port.

    --hostname

    string

    Dev server hostname, for example: localhost, or 127.0.0.1.

    --publicUrl

    string

    Dev server public url, for example: http://localhost:3101.

    + + \ No newline at end of file diff --git a/cli/plugins/analyze-plugin/index.html b/cli/plugins/analyze-plugin/index.html index aedb8f843d..222dbe04f9 100644 --- a/cli/plugins/analyze-plugin/index.html +++ b/cli/plugins/analyze-plugin/index.html @@ -4,13 +4,13 @@ Analyze Plugin | IMA.js - - + +
    -

    Analyze Plugin

    Pre-configures bundle-stats-webpack-plugin and webpack-bundle-analyzer webpack plugins for fast and easy bundle analyzing.

    This plugin provides easy way to analyze webpack bundle. Apart from pre-configuring the forementioned plugins, it also outputs stats.json file which can be used in multiple other online webpack bundle analyzer tools. For example:

    note

    The plugin also prints these links directly into the console when the build finishes, for easier access.

    Installation

    npm install @ima/cli-plugin-analyze -D

    Usage

    ./ima.config.js
    const { AnalyzePlugin } = require('@ima/cli-plugin-analyze');

    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    plugins: [new AnalyzePlugin()],
    };

    CLI Arguments

    --analyze

    client | client.es | server

    Run the ima build command with --analyze argument and pick one of the three produced bundles you want to analyze. For example: npx ima build --analyze=client.

    Options

    new AnalyzePlugin(options: {
    open?: boolean;
    bundleStatsOptions?: BundleStatsWebpackPlugin.Options;
    bundleAnalyzerOptions?: BundleAnalyzerPlugin.Options;
    });

    open

    boolean = true

    Set to false if you don't want to automatically open the browser window with the html reports when the build finishes.

    bundleStatsOptions

    object

    Pass any option that the BundleStatsWebpackPlugin accepts. These are then merged with some of our custom defaults.

    bundleAnalyzerOptions

    object

    Pass any option that the BundleAnalyzerPlugin accepts. These are then merged with some of our custom defaults.

    - - +

    Analyze Plugin

    Pre-configures bundle-stats-webpack-plugin and webpack-bundle-analyzer webpack plugins for fast and easy bundle analyzing.

    This plugin provides easy way to analyze webpack bundle. Apart from pre-configuring the forementioned plugins, it also outputs stats.json file which can be used in multiple other online webpack bundle analyzer tools. For example:

    note

    The plugin also prints these links directly into the console when the build finishes, for easier access.

    Installation

    npm install @ima/cli-plugin-analyze -D

    Usage

    ./ima.config.js
    const { AnalyzePlugin } = require('@ima/cli-plugin-analyze');

    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    plugins: [new AnalyzePlugin()],
    };

    CLI Arguments

    --analyze

    client | client.es | server

    Run the ima build command with --analyze argument and pick one of the three produced bundles you want to analyze. For example: npx ima build --analyze=client.

    Options

    new AnalyzePlugin(options: {
    open?: boolean;
    bundleStatsOptions?: BundleStatsWebpackPlugin.Options;
    bundleAnalyzerOptions?: BundleAnalyzerPlugin.Options;
    });

    open

    boolean = true

    Set to false if you don't want to automatically open the browser window with the html reports when the build finishes.

    bundleStatsOptions

    object

    Pass any option that the BundleStatsWebpackPlugin accepts. These are then merged with some of our custom defaults.

    bundleAnalyzerOptions

    object

    Pass any option that the BundleAnalyzerPlugin accepts. These are then merged with some of our custom defaults.

    + + \ No newline at end of file diff --git a/cli/plugins/less-constants-plugin/index.html b/cli/plugins/less-constants-plugin/index.html index d76b3029b7..2b6569a37d 100644 --- a/cli/plugins/less-constants-plugin/index.html +++ b/cli/plugins/less-constants-plugin/index.html @@ -4,13 +4,13 @@ LESS Constants Plugin | IMA.js - - + +
    -

    LESS Constants Plugin

    Adds preprocessor which converts theme values defined in the JS file, to their LESS variable counterparts.

    Can be used to share theme variables between JS and LESS files or even multiple npm packages to allow for easier overrides.

    Installation

    npm install @ima/cli-plugin-less-constants -D

    Usage

    First create new plugin instance in the ima.config.js file:

    ./ima.config.js
    const { LessConstantsPlugin } = require('@ima/cli-plugin-less-constants');

    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    plugins: [
    new LessConstantsPlugin({
    entry: './app/config/theme.js'
    })
    ],
    };

    Create theme.js file with constants definitions

    Then export your LESS JS constants from the provided entry file, using the available units helper functions, imported from the CLI plugin:

    ./app/config/theme.js
    import { units, media } from '@ima/cli-plugin-less-constants/units';

    export default {
    bodyfontSize: units.rem(1),
    headerHeight: units.px(120),
    bodyWidth: units.vw(100),
    greaterThanMobile: media.maxWidthMedia(360, 'screen'),
    zIndexes: units.lessMap({
    header: 100,
    footer: 200,
    body: 1,
    }),
    };

    This produces the following output:

    ./build/less-constants/constants.less
    @bodyfont-size: 1rem;
    @header-height: 120px;
    @body-width: 100vw;
    @greater-than-mobile: ~"screen and (max-width: 360)";
    @z-indexes: {
    header: 100;
    footer: 200;
    body: 1;
    }

    Import generated constants.less in globals

    Finally don't forget to import the generated ./build/less-constants/constants.less file in your ./app/less/globals.less to have the variables available in all LESS files automatically without explicit import.

    ./app/less/globals.less
    @import "../../build/less-constants/constants.less";

    Usage in JavaScript

    Since every unit returns Unit object, you can always access it's value through the .valueOf() method or use the CSS interpreted value by calling .toString().

    import { headerHeight } from 'app/config/theme.js';

    export default function ThemeComponent({ children, title, href }) {
    return (
    <div>
    Header height has an absolute value of: {headerHeight.valueOf()} {/* 120 */},
    while it's CSS value is: {headerHeight.toString()} {/* 120px */}
    </div>
    );
    }
    caution

    The constants are generated only in the preProcess which runs just ones before the compilation. So make sure to restart the built manually, when you add any new constants, to allow for the regeneration of the constants.less file.

    Options

    new LessConstantsPlugin(options: {
    entry: string;
    output?: string;
    });

    entry

    string

    Path to the LESS constants JS file.

    output

    string

    Optional custom output path, defaults to ./build/less-constants/constants.less.

    Units

    The plugin provides unit functions for almost every unit available + some other helpers. Each helper returns Unit object with following interface:

    export interface Unit {
    valueOf: () => string;
    toString: () => string;
    }
    • Numeric values - em, ex, ch, rem, lh, rlh, vw, vh, vmin, vmax, vb, vi, svw, svh, lvw, lvh, dvw, dvh, cm, mm, Q, inches, pc, pt, px, percent.
    • Color values - hex, rgb, rgba, hsl, hsla.
    • Media queries - maxWidthMedia, minWidthMedia, minAndMaxWidthMedia, maxHeightMedia, minHeightMedia.
    • LESS map helper - lessMap can be used to group together similar values in an "object-like" value.

    Custom units

    If you're missing any additional helpers, you can always define your own, either custom ones (as long as they adhere to the Unit interface) or you can use the following helper:

    import { asUnit } from '@ima/cli-plugin-less-constants/units';

    function asUnit(
    unit: string,
    parts: (string | number)[],
    template = '${parts}${unit}'
    ): Unit {
    return {
    __propertyDeclaration: true,

    valueOf(): string {
    return parts.length === 1 ? parts[0].toString() : this.toString();
    },

    toString(): string {
    return template
    .replace('${parts}', parts.join(','))
    .replace('${unit}', unit);
    },
    };
    }
    - - +

    LESS Constants Plugin

    Adds preprocessor which converts theme values defined in the JS file, to their LESS variable counterparts.

    Can be used to share theme variables between JS and LESS files or even multiple npm packages to allow for easier overrides.

    Installation

    npm install @ima/cli-plugin-less-constants -D

    Usage

    First create new plugin instance in the ima.config.js file:

    ./ima.config.js
    const { LessConstantsPlugin } = require('@ima/cli-plugin-less-constants');

    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    plugins: [
    new LessConstantsPlugin({
    entry: './app/config/theme.js'
    })
    ],
    };

    Create theme.js file with constants definitions

    Then export your LESS JS constants from the provided entry file, using the available units helper functions, imported from the CLI plugin:

    ./app/config/theme.js
    import { units, media } from '@ima/cli-plugin-less-constants/units';

    export default {
    bodyfontSize: units.rem(1),
    headerHeight: units.px(120),
    bodyWidth: units.vw(100),
    greaterThanMobile: media.maxWidthMedia(360, 'screen'),
    zIndexes: units.lessMap({
    header: 100,
    footer: 200,
    body: 1,
    }),
    };

    This produces the following output:

    ./build/less-constants/constants.less
    @bodyfont-size: 1rem;
    @header-height: 120px;
    @body-width: 100vw;
    @greater-than-mobile: ~"screen and (max-width: 360)";
    @z-indexes: {
    header: 100;
    footer: 200;
    body: 1;
    }

    Import generated constants.less in globals

    Finally don't forget to import the generated ./build/less-constants/constants.less file in your ./app/less/globals.less to have the variables available in all LESS files automatically without explicit import.

    ./app/less/globals.less
    @import "../../build/less-constants/constants.less";

    Usage in JavaScript

    Since every unit returns Unit object, you can always access it's value through the .valueOf() method or use the CSS interpreted value by calling .toString().

    import { headerHeight } from 'app/config/theme.js';

    export default function ThemeComponent({ children, title, href }) {
    return (
    <div>
    Header height has an absolute value of: {headerHeight.valueOf()} {/* 120 */},
    while it's CSS value is: {headerHeight.toString()} {/* 120px */}
    </div>
    );
    }
    caution

    The constants are generated only in the preProcess which runs just ones before the compilation. So make sure to restart the built manually, when you add any new constants, to allow for the regeneration of the constants.less file.

    Options

    new LessConstantsPlugin(options: {
    entry: string;
    output?: string;
    });

    entry

    string

    Path to the LESS constants JS file.

    output

    string

    Optional custom output path, defaults to ./build/less-constants/constants.less.

    Units

    The plugin provides unit functions for almost every unit available + some other helpers. Each helper returns Unit object with following interface:

    export interface Unit {
    valueOf: () => string;
    toString: () => string;
    }
    • Numeric values - em, ex, ch, rem, lh, rlh, vw, vh, vmin, vmax, vb, vi, svw, svh, lvw, lvh, dvw, dvh, cm, mm, Q, inches, pc, pt, px, percent.
    • Color values - hex, rgb, rgba, hsl, hsla.
    • Media queries - maxWidthMedia, minWidthMedia, minAndMaxWidthMedia, maxHeightMedia, minHeightMedia.
    • LESS map helper - lessMap can be used to group together similar values in an "object-like" value.

    Custom units

    If you're missing any additional helpers, you can always define your own, either custom ones (as long as they adhere to the Unit interface) or you can use the following helper:

    import { asUnit } from '@ima/cli-plugin-less-constants/units';

    function asUnit(
    unit: string,
    parts: (string | number)[],
    template = '${parts}${unit}'
    ): Unit {
    return {
    __propertyDeclaration: true,

    valueOf(): string {
    return parts.length === 1 ? parts[0].toString() : this.toString();
    },

    toString(): string {
    return template
    .replace('${parts}', parts.join(','))
    .replace('${unit}', unit);
    },
    };
    }
    + + \ No newline at end of file diff --git a/cli/plugins/scramble-css-plugin/index.html b/cli/plugins/scramble-css-plugin/index.html index c092ee77d6..6e3bc8b8b0 100644 --- a/cli/plugins/scramble-css-plugin/index.html +++ b/cli/plugins/scramble-css-plugin/index.html @@ -4,13 +4,13 @@ ScrambleCSS Plugin | IMA.js - - + +
    -

    ScrambleCSS Plugin

    Implements CSS class minimizer and uglifier that can be reverse-compiled at runtime (you can access classes using their original name).

    It works by processing all CSS files using custom PostCSS plugin, that mangles (scrambles) and minimizes all classes, while also building translation table (hashtable.json) along the way.

    The result is CSS file with mangled class names and companion hashtable that we use in our custom $CssClasses processor to, translate existing classes used out components to the new scrambled ones.

    Requirements

    caution

    As mentioned above, for this feature to work you need to wrap all your classNames in cssClasses function. Otherwise you'll end up with scrambled classes in CSS file but original class names in your components.

    import { useComponent } from '@ima/react-hooks';

    export default function Card() {
    const { cssClasses } = useComponent();

    return (
    <div className={cssClasses('card')} />
    );
    }

    or in case of class components:

    import { AbstractPureComponent } from '@ima/react-page-renderer';

    export default class Card extends AbstractPureComponent {
    render() {
    return (
    <div className={this.cssClasses('card')} />
    );
    }
    }

    Installation

    npm install @ima/cli-plugin-scramble-css -D

    Usage

    ./ima.config.js
    const { ScrambleCssPlugin } = require('@ima/cli-plugin-scramble-css');

    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    plugins: [new ScrambleCssPlugin()],
    };

    $CssClasses override and hashtable.json

    We have to provide our custom $CssClasses processor and pass it our generate hashtable.json file. To do that, we're going to load it's contents in the app environment:

    ./server/config/environment.js
    const fs = require('fs');
    const path = require('path');

    const hashTablePath = path.resolve(
    __dirname,
    '../../build/static/css/hashTable.json'
    );

    module.exports = (() => {
    return {
    prod: {
    $App: {
    scrambleCss: {
    hashTable: fs.existsSync(hashTablePath)
    ? JSON.parse(fs.readFileSync(hashTablePath))
    : null,
    },
    },
    // ...
    }
    }
    });

    Finally, the hashtable is now available under config.$App.scrambleCss.hashTable, so we're going to provide it to the plugin's custom $CssClasses processor in the app bind.js file, and we're done:

    ./app/config/bind.js
    import { scrambleCssClasses } from '@ima/cli-plugin-scramble-css/scrambleCssClasses';

    export default (ns, oc, config) => {
    oc.bind(
    '$CssClasses',
    scrambleCssClasses(config?.$App?.scrambleCss?.hashTable),
    []
    );
    };

    CLI Arguments

    --scrambleCss

    boolean

    The scrambling is enabled by default for the production environment. However you can explicitly enable/disable it using this CLI argument. This applies for both CLI commands.

    Options

    new ScrambleCssPlugin(options: {
    scrambleCssMinimizerOptions?: {
    hashTableFilename?: string;
    mainAssetFilter?: (filename: string) => boolean;
    };
    });

    scrambleCssMinimizerOptions

    object

    These are passed directly into the ScrambleCssMinimizer. You can define custom:

    • hashTableFilename - custom translation hashtable.json filename. Defaults to: ./build/static/css/hashTable.json.
    • mainAssetFilter - should resolve to the main css file. The minimizer first processes the main.css file and generates the hashtable.json translation table. If you then want to process other assets with existing hashtable, these should be filtered out in this function, since the minimizer minimizes them in second pass using existing hashtable.json.
    note

    You should be fine with the default options in almost any situation except some special use cases.

    - - +

    ScrambleCSS Plugin

    Implements CSS class minimizer and uglifier that can be reverse-compiled at runtime (you can access classes using their original name).

    It works by processing all CSS files using custom PostCSS plugin, that mangles (scrambles) and minimizes all classes, while also building translation table (hashtable.json) along the way.

    The result is CSS file with mangled class names and companion hashtable that we use in our custom $CssClasses processor to, translate existing classes used out components to the new scrambled ones.

    Requirements

    caution

    As mentioned above, for this feature to work you need to wrap all your classNames in cssClasses function. Otherwise you'll end up with scrambled classes in CSS file but original class names in your components.

    import { useComponent } from '@ima/react-hooks';

    export default function Card() {
    const { cssClasses } = useComponent();

    return (
    <div className={cssClasses('card')} />
    );
    }

    or in case of class components:

    import { AbstractPureComponent } from '@ima/react-page-renderer';

    export default class Card extends AbstractPureComponent {
    render() {
    return (
    <div className={this.cssClasses('card')} />
    );
    }
    }

    Installation

    npm install @ima/cli-plugin-scramble-css -D

    Usage

    ./ima.config.js
    const { ScrambleCssPlugin } = require('@ima/cli-plugin-scramble-css');

    /**
    * @type import('@ima/cli').ImaConfig
    */
    module.exports = {
    plugins: [new ScrambleCssPlugin()],
    };

    $CssClasses override and hashtable.json

    We have to provide our custom $CssClasses processor and pass it our generate hashtable.json file. To do that, we're going to load it's contents in the app environment:

    ./server/config/environment.js
    const fs = require('fs');
    const path = require('path');

    const hashTablePath = path.resolve(
    __dirname,
    '../../build/static/css/hashTable.json'
    );

    module.exports = (() => {
    return {
    prod: {
    $App: {
    scrambleCss: {
    hashTable: fs.existsSync(hashTablePath)
    ? JSON.parse(fs.readFileSync(hashTablePath))
    : null,
    },
    },
    // ...
    }
    }
    });

    Finally, the hashtable is now available under config.$App.scrambleCss.hashTable, so we're going to provide it to the plugin's custom $CssClasses processor in the app bind.js file, and we're done:

    ./app/config/bind.js
    import { scrambleCssClasses } from '@ima/cli-plugin-scramble-css/scrambleCssClasses';

    export default (ns, oc, config) => {
    oc.bind(
    '$CssClasses',
    scrambleCssClasses(config?.$App?.scrambleCss?.hashTable),
    []
    );
    };

    CLI Arguments

    --scrambleCss

    boolean

    The scrambling is enabled by default for the production environment. However you can explicitly enable/disable it using this CLI argument. This applies for both CLI commands.

    Options

    new ScrambleCssPlugin(options: {
    scrambleCssMinimizerOptions?: {
    hashTableFilename?: string;
    mainAssetFilter?: (filename: string) => boolean;
    };
    });

    scrambleCssMinimizerOptions

    object

    These are passed directly into the ScrambleCssMinimizer. You can define custom:

    • hashTableFilename - custom translation hashtable.json filename. Defaults to: ./build/static/css/hashTable.json.
    • mainAssetFilter - should resolve to the main css file. The minimizer first processes the main.css file and generates the hashtable.json translation table. If you then want to process other assets with existing hashtable, these should be filtered out in this function, since the minimizer minimizes them in second pass using existing hashtable.json.
    note

    You should be fine with the default options in almost any situation except some special use cases.

    + + \ No newline at end of file diff --git a/contributing/how-to-contribute/index.html b/contributing/how-to-contribute/index.html index a693689d6a..7ab4525916 100644 --- a/contributing/how-to-contribute/index.html +++ b/contributing/how-to-contribute/index.html @@ -4,13 +4,13 @@ How to Contribute | IMA.js - - + +
    -

    How to Contribute

    Contribute to this project via Pull Requests.

    Changesets

    We are using changesets for the release management. Adding a changeset file to a Pull Request is required in most cases as it triggers the release of the affected packages. If your changes don't affect any package (documentation/tests update, or change in the repository workflow), then you can skip adding a changeset file.

    Read on how to add a changeset in the official changesets documentation. In our repositories, you can use npm run changeset alias to open the changeset prompt.

    Semantic Versioning

    IMA.js follows semantic versioning. We release patch versions for bugfixes, minor versions for new features, and major versions for any breaking changes.

    Every significant change is documented in the changelog file of the related package.

    Open Development

    All work on IMA.js happens directly on GitHub. Both core team members and external contributors send pull requests which go through the same review process.

    Branch Organization

    There are 2 main branches, master and next.

    Branch master contains the current stable version. You should target your Pull Request here, if your changes are adding a new feature, fixing a bug, or any other change that does not require a major bump. New version from this branch will be published to the official npm registry under the latest tag.

    Branch next contains the next major release candidate version. You should target your Pull Request here, if you are introducing a breaking change, or extending a functionality existing only in this branch. New version from this branch will be published to the official npm registry under the rc tag.

    Development Workflow

    After cloning IMA.js repository, run npm ci (check .nvmrc file for supported Node.js version) to fetch its dependencies. Then, you can run several commands:

    • npm run lint checks the code style.
    • npm run lint -- --fix fixes the code style issues.
    • npm run stylelint checks the css/less code style.
    • npm run stylelint -- --fix fixes the css/less code style issues.
    • npm run test runs only tests affected by your changes.
    • npm run test -- --watch runs an interactive test watcher.
    • npm run test <pattern> runs tests with matching filenames.
    • npm run test:all runs the complete test suite.
    • npm run test:size runs size check to avoid introduction of large bundles.
    • npm run build creates a build folder within all the packages.
    • npm run changeset opens the changesets prompt.

    We recommend running npm run test (or its variations above) to make sure you don’t introduce any regressions as you work on your change.

    License

    By contributing to IMA.js, you agree that your contributions will be licensed under its MIT license.

    - - +

    How to Contribute

    Contribute to this project via Pull Requests.

    Changesets

    We are using changesets for the release management. Adding a changeset file to a Pull Request is required in most cases as it triggers the release of the affected packages. If your changes don't affect any package (documentation/tests update, or change in the repository workflow), then you can skip adding a changeset file.

    Read on how to add a changeset in the official changesets documentation. In our repositories, you can use npm run changeset alias to open the changeset prompt.

    Semantic Versioning

    IMA.js follows semantic versioning. We release patch versions for bugfixes, minor versions for new features, and major versions for any breaking changes.

    Every significant change is documented in the changelog file of the related package.

    Open Development

    All work on IMA.js happens directly on GitHub. Both core team members and external contributors send pull requests which go through the same review process.

    Branch Organization

    There are 2 main branches, master and next.

    Branch master contains the current stable version. You should target your Pull Request here, if your changes are adding a new feature, fixing a bug, or any other change that does not require a major bump. New version from this branch will be published to the official npm registry under the latest tag.

    Branch next contains the next major release candidate version. You should target your Pull Request here, if you are introducing a breaking change, or extending a functionality existing only in this branch. New version from this branch will be published to the official npm registry under the rc tag.

    Development Workflow

    After cloning IMA.js repository, run npm ci (check .nvmrc file for supported Node.js version) to fetch its dependencies. Then, you can run several commands:

    • npm run lint checks the code style.
    • npm run lint -- --fix fixes the code style issues.
    • npm run stylelint checks the css/less code style.
    • npm run stylelint -- --fix fixes the css/less code style issues.
    • npm run test runs only tests affected by your changes.
    • npm run test -- --watch runs an interactive test watcher.
    • npm run test <pattern> runs tests with matching filenames.
    • npm run test:all runs the complete test suite.
    • npm run test:size runs size check to avoid introduction of large bundles.
    • npm run build creates a build folder within all the packages.
    • npm run changeset opens the changesets prompt.

    We recommend running npm run test (or its variations above) to make sure you don’t introduce any regressions as you work on your change.

    License

    By contributing to IMA.js, you agree that your contributions will be licensed under its MIT license.

    + + \ No newline at end of file diff --git a/devtools/devtools-introduction/index.html b/devtools/devtools-introduction/index.html index bf9f52bbec..c95123dba4 100644 --- a/devtools/devtools-introduction/index.html +++ b/devtools/devtools-introduction/index.html @@ -4,8 +4,8 @@ Introduction | IMA.js - - + +
    @@ -27,8 +27,8 @@ wrap IMA.js app method calls in Proxy-like objects, which then before execution, send an information about it's call, arguments and payload to the devtools panel. The panel then batch-processes these messages and displays them.

    It can be customized through extension's options, where you can define what exactly should be wrapped using proxies and how it should be pre-processed before sending it to the user. In the -next section we're going to talk about the devtools UI and it's components.

    - - +next section we're going to talk about the devtools UI and it's components.

    + + \ No newline at end of file diff --git a/devtools/devtools-options/index.html b/devtools/devtools-options/index.html index 158520b3e5..de103e7a93 100644 --- a/devtools/devtools-options/index.html +++ b/devtools/devtools-options/index.html @@ -4,8 +4,8 @@ Options | IMA.js - - + +
    @@ -35,8 +35,8 @@ in case of npm package.
  • module {?string} - used for named exports, can be left blank in case of default exports.
  • Message colors

    Currently there are 13 colors (we're using the Open Color color scheme), that you can use to differentiate each hook with:

    NameColor

    Conclusion

    You should by ok with the default preset for most cases but in case you head into defining a custom one, here are some notes on this matter.

    Defining custom hooks requires some more knowledge into the devtools that you can get by studying the devtool script to see how things work. We suggest to start by customizing the default set, changing few rules or splitting -existing hooks into more smaller ones, before heading in and defining whole new preset.

    - - +existing hooks into more smaller ones, before heading in and defining whole new preset.

    + + \ No newline at end of file diff --git a/devtools/devtools-ui/index.html b/devtools/devtools-ui/index.html index 1c995b8f2f..c80aee8c68 100644 --- a/devtools/devtools-ui/index.html +++ b/devtools/devtools-ui/index.html @@ -4,8 +4,8 @@ UI & Controls | IMA.js - - + +
    @@ -47,8 +47,8 @@ you're currently visiting is using IMA.js and devtools are initialized. As a bonus you can also see the application environment, language and version.

    Options

    This is a separate page, where you can configure the script that is injected into the page and customize it to your needs. As this is rather more complicated we're going to take -a deeper look into it in the next section.

    - - +a deeper look into it in the next section.

    + + \ No newline at end of file diff --git a/index.html b/index.html index 57cee52b3d..3342b89d9b 100644 --- a/index.html +++ b/index.html @@ -4,13 +4,13 @@ IMA.js | A Javascript framework for creating isomorphic applications | IMA.js - - + +
    -

    IMA.js

    A Javascript framework for creating isomorphic applications.

    Features

    Fully Isomorphic

    Write and run the same code at both the server side and the client side! IMA.js provides abstraction for APIs that differ at the client side javascript and the server side javascript.

    SEO

    Page metadata are centrally managed, allowing easier management of all your keywords and og meta-tags.

    Benchmarks and Tests

    Real-world heavy-load web services are run on the IMA.js platform. With hundreds of unit tests covering all of our code, you can rely on IMA.js to be a stable base of your application.

    Production-ready Full Application Stack

    Use the familiar MVC pattern in combination with React for rendering your UI. See Hello example.

    Routing

    IMA.js comes with a built-in router for processing GET and POST HTTP requests.

    Bleeding Edge Technologies

    ESNext, Webpack, SWC compiler, HMR and other technologies.

    Full plugin support

    IMA.js comes with full support for plugins that can be created very easily through very simple interface.

    Large collection of existing plugins

    We maintain a list of several plugins that are thoroughly tested and used every day on many of our websites here at Seznam.cz along with huge list of other plugins we use internally.

    Multiple running modes

    Application can be switched between IMA, SPA and MPA modes or combination of all of them.

    And many more...

    Configuration for all your environments in one place with inheritance.
    Out-of-box configurable server-side caching.
    REST API cache.
    Advanced error handling for greater stability and faster development.
    High-fidelity debug mode.
    Dependency injection.
    Analytics plugin, that provides interface to custom analytics, along with FB pixel and Google Analytics plugins.
    Generic REST API client plugin for the IMA application framework
    Plugin to simplify loading 3rd party scripts for the IMA.js application
    Reselect-style page state selector plugin for IMA.js components.
    And many more…

    Who's using IMA.js

    Seznamzpravy.cz

    Seznamzpravy.cz

    Seznam Zprávy is one of the top Czech news platforms, which delivers compelling, diverse and visually engaging stories in the form of a text and a video.

    Novinky.cz

    Novinky.cz

    One of the biggest and most visited news website in the Czech Republic. It offers coverage of the latest news from home and around the world in one place.

    Prozeny.cz

    Prozeny.cz

    The biggest online lifestyle magazine for women in the Czech Republic. Current articles about fashion, health and lifestyle, living, family, and a great section of recipes.

    Garaz.cz

    Garaz.cz

    The biggest online magazine about cars and motorcycles in the Czech Republic where you can found current articles about news from the car industry, service tips, reports from car events and wonderful video section.

    Počasí.cz

    Počasí.cz

    The most visited weather forecast website in the Czech republic. Offers weather forecast up to 6 days ahead for every place on Earth and interactive map with meteoradar.

    tv.seznam.cz

    tv.seznam.cz

    TV broadcast schedule for at least 14 days ahead, available for more than 100 most watched TV stations. Horizontal and vertical layout, notifications and social sharing is available.

    SBazar.cz

    SBazar.cz

    Sbazar.cz is one of the largest online peer to peer marketers in the Czech Republic. People can choose between 1,800,000 current offers. Advertising is clearly arranged into individual categories with the possibility of searching in a specific place in the Czechia.

    SAuto.cz

    SAuto.cz

    Sauto is the biggest marketplace of used and new cars in the Czech Republic. People can choose from up to 90,000 current sellers’ ads from across the country. Advanced filtering makes finding a car easier.

    Hry.cz

    Hry.cz

    The Czech video game portal where you find your next video game to play. There are plenty of video games for different devices, including on-line browser games.

    Seznam.cz/vychytavky

    Seznam.cz/vychytavky

    The news feed of the Seznam.cz company where you can see the new features of all Seznam.cz services.

    - - +

    IMA.js

    A Javascript framework for creating isomorphic applications.

    Features

    Fully Isomorphic

    Write and run the same code at both the server side and the client side! IMA.js provides abstraction for APIs that differ at the client side javascript and the server side javascript.

    SEO

    Page metadata are centrally managed, allowing easier management of all your keywords and og meta-tags.

    Benchmarks and Tests

    Real-world heavy-load web services are run on the IMA.js platform. With hundreds of unit tests covering all of our code, you can rely on IMA.js to be a stable base of your application.

    Production-ready Full Application Stack

    Use the familiar MVC pattern in combination with React for rendering your UI. See Hello example.

    Routing

    IMA.js comes with a built-in router for processing GET and POST HTTP requests.

    Bleeding Edge Technologies

    ESNext, Webpack, SWC compiler, HMR and other technologies.

    Full plugin support

    IMA.js comes with full support for plugins that can be created very easily through very simple interface.

    Large collection of existing plugins

    We maintain a list of several plugins that are thoroughly tested and used every day on many of our websites here at Seznam.cz along with huge list of other plugins we use internally.

    Multiple running modes

    Application can be switched between IMA, SPA and MPA modes or combination of all of them.

    And many more...

    Configuration for all your environments in one place with inheritance.
    Out-of-box configurable server-side caching.
    REST API cache.
    Advanced error handling for greater stability and faster development.
    High-fidelity debug mode.
    Dependency injection.
    Analytics plugin, that provides interface to custom analytics, along with FB pixel and Google Analytics plugins.
    Generic REST API client plugin for the IMA application framework
    Plugin to simplify loading 3rd party scripts for the IMA.js application
    Reselect-style page state selector plugin for IMA.js components.
    And many more…

    Who's using IMA.js

    Seznamzpravy.cz

    Seznamzpravy.cz

    Seznam Zprávy is one of the top Czech news platforms, which delivers compelling, diverse and visually engaging stories in the form of a text and a video.

    Novinky.cz

    Novinky.cz

    One of the biggest and most visited news website in the Czech Republic. It offers coverage of the latest news from home and around the world in one place.

    Prozeny.cz

    Prozeny.cz

    The biggest online lifestyle magazine for women in the Czech Republic. Current articles about fashion, health and lifestyle, living, family, and a great section of recipes.

    Garaz.cz

    Garaz.cz

    The biggest online magazine about cars and motorcycles in the Czech Republic where you can found current articles about news from the car industry, service tips, reports from car events and wonderful video section.

    Počasí.cz

    Počasí.cz

    The most visited weather forecast website in the Czech republic. Offers weather forecast up to 6 days ahead for every place on Earth and interactive map with meteoradar.

    tv.seznam.cz

    tv.seznam.cz

    TV broadcast schedule for at least 14 days ahead, available for more than 100 most watched TV stations. Horizontal and vertical layout, notifications and social sharing is available.

    SBazar.cz

    SBazar.cz

    Sbazar.cz is one of the largest online peer to peer marketers in the Czech Republic. People can choose between 1,800,000 current offers. Advertising is clearly arranged into individual categories with the possibility of searching in a specific place in the Czechia.

    SAuto.cz

    SAuto.cz

    Sauto is the biggest marketplace of used and new cars in the Czech Republic. People can choose from up to 90,000 current sellers’ ads from across the country. Advanced filtering makes finding a car easier.

    Hry.cz

    Hry.cz

    The Czech video game portal where you find your next video game to play. There are plenty of video games for different devices, including on-line browser games.

    Seznam.cz/vychytavky

    Seznam.cz/vychytavky

    The news feed of the Seznam.cz company where you can see the new features of all Seznam.cz services.

    + + \ No newline at end of file diff --git a/introduction/configuration/index.html b/introduction/configuration/index.html index ed841ca9ce..0a2e410766 100644 --- a/introduction/configuration/index.html +++ b/introduction/configuration/index.html @@ -4,8 +4,8 @@ Configuration options | IMA.js - - + +
    @@ -33,8 +33,8 @@ prefixed by dollar sign $. Note that, again, the dev and test environment configuration automatically inherits values from the prod environment.

  • and finally, the app/config/bind.js configures the -Object container.

  • All of these files are necessary and must remain in their locations.

    - - +Object container.

    All of these files are necessary and must remain in their locations.

    + + \ No newline at end of file diff --git a/introduction/getting-started/index.html b/introduction/getting-started/index.html index babd020f00..8be3e2425b 100644 --- a/introduction/getting-started/index.html +++ b/introduction/getting-started/index.html @@ -4,8 +4,8 @@ Getting Started with IMA.js | IMA.js - - + +
    @@ -30,8 +30,8 @@ similar to the dev environment. To install the IMA.js application, start by cloning your application git repository on your production server:

    git clone [your-application-git-repository]

    Switch to the cloned directory and run the following commands to set-up your application - same as in the development mode - and build it:

    npm install
    npm run build

    Now after building your IMA.js application your server is ready to run it. You can start your application using the following command:

    npm run start

    Your application is now running at http://localhost:3001/ -(unless configured otherwise).

    - - +(unless configured otherwise).

    + + \ No newline at end of file diff --git a/migration/migration-0.14.0/index.html b/migration/migration-0.14.0/index.html index f7114a7a7b..7e0751f535 100644 --- a/migration/migration-0.14.0/index.html +++ b/migration/migration-0.14.0/index.html @@ -4,13 +4,13 @@ Migration 0.14.0 | IMA.js - - + +
    -

    Migration 0.14.0

    In order to upgrade your project to use IMA.js 0.14.0, please follow these steps:

    • Update your gulpfile.js to require the default configuration from the ima-gulp-tasks package in the gulpfile.js (see the example configuration).
    • If you are using custom build and dev tasks, remove the Es6toEs5:ima task from those.
    • Update your own custom gulp tasks to be compatible with gulp 4
    • Remove references to the ima.client.js file in the settings.js file and the bundle section in the build.js file.
    • Add the ima package to the common group in the vendors section in the build.js file.
    • Update your main.js file, the ima.onLoad method returns a promise instead of accepting a callback.
    • Update your ima-server installation according to the Hello World example.
    • Plugins can no longer use namespaces, please update your bind.js file if you were using namespace references to IMA plugins.
    • Import the RouteNames constants from ima/router/RouteNames in your router.js configuration file.
    • Components may now declare the defaultProps and propTypes static properties as getters.
    • The $ROUTER_CONSTANTS alias no longer exists (import the ima/router/RouteNames file).
    • The $HTTP_STATUS_CODE alias no longer exists (import the ima/http/StatusCode file).
    • Removed the $Promise, $CacheEntry, $PageRendererViewAdapter, $Route (switched to imports internally).
    • The loose mode of the ES2015 babel preset is no longer enabled.
    • Upgrade to node.js 7 or newer (older version might work but are no longer supported).
    • Switch to default exports in your configuration files.
    • Remove the './node_modules/ima-babel6-polyfill/index.js' reference from the polyfills list in gulpConfig.js (if overridden; this has been fixed by babel).
    • Remove the main.less file reference in the build.js file (unless it exists in the project).
    • Add the $CssClasses property to object in the $Utils OC alias.
    - - +

    Migration 0.14.0

    In order to upgrade your project to use IMA.js 0.14.0, please follow these steps:

    • Update your gulpfile.js to require the default configuration from the ima-gulp-tasks package in the gulpfile.js (see the example configuration).
    • If you are using custom build and dev tasks, remove the Es6toEs5:ima task from those.
    • Update your own custom gulp tasks to be compatible with gulp 4
    • Remove references to the ima.client.js file in the settings.js file and the bundle section in the build.js file.
    • Add the ima package to the common group in the vendors section in the build.js file.
    • Update your main.js file, the ima.onLoad method returns a promise instead of accepting a callback.
    • Update your ima-server installation according to the Hello World example.
    • Plugins can no longer use namespaces, please update your bind.js file if you were using namespace references to IMA plugins.
    • Import the RouteNames constants from ima/router/RouteNames in your router.js configuration file.
    • Components may now declare the defaultProps and propTypes static properties as getters.
    • The $ROUTER_CONSTANTS alias no longer exists (import the ima/router/RouteNames file).
    • The $HTTP_STATUS_CODE alias no longer exists (import the ima/http/StatusCode file).
    • Removed the $Promise, $CacheEntry, $PageRendererViewAdapter, $Route (switched to imports internally).
    • The loose mode of the ES2015 babel preset is no longer enabled.
    • Upgrade to node.js 7 or newer (older version might work but are no longer supported).
    • Switch to default exports in your configuration files.
    • Remove the './node_modules/ima-babel6-polyfill/index.js' reference from the polyfills list in gulpConfig.js (if overridden; this has been fixed by babel).
    • Remove the main.less file reference in the build.js file (unless it exists in the project).
    • Add the $CssClasses property to object in the $Utils OC alias.
    + + \ No newline at end of file diff --git a/migration/migration-0.15.0/index.html b/migration/migration-0.15.0/index.html index 2fdd1f021c..d0a5d78424 100644 --- a/migration/migration-0.15.0/index.html +++ b/migration/migration-0.15.0/index.html @@ -4,8 +4,8 @@ Migration 0.15.0 | IMA.js - - + +
    @@ -13,8 +13,8 @@ If you are't overriding polyfills or shims, you can skip this step.

    Example:

    shim: {
    js: {
    name: 'shim.js',
    src: ['./node_modules/ima/polyfill/collectionEnumeration.js'],
    dest: {
    client: './build/static/js/'
    }
    },
    es: {
    name: 'shim.es.js',
    src: [],
    dest: {
    client: './build/static/js/',
    server: './build/ima/'
    }
    }


    polyfill: {
    js: {
    name: 'polyfill.js',
    src: [
    './node_modules/babel-polyfill/dist/polyfill.min.js',
    './node_modules/custom-event-polyfill/custom-event-polyfill.js'
    ],
    dest: {
    client: './build/static/js/'
    }
    },
    es: {
    name: 'polyfill.es.js',
    src: ['./node_modules/custom-event-polyfill/custom-event-polyfill.js'],
    dest: {
    client: './build/static/js/'
    }
    },
    fetch: {
    name: 'fetch-polyfill.js',
    src: [
    './node_modules/core-js/client/shim.min.js',
    './node_modules/whatwg-fetch/fetch.js'
    ],
    dest: {
    client: './build/static/js/'
    }
    },
    ima: {
    name: 'ima-polyfill.js',
    src: [
    './node_modules/ima/polyfill/imaLoader.js',
    './node_modules/ima/polyfill/imaRunner.js'
    ],
    dest: {
    client: './build/static/js/'
    }
    }
    }

    In build.js add new property 'es' to bundle object:

    es: [
    './build/static/js/polyfill.es.js',
    './build/static/js/shim.es.js',
    './build/static/js/vendor.client.es.js',
    './build/static/js/app.client.es.js'
    ]

    Add to your settings.js prod.$Page.$Render new property esScripts like this:

    esScripts: [
    '/static/js/locale/' + config.$Language + '.js' + versionStamp,
    '/static/js/app.bundle.es.min.js' + versionStamp
    ]

    Add to your settings.js dev.$Page.$Render new property esScripts like this:

    esScripts: [
    '/static/js/polyfill.es.js' + versionStamp,
    '/static/js/shim.es.js' + versionStamp,
    '/static/js/vendor.client.es.js' + versionStamp,
    `/static/js/locale/${config.$Language}.js${versionStamp}`,
    '/static/js/app.client.es.js' + versionStamp,
    '/static/js/hot.reload.js' + versionStamp
    ]

    Karma removed instead of that added Jest

    If you are overriding gulpfile.js you need to make following changes:

    • remove from gulpConfig.tasks.dev task test:unit:karma:dev
    • remove from gulpConfig.tasks.dev and gulpConfig.tasks.build task Es6ToEs5:vendor:client:test
    • remove from function buildExample task Es6ToEs5:vendor:client:test

    If you are overriding gulpConfig.tasks.build in gulpConfig.js you need to add bundle:es:app into bundles section.

    Server

    In server.js

    Add at the top into import sections:

    require('ima/polyfill/imaLoader.js');
    require('ima/polyfill/imaRunner.js');

    add proxy into middlewares imports section

    let proxy = require('express-http-proxy');

    change line

    .use(environment.$Proxy.path + '/', proxy)

    to

    .use(environment.$Proxy.path + '/', proxy(environment.$Proxy.server))

    DocumentView

    In DocumentView.jsx we united sync and async scripts.

    • remove getSyncScripts function.
    • update getAsyncScripts function to
    getAsyncScripts() {
    let scriptResources = `<script>
    function checkAsyncAwait () {
    try {
    new Function('(async () => ({}))()');
    return true;
    } catch (e) {
    return false;
    }
    }
    $IMA.Runner = $IMA.Runner || {};
    if (Object.values && checkAsyncAwait()) {
    $IMA.Runner.scripts = [
    ${this.utils.$Settings.$Page.$Render.esScripts
    .map(script => `'${script}'`)
    .join()}
    ];
    } else {
    $IMA.Runner.scripts = [
    ${this.utils.$Settings.$Page.$Render.scripts
    .map(script => `'${script}'`)
    .join()}
    ];
    }

    if (!window.fetch) {
    $IMA.Runner.scripts.unshift('${this.utils.$Settings.$Static
    .js}/fetch-polyfill.js');
    }

    $IMA.Runner.scripts.forEach(function(source) {
    var script = document.createElement('script');
    script.async = $IMA.$Env !== 'dev';
    script.onload = $IMA.Runner.load;
    script.src = source;

    document.getElementById('scripts').appendChild(script);
    });
    </script>`;

    return scriptResources;
    }

    replace

    {this.utils.$Settings.$Env === 'dev' ?
    <div id='scripts'>{this.getSyncScripts()}</div>
    :
    <div id='scripts' dangerouslySetInnerHTML={
    { __html: this.getAsyncScripts() }
    }/>
    }

    with

    <div id='scripts' dangerouslySetInnerHTML={
    { __html: this.getAsyncScripts() }
    }/>

    SPA

    In app/assets/static/html/spa.html add ima-polyfill.

    Removed namespaces

    If you extends some view from ns.ima.page.AbstractComponent, you need to add this import:

    import AbstractComponent from 'ima/page/AbstractComponent';

    and use AbstractComponent instead of ns.ima.page.AbstractComponent.

    If you extends some view from ns.ima.controller.AbstractController, you need to add this import:

    import AbstractController from 'ima/controller/AbstractController';

    and use AbstractController instead of ns.ima.controller.AbstractController.

    In settings.js import your DocumentView like this:

    import DocumentView from 'app/component/document/DocumentView';

    Now you need to replace your documentView namespace with React component

    so for this step replace your configuration.prod.$Page.$Render.documentView to DocumentView.

    Others

    • IMA.js is now using React 16 where is no longer supported react-addons-perf package in case you were using it.
    • There was added a fetchOptions property to the IMA.js' http. You can add this property into your settings.js file to the $Http.defaultRequestOptions object. The property represents the second and optional parameter of the fetch method https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch - an options object containing -settings that you want to apply to the Fetch API https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API request.
    • There is a breaking change in the IMA.js' router. Now there is defined an order where mandatory parameters have to be before optional parameters.
    • There are no longer available Request and Response at the client side.
    - - +settings that you want to apply to the Fetch API https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API request.
  • There is a breaking change in the IMA.js' router. Now there is defined an order where mandatory parameters have to be before optional parameters.
  • There are no longer available Request and Response at the client side.
  • + + \ No newline at end of file diff --git a/migration/migration-0.16.0/index.html b/migration/migration-0.16.0/index.html index fb31af303a..a67d7b6d2a 100644 --- a/migration/migration-0.16.0/index.html +++ b/migration/migration-0.16.0/index.html @@ -4,13 +4,13 @@ Migration 0.16.0 | IMA.js - - + +
    -

    Migration 0.16.0

    Upgrading from version 15 should be pretty straightforward and your application should work with no to minimal changes required.

    Changes in dependencies

    • babel-eslint: 8.2.2    10.0.1
    • enzyme: 3.7.0    3.8.0
    • enzyme-adapter-react-16: 1.1.1    1.7.1
    • eslint: 4.19.1    5.11.1
    • eslint-config-prettier: 2.9.0    3.3.0
    • eslint-plugin-jasmine: 2.9.3    2.10.1
    • eslint-plugin-jest: 21.15.0    22.1.2
    • eslint-plugin-prettier: 2.6.0    3.0.1
    • eslint-plugin-react: 7.7.0    7.12.0
    • ima-gulp-tasks: 0.15.0    ^0.16.0
    • jest: 22.4.3    23.6.0
    • express-http-proxy: 1.1.0    1.5.0
    • helmet: 3.12.0    3.15.0
    • ima: 0.15.1    0.16.0
    • ima-server: 0.15.0    0.16.0
    • method-override: 2.3.10    3.0.0
    • multer: 1.3.0    1.4.1
    • react: 16.2.0    16.7.0
    • react-dom: 16.2.0    16.7.0
    • enzyme-to-json: ^3.3.5 (new)
    • jest-serializer-enzyme (removed)
    • react-test-renderer (removed)

    Migration guide

    • Use of regular expressions in serveSPA.blacklist. If you've been using array of strings, you need to change the syntax to use regular expressions instead:
    /* app/environment.js */
    {
    ...
    - blackList: ['Googlebot', 'SeznamBot'],
    + blackList: userAgent => (new RegExp('Googlebot|SeznamBot', 'g')).test(userAgent),
    ...
    }
    • Added new mandatory parameter action to route() method in Router of a type { type: string, event: Event|null, url: string|null }, where type attribute can take one of these values: const { REDIRECT, CLICK, POP_STATE, ERROR } = ActionTypes.
    /* ima/Router/ClientRouter.js */
    route(
    path,
    options = {},
    { event = null, type = ActionTypes.REDIRECT, url = null } = {}
    )
    • Http options withCredentials is set to false by default. You must check your HTTP CORS requests and you must set withCredentials to true for sending Cookie header.

    • New serializer settings in Jest, to configure it first add path to a newly created file jest.setup.js (located in the root directory) into setupFiles array in jest.config.json. After that add new snapshotSerializers field with ["enzyme-to-json/serializer"] value, that handles module loading, which converts Enzyme wrappers into format compatible with Jest snapshots.

    /* jest.config.json */
    "setupFiles": [
    "ima/test.js",
    "ima/polyfill/imaLoader.js",
    "ima/polyfill/imaRunner.js",
    + "<rootDir>/jest.setup.js"
    ],
    + snapshotSerializers": ["enzyme-to-json/serializer"]
    /* jest.setup.js */
    const enzyme = require('enzyme');
    const Adapter = require('enzyme-adapter-react-16');

    enzyme.configure({ adapter: new Adapter() });

    Other changes

    • IMA.js-helpers - removed throttle and debounce functions. You can replace throttle with throttle method available in UIComponentHelper in IMA.js-ui-atoms package. 73843d0
    • Updated to React 16.7, which along with new context API and other features introduced deprecation of componentWillMount, componentWillReceiveProps and componentWillUpdate lifecycle methods.
    • Upgraded to Babel 7 and latest ESLint 5, which may result on some changes specific to your application.

    New Features

    • Most notable new feature is the introduction of PageManagerHandlers which adds the possibility to customize actions like saving and restoring scroll positions, setting browser's address bar URL etc. For more information visit the documentation.
    - - +

    Migration 0.16.0

    Upgrading from version 15 should be pretty straightforward and your application should work with no to minimal changes required.

    Changes in dependencies

    • babel-eslint: 8.2.2    10.0.1
    • enzyme: 3.7.0    3.8.0
    • enzyme-adapter-react-16: 1.1.1    1.7.1
    • eslint: 4.19.1    5.11.1
    • eslint-config-prettier: 2.9.0    3.3.0
    • eslint-plugin-jasmine: 2.9.3    2.10.1
    • eslint-plugin-jest: 21.15.0    22.1.2
    • eslint-plugin-prettier: 2.6.0    3.0.1
    • eslint-plugin-react: 7.7.0    7.12.0
    • ima-gulp-tasks: 0.15.0    ^0.16.0
    • jest: 22.4.3    23.6.0
    • express-http-proxy: 1.1.0    1.5.0
    • helmet: 3.12.0    3.15.0
    • ima: 0.15.1    0.16.0
    • ima-server: 0.15.0    0.16.0
    • method-override: 2.3.10    3.0.0
    • multer: 1.3.0    1.4.1
    • react: 16.2.0    16.7.0
    • react-dom: 16.2.0    16.7.0
    • enzyme-to-json: ^3.3.5 (new)
    • jest-serializer-enzyme (removed)
    • react-test-renderer (removed)

    Migration guide

    • Use of regular expressions in serveSPA.blacklist. If you've been using array of strings, you need to change the syntax to use regular expressions instead:
    /* app/environment.js */
    {
    ...
    - blackList: ['Googlebot', 'SeznamBot'],
    + blackList: userAgent => (new RegExp('Googlebot|SeznamBot', 'g')).test(userAgent),
    ...
    }
    • Added new mandatory parameter action to route() method in Router of a type { type: string, event: Event|null, url: string|null }, where type attribute can take one of these values: const { REDIRECT, CLICK, POP_STATE, ERROR } = ActionTypes.
    /* ima/Router/ClientRouter.js */
    route(
    path,
    options = {},
    { event = null, type = ActionTypes.REDIRECT, url = null } = {}
    )
    • Http options withCredentials is set to false by default. You must check your HTTP CORS requests and you must set withCredentials to true for sending Cookie header.

    • New serializer settings in Jest, to configure it first add path to a newly created file jest.setup.js (located in the root directory) into setupFiles array in jest.config.json. After that add new snapshotSerializers field with ["enzyme-to-json/serializer"] value, that handles module loading, which converts Enzyme wrappers into format compatible with Jest snapshots.

    /* jest.config.json */
    "setupFiles": [
    "ima/test.js",
    "ima/polyfill/imaLoader.js",
    "ima/polyfill/imaRunner.js",
    + "<rootDir>/jest.setup.js"
    ],
    + snapshotSerializers": ["enzyme-to-json/serializer"]
    /* jest.setup.js */
    const enzyme = require('enzyme');
    const Adapter = require('enzyme-adapter-react-16');

    enzyme.configure({ adapter: new Adapter() });

    Other changes

    • IMA.js-helpers - removed throttle and debounce functions. You can replace throttle with throttle method available in UIComponentHelper in IMA.js-ui-atoms package. 73843d0
    • Updated to React 16.7, which along with new context API and other features introduced deprecation of componentWillMount, componentWillReceiveProps and componentWillUpdate lifecycle methods.
    • Upgraded to Babel 7 and latest ESLint 5, which may result on some changes specific to your application.

    New Features

    • Most notable new feature is the introduction of PageManagerHandlers which adds the possibility to customize actions like saving and restoring scroll positions, setting browser's address bar URL etc. For more information visit the documentation.
    + + \ No newline at end of file diff --git a/migration/migration-17.0.0/index.html b/migration/migration-17.0.0/index.html index 426b700a50..0edc6a3c3e 100644 --- a/migration/migration-17.0.0/index.html +++ b/migration/migration-17.0.0/index.html @@ -4,14 +4,14 @@ Migration 17.0.0 | IMA.js - - + +

    Migration 17.0.0

    IMA.js brings few major breaking changes, notably in the renaming of all packages. We've tried to make this process as easy as possible -through the provided jscodeshift transform scripts. For more information read below.

    Imports

    The ima- packages (even plugins) has been renamed to @ima/ scoped packages and ima core package has been renamed to @ima/core. The core package is now bundled with rollup, so you can no longer import a file from specific path (i.e. import GenericError from 'ima/error/GenericError'), but you can import it directly from @ima/core (i.e. import { GenericError } from '@ima/core').

    All of this can be done automatically for a whole project using following jscodeshift script.

    npx jscodeshift -t node_modules/@ima/core/transform/import-v17.js --extensions jsx,js --ignore-config=.gitignore ./

    Also replace paths which contain ima to @ima/core in package.json (setupFiles in jest) and server.js.

    Following packages have been renamed.

    ima-gulp-task-loader -> @ima/gulp-task-loader
    ima-gulp-tasks -> @ima/gulp-tasks
    ima-helpers -> @ima/helpers
    ima-server -> @ima/server

    Following packages have been removed.

    ima-examples
    ima-skeleton

    And as a replacement, following package has been created.

    create-ima-app

    Also all plugins have been renamed from ima-plugin-* to @ima/plugin-*.

    Context API

    IMA.js v17 no longer uses prop-types in contextTypes of React components. Instead, you should use PageContext from @ima/core. Also, prop-types has been removed from IMA.js dependencies, so if you need it for some reason, make sure it is installed as a project dependency.

    Example:

    This is original IMA.js v16 code.

    import PropTypes from 'prop-types';

    export default class MyComponent extends AbstractComponent {
    static get contextTypes() {
    return {
    $Utils: PropTypes.object,
    urlParams: PropTypes.object
    };
    }
    }

    This should be the new IMA.js v17 code.

    import { PageContext } from '@ima/core';

    export default class MyComponent extends AbstractComponent {
    static get contextType() {
    return PageContext;
    }
    }

    All of this can be done automatically for a whole project using following jscodeshift script.

    npx jscodeshift -t node_modules/@ima/core/transform/context-api-v17.js --extensions jsx,js --ignore-config=.gitignore ./

    Utils Registration

    There is a new way of defining component utils. You can no longer define oc.constant('$Utils', {...}) in app/conf/bind.js, you have to use oc.get(ComponentUtils).register({...}) instead. Also, following component utils are predefined by default, so you don't have to define them yourself.

    oc.get(ComponentUtils).register({
    $CssClasses: '$CssClasses',
    $Dictionary: Dictionary,
    $Dispatcher: Dispatcher,
    $EventBus: EventBus,
    $Helper: '$Helper',
    $Http: HttpAgent,
    $PageStateManager: PageStateManager,
    $Router: Router,
    $Settings: '$Settings',
    $Window: Window
    });

    Example:

    Following definition of utils is no longer supported.

    oc.constant('$Utils', {
    $MyCustomHelper: oc.get(MyCustomHelper),
    ...
    });

    And must be replaced with following.

    oc.get(ComponentUtils).register({
    $MyCustomHelper: MyCustomHelper,
    ...
    });

    IMA.js bundle for client/server

    IMA.js v17 comes bundled for server and client side. This means smaller bundle for clients. To benefit from this, you should update vendors in your app/build.js as following.

    let vendors = {
    - common: ['@ima/core'],
    + common: [],

    - server: [],
    + server: [{ '@ima/core': '@ima/core/dist/ima.server.cjs.js' }],

    - client: [],
    + client: [{ '@ima/core': '@ima/core/dist/ima.client.cjs.js' }],

    test: []
    };

    Language Key in Config

    Config key language (mostly used in app/config/*.js boot methods) has been renamed to $Language. You can search whole project for config.language and replace it with config.$Language, but most likely, it will be used only in app/config/settings.js.

    Hot Reload

    Hot Reload has been rewritten and published as ima plugin. Old hot reloading will no longer work. You should delete app/assets/js/hot.reload.js from your project, then install the plugin via npm install --save-dev @ima/plugin-websocket @ima/plugin-hot-reload and add following lines to your app/build.js.

    // You can add this somewhere below the vendors variable initialization
    if (
    process.env.NODE_ENV === 'dev' ||
    process.env.NODE_ENV === 'development' ||
    process.env.NODE_ENV === undefined
    ) {
    vendors.common.push('@ima/plugin-websocket');
    vendors.common.push('@ima/plugin-hot-reload');
    }

    IMA.js Plugins

    All IMA.js plugins need to be updated to the latest version. Older versions won't work.

    - - +through the provided jscodeshift transform scripts. For more information read below.

    Imports

    The ima- packages (even plugins) has been renamed to @ima/ scoped packages and ima core package has been renamed to @ima/core. The core package is now bundled with rollup, so you can no longer import a file from specific path (i.e. import GenericError from 'ima/error/GenericError'), but you can import it directly from @ima/core (i.e. import { GenericError } from '@ima/core').

    All of this can be done automatically for a whole project using following jscodeshift script.

    npx jscodeshift -t node_modules/@ima/core/transform/import-v17.js --extensions jsx,js --ignore-config=.gitignore ./

    Also replace paths which contain ima to @ima/core in package.json (setupFiles in jest) and server.js.

    Following packages have been renamed.

    ima-gulp-task-loader -> @ima/gulp-task-loader
    ima-gulp-tasks -> @ima/gulp-tasks
    ima-helpers -> @ima/helpers
    ima-server -> @ima/server

    Following packages have been removed.

    ima-examples
    ima-skeleton

    And as a replacement, following package has been created.

    create-ima-app

    Also all plugins have been renamed from ima-plugin-* to @ima/plugin-*.

    Context API

    IMA.js v17 no longer uses prop-types in contextTypes of React components. Instead, you should use PageContext from @ima/core. Also, prop-types has been removed from IMA.js dependencies, so if you need it for some reason, make sure it is installed as a project dependency.

    Example:

    This is original IMA.js v16 code.

    import PropTypes from 'prop-types';

    export default class MyComponent extends AbstractComponent {
    static get contextTypes() {
    return {
    $Utils: PropTypes.object,
    urlParams: PropTypes.object
    };
    }
    }

    This should be the new IMA.js v17 code.

    import { PageContext } from '@ima/core';

    export default class MyComponent extends AbstractComponent {
    static get contextType() {
    return PageContext;
    }
    }

    All of this can be done automatically for a whole project using following jscodeshift script.

    npx jscodeshift -t node_modules/@ima/core/transform/context-api-v17.js --extensions jsx,js --ignore-config=.gitignore ./

    Utils Registration

    There is a new way of defining component utils. You can no longer define oc.constant('$Utils', {...}) in app/conf/bind.js, you have to use oc.get(ComponentUtils).register({...}) instead. Also, following component utils are predefined by default, so you don't have to define them yourself.

    oc.get(ComponentUtils).register({
    $CssClasses: '$CssClasses',
    $Dictionary: Dictionary,
    $Dispatcher: Dispatcher,
    $EventBus: EventBus,
    $Helper: '$Helper',
    $Http: HttpAgent,
    $PageStateManager: PageStateManager,
    $Router: Router,
    $Settings: '$Settings',
    $Window: Window
    });

    Example:

    Following definition of utils is no longer supported.

    oc.constant('$Utils', {
    $MyCustomHelper: oc.get(MyCustomHelper),
    ...
    });

    And must be replaced with following.

    oc.get(ComponentUtils).register({
    $MyCustomHelper: MyCustomHelper,
    ...
    });

    IMA.js bundle for client/server

    IMA.js v17 comes bundled for server and client side. This means smaller bundle for clients. To benefit from this, you should update vendors in your app/build.js as following.

    let vendors = {
    - common: ['@ima/core'],
    + common: [],

    - server: [],
    + server: [{ '@ima/core': '@ima/core/dist/ima.server.cjs.js' }],

    - client: [],
    + client: [{ '@ima/core': '@ima/core/dist/ima.client.cjs.js' }],

    test: []
    };

    Language Key in Config

    Config key language (mostly used in app/config/*.js boot methods) has been renamed to $Language. You can search whole project for config.language and replace it with config.$Language, but most likely, it will be used only in app/config/settings.js.

    Hot Reload

    Hot Reload has been rewritten and published as ima plugin. Old hot reloading will no longer work. You should delete app/assets/js/hot.reload.js from your project, then install the plugin via npm install --save-dev @ima/plugin-websocket @ima/plugin-hot-reload and add following lines to your app/build.js.

    // You can add this somewhere below the vendors variable initialization
    if (
    process.env.NODE_ENV === 'dev' ||
    process.env.NODE_ENV === 'development' ||
    process.env.NODE_ENV === undefined
    ) {
    vendors.common.push('@ima/plugin-websocket');
    vendors.common.push('@ima/plugin-hot-reload');
    }

    IMA.js Plugins

    All IMA.js plugins need to be updated to the latest version. Older versions won't work.

    + + \ No newline at end of file diff --git a/migration/migration-18.0.0/index.html b/migration/migration-18.0.0/index.html index a9397ed12b..6fc7d9d085 100644 --- a/migration/migration-18.0.0/index.html +++ b/migration/migration-18.0.0/index.html @@ -4,8 +4,8 @@ Migration 18.0.0 | IMA.js - - + +
    @@ -14,8 +14,8 @@ There was removed test env.

    Templates

    • 400, 500, spa templates are in server/template (look at create-ima-app)

    Update DocumentView

    You can remove getAsyncScripts method and body content replace with: (You have to add $Page.$Render.masterElementId property to settings.js)

     <div
    id={this.utils.$Settings.$Page.$Render.masterElementId}
    dangerouslySetInnerHTML={{ __html: this.props.page }}
    />
    {'#{revivalCache}'}
    {'#{revivalSettings}'}
    {'#{runner}'}

    Instead of app css loading use:

      {'#{styles}'}

    Assets => app/public

    Everything from folder app/public is moved to build folder into static folder.

    Styles

    • Remove files mark as FAKE FILE FOR GULP LESS
    • Move less files from assets/less to app/less
    • You have to move definition of less files pathes from build.js to "imports" - you have two options:
      • import less files per component
      • import root less file e.g. in main.js and use glob pattern to import other less files similar like it was in build.js
    • app/less/globals.less - this file is prepending to every less file so that you can import here variables, mixins, etc.
    • strictMaths is enabled

    Tests

    Add @swc/jest dependency. Add identity-obj-proxy for css/less in jest. -Replace enzyme-adapter-react-16 with @cfaester/enzyme-adapter-react-18.

    Other changes

    • Prepared for typescript

    Deleted packages

    You can remove following packages:

    • @ima/react-hooks - functionality moved to @ima/react-page-renderer
    • @ima/plugin-less-constants moved to @ima/cli-plugin-less-constants
    • @ima/plugin-hot-reload
    • @ima/plugin-websocket
    • @ima/gulp-task-loader
    • @ima/gulp-tasks

    IMA.js Plugins

    All IMA.js plugins need to be updated to the latest version. Older versions won't work.

    - - +Replace enzyme-adapter-react-16 with @cfaester/enzyme-adapter-react-18.

    Other changes

    • Prepared for typescript

    Deleted packages

    You can remove following packages:

    • @ima/react-hooks - functionality moved to @ima/react-page-renderer
    • @ima/plugin-less-constants moved to @ima/cli-plugin-less-constants
    • @ima/plugin-hot-reload
    • @ima/plugin-websocket
    • @ima/gulp-task-loader
    • @ima/gulp-tasks

    IMA.js Plugins

    All IMA.js plugins need to be updated to the latest version. Older versions won't work.

    + + \ No newline at end of file diff --git a/migration/migration-19.0.0/index.html b/migration/migration-19.0.0/index.html index 5deb08efd1..989ecc9afc 100644 --- a/migration/migration-19.0.0/index.html +++ b/migration/migration-19.0.0/index.html @@ -4,13 +4,13 @@ Migration 19.0.0 | IMA.js - - + +
    -

    Migration from 18.x.x to 19.0.0

    While IMA.js 19 is not as big of a release as previous major version, it brings some potential breaking changes to certain API and removes some deprecated functions. We have also managed to pack some additional new features.

    info

    In addition to new features, there have been significant updates to TypeScript types in IMA monorepo. This should allow you to write even better applications in TypeScript, while also benefit from better autocomplete in JS applications.

    Migration Guide

    The list of changes required to get your app compiled is pretty minimal, however we suggest you take a look at all potential breaking changes in the (full list of changes)[migration-19.0.0.md#breaking-changes].

    @ima/server updates

    • @ima/server now contains named exports, change following in ./server/app.js
    // from
    const imaServer = require('@ima/server')();

    // to
    const { createIMAServer } = require('@ima/server');
    const imaServer = createIMAServer();
    • Update definition of $Source, $RevivalSettings, $RevivalCache, $Runner, $Styles, $Scripts content variables in spa.ejs and DocumentView. These have been replaced by their lowerFirst counter-parts resource (now replaces $Source), revivalSettings, revivalCache, runner, styles, while $Scripts support have been dropped completely.
    • Remove urlParser middleware from app.js, it is now part of renderApp middleware as a server hook.

    Update @ima/react-page-renderer import

    Change ClientPageRenderer import from default to named import.

    // from
    import ClientPageRenderer
    from '@ima/react-page-renderer/dist/esm/client/renderer/ClientPageRenderer';

    // to
    import { ClientPageRenderer }
    from '@ima/react-page-renderer/renderer/ClientPageRenderer';

    Register new PageMetaHandler

    Add new PageMetaHandler to PageHandlerRegistry in bind.js

    oc.inject(PageHandlerRegistry, [PageNavigationHandler, PageMetaHandler, SspPageHandler]);

    Optionally remove all meta tag renders from DocumentView and spa.ejs including <title /> tag. These can be replaced with #{meta} content variable,

    Fire method params order change

    In v18 after introducting the need for a EventTarget in EventBus.fire methods, we made a mistake with the argument order. In v19 it has been moved to first position to match other event handling methods.

    // from
    this.fire('fetchDataArticles', event.target, { data: true })

    // to
    this.fire(event.target, 'fetchDataArticles', { data: true })

    Removed duplicates from HttpAgent settings:

    • headers have been moved to fetchOptions:
    // from
    $Http: {
    defaultRequestOptions: {
    headers: {
    // Set default request headers
    Accept: 'application/json',
    'Accept-Language': config.$Language,
    },
    fetchOptions: {
    mode: 'cors',
    },
    },
    }

    // to
    $Http: {
    defaultRequestOptions: {
    fetchOptions: {
    mode: 'cors',
    headers: {
    // Set default request headers
    Accept: 'application/json',
    'Accept-Language': config.$Language,
    },
    },
    },
    }

    Full list of changes

    New features

    @ima/cli

    • Added support for 3rd party source maps using source-loader, this is usefull especially in error overlay.
    • Added ability to customize open URL using --openUrl CLI argument or IMA_CLI_OPEN_URL environment variable. For more information see --openUrl.
    • Performance improvement when building CSS/LESS files (except CSS modules), on server and client bundles. This can add up to 25% built speed improvement depending on the amount of CSS files your project is using.
    • Added additional CLI output information when forcedLegacy and writeToDisk options are used.
    • Fixed manifest CSS files regexp, only files from static/css/ folder are now included in final manifest.json file.
    • Added new export for findRules, this is simple helper function you can use to extract rules from webpack config in yor plugins for easier customization.
    • Added new export for createWebpackConfig, when provided with CLI args and imaConfig, it generates webpack configurations which are then passed to webpack compiler. This can be usefull for other tooling like StoryBook, where you need to customize different webpack config with fields from the IMA app one
    • Added additional ImaConfigurationContext variables: isClientES, isClient and outputFolders.
    • Added support for prepareConfigurations CLI plugin method, which lets you customize webpack configuration contexts, before generating webpack config from them.
    • Added new cssBrowsersTarget ima.config.js settings, this allows you to easily customize postcss-preset-env browsers targets field.

    New @ima/cli@19 features

    New @ima/cli@19 features

    @ima/plugin-cli

    • Added support for source-maps, now all files transformed using swc (JS/TS) also produce .map files alongside transformed files.
    • Added ability to enable/disable source maps generation using sourceMaps option in ima-plugin.config.js configuration file.
    • Added ability to add new custom transformers using transformers option in ima-plugin.config.js configuration file.
    • When parsing configuration file the plugin now searches for ima-plugin.config.js files recursively up to filesystem root. This allows to have one custom config file for monorepositories and removes the need of duplicating same config across all package directories.

    @ima/hmr-client

    • Fixed async issue in HMR, where IMA app could be re-rendered before the old instance finished cleanup.

    @ima/core

    • Added new CancelError used for canceling running route handlers.
    • Fix window history for error action, error pages are now not added to window history.
    • Package source files now include source map files.
    • Added RouterEvents.BEFORE_LOADING_ASYNC_ROUTE and RouterEvents.AFTER_LOADING_ASYNC_ROUTE dispatcher events, which you can use to implement custom loaders when routing between async routes (or use it for any other handling).
    • All exports now use named exports (this is technically only package-wide change and does not mean nothing for the end user).
    • Added multiple new TS types, while also fixing existing types. Since rewriting IMA.js to typescript has been huge task, there may still be some type inconsistencies which we will try to fix in following releases to further improve TS experience in IMA.js ecosystem.
    • Added new onRun event to window.$IMA.Runner.
    • Add new methods isClientError() and isRedirection() to GenericError.
    • getRouteHandlersByPath() method on AbstractRouter is now public. This return's middlewares and route for given path.
    • Fixed HttpAgent types -> data in method arguments should be optional
    • Fixed missing transaction cleanup in PageStateManager
    • Fix missing optional parameters in static router that were evaluated as undefined instead of 'undefined'.
    • Added autocompletion support for language file keys in localization functions. To be able to use this function, update jsconfig.json/tsconfig.json according to the documentation (adding ./build/tmp/types/**/*" path to include field should suffice).
    • Controller and Extension event bus methods can be targeted with prefix. Prefix is set by static field in controller/extension class e.g. $name = 'ArticleController';. Event is then ArticleController.eventName:
    ./app/page/article/ArticleController.js
    class ArticleController {
    static $name = 'ArticleController';

    onExpand({ expandableId }) {
    console.log(expandableId);
    }
    }
    ./app/component/expandable/ExpandLink.jsx
    function ExpandLink() {
    onClick(event) {
    const { expandableId } = this.props;
    this.fire('ArticleController.expand', { expandableId });
    }
    }

    Router changes

    • Added middleware execution timeout => all middlewares must execute within this defined timeframe (defaults to 30s). This can be customized using $Router.middlewareTimeout app settings.
    • Router middlewares now support next callback, which when defined, has to be called, otherwise the middleware will eventually timeout and not proceed any further. This enables some additional features, where you are able to stop route processing by not calling the next function if desired.
    • Middlewares can now return object value, which will be merged to the locals object, received as a second argument in middleware function. Middlewares wich next callback function can "return" additional locals by calling next with an argument.
    router.use(async (params, locals, next) => {
    next({ counter: counter++ });
    });

    @ima/react-page-renderer

    • Package source files now include source map files.
    • Fixed once hook parametr type.
    • Moved meta tags management to new PageMetaHandler, see Seo and Meta Manager section for new updates to meta manager.
    • IMA specific React hooks have been rewritten to TypeScript.
    • Added package exports of multiple missing TS types and other interfaces (this provides better support for writing your applications in TS).

    @ima/error-overlay

    • Fixed an issue where invalid Error params caused circular dependency error.
    • Fixed an issue where errors, that occurred before error overlay is initialized were not reported to the error overlay.
    • Reduced number of levels that are expanded by default in error overlay error params view.
    • Added ability to hide/show error params, this settings is saved to local storage.

    @ima/server

    • Style content variable now automatically generates preload links for app styles.
    • Added new metric - concurrent requests to monitoring.
    • Add information about error cause in places, where we used to throw away this information.
    • Add routeName key to res.locals instead of res.$IMA, since res.$IMA should not be used anymore.
    • Added X-Request-ID to revival settings. Can be accessed through $IMA.$RequestID. This can be usefull to match same requests between client and server instances.
    • Added XSS protection to host and protocol in revival settings.
    • Add support for Client Errors and Redirects when serving static error pages.
    • Added option to force app host and protocol, using $Server.host and $Server.protocol settings in the environment.js. (These 2 values can also be functions).
    • The App error route is protected for exceeding static thresholds.
    • The Emitter event.cause is removed. The error cause is set in event.error.cause.
    • Fixed issue with dummyApp forcing 'en' language, which fails to resolve on applications with different language settings.
    • Fixed issue where server redirect showed ErrorOverlay in debug mode.
    • The instances of $Dispatcher, $Cache, $PageRenderer and $PageManager are cleared after server sending response. Clearing PageManager cause calling destroy lifecycle method of controller and extensions on server.
    • Add option to use custom manifestRequire.
    • SPA blacklist config is omitted for using degradation isSPA method when decision serving SPA page.

    create-ima-app

    • Added new typescript template, use --typescript option when generating new application.
    • Migrated from default to named exports.
    • Fixed default static path and public path settings.
    • Updated environment.js and settings.js to support new IMA19 features.

    Breaking Changes

    @ima/cli

    • Removed isESVersion ImaConfigurationContext variable (use isClientES instead).

    @ima/core

    • AbstractRouter.manage method no longer has controller and view properties in an object argument.
    • Multiple changes in router route handling and page manager with a goal of implementing ability to cancel running handlers before handling a new ones. This results in much more stable routing specifically when using async routes. Each route should now be executed "sequentially" where BEFORE/AFTER_HANDLE_ROUTE router events should always fire in correct order. Also if you quickly move between different routes, without them finishing loading, the page manager is able to cancel it's executing mid handling and continue with a new route, which results in faster and more stable routing. While this change is essentially not a breaking change, since it only changes our internal API, it could possibly result in some new behavior.
    • Removed ExtensibleError.
    • StatusCode has been renamed to HttpStatusCode.
    • $Source environment.js variable has been renamed to $Resources.
    • Removed deprecated package entry points, this includes all imports directly referencing files from ./dist/ directory. Please update your imports to the new exports fields.
    • extractParameters() function in DynamicRoute now receives additional object argument, containing query and path (not modified path) for more control over extracted parameters. The router now uses params returned from extractParameters() directly. It no longer automatically merges query params into the resulting object. If you want to preserve this behavior, merge the extracted route params with query object provided in the second argument.

    Router changes

    • Replace custom URL parsing methods in AbstractRoute, StaticRoute and DynamicRoute with combination of native URL and URLSearchParams.
    • Removed pairsToQuery, paramsToQuery, getQuery, decodeURIParameter static methods on AbstractRoute. These have been replaced with combination of native URL and URLSearchParams interfaces.
    • getTrimmedPath static method in AbstractRoute is now instance method.
    • Url query params with no value (?param=) are no longer extracted as { param: true }, but as { param: '' }. Please update your code to check for key presence in these cases rather than true value.
    • Parsing of semi-colons inside query params is not supported (as a result of using URLSearchParams)

    HttpAgent changes

    • IMA HttpAgent now removes by default all headers from request and response which is stored in Cache. You can turn off this behavior with keepSensitiveHeaders option but it is not recommended.
    • Removed support for HttpAgent options.listener (these were used mainly in plugin-xhr, which is now unsupported)
    • You can now define multiple postProcessors[] in HttpAgent options. This replaces old postProcessor option, if you are using any post processor you need to update your options to postProcessors and make sure to wrap this post processor in an array.
    • Remove older, conflicting settings of HttpAgent, withCredentials, headers, and listeners. The first two now conflict with the newer options.fetchOptions, the last one (listeners) has been removed completely. options.withCredentials and options.headers are no longer followed. Use options.fetchOptions.credentials and options.fetchOptions.headers instead. For definition, see the native Fetch API (note: for simplicity, options.fetchOptions.headers only accepts headers defined by an object, not a tuple or an instance of Headers).

    MetaManager changes

    • Rewritten meta tag management in SPA mode, all MetaManager managed tags are removed between pages while new page contains only those currently defined using setMetaParams function in app controller. This should make meta tags rendering more deterministic, while fixing situations where old meta tags might be left on the page indefinitely if not cleaner properly.
    • MetaManager getters now always return object with key=value pairs of their set value. This should make settings additional meta attributes in loops much easier (for example: getMetaProperty('og:title'); -> { property: 'property-value' });)
    • Meta values/attributes with null/undefined values are not rendered, other values are converted to string.
    • Added new iterator functions to MetaManager.
    this.#metaManager.getMetaNamesIterator();
    this.#metaManager.getMetaPropertiesIterator();
    this.#metaManager.getLinksIterator();
    • Added ability to set additional attributes for meta tags/links in meta manager:
    this.#metaManager.setLink('lcp-image', media.url, {
    'lcp-image-imagesizes': media.sizes,
    'lcp-image-imagesrcset': media.srcSet
    });

    @ima/react-page-renderer

    • Removed deprecated package entry points, this includes all imports directly referencing files from ./dist/ directory. Please update your imports to the new exports fields.
    • isSSR hook has been removed, use window.isClient() directly from useComponentUtils().
    • useSettings now returns undefined, when settings is not found when using selector namespace as an argument.
    • All exports are now named exports, you need to update import to ClientPageRenderer in bind.js to:
    • Changed signature of useWindowEvent hook, it now matches bindEventListener parameters of ima window.
    ./app/config/bind.js
    import { ClientPageRenderer } from '@ima/react-page-renderer/renderer/ClientPageRenderer';
    • Change order of method arguments in Component fire method. target has been moved to the first argument position.
    // from
    this.fire('fetchDataArticles', event.target, { data: true })

    // to
    this.fire(event.target, 'fetchDataArticles', { data: true })

    @ima/dev-utils

    @ima/server

    • Update @esmj/monitor to 0.5.0 with breaking change for returns value from subscribe method where returns subscription is object with unsubscribe method.
    • Migrated urlParser middleware to ima server BeforeRequest hook. Remove urlParser middleware from app.js, it is now part of renderApp middleware.
    • Dropped support for direct response.contentVariables mutations, use event.result and return values in CreateContentVariables event.
    • Dropped support for $Source, $RevivalSettings, $RevivalCache, $Runner, $Styles, $Scripts content variables. These have been replaced by their lowerFirst counter-parts resource (now replaces $Source), revivalSettings, revivalCache, runner, styles, while $Scripts support have been dropped completely.
    • Default resources in $Resources now produce styles and esStyles fields (should not break anything in 99% of the applications). This does not necessarily mean which should be loaded on which es version, but what bundle produced those styles. This also means that without any custom configuration, all styles should now be under esStyles key, since they are built in client.es webpack bundle. This change was made to enable built of 2 CSS bundles simliar to how we handle ES bundles. This can be enabled using @ima/cli-plugin-legacy-css.
    • The package now provides multiple additional exports using named exports, the deafult export has been replaced with named createIMAServer function.
    - - +

    Migration from 18.x.x to 19.0.0

    While IMA.js 19 is not as big of a release as previous major version, it brings some potential breaking changes to certain API and removes some deprecated functions. We have also managed to pack some additional new features.

    info

    In addition to new features, there have been significant updates to TypeScript types in IMA monorepo. This should allow you to write even better applications in TypeScript, while also benefit from better autocomplete in JS applications.

    Migration Guide

    The list of changes required to get your app compiled is pretty minimal, however we suggest you take a look at all potential breaking changes in the (full list of changes)[migration-19.0.0.md#breaking-changes].

    @ima/server updates

    • @ima/server now contains named exports, change following in ./server/app.js
    // from
    const imaServer = require('@ima/server')();

    // to
    const { createIMAServer } = require('@ima/server');
    const imaServer = createIMAServer();
    • Update definition of $Source, $RevivalSettings, $RevivalCache, $Runner, $Styles, $Scripts content variables in spa.ejs and DocumentView. These have been replaced by their lowerFirst counter-parts resource (now replaces $Source), revivalSettings, revivalCache, runner, styles, while $Scripts support have been dropped completely.
    • Remove urlParser middleware from app.js, it is now part of renderApp middleware as a server hook.

    Update @ima/react-page-renderer import

    Change ClientPageRenderer import from default to named import.

    // from
    import ClientPageRenderer
    from '@ima/react-page-renderer/dist/esm/client/renderer/ClientPageRenderer';

    // to
    import { ClientPageRenderer }
    from '@ima/react-page-renderer/renderer/ClientPageRenderer';

    Register new PageMetaHandler

    Add new PageMetaHandler to PageHandlerRegistry in bind.js

    oc.inject(PageHandlerRegistry, [PageNavigationHandler, PageMetaHandler, SspPageHandler]);

    Optionally remove all meta tag renders from DocumentView and spa.ejs including <title /> tag. These can be replaced with #{meta} content variable,

    Fire method params order change

    In v18 after introducting the need for a EventTarget in EventBus.fire methods, we made a mistake with the argument order. In v19 it has been moved to first position to match other event handling methods.

    // from
    this.fire('fetchDataArticles', event.target, { data: true })

    // to
    this.fire(event.target, 'fetchDataArticles', { data: true })

    Removed duplicates from HttpAgent settings:

    • headers have been moved to fetchOptions:
    // from
    $Http: {
    defaultRequestOptions: {
    headers: {
    // Set default request headers
    Accept: 'application/json',
    'Accept-Language': config.$Language,
    },
    fetchOptions: {
    mode: 'cors',
    },
    },
    }

    // to
    $Http: {
    defaultRequestOptions: {
    fetchOptions: {
    mode: 'cors',
    headers: {
    // Set default request headers
    Accept: 'application/json',
    'Accept-Language': config.$Language,
    },
    },
    },
    }

    Full list of changes

    New features

    @ima/cli

    • Added support for 3rd party source maps using source-loader, this is usefull especially in error overlay.
    • Added ability to customize open URL using --openUrl CLI argument or IMA_CLI_OPEN_URL environment variable. For more information see --openUrl.
    • Performance improvement when building CSS/LESS files (except CSS modules), on server and client bundles. This can add up to 25% built speed improvement depending on the amount of CSS files your project is using.
    • Added additional CLI output information when forcedLegacy and writeToDisk options are used.
    • Fixed manifest CSS files regexp, only files from static/css/ folder are now included in final manifest.json file.
    • Added new export for findRules, this is simple helper function you can use to extract rules from webpack config in yor plugins for easier customization.
    • Added new export for createWebpackConfig, when provided with CLI args and imaConfig, it generates webpack configurations which are then passed to webpack compiler. This can be usefull for other tooling like StoryBook, where you need to customize different webpack config with fields from the IMA app one
    • Added additional ImaConfigurationContext variables: isClientES, isClient and outputFolders.
    • Added support for prepareConfigurations CLI plugin method, which lets you customize webpack configuration contexts, before generating webpack config from them.
    • Added new cssBrowsersTarget ima.config.js settings, this allows you to easily customize postcss-preset-env browsers targets field.

    New @ima/cli@19 features

    New @ima/cli@19 features

    @ima/plugin-cli

    • Added support for source-maps, now all files transformed using swc (JS/TS) also produce .map files alongside transformed files.
    • Added ability to enable/disable source maps generation using sourceMaps option in ima-plugin.config.js configuration file.
    • Added ability to add new custom transformers using transformers option in ima-plugin.config.js configuration file.
    • When parsing configuration file the plugin now searches for ima-plugin.config.js files recursively up to filesystem root. This allows to have one custom config file for monorepositories and removes the need of duplicating same config across all package directories.

    @ima/hmr-client

    • Fixed async issue in HMR, where IMA app could be re-rendered before the old instance finished cleanup.

    @ima/core

    • Added new CancelError used for canceling running route handlers.
    • Fix window history for error action, error pages are now not added to window history.
    • Package source files now include source map files.
    • Added RouterEvents.BEFORE_LOADING_ASYNC_ROUTE and RouterEvents.AFTER_LOADING_ASYNC_ROUTE dispatcher events, which you can use to implement custom loaders when routing between async routes (or use it for any other handling).
    • All exports now use named exports (this is technically only package-wide change and does not mean nothing for the end user).
    • Added multiple new TS types, while also fixing existing types. Since rewriting IMA.js to typescript has been huge task, there may still be some type inconsistencies which we will try to fix in following releases to further improve TS experience in IMA.js ecosystem.
    • Added new onRun event to window.$IMA.Runner.
    • Add new methods isClientError() and isRedirection() to GenericError.
    • getRouteHandlersByPath() method on AbstractRouter is now public. This return's middlewares and route for given path.
    • Fixed HttpAgent types -> data in method arguments should be optional
    • Fixed missing transaction cleanup in PageStateManager
    • Fix missing optional parameters in static router that were evaluated as undefined instead of 'undefined'.
    • Added autocompletion support for language file keys in localization functions. To be able to use this function, update jsconfig.json/tsconfig.json according to the documentation (adding ./build/tmp/types/**/*" path to include field should suffice).
    • Controller and Extension event bus methods can be targeted with prefix. Prefix is set by static field in controller/extension class e.g. $name = 'ArticleController';. Event is then ArticleController.eventName:
    ./app/page/article/ArticleController.js
    class ArticleController {
    static $name = 'ArticleController';

    onExpand({ expandableId }) {
    console.log(expandableId);
    }
    }
    ./app/component/expandable/ExpandLink.jsx
    function ExpandLink() {
    onClick(event) {
    const { expandableId } = this.props;
    this.fire('ArticleController.expand', { expandableId });
    }
    }

    Router changes

    • Added middleware execution timeout => all middlewares must execute within this defined timeframe (defaults to 30s). This can be customized using $Router.middlewareTimeout app settings.
    • Router middlewares now support next callback, which when defined, has to be called, otherwise the middleware will eventually timeout and not proceed any further. This enables some additional features, where you are able to stop route processing by not calling the next function if desired.
    • Middlewares can now return object value, which will be merged to the locals object, received as a second argument in middleware function. Middlewares wich next callback function can "return" additional locals by calling next with an argument.
    router.use(async (params, locals, next) => {
    next({ counter: counter++ });
    });

    @ima/react-page-renderer

    • Package source files now include source map files.
    • Fixed once hook parametr type.
    • Moved meta tags management to new PageMetaHandler, see Seo and Meta Manager section for new updates to meta manager.
    • IMA specific React hooks have been rewritten to TypeScript.
    • Added package exports of multiple missing TS types and other interfaces (this provides better support for writing your applications in TS).

    @ima/error-overlay

    • Fixed an issue where invalid Error params caused circular dependency error.
    • Fixed an issue where errors, that occurred before error overlay is initialized were not reported to the error overlay.
    • Reduced number of levels that are expanded by default in error overlay error params view.
    • Added ability to hide/show error params, this settings is saved to local storage.

    @ima/server

    • Style content variable now automatically generates preload links for app styles.
    • Added new metric - concurrent requests to monitoring.
    • Add information about error cause in places, where we used to throw away this information.
    • Add routeName key to res.locals instead of res.$IMA, since res.$IMA should not be used anymore.
    • Added X-Request-ID to revival settings. Can be accessed through $IMA.$RequestID. This can be usefull to match same requests between client and server instances.
    • Added XSS protection to host and protocol in revival settings.
    • Add support for Client Errors and Redirects when serving static error pages.
    • Added option to force app host and protocol, using $Server.host and $Server.protocol settings in the environment.js. (These 2 values can also be functions).
    • The App error route is protected for exceeding static thresholds.
    • The Emitter event.cause is removed. The error cause is set in event.error.cause.
    • Fixed issue with dummyApp forcing 'en' language, which fails to resolve on applications with different language settings.
    • Fixed issue where server redirect showed ErrorOverlay in debug mode.
    • The instances of $Dispatcher, $Cache, $PageRenderer and $PageManager are cleared after server sending response. Clearing PageManager cause calling destroy lifecycle method of controller and extensions on server.
    • Add option to use custom manifestRequire.
    • SPA blacklist config is omitted for using degradation isSPA method when decision serving SPA page.

    create-ima-app

    • Added new typescript template, use --typescript option when generating new application.
    • Migrated from default to named exports.
    • Fixed default static path and public path settings.
    • Updated environment.js and settings.js to support new IMA19 features.

    Breaking Changes

    @ima/cli

    • Removed isESVersion ImaConfigurationContext variable (use isClientES instead).

    @ima/core

    • AbstractRouter.manage method no longer has controller and view properties in an object argument.
    • Multiple changes in router route handling and page manager with a goal of implementing ability to cancel running handlers before handling a new ones. This results in much more stable routing specifically when using async routes. Each route should now be executed "sequentially" where BEFORE/AFTER_HANDLE_ROUTE router events should always fire in correct order. Also if you quickly move between different routes, without them finishing loading, the page manager is able to cancel it's executing mid handling and continue with a new route, which results in faster and more stable routing. While this change is essentially not a breaking change, since it only changes our internal API, it could possibly result in some new behavior.
    • Removed ExtensibleError.
    • StatusCode has been renamed to HttpStatusCode.
    • $Source environment.js variable has been renamed to $Resources.
    • Removed deprecated package entry points, this includes all imports directly referencing files from ./dist/ directory. Please update your imports to the new exports fields.
    • extractParameters() function in DynamicRoute now receives additional object argument, containing query and path (not modified path) for more control over extracted parameters. The router now uses params returned from extractParameters() directly. It no longer automatically merges query params into the resulting object. If you want to preserve this behavior, merge the extracted route params with query object provided in the second argument.

    Router changes

    • Replace custom URL parsing methods in AbstractRoute, StaticRoute and DynamicRoute with combination of native URL and URLSearchParams.
    • Removed pairsToQuery, paramsToQuery, getQuery, decodeURIParameter static methods on AbstractRoute. These have been replaced with combination of native URL and URLSearchParams interfaces.
    • getTrimmedPath static method in AbstractRoute is now instance method.
    • Url query params with no value (?param=) are no longer extracted as { param: true }, but as { param: '' }. Please update your code to check for key presence in these cases rather than true value.
    • Parsing of semi-colons inside query params is not supported (as a result of using URLSearchParams)

    HttpAgent changes

    • IMA HttpAgent now removes by default all headers from request and response which is stored in Cache. You can turn off this behavior with keepSensitiveHeaders option but it is not recommended.
    • Removed support for HttpAgent options.listener (these were used mainly in plugin-xhr, which is now unsupported)
    • You can now define multiple postProcessors[] in HttpAgent options. This replaces old postProcessor option, if you are using any post processor you need to update your options to postProcessors and make sure to wrap this post processor in an array.
    • Remove older, conflicting settings of HttpAgent, withCredentials, headers, and listeners. The first two now conflict with the newer options.fetchOptions, the last one (listeners) has been removed completely. options.withCredentials and options.headers are no longer followed. Use options.fetchOptions.credentials and options.fetchOptions.headers instead. For definition, see the native Fetch API (note: for simplicity, options.fetchOptions.headers only accepts headers defined by an object, not a tuple or an instance of Headers).

    MetaManager changes

    • Rewritten meta tag management in SPA mode, all MetaManager managed tags are removed between pages while new page contains only those currently defined using setMetaParams function in app controller. This should make meta tags rendering more deterministic, while fixing situations where old meta tags might be left on the page indefinitely if not cleaner properly.
    • MetaManager getters now always return object with key=value pairs of their set value. This should make settings additional meta attributes in loops much easier (for example: getMetaProperty('og:title'); -> { property: 'property-value' });)
    • Meta values/attributes with null/undefined values are not rendered, other values are converted to string.
    • Added new iterator functions to MetaManager.
    this.#metaManager.getMetaNamesIterator();
    this.#metaManager.getMetaPropertiesIterator();
    this.#metaManager.getLinksIterator();
    • Added ability to set additional attributes for meta tags/links in meta manager:
    this.#metaManager.setLink('lcp-image', media.url, {
    'lcp-image-imagesizes': media.sizes,
    'lcp-image-imagesrcset': media.srcSet
    });

    @ima/react-page-renderer

    • Removed deprecated package entry points, this includes all imports directly referencing files from ./dist/ directory. Please update your imports to the new exports fields.
    • isSSR hook has been removed, use window.isClient() directly from useComponentUtils().
    • useSettings now returns undefined, when settings is not found when using selector namespace as an argument.
    • All exports are now named exports, you need to update import to ClientPageRenderer in bind.js to:
    • Changed signature of useWindowEvent hook, it now matches bindEventListener parameters of ima window.
    ./app/config/bind.js
    import { ClientPageRenderer } from '@ima/react-page-renderer/renderer/ClientPageRenderer';
    • Change order of method arguments in Component fire method. target has been moved to the first argument position.
    // from
    this.fire('fetchDataArticles', event.target, { data: true })

    // to
    this.fire(event.target, 'fetchDataArticles', { data: true })

    @ima/dev-utils

    @ima/server

    • Update @esmj/monitor to 0.5.0 with breaking change for returns value from subscribe method where returns subscription is object with unsubscribe method.
    • Migrated urlParser middleware to ima server BeforeRequest hook. Remove urlParser middleware from app.js, it is now part of renderApp middleware.
    • Dropped support for direct response.contentVariables mutations, use event.result and return values in CreateContentVariables event.
    • Dropped support for $Source, $RevivalSettings, $RevivalCache, $Runner, $Styles, $Scripts content variables. These have been replaced by their lowerFirst counter-parts resource (now replaces $Source), revivalSettings, revivalCache, runner, styles, while $Scripts support have been dropped completely.
    • Default resources in $Resources now produce styles and esStyles fields (should not break anything in 99% of the applications). This does not necessarily mean which should be loaded on which es version, but what bundle produced those styles. This also means that without any custom configuration, all styles should now be under esStyles key, since they are built in client.es webpack bundle. This change was made to enable built of 2 CSS bundles simliar to how we handle ES bundles. This can be enabled using @ima/cli-plugin-legacy-css.
    • The package now provides multiple additional exports using named exports, the deafult export has been replaced with named createIMAServer function.
    + + \ No newline at end of file diff --git a/plugins/available-plugins/index.html b/plugins/available-plugins/index.html index ce81328a15..4ab698ea89 100644 --- a/plugins/available-plugins/index.html +++ b/plugins/available-plugins/index.html @@ -4,14 +4,14 @@ Existing plugins | IMA.js - - + +

    Existing plugins

    We've already described a way to create your own IMA.js plugins -through a very simple interface. Now we would like to talk about IMA.js-plugins monorepo that already contains variety of plugins that covers many of the common use cases.

    IMA.js-plugins

    Each plugin in this repository is thoroughly tested and maintained, so it always works with the most up to date IMA.js version. We, here at Seznam.cz use it daily in production on many of our projects, so don't worry about using them safely in the production environment.

    Without further ado, let's quickly describe in this compact list what each plugin does and when you would want to use them:

    note

    This list is updated manually, so there can be situations where it doesn't match on 100% what is currently present in the monorepository itself.

    - - +through a very simple interface. Now we would like to talk about IMA.js-plugins monorepo that already contains variety of plugins that covers many of the common use cases.

    IMA.js-plugins

    Each plugin in this repository is thoroughly tested and maintained, so it always works with the most up to date IMA.js version. We, here at Seznam.cz use it daily in production on many of our projects, so don't worry about using them safely in the production environment.

    Without further ado, let's quickly describe in this compact list what each plugin does and when you would want to use them:

    note

    This list is updated manually, so there can be situations where it doesn't match on 100% what is currently present in the monorepository itself.

    + + \ No newline at end of file diff --git a/plugins/plugin-api/index.html b/plugins/plugin-api/index.html index f5ac26e510..cc145155c8 100644 --- a/plugins/plugin-api/index.html +++ b/plugins/plugin-api/index.html @@ -4,16 +4,16 @@ Plugins API | IMA.js - - + +

    Plugins API

    IMA.js development stack offers built-in support for plugins. Writing plugins for IMA.js is really simple. It basically comes to creating an ordinary npm package and using pluginLoader.register method to hook into IMA.js application environment using certain functions.

    info

    In situations where you don't need to hook into IMA.js app environment from within your plugin (you're for example just exporting some interface), you don't need call this registration method as it servers no purpose.

    Plugin registration

    As mentioned above, the plugin registration is done from within your npm package entry point using pluginLoader.register method:

    import { pluginLoader } from '@ima/core';
    import Service from './service';

    pluginLoader.register('my-ima-plugin', ns => {
    ns.set('my.ima.plugin.Service', Service);
    });

    The register method expects 2 arguments, first is name of your plugin (this is used strictly for debugging purposes, however it is required) and callback registration function which receives Namespace as one and only argument, that you can use to specify to which namespace this plugin should be bound.

    Plugin bootstrap functions

    The registration function can additionally return an object with additional callback functions. These allow you to further bootstrap your plugin. All are however optional, meaning you can define any combination of these or don't return anything.

    import { pluginLoader } from '@ima/core';

    pluginLoader.register('my-ima-plugin', ns => {
    return {
    initBind: (ns, oc, config) => {},
    initServices: (ns, oc, config) => {},
    initSettings: (ns, oc, config) => {}
    }
    });

    initBind

    initBind(ns: Namespace, oc: ObjectContainer, config: Config['bind'], isDynamicallyLoaded = false)

    This function has the same interface as a function exported in bind.js of your IMA.js application and also serves the same purpose. This is the place where you would want to initialize your custom constants and bindings and assign them to the ObjectContainer.

    initServices

    initServices(ns: Namespace, oc: ObjectContainer, config: Config['services'], isDynamicallyLoaded = false)

    Similarly to initBind, this is equivalent to a function exported by services.js file in your application.

    initSettings

    initSettings(ns: Namespace, oc: ObjectContainer, config: Config['settings'], isDynamicallyLoaded = false)

    You can probably already see the pattern here. This function should return an object with settings, with the same structure as function in settings.js file does.

    These settings are then merged with your application settings a possible conflicts are overridden with the application settings. This allows you to define defaults for your plugin, which can be easily overridden in your application.

    Examples

    Putting it all together, your main file in your npm package could look something like this (borrowing contents of main.js from our @ima/plugin-useragent:

    import { pluginLoader } from '@ima/core';
    import PlatformJS from 'platform';

    import UserAgent from './AbstractUserAgent.js';
    import ClientUserAgent from './ClientUserAgent.js';
    import ServerUserAgent from './ServerUserAgent.js';

    pluginLoader.register('@ima/plugin-useragent', () => {
    return {
    initBind: (ns, oc) => {
    if (oc.get('$Window').isClient()) {
    oc.provide(UserAgent, ClientUserAgent, [PlatformJS, '$Window']);
    } else {
    oc.provide(UserAgent, ServerUserAgent, [PlatformJS, '$Request']);
    }
    },
    initServices: (ns, oc) => {
    oc.get(UserAgent).init();
    },
    };
    });

    export { ClientUserAgent, ServerUserAgent, UserAgent, PlatformJS };

    Dynamically imported plugins and tree shaking

    When the plugin is imported dynamically and initialized lazily, you receive isDynamicallyLoaded = true as the last argument in the registration bootstrap functions. This can help you in certain situations where you need to know when the plugin was initialized.

    The bootstrap process works the same way as with plugins initialized upon application startup, meaning all plugin settings are still overwritten with possible overrides in the application settings. There's however one caveat with the ObjectContainer that you need to pay attention to.

    danger

    When using string syntax to get certain settings in the $dependencies field:

    static get $dependencies() {
    return ['$Settings.myPlugin.repeatCount'];
    };

    constructor(repeatCount) {
    this.repeatCount = repeatCount;
    }

    fn() {
    this.repeatXTimes(this.repeatCount);
    }

    This won't be updated with possible plugin defaults when it get's loaded. In order to prevent this issue, you need to access whole settings object which will get updated values:

    static get $dependencies() {
    return ['$Settings'];
    };

    myFUnction(settings) {
    this.settings = settings;
    }

    fn() {
    this.repeatXTimes(settings?.myPlugin?.repeatCount);
    }

    Conclusion

    As you can see, creating IMA.js plugin is very easy. You can always check our IMA.js-plugins monorepo to take a look at many other already -existing plugins and how they're implemented, which we describe more in detail in the documentation.

    - - +existing plugins and how they're implemented, which we describe more in detail in the documentation.

    + + \ No newline at end of file diff --git a/search/index.html b/search/index.html index c63f5b808e..a744dbb3a3 100644 --- a/search/index.html +++ b/search/index.html @@ -4,13 +4,13 @@ Search the documentation | IMA.js - - + +
    -

    Search the documentation

    - - +

    Search the documentation

    + + \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 90255f0ddd..9867900ed8 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -https://imajs.io/searchweekly0.5https://imajs.io/weekly0.5https://imajs.io/advanced-features/dynamic-importsweekly0.5https://imajs.io/api/weekly0.5https://imajs.io/api/classes/ima_core.AbstractControllerweekly0.5https://imajs.io/api/classes/ima_core.AbstractExecutionweekly0.5https://imajs.io/api/classes/ima_core.AbstractExtensionweekly0.5https://imajs.io/api/classes/ima_core.AbstractPageManagerweekly0.5https://imajs.io/api/classes/ima_core.AbstractRouteweekly0.5https://imajs.io/api/classes/ima_core.AbstractRouterweekly0.5https://imajs.io/api/classes/ima_core.Bootstrapweekly0.5https://imajs.io/api/classes/ima_core.Cacheweekly0.5https://imajs.io/api/classes/ima_core.CacheEntryweekly0.5https://imajs.io/api/classes/ima_core.CacheFactoryweekly0.5https://imajs.io/api/classes/ima_core.CacheImplweekly0.5https://imajs.io/api/classes/ima_core.CancelErrorweekly0.5https://imajs.io/api/classes/ima_core.ClientPageManagerweekly0.5https://imajs.io/api/classes/ima_core.ClientRouterweekly0.5https://imajs.io/api/classes/ima_core.ClientWindowweekly0.5https://imajs.io/api/classes/ima_core.ComponentUtilsweekly0.5https://imajs.io/api/classes/ima_core.Controllerweekly0.5https://imajs.io/api/classes/ima_core.ControllerDecoratorweekly0.5https://imajs.io/api/classes/ima_core.CookieStorageweekly0.5https://imajs.io/api/classes/ima_core.Dictionaryweekly0.5https://imajs.io/api/classes/ima_core.Dispatcherweekly0.5https://imajs.io/api/classes/ima_core.DispatcherImplweekly0.5https://imajs.io/api/classes/ima_core.DynamicRouteweekly0.5https://imajs.io/api/classes/ima_core.Entryweekly0.5https://imajs.io/api/classes/ima_core.Errorweekly0.5https://imajs.io/api/classes/ima_core.EventBusweekly0.5https://imajs.io/api/classes/ima_core.EventBusImplweekly0.5https://imajs.io/api/classes/ima_core.Executionweekly0.5https://imajs.io/api/classes/ima_core.Extensionweekly0.5https://imajs.io/api/classes/ima_core.GenericErrorweekly0.5https://imajs.io/api/classes/ima_core.HttpAgentweekly0.5https://imajs.io/api/classes/ima_core.HttpAgentImplweekly0.5https://imajs.io/api/classes/ima_core.HttpProxyweekly0.5https://imajs.io/api/classes/ima_core.MapStorageweekly0.5https://imajs.io/api/classes/ima_core.MessageFormatDictionaryweekly0.5https://imajs.io/api/classes/ima_core.MetaManagerweekly0.5https://imajs.io/api/classes/ima_core.MetaManagerImplweekly0.5https://imajs.io/api/classes/ima_core.Namespaceweekly0.5https://imajs.io/api/classes/ima_core.ObjectContainerweekly0.5https://imajs.io/api/classes/ima_core.PageFactoryweekly0.5https://imajs.io/api/classes/ima_core.PageHandlerweekly0.5https://imajs.io/api/classes/ima_core.PageHandlerRegistryweekly0.5https://imajs.io/api/classes/ima_core.PageManagerweekly0.5https://imajs.io/api/classes/ima_core.PageMetaHandlerweekly0.5https://imajs.io/api/classes/ima_core.PageNavigationHandlerweekly0.5https://imajs.io/api/classes/ima_core.PageRendererweekly0.5https://imajs.io/api/classes/ima_core.PageStateManagerweekly0.5https://imajs.io/api/classes/ima_core.PageStateManagerDecoratorweekly0.5https://imajs.io/api/classes/ima_core.PageStateManagerImplweekly0.5https://imajs.io/api/classes/ima_core.PluginLoaderweekly0.5https://imajs.io/api/classes/ima_core.Requestweekly0.5https://imajs.io/api/classes/ima_core.Responseweekly0.5https://imajs.io/api/classes/ima_core.RouteFactoryweekly0.5https://imajs.io/api/classes/ima_core.Routerweekly0.5https://imajs.io/api/classes/ima_core.SerialBatchweekly0.5https://imajs.io/api/classes/ima_core.ServerPageManagerweekly0.5https://imajs.io/api/classes/ima_core.ServerRouterweekly0.5https://imajs.io/api/classes/ima_core.ServerWindowweekly0.5https://imajs.io/api/classes/ima_core.SessionMapStorageweekly0.5https://imajs.io/api/classes/ima_core.SessionStorageweekly0.5https://imajs.io/api/classes/ima_core.StaticRouteweekly0.5https://imajs.io/api/classes/ima_core.Storageweekly0.5https://imajs.io/api/classes/ima_core.UrlTransformerweekly0.5https://imajs.io/api/classes/ima_core.WeakMapStorageweekly0.5https://imajs.io/api/classes/ima_core.Windowweekly0.5https://imajs.io/api/classes/ima_dev_utils.Loggerweekly0.5https://imajs.io/api/classes/ima_react_page_renderer.AbstractComponentweekly0.5https://imajs.io/api/classes/ima_react_page_renderer.AbstractPureComponentweekly0.5https://imajs.io/api/classes/ima_react_page_renderer.BlankManagedRootViewweekly0.5https://imajs.io/api/classes/ima_react_page_renderer.ErrorBoundaryweekly0.5https://imajs.io/api/classes/ima_react_page_renderer.PageRendererFactoryweekly0.5https://imajs.io/api/classes/ima_react_page_renderer.ServerPageRendererweekly0.5https://imajs.io/api/classes/ima_react_page_renderer.ViewAdapterweekly0.5https://imajs.io/api/enums/ima_core.ActionTypesweekly0.5https://imajs.io/api/enums/ima_core.BindingStateweekly0.5https://imajs.io/api/enums/ima_core.HttpStatusCodeweekly0.5https://imajs.io/api/enums/ima_core.RendererEventsweekly0.5https://imajs.io/api/enums/ima_core.RendererTypesweekly0.5https://imajs.io/api/enums/ima_core.RouteNamesweekly0.5https://imajs.io/api/enums/ima_core.RouterEventsweekly0.5https://imajs.io/api/enums/ima_core.StateEventsweekly0.5https://imajs.io/api/interfaces/ima_cli.ImaCliArgsweekly0.5https://imajs.io/api/interfaces/ima_cli.ImaCliPluginweekly0.5https://imajs.io/api/interfaces/ima_cli.ImaConfigurationContextweekly0.5https://imajs.io/api/interfaces/ima_core.AppEnvironmentweekly0.5https://imajs.io/api/interfaces/ima_core.BootConfigweekly0.5https://imajs.io/api/interfaces/ima_core.BootServicesweekly0.5https://imajs.io/api/interfaces/ima_core.DictionaryMapweekly0.5https://imajs.io/api/interfaces/ima_core.DispatcherEventsMapweekly0.5https://imajs.io/api/interfaces/ima_core.Environmentweekly0.5https://imajs.io/api/interfaces/ima_core.GlobalImaObjectweekly0.5https://imajs.io/api/interfaces/ima_core.HttpAgentRequestOptionsweekly0.5https://imajs.io/api/interfaces/ima_core.ImaRequestInitweekly0.5https://imajs.io/api/interfaces/ima_core.InitAppConfigweekly0.5https://imajs.io/api/interfaces/ima_core.InitImaConfigweekly0.5https://imajs.io/api/interfaces/ima_core.InitPluginConfigweekly0.5https://imajs.io/api/interfaces/ima_core.Manifestweekly0.5https://imajs.io/api/interfaces/ima_core.ManifestAssetweekly0.5https://imajs.io/api/interfaces/ima_core.OCAliasMapweekly0.5https://imajs.io/api/interfaces/ima_core.PageActionweekly0.5https://imajs.io/api/interfaces/ima_core.PageRendererSettingsweekly0.5https://imajs.io/api/interfaces/ima_core.Resourcesweekly0.5https://imajs.io/api/interfaces/ima_core.RouteActionweekly0.5https://imajs.io/api/interfaces/ima_core.RouteFactoryOptionsweekly0.5https://imajs.io/api/interfaces/ima_core.RouteLocalsweekly0.5https://imajs.io/api/interfaces/ima_core.RouteOptionsweekly0.5https://imajs.io/api/interfaces/ima_core.Settingsweekly0.5https://imajs.io/api/interfaces/ima_core.Utilsweekly0.5https://imajs.io/api/interfaces/ima_core.WindowCustomEventsMapweekly0.5https://imajs.io/api/interfaces/ima_dev_utils.CompileErrorweekly0.5https://imajs.io/api/interfaces/ima_dev_utils.FragmentLineweekly0.5https://imajs.io/api/interfaces/ima_dev_utils.LoggerOptionsweekly0.5https://imajs.io/api/interfaces/ima_plugin_cli.Contextweekly0.5https://imajs.io/api/interfaces/ima_plugin_cli.ImaPluginConfigweekly0.5https://imajs.io/api/interfaces/ima_plugin_cli.PipeContextweekly0.5https://imajs.io/api/interfaces/ima_plugin_cli.Sourceweekly0.5https://imajs.io/api/interfaces/ima_react_page_renderer.PageContextTypeweekly0.5https://imajs.io/api/interfaces/ima_react_page_renderer.useComponentTypeweekly0.5https://imajs.io/api/interfaces/ima_react_page_renderer.useDispatcherTypeweekly0.5https://imajs.io/api/interfaces/ima_react_page_renderer.useEventBusTypeweekly0.5https://imajs.io/api/interfaces/ima_react_page_renderer.ViewAdapterPropsweekly0.5https://imajs.io/api/modules/ima_cliweekly0.5https://imajs.io/api/modules/ima_coreweekly0.5https://imajs.io/api/modules/ima_dev_utilsweekly0.5https://imajs.io/api/modules/ima_plugin_cliweekly0.5https://imajs.io/api/modules/ima_react_page_rendererweekly0.5https://imajs.io/basic-features/controller-lifecycleweekly0.5https://imajs.io/basic-features/data-fetchingweekly0.5https://imajs.io/basic-features/dictionaryweekly0.5https://imajs.io/basic-features/error-handlingweekly0.5https://imajs.io/basic-features/eventsweekly0.5https://imajs.io/basic-features/extensionsweekly0.5https://imajs.io/basic-features/handling-scripts-and-stylesweekly0.5https://imajs.io/basic-features/object-containerweekly0.5https://imajs.io/basic-features/page-managerweekly0.5https://imajs.io/basic-features/page-stateweekly0.5https://imajs.io/basic-features/rendering-processweekly0.5https://imajs.io/basic-features/routing/async-routingweekly0.5https://imajs.io/basic-features/routing/dynamic-routesweekly0.5https://imajs.io/basic-features/routing/introductionweekly0.5https://imajs.io/basic-features/routing/middlewaresweekly0.5https://imajs.io/basic-features/seo-and-meta-managerweekly0.5https://imajs.io/basic-features/testingweekly0.5https://imajs.io/basic-features/typescriptweekly0.5https://imajs.io/basic-features/views-and-componentsweekly0.5https://imajs.io/cli/weekly0.5https://imajs.io/cli/additional-featuresweekly0.5https://imajs.io/cli/advanced-featuresweekly0.5https://imajs.io/cli/cli-plugins-apiweekly0.5https://imajs.io/cli/compiler-featuresweekly0.5https://imajs.io/cli/ima-config-jsweekly0.5https://imajs.io/cli/plugins/analyze-pluginweekly0.5https://imajs.io/cli/plugins/less-constants-pluginweekly0.5https://imajs.io/cli/plugins/scramble-css-pluginweekly0.5https://imajs.io/contributing/how-to-contributeweekly0.5https://imajs.io/devtools/devtools-introductionweekly0.5https://imajs.io/devtools/devtools-optionsweekly0.5https://imajs.io/devtools/devtools-uiweekly0.5https://imajs.io/introduction/configurationweekly0.5https://imajs.io/introduction/getting-startedweekly0.5https://imajs.io/migration/migration-0.14.0weekly0.5https://imajs.io/migration/migration-0.15.0weekly0.5https://imajs.io/migration/migration-0.16.0weekly0.5https://imajs.io/migration/migration-17.0.0weekly0.5https://imajs.io/migration/migration-18.0.0weekly0.5https://imajs.io/migration/migration-19.0.0weekly0.5https://imajs.io/plugins/available-pluginsweekly0.5https://imajs.io/plugins/plugin-apiweekly0.5https://imajs.io/tutorial/adding-some-stateweekly0.5https://imajs.io/tutorial/fetching-dataweekly0.5https://imajs.io/tutorial/final-polishweekly0.5https://imajs.io/tutorial/introductionweekly0.5https://imajs.io/tutorial/static-viewweekly0.5https://imajs.io/tutorial/writing-postsweekly0.5 \ No newline at end of file +https://imajs.io/searchweekly0.5https://imajs.io/weekly0.5https://imajs.io/advanced-features/dynamic-importsweekly0.5https://imajs.io/api/weekly0.5https://imajs.io/api/classes/ima_core.AbstractControllerweekly0.5https://imajs.io/api/classes/ima_core.AbstractExecutionweekly0.5https://imajs.io/api/classes/ima_core.AbstractExtensionweekly0.5https://imajs.io/api/classes/ima_core.AbstractPageManagerweekly0.5https://imajs.io/api/classes/ima_core.AbstractRouteweekly0.5https://imajs.io/api/classes/ima_core.AbstractRouterweekly0.5https://imajs.io/api/classes/ima_core.Bootstrapweekly0.5https://imajs.io/api/classes/ima_core.Cacheweekly0.5https://imajs.io/api/classes/ima_core.CacheEntryweekly0.5https://imajs.io/api/classes/ima_core.CacheFactoryweekly0.5https://imajs.io/api/classes/ima_core.CacheImplweekly0.5https://imajs.io/api/classes/ima_core.CancelErrorweekly0.5https://imajs.io/api/classes/ima_core.ClientPageManagerweekly0.5https://imajs.io/api/classes/ima_core.ClientRouterweekly0.5https://imajs.io/api/classes/ima_core.ClientWindowweekly0.5https://imajs.io/api/classes/ima_core.ComponentUtilsweekly0.5https://imajs.io/api/classes/ima_core.Controllerweekly0.5https://imajs.io/api/classes/ima_core.ControllerDecoratorweekly0.5https://imajs.io/api/classes/ima_core.CookieStorageweekly0.5https://imajs.io/api/classes/ima_core.Dictionaryweekly0.5https://imajs.io/api/classes/ima_core.Dispatcherweekly0.5https://imajs.io/api/classes/ima_core.DispatcherImplweekly0.5https://imajs.io/api/classes/ima_core.DynamicRouteweekly0.5https://imajs.io/api/classes/ima_core.Entryweekly0.5https://imajs.io/api/classes/ima_core.Errorweekly0.5https://imajs.io/api/classes/ima_core.EventBusweekly0.5https://imajs.io/api/classes/ima_core.EventBusImplweekly0.5https://imajs.io/api/classes/ima_core.Executionweekly0.5https://imajs.io/api/classes/ima_core.Extensionweekly0.5https://imajs.io/api/classes/ima_core.GenericErrorweekly0.5https://imajs.io/api/classes/ima_core.HttpAgentweekly0.5https://imajs.io/api/classes/ima_core.HttpAgentImplweekly0.5https://imajs.io/api/classes/ima_core.HttpProxyweekly0.5https://imajs.io/api/classes/ima_core.MapStorageweekly0.5https://imajs.io/api/classes/ima_core.MessageFormatDictionaryweekly0.5https://imajs.io/api/classes/ima_core.MetaManagerweekly0.5https://imajs.io/api/classes/ima_core.MetaManagerImplweekly0.5https://imajs.io/api/classes/ima_core.Namespaceweekly0.5https://imajs.io/api/classes/ima_core.ObjectContainerweekly0.5https://imajs.io/api/classes/ima_core.Observableweekly0.5https://imajs.io/api/classes/ima_core.ObservableImplweekly0.5https://imajs.io/api/classes/ima_core.PageFactoryweekly0.5https://imajs.io/api/classes/ima_core.PageHandlerweekly0.5https://imajs.io/api/classes/ima_core.PageHandlerRegistryweekly0.5https://imajs.io/api/classes/ima_core.PageManagerweekly0.5https://imajs.io/api/classes/ima_core.PageMetaHandlerweekly0.5https://imajs.io/api/classes/ima_core.PageNavigationHandlerweekly0.5https://imajs.io/api/classes/ima_core.PageRendererweekly0.5https://imajs.io/api/classes/ima_core.PageStateManagerweekly0.5https://imajs.io/api/classes/ima_core.PageStateManagerDecoratorweekly0.5https://imajs.io/api/classes/ima_core.PageStateManagerImplweekly0.5https://imajs.io/api/classes/ima_core.PluginLoaderweekly0.5https://imajs.io/api/classes/ima_core.Requestweekly0.5https://imajs.io/api/classes/ima_core.Responseweekly0.5https://imajs.io/api/classes/ima_core.RouteFactoryweekly0.5https://imajs.io/api/classes/ima_core.Routerweekly0.5https://imajs.io/api/classes/ima_core.SerialBatchweekly0.5https://imajs.io/api/classes/ima_core.ServerPageManagerweekly0.5https://imajs.io/api/classes/ima_core.ServerRouterweekly0.5https://imajs.io/api/classes/ima_core.ServerWindowweekly0.5https://imajs.io/api/classes/ima_core.SessionMapStorageweekly0.5https://imajs.io/api/classes/ima_core.SessionStorageweekly0.5https://imajs.io/api/classes/ima_core.StaticRouteweekly0.5https://imajs.io/api/classes/ima_core.Storageweekly0.5https://imajs.io/api/classes/ima_core.UrlTransformerweekly0.5https://imajs.io/api/classes/ima_core.WeakMapStorageweekly0.5https://imajs.io/api/classes/ima_core.Windowweekly0.5https://imajs.io/api/classes/ima_dev_utils.Loggerweekly0.5https://imajs.io/api/classes/ima_react_page_renderer.AbstractComponentweekly0.5https://imajs.io/api/classes/ima_react_page_renderer.AbstractPureComponentweekly0.5https://imajs.io/api/classes/ima_react_page_renderer.BlankManagedRootViewweekly0.5https://imajs.io/api/classes/ima_react_page_renderer.ErrorBoundaryweekly0.5https://imajs.io/api/classes/ima_react_page_renderer.PageRendererFactoryweekly0.5https://imajs.io/api/classes/ima_react_page_renderer.ServerPageRendererweekly0.5https://imajs.io/api/classes/ima_react_page_renderer.ViewAdapterweekly0.5https://imajs.io/api/enums/ima_core.ActionTypesweekly0.5https://imajs.io/api/enums/ima_core.BindingStateweekly0.5https://imajs.io/api/enums/ima_core.HttpStatusCodeweekly0.5https://imajs.io/api/enums/ima_core.RendererEventsweekly0.5https://imajs.io/api/enums/ima_core.RendererTypesweekly0.5https://imajs.io/api/enums/ima_core.RouteNamesweekly0.5https://imajs.io/api/enums/ima_core.RouterEventsweekly0.5https://imajs.io/api/enums/ima_core.StateEventsweekly0.5https://imajs.io/api/interfaces/ima_cli.ImaCliArgsweekly0.5https://imajs.io/api/interfaces/ima_cli.ImaCliPluginweekly0.5https://imajs.io/api/interfaces/ima_cli.ImaConfigurationContextweekly0.5https://imajs.io/api/interfaces/ima_core.AppEnvironmentweekly0.5https://imajs.io/api/interfaces/ima_core.BootConfigweekly0.5https://imajs.io/api/interfaces/ima_core.BootServicesweekly0.5https://imajs.io/api/interfaces/ima_core.DictionaryMapweekly0.5https://imajs.io/api/interfaces/ima_core.DispatcherEventsMapweekly0.5https://imajs.io/api/interfaces/ima_core.Environmentweekly0.5https://imajs.io/api/interfaces/ima_core.GlobalImaObjectweekly0.5https://imajs.io/api/interfaces/ima_core.HttpAgentRequestOptionsweekly0.5https://imajs.io/api/interfaces/ima_core.ImaRequestInitweekly0.5https://imajs.io/api/interfaces/ima_core.InitAppConfigweekly0.5https://imajs.io/api/interfaces/ima_core.InitImaConfigweekly0.5https://imajs.io/api/interfaces/ima_core.InitPluginConfigweekly0.5https://imajs.io/api/interfaces/ima_core.Manifestweekly0.5https://imajs.io/api/interfaces/ima_core.ManifestAssetweekly0.5https://imajs.io/api/interfaces/ima_core.OCAliasMapweekly0.5https://imajs.io/api/interfaces/ima_core.PageActionweekly0.5https://imajs.io/api/interfaces/ima_core.PageRendererSettingsweekly0.5https://imajs.io/api/interfaces/ima_core.Resourcesweekly0.5https://imajs.io/api/interfaces/ima_core.RouteActionweekly0.5https://imajs.io/api/interfaces/ima_core.RouteFactoryOptionsweekly0.5https://imajs.io/api/interfaces/ima_core.RouteLocalsweekly0.5https://imajs.io/api/interfaces/ima_core.RouteOptionsweekly0.5https://imajs.io/api/interfaces/ima_core.Settingsweekly0.5https://imajs.io/api/interfaces/ima_core.Utilsweekly0.5https://imajs.io/api/interfaces/ima_core.WindowCustomEventsMapweekly0.5https://imajs.io/api/interfaces/ima_dev_utils.CompileErrorweekly0.5https://imajs.io/api/interfaces/ima_dev_utils.FragmentLineweekly0.5https://imajs.io/api/interfaces/ima_dev_utils.LoggerOptionsweekly0.5https://imajs.io/api/interfaces/ima_plugin_cli.Contextweekly0.5https://imajs.io/api/interfaces/ima_plugin_cli.ImaPluginConfigweekly0.5https://imajs.io/api/interfaces/ima_plugin_cli.PipeContextweekly0.5https://imajs.io/api/interfaces/ima_plugin_cli.Sourceweekly0.5https://imajs.io/api/interfaces/ima_react_page_renderer.PageContextTypeweekly0.5https://imajs.io/api/interfaces/ima_react_page_renderer.useComponentTypeweekly0.5https://imajs.io/api/interfaces/ima_react_page_renderer.useDispatcherTypeweekly0.5https://imajs.io/api/interfaces/ima_react_page_renderer.useEventBusTypeweekly0.5https://imajs.io/api/interfaces/ima_react_page_renderer.ViewAdapterPropsweekly0.5https://imajs.io/api/modules/ima_cliweekly0.5https://imajs.io/api/modules/ima_coreweekly0.5https://imajs.io/api/modules/ima_dev_utilsweekly0.5https://imajs.io/api/modules/ima_plugin_cliweekly0.5https://imajs.io/api/modules/ima_react_page_rendererweekly0.5https://imajs.io/basic-features/controller-lifecycleweekly0.5https://imajs.io/basic-features/data-fetchingweekly0.5https://imajs.io/basic-features/dictionaryweekly0.5https://imajs.io/basic-features/error-handlingweekly0.5https://imajs.io/basic-features/eventsweekly0.5https://imajs.io/basic-features/extensionsweekly0.5https://imajs.io/basic-features/handling-scripts-and-stylesweekly0.5https://imajs.io/basic-features/object-containerweekly0.5https://imajs.io/basic-features/page-managerweekly0.5https://imajs.io/basic-features/page-stateweekly0.5https://imajs.io/basic-features/rendering-processweekly0.5https://imajs.io/basic-features/routing/async-routingweekly0.5https://imajs.io/basic-features/routing/dynamic-routesweekly0.5https://imajs.io/basic-features/routing/introductionweekly0.5https://imajs.io/basic-features/routing/middlewaresweekly0.5https://imajs.io/basic-features/seo-and-meta-managerweekly0.5https://imajs.io/basic-features/testingweekly0.5https://imajs.io/basic-features/typescriptweekly0.5https://imajs.io/basic-features/views-and-componentsweekly0.5https://imajs.io/cli/weekly0.5https://imajs.io/cli/additional-featuresweekly0.5https://imajs.io/cli/advanced-featuresweekly0.5https://imajs.io/cli/cli-plugins-apiweekly0.5https://imajs.io/cli/compiler-featuresweekly0.5https://imajs.io/cli/ima-config-jsweekly0.5https://imajs.io/cli/plugins/analyze-pluginweekly0.5https://imajs.io/cli/plugins/less-constants-pluginweekly0.5https://imajs.io/cli/plugins/scramble-css-pluginweekly0.5https://imajs.io/contributing/how-to-contributeweekly0.5https://imajs.io/devtools/devtools-introductionweekly0.5https://imajs.io/devtools/devtools-optionsweekly0.5https://imajs.io/devtools/devtools-uiweekly0.5https://imajs.io/introduction/configurationweekly0.5https://imajs.io/introduction/getting-startedweekly0.5https://imajs.io/migration/migration-0.14.0weekly0.5https://imajs.io/migration/migration-0.15.0weekly0.5https://imajs.io/migration/migration-0.16.0weekly0.5https://imajs.io/migration/migration-17.0.0weekly0.5https://imajs.io/migration/migration-18.0.0weekly0.5https://imajs.io/migration/migration-19.0.0weekly0.5https://imajs.io/plugins/available-pluginsweekly0.5https://imajs.io/plugins/plugin-apiweekly0.5https://imajs.io/tutorial/adding-some-stateweekly0.5https://imajs.io/tutorial/fetching-dataweekly0.5https://imajs.io/tutorial/final-polishweekly0.5https://imajs.io/tutorial/introductionweekly0.5https://imajs.io/tutorial/static-viewweekly0.5https://imajs.io/tutorial/writing-postsweekly0.5 \ No newline at end of file diff --git a/tutorial/adding-some-state/index.html b/tutorial/adding-some-state/index.html index 4be5e7665a..c820f02aae 100644 --- a/tutorial/adding-some-state/index.html +++ b/tutorial/adding-some-state/index.html @@ -4,8 +4,8 @@ Adding Some State | IMA.js - - + +
    @@ -129,8 +129,8 @@ stop their propagation.

    Note that events distributed using the Dispatcher are useful only in very specific use-cases, so the Dispatcher logs a warning to the console if there are no listeners registered for the fired event in order to notify you of -possible typos in event names.

    As always, you can learn more about EventBus and Dispatcher in the documentation

    - - +possible typos in event names.

    As always, you can learn more about EventBus and Dispatcher in the documentation

    + + \ No newline at end of file diff --git a/tutorial/fetching-data/index.html b/tutorial/fetching-data/index.html index 472742ba8d..d8711bbfbe 100644 --- a/tutorial/fetching-data/index.html +++ b/tutorial/fetching-data/index.html @@ -4,8 +4,8 @@ Fetching Data | IMA.js - - + +
    @@ -107,8 +107,8 @@ and sends the serialized cache to the client. The cache is then deserialized at the client-side, so the request to http://localhost:3001/static/static/public/posts.json we do in our post resource will -be resolved from the cache, leading to no additional HTTP request being made.

    - - +be resolved from the cache, leading to no additional HTTP request being made.

    + + \ No newline at end of file diff --git a/tutorial/final-polish/index.html b/tutorial/final-polish/index.html index 5a374af105..ffd406b120 100644 --- a/tutorial/final-polish/index.html +++ b/tutorial/final-polish/index.html @@ -4,8 +4,8 @@ Final Polish | IMA.js - - + +
    @@ -168,8 +168,8 @@ you liked the journey and are happy with what you've learned here.

    From now I suggest to take a look at our documentation which goes into greater detail in describing each component of IMA.js development stack or take a direct look at the API.

    If you see any improvements that could be made to this tutorial, or have found any mistakes, please let us know by creating issue in our IMA.js monorepo, -or even better, creating PR.

    I bid you farewell!

    - - +or even better, creating PR.

    I bid you farewell!

    + + \ No newline at end of file diff --git a/tutorial/introduction/index.html b/tutorial/introduction/index.html index 8eb50e0e98..22717109d2 100644 --- a/tutorial/introduction/index.html +++ b/tutorial/introduction/index.html @@ -4,8 +4,8 @@ Introduction | IMA.js - - + +
    @@ -47,8 +47,8 @@ rendered to HTML.
  • The server contains the application logic of the HTTP server serving our application.
  • Finally, the build directory is used as an output directory for the built application and its resources.
  • For more information see the Application Structure -section in the documentation.

    - - +section in the documentation.

    + + \ No newline at end of file diff --git a/tutorial/static-view/index.html b/tutorial/static-view/index.html index d2ba379e9b..0cdccc3948 100644 --- a/tutorial/static-view/index.html +++ b/tutorial/static-view/index.html @@ -4,8 +4,8 @@ Static View | IMA.js - - + +
    @@ -105,8 +105,8 @@ ns.namespace('namespace name goes here'). The second snippet binds the class, constant or value created in the file to the namespace.

    If you're using version 15 and above you can safely remove deprecated namespaces and replace them with ES2015 import -and export.

    - - +and export.

    + + \ No newline at end of file diff --git a/tutorial/writing-posts/index.html b/tutorial/writing-posts/index.html index 308bcf1759..3889dd8f82 100644 --- a/tutorial/writing-posts/index.html +++ b/tutorial/writing-posts/index.html @@ -4,8 +4,8 @@ Writing Posts | IMA.js - - + +
    @@ -93,8 +93,8 @@ modifications of data passed to or received from our mock server won't modify the internal state or data returned by other calls to our methods.

    To wire up our HTTP mock into our application, we need to update the dependencies of the app/model/post/PostResource.js:

    import PostFactory from './PostFactory';
    import MockHttpAgent from 'app/mock/MockHttpAgent';

    export default class PostResource {
    static get $dependencies() {
    return [MockHttpAgent, PostFactory];
    }

    ...
    }

    Go ahead and check the result in the browser, you will now be able to write new posts to our guestbook (which will disappear once you reload the page, since we -keep the posts only in our HTTP mock).

    - - +keep the posts only in our HTTP mock).

    + + \ No newline at end of file