binbot-charts 0.5.9 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/TVChartContainer.d.mts +45 -0
- package/dist/TVChartContainer.d.ts +45 -0
- package/dist/TVChartContainer.js +752 -0
- package/dist/TVChartContainer.js.map +1 -0
- package/dist/TVChartContainer.mjs +735 -0
- package/dist/TVChartContainer.mjs.map +1 -0
- package/package.json +4 -2
- package/dist/public/charting_library/bundles/0.d46f0b5e9380d7893de5.js +0 -112
- package/dist/public/charting_library/bundles/1.f02c87d35fbc8ffcaedb.js +0 -1
- package/dist/public/charting_library/bundles/10.21e665b7935d5bc4ba64.js +0 -322
- package/dist/public/charting_library/bundles/11.df012db70159a159d927.js +0 -1
- package/dist/public/charting_library/bundles/12.37750b21f6d8d35c6e6e.js +0 -1
- package/dist/public/charting_library/bundles/13.699469c73d09b7add56d.js +0 -1
- package/dist/public/charting_library/bundles/14.d1148b38d59df9ca5061.js +0 -1
- package/dist/public/charting_library/bundles/15.44f2acca80348a1da1a6.js +0 -89
- package/dist/public/charting_library/bundles/16.680572949c1125757d35.js +0 -1
- package/dist/public/charting_library/bundles/17.404a01f527881dfff424.js +0 -1
- package/dist/public/charting_library/bundles/18.78de69cfba051874e071.js +0 -120
- package/dist/public/charting_library/bundles/19.048f7f5d36fef428ca8d.js +0 -1
- package/dist/public/charting_library/bundles/2.60931787a6734697ac13.js +0 -118
- package/dist/public/charting_library/bundles/20.bc09ed47c5a62e1bc5c2.js +0 -128
- package/dist/public/charting_library/bundles/21.4c7b5cccb67a95e7e782.js +0 -1
- package/dist/public/charting_library/bundles/22.ca4300bcf614d8d5f4ab.js +0 -1
- package/dist/public/charting_library/bundles/23.256ba98e6a03200bdeba.js +0 -1
- package/dist/public/charting_library/bundles/24.bc4fafedb1730259aa10.js +0 -1
- package/dist/public/charting_library/bundles/25.7416db26ed3dcc87c05a.js +0 -611
- package/dist/public/charting_library/bundles/26.3aeec391d4e6e19989ee.js +0 -1
- package/dist/public/charting_library/bundles/27.e3ec08b1fb9df5f36ada.js +0 -69
- package/dist/public/charting_library/bundles/28.9f103042c27ea2df422f.js +0 -1
- package/dist/public/charting_library/bundles/29.3df8712b85d45a626aa0.js +0 -1
- package/dist/public/charting_library/bundles/3.76c398b01b707e5b251c.js +0 -1
- package/dist/public/charting_library/bundles/30.0b732ccb122d160480b6.js +0 -231
- package/dist/public/charting_library/bundles/31.8d2b7a538755fd1bb760.js +0 -166
- package/dist/public/charting_library/bundles/32.13ce02217cf8f9dd6d90.js +0 -121
- package/dist/public/charting_library/bundles/33.4d0dd1f7001fc02099bb.js +0 -1
- package/dist/public/charting_library/bundles/34.c9baa59add71a1e48fd2.js +0 -1
- package/dist/public/charting_library/bundles/35.ed9e360f9686ad3a9497.js +0 -1
- package/dist/public/charting_library/bundles/36.1882d1a8d312a0e193e9.js +0 -1
- package/dist/public/charting_library/bundles/37.90129e4904155350d6a1.js +0 -199
- package/dist/public/charting_library/bundles/38.41f3d509b61c8af47de3.js +0 -74
- package/dist/public/charting_library/bundles/39.bc1e9ce938fd5152831f.js +0 -1
- package/dist/public/charting_library/bundles/4.c7430b8d89cddcf51345.js +0 -1
- package/dist/public/charting_library/bundles/40.b59f41ba4cacbfb8acc3.js +0 -29
- package/dist/public/charting_library/bundles/41.a19b0ae5d68f855d2753.js +0 -1
- package/dist/public/charting_library/bundles/42.494986b0981f6d116fef.js +0 -1
- package/dist/public/charting_library/bundles/43.619c5ed4a592cc2965a4.js +0 -1
- package/dist/public/charting_library/bundles/44.0a7df307e4f397763ce8.js +0 -363
- package/dist/public/charting_library/bundles/45.db9dbd3e9bfeca5333da.js +0 -1
- package/dist/public/charting_library/bundles/46.f1d4cfe6d6f830b4a011.js +0 -114
- package/dist/public/charting_library/bundles/47.a3da3f774c90bd22798e.js +0 -95
- package/dist/public/charting_library/bundles/48.a93f9cb8b1bcc0e0f21e.js +0 -1
- package/dist/public/charting_library/bundles/49.bacd609f7eb77a4a4b68.js +0 -1
- package/dist/public/charting_library/bundles/5.5e97b270ab80d99e9085.js +0 -62
- package/dist/public/charting_library/bundles/50.b282667dddcb7fe1569a.js +0 -1
- package/dist/public/charting_library/bundles/51.11871c50951db825ace3.js +0 -1
- package/dist/public/charting_library/bundles/52.0379a85baae3ab43b15c.js +0 -1
- package/dist/public/charting_library/bundles/53.1d3ec98cfb8e19affb1c.js +0 -76
- package/dist/public/charting_library/bundles/54.bb5888ae55ea0a253a5b.js +0 -203
- package/dist/public/charting_library/bundles/55.3c35a629db21ab961f11.js +0 -303
- package/dist/public/charting_library/bundles/56.b3e69145c0fee614443d.js +0 -95
- package/dist/public/charting_library/bundles/57.236996ec416da4c1f683.js +0 -108
- package/dist/public/charting_library/bundles/58.7ffac4ba908b95705e63.js +0 -61
- package/dist/public/charting_library/bundles/59.397cb6699b74d64072a8.js +0 -1
- package/dist/public/charting_library/bundles/6.2d67b0ae77825dbd455d.js +0 -1
- package/dist/public/charting_library/bundles/60.6b5eced2ef8fa856be88.js +0 -1
- package/dist/public/charting_library/bundles/61.38a3040c925fadff7b64.js +0 -118
- package/dist/public/charting_library/bundles/62.63b309f5f8da9ca013b8.js +0 -61
- package/dist/public/charting_library/bundles/63.8255c7f5191bcafcee7c.js +0 -1
- package/dist/public/charting_library/bundles/64.ec4b4d03b28c77658dde.js +0 -1
- package/dist/public/charting_library/bundles/65.f895a78b4e04257983ff.js +0 -1
- package/dist/public/charting_library/bundles/66.2979e9b7c35e7bf03a37.js +0 -1
- package/dist/public/charting_library/bundles/67.25fd4b78c8c514988aeb.js +0 -1
- package/dist/public/charting_library/bundles/68.8b4124c875484d11fd94.js +0 -1
- package/dist/public/charting_library/bundles/69.43756a5c7477730eb0c4.js +0 -1
- package/dist/public/charting_library/bundles/7.2c7c4f8a49c6380227de.js +0 -68
- package/dist/public/charting_library/bundles/70.cb9d1bb5a00896c1bb97.js +0 -1
- package/dist/public/charting_library/bundles/71.6a9d0842f5e48f68399c.js +0 -1
- package/dist/public/charting_library/bundles/72.e3925aaf38d2c8997638.js +0 -1
- package/dist/public/charting_library/bundles/73.8ca1a096c5bdc2e5fb8a.js +0 -1
- package/dist/public/charting_library/bundles/74.34dcc0d3cd1bbfa5e951.js +0 -1
- package/dist/public/charting_library/bundles/75.1c9a3a6524248ddf88bf.js +0 -1
- package/dist/public/charting_library/bundles/76.5d20bed213399f326603.js +0 -1
- package/dist/public/charting_library/bundles/77.3e4ccccc7d3eb03c488f.js +0 -1
- package/dist/public/charting_library/bundles/78.1d1d47a915b06f1496fb.js +0 -1
- package/dist/public/charting_library/bundles/79.86e92b77f8cf32e6bc37.js +0 -1
- package/dist/public/charting_library/bundles/8.ffab20b86db484062268.js +0 -1
- package/dist/public/charting_library/bundles/80.b5bc6acec3b531a510a9.js +0 -1
- package/dist/public/charting_library/bundles/81.e6a1f76017a44b03480b.js +0 -1
- package/dist/public/charting_library/bundles/82.8c2919e6c8f54e36e9e6.js +0 -1
- package/dist/public/charting_library/bundles/83.f3e53bb5a5940e084955.js +0 -1
- package/dist/public/charting_library/bundles/84.8acc496b4deeeeefb5af.js +0 -1
- package/dist/public/charting_library/bundles/85.39c78fbeaabae306f343.js +0 -1
- package/dist/public/charting_library/bundles/86.4bbbb9e6262243419986.js +0 -1
- package/dist/public/charting_library/bundles/87.cf03fa0a76bfcadd157d.js +0 -1
- package/dist/public/charting_library/bundles/88.d1e3aec63ece25f6b8a9.js +0 -1
- package/dist/public/charting_library/bundles/89.d8aa43b4b9378722d572.js +0 -1
- package/dist/public/charting_library/bundles/9.84ecbc930e51cb26d06a.js +0 -1
- package/dist/public/charting_library/bundles/90.ce47bb68fc3fc88b5590.js +0 -1
- package/dist/public/charting_library/bundles/91.a9b79ef7ba0a62311a53.js +0 -1
- package/dist/public/charting_library/bundles/92.76d5ca7ebec10a1a7a12.js +0 -1
- package/dist/public/charting_library/bundles/93.6de56ef1975f4a31e542.js +0 -1
- package/dist/public/charting_library/bundles/94.231bea5fb12b806ef287.js +0 -1
- package/dist/public/charting_library/bundles/95.6f7da80aac5cf2bf77d6.js +0 -1
- package/dist/public/charting_library/bundles/96.43bb935eee30715afff7.js +0 -1
- package/dist/public/charting_library/bundles/add-compare-dialog.f980c19f222ff9cb8fe6.js +0 -263
- package/dist/public/charting_library/bundles/change-interval-dialog.e928f8dec65c9244cafe.js +0 -52
- package/dist/public/charting_library/bundles/chart-bottom-toolbar.b2e895a5fd3f204fb6b6.js +0 -399
- package/dist/public/charting_library/bundles/chart-event-hint.94e94e93f9fdee936b66.js +0 -97
- package/dist/public/charting_library/bundles/chart-screenshot-hint.14bfec43c52bc3d28f82.js +0 -49
- package/dist/public/charting_library/bundles/chart-widget-gui.226991e9f53aba124fc2.js +0 -1199
- package/dist/public/charting_library/bundles/compare-model.0e6bbdc5f5942c9a716e.js +0 -181
- package/dist/public/charting_library/bundles/context-menu-renderer.7f6f59270ef0f3afa2ed.js +0 -107
- package/dist/public/charting_library/bundles/currency-label-menu.a7a0c0e44d64b092f2cc.js +0 -131
- package/dist/public/charting_library/bundles/custom-intervals-add-dialog.bb64431fb1c6d852f9f1.js +0 -71
- package/dist/public/charting_library/bundles/drawing-toolbar.8cc497633535648562e7.js +0 -250
- package/dist/public/charting_library/bundles/export-data.c819cfa996e2815ff11d.js +0 -78
- package/dist/public/charting_library/bundles/floating-toolbars.d78a058b82ab09013aac.js +0 -508
- package/dist/public/charting_library/bundles/full-tooltips-popup.96fc751e06523b742440.js +0 -92
- package/dist/public/charting_library/bundles/general-chart-properties-dialog.b08948e0c90aebf07ebd.js +0 -85
- package/dist/public/charting_library/bundles/general-property-page.32bdfdbafbd81d9e83c6.js +0 -104
- package/dist/public/charting_library/bundles/go-to-date-dialog-impl.3481c4fcfde2f4d46426.js +0 -361
- package/dist/public/charting_library/bundles/hammerjs.e5489031ed611f47bf09.js +0 -224
- package/dist/public/charting_library/bundles/header-toolbar.4bff61e047f9b8379494.js +0 -228
- package/dist/public/charting_library/bundles/library.8b0dd8732414a2bcbcb1.js +0 -26194
- package/dist/public/charting_library/bundles/line-tools-icons.090f39d92664af3915a5.js +0 -60
- package/dist/public/charting_library/bundles/load-chart-dialog.6cc1a47b17698c0108cb.js +0 -101
- package/dist/public/charting_library/bundles/lollipop-tooltip-renderer.6705b971a2e73c26ecad.js +0 -116
- package/dist/public/charting_library/bundles/lt-pane-views.4d2ee6c5330cd3760eb0.js +0 -4029
- package/dist/public/charting_library/bundles/lt-property-pages-with-definitions.a5e8283e77afa66b5636.js +0 -735
- package/dist/public/charting_library/bundles/manage-drawings-dialog.1c0c3737002fa63fe6a6.js +0 -16
- package/dist/public/charting_library/bundles/moment.78e587a83a009ca48cda.js +0 -369
- package/dist/public/charting_library/bundles/new-confirm-inputs-dialog.00d79c2263e005170345.js +0 -130
- package/dist/public/charting_library/bundles/new-edit-object-dialog.0ed1c3834cfc0e834aed.js +0 -405
- package/dist/public/charting_library/bundles/object-tree-dialog.8e2b7eb9ba2f1dbfbc11.js +0 -1807
- package/dist/public/charting_library/bundles/react.9f2899b40ad0e104f6c9.js +0 -3715
- package/dist/public/charting_library/bundles/redux.43c3f6d214bcf2d1fbd1.js +0 -354
- package/dist/public/charting_library/bundles/restricted-toolset.08fefbae2bc0877b0ef2.js +0 -566
- package/dist/public/charting_library/bundles/runtime.dfe30490f666a6b5d4fe.js +0 -79
- package/dist/public/charting_library/bundles/series-icons-map.ec8043f64d8b06dbce29.js +0 -8
- package/dist/public/charting_library/bundles/series-pane-views.eefe35e1c508ac16c102.js +0 -52
- package/dist/public/charting_library/bundles/share-chart-to-social-utils.c225af2051efd23269e0.js +0 -5
- package/dist/public/charting_library/bundles/show-theme-save-dialog.f81ebf1b2ce08f4399fd.js +0 -11
- package/dist/public/charting_library/bundles/simple-dialog.bd79f02afd512f0f36dd.js +0 -189
- package/dist/public/charting_library/bundles/source-properties-editor.e858d44541ebb6f974a2.js +0 -39
- package/dist/public/charting_library/bundles/study-market.3efd7bf7bc6e6fc7db2d.js +0 -174
- package/dist/public/charting_library/bundles/study-pane-views.9a873dcf74adedf7600b.js +0 -204
- package/dist/public/charting_library/bundles/study-property-pages-with-definitions.ca4fc2ef5a4deff8c0bb.js +0 -125
- package/dist/public/charting_library/bundles/study-template-dialog.fe56a9893a3695e93531.js +0 -320
- package/dist/public/charting_library/bundles/symbol-info-dialog-impl.17daedab6f893acdeae4.js +0 -123
- package/dist/public/charting_library/bundles/symbol-search-dialog.fd3311eee8604f807c80.js +0 -35
- package/dist/public/charting_library/bundles/take-chart-image-impl.c0e6073dcac3041eecf2.js +0 -74
- package/dist/public/charting_library/bundles/vendors.6f5e0d8d267cb3e63ee0.js +0 -1304
- package/dist/public/charting_library/charting_library.cjs.js +0 -98
- package/dist/public/charting_library/charting_library.esm.js +0 -101
- package/dist/public/charting_library/charting_library.js +0 -99
- package/dist/public/charting_library/charting_library.standalone.js +0 -99
- package/dist/src/App.js +0 -81
- package/dist/src/charting_library/bundles/0.d46f0b5e9380d7893de5.js +0 -112
- package/dist/src/charting_library/bundles/1.f02c87d35fbc8ffcaedb.js +0 -1
- package/dist/src/charting_library/bundles/10.21e665b7935d5bc4ba64.js +0 -322
- package/dist/src/charting_library/bundles/11.df012db70159a159d927.js +0 -1
- package/dist/src/charting_library/bundles/12.37750b21f6d8d35c6e6e.js +0 -1
- package/dist/src/charting_library/bundles/13.699469c73d09b7add56d.js +0 -1
- package/dist/src/charting_library/bundles/14.d1148b38d59df9ca5061.js +0 -1
- package/dist/src/charting_library/bundles/15.44f2acca80348a1da1a6.js +0 -89
- package/dist/src/charting_library/bundles/16.680572949c1125757d35.js +0 -1
- package/dist/src/charting_library/bundles/17.404a01f527881dfff424.js +0 -1
- package/dist/src/charting_library/bundles/18.78de69cfba051874e071.js +0 -120
- package/dist/src/charting_library/bundles/19.048f7f5d36fef428ca8d.js +0 -1
- package/dist/src/charting_library/bundles/2.60931787a6734697ac13.js +0 -118
- package/dist/src/charting_library/bundles/20.bc09ed47c5a62e1bc5c2.js +0 -128
- package/dist/src/charting_library/bundles/21.4c7b5cccb67a95e7e782.js +0 -1
- package/dist/src/charting_library/bundles/22.ca4300bcf614d8d5f4ab.js +0 -1
- package/dist/src/charting_library/bundles/23.256ba98e6a03200bdeba.js +0 -1
- package/dist/src/charting_library/bundles/24.bc4fafedb1730259aa10.js +0 -1
- package/dist/src/charting_library/bundles/25.7416db26ed3dcc87c05a.js +0 -611
- package/dist/src/charting_library/bundles/26.3aeec391d4e6e19989ee.js +0 -1
- package/dist/src/charting_library/bundles/27.e3ec08b1fb9df5f36ada.js +0 -69
- package/dist/src/charting_library/bundles/28.9f103042c27ea2df422f.js +0 -1
- package/dist/src/charting_library/bundles/29.3df8712b85d45a626aa0.js +0 -1
- package/dist/src/charting_library/bundles/3.76c398b01b707e5b251c.js +0 -1
- package/dist/src/charting_library/bundles/30.0b732ccb122d160480b6.js +0 -231
- package/dist/src/charting_library/bundles/31.8d2b7a538755fd1bb760.js +0 -166
- package/dist/src/charting_library/bundles/32.13ce02217cf8f9dd6d90.js +0 -121
- package/dist/src/charting_library/bundles/33.4d0dd1f7001fc02099bb.js +0 -1
- package/dist/src/charting_library/bundles/34.c9baa59add71a1e48fd2.js +0 -1
- package/dist/src/charting_library/bundles/35.ed9e360f9686ad3a9497.js +0 -1
- package/dist/src/charting_library/bundles/36.1882d1a8d312a0e193e9.js +0 -1
- package/dist/src/charting_library/bundles/37.90129e4904155350d6a1.js +0 -199
- package/dist/src/charting_library/bundles/38.41f3d509b61c8af47de3.js +0 -74
- package/dist/src/charting_library/bundles/39.bc1e9ce938fd5152831f.js +0 -1
- package/dist/src/charting_library/bundles/4.c7430b8d89cddcf51345.js +0 -1
- package/dist/src/charting_library/bundles/40.b59f41ba4cacbfb8acc3.js +0 -29
- package/dist/src/charting_library/bundles/41.a19b0ae5d68f855d2753.js +0 -1
- package/dist/src/charting_library/bundles/42.494986b0981f6d116fef.js +0 -1
- package/dist/src/charting_library/bundles/43.619c5ed4a592cc2965a4.js +0 -1
- package/dist/src/charting_library/bundles/44.0a7df307e4f397763ce8.js +0 -363
- package/dist/src/charting_library/bundles/45.db9dbd3e9bfeca5333da.js +0 -1
- package/dist/src/charting_library/bundles/46.f1d4cfe6d6f830b4a011.js +0 -114
- package/dist/src/charting_library/bundles/47.a3da3f774c90bd22798e.js +0 -95
- package/dist/src/charting_library/bundles/48.a93f9cb8b1bcc0e0f21e.js +0 -1
- package/dist/src/charting_library/bundles/49.bacd609f7eb77a4a4b68.js +0 -1
- package/dist/src/charting_library/bundles/5.5e97b270ab80d99e9085.js +0 -62
- package/dist/src/charting_library/bundles/50.b282667dddcb7fe1569a.js +0 -1
- package/dist/src/charting_library/bundles/51.11871c50951db825ace3.js +0 -1
- package/dist/src/charting_library/bundles/52.0379a85baae3ab43b15c.js +0 -1
- package/dist/src/charting_library/bundles/53.1d3ec98cfb8e19affb1c.js +0 -76
- package/dist/src/charting_library/bundles/54.bb5888ae55ea0a253a5b.js +0 -203
- package/dist/src/charting_library/bundles/55.3c35a629db21ab961f11.js +0 -303
- package/dist/src/charting_library/bundles/56.b3e69145c0fee614443d.js +0 -95
- package/dist/src/charting_library/bundles/57.236996ec416da4c1f683.js +0 -108
- package/dist/src/charting_library/bundles/58.7ffac4ba908b95705e63.js +0 -61
- package/dist/src/charting_library/bundles/59.397cb6699b74d64072a8.js +0 -1
- package/dist/src/charting_library/bundles/6.2d67b0ae77825dbd455d.js +0 -1
- package/dist/src/charting_library/bundles/60.6b5eced2ef8fa856be88.js +0 -1
- package/dist/src/charting_library/bundles/61.38a3040c925fadff7b64.js +0 -118
- package/dist/src/charting_library/bundles/62.63b309f5f8da9ca013b8.js +0 -61
- package/dist/src/charting_library/bundles/63.8255c7f5191bcafcee7c.js +0 -1
- package/dist/src/charting_library/bundles/64.ec4b4d03b28c77658dde.js +0 -1
- package/dist/src/charting_library/bundles/65.f895a78b4e04257983ff.js +0 -1
- package/dist/src/charting_library/bundles/66.2979e9b7c35e7bf03a37.js +0 -1
- package/dist/src/charting_library/bundles/67.25fd4b78c8c514988aeb.js +0 -1
- package/dist/src/charting_library/bundles/68.8b4124c875484d11fd94.js +0 -1
- package/dist/src/charting_library/bundles/69.43756a5c7477730eb0c4.js +0 -1
- package/dist/src/charting_library/bundles/7.2c7c4f8a49c6380227de.js +0 -68
- package/dist/src/charting_library/bundles/70.cb9d1bb5a00896c1bb97.js +0 -1
- package/dist/src/charting_library/bundles/71.6a9d0842f5e48f68399c.js +0 -1
- package/dist/src/charting_library/bundles/72.e3925aaf38d2c8997638.js +0 -1
- package/dist/src/charting_library/bundles/73.8ca1a096c5bdc2e5fb8a.js +0 -1
- package/dist/src/charting_library/bundles/74.34dcc0d3cd1bbfa5e951.js +0 -1
- package/dist/src/charting_library/bundles/75.1c9a3a6524248ddf88bf.js +0 -1
- package/dist/src/charting_library/bundles/76.5d20bed213399f326603.js +0 -1
- package/dist/src/charting_library/bundles/77.3e4ccccc7d3eb03c488f.js +0 -1
- package/dist/src/charting_library/bundles/78.1d1d47a915b06f1496fb.js +0 -1
- package/dist/src/charting_library/bundles/79.86e92b77f8cf32e6bc37.js +0 -1
- package/dist/src/charting_library/bundles/8.ffab20b86db484062268.js +0 -1
- package/dist/src/charting_library/bundles/80.b5bc6acec3b531a510a9.js +0 -1
- package/dist/src/charting_library/bundles/81.e6a1f76017a44b03480b.js +0 -1
- package/dist/src/charting_library/bundles/82.8c2919e6c8f54e36e9e6.js +0 -1
- package/dist/src/charting_library/bundles/83.f3e53bb5a5940e084955.js +0 -1
- package/dist/src/charting_library/bundles/84.8acc496b4deeeeefb5af.js +0 -1
- package/dist/src/charting_library/bundles/85.39c78fbeaabae306f343.js +0 -1
- package/dist/src/charting_library/bundles/86.4bbbb9e6262243419986.js +0 -1
- package/dist/src/charting_library/bundles/87.cf03fa0a76bfcadd157d.js +0 -1
- package/dist/src/charting_library/bundles/88.d1e3aec63ece25f6b8a9.js +0 -1
- package/dist/src/charting_library/bundles/89.d8aa43b4b9378722d572.js +0 -1
- package/dist/src/charting_library/bundles/9.84ecbc930e51cb26d06a.js +0 -1
- package/dist/src/charting_library/bundles/90.ce47bb68fc3fc88b5590.js +0 -1
- package/dist/src/charting_library/bundles/91.a9b79ef7ba0a62311a53.js +0 -1
- package/dist/src/charting_library/bundles/92.76d5ca7ebec10a1a7a12.js +0 -1
- package/dist/src/charting_library/bundles/93.6de56ef1975f4a31e542.js +0 -1
- package/dist/src/charting_library/bundles/94.231bea5fb12b806ef287.js +0 -1
- package/dist/src/charting_library/bundles/95.6f7da80aac5cf2bf77d6.js +0 -1
- package/dist/src/charting_library/bundles/96.43bb935eee30715afff7.js +0 -1
- package/dist/src/charting_library/bundles/add-compare-dialog.f980c19f222ff9cb8fe6.js +0 -263
- package/dist/src/charting_library/bundles/change-interval-dialog.e928f8dec65c9244cafe.js +0 -52
- package/dist/src/charting_library/bundles/chart-bottom-toolbar.b2e895a5fd3f204fb6b6.js +0 -399
- package/dist/src/charting_library/bundles/chart-event-hint.94e94e93f9fdee936b66.js +0 -97
- package/dist/src/charting_library/bundles/chart-screenshot-hint.14bfec43c52bc3d28f82.js +0 -49
- package/dist/src/charting_library/bundles/chart-widget-gui.226991e9f53aba124fc2.js +0 -1199
- package/dist/src/charting_library/bundles/compare-model.0e6bbdc5f5942c9a716e.js +0 -181
- package/dist/src/charting_library/bundles/context-menu-renderer.7f6f59270ef0f3afa2ed.js +0 -107
- package/dist/src/charting_library/bundles/currency-label-menu.a7a0c0e44d64b092f2cc.js +0 -131
- package/dist/src/charting_library/bundles/custom-intervals-add-dialog.bb64431fb1c6d852f9f1.js +0 -71
- package/dist/src/charting_library/bundles/drawing-toolbar.8cc497633535648562e7.js +0 -250
- package/dist/src/charting_library/bundles/export-data.c819cfa996e2815ff11d.js +0 -78
- package/dist/src/charting_library/bundles/floating-toolbars.d78a058b82ab09013aac.js +0 -508
- package/dist/src/charting_library/bundles/full-tooltips-popup.96fc751e06523b742440.js +0 -92
- package/dist/src/charting_library/bundles/general-chart-properties-dialog.b08948e0c90aebf07ebd.js +0 -85
- package/dist/src/charting_library/bundles/general-property-page.32bdfdbafbd81d9e83c6.js +0 -104
- package/dist/src/charting_library/bundles/go-to-date-dialog-impl.3481c4fcfde2f4d46426.js +0 -361
- package/dist/src/charting_library/bundles/hammerjs.e5489031ed611f47bf09.js +0 -224
- package/dist/src/charting_library/bundles/header-toolbar.4bff61e047f9b8379494.js +0 -228
- package/dist/src/charting_library/bundles/library.8b0dd8732414a2bcbcb1.js +0 -26194
- package/dist/src/charting_library/bundles/line-tools-icons.090f39d92664af3915a5.js +0 -60
- package/dist/src/charting_library/bundles/load-chart-dialog.6cc1a47b17698c0108cb.js +0 -101
- package/dist/src/charting_library/bundles/lollipop-tooltip-renderer.6705b971a2e73c26ecad.js +0 -116
- package/dist/src/charting_library/bundles/lt-pane-views.4d2ee6c5330cd3760eb0.js +0 -4029
- package/dist/src/charting_library/bundles/lt-property-pages-with-definitions.a5e8283e77afa66b5636.js +0 -735
- package/dist/src/charting_library/bundles/manage-drawings-dialog.1c0c3737002fa63fe6a6.js +0 -16
- package/dist/src/charting_library/bundles/moment.78e587a83a009ca48cda.js +0 -369
- package/dist/src/charting_library/bundles/new-confirm-inputs-dialog.00d79c2263e005170345.js +0 -130
- package/dist/src/charting_library/bundles/new-edit-object-dialog.0ed1c3834cfc0e834aed.js +0 -405
- package/dist/src/charting_library/bundles/object-tree-dialog.8e2b7eb9ba2f1dbfbc11.js +0 -1807
- package/dist/src/charting_library/bundles/react.9f2899b40ad0e104f6c9.js +0 -3715
- package/dist/src/charting_library/bundles/redux.43c3f6d214bcf2d1fbd1.js +0 -354
- package/dist/src/charting_library/bundles/restricted-toolset.08fefbae2bc0877b0ef2.js +0 -566
- package/dist/src/charting_library/bundles/runtime.dfe30490f666a6b5d4fe.js +0 -79
- package/dist/src/charting_library/bundles/series-icons-map.ec8043f64d8b06dbce29.js +0 -8
- package/dist/src/charting_library/bundles/series-pane-views.eefe35e1c508ac16c102.js +0 -52
- package/dist/src/charting_library/bundles/share-chart-to-social-utils.c225af2051efd23269e0.js +0 -5
- package/dist/src/charting_library/bundles/show-theme-save-dialog.f81ebf1b2ce08f4399fd.js +0 -11
- package/dist/src/charting_library/bundles/simple-dialog.bd79f02afd512f0f36dd.js +0 -189
- package/dist/src/charting_library/bundles/source-properties-editor.e858d44541ebb6f974a2.js +0 -39
- package/dist/src/charting_library/bundles/study-market.3efd7bf7bc6e6fc7db2d.js +0 -174
- package/dist/src/charting_library/bundles/study-pane-views.9a873dcf74adedf7600b.js +0 -204
- package/dist/src/charting_library/bundles/study-property-pages-with-definitions.ca4fc2ef5a4deff8c0bb.js +0 -125
- package/dist/src/charting_library/bundles/study-template-dialog.fe56a9893a3695e93531.js +0 -320
- package/dist/src/charting_library/bundles/symbol-info-dialog-impl.17daedab6f893acdeae4.js +0 -123
- package/dist/src/charting_library/bundles/symbol-search-dialog.fd3311eee8604f807c80.js +0 -35
- package/dist/src/charting_library/bundles/take-chart-image-impl.c0e6073dcac3041eecf2.js +0 -74
- package/dist/src/charting_library/bundles/vendors.6f5e0d8d267cb3e63ee0.js +0 -1304
- package/dist/src/charting_library/charting_library.cjs.js +0 -98
- package/dist/src/charting_library/charting_library.esm.js +0 -101
- package/dist/src/charting_library/charting_library.js +0 -99
- package/dist/src/charting_library/charting_library.standalone.js +0 -515
- package/dist/src/components/TVChartContainer.js +0 -122
- package/dist/src/components/datafeed.js +0 -199
- package/dist/src/components/helpers.js +0 -58
- package/dist/src/components/index.js +0 -7
- package/dist/src/components/streaming.js +0 -92
- package/dist/src/index.js +0 -14
|
@@ -0,0 +1,752 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __export = (target, all) => {
|
|
20
|
+
for (var name in all)
|
|
21
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
22
|
+
};
|
|
23
|
+
var __copyProps = (to, from, except, desc) => {
|
|
24
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
25
|
+
for (let key of __getOwnPropNames(from))
|
|
26
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
27
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
28
|
+
}
|
|
29
|
+
return to;
|
|
30
|
+
};
|
|
31
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
33
|
+
var __async = (__this, __arguments, generator) => {
|
|
34
|
+
return new Promise((resolve, reject) => {
|
|
35
|
+
var fulfilled = (value) => {
|
|
36
|
+
try {
|
|
37
|
+
step(generator.next(value));
|
|
38
|
+
} catch (e) {
|
|
39
|
+
reject(e);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var rejected = (value) => {
|
|
43
|
+
try {
|
|
44
|
+
step(generator.throw(value));
|
|
45
|
+
} catch (e) {
|
|
46
|
+
reject(e);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
50
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// src/components/TVChartContainer.tsx
|
|
55
|
+
var TVChartContainer_exports = {};
|
|
56
|
+
__export(TVChartContainer_exports, {
|
|
57
|
+
default: () => TVChartContainer_default
|
|
58
|
+
});
|
|
59
|
+
module.exports = __toCommonJS(TVChartContainer_exports);
|
|
60
|
+
var import_react2 = require("react");
|
|
61
|
+
|
|
62
|
+
// src/charting_library/charting_library.js
|
|
63
|
+
!function(e, t) {
|
|
64
|
+
"object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t((e = "undefined" != typeof globalThis ? globalThis : e || self).TradingView = {});
|
|
65
|
+
}(void 0, function(e) {
|
|
66
|
+
"use strict";
|
|
67
|
+
function t(e2, i2) {
|
|
68
|
+
const n2 = __spreadValues({}, e2);
|
|
69
|
+
for (const o2 in i2) "object" != typeof e2[o2] || null === e2[o2] || Array.isArray(e2[o2]) ? void 0 !== i2[o2] && (n2[o2] = i2[o2]) : n2[o2] = t(e2[o2], i2[o2]);
|
|
70
|
+
return n2;
|
|
71
|
+
}
|
|
72
|
+
const i = { mobile: { disabled_features: ["left_toolbar", "header_widget", "timeframes_toolbar", "edit_buttons_in_legend", "context_menus", "control_bar", "border_around_the_chart"], enabled_features: [] } }, n = { width: 800, height: 500, interval: "1D", timezone: "Etc/UTC", container: "", library_path: "", locale: "en", widgetbar: { details: false, watchlist: false, watchlist_settings: { default_symbols: [] } }, overrides: { "mainSeriesProperties.showCountdown": false }, studies_overrides: {}, trading_customization: { position: {}, order: {} }, brokerConfig: { configFlags: {} }, fullscreen: false, autosize: false, disabled_features: [], enabled_features: [], debug: false, logo: {}, time_frames: [{ text: "5y", resolution: "1W" }, { text: "1y", resolution: "1W" }, { text: "6m", resolution: "120" }, { text: "3m", resolution: "60" }, { text: "1m", resolution: "30" }, { text: "5d", resolution: "5" }, { text: "1d", resolution: "1" }], client_id: "0", user_id: "0", charts_storage_api_version: "1.0", favorites: { intervals: [], chartTypes: [] } };
|
|
73
|
+
let o = false;
|
|
74
|
+
function s() {
|
|
75
|
+
return "CL v21.064 (internal id f0bc1e45 @ 2022-03-17T12:19:26.809Z)";
|
|
76
|
+
}
|
|
77
|
+
const r = class {
|
|
78
|
+
constructor(e2) {
|
|
79
|
+
if (this._id = `tradingview_${(1048576 * (1 + Math.random()) | 0).toString(16).substring(1)}`, this._ready = false, this._readyHandlers = [], this._onWindowResize = this._autoResizeChart.bind(this), !e2.datafeed) throw new Error("Datafeed is not defined");
|
|
80
|
+
if (this._options = t(n, e2), e2.preset) {
|
|
81
|
+
const t2 = i[e2.preset];
|
|
82
|
+
t2 ? (void 0 !== this._options.disabled_features ? this._options.disabled_features = this._options.disabled_features.concat(t2.disabled_features) : this._options.disabled_features = t2.disabled_features, void 0 !== this._options.enabled_features ? this._options.enabled_features = this._options.enabled_features.concat(t2.enabled_features) : this._options.enabled_features = t2.enabled_features) : console.warn("Unknown preset: `" + e2.preset + "`");
|
|
83
|
+
}
|
|
84
|
+
"Dark" === this._options.theme && void 0 === this._options.loading_screen && (this._options.loading_screen = { backgroundColor: "#131722" }), this._options.debug && (o || (o = true, console.log("Using CL v21.064 (internal id f0bc1e45 @ 2022-03-17T12:19:26.809Z)"))), this._create();
|
|
85
|
+
}
|
|
86
|
+
onChartReady(e2) {
|
|
87
|
+
this._ready ? e2.call(this) : this._readyHandlers.push(e2);
|
|
88
|
+
}
|
|
89
|
+
headerReady() {
|
|
90
|
+
return this._innerWindowLoaded.then(() => this._innerWindow().headerReady());
|
|
91
|
+
}
|
|
92
|
+
onGrayedObjectClicked(e2) {
|
|
93
|
+
this._doWhenInnerApiLoaded((t2) => {
|
|
94
|
+
t2.onGrayedObjectClicked(e2);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
onShortcut(e2, t2) {
|
|
98
|
+
this._doWhenInnerWindowLoaded((i2) => {
|
|
99
|
+
i2.createShortcutAction(e2, t2);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
subscribe(e2, t2) {
|
|
103
|
+
this._doWhenInnerApiLoaded((i2) => {
|
|
104
|
+
i2.subscribe(e2, t2);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
unsubscribe(e2, t2) {
|
|
108
|
+
this._doWhenInnerApiLoaded((i2) => {
|
|
109
|
+
i2.unsubscribe(e2, t2);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
chart(e2) {
|
|
113
|
+
return this._innerAPI().chart(e2);
|
|
114
|
+
}
|
|
115
|
+
getLanguage() {
|
|
116
|
+
return this._options.locale;
|
|
117
|
+
}
|
|
118
|
+
setSymbol(e2, t2, i2) {
|
|
119
|
+
this._innerAPI().changeSymbol(e2, t2, i2);
|
|
120
|
+
}
|
|
121
|
+
remove() {
|
|
122
|
+
window.removeEventListener("resize", this._onWindowResize), this._readyHandlers.splice(0, this._readyHandlers.length), delete window[this._id], this._iFrame.parentNode && this._iFrame.parentNode.removeChild(this._iFrame);
|
|
123
|
+
}
|
|
124
|
+
closePopupsAndDialogs() {
|
|
125
|
+
this._doWhenInnerApiLoaded((e2) => {
|
|
126
|
+
e2.closePopupsAndDialogs();
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
selectLineTool(e2) {
|
|
130
|
+
this._innerAPI().selectLineTool(e2);
|
|
131
|
+
}
|
|
132
|
+
selectedLineTool() {
|
|
133
|
+
return this._innerAPI().selectedLineTool();
|
|
134
|
+
}
|
|
135
|
+
save(e2) {
|
|
136
|
+
this._innerAPI().saveChart(e2);
|
|
137
|
+
}
|
|
138
|
+
load(e2, t2) {
|
|
139
|
+
this._innerAPI().loadChart({ json: e2, extendedData: t2 });
|
|
140
|
+
}
|
|
141
|
+
getSavedCharts(e2) {
|
|
142
|
+
this._innerAPI().getSavedCharts(e2);
|
|
143
|
+
}
|
|
144
|
+
loadChartFromServer(e2) {
|
|
145
|
+
this._innerAPI().loadChartFromServer(e2);
|
|
146
|
+
}
|
|
147
|
+
saveChartToServer(e2, t2, i2) {
|
|
148
|
+
this._innerAPI().saveChartToServer(e2, t2, i2);
|
|
149
|
+
}
|
|
150
|
+
removeChartFromServer(e2, t2) {
|
|
151
|
+
this._innerAPI().removeChartFromServer(e2, t2);
|
|
152
|
+
}
|
|
153
|
+
onContextMenu(e2) {
|
|
154
|
+
this._doWhenInnerApiLoaded((t2) => {
|
|
155
|
+
t2.onContextMenu(e2);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
createButton(e2) {
|
|
159
|
+
return this._innerWindow().createButton(e2);
|
|
160
|
+
}
|
|
161
|
+
createDropdown(e2) {
|
|
162
|
+
return this._innerWindow().createDropdown(e2);
|
|
163
|
+
}
|
|
164
|
+
showNoticeDialog(e2) {
|
|
165
|
+
this._doWhenInnerApiLoaded((t2) => {
|
|
166
|
+
t2.showNoticeDialog(e2);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
showConfirmDialog(e2) {
|
|
170
|
+
this._doWhenInnerApiLoaded((t2) => {
|
|
171
|
+
t2.showConfirmDialog(e2);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
showLoadChartDialog() {
|
|
175
|
+
this._innerAPI().showLoadChartDialog();
|
|
176
|
+
}
|
|
177
|
+
showSaveAsChartDialog() {
|
|
178
|
+
this._innerAPI().showSaveAsChartDialog();
|
|
179
|
+
}
|
|
180
|
+
symbolInterval() {
|
|
181
|
+
return this._innerAPI().getSymbolInterval();
|
|
182
|
+
}
|
|
183
|
+
mainSeriesPriceFormatter() {
|
|
184
|
+
return this._innerAPI().mainSeriesPriceFormatter();
|
|
185
|
+
}
|
|
186
|
+
getIntervals() {
|
|
187
|
+
return this._innerAPI().getIntervals();
|
|
188
|
+
}
|
|
189
|
+
getStudiesList() {
|
|
190
|
+
return this._innerAPI().getStudiesList();
|
|
191
|
+
}
|
|
192
|
+
getStudyInputs(e2) {
|
|
193
|
+
return this._innerAPI().getStudyInputs(e2);
|
|
194
|
+
}
|
|
195
|
+
addCustomCSSFile(e2) {
|
|
196
|
+
this._innerWindow().addCustomCSSFile(e2);
|
|
197
|
+
}
|
|
198
|
+
applyOverrides(e2) {
|
|
199
|
+
this._options = t(this._options, { overrides: e2 }), this._doWhenInnerWindowLoaded((t2) => {
|
|
200
|
+
t2.applyOverrides(e2);
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
applyStudiesOverrides(e2) {
|
|
204
|
+
this._doWhenInnerWindowLoaded((t2) => {
|
|
205
|
+
t2.applyStudiesOverrides(e2);
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
watchList() {
|
|
209
|
+
return this._innerAPI().watchlist();
|
|
210
|
+
}
|
|
211
|
+
news() {
|
|
212
|
+
return this._innerAPI().news();
|
|
213
|
+
}
|
|
214
|
+
activeChart() {
|
|
215
|
+
return this._innerAPI().activeChart();
|
|
216
|
+
}
|
|
217
|
+
chartsCount() {
|
|
218
|
+
return this._innerAPI().chartsCount();
|
|
219
|
+
}
|
|
220
|
+
layout() {
|
|
221
|
+
return this._innerAPI().layout();
|
|
222
|
+
}
|
|
223
|
+
setLayout(e2) {
|
|
224
|
+
this._innerAPI().setLayout(e2);
|
|
225
|
+
}
|
|
226
|
+
layoutName() {
|
|
227
|
+
return this._innerAPI().layoutName();
|
|
228
|
+
}
|
|
229
|
+
changeTheme(e2, t2) {
|
|
230
|
+
return this._innerWindow().changeTheme(e2, t2);
|
|
231
|
+
}
|
|
232
|
+
getTheme() {
|
|
233
|
+
return this._innerWindow().getTheme();
|
|
234
|
+
}
|
|
235
|
+
takeScreenshot() {
|
|
236
|
+
this._doWhenInnerApiLoaded((e2) => {
|
|
237
|
+
e2.takeScreenshot();
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
lockAllDrawingTools() {
|
|
241
|
+
return this._innerAPI().lockAllDrawingTools();
|
|
242
|
+
}
|
|
243
|
+
hideAllDrawingTools() {
|
|
244
|
+
return this._innerAPI().hideAllDrawingTools();
|
|
245
|
+
}
|
|
246
|
+
drawOnAllCharts(e2) {
|
|
247
|
+
this._innerAPI().drawOnAllCharts(e2);
|
|
248
|
+
}
|
|
249
|
+
magnetEnabled() {
|
|
250
|
+
return this._innerAPI().magnetEnabled();
|
|
251
|
+
}
|
|
252
|
+
magnetMode() {
|
|
253
|
+
return this._innerAPI().magnetMode();
|
|
254
|
+
}
|
|
255
|
+
undoRedoState() {
|
|
256
|
+
return this._innerAPI().undoRedoState();
|
|
257
|
+
}
|
|
258
|
+
setIntervalLinkingEnabled(e2) {
|
|
259
|
+
this._innerAPI().setIntervalLinkingEnabled(e2);
|
|
260
|
+
}
|
|
261
|
+
setTimeFrame(e2) {
|
|
262
|
+
this._innerAPI().setTimeFrame(e2);
|
|
263
|
+
}
|
|
264
|
+
symbolSync() {
|
|
265
|
+
return this._innerAPI().symbolSync();
|
|
266
|
+
}
|
|
267
|
+
intervalSync() {
|
|
268
|
+
return this._innerAPI().intervalSync();
|
|
269
|
+
}
|
|
270
|
+
crosshairSync() {
|
|
271
|
+
return this._innerAPI().crosshairSync();
|
|
272
|
+
}
|
|
273
|
+
timeSync() {
|
|
274
|
+
return this._innerAPI().timeSync();
|
|
275
|
+
}
|
|
276
|
+
getAllFeatures() {
|
|
277
|
+
return this._innerWindow().getAllFeatures();
|
|
278
|
+
}
|
|
279
|
+
clearUndoHistory() {
|
|
280
|
+
return this._innerAPI().clearUndoHistory();
|
|
281
|
+
}
|
|
282
|
+
undo() {
|
|
283
|
+
return this._innerAPI().undo();
|
|
284
|
+
}
|
|
285
|
+
redo() {
|
|
286
|
+
return this._innerAPI().redo();
|
|
287
|
+
}
|
|
288
|
+
startFullscreen() {
|
|
289
|
+
this._innerAPI().startFullscreen();
|
|
290
|
+
}
|
|
291
|
+
exitFullscreen() {
|
|
292
|
+
this._innerAPI().exitFullscreen();
|
|
293
|
+
}
|
|
294
|
+
takeClientScreenshot(e2) {
|
|
295
|
+
return this._innerAPI().takeClientScreenshot(e2);
|
|
296
|
+
}
|
|
297
|
+
navigationButtonsVisibility() {
|
|
298
|
+
return this._innerWindow().getNavigationButtonsVisibility();
|
|
299
|
+
}
|
|
300
|
+
paneButtonsVisibility() {
|
|
301
|
+
return this._innerWindow().getPaneButtonsVisibility();
|
|
302
|
+
}
|
|
303
|
+
dateFormat() {
|
|
304
|
+
return this._innerWindow().getDateFormat();
|
|
305
|
+
}
|
|
306
|
+
_innerAPI() {
|
|
307
|
+
return this._innerWindow().tradingViewApi;
|
|
308
|
+
}
|
|
309
|
+
_innerWindow() {
|
|
310
|
+
return this._iFrame.contentWindow;
|
|
311
|
+
}
|
|
312
|
+
_doWhenInnerWindowLoaded(e2) {
|
|
313
|
+
this._ready ? e2(this._innerWindow()) : this._innerWindowLoaded.then(() => {
|
|
314
|
+
e2(this._innerWindow());
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
_doWhenInnerApiLoaded(e2) {
|
|
318
|
+
this._doWhenInnerWindowLoaded((t2) => {
|
|
319
|
+
t2.doWhenApiIsReady(() => e2(this._innerAPI()));
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
_autoResizeChart() {
|
|
323
|
+
this._options.fullscreen && (this._iFrame.style.height = window.innerHeight + "px");
|
|
324
|
+
}
|
|
325
|
+
_create() {
|
|
326
|
+
const e2 = this._render();
|
|
327
|
+
this._options.container_id && console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");
|
|
328
|
+
const t2 = this._options.container_id || this._options.container, i2 = "string" == typeof t2 ? document.getElementById(t2) : t2;
|
|
329
|
+
if (null === i2) throw new Error(`There is no such element - #${this._options.container}`);
|
|
330
|
+
i2.innerHTML = e2, this._iFrame = i2.querySelector(`#${this._id}`);
|
|
331
|
+
const n2 = this._iFrame;
|
|
332
|
+
(this._options.autosize || this._options.fullscreen) && (n2.style.width = "100%", this._options.fullscreen || (n2.style.height = "100%")), window.addEventListener("resize", this._onWindowResize), this._onWindowResize(), this._innerWindowLoaded = new Promise((e3) => {
|
|
333
|
+
const t3 = () => {
|
|
334
|
+
n2.removeEventListener("load", t3, false), e3();
|
|
335
|
+
};
|
|
336
|
+
n2.addEventListener("load", t3, false);
|
|
337
|
+
}), this._innerWindowLoaded.then(() => {
|
|
338
|
+
this._innerWindow().widgetReady(() => {
|
|
339
|
+
this._ready = true;
|
|
340
|
+
for (const e3 of this._readyHandlers) try {
|
|
341
|
+
e3.call(this);
|
|
342
|
+
} catch (e4) {
|
|
343
|
+
console.error(e4);
|
|
344
|
+
}
|
|
345
|
+
this._innerWindow().initializationFinished();
|
|
346
|
+
});
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
_render() {
|
|
350
|
+
const e2 = window;
|
|
351
|
+
if (e2[this._id] = { datafeed: this._options.datafeed, customFormatters: this._options.custom_formatters || this._options.customFormatters, brokerFactory: this._options.broker_factory || this._options.brokerFactory, overrides: this._options.overrides, studiesOverrides: this._options.studies_overrides, tradingCustomization: this._options.trading_customization, disabledFeatures: this._options.disabled_features, enabledFeatures: this._options.enabled_features, brokerConfig: this._options.broker_config || this._options.brokerConfig, restConfig: this._options.restConfig, favorites: this._options.favorites, logo: this._options.logo, numeric_formatting: this._options.numeric_formatting, rss_news_feed: this._options.rss_news_feed, newsProvider: this._options.news_provider, loadLastChart: this._options.load_last_chart, saveLoadAdapter: this._options.save_load_adapter, loading_screen: this._options.loading_screen, settingsAdapter: this._options.settings_adapter, getCustomIndicators: this._options.custom_indicators_getter, additionalSymbolInfoFields: this._options.additional_symbol_info_fields, headerWidgetButtonsMode: this._options.header_widget_buttons_mode, symbolSearchComplete: this._options.symbol_search_complete }, this._options.saved_data) e2[this._id].chartContent = { json: this._options.saved_data }, this._options.saved_data_meta_info && (e2[this._id].chartContentExtendedData = this._options.saved_data_meta_info);
|
|
352
|
+
else if (!this._options.load_last_chart && !this._options.symbol) throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");
|
|
353
|
+
const t2 = (this._options.library_path || "") + `${encodeURIComponent(this._options.locale)}-tv-chart.f0bc1e45.html#symbol=` + encodeURIComponent(this._options.symbol || "") + "&interval=" + encodeURIComponent(this._options.interval) + (this._options.timeframe ? "&timeframe=" + encodeURIComponent(this._options.timeframe) : "") + (this._options.toolbar_bg ? "&toolbarbg=" + encodeURIComponent(this._options.toolbar_bg.replace("#", "")) : "") + (this._options.studies_access ? "&studiesAccess=" + encodeURIComponent(JSON.stringify(this._options.studies_access)) : "") + "&widgetbar=" + encodeURIComponent(JSON.stringify(this._options.widgetbar)) + (this._options.drawings_access ? "&drawingsAccess=" + encodeURIComponent(JSON.stringify(this._options.drawings_access)) : "") + "&timeFrames=" + encodeURIComponent(JSON.stringify(this._options.time_frames)) + "&locale=" + encodeURIComponent(this._options.locale) + "&uid=" + encodeURIComponent(this._id) + "&clientId=" + encodeURIComponent(String(this._options.client_id)) + "&userId=" + encodeURIComponent(String(this._options.user_id)) + (this._options.charts_storage_url ? "&chartsStorageUrl=" + encodeURIComponent(this._options.charts_storage_url) : "") + (this._options.charts_storage_api_version ? "&chartsStorageVer=" + encodeURIComponent(this._options.charts_storage_api_version) : "") + (this._options.custom_css_url ? "&customCSS=" + encodeURIComponent(this._options.custom_css_url) : "") + (this._options.auto_save_delay ? "&autoSaveDelay=" + encodeURIComponent(String(this._options.auto_save_delay)) : "") + "&debug=" + encodeURIComponent(String(this._options.debug)) + (this._options.snapshot_url ? "&snapshotUrl=" + encodeURIComponent(this._options.snapshot_url) : "") + (this._options.timezone ? "&timezone=" + encodeURIComponent(this._options.timezone) : "") + (this._options.study_count_limit ? "&studyCountLimit=" + encodeURIComponent(String(this._options.study_count_limit)) : "") + (this._options.symbol_search_request_delay ? "&ssreqdelay=" + encodeURIComponent(String(this._options.symbol_search_request_delay)) : "") + (this._options.compare_symbols ? "&compareSymbols=" + encodeURIComponent(JSON.stringify(this._options.compare_symbols)) : "") + (this._options.theme ? "&theme=" + encodeURIComponent(String(this._options.theme)) : "") + (this._options.header_widget_buttons_mode ? "&header_widget_buttons_mode=" + encodeURIComponent(String(this._options.header_widget_buttons_mode)) : "") + (this._options.time_scale ? "&time_scale=" + encodeURIComponent(JSON.stringify(this._options.time_scale)) : "");
|
|
354
|
+
return '<iframe id="' + this._id + '" name="' + this._id + '" src="' + t2 + '"' + (this._options.autosize || this._options.fullscreen ? "" : ' width="' + this._options.width + '" height="' + this._options.height + '"') + ' title="Financial Chart" frameborder="0" allowTransparency="true" scrolling="no" allowfullscreen style="display:block;"></iframe>';
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
window.TradingView = window.TradingView || {}, window.TradingView.version = s, e.version = s, e.widget = r, Object.defineProperty(e, "__esModule", { value: true });
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
// src/components/helpers.js
|
|
361
|
+
var import_react = require("react");
|
|
362
|
+
function makeApiRequest(path) {
|
|
363
|
+
return __async(this, null, function* () {
|
|
364
|
+
try {
|
|
365
|
+
const response = yield fetch(`https://api.binance.com/${path}`);
|
|
366
|
+
return response.json();
|
|
367
|
+
} catch (error) {
|
|
368
|
+
throw new Error(`Binance request error: ${error.status}`);
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
function getAllSymbols(symbol) {
|
|
373
|
+
return __async(this, null, function* () {
|
|
374
|
+
let newSymbols = [];
|
|
375
|
+
try {
|
|
376
|
+
const data = yield makeApiRequest(`api/v3/exchangeInfo?symbol=${symbol.toUpperCase()}`);
|
|
377
|
+
data.symbols.forEach((item) => {
|
|
378
|
+
if (item.status === "TRADING") {
|
|
379
|
+
newSymbols.push({
|
|
380
|
+
symbol: item.symbol,
|
|
381
|
+
full_name: `${item.baseAsset}/${item.quoteAsset}`,
|
|
382
|
+
description: `Precision: ${item.quoteAssetPrecision}`,
|
|
383
|
+
exchange: "Binance",
|
|
384
|
+
ticker: item.symbol,
|
|
385
|
+
type: "crypto"
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
} catch (e) {
|
|
390
|
+
return newSymbols;
|
|
391
|
+
}
|
|
392
|
+
return newSymbols;
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
// src/components/streaming.js
|
|
397
|
+
var channelToSubscription = /* @__PURE__ */ new Map();
|
|
398
|
+
function setupSockets(subRequest) {
|
|
399
|
+
const socket = new WebSocket("wss://stream.binance.com:9443/ws");
|
|
400
|
+
window.socket = socket;
|
|
401
|
+
socket.onopen = (event) => {
|
|
402
|
+
console.log("[socket] Connected");
|
|
403
|
+
socket.send(JSON.stringify(subRequest));
|
|
404
|
+
};
|
|
405
|
+
socket.onclose = (reason) => {
|
|
406
|
+
console.log("[socket] Disconnected:", reason);
|
|
407
|
+
};
|
|
408
|
+
socket.onerror = (error) => {
|
|
409
|
+
console.log("[socket] Error:", error);
|
|
410
|
+
};
|
|
411
|
+
socket.onmessage = (e) => {
|
|
412
|
+
const data = JSON.parse(e.data);
|
|
413
|
+
if (data.e == void 0) {
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
const {
|
|
417
|
+
s: symbol,
|
|
418
|
+
t: startTime,
|
|
419
|
+
T: closeTime,
|
|
420
|
+
i: interval,
|
|
421
|
+
o: open,
|
|
422
|
+
c: close,
|
|
423
|
+
h: high,
|
|
424
|
+
l: low,
|
|
425
|
+
v: volume,
|
|
426
|
+
n: trades,
|
|
427
|
+
q: quoteVolume
|
|
428
|
+
} = data.k;
|
|
429
|
+
const channelString = `${symbol.toLowerCase()}@kline_${interval}`;
|
|
430
|
+
const subscriptionItem = channelToSubscription.get(channelString);
|
|
431
|
+
if (subscriptionItem === void 0) {
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
const bar = {
|
|
435
|
+
time: startTime,
|
|
436
|
+
open,
|
|
437
|
+
high,
|
|
438
|
+
low,
|
|
439
|
+
close,
|
|
440
|
+
volume
|
|
441
|
+
};
|
|
442
|
+
subscriptionItem.handlers.forEach((handler) => handler.callback(bar));
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
function subscribeOnStream(symbolInfo, resolution, onRealtimeCallback, subscribeUID, onResetCacheNeededCallback, interval) {
|
|
446
|
+
const channelString = `${symbolInfo.name.toLowerCase()}@kline_${interval}`;
|
|
447
|
+
const handler = {
|
|
448
|
+
id: subscribeUID,
|
|
449
|
+
callback: onRealtimeCallback
|
|
450
|
+
};
|
|
451
|
+
let subscriptionItem = channelToSubscription.get(channelString);
|
|
452
|
+
if (subscriptionItem) {
|
|
453
|
+
subscriptionItem.handlers.push(handler);
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
subscriptionItem = {
|
|
457
|
+
subscribeUID,
|
|
458
|
+
resolution,
|
|
459
|
+
handlers: [handler]
|
|
460
|
+
};
|
|
461
|
+
const subRequest = {
|
|
462
|
+
method: "SUBSCRIBE",
|
|
463
|
+
params: [channelString],
|
|
464
|
+
id: 1
|
|
465
|
+
};
|
|
466
|
+
channelToSubscription.set(channelString, subscriptionItem);
|
|
467
|
+
setupSockets(subRequest);
|
|
468
|
+
}
|
|
469
|
+
function unsubscribeFromStream(subscriberUID) {
|
|
470
|
+
for (const channelString of channelToSubscription.keys()) {
|
|
471
|
+
const subscriptionItem = channelToSubscription.get(channelString);
|
|
472
|
+
const handlerIndex = subscriptionItem.handlers.findIndex(
|
|
473
|
+
(handler) => handler.id === subscriberUID
|
|
474
|
+
);
|
|
475
|
+
if (handlerIndex !== -1) {
|
|
476
|
+
subscriptionItem.handlers.splice(handlerIndex, 1);
|
|
477
|
+
if (subscriptionItem.handlers.length === 0) {
|
|
478
|
+
console.log(
|
|
479
|
+
"[unsubscribeBars]: Unsubscribe from streaming. Channel:",
|
|
480
|
+
channelString
|
|
481
|
+
);
|
|
482
|
+
const subRequest = {
|
|
483
|
+
method: "UNSUBSCRIBE",
|
|
484
|
+
params: [channelString],
|
|
485
|
+
id: 1
|
|
486
|
+
};
|
|
487
|
+
window.socket.send(JSON.stringify(subRequest));
|
|
488
|
+
channelToSubscription.delete(channelString);
|
|
489
|
+
window.socket = void 0;
|
|
490
|
+
break;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
// src/components/datafeed.js
|
|
497
|
+
var getConfigurationData = () => __async(void 0, null, function* () {
|
|
498
|
+
return {
|
|
499
|
+
supports_marks: true,
|
|
500
|
+
supports_time: true,
|
|
501
|
+
supports_timescale_marks: true,
|
|
502
|
+
supports_time: true,
|
|
503
|
+
supported_resolutions: [
|
|
504
|
+
"1S",
|
|
505
|
+
"1",
|
|
506
|
+
"3",
|
|
507
|
+
"5",
|
|
508
|
+
"15",
|
|
509
|
+
"30",
|
|
510
|
+
"60",
|
|
511
|
+
"120",
|
|
512
|
+
"240",
|
|
513
|
+
"360",
|
|
514
|
+
"480",
|
|
515
|
+
"720",
|
|
516
|
+
"1D",
|
|
517
|
+
"3D",
|
|
518
|
+
"1W",
|
|
519
|
+
"12M"
|
|
520
|
+
],
|
|
521
|
+
exchanges: [
|
|
522
|
+
{
|
|
523
|
+
value: "Binance",
|
|
524
|
+
name: "Binance",
|
|
525
|
+
desc: "Binance"
|
|
526
|
+
}
|
|
527
|
+
],
|
|
528
|
+
symbols_types: [
|
|
529
|
+
{
|
|
530
|
+
name: "crypto",
|
|
531
|
+
value: "crypto"
|
|
532
|
+
}
|
|
533
|
+
]
|
|
534
|
+
};
|
|
535
|
+
});
|
|
536
|
+
var Datafeed = class {
|
|
537
|
+
constructor(timescaleMarks = [], interval = "1h") {
|
|
538
|
+
__publicField(this, "onReady", (callback) => __async(this, null, function* () {
|
|
539
|
+
this.configurationData = yield getConfigurationData();
|
|
540
|
+
callback(this.configurationData);
|
|
541
|
+
}));
|
|
542
|
+
__publicField(this, "searchSymbols", (userInput, exchange, symbolType, onResultReadyCallback) => __async(this, null, function* () {
|
|
543
|
+
const symbols = yield getAllSymbols(userInput);
|
|
544
|
+
onResultReadyCallback(symbols);
|
|
545
|
+
}));
|
|
546
|
+
__publicField(this, "resolveSymbol", (symbolName, onSymbolResolvedCallback, onResolveErrorCallback) => __async(this, null, function* () {
|
|
547
|
+
if (!symbolName) {
|
|
548
|
+
yield onResolveErrorCallback("cannot resolve symbol");
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
const symbolInfo = () => {
|
|
552
|
+
return {
|
|
553
|
+
ticker: symbolName,
|
|
554
|
+
name: symbolName,
|
|
555
|
+
ticker: symbolName,
|
|
556
|
+
description: symbolName,
|
|
557
|
+
type: "crypto",
|
|
558
|
+
session: "24x7",
|
|
559
|
+
timezone: "Etc/UTC",
|
|
560
|
+
exchange: "Binance",
|
|
561
|
+
minmov: 100,
|
|
562
|
+
pricescale: 1e5,
|
|
563
|
+
has_daily: true,
|
|
564
|
+
has_intraday: true,
|
|
565
|
+
has_no_volume: false,
|
|
566
|
+
has_seconds: true,
|
|
567
|
+
seconds_multipliers: [1],
|
|
568
|
+
volume: "hundreds",
|
|
569
|
+
volume_precision: 9,
|
|
570
|
+
data_status: "streaming",
|
|
571
|
+
resolution: "1h"
|
|
572
|
+
};
|
|
573
|
+
};
|
|
574
|
+
const symbol = yield symbolInfo();
|
|
575
|
+
onSymbolResolvedCallback(symbol);
|
|
576
|
+
}));
|
|
577
|
+
__publicField(this, "getBars", (symbolInfo, resolution, periodParams, onHistoryCallback, onErrorCallback) => __async(this, null, function* () {
|
|
578
|
+
const { from, to, firstDataRequest } = periodParams;
|
|
579
|
+
let interval = "60";
|
|
580
|
+
if (!/[a-zA-Z]$/.test(resolution)) {
|
|
581
|
+
if (parseInt(resolution) >= 60) {
|
|
582
|
+
interval = parseInt(resolution) / 60 + "h";
|
|
583
|
+
} else {
|
|
584
|
+
interval = resolution + "m";
|
|
585
|
+
}
|
|
586
|
+
} else {
|
|
587
|
+
interval = resolution.toLowerCase().replace(/[a-z]\b/g, (c) => c.toLowerCase());
|
|
588
|
+
}
|
|
589
|
+
let urlParameters = {
|
|
590
|
+
symbol: symbolInfo.name,
|
|
591
|
+
interval,
|
|
592
|
+
startTime: Math.abs(from * 1e3),
|
|
593
|
+
endTime: Math.abs(to * 1e3),
|
|
594
|
+
limit: 600
|
|
595
|
+
};
|
|
596
|
+
const query = Object.keys(urlParameters).map((name) => `${name}=${encodeURIComponent(urlParameters[name])}`).join("&");
|
|
597
|
+
try {
|
|
598
|
+
const data = yield makeApiRequest(`api/v3/uiKlines?${query}`);
|
|
599
|
+
if (data.Response && data.Response === "Error" || data.length === 0) {
|
|
600
|
+
onHistoryCallback([], {
|
|
601
|
+
noData: true
|
|
602
|
+
});
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
605
|
+
let bars = [];
|
|
606
|
+
data.forEach((bar) => {
|
|
607
|
+
if (bar[0] >= from * 1e3 && bar[0] < to * 1e3) {
|
|
608
|
+
bars = [
|
|
609
|
+
...bars,
|
|
610
|
+
{
|
|
611
|
+
time: bar[0],
|
|
612
|
+
low: bar[3],
|
|
613
|
+
high: bar[2],
|
|
614
|
+
open: bar[1],
|
|
615
|
+
close: bar[4],
|
|
616
|
+
volume: bar[5]
|
|
617
|
+
}
|
|
618
|
+
];
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
onHistoryCallback(bars, {
|
|
622
|
+
noData: false
|
|
623
|
+
});
|
|
624
|
+
} catch (error) {
|
|
625
|
+
console.log("[getBars]: Get error", error);
|
|
626
|
+
onErrorCallback(error);
|
|
627
|
+
}
|
|
628
|
+
}));
|
|
629
|
+
__publicField(this, "subscribeBars", (symbolInfo, resolution, onRealtimeCallback, subscribeUID, onResetCacheNeededCallback) => {
|
|
630
|
+
subscribeOnStream(
|
|
631
|
+
symbolInfo,
|
|
632
|
+
resolution,
|
|
633
|
+
onRealtimeCallback,
|
|
634
|
+
subscribeUID,
|
|
635
|
+
onResetCacheNeededCallback,
|
|
636
|
+
this.interval
|
|
637
|
+
);
|
|
638
|
+
});
|
|
639
|
+
__publicField(this, "unsubscribeBars", (subscriberUID) => {
|
|
640
|
+
unsubscribeFromStream(subscriberUID);
|
|
641
|
+
});
|
|
642
|
+
this.streaming = null;
|
|
643
|
+
this.timescaleMarks = timescaleMarks;
|
|
644
|
+
this.interval = interval;
|
|
645
|
+
}
|
|
646
|
+
getTimescaleMarks(symbolInfo, from, to, onDataCallback, resolution) {
|
|
647
|
+
if (this.timescaleMarks.length > 0) {
|
|
648
|
+
let timescaleMarks = Object.assign([], this.timescaleMarks);
|
|
649
|
+
onDataCallback(timescaleMarks);
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
getServerTime(onServertimeCallback) {
|
|
653
|
+
return __async(this, null, function* () {
|
|
654
|
+
const data = yield makeApiRequest(`api/v3/time`);
|
|
655
|
+
const serverTime = data.serverTime / 1e3;
|
|
656
|
+
onServertimeCallback(serverTime);
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
// src/components/TVChartContainer.tsx
|
|
662
|
+
var import_use_immer = require("use-immer");
|
|
663
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
664
|
+
var TVChartContainer = ({
|
|
665
|
+
symbol = "BTCUSDT",
|
|
666
|
+
interval = "1h",
|
|
667
|
+
libraryPath = "/charting_library/",
|
|
668
|
+
timescaleMarks = [],
|
|
669
|
+
orderLines = [],
|
|
670
|
+
height = "calc(100vh - 80px)",
|
|
671
|
+
onTick,
|
|
672
|
+
getLatestBar
|
|
673
|
+
}) => {
|
|
674
|
+
const containerRef = (0, import_react2.useRef)(null);
|
|
675
|
+
const [chartOrderLines, setChartOrderLines] = (0, import_use_immer.useImmer)([]);
|
|
676
|
+
const [widgetState, setWidgetState] = (0, import_use_immer.useImmer)(null);
|
|
677
|
+
const [symbolState] = (0, import_react2.useState)(null);
|
|
678
|
+
const prevTimescaleMarks = (0, import_react2.useRef)(timescaleMarks);
|
|
679
|
+
(0, import_react2.useEffect)(() => {
|
|
680
|
+
if (!widgetState) {
|
|
681
|
+
initializeChart(interval);
|
|
682
|
+
}
|
|
683
|
+
if (orderLines && orderLines.length > 0) {
|
|
684
|
+
updateOrderLines(orderLines);
|
|
685
|
+
}
|
|
686
|
+
if (widgetState && symbol !== symbolState) {
|
|
687
|
+
widgetState.setSymbol(symbol, interval);
|
|
688
|
+
}
|
|
689
|
+
if (widgetState && prevTimescaleMarks.current && timescaleMarks !== prevTimescaleMarks.current) {
|
|
690
|
+
widgetState._options.datafeed.timescaleMarks = timescaleMarks;
|
|
691
|
+
prevTimescaleMarks.current = timescaleMarks;
|
|
692
|
+
}
|
|
693
|
+
}, [orderLines, timescaleMarks]);
|
|
694
|
+
const initializeChart = (interval2) => {
|
|
695
|
+
const widgetOptions = {
|
|
696
|
+
symbol,
|
|
697
|
+
datafeed: new Datafeed(timescaleMarks, interval2),
|
|
698
|
+
interval: interval2,
|
|
699
|
+
container: containerRef.current,
|
|
700
|
+
library_path: libraryPath,
|
|
701
|
+
locale: "en",
|
|
702
|
+
fullscreen: false,
|
|
703
|
+
autosize: true,
|
|
704
|
+
studies_overrides: {},
|
|
705
|
+
symbol_search_request_delay: 1e3,
|
|
706
|
+
overrides: {
|
|
707
|
+
volumePaneSize: "small",
|
|
708
|
+
"mainSeriesProperties.barStyle.dontDrawOpen": false
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
const tvWidget = new (void 0)(widgetOptions);
|
|
712
|
+
tvWidget.onChartReady(() => {
|
|
713
|
+
tvWidget.subscribe("onTick", (event) => onTick && onTick(event));
|
|
714
|
+
setWidgetState(tvWidget);
|
|
715
|
+
const prices = () => __async(void 0, null, function* () {
|
|
716
|
+
const data = yield tvWidget.activeChart().exportData({
|
|
717
|
+
includeTime: false,
|
|
718
|
+
includeSeries: true,
|
|
719
|
+
includedStudies: []
|
|
720
|
+
});
|
|
721
|
+
getLatestBar && getLatestBar(data.data[data.data.length - 1]);
|
|
722
|
+
});
|
|
723
|
+
prices();
|
|
724
|
+
});
|
|
725
|
+
};
|
|
726
|
+
const updateOrderLines = (orderLines2) => {
|
|
727
|
+
if (chartOrderLines && chartOrderLines.length > 0) {
|
|
728
|
+
chartOrderLines.forEach((item) => {
|
|
729
|
+
orderLines2.forEach((order) => {
|
|
730
|
+
if (item.id == order.id) {
|
|
731
|
+
item.setText(order.text).setTooltip(order.tooltip).setQuantity(order.quantity).setPrice(order.price);
|
|
732
|
+
}
|
|
733
|
+
});
|
|
734
|
+
});
|
|
735
|
+
} else {
|
|
736
|
+
if (widgetState && orderLines2 && orderLines2.length > 0) {
|
|
737
|
+
orderLines2.forEach((order) => {
|
|
738
|
+
const lineStyle = order.lineStyle || 0;
|
|
739
|
+
let chartOrderLine = widgetState.chart().createOrderLine().setText(order.text).setTooltip(order.tooltip).setQuantity(order.quantity).setQuantityFont("inherit 14px Arial").setQuantityBackgroundColor(order.color).setQuantityBorderColor(order.color).setLineStyle(lineStyle).setLineLength(25).setLineColor(order.color).setBodyFont("inherit 14px Arial").setBodyBorderColor(order.color).setBodyTextColor(order.color).setPrice(order.price);
|
|
740
|
+
chartOrderLine.id = order.id;
|
|
741
|
+
setChartOrderLines((draft) => {
|
|
742
|
+
draft.push(chartOrderLine);
|
|
743
|
+
return draft;
|
|
744
|
+
});
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: containerRef, style: { height } });
|
|
750
|
+
};
|
|
751
|
+
var TVChartContainer_default = TVChartContainer;
|
|
752
|
+
//# sourceMappingURL=TVChartContainer.js.map
|