graphdb-workbench 2.1.1-TR3 → 2.1.1-TR4
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/10.cabc799d9aabc46e7be7.bundle.js +2 -0
- package/dist/10.cabc799d9aabc46e7be7.bundle.js.map +1 -0
- package/dist/{105.65711fa9d6de57d190f9.bundle.js → 105.2131aef847d9db645b1a.bundle.js} +2 -2
- package/dist/{105.65711fa9d6de57d190f9.bundle.js.map → 105.2131aef847d9db645b1a.bundle.js.map} +1 -1
- package/dist/{106.e7c5e11358f6938931d9.bundle.js → 106.d8e91ce7c4e16ae96137.bundle.js} +2 -2
- package/dist/{106.e7c5e11358f6938931d9.bundle.js.map → 106.d8e91ce7c4e16ae96137.bundle.js.map} +1 -1
- package/dist/{108.8d296d8910c98a05757b.bundle.js → 108.ff55b38321cd246e0f10.bundle.js} +2 -2
- package/dist/{108.8d296d8910c98a05757b.bundle.js.map → 108.ff55b38321cd246e0f10.bundle.js.map} +1 -1
- package/dist/{109.fd11f34786d805c279cd.bundle.js → 109.3683904d9ad66df4fe4d.bundle.js} +2 -2
- package/dist/{109.fd11f34786d805c279cd.bundle.js.map → 109.3683904d9ad66df4fe4d.bundle.js.map} +1 -1
- package/dist/{10.0de26dd0c213dafee946.bundle.js → 11.b2fd98471071348c3964.bundle.js} +2 -2
- package/dist/{10.0de26dd0c213dafee946.bundle.js.map → 11.b2fd98471071348c3964.bundle.js.map} +1 -1
- package/dist/{114.6d54e7d1c547bf1ac768.bundle.js → 114.ed2c2d1606cd75dbd7c6.bundle.js} +2 -2
- package/dist/{114.6d54e7d1c547bf1ac768.bundle.js.map → 114.ed2c2d1606cd75dbd7c6.bundle.js.map} +1 -1
- package/dist/{11.af5499ccbb5c1b7d37d0.bundle.js → 12.cf2225402504b37eb28e.bundle.js} +3 -3
- package/dist/12.cf2225402504b37eb28e.bundle.js.map +1 -0
- package/dist/{12.d9f7654c2a2bf64acb1d.bundle.js → 13.9b9388352980715b16bb.bundle.js} +2 -2
- package/dist/{12.d9f7654c2a2bf64acb1d.bundle.js.map → 13.9b9388352980715b16bb.bundle.js.map} +1 -1
- package/dist/136.3199d393576be61f53fd.bundle.js +1 -1
- package/dist/136.3199d393576be61f53fd.bundle.js.map +1 -1
- package/dist/{13.7f2846cd1d80e418d29f.bundle.js → 14.c512cd1282fe7dec36bf.bundle.js} +2 -2
- package/dist/{13.7f2846cd1d80e418d29f.bundle.js.map → 14.c512cd1282fe7dec36bf.bundle.js.map} +1 -1
- package/dist/{14.6c814a96b94a6cc03b41.bundle.js → 15.e870cbcf6346cc68bd66.bundle.js} +2 -2
- package/dist/{14.6c814a96b94a6cc03b41.bundle.js.map → 15.e870cbcf6346cc68bd66.bundle.js.map} +1 -1
- package/dist/{15.516b0302360113a02b82.bundle.js → 16.23e12f234078c8777ed0.bundle.js} +2 -2
- package/dist/{15.516b0302360113a02b82.bundle.js.map → 16.23e12f234078c8777ed0.bundle.js.map} +1 -1
- package/dist/{16.7b34aea1e49787127422.bundle.js → 17.d1ac5f88f9ef9ee1c789.bundle.js} +2 -2
- package/dist/{16.7b34aea1e49787127422.bundle.js.map → 17.d1ac5f88f9ef9ee1c789.bundle.js.map} +1 -1
- package/dist/{17.1e93fec0b014a1048269.bundle.js → 18.63478730d60e02069d90.bundle.js} +2 -2
- package/dist/{17.1e93fec0b014a1048269.bundle.js.map → 18.63478730d60e02069d90.bundle.js.map} +1 -1
- package/dist/{18.c6c9a8738ed0556139c5.bundle.js → 19.b5b3699a309774176fc3.bundle.js} +2 -2
- package/dist/{18.c6c9a8738ed0556139c5.bundle.js.map → 19.b5b3699a309774176fc3.bundle.js.map} +1 -1
- package/dist/{2.1624e5bea1a914b95ebb.bundle.js → 2.a574cb520c748d9f8d48.bundle.js} +3 -3
- package/dist/2.a574cb520c748d9f8d48.bundle.js.map +1 -0
- package/dist/{19.dcaf58a9b5defe59bc31.bundle.js → 20.d707dfb57f695469ffaa.bundle.js} +2 -2
- package/dist/{19.dcaf58a9b5defe59bc31.bundle.js.map → 20.d707dfb57f695469ffaa.bundle.js.map} +1 -1
- package/dist/{20.b15f2511253f8338e0fe.bundle.js → 21.d5214e697ec9f78652d2.bundle.js} +2 -2
- package/dist/{20.b15f2511253f8338e0fe.bundle.js.map → 21.d5214e697ec9f78652d2.bundle.js.map} +1 -1
- package/dist/{21.4a6eb31c92aa54ce7ce1.bundle.js → 22.e1562d53daf95dd1fdca.bundle.js} +2 -2
- package/dist/{21.4a6eb31c92aa54ce7ce1.bundle.js.map → 22.e1562d53daf95dd1fdca.bundle.js.map} +1 -1
- package/dist/{22.4d9fa14231cd2732427b.bundle.js → 23.c1b822e6ccc61632355b.bundle.js} +2 -2
- package/dist/{22.4d9fa14231cd2732427b.bundle.js.map → 23.c1b822e6ccc61632355b.bundle.js.map} +1 -1
- package/dist/{23.9e3968b629f8405f0f54.bundle.js → 24.740f8b8ec6dd9bb85f67.bundle.js} +3 -3
- package/dist/24.740f8b8ec6dd9bb85f67.bundle.js.map +1 -0
- package/dist/{24.bae404a70ae31386741b.bundle.js → 25.8c30b7bafb4875a3cc51.bundle.js} +2 -2
- package/dist/{24.bae404a70ae31386741b.bundle.js.map → 25.8c30b7bafb4875a3cc51.bundle.js.map} +1 -1
- package/dist/{25.0597669f1a183645c772.bundle.js → 26.176ffe2071a8d5d382b6.bundle.js} +2 -2
- package/dist/{25.0597669f1a183645c772.bundle.js.map → 26.176ffe2071a8d5d382b6.bundle.js.map} +1 -1
- package/dist/{26.5e86db82dcf098c6f274.bundle.js → 27.be71055c959c1ac75177.bundle.js} +3 -3
- package/dist/{26.5e86db82dcf098c6f274.bundle.js.map → 27.be71055c959c1ac75177.bundle.js.map} +1 -1
- package/dist/{27.90a28f377aa2351a97a6.bundle.js → 28.af25c8fe6f70c61986cc.bundle.js} +2 -2
- package/dist/{27.90a28f377aa2351a97a6.bundle.js.map → 28.af25c8fe6f70c61986cc.bundle.js.map} +1 -1
- package/dist/{28.dcbb911abdaaf770369b.bundle.js → 29.54cbff989a44a0f71dfd.bundle.js} +2 -2
- package/dist/{28.dcbb911abdaaf770369b.bundle.js.map → 29.54cbff989a44a0f71dfd.bundle.js.map} +1 -1
- package/dist/{29.e56776b72f96806592f9.bundle.js → 30.238b3282d752df6de2d5.bundle.js} +2 -2
- package/dist/{29.e56776b72f96806592f9.bundle.js.map → 30.238b3282d752df6de2d5.bundle.js.map} +1 -1
- package/dist/{30.2493a3ab4e5005163a33.bundle.js → 31.4ecdb66b2c224a63525e.bundle.js} +2 -2
- package/dist/{30.2493a3ab4e5005163a33.bundle.js.map → 31.4ecdb66b2c224a63525e.bundle.js.map} +1 -1
- package/dist/{32.692379fd859322e24a6a.bundle.js → 32.2582e2eccf29e8d5ec80.bundle.js} +2 -2
- package/dist/{32.692379fd859322e24a6a.bundle.js.map → 32.2582e2eccf29e8d5ec80.bundle.js.map} +1 -1
- package/dist/{33.2b08fc5cf42609b8a1a9.bundle.js → 33.04790d6b317f0eade307.bundle.js} +2 -2
- package/dist/{33.2b08fc5cf42609b8a1a9.bundle.js.map → 33.04790d6b317f0eade307.bundle.js.map} +1 -1
- package/dist/37.ef412d4cbc60967faa5e.bundle.js +2 -0
- package/dist/37.ef412d4cbc60967faa5e.bundle.js.map +1 -0
- package/dist/{37.66cc1fa41455fde1c201.bundle.js → 38.7deea9e0319084f9f852.bundle.js} +2 -2
- package/dist/{37.66cc1fa41455fde1c201.bundle.js.map → 38.7deea9e0319084f9f852.bundle.js.map} +1 -1
- package/dist/39.be2d8c75e4ab391ba984.bundle.js +2 -0
- package/dist/39.be2d8c75e4ab391ba984.bundle.js.map +1 -0
- package/dist/{39.ec29479e3f0c23b626f6.bundle.js → 40.9272ebe1d2246ae3054f.bundle.js} +2 -2
- package/dist/{39.ec29479e3f0c23b626f6.bundle.js.map → 40.9272ebe1d2246ae3054f.bundle.js.map} +1 -1
- package/dist/{40.1e2b5ccb3dcdee5e6b81.bundle.js → 41.f69dd805b7e51756518f.bundle.js} +2 -2
- package/dist/{40.1e2b5ccb3dcdee5e6b81.bundle.js.map → 41.f69dd805b7e51756518f.bundle.js.map} +1 -1
- package/dist/{41.297f8392dafa2af5e874.bundle.js → 42.16be14526c7bf039754b.bundle.js} +2 -2
- package/dist/{41.297f8392dafa2af5e874.bundle.js.map → 42.16be14526c7bf039754b.bundle.js.map} +1 -1
- package/dist/{42.9a13772d165bfabbf5ac.bundle.js → 43.f76be157f75bc7b3ea68.bundle.js} +2 -2
- package/dist/{42.9a13772d165bfabbf5ac.bundle.js.map → 43.f76be157f75bc7b3ea68.bundle.js.map} +1 -1
- package/dist/{43.c67da41a52ba9b0eb508.bundle.js → 44.ccd45256fba55ce28d80.bundle.js} +2 -2
- package/dist/{43.c67da41a52ba9b0eb508.bundle.js.map → 44.ccd45256fba55ce28d80.bundle.js.map} +1 -1
- package/dist/{44.6d8cff7a83daeb5ef962.bundle.js → 45.f1cb114b656ef4af2bc5.bundle.js} +2 -2
- package/dist/{44.6d8cff7a83daeb5ef962.bundle.js.map → 45.f1cb114b656ef4af2bc5.bundle.js.map} +1 -1
- package/dist/{45.aaec72bd569ec7e51094.bundle.js → 46.a9d1c07290ab98930744.bundle.js} +2 -2
- package/dist/{45.aaec72bd569ec7e51094.bundle.js.map → 46.a9d1c07290ab98930744.bundle.js.map} +1 -1
- package/dist/{46.923c5b8312749b3e3bb6.bundle.js → 47.e3d0e12eb54f0ea80c7b.bundle.js} +2 -2
- package/dist/{46.923c5b8312749b3e3bb6.bundle.js.map → 47.e3d0e12eb54f0ea80c7b.bundle.js.map} +1 -1
- package/dist/{47.244ee9d7807bc1103d77.bundle.js → 48.3c8d17c03f3fc081be89.bundle.js} +2 -2
- package/dist/{47.244ee9d7807bc1103d77.bundle.js.map → 48.3c8d17c03f3fc081be89.bundle.js.map} +1 -1
- package/dist/{48.8f1d7872a0efc5293c0e.bundle.js → 49.b4fe44e1a4aeeeb8a39e.bundle.js} +2 -2
- package/dist/{48.8f1d7872a0efc5293c0e.bundle.js.map → 49.b4fe44e1a4aeeeb8a39e.bundle.js.map} +1 -1
- package/dist/{49.1bb5a5fc03aab1cb710e.bundle.js → 50.6e68d9b649f03d5744b9.bundle.js} +2 -2
- package/dist/{49.1bb5a5fc03aab1cb710e.bundle.js.map → 50.6e68d9b649f03d5744b9.bundle.js.map} +1 -1
- package/dist/{50.f43de5b83f3fe0f1d4bd.bundle.js → 51.d023fa9b3d250baf210b.bundle.js} +2 -2
- package/dist/{50.f43de5b83f3fe0f1d4bd.bundle.js.map → 51.d023fa9b3d250baf210b.bundle.js.map} +1 -1
- package/dist/{51.8e4867cdb91b3a714b7c.bundle.js → 52.d84c24bdb469228ecf87.bundle.js} +2 -2
- package/dist/{51.8e4867cdb91b3a714b7c.bundle.js.map → 52.d84c24bdb469228ecf87.bundle.js.map} +1 -1
- package/dist/{52.87e251b63ec08a4fb27d.bundle.js → 53.8cf4f5609ed4e19b7426.bundle.js} +2 -2
- package/dist/{52.87e251b63ec08a4fb27d.bundle.js.map → 53.8cf4f5609ed4e19b7426.bundle.js.map} +1 -1
- package/dist/{53.40c4a95f13039c58e79b.bundle.js → 54.b7813e67817fea3ffff5.bundle.js} +2 -2
- package/dist/{53.40c4a95f13039c58e79b.bundle.js.map → 54.b7813e67817fea3ffff5.bundle.js.map} +1 -1
- package/dist/{54.20cfbf8ce92320d392c6.bundle.js → 55.10bb020070b8c5910e4c.bundle.js} +2 -2
- package/dist/{54.20cfbf8ce92320d392c6.bundle.js.map → 55.10bb020070b8c5910e4c.bundle.js.map} +1 -1
- package/dist/{55.81121264a9d4f0c993c0.bundle.js → 56.f7576b85862142bb7673.bundle.js} +2 -2
- package/dist/{55.81121264a9d4f0c993c0.bundle.js.map → 56.f7576b85862142bb7673.bundle.js.map} +1 -1
- package/dist/{56.3b6df77c3c43dc974a2a.bundle.js → 57.f432e4a7f6dbf5fa9e6e.bundle.js} +2 -2
- package/dist/{56.3b6df77c3c43dc974a2a.bundle.js.map → 57.f432e4a7f6dbf5fa9e6e.bundle.js.map} +1 -1
- package/dist/{57.da9c7da4dfcc8dc08eef.bundle.js → 58.4666a30220eb06c98de3.bundle.js} +2 -2
- package/dist/{57.da9c7da4dfcc8dc08eef.bundle.js.map → 58.4666a30220eb06c98de3.bundle.js.map} +1 -1
- package/dist/{58.78114ab4366f7a58909f.bundle.js → 59.feebf4602360cb8257bb.bundle.js} +2 -2
- package/dist/{58.78114ab4366f7a58909f.bundle.js.map → 59.feebf4602360cb8257bb.bundle.js.map} +1 -1
- package/dist/{59.52e5b2cfc641339e3c2f.bundle.js → 60.4c94265e0d3417d76f01.bundle.js} +2 -2
- package/dist/{59.52e5b2cfc641339e3c2f.bundle.js.map → 60.4c94265e0d3417d76f01.bundle.js.map} +1 -1
- package/dist/{60.25abbcbe64af8c67d9e0.bundle.js → 61.119fc16a46b4ac7fb477.bundle.js} +2 -2
- package/dist/{60.25abbcbe64af8c67d9e0.bundle.js.map → 61.119fc16a46b4ac7fb477.bundle.js.map} +1 -1
- package/dist/{61.d1c037716803baa45b56.bundle.js → 62.41c0ac4da8e49e4d4dd3.bundle.js} +2 -2
- package/dist/{61.d1c037716803baa45b56.bundle.js.map → 62.41c0ac4da8e49e4d4dd3.bundle.js.map} +1 -1
- package/dist/{62.48bd33d36bdf26cc7407.bundle.js → 63.8a51fd07dd8d92177b89.bundle.js} +2 -2
- package/dist/{62.48bd33d36bdf26cc7407.bundle.js.map → 63.8a51fd07dd8d92177b89.bundle.js.map} +1 -1
- package/dist/{63.3830d630aa0165983e01.bundle.js → 64.acc32081892f499d8ff3.bundle.js} +2 -2
- package/dist/{63.3830d630aa0165983e01.bundle.js.map → 64.acc32081892f499d8ff3.bundle.js.map} +1 -1
- package/dist/{64.04e416af3fb797ddf3f0.bundle.js → 65.75e5679260f79e06a315.bundle.js} +2 -2
- package/dist/{64.04e416af3fb797ddf3f0.bundle.js.map → 65.75e5679260f79e06a315.bundle.js.map} +1 -1
- package/dist/{65.cf91619343091aaf1c9e.bundle.js → 66.d0ee50381c28966b1105.bundle.js} +2 -2
- package/dist/{65.cf91619343091aaf1c9e.bundle.js.map → 66.d0ee50381c28966b1105.bundle.js.map} +1 -1
- package/dist/{66.c9f09ca9a81991f230ce.bundle.js → 67.58d8539fcac19288b820.bundle.js} +2 -2
- package/dist/{66.c9f09ca9a81991f230ce.bundle.js.map → 67.58d8539fcac19288b820.bundle.js.map} +1 -1
- package/dist/{67.ae87bcfb95e94702a27f.bundle.js → 68.9428f49abea727e95256.bundle.js} +2 -2
- package/dist/{67.ae87bcfb95e94702a27f.bundle.js.map → 68.9428f49abea727e95256.bundle.js.map} +1 -1
- package/dist/{68.fc9ca88b3a5537d2e39e.bundle.js → 69.c88dd57b21890c058b3d.bundle.js} +2 -2
- package/dist/{68.fc9ca88b3a5537d2e39e.bundle.js.map → 69.c88dd57b21890c058b3d.bundle.js.map} +1 -1
- package/dist/{69.464963ff8d617bb6d9f3.bundle.js → 70.ede527b8438e19a67ebc.bundle.js} +2 -2
- package/dist/{69.464963ff8d617bb6d9f3.bundle.js.map → 70.ede527b8438e19a67ebc.bundle.js.map} +1 -1
- package/dist/{70.13469cc5b9db5e443fd2.bundle.js → 71.2ddcb945966fd051a3a1.bundle.js} +2 -2
- package/dist/{70.13469cc5b9db5e443fd2.bundle.js.map → 71.2ddcb945966fd051a3a1.bundle.js.map} +1 -1
- package/dist/{71.ea9b774fdae25b0ce480.bundle.js → 72.d2f8a53e83efcb8ab953.bundle.js} +2 -2
- package/dist/{71.ea9b774fdae25b0ce480.bundle.js.map → 72.d2f8a53e83efcb8ab953.bundle.js.map} +1 -1
- package/dist/{72.c6ef4e0cc60344aafaee.bundle.js → 73.c29f06e5825684d56a9c.bundle.js} +2 -2
- package/dist/{72.c6ef4e0cc60344aafaee.bundle.js.map → 73.c29f06e5825684d56a9c.bundle.js.map} +1 -1
- package/dist/{73.408f48d9db7bdc35bee0.bundle.js → 74.b50a23c1751e0fc30aec.bundle.js} +2 -2
- package/dist/{73.408f48d9db7bdc35bee0.bundle.js.map → 74.b50a23c1751e0fc30aec.bundle.js.map} +1 -1
- package/dist/75.4f9197361b6427d97b6c.bundle.js +2 -0
- package/dist/75.4f9197361b6427d97b6c.bundle.js.map +1 -0
- package/dist/{75.576b5409a001d5eb28dc.bundle.js → 76.467d072ae323ab41fd3d.bundle.js} +2 -2
- package/dist/{75.576b5409a001d5eb28dc.bundle.js.map → 76.467d072ae323ab41fd3d.bundle.js.map} +1 -1
- package/dist/{76.9e51826f348a4f327a83.bundle.js → 77.41a60a354d0fb3103b00.bundle.js} +2 -2
- package/dist/{76.9e51826f348a4f327a83.bundle.js.map → 77.41a60a354d0fb3103b00.bundle.js.map} +1 -1
- package/dist/{77.9fe36e72f7ebd901d664.bundle.js → 78.7de8a0f70f6dc1debd05.bundle.js} +2 -2
- package/dist/{77.9fe36e72f7ebd901d664.bundle.js.map → 78.7de8a0f70f6dc1debd05.bundle.js.map} +1 -1
- package/dist/{78.4f9916789294f1edda70.bundle.js → 79.2f8b2ebcbd07d466c913.bundle.js} +2 -2
- package/dist/{78.4f9916789294f1edda70.bundle.js.map → 79.2f8b2ebcbd07d466c913.bundle.js.map} +1 -1
- package/dist/{8.f134424f4bc45dea8f3d.bundle.js → 8.b21d6a5c1a9412deb34f.bundle.js} +2 -2
- package/dist/{8.f134424f4bc45dea8f3d.bundle.js.map → 8.b21d6a5c1a9412deb34f.bundle.js.map} +1 -1
- package/dist/{79.0e030dfb3c7cda26ea35.bundle.js → 80.8e71a1aaf3beb2320bf0.bundle.js} +2 -2
- package/dist/{79.0e030dfb3c7cda26ea35.bundle.js.map → 80.8e71a1aaf3beb2320bf0.bundle.js.map} +1 -1
- package/dist/{80.68dc4e725f568b80238f.bundle.js → 81.2939c5d2b47cf48be6d5.bundle.js} +2 -2
- package/dist/{80.68dc4e725f568b80238f.bundle.js.map → 81.2939c5d2b47cf48be6d5.bundle.js.map} +1 -1
- package/dist/{81.a845c0986e8e91ce96d6.bundle.js → 82.69913e9f45a1dd96c6be.bundle.js} +2 -2
- package/dist/{81.a845c0986e8e91ce96d6.bundle.js.map → 82.69913e9f45a1dd96c6be.bundle.js.map} +1 -1
- package/dist/{83.6591fdab4c8434a8e35a.bundle.js → 83.73515cde0a2215275d32.bundle.js} +2 -2
- package/dist/{83.6591fdab4c8434a8e35a.bundle.js.map → 83.73515cde0a2215275d32.bundle.js.map} +1 -1
- package/dist/{86.d93b7597d94aae9028e9.bundle.js → 86.4b571d114bba8ed6a350.bundle.js} +2 -2
- package/dist/{86.d93b7597d94aae9028e9.bundle.js.map → 86.4b571d114bba8ed6a350.bundle.js.map} +1 -1
- package/dist/{87.c6a2833b9670bddd66a8.bundle.js → 87.69eaa604c4d381ec2340.bundle.js} +2 -2
- package/dist/{87.c6a2833b9670bddd66a8.bundle.js.map → 87.69eaa604c4d381ec2340.bundle.js.map} +1 -1
- package/dist/91.8e7850e1155a0f57ff60.bundle.js +2 -0
- package/dist/91.8e7850e1155a0f57ff60.bundle.js.map +1 -0
- package/dist/{93.44ed0eab05b8b601b8a3.bundle.js → 93.d4fb5fe720a8d95b2b37.bundle.js} +2 -2
- package/dist/{93.44ed0eab05b8b601b8a3.bundle.js.map → 93.d4fb5fe720a8d95b2b37.bundle.js.map} +1 -1
- package/dist/{96.759140cd5fd055fd4657.bundle.js → 96.a4044cdbb3c9f43d86d3.bundle.js} +2 -2
- package/dist/{96.759140cd5fd055fd4657.bundle.js.map → 96.a4044cdbb3c9f43d86d3.bundle.js.map} +1 -1
- package/dist/{97.ee7b3025753059ceac78.bundle.js → 97.9c2220bd069a1fa37786.bundle.js} +2 -2
- package/dist/{97.ee7b3025753059ceac78.bundle.js.map → 97.9c2220bd069a1fa37786.bundle.js.map} +1 -1
- package/dist/{bundle.f1bb50b1cdb763d31063.bundle.js → bundle.e011c1d35dc9c7092fba.bundle.js} +19 -19
- package/dist/bundle.e011c1d35dc9c7092fba.bundle.js.map +1 -0
- package/dist/css/bootstrap-graphdb-theme.css +1 -0
- package/dist/css/plugins.css +7 -18
- package/dist/i18n/locale-en.json +2 -2
- package/dist/i18n/locale-fr.json +2 -2
- package/dist/index.html +4 -4
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/{main.2642e50d9d3a370ced71.css → main.764d23be9469cc31aa65.css} +1 -1
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +4 -4
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +11 -11
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +1 -1
- package/dist/pages/jdbc-create.html +5 -5
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +2 -2
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/plugins.html +5 -6
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +2 -2
- package/dist/pages/repository.html +5 -5
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-template-create.html +5 -5
- package/dist/pages/sparql.html +3 -3
- package/dist/pages/webapi.html +2 -2
- package/dist/plugins.js +5 -16
- package/dist/res/swagger/index.html +27 -27
- package/dist/{vendor.abaa38fc9fe8e5441ac8.bundle.js → vendor.31cf390ca240d8cd1ef3.bundle.js} +1 -1
- package/dist/{vendor.abaa38fc9fe8e5441ac8.bundle.js.map → vendor.31cf390ca240d8cd1ef3.bundle.js.map} +1 -1
- package/package.json +1 -1
- package/dist/11.af5499ccbb5c1b7d37d0.bundle.js.map +0 -1
- package/dist/2.1624e5bea1a914b95ebb.bundle.js.map +0 -1
- package/dist/23.9e3968b629f8405f0f54.bundle.js.map +0 -1
- package/dist/31.6baef0f1d3aa7de28abd.bundle.js +0 -2
- package/dist/31.6baef0f1d3aa7de28abd.bundle.js.map +0 -1
- package/dist/38.d472c0044efa1f2cf10e.bundle.js +0 -2
- package/dist/38.d472c0044efa1f2cf10e.bundle.js.map +0 -1
- package/dist/74.570a5b71b06fb157f9b0.bundle.js +0 -2
- package/dist/74.570a5b71b06fb157f9b0.bundle.js.map +0 -1
- package/dist/82.8449a19aa4546aec8494.bundle.js +0 -2
- package/dist/82.8449a19aa4546aec8494.bundle.js.map +0 -1
- package/dist/91.7d22597bd507ab05d240.bundle.js +0 -2
- package/dist/91.7d22597bd507ab05d240.bundle.js.map +0 -1
- package/dist/bundle.f1bb50b1cdb763d31063.bundle.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[42,122],{38:function(e,n){function t(e,n){return{showToastMessageWithDelay:function(t){return new Promise(r=>{e.success(n.instant(t)),setTimeout(r,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",t),t.$inject=["toastr","$translate"]},94:function(e,n,t){"use strict";t.r(n);t(38),t(5);function r(e,n,t,r,i,a,o,s,u,c,d,l,y){const g=o.search().type;void 0===g||g.startsWith("text")?e.viewType="text":e.viewType=g;e.newIndex={},e.info=s,e.page=1;const w={id:"1",name:"",query:"",inference:!0,sameAs:!0};const f=function(){var t;if(e.editSearchQuery=o.search().editSearchQuery,e.page=e.editSearchQuery?2:1,e.newIndex.name=(t=o.search().name)?1!==e.page?t:"Copy_of_"+t:"",e.newIndex.options=o.search().options?o.search().options:"text"===e.viewType?"-termweight idf":"",e.searchQueries&&(e.newIndex.searchQuery=o.search().searchQuery?o.search().searchQuery:e.searchQueries[e.viewType],"predication"===e.viewType&&(e.newIndex.analogicalQuery=o.search().analogicalQuery?o.search().analogicalQuery:e.searchQueries.analogical)),e.editSearchQuery)e.currentQuery.query=e.newIndex.searchQuery,e.notoolbarInference=!0,e.notoolbarSameAs=!0,window.editor&&e.setQuery(e.newIndex.searchQuery);else{if("text"===e.viewType&&e.allSamples){e.samples=e.allSamples.text,e.newIndex.stopList=o.search().stopList?o.search().stopList:void 0,e.newIndex.analyzer=o.search().analyzer?o.search().analyzer:"org.apache.lucene.analysis.en.EnglishAnalyzer";const n=h("-literal_index");void 0!==n&&(e.newIndex.isLiteralIndex=n),window.editor&&e.setQuery(e.samples.literals)}"predication"===e.viewType&&e.allSamples&&(i.getIndexes().success((function(n){if(e.literalIndexes=["no-index"].concat(n.filter((function(e){return"textLiteral"===e.type&&("BUILT"===e.status||"OUTDATED"===e.status)})).map((function(e){return e.name}))),void 0===e.newIndex.inputIndex){const n=h("-input_index");if(void 0!==n)for(let t=0;t<e.literalIndexes.length;t++)n===e.literalIndexes[t]&&(e.newIndex.inputIndex=e.literalIndexes[t])}void 0===e.newIndex.inputIndex&&(e.newIndex.inputIndex=e.literalIndexes[0])})).error((function(e){const t=getError(e);n.error(t,y.instant("similarity.could.not.get.indexes.error"))})),e.samples=e.allSamples.predication,window.editor&&e.setQuery(e.samples.predication))}},p=new RegExp("^[a-zA-Z0-9-_]+$"),m=function(){return e.invalidIndexName=!1,e.saveQueries(),e.newIndex.name?p.test(e.newIndex.name)?e.newIndex.query?e.newIndex.searchQuery?"predication"!==e.viewType||e.newIndex.analogicalQuery?"SELECT"===window.editor.getQueryType()||void n.error(y.instant("similarity.index.select.queries.constraint")):(n.error(y.instant("similarity.empty.analogical.query.error")),!1):(n.error(y.instant("similarity.empty.search.query.error")),!1):(n.error(y.instant("similarity.empty.select.query.error")),!1):(e.invalidIndexName=y.instant("similarity.index.name.constraint"),!1):(e.invalidIndexName=y.instant("similarity.empty.index.name.error"),!1)},x=function(n,t){e.newIndex.options=e.newIndex.options+(""===e.newIndex.options?"":" ")+n+" "+t};function h(n){const t=e.newIndex.options.split(" ");for(let r=0;r<t.length;r++)if(t[r]===n&&r+1<t.length){const n=t[r+1];return delete t[r],delete t[r+1],e.newIndex.options=t.join(" "),n}}function I(e){}function Q(n,t,r){const i=angular.element(document.getElementById("yasr-inner"));e.queryIsRunning=n,n?(e.queryStartTime=Date.now(),e.countTimeouted=!1,e.progressMessage=t,e.extraMessage=r,i.addClass("hide")):(e.progressMessage="",e.extraMessage="",i.removeClass("hide")),null===e.$$phase&&e.$apply()}function T(n){function t(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}const i=n;if(e.orientationViewMode){if("yasr"===e.viewMode){let e=t()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px"}else e.noPadding={},document.querySelector(".CodeMirror-wrap").style.height="";document.getElementById("yasr").style.minHeight=""}else if(e.noPadding={paddingRight:15,paddingLeft:0},window.editor&&document.querySelector(".CodeMirror-wrap")){let e=t()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px",document.getElementById("yasr").style.minHeight=e+"px"}else{let n;n=r(i?function(){e.fixSizesOnHorizontalViewModeSwitch(i)}:e.fixSizesOnHorizontalViewModeSwitch,100),e.$on("$destroy",(function(){r.cancel(n)}))}window.yasr&&window.yasr.container&&r((function(){window.yasr.container.resize()}),100)}function S(){T(!0)}function v(e){r((function(){$('a[data-id = "'+e+'"]').tab("show")}),0)}function b(t,r){e.executedQueryTab=e.currentQuery,"SELECT"===window.editor.getQueryType()?r&&"SELECT"!==window.editor.getQueryType()?n.warning(y.instant("similarity.explain.select.queries.constraint")):"update"!==window.editor.getQueryMode()?(e.explainRequested=r,e.queryIsRunning||(t?e.currentTabConfig.resultsCount=0:e.resetCurrentTabConfig(),e.viewMode="editor",e.orientationViewMode&&e.fixSizesOnHorizontalViewModeSwitch(),Q(!0,y.instant("evaluating.query.msg")),window.editor.query())):n.warning(y.instant("cannot.execute.update.error")):n.error(y.instant("similarity.indexes.select.queries.constraint"))}function q(){Q(!0,y.instant("common.refreshing.namespaces"),y.instant("common.extra.message")),c.getRepositoryNamespaces().success((function(n){const t={};n.results.bindings.forEach((function(e){t[e.prefix.value]=e.namespace.value})),e.namespaces=t})).error((function(n){e.repositoryError=getError(n)})).finally((function(){Q(!1)}))}function C(){a.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(e){angular.isDefined(window.editor)&&angular.isDefined(e)&&e!==window.editor.getValue()&&window.editor.setValue(e)})).error((function(e){const t=getError(e);return n.error(t,y.instant("common.add.known.prefixes.error")),!0}))}function E(n){let t=void 0;return angular.forEach(e.tabsData,(function(e){if(e.name===n.name&&e.query===n.body)return t=e.id,e})),t}function M(){e.tabsData=[e.currentQuery];const n=e.currentQuery;null===e.currentQuery.query||""===e.currentQuery.query?window.editor.setValue(" "):window.editor.setValue(e.currentQuery.query||" "),r((function(){e.currentTabConfig={},e.currentTabConfig.queryType=n.queryType,e.currentTabConfig.resultsCount=n.resultsCount,e.currentTabConfig.offset=n.offset,e.currentTabConfig.allResultsCount=n.allResultsCount,e.currentTabConfig.page=n.page,e.currentTabConfig.pageSize=n.pageSize,e.currentTabConfig.timeFinished=n.timeFinished,e.currentTabConfig.timeTook=n.timeTook,e.currentTabConfig.sizeDelta=n.sizeDelta,e.$apply()}),0),$("#yasr").css("padding","0")}function L(e){return $(e).attr("data-id")}i.getSearchQueries().success((function(n){e.searchQueries=n,i.getSamples().success((function(n){w.query=o.search().selectQuery?o.search().selectQuery:n.text.literals,w.inference=!("false"===o.search().infer),w.sameAs=!("false"===o.search().sameAs),e.tabsData=e.tabs=[w],e.currentQuery=angular.copy(w),e.allSamples=n,f()}))})).error((function(e){const t=getError(e);n.error(t,y.instant("similarity.could.not.get.search.queries.error"))})),e.$watch("viewType",(function(){f()})),e.helpHidden=1===d.get(l.HIDE_SIMILARITY_HELP),e.toggleHelp=function(n){void 0===n&&(n=d.get(l.HIDE_SIMILARITY_HELP)),1!==n?(d.set(l.HIDE_SIMILARITY_HELP,1),e.helpHidden=!0):(d.set(l.HIDE_SIMILARITY_HELP,0),e.helpHidden=!1)},e.viewQuery=function(){m()&&i.getQuery({indexName:e.newIndex.name,indexOptions:e.newIndex.options,query:e.currentQuery.query,indexStopList:e.newIndex.stopList,queryInference:e.currentQuery.inference,querySameAs:e.currentQuery.sameAs,viewType:e.viewType,indexAnalyzer:e.newIndex.analyzer}).success((function(e){e&&t.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})}))},e.$watch("newIndex.name",(function(){e.isInvalidIndexName=!1,e.isEmptyIndexName=!1})),e.saveQueries=function(){const n=window.editor.getValue().trim();1===e.page?e.newIndex.query=n:2===e.page?e.newIndex.searchQuery=n:3===e.page&&(e.newIndex.analogicalQuery=n)},e.goToPage=function(n){1!==n&&"yasr"!==e.viewMode&&(e.showEditor(),r((function(){2===n&&(e.currentQuery.query=e.newIndex.searchQuery),3===n&&(e.currentQuery.query=e.newIndex.analogicalQuery),window.editor.setValue(e.currentQuery.query||" ")}))),e.saveQueries(),1===n?e.currentQuery.query=e.newIndex.query:2===n?e.currentQuery.query=e.newIndex.searchQuery:3===n&&(e.currentQuery.query=e.newIndex.analogicalQuery),M(),e.notoolbar=1!==n,e.page=n},e.createIndex=function(){m()&&i.getIndexes().success((function(t){if(t.forEach((function(n){n.name===e.newIndex.name&&(e.invalidIndexName=y.instant("similarity.existing.index.name.error"))})),!e.invalidIndexName){let t=e.viewType;if(void 0!==e.literalIndexes){const n=e.newIndex.inputIndex;n!==e.literalIndexes[0]&&x("-input_index",n)}"true"===e.newIndex.isLiteralIndex&&(x("-literal_index","true"),t="textLiteral"),i.createIndex("POST",e.newIndex.name,e.newIndex.options,e.newIndex.query,e.newIndex.searchQuery,e.newIndex.analogicalQuery,e.newIndex.stopList,e.currentQuery.inference,e.currentQuery.sameAs,t,e.newIndex.analyzer).error((function(e){n.error(getError(e),y.instant("similarity.create.index.error"))})),o.url("similarity")}})).error((function(e){const t=getError(e);n.error(t,y.instant("similarity.could.not.get.indexes.error"))}))},e.setQuery=function(e){window.editor.setValue(e||" ")},e.showEditor=function(){window.editor.xhr&&window.editor.xhr.abort(),e.viewMode="yasr"},e.showPreview=function(){e.currentQuery.outputType="table",e.runQuery()},e.resetCurrentTabConfig=function(){e.currentTabConfig={pageSize:100,page:1,allResultsCount:0,resultsCount:0}},e.queryExists=!1,e.resetCurrentTabConfig(),e.tabsData=e.tabs=[w],e.saveTab=function(n){const t=function(n){for(let t=0;t<e.tabsData.length;t++){if(e.tabsData[t].id===n)return t}}(n);if(void 0===t)return{};const r=e.tabsData[t];return e.saveQueryToLocal(r),r},e.loadTab=M,e.addNewTab=function(e,n,t){},e.runQuery=b,e.getNamespaces=q,e.changePagination=function(){b(!0,e.explainRequested)},e.toggleSampleQueries=function(){},e.addKnownPrefixes=C,e.getExistingTabId=E,e.querySelected=function(n){const t=E(n);e.toggleSampleQueries(),angular.isDefined(t)?v(t):e.addNewTab(null,n.name,n.body)},e.saveQueryToLocal=I,e.setLoader=Q,e.getLoaderMessage=function(){const n=(Date.now()-e.queryStartTime)/1e3,t=e.getHumanReadableSeconds(n);let r="";r=e.progressMessage?e.progressMessage+"... "+t:y.instant("common.running.operation",{timeHuman:t});e.extraMessage&&n>10&&(r+="\n"+e.extraMessage);return r},e.fixSizesOnHorizontalViewModeSwitch=T,e.changeViewMode=function(n){e.viewMode="none",e.orientationViewMode=!e.orientationViewMode,T(),$(".dataTables_filter").remove(),$(".resultsTable").remove(),r((function(){M(),v(n)}),100)},e.showHideEditor=S,e.focusQueryEditor=function(){angular.element(document).find(".editable-input").is(":focus")||angular.element(document).find(".CodeMirror textarea:first-child").focus()},e.orientationViewMode=!0,e.getActiveRepository(),e.orientationViewMode||S(),e.getActiveRepository()&&q(),e.$on("$destroy",(function(){window.editor=null,window.yasr=null})),$("textarea").on("paste",(function(){r((function(){C()}),0)})),e.$watchCollection("[currentQuery.inference, currentQuery.sameAs]",(function(){e.currentQuery})),e.$on("tabAction",(function(n,t){t.relatedTarget&&e.saveTab(L(t.relatedTarget)),e.loadTab(L(t.target))})),e.$on("deleteAllexeptSelected",(function(n,t){e.tabsData=t,e.tabs=t})),e.currentQuery=angular.copy(w),e.showSampleQueries=!1,e.savedQuery={},e.sampleQueries={},e.getResultsDescription=function(){},e.getUpdateDescription=function(){},e.getStaleWarningMessage=function(){},e.saveSearchQuery=function(){if("SELECT"!==window.editor.getQueryType())return void n.error(y.instant("similarity.index.select.queries.constraint"));let t={name:e.newIndex.name,changedQuery:e.currentQuery.query,isSearchQuery:2===e.page};return i.saveSearchQuery(JSON.stringify(t)).then((async function(){await u.showToastMessageWithDelay(2===e.page?"similarity.changed.search.query.msg":"similarity.changed.analogical.query.msg"),o.url("similarity")}),(function(e){n.error(getError(e),y.instant("similarity.change.query.error"))}))},e.getCloseBtnMsg=function(){let n=e.editSearchQuery?y.instant("similarity.query.edition.msg"):y.instant("similarity.index.creation.msg");return y.instant("similarity.close.btn.msg",{operation:n})}}angular.module("graphdb.framework.similarity.controllers.create",["graphdb.framework.utils.notifications","graphdb.framework.utils.localstorageadapter"]).controller("CreateSimilarityIdxCtrl",r),r.$inject=["$scope","toastr","$modal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate"]}}]);
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[43,122],{38:function(e,n){function t(e,n){return{showToastMessageWithDelay:function(t){return new Promise(r=>{e.success(n.instant(t)),setTimeout(r,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",t),t.$inject=["toastr","$translate"]},93:function(e,n,t){"use strict";t.r(n);t(38),t(5);function r(e,n,t,r,i,a,o,s,u,c,d,l,y){const g=o.search().type;void 0===g||g.startsWith("text")?e.viewType="text":e.viewType=g;e.newIndex={},e.info=s,e.page=1;const w={id:"1",name:"",query:"",inference:!0,sameAs:!0};const f=function(){var t;if(e.editSearchQuery=o.search().editSearchQuery,e.page=e.editSearchQuery?2:1,e.newIndex.name=(t=o.search().name)?1!==e.page?t:"Copy_of_"+t:"",e.newIndex.options=o.search().options?o.search().options:"text"===e.viewType?"-termweight idf":"",e.searchQueries&&(e.newIndex.searchQuery=o.search().searchQuery?o.search().searchQuery:e.searchQueries[e.viewType],"predication"===e.viewType&&(e.newIndex.analogicalQuery=o.search().analogicalQuery?o.search().analogicalQuery:e.searchQueries.analogical)),e.editSearchQuery)e.currentQuery.query=e.newIndex.searchQuery,e.notoolbarInference=!0,e.notoolbarSameAs=!0,window.editor&&e.setQuery(e.newIndex.searchQuery);else{if("text"===e.viewType&&e.allSamples){e.samples=e.allSamples.text,e.newIndex.stopList=o.search().stopList?o.search().stopList:void 0,e.newIndex.analyzer=o.search().analyzer?o.search().analyzer:"org.apache.lucene.analysis.en.EnglishAnalyzer";const n=h("-literal_index");void 0!==n&&(e.newIndex.isLiteralIndex=n),window.editor&&e.setQuery(e.samples.literals)}"predication"===e.viewType&&e.allSamples&&(i.getIndexes().success((function(n){if(e.literalIndexes=["no-index"].concat(n.filter((function(e){return"textLiteral"===e.type&&("BUILT"===e.status||"OUTDATED"===e.status)})).map((function(e){return e.name}))),void 0===e.newIndex.inputIndex){const n=h("-input_index");if(void 0!==n)for(let t=0;t<e.literalIndexes.length;t++)n===e.literalIndexes[t]&&(e.newIndex.inputIndex=e.literalIndexes[t])}void 0===e.newIndex.inputIndex&&(e.newIndex.inputIndex=e.literalIndexes[0])})).error((function(e){const t=getError(e);n.error(t,y.instant("similarity.could.not.get.indexes.error"))})),e.samples=e.allSamples.predication,window.editor&&e.setQuery(e.samples.predication))}},p=new RegExp("^[a-zA-Z0-9-_]+$"),m=function(){return e.invalidIndexName=!1,e.saveQueries(),e.newIndex.name?p.test(e.newIndex.name)?e.newIndex.query?e.newIndex.searchQuery?"predication"!==e.viewType||e.newIndex.analogicalQuery?"SELECT"===window.editor.getQueryType()||void n.error(y.instant("similarity.index.select.queries.constraint")):(n.error(y.instant("similarity.empty.analogical.query.error")),!1):(n.error(y.instant("similarity.empty.search.query.error")),!1):(n.error(y.instant("similarity.empty.select.query.error")),!1):(e.invalidIndexName=y.instant("similarity.index.name.constraint"),!1):(e.invalidIndexName=y.instant("similarity.empty.index.name.error"),!1)},x=function(n,t){e.newIndex.options=e.newIndex.options+(""===e.newIndex.options?"":" ")+n+" "+t};function h(n){const t=e.newIndex.options.split(" ");for(let r=0;r<t.length;r++)if(t[r]===n&&r+1<t.length){const n=t[r+1];return delete t[r],delete t[r+1],e.newIndex.options=t.join(" "),n}}function I(e){}function Q(n,t,r){const i=angular.element(document.getElementById("yasr-inner"));e.queryIsRunning=n,n?(e.queryStartTime=Date.now(),e.countTimeouted=!1,e.progressMessage=t,e.extraMessage=r,i.addClass("hide")):(e.progressMessage="",e.extraMessage="",i.removeClass("hide")),null===e.$$phase&&e.$apply()}function T(n){function t(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}const i=n;if(e.orientationViewMode){if("yasr"===e.viewMode){let e=t()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px"}else e.noPadding={},document.querySelector(".CodeMirror-wrap").style.height="";document.getElementById("yasr").style.minHeight=""}else if(e.noPadding={paddingRight:15,paddingLeft:0},window.editor&&document.querySelector(".CodeMirror-wrap")){let e=t()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px",document.getElementById("yasr").style.minHeight=e+"px"}else{let n;n=r(i?function(){e.fixSizesOnHorizontalViewModeSwitch(i)}:e.fixSizesOnHorizontalViewModeSwitch,100),e.$on("$destroy",(function(){r.cancel(n)}))}window.yasr&&window.yasr.container&&r((function(){window.yasr.container.resize()}),100)}function S(){T(!0)}function v(e){r((function(){$('a[data-id = "'+e+'"]').tab("show")}),0)}function b(t,r){e.executedQueryTab=e.currentQuery,"SELECT"===window.editor.getQueryType()?r&&"SELECT"!==window.editor.getQueryType()?n.warning(y.instant("similarity.explain.select.queries.constraint")):"update"!==window.editor.getQueryMode()?(e.explainRequested=r,e.queryIsRunning||(t?e.currentTabConfig.resultsCount=0:e.resetCurrentTabConfig(),e.viewMode="editor",e.orientationViewMode&&e.fixSizesOnHorizontalViewModeSwitch(),Q(!0,y.instant("evaluating.query.msg")),window.editor.query())):n.warning(y.instant("cannot.execute.update.error")):n.error(y.instant("similarity.indexes.select.queries.constraint"))}function q(){Q(!0,y.instant("common.refreshing.namespaces"),y.instant("common.extra.message")),c.getRepositoryNamespaces().success((function(n){const t={};n.results.bindings.forEach((function(e){t[e.prefix.value]=e.namespace.value})),e.namespaces=t})).error((function(n){e.repositoryError=getError(n)})).finally((function(){Q(!1)}))}function C(){a.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(e){angular.isDefined(window.editor)&&angular.isDefined(e)&&e!==window.editor.getValue()&&window.editor.setValue(e)})).error((function(e){const t=getError(e);return n.error(t,y.instant("common.add.known.prefixes.error")),!0}))}function E(n){let t=void 0;return angular.forEach(e.tabsData,(function(e){if(e.name===n.name&&e.query===n.body)return t=e.id,e})),t}function M(){e.tabsData=[e.currentQuery];const n=e.currentQuery;null===e.currentQuery.query||""===e.currentQuery.query?window.editor.setValue(" "):window.editor.setValue(e.currentQuery.query||" "),r((function(){e.currentTabConfig={},e.currentTabConfig.queryType=n.queryType,e.currentTabConfig.resultsCount=n.resultsCount,e.currentTabConfig.offset=n.offset,e.currentTabConfig.allResultsCount=n.allResultsCount,e.currentTabConfig.page=n.page,e.currentTabConfig.pageSize=n.pageSize,e.currentTabConfig.timeFinished=n.timeFinished,e.currentTabConfig.timeTook=n.timeTook,e.currentTabConfig.sizeDelta=n.sizeDelta,e.$apply()}),0),$("#yasr").css("padding","0")}function L(e){return $(e).attr("data-id")}i.getSearchQueries().success((function(n){e.searchQueries=n,i.getSamples().success((function(n){w.query=o.search().selectQuery?o.search().selectQuery:n.text.literals,w.inference=!("false"===o.search().infer),w.sameAs=!("false"===o.search().sameAs),e.tabsData=e.tabs=[w],e.currentQuery=angular.copy(w),e.allSamples=n,f()}))})).error((function(e){const t=getError(e);n.error(t,y.instant("similarity.could.not.get.search.queries.error"))})),e.$watch("viewType",(function(){f()})),e.helpHidden=1===d.get(l.HIDE_SIMILARITY_HELP),e.toggleHelp=function(n){void 0===n&&(n=d.get(l.HIDE_SIMILARITY_HELP)),1!==n?(d.set(l.HIDE_SIMILARITY_HELP,1),e.helpHidden=!0):(d.set(l.HIDE_SIMILARITY_HELP,0),e.helpHidden=!1)},e.viewQuery=function(){m()&&i.getQuery({indexName:e.newIndex.name,indexOptions:e.newIndex.options,query:e.currentQuery.query,indexStopList:e.newIndex.stopList,queryInference:e.currentQuery.inference,querySameAs:e.currentQuery.sameAs,viewType:e.viewType,indexAnalyzer:e.newIndex.analyzer}).success((function(e){e&&t.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})}))},e.$watch("newIndex.name",(function(){e.isInvalidIndexName=!1,e.isEmptyIndexName=!1})),e.saveQueries=function(){const n=window.editor.getValue().trim();1===e.page?e.newIndex.query=n:2===e.page?e.newIndex.searchQuery=n:3===e.page&&(e.newIndex.analogicalQuery=n)},e.goToPage=function(n){1!==n&&"yasr"!==e.viewMode&&(e.showEditor(),r((function(){2===n&&(e.currentQuery.query=e.newIndex.searchQuery),3===n&&(e.currentQuery.query=e.newIndex.analogicalQuery),window.editor.setValue(e.currentQuery.query||" ")}))),e.saveQueries(),1===n?e.currentQuery.query=e.newIndex.query:2===n?e.currentQuery.query=e.newIndex.searchQuery:3===n&&(e.currentQuery.query=e.newIndex.analogicalQuery),M(),e.notoolbar=1!==n,e.page=n},e.createIndex=function(){m()&&i.getIndexes().success((function(t){if(t.forEach((function(n){n.name===e.newIndex.name&&(e.invalidIndexName=y.instant("similarity.existing.index.name.error"))})),!e.invalidIndexName){let t=e.viewType;if(void 0!==e.literalIndexes){const n=e.newIndex.inputIndex;n!==e.literalIndexes[0]&&x("-input_index",n)}"true"===e.newIndex.isLiteralIndex&&(x("-literal_index","true"),t="textLiteral"),i.createIndex("POST",e.newIndex.name,e.newIndex.options,e.newIndex.query,e.newIndex.searchQuery,e.newIndex.analogicalQuery,e.newIndex.stopList,e.currentQuery.inference,e.currentQuery.sameAs,t,e.newIndex.analyzer).error((function(e){n.error(getError(e),y.instant("similarity.create.index.error"))})),o.url("similarity")}})).error((function(e){const t=getError(e);n.error(t,y.instant("similarity.could.not.get.indexes.error"))}))},e.setQuery=function(e){window.editor.setValue(e||" ")},e.showEditor=function(){window.editor.xhr&&window.editor.xhr.abort(),e.viewMode="yasr"},e.showPreview=function(){e.currentQuery.outputType="table",e.runQuery()},e.resetCurrentTabConfig=function(){e.currentTabConfig={pageSize:100,page:1,allResultsCount:0,resultsCount:0}},e.queryExists=!1,e.resetCurrentTabConfig(),e.tabsData=e.tabs=[w],e.saveTab=function(n){const t=function(n){for(let t=0;t<e.tabsData.length;t++){if(e.tabsData[t].id===n)return t}}(n);if(void 0===t)return{};const r=e.tabsData[t];return e.saveQueryToLocal(r),r},e.loadTab=M,e.addNewTab=function(e,n,t){},e.runQuery=b,e.getNamespaces=q,e.changePagination=function(){b(!0,e.explainRequested)},e.toggleSampleQueries=function(){},e.addKnownPrefixes=C,e.getExistingTabId=E,e.querySelected=function(n){const t=E(n);e.toggleSampleQueries(),angular.isDefined(t)?v(t):e.addNewTab(null,n.name,n.body)},e.saveQueryToLocal=I,e.setLoader=Q,e.getLoaderMessage=function(){const n=(Date.now()-e.queryStartTime)/1e3,t=e.getHumanReadableSeconds(n);let r="";r=e.progressMessage?e.progressMessage+"... "+t:y.instant("common.running.operation",{timeHuman:t});e.extraMessage&&n>10&&(r+="\n"+e.extraMessage);return r},e.fixSizesOnHorizontalViewModeSwitch=T,e.changeViewMode=function(n){e.viewMode="none",e.orientationViewMode=!e.orientationViewMode,T(),$(".dataTables_filter").remove(),$(".resultsTable").remove(),r((function(){M(),v(n)}),100)},e.showHideEditor=S,e.focusQueryEditor=function(){angular.element(document).find(".editable-input").is(":focus")||angular.element(document).find(".CodeMirror textarea:first-child").focus()},e.orientationViewMode=!0,e.getActiveRepository(),e.orientationViewMode||S(),e.getActiveRepository()&&q(),e.$on("$destroy",(function(){window.editor=null,window.yasr=null})),$("textarea").on("paste",(function(){r((function(){C()}),0)})),e.$watchCollection("[currentQuery.inference, currentQuery.sameAs]",(function(){e.currentQuery})),e.$on("tabAction",(function(n,t){t.relatedTarget&&e.saveTab(L(t.relatedTarget)),e.loadTab(L(t.target))})),e.$on("deleteAllexeptSelected",(function(n,t){e.tabsData=t,e.tabs=t})),e.currentQuery=angular.copy(w),e.showSampleQueries=!1,e.savedQuery={},e.sampleQueries={},e.getResultsDescription=function(){},e.getUpdateDescription=function(){},e.getStaleWarningMessage=function(){},e.saveSearchQuery=function(){if("SELECT"!==window.editor.getQueryType())return void n.error(y.instant("similarity.index.select.queries.constraint"));let t={name:e.newIndex.name,changedQuery:e.currentQuery.query,isSearchQuery:2===e.page};return i.saveSearchQuery(JSON.stringify(t)).then((async function(){await u.showToastMessageWithDelay(2===e.page?"similarity.changed.search.query.msg":"similarity.changed.analogical.query.msg"),o.url("similarity")}),(function(e){n.error(getError(e),y.instant("similarity.change.query.error"))}))},e.getCloseBtnMsg=function(){let n=e.editSearchQuery?y.instant("similarity.query.edition.msg"):y.instant("similarity.index.creation.msg");return y.instant("similarity.close.btn.msg",{operation:n})}}angular.module("graphdb.framework.similarity.controllers.create",["graphdb.framework.utils.notifications","graphdb.framework.utils.localstorageadapter"]).controller("CreateSimilarityIdxCtrl",r),r.$inject=["$scope","toastr","$modal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate"]}}]);
|
|
2
|
+
//# sourceMappingURL=43.f76be157f75bc7b3ea68.bundle.js.map
|
package/dist/{42.9a13772d165bfabbf5ac.bundle.js.map → 43.f76be157f75bc7b3ea68.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/utils/notifications.js","webpack:///./src/js/angular/similarity/controllers/create-index.controller.js"],"names":["Notifications","toastr","$translate","showToastMessageWithDelay","message","Promise","r","success","instant","setTimeout","angular","module","factory","$inject","CreateSimilarityIdxCtrl","$scope","$modal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","indexType","search","type","undefined","startsWith","viewType","newIndex","info","page","defaultTabConfig","id","name","query","inference","sameAs","initForViewType","indexNameFromLocation","editSearchQuery","options","searchQueries","searchQuery","analogicalQuery","currentQuery","notoolbarInference","notoolbarSameAs","window","editor","setQuery","allSamples","samples","stopList","analyzer","isLiteralIndex","getAndRemoveOption","getIndexes","data","literalIndexes","concat","filter","idx","status","map","inputIndex","desiredIdx","j","length","error","msg","getError","filenamePattern","RegExp","validateIndex","invalidIndexName","saveQueries","test","getQueryType","appendOption","option","value","key","optArr","split","i","join","saveQueryToLocal","currentQueryTab","setLoader","isRunning","progressMessage","extraMessage","yasrInnerContainer","element","document","getElementById","queryIsRunning","queryStartTime","Date","now","countTimeouted","addClass","removeClass","$$phase","$apply","fixSizesOnHorizontalViewModeSwitch","verticalViewParam","visibleWindowHeight","innerHeight","documentElement","clientHeight","body","verticalView","orientationViewMode","viewMode","newHeight","querySelector","getBoundingClientRect","style","height","noPadding","minHeight","paddingRight","paddingLeft","timer","$on","cancel","yasr","container","resize","showHideEditor","selectTab","$","tab","runQuery","changePage","explain","executedQueryTab","warning","getQueryMode","explainRequested","currentTabConfig","resultsCount","resetCurrentTabConfig","getNamespaces","getRepositoryNamespaces","usedPrefixes","results","bindings","forEach","e","prefix","namespace","namespaces","repositoryError","finally","addKnownPrefixes","JSON","stringify","getValue","isDefined","setValue","getExistingTabId","existingTabId","tabsData","item","loadTab","queryType","offset","allResultsCount","pageSize","timeFinished","timeTook","sizeDelta","css","getQueryID","attr","getSearchQueries","getSamples","selectQuery","infer","tabs","copy","$watch","helpHidden","get","HIDE_SIMILARITY_HELP","toggleHelp","set","viewQuery","getQuery","indexName","indexOptions","indexStopList","queryInference","querySameAs","indexAnalyzer","open","templateUrl","controller","resolve","isInvalidIndexName","isEmptyIndexName","trim","goToPage","showEditor","notoolbar","createIndex","index","err","url","xhr","abort","showPreview","outputType","queryExists","saveTab","findTabIndexByID","addNewTab","callback","tabName","savedQuery","changePagination","toggleSampleQueries","querySelected","tabId","getLoaderMessage","timeSeconds","timeHuman","getHumanReadableSeconds","changeViewMode","tabID","remove","focusQueryEditor","find","is","focus","getActiveRepository","on","$watchCollection","tabEvent","relatedTarget","target","showSampleQueries","sampleQueries","getResultsDescription","getUpdateDescription","getStaleWarningMessage","saveSearchQuery","changedQuery","isSearchQuery","then","async","response","getCloseBtnMsg","operationType","operation"],"mappings":"+EAMA,SAASA,EAAcC,EAAQC,GAC3B,MAAO,CACHC,0BASJ,SAAmCC,GAC/B,OAAO,IAAIC,QAASC,IAChBL,EAAOM,QAAQL,EAAWM,QAAQJ,IAClCK,WAAWH,EAAG,SApB1BI,QACKC,OAAO,wCAAyC,IAChDC,QAAQ,gBAAiBZ,GAE9BA,EAAca,QAAU,CAAC,SAAU,e,gCCJnC,kBAYA,SAASC,EAAwBC,EAAQd,EAAQe,EAAQC,EAAUC,EAAuBC,EAAmBC,EAAWC,EAAarB,EAAesB,EAA8BC,EAAqBC,EAAQtB,GAE3M,MAAMuB,EAAYL,EAAUM,SAASC,UACnBC,IAAdH,GAA2BA,EAAUI,WAAW,QAChDd,EAAOe,SAAW,OAElBf,EAAOe,SAAWL,EAKtBV,EAAOgB,SAAW,GAElBhB,EAAOiB,KAAOX,EACdN,EAAOkB,KAAO,EAEd,MAAMC,EAAmB,CACrBC,GAAI,IACJC,KAAM,GACNC,MAAO,GACPC,WAAW,EACXC,QAAQ,GAcZ,MAAMC,EAAkB,WAXF,IAAUC,EAwB5B,GAZA1B,EAAO2B,gBAAkBtB,EAAUM,SAASgB,gBAC5C3B,EAAOk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EAAO,CACPxB,KAAMrB,EAAOgB,SAASK,KACtBwN,aAAc7O,EAAOgC,aAAaV,MAClCwN,cAA+B,IAAhB9O,EAAOkB,MAG1B,OAAOf,EAAsByO,gBAAgB3F,KAAKC,UAAUrG,IACvDkM,MAAKC,uBACI/P,EAAcG,0BAA0C,IAAhBY,EAAOkB,KAAa,sCAAwC,2CAC1Gb,EAAUiM,IAAI,iBACf,SAAU2C,GACT/P,EAAOsE,MAAME,SAASuL,GAAW9P,EAAWM,QAAQ,sCAIhEO,EAAOkP,eAAiB,WACpB,IAAIC,EAAgBnP,EAAO2B,gBAAkBxC,EAAWM,QAAQ,gCAAkCN,EAAWM,QAAQ,iCACrH,OAAON,EAAWM,QAAQ,2BAA4B,CAAC2P,UAAWD,KAvvB1ExP,QACKC,OAAO,kDAAmD,CACvD,wCACA,gDAEH+L,WAAW,0BAA2B5L,GAE3CA,EAAwBD,QAAU,CAAC,SAAU,SAAU,SAAU,WAAY,wBAAyB,oBAAqB,YAAa,cAAe,gBAAiB,+BAAgC,sBAAuB,SAAU","file":"42.9a13772d165bfabbf5ac.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.utils.notifications', [])\n .factory('Notifications', Notifications);\n\nNotifications.$inject = ['toastr', '$translate'];\n\nfunction Notifications(toastr, $translate) {\n return {\n showToastMessageWithDelay\n };\n\n /**\n * This method will show message with tiny delay and only after completion\n * of latter redirection to \"graphs-visualizations\" page will happen.\n * @param {string} message The message to be displayed.\n * @return {Promise<any>}\n */\n function showToastMessageWithDelay(message) {\n return new Promise((r) => {\n toastr.success($translate.instant(message));\n setTimeout(r, 200);\n });\n }\n}\n","import 'angular/utils/notifications';\nimport 'angular/utils/local-storage-adapter';\n\nangular\n .module('graphdb.framework.similarity.controllers.create', [\n 'graphdb.framework.utils.notifications',\n 'graphdb.framework.utils.localstorageadapter'\n ])\n .controller('CreateSimilarityIdxCtrl', CreateSimilarityIdxCtrl);\n\nCreateSimilarityIdxCtrl.$inject = ['$scope', 'toastr', '$modal', '$timeout', 'SimilarityRestService', 'SparqlRestService', '$location', 'productInfo', 'Notifications', 'RDF4JRepositoriesRestService', 'LocalStorageAdapter', 'LSKeys', '$translate'];\n\nfunction CreateSimilarityIdxCtrl($scope, toastr, $modal, $timeout, SimilarityRestService, SparqlRestService, $location, productInfo, Notifications, RDF4JRepositoriesRestService, LocalStorageAdapter, LSKeys, $translate) {\n\n const indexType = $location.search().type;\n if (indexType === undefined || indexType.startsWith('text')) {\n $scope.viewType = 'text';\n } else {\n $scope.viewType = indexType;\n }\n\n const textDefaultOptions = '-termweight idf';\n const predDefaultOptions = '';\n $scope.newIndex = {};\n\n $scope.info = productInfo;\n $scope.page = 1;\n\n const defaultTabConfig = {\n id: '1',\n name: '',\n query: '',\n inference: true,\n sameAs: true\n };\n\n let getNewIndexName = function (indexNameFromLocation) {\n if (indexNameFromLocation) {\n if ($scope.page !== 1) {\n return indexNameFromLocation;\n } else {\n return 'Copy_of_' + indexNameFromLocation;\n }\n }\n return '';\n };\n\n const initForViewType = function () {\n $scope.editSearchQuery = $location.search().editSearchQuery;\n $scope.page = $scope.editSearchQuery ? 2 : 1;\n $scope.newIndex.name = getNewIndexName($location.search().name);\n $scope.newIndex.options = ($location.search().options ? $location.search().options : ($scope.viewType === \"text\") ? textDefaultOptions : predDefaultOptions);\n\n if ($scope.searchQueries) {\n $scope.newIndex.searchQuery = $location.search().searchQuery ? $location.search().searchQuery : $scope.searchQueries[$scope.viewType];\n if ($scope.viewType === 'predication') {\n $scope.newIndex.analogicalQuery = $location.search().analogicalQuery ? $location.search().analogicalQuery : $scope.searchQueries['analogical'];\n }\n }\n\n if ($scope.editSearchQuery) {\n // Default will be opened search query tab for edition\n $scope.currentQuery.query = $scope.newIndex.searchQuery;\n $scope.notoolbarInference = true;\n $scope.notoolbarSameAs = true;\n if (window.editor) {\n $scope.setQuery($scope.newIndex.searchQuery);\n }\n } else {\n if ($scope.viewType === 'text' && $scope.allSamples) {\n $scope.samples = $scope.allSamples['text'];\n $scope.newIndex.stopList = ($location.search().stopList ? $location.search().stopList : undefined);\n $scope.newIndex.analyzer = ($location.search().analyzer ? $location.search().analyzer : 'org.apache.lucene.analysis.en.EnglishAnalyzer');\n const isLiteralIndex = getAndRemoveOption('-literal_index');\n if (isLiteralIndex !== undefined) {\n $scope.newIndex.isLiteralIndex = isLiteralIndex;\n }\n if (window.editor) {\n $scope.setQuery($scope.samples['literals']);\n }\n }\n if ($scope.viewType === 'predication' && $scope.allSamples) {\n SimilarityRestService.getIndexes()\n .success(function (data) {\n $scope.literalIndexes = ['no-index'].concat(data\n .filter(function (idx) {\n return idx.type === 'textLiteral' && (idx.status === 'BUILT' || idx.status === 'OUTDATED')\n })\n .map(function (idx) {\n return idx.name;\n }));\n\n if ($scope.newIndex.inputIndex === undefined) {\n const desiredIdx = getAndRemoveOption('-input_index');\n if (desiredIdx !== undefined) {\n for (let j = 0; j < $scope.literalIndexes.length; j++) {\n if (desiredIdx === $scope.literalIndexes[j]) {\n $scope.newIndex.inputIndex = $scope.literalIndexes[j];\n }\n }\n }\n }\n if ($scope.newIndex.inputIndex === undefined) {\n $scope.newIndex.inputIndex = $scope.literalIndexes[0];\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.indexes.error'));\n });\n\n $scope.samples = $scope.allSamples['predication'];\n if (window.editor) {\n $scope.setQuery($scope.samples['predication']);\n }\n }\n }\n };\n\n const filenamePattern = new RegExp('^[a-zA-Z0-9-_]+$');\n\n const validateIndex = function () {\n $scope.invalidIndexName = false;\n $scope.saveQueries();\n if (!$scope.newIndex.name) {\n $scope.invalidIndexName = $translate.instant('similarity.empty.index.name.error');\n return false;\n }\n if (!filenamePattern.test($scope.newIndex.name)) {\n $scope.invalidIndexName = $translate.instant('similarity.index.name.constraint');\n return false;\n }\n\n if (!$scope.newIndex.query) {\n toastr.error($translate.instant('similarity.empty.select.query.error'));\n return false;\n }\n\n if (!$scope.newIndex.searchQuery) {\n toastr.error($translate.instant('similarity.empty.search.query.error'));\n return false;\n }\n\n if ($scope.viewType === 'predication' && !$scope.newIndex.analogicalQuery) {\n toastr.error($translate.instant('similarity.empty.analogical.query.error'));\n return false;\n }\n\n if (window.editor.getQueryType() !== 'SELECT') {\n toastr.error($translate.instant('similarity.index.select.queries.constraint'));\n return;\n }\n\n return true;\n };\n\n const appendOption = function (option, value) {\n $scope.newIndex.options = $scope.newIndex.options + ($scope.newIndex.options === '' ? '' : ' ') + option + ' ' + value;\n };\n\n SimilarityRestService.getSearchQueries().success(function (data) {\n $scope.searchQueries = data;\n SimilarityRestService.getSamples().success(function (samples) {\n defaultTabConfig.query = $location.search().selectQuery ? $location.search().selectQuery : samples['text']['literals'];\n defaultTabConfig.inference = !($location.search().infer === 'false');\n defaultTabConfig.sameAs = !($location.search().sameAs === 'false');\n $scope.tabsData = $scope.tabs = [defaultTabConfig];\n $scope.currentQuery = angular.copy(defaultTabConfig);\n $scope.allSamples = samples;\n initForViewType();\n });\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.search.queries.error'));\n });\n\n $scope.$watch('viewType', function () {\n initForViewType();\n });\n\n $scope.helpHidden = LocalStorageAdapter.get(LSKeys.HIDE_SIMILARITY_HELP) === 1;\n $scope.toggleHelp = function (value) {\n if (value === undefined) {\n value = LocalStorageAdapter.get(LSKeys.HIDE_SIMILARITY_HELP);\n }\n if (value !== 1) {\n LocalStorageAdapter.set(LSKeys.HIDE_SIMILARITY_HELP, 1);\n $scope.helpHidden = true;\n } else {\n LocalStorageAdapter.set(LSKeys.HIDE_SIMILARITY_HELP, 0);\n $scope.helpHidden = false;\n }\n };\n\n $scope.viewQuery = function () {\n if (!validateIndex()) {\n return;\n }\n\n SimilarityRestService.getQuery({\n indexName: $scope.newIndex.name,\n indexOptions: $scope.newIndex.options,\n query: $scope.currentQuery.query,\n indexStopList: $scope.newIndex.stopList,\n queryInference: $scope.currentQuery.inference,\n querySameAs: $scope.currentQuery.sameAs,\n viewType: $scope.viewType,\n indexAnalyzer: $scope.newIndex.analyzer\n }).success(function (query) {\n if (query) {\n $modal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function () {\n return query;\n }\n }\n });\n }\n });\n };\n\n $scope.$watch('newIndex.name', function () {\n $scope.isInvalidIndexName = false;\n $scope.isEmptyIndexName = false;\n });\n\n $scope.saveQueries = function () {\n // save the current query\n const query = window.editor.getValue().trim();\n if ($scope.page === 1) {\n $scope.newIndex.query = query;\n } else if ($scope.page === 2) {\n $scope.newIndex.searchQuery = query;\n } else if ($scope.page === 3) {\n $scope.newIndex.analogicalQuery = query;\n }\n };\n\n $scope.goToPage = function (page) {\n // ugly fix for GDB-3099\n if (page !== 1 && $scope.viewMode !== 'yasr') {\n $scope.showEditor();\n $timeout(function () {\n if (page === 2) {\n $scope.currentQuery.query = $scope.newIndex.searchQuery;\n }\n if (page === 3) {\n $scope.currentQuery.query = $scope.newIndex.analogicalQuery;\n }\n\n window.editor.setValue($scope.currentQuery.query || ' ');\n });\n }\n\n $scope.saveQueries();\n // get the saved query\n if (page === 1) {\n $scope.currentQuery.query = $scope.newIndex.query;\n } else if (page === 2) {\n $scope.currentQuery.query = $scope.newIndex.searchQuery;\n } else if (page === 3) {\n $scope.currentQuery.query = $scope.newIndex.analogicalQuery;\n }\n\n loadTab();\n $scope.notoolbar = page !== 1;\n\n $scope.page = page;\n };\n\n $scope.createIndex = function () {\n if (!validateIndex()) {\n return;\n }\n // Check existing indexes\n SimilarityRestService.getIndexes()\n .success(function (data) {\n data.forEach(function (index) {\n if (index.name === $scope.newIndex.name) {\n $scope.invalidIndexName = $translate.instant('similarity.existing.index.name.error');\n }\n });\n if (!$scope.invalidIndexName) {\n let indexType = $scope.viewType;\n\n if ($scope.literalIndexes !== undefined) {\n const inputIndex = $scope.newIndex.inputIndex;\n if (inputIndex !== $scope.literalIndexes[0]) {\n appendOption('-input_index', inputIndex);\n }\n }\n if ($scope.newIndex.isLiteralIndex === 'true') {\n appendOption('-literal_index', 'true');\n indexType = 'textLiteral';\n }\n\n SimilarityRestService.createIndex('POST',\n $scope.newIndex.name,\n $scope.newIndex.options,\n $scope.newIndex.query,\n $scope.newIndex.searchQuery,\n $scope.newIndex.analogicalQuery,\n $scope.newIndex.stopList,\n $scope.currentQuery.inference,\n $scope.currentQuery.sameAs,\n indexType,\n $scope.newIndex.analyzer)\n .error(function (err) {\n toastr.error(getError(err), $translate.instant('similarity.create.index.error'));\n });\n $location.url('similarity');\n }\n\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.indexes.error'));\n });\n };\n\n // Called when user clicks on a sample query\n $scope.setQuery = function (query) {\n // Hack for YASQE bug\n window.editor.setValue(query ? query : ' ');\n };\n\n // TODO don't copy paste each time, this is the same as in the graph config\n // DOWN HERE WE KEEP EVERYTHING PURELY QUERY EDITOR (MOSTLY BORROWED FROM query-editor.controller.js)\n\n $scope.showEditor = function () {\n if (window.editor.xhr) {\n window.editor.xhr.abort();\n }\n $scope.viewMode = 'yasr';\n };\n\n $scope.showPreview = function () {\n // For some reason YASR gets confused and sets this to rawResponse\n // if we execute a CONSTRUCT and then a SELECT. This makes sure it's always table.\n $scope.currentQuery.outputType = 'table';\n $scope.runQuery();\n };\n\n $scope.resetCurrentTabConfig = function () {\n $scope.currentTabConfig = {\n pageSize: 100, // page limit 100 as this is only used for preview\n page: 1,\n allResultsCount: 0,\n resultsCount: 0\n };\n };\n\n $scope.queryExists = false;\n\n $scope.resetCurrentTabConfig();\n\n $scope.tabsData = $scope.tabs = [defaultTabConfig];\n\n // query tab operations\n $scope.saveTab = saveTab;\n $scope.loadTab = loadTab;\n $scope.addNewTab = addNewTab;\n\n // query operations\n $scope.runQuery = runQuery;\n $scope.getNamespaces = getNamespaces;\n $scope.changePagination = changePagination;\n $scope.toggleSampleQueries = toggleSampleQueries;\n $scope.addKnownPrefixes = addKnownPrefixes;\n $scope.getExistingTabId = getExistingTabId;\n $scope.querySelected = querySelected;\n $scope.saveQueryToLocal = saveQueryToLocal;\n\n $scope.setLoader = setLoader;\n $scope.getLoaderMessage = getLoaderMessage;\n\n // query editor and results orientation\n $scope.fixSizesOnHorizontalViewModeSwitch = fixSizesOnHorizontalViewModeSwitch;\n $scope.changeViewMode = changeViewMode;\n $scope.showHideEditor = showHideEditor;\n $scope.focusQueryEditor = focusQueryEditor;\n $scope.orientationViewMode = true;\n\n // start of repository actions\n $scope.getActiveRepository();\n\n function getAndRemoveOption(key) {\n const optArr = $scope.newIndex.options.split(' ');\n for (let i = 0; i < optArr.length; i++) {\n if (optArr[i] === key && i + 1 < optArr.length) {\n const value = optArr[i + 1];\n\n delete optArr[i];\n delete optArr[i + 1];\n $scope.newIndex.options = optArr.join(' ');\n\n return value;\n }\n }\n return undefined;\n }\n\n function saveQueryToLocal(currentQueryTab) {\n }\n\n function setLoader(isRunning, progressMessage, extraMessage) {\n const yasrInnerContainer = angular.element(document.getElementById('yasr-inner'));\n $scope.queryIsRunning = isRunning;\n if (isRunning) {\n $scope.queryStartTime = Date.now();\n $scope.countTimeouted = false;\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n yasrInnerContainer.addClass('hide');\n } else {\n $scope.progressMessage = '';\n $scope.extraMessage = '';\n yasrInnerContainer.removeClass('hide');\n }\n // We might call this from angular or outside angular so take care of applying the scope.\n if ($scope.$$phase === null) {\n $scope.$apply();\n }\n }\n\n function getLoaderMessage() {\n const timeSeconds = (Date.now() - $scope.queryStartTime) / 1000;\n const timeHuman = $scope.getHumanReadableSeconds(timeSeconds);\n let message = '';\n\n if ($scope.progressMessage) {\n message = $scope.progressMessage + '... ' + timeHuman;\n } else {\n message = $translate.instant('common.running.operation', {timeHuman: timeHuman});\n }\n if ($scope.extraMessage && timeSeconds > 10) {\n message += '\\n' + $scope.extraMessage;\n }\n\n return message;\n }\n\n // start of query editor results orientation operations\n function fixSizesOnHorizontalViewModeSwitch(verticalViewParam) {\n function visibleWindowHeight() {\n return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;\n }\n\n const verticalView = verticalViewParam;\n if (!$scope.orientationViewMode) {\n $scope.noPadding = {paddingRight: 15, paddingLeft: 0};\n\n // window.editor is undefined if no repo is selected\n if (window.editor && document.querySelector('.CodeMirror-wrap')) {\n let newHeight = visibleWindowHeight() - (document.querySelector('.CodeMirror-wrap').getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector('.CodeMirror-wrap').style.height = newHeight + 'px';\n document.getElementById('yasr').style.minHeight = newHeight + 'px';\n //window.editor.refresh();\n } else {\n let timer;\n if (verticalView) {\n timer = $timeout(function () {\n $scope.fixSizesOnHorizontalViewModeSwitch(verticalView);\n }, 100);\n } else {\n timer = $timeout($scope.fixSizesOnHorizontalViewModeSwitch, 100);\n }\n\n $scope.$on('$destroy', function () {\n $timeout.cancel(timer);\n });\n }\n } else {\n if ($scope.viewMode === 'yasr') {\n let newHeight = visibleWindowHeight() - (document.querySelector('.CodeMirror-wrap').getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector('.CodeMirror-wrap').style.height = newHeight + 'px';\n } else {\n $scope.noPadding = {};\n document.querySelector('.CodeMirror-wrap').style.height = '';\n }\n document.getElementById('yasr').style.minHeight = '';\n }\n if (window.yasr && window.yasr.container) {\n $timeout(function () {\n window.yasr.container.resize();\n }, 100);\n }\n }\n\n if (!$scope.orientationViewMode) {\n showHideEditor();\n }\n\n function changeViewMode(tabID) {\n $scope.viewMode = 'none';\n $scope.orientationViewMode = !$scope.orientationViewMode;\n fixSizesOnHorizontalViewModeSwitch();\n $('.dataTables_filter').remove();\n $('.resultsTable').remove();\n $timeout(function () {\n loadTab();\n selectTab(tabID);\n }, 100);\n }\n\n function showHideEditor() {\n fixSizesOnHorizontalViewModeSwitch(true);\n }\n\n function focusQueryEditor() {\n if (!angular.element(document).find('.editable-input').is(':focus')) {\n angular.element(document).find('.CodeMirror textarea:first-child').focus();\n }\n }\n\n // end of query editor results orientation operations\n\n function selectTab(id) {\n $timeout(function () {\n $('a[data-id = \"' + id + '\"]').tab('show');\n }, 0);\n }\n\n // start of query operations\n function runQuery(changePage, explain) {\n $scope.executedQueryTab = $scope.currentQuery;\n if (window.editor.getQueryType() !== 'SELECT') {\n toastr.error($translate.instant('similarity.indexes.select.queries.constraint'));\n return;\n }\n if (explain && window.editor.getQueryType() !== 'SELECT') {\n toastr.warning($translate.instant('similarity.explain.select.queries.constraint'));\n return;\n }\n\n if (window.editor.getQueryMode() === 'update') {\n toastr.warning($translate.instant('cannot.execute.update.error'));\n return;\n }\n\n $scope.explainRequested = explain;\n if (!$scope.queryIsRunning) {\n if (changePage) {\n $scope.currentTabConfig.resultsCount = 0;\n } else {\n $scope.resetCurrentTabConfig();\n }\n\n // Hides the editor and shows the yasr results\n $scope.viewMode = 'editor';\n if ($scope.orientationViewMode) {\n $scope.fixSizesOnHorizontalViewModeSwitch();\n }\n\n setLoader(true, $translate.instant('evaluating.query.msg'));\n window.editor.query();\n }\n }\n\n // FIXME: this is copy-pasted in graphs-config.controller.js and query-editor.controller.js. Find a way to avoid duplications\n function getNamespaces() {\n // Signals the namespaces are to be fetched => loader will be shown\n setLoader(true, $translate.instant('common.refreshing.namespaces'), $translate.instant('common.extra.message'));\n RDF4JRepositoriesRestService.getRepositoryNamespaces()\n .success(function (data) {\n const usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.namespaces = usedPrefixes;\n })\n .error(function (data) {\n $scope.repositoryError = getError(data);\n })\n .finally(function () {\n // Signals namespaces were fetched => loader will be hidden\n setLoader(false);\n });\n }\n\n function changePagination() {\n runQuery(true, $scope.explainRequested);\n }\n\n if ($scope.getActiveRepository()) {\n getNamespaces();\n }\n\n $scope.$on('$destroy', function () {\n window.editor = null;\n window.yasr = null;\n });\n\n function toggleSampleQueries() {\n }\n\n // Add known prefixes\n function addKnownPrefixes() {\n SparqlRestService.addKnownPrefixes(JSON.stringify(window.editor.getValue()))\n .success(function (data) {\n if (angular.isDefined(window.editor) && angular.isDefined(data) && data !== window.editor.getValue()) {\n window.editor.setValue(data);\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.add.known.prefixes.error'));\n return true;\n });\n }\n\n $('textarea').on('paste', function () {\n $timeout(function () {\n addKnownPrefixes();\n }, 0);\n });\n\n function querySelected(query) {\n const tabId = getExistingTabId(query);\n $scope.toggleSampleQueries();\n if (!angular.isDefined(tabId)) {\n $scope.addNewTab(null, query.name, query.body);\n } else {\n selectTab(tabId);\n }\n }\n\n function getExistingTabId(query) {\n let existingTabId = undefined;\n angular.forEach($scope.tabsData, function (item) {\n if (item.name === query.name && item.query === query.body) {\n existingTabId = item.id;\n return item;\n }\n });\n\n return existingTabId;\n }\n\n\n // end of query operations\n\n // start of query tab operations\n function findTabIndexByID(id) {\n for (let i = 0; i < $scope.tabsData.length; i++) {\n const tab = $scope.tabsData[i];\n if (tab.id === id) {\n return i;\n }\n }\n }\n\n $scope.$watchCollection('[currentQuery.inference, currentQuery.sameAs]', function () {\n saveQueryToLocal($scope.currentQuery);\n });\n\n function saveTab(id) {\n const idx = findTabIndexByID(id);\n // Tab was deleted, don't try to save it's state\n if (idx === undefined) {\n return {};\n }\n const tab = $scope.tabsData[idx];\n //tab.query = window.editor.getValue();\n $scope.saveQueryToLocal(tab);\n return tab;\n }\n\n function addNewTab(callback, tabName, savedQuery) {\n }\n\n function loadTab() {\n $scope.tabsData = [$scope.currentQuery];\n\n const tab = $scope.currentQuery;\n\n if ($scope.currentQuery.query === null || $scope.currentQuery.query === '') {\n // hack for YASQE bug\n window.editor.setValue(' ');\n } else {\n window.editor.setValue($scope.currentQuery.query || ' ');\n }\n\n $timeout(function () {\n $scope.currentTabConfig = {};\n $scope.currentTabConfig.queryType = tab.queryType;\n $scope.currentTabConfig.resultsCount = tab.resultsCount;\n\n $scope.currentTabConfig.offset = tab.offset;\n $scope.currentTabConfig.allResultsCount = tab.allResultsCount;\n $scope.currentTabConfig.page = tab.page;\n $scope.currentTabConfig.pageSize = tab.pageSize;\n\n $scope.currentTabConfig.timeFinished = tab.timeFinished;\n $scope.currentTabConfig.timeTook = tab.timeTook;\n $scope.currentTabConfig.sizeDelta = tab.sizeDelta;\n $scope.$apply();\n }, 0);\n\n //Remove paddign of yasr so it will be aligned with sparql editor\n $('#yasr').css('padding', '0');\n }\n\n function getQueryID(element) {\n return $(element).attr('data-id');\n }\n\n $scope.$on('tabAction', function (e, tabEvent) {\n if (tabEvent.relatedTarget) {\n $scope.saveTab(getQueryID(tabEvent.relatedTarget));\n }\n $scope.loadTab(getQueryID(tabEvent.target));\n });\n\n $scope.$on('deleteAllexeptSelected', function (e, tabs) {\n $scope.tabsData = tabs;\n $scope.tabs = tabs;\n });\n // end of query tab operations\n\n $scope.currentQuery = angular.copy(defaultTabConfig);\n // $scope.state = {};\n $scope.showSampleQueries = false;\n $scope.savedQuery = {};\n $scope.sampleQueries = {};\n\n $scope.getResultsDescription = function () {\n };\n\n $scope.getUpdateDescription = function () {\n };\n\n $scope.getStaleWarningMessage = function () {\n };\n\n $scope.saveSearchQuery = function () {\n // Should validate that query is SELECT\n if (window.editor.getQueryType() !== 'SELECT') {\n toastr.error($translate.instant('similarity.index.select.queries.constraint'));\n return;\n }\n let data = {\n name: $scope.newIndex.name,\n changedQuery: $scope.currentQuery.query,\n isSearchQuery: $scope.page === 2\n };\n\n return SimilarityRestService.saveSearchQuery(JSON.stringify(data))\n .then(async function () {\n await Notifications.showToastMessageWithDelay($scope.page === 2 ? 'similarity.changed.search.query.msg' : 'similarity.changed.analogical.query.msg');\n $location.url('similarity');\n }, function (response) {\n toastr.error(getError(response), $translate.instant('similarity.change.query.error'));\n });\n };\n\n $scope.getCloseBtnMsg = function () {\n let operationType = $scope.editSearchQuery ? $translate.instant('similarity.query.edition.msg') : $translate.instant('similarity.index.creation.msg');\n return $translate.instant('similarity.close.btn.msg', {operation: operationType});\n }\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///./src/js/angular/utils/notifications.js","webpack:///./src/js/angular/similarity/controllers/create-index.controller.js"],"names":["Notifications","toastr","$translate","showToastMessageWithDelay","message","Promise","r","success","instant","setTimeout","angular","module","factory","$inject","CreateSimilarityIdxCtrl","$scope","$modal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","indexType","search","type","undefined","startsWith","viewType","newIndex","info","page","defaultTabConfig","id","name","query","inference","sameAs","initForViewType","indexNameFromLocation","editSearchQuery","options","searchQueries","searchQuery","analogicalQuery","currentQuery","notoolbarInference","notoolbarSameAs","window","editor","setQuery","allSamples","samples","stopList","analyzer","isLiteralIndex","getAndRemoveOption","getIndexes","data","literalIndexes","concat","filter","idx","status","map","inputIndex","desiredIdx","j","length","error","msg","getError","filenamePattern","RegExp","validateIndex","invalidIndexName","saveQueries","test","getQueryType","appendOption","option","value","key","optArr","split","i","join","saveQueryToLocal","currentQueryTab","setLoader","isRunning","progressMessage","extraMessage","yasrInnerContainer","element","document","getElementById","queryIsRunning","queryStartTime","Date","now","countTimeouted","addClass","removeClass","$$phase","$apply","fixSizesOnHorizontalViewModeSwitch","verticalViewParam","visibleWindowHeight","innerHeight","documentElement","clientHeight","body","verticalView","orientationViewMode","viewMode","newHeight","querySelector","getBoundingClientRect","style","height","noPadding","minHeight","paddingRight","paddingLeft","timer","$on","cancel","yasr","container","resize","showHideEditor","selectTab","$","tab","runQuery","changePage","explain","executedQueryTab","warning","getQueryMode","explainRequested","currentTabConfig","resultsCount","resetCurrentTabConfig","getNamespaces","getRepositoryNamespaces","usedPrefixes","results","bindings","forEach","e","prefix","namespace","namespaces","repositoryError","finally","addKnownPrefixes","JSON","stringify","getValue","isDefined","setValue","getExistingTabId","existingTabId","tabsData","item","loadTab","queryType","offset","allResultsCount","pageSize","timeFinished","timeTook","sizeDelta","css","getQueryID","attr","getSearchQueries","getSamples","selectQuery","infer","tabs","copy","$watch","helpHidden","get","HIDE_SIMILARITY_HELP","toggleHelp","set","viewQuery","getQuery","indexName","indexOptions","indexStopList","queryInference","querySameAs","indexAnalyzer","open","templateUrl","controller","resolve","isInvalidIndexName","isEmptyIndexName","trim","goToPage","showEditor","notoolbar","createIndex","index","err","url","xhr","abort","showPreview","outputType","queryExists","saveTab","findTabIndexByID","addNewTab","callback","tabName","savedQuery","changePagination","toggleSampleQueries","querySelected","tabId","getLoaderMessage","timeSeconds","timeHuman","getHumanReadableSeconds","changeViewMode","tabID","remove","focusQueryEditor","find","is","focus","getActiveRepository","on","$watchCollection","tabEvent","relatedTarget","target","showSampleQueries","sampleQueries","getResultsDescription","getUpdateDescription","getStaleWarningMessage","saveSearchQuery","changedQuery","isSearchQuery","then","async","response","getCloseBtnMsg","operationType","operation"],"mappings":"+EAMA,SAASA,EAAcC,EAAQC,GAC3B,MAAO,CACHC,0BASJ,SAAmCC,GAC/B,OAAO,IAAIC,QAASC,IAChBL,EAAOM,QAAQL,EAAWM,QAAQJ,IAClCK,WAAWH,EAAG,SApB1BI,QACKC,OAAO,wCAAyC,IAChDC,QAAQ,gBAAiBZ,GAE9BA,EAAca,QAAU,CAAC,SAAU,e,gCCJnC,kBAYA,SAASC,EAAwBC,EAAQd,EAAQe,EAAQC,EAAUC,EAAuBC,EAAmBC,EAAWC,EAAarB,EAAesB,EAA8BC,EAAqBC,EAAQtB,GAE3M,MAAMuB,EAAYL,EAAUM,SAASC,UACnBC,IAAdH,GAA2BA,EAAUI,WAAW,QAChDd,EAAOe,SAAW,OAElBf,EAAOe,SAAWL,EAKtBV,EAAOgB,SAAW,GAElBhB,EAAOiB,KAAOX,EACdN,EAAOkB,KAAO,EAEd,MAAMC,EAAmB,CACrBC,GAAI,IACJC,KAAM,GACNC,MAAO,GACPC,WAAW,EACXC,QAAQ,GAcZ,MAAMC,EAAkB,WAXF,IAAUC,EAwB5B,GAZA1B,EAAO2B,gBAAkBtB,EAAUM,SAASgB,g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CAGpC,IAAIoD,EAAO,CACPxB,KAAMrB,EAAOgB,SAASK,KACtBwN,aAAc7O,EAAOgC,aAAaV,MAClCwN,cAA+B,IAAhB9O,EAAOkB,MAG1B,OAAOf,EAAsByO,gBAAgB3F,KAAKC,UAAUrG,IACvDkM,MAAKC,uBACI/P,EAAcG,0BAA0C,IAAhBY,EAAOkB,KAAa,sCAAwC,2CAC1Gb,EAAUiM,IAAI,iBACf,SAAU2C,GACT/P,EAAOsE,MAAME,SAASuL,GAAW9P,EAAWM,QAAQ,sCAIhEO,EAAOkP,eAAiB,WACpB,IAAIC,EAAgBnP,EAAO2B,gBAAkBxC,EAAWM,QAAQ,gCAAkCN,EAAWM,QAAQ,iCACrH,OAAON,EAAWM,QAAQ,2BAA4B,CAAC2P,UAAWD,KAvvB1ExP,QACKC,OAAO,kDAAmD,CACvD,wCACA,gDAEH+L,WAAW,0BAA2B5L,GAE3CA,EAAwBD,QAAU,CAAC,SAAU,SAAU,SAAU,WAAY,wBAAyB,oBAAqB,YAAa,cAAe,gBAAiB,+BAAgC,sBAAuB,SAAU","file":"43.f76be157f75bc7b3ea68.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.utils.notifications', [])\n .factory('Notifications', Notifications);\n\nNotifications.$inject = ['toastr', '$translate'];\n\nfunction Notifications(toastr, $translate) {\n return {\n showToastMessageWithDelay\n };\n\n /**\n * This method will show message with tiny delay and only after completion\n * of latter redirection to \"graphs-visualizations\" page will happen.\n * @param {string} message The message to be displayed.\n * @return {Promise<any>}\n */\n function showToastMessageWithDelay(message) {\n return new Promise((r) => {\n toastr.success($translate.instant(message));\n setTimeout(r, 200);\n });\n }\n}\n","import 'angular/utils/notifications';\nimport 'angular/utils/local-storage-adapter';\n\nangular\n .module('graphdb.framework.similarity.controllers.create', [\n 'graphdb.framework.utils.notifications',\n 'graphdb.framework.utils.localstorageadapter'\n ])\n .controller('CreateSimilarityIdxCtrl', CreateSimilarityIdxCtrl);\n\nCreateSimilarityIdxCtrl.$inject = ['$scope', 'toastr', '$modal', '$timeout', 'SimilarityRestService', 'SparqlRestService', '$location', 'productInfo', 'Notifications', 'RDF4JRepositoriesRestService', 'LocalStorageAdapter', 'LSKeys', '$translate'];\n\nfunction CreateSimilarityIdxCtrl($scope, toastr, $modal, $timeout, SimilarityRestService, SparqlRestService, $location, productInfo, Notifications, RDF4JRepositoriesRestService, LocalStorageAdapter, LSKeys, $translate) {\n\n const indexType = $location.search().type;\n if (indexType === undefined || indexType.startsWith('text')) {\n $scope.viewType = 'text';\n } else {\n $scope.viewType = indexType;\n }\n\n const textDefaultOptions = '-termweight idf';\n const predDefaultOptions = '';\n $scope.newIndex = {};\n\n $scope.info = productInfo;\n $scope.page = 1;\n\n const defaultTabConfig = {\n id: '1',\n name: '',\n query: '',\n inference: true,\n sameAs: true\n };\n\n let getNewIndexName = function (indexNameFromLocation) {\n if (indexNameFromLocation) {\n if ($scope.page !== 1) {\n return indexNameFromLocation;\n } else {\n return 'Copy_of_' + indexNameFromLocation;\n }\n }\n return '';\n };\n\n const initForViewType = function () {\n $scope.editSearchQuery = $location.search().editSearchQuery;\n $scope.page = $scope.editSearchQuery ? 2 : 1;\n $scope.newIndex.name = getNewIndexName($location.search().name);\n $scope.newIndex.options = ($location.search().options ? $location.search().options : ($scope.viewType === \"text\") ? textDefaultOptions : predDefaultOptions);\n\n if ($scope.searchQueries) {\n $scope.newIndex.searchQuery = $location.search().searchQuery ? $location.search().searchQuery : $scope.searchQueries[$scope.viewType];\n if ($scope.viewType === 'predication') {\n $scope.newIndex.analogicalQuery = $location.search().analogicalQuery ? $location.search().analogicalQuery : $scope.searchQueries['analogical'];\n }\n }\n\n if ($scope.editSearchQuery) {\n // Default will be opened search query tab for edition\n $scope.currentQuery.query = $scope.newIndex.searchQuery;\n $scope.notoolbarInference = true;\n $scope.notoolbarSameAs = true;\n if (window.editor) {\n $scope.setQuery($scope.newIndex.searchQuery);\n }\n } else {\n if ($scope.viewType === 'text' && $scope.allSamples) {\n $scope.samples = $scope.allSamples['text'];\n $scope.newIndex.stopList = ($location.search().stopList ? $location.search().stopList : undefined);\n $scope.newIndex.analyzer = ($location.search().analyzer ? $location.search().analyzer : 'org.apache.lucene.analysis.en.EnglishAnalyzer');\n const isLiteralIndex = getAndRemoveOption('-literal_index');\n if (isLiteralIndex !== undefined) {\n $scope.newIndex.isLiteralIndex = isLiteralIndex;\n }\n if (window.editor) {\n $scope.setQuery($scope.samples['literals']);\n }\n }\n if ($scope.viewType === 'predication' && $scope.allSamples) {\n SimilarityRestService.getIndexes()\n .success(function (data) {\n $scope.literalIndexes = ['no-index'].concat(data\n .filter(function (idx) {\n return idx.type === 'textLiteral' && (idx.status === 'BUILT' || idx.status === 'OUTDATED')\n })\n .map(function (idx) {\n return idx.name;\n }));\n\n if ($scope.newIndex.inputIndex === undefined) {\n const desiredIdx = getAndRemoveOption('-input_index');\n if (desiredIdx !== undefined) {\n for (let j = 0; j < $scope.literalIndexes.length; j++) {\n if (desiredIdx === $scope.literalIndexes[j]) {\n $scope.newIndex.inputIndex = $scope.literalIndexes[j];\n }\n }\n }\n }\n if ($scope.newIndex.inputIndex === undefined) {\n $scope.newIndex.inputIndex = $scope.literalIndexes[0];\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.indexes.error'));\n });\n\n $scope.samples = $scope.allSamples['predication'];\n if (window.editor) {\n $scope.setQuery($scope.samples['predication']);\n }\n }\n }\n };\n\n const filenamePattern = new RegExp('^[a-zA-Z0-9-_]+$');\n\n const validateIndex = function () {\n $scope.invalidIndexName = false;\n $scope.saveQueries();\n if (!$scope.newIndex.name) {\n $scope.invalidIndexName = $translate.instant('similarity.empty.index.name.error');\n return false;\n }\n if (!filenamePattern.test($scope.newIndex.name)) {\n $scope.invalidIndexName = $translate.instant('similarity.index.name.constraint');\n return false;\n }\n\n if (!$scope.newIndex.query) {\n toastr.error($translate.instant('similarity.empty.select.query.error'));\n return false;\n }\n\n if (!$scope.newIndex.searchQuery) {\n toastr.error($translate.instant('similarity.empty.search.query.error'));\n return false;\n }\n\n if ($scope.viewType === 'predication' && !$scope.newIndex.analogicalQuery) {\n toastr.error($translate.instant('similarity.empty.analogical.query.error'));\n return false;\n }\n\n if (window.editor.getQueryType() !== 'SELECT') {\n toastr.error($translate.instant('similarity.index.select.queries.constraint'));\n return;\n }\n\n return true;\n };\n\n const appendOption = function (option, value) {\n $scope.newIndex.options = $scope.newIndex.options + ($scope.newIndex.options === '' ? '' : ' ') + option + ' ' + value;\n };\n\n SimilarityRestService.getSearchQueries().success(function (data) {\n $scope.searchQueries = data;\n SimilarityRestService.getSamples().success(function (samples) {\n defaultTabConfig.query = $location.search().selectQuery ? $location.search().selectQuery : samples['text']['literals'];\n defaultTabConfig.inference = !($location.search().infer === 'false');\n defaultTabConfig.sameAs = !($location.search().sameAs === 'false');\n $scope.tabsData = $scope.tabs = [defaultTabConfig];\n $scope.currentQuery = angular.copy(defaultTabConfig);\n $scope.allSamples = samples;\n initForViewType();\n });\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.search.queries.error'));\n });\n\n $scope.$watch('viewType', function () {\n initForViewType();\n });\n\n $scope.helpHidden = LocalStorageAdapter.get(LSKeys.HIDE_SIMILARITY_HELP) === 1;\n $scope.toggleHelp = function (value) {\n if (value === undefined) {\n value = LocalStorageAdapter.get(LSKeys.HIDE_SIMILARITY_HELP);\n }\n if (value !== 1) {\n LocalStorageAdapter.set(LSKeys.HIDE_SIMILARITY_HELP, 1);\n $scope.helpHidden = true;\n } else {\n LocalStorageAdapter.set(LSKeys.HIDE_SIMILARITY_HELP, 0);\n $scope.helpHidden = false;\n }\n };\n\n $scope.viewQuery = function () {\n if (!validateIndex()) {\n return;\n }\n\n SimilarityRestService.getQuery({\n indexName: $scope.newIndex.name,\n indexOptions: $scope.newIndex.options,\n query: $scope.currentQuery.query,\n indexStopList: $scope.newIndex.stopList,\n queryInference: $scope.currentQuery.inference,\n querySameAs: $scope.currentQuery.sameAs,\n viewType: $scope.viewType,\n indexAnalyzer: $scope.newIndex.analyzer\n }).success(function (query) {\n if (query) {\n $modal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function () {\n return query;\n }\n }\n });\n }\n });\n };\n\n $scope.$watch('newIndex.name', function () {\n $scope.isInvalidIndexName = false;\n $scope.isEmptyIndexName = false;\n });\n\n $scope.saveQueries = function () {\n // save the current query\n const query = window.editor.getValue().trim();\n if ($scope.page === 1) {\n $scope.newIndex.query = query;\n } else if ($scope.page === 2) {\n $scope.newIndex.searchQuery = query;\n } else if ($scope.page === 3) {\n $scope.newIndex.analogicalQuery = query;\n }\n };\n\n $scope.goToPage = function (page) {\n // ugly fix for GDB-3099\n if (page !== 1 && $scope.viewMode !== 'yasr') {\n $scope.showEditor();\n $timeout(function () {\n if (page === 2) {\n $scope.currentQuery.query = $scope.newIndex.searchQuery;\n }\n if (page === 3) {\n $scope.currentQuery.query = $scope.newIndex.analogicalQuery;\n }\n\n window.editor.setValue($scope.currentQuery.query || ' ');\n });\n }\n\n $scope.saveQueries();\n // get the saved query\n if (page === 1) {\n $scope.currentQuery.query = $scope.newIndex.query;\n } else if (page === 2) {\n $scope.currentQuery.query = $scope.newIndex.searchQuery;\n } else if (page === 3) {\n $scope.currentQuery.query = $scope.newIndex.analogicalQuery;\n }\n\n loadTab();\n $scope.notoolbar = page !== 1;\n\n $scope.page = page;\n };\n\n $scope.createIndex = function () {\n if (!validateIndex()) {\n return;\n }\n // Check existing indexes\n SimilarityRestService.getIndexes()\n .success(function (data) {\n data.forEach(function (index) {\n if (index.name === $scope.newIndex.name) {\n $scope.invalidIndexName = $translate.instant('similarity.existing.index.name.error');\n }\n });\n if (!$scope.invalidIndexName) {\n let indexType = $scope.viewType;\n\n if ($scope.literalIndexes !== undefined) {\n const inputIndex = $scope.newIndex.inputIndex;\n if (inputIndex !== $scope.literalIndexes[0]) {\n appendOption('-input_index', inputIndex);\n }\n }\n if ($scope.newIndex.isLiteralIndex === 'true') {\n appendOption('-literal_index', 'true');\n indexType = 'textLiteral';\n }\n\n SimilarityRestService.createIndex('POST',\n $scope.newIndex.name,\n $scope.newIndex.options,\n $scope.newIndex.query,\n $scope.newIndex.searchQuery,\n $scope.newIndex.analogicalQuery,\n $scope.newIndex.stopList,\n $scope.currentQuery.inference,\n $scope.currentQuery.sameAs,\n indexType,\n $scope.newIndex.analyzer)\n .error(function (err) {\n toastr.error(getError(err), $translate.instant('similarity.create.index.error'));\n });\n $location.url('similarity');\n }\n\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.indexes.error'));\n });\n };\n\n // Called when user clicks on a sample query\n $scope.setQuery = function (query) {\n // Hack for YASQE bug\n window.editor.setValue(query ? query : ' ');\n };\n\n // TODO don't copy paste each time, this is the same as in the graph config\n // DOWN HERE WE KEEP EVERYTHING PURELY QUERY EDITOR (MOSTLY BORROWED FROM query-editor.controller.js)\n\n $scope.showEditor = function () {\n if (window.editor.xhr) {\n window.editor.xhr.abort();\n }\n $scope.viewMode = 'yasr';\n };\n\n $scope.showPreview = function () {\n // For some reason YASR gets confused and sets this to rawResponse\n // if we execute a CONSTRUCT and then a SELECT. This makes sure it's always table.\n $scope.currentQuery.outputType = 'table';\n $scope.runQuery();\n };\n\n $scope.resetCurrentTabConfig = function () {\n $scope.currentTabConfig = {\n pageSize: 100, // page limit 100 as this is only used for preview\n page: 1,\n allResultsCount: 0,\n resultsCount: 0\n };\n };\n\n $scope.queryExists = false;\n\n $scope.resetCurrentTabConfig();\n\n $scope.tabsData = $scope.tabs = [defaultTabConfig];\n\n // query tab operations\n $scope.saveTab = saveTab;\n $scope.loadTab = loadTab;\n $scope.addNewTab = addNewTab;\n\n // query operations\n $scope.runQuery = runQuery;\n $scope.getNamespaces = getNamespaces;\n $scope.changePagination = changePagination;\n $scope.toggleSampleQueries = toggleSampleQueries;\n $scope.addKnownPrefixes = addKnownPrefixes;\n $scope.getExistingTabId = getExistingTabId;\n $scope.querySelected = querySelected;\n $scope.saveQueryToLocal = saveQueryToLocal;\n\n $scope.setLoader = setLoader;\n $scope.getLoaderMessage = getLoaderMessage;\n\n // query editor and results orientation\n $scope.fixSizesOnHorizontalViewModeSwitch = fixSizesOnHorizontalViewModeSwitch;\n $scope.changeViewMode = changeViewMode;\n $scope.showHideEditor = showHideEditor;\n $scope.focusQueryEditor = focusQueryEditor;\n $scope.orientationViewMode = true;\n\n // start of repository actions\n $scope.getActiveRepository();\n\n function getAndRemoveOption(key) {\n const optArr = $scope.newIndex.options.split(' ');\n for (let i = 0; i < optArr.length; i++) {\n if (optArr[i] === key && i + 1 < optArr.length) {\n const value = optArr[i + 1];\n\n delete optArr[i];\n delete optArr[i + 1];\n $scope.newIndex.options = optArr.join(' ');\n\n return value;\n }\n }\n return undefined;\n }\n\n function saveQueryToLocal(currentQueryTab) {\n }\n\n function setLoader(isRunning, progressMessage, extraMessage) {\n const yasrInnerContainer = angular.element(document.getElementById('yasr-inner'));\n $scope.queryIsRunning = isRunning;\n if (isRunning) {\n $scope.queryStartTime = Date.now();\n $scope.countTimeouted = false;\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n yasrInnerContainer.addClass('hide');\n } else {\n $scope.progressMessage = '';\n $scope.extraMessage = '';\n yasrInnerContainer.removeClass('hide');\n }\n // We might call this from angular or outside angular so take care of applying the scope.\n if ($scope.$$phase === null) {\n $scope.$apply();\n }\n }\n\n function getLoaderMessage() {\n const timeSeconds = (Date.now() - $scope.queryStartTime) / 1000;\n const timeHuman = $scope.getHumanReadableSeconds(timeSeconds);\n let message = '';\n\n if ($scope.progressMessage) {\n message = $scope.progressMessage + '... ' + timeHuman;\n } else {\n message = $translate.instant('common.running.operation', {timeHuman: timeHuman});\n }\n if ($scope.extraMessage && timeSeconds > 10) {\n message += '\\n' + $scope.extraMessage;\n }\n\n return message;\n }\n\n // start of query editor results orientation operations\n function fixSizesOnHorizontalViewModeSwitch(verticalViewParam) {\n function visibleWindowHeight() {\n return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;\n }\n\n const verticalView = verticalViewParam;\n if (!$scope.orientationViewMode) {\n $scope.noPadding = {paddingRight: 15, paddingLeft: 0};\n\n // window.editor is undefined if no repo is selected\n if (window.editor && document.querySelector('.CodeMirror-wrap')) {\n let newHeight = visibleWindowHeight() - (document.querySelector('.CodeMirror-wrap').getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector('.CodeMirror-wrap').style.height = newHeight + 'px';\n document.getElementById('yasr').style.minHeight = newHeight + 'px';\n //window.editor.refresh();\n } else {\n let timer;\n if (verticalView) {\n timer = $timeout(function () {\n $scope.fixSizesOnHorizontalViewModeSwitch(verticalView);\n }, 100);\n } else {\n timer = $timeout($scope.fixSizesOnHorizontalViewModeSwitch, 100);\n }\n\n $scope.$on('$destroy', function () {\n $timeout.cancel(timer);\n });\n }\n } else {\n if ($scope.viewMode === 'yasr') {\n let newHeight = visibleWindowHeight() - (document.querySelector('.CodeMirror-wrap').getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector('.CodeMirror-wrap').style.height = newHeight + 'px';\n } else {\n $scope.noPadding = {};\n document.querySelector('.CodeMirror-wrap').style.height = '';\n }\n document.getElementById('yasr').style.minHeight = '';\n }\n if (window.yasr && window.yasr.container) {\n $timeout(function () {\n window.yasr.container.resize();\n }, 100);\n }\n }\n\n if (!$scope.orientationViewMode) {\n showHideEditor();\n }\n\n function changeViewMode(tabID) {\n $scope.viewMode = 'none';\n $scope.orientationViewMode = !$scope.orientationViewMode;\n fixSizesOnHorizontalViewModeSwitch();\n $('.dataTables_filter').remove();\n $('.resultsTable').remove();\n $timeout(function () {\n loadTab();\n selectTab(tabID);\n }, 100);\n }\n\n function showHideEditor() {\n fixSizesOnHorizontalViewModeSwitch(true);\n }\n\n function focusQueryEditor() {\n if (!angular.element(document).find('.editable-input').is(':focus')) {\n angular.element(document).find('.CodeMirror textarea:first-child').focus();\n }\n }\n\n // end of query editor results orientation operations\n\n function selectTab(id) {\n $timeout(function () {\n $('a[data-id = \"' + id + '\"]').tab('show');\n }, 0);\n }\n\n // start of query operations\n function runQuery(changePage, explain) {\n $scope.executedQueryTab = $scope.currentQuery;\n if (window.editor.getQueryType() !== 'SELECT') {\n toastr.error($translate.instant('similarity.indexes.select.queries.constraint'));\n return;\n }\n if (explain && window.editor.getQueryType() !== 'SELECT') {\n toastr.warning($translate.instant('similarity.explain.select.queries.constraint'));\n return;\n }\n\n if (window.editor.getQueryMode() === 'update') {\n toastr.warning($translate.instant('cannot.execute.update.error'));\n return;\n }\n\n $scope.explainRequested = explain;\n if (!$scope.queryIsRunning) {\n if (changePage) {\n $scope.currentTabConfig.resultsCount = 0;\n } else {\n $scope.resetCurrentTabConfig();\n }\n\n // Hides the editor and shows the yasr results\n $scope.viewMode = 'editor';\n if ($scope.orientationViewMode) {\n $scope.fixSizesOnHorizontalViewModeSwitch();\n }\n\n setLoader(true, $translate.instant('evaluating.query.msg'));\n window.editor.query();\n }\n }\n\n // FIXME: this is copy-pasted in graphs-config.controller.js and query-editor.controller.js. Find a way to avoid duplications\n function getNamespaces() {\n // Signals the namespaces are to be fetched => loader will be shown\n setLoader(true, $translate.instant('common.refreshing.namespaces'), $translate.instant('common.extra.message'));\n RDF4JRepositoriesRestService.getRepositoryNamespaces()\n .success(function (data) {\n const usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.namespaces = usedPrefixes;\n })\n .error(function (data) {\n $scope.repositoryError = getError(data);\n })\n .finally(function () {\n // Signals namespaces were fetched => loader will be hidden\n setLoader(false);\n });\n }\n\n function changePagination() {\n runQuery(true, $scope.explainRequested);\n }\n\n if ($scope.getActiveRepository()) {\n getNamespaces();\n }\n\n $scope.$on('$destroy', function () {\n window.editor = null;\n window.yasr = null;\n });\n\n function toggleSampleQueries() {\n }\n\n // Add known prefixes\n function addKnownPrefixes() {\n SparqlRestService.addKnownPrefixes(JSON.stringify(window.editor.getValue()))\n .success(function (data) {\n if (angular.isDefined(window.editor) && angular.isDefined(data) && data !== window.editor.getValue()) {\n window.editor.setValue(data);\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.add.known.prefixes.error'));\n return true;\n });\n }\n\n $('textarea').on('paste', function () {\n $timeout(function () {\n addKnownPrefixes();\n }, 0);\n });\n\n function querySelected(query) {\n const tabId = getExistingTabId(query);\n $scope.toggleSampleQueries();\n if (!angular.isDefined(tabId)) {\n $scope.addNewTab(null, query.name, query.body);\n } else {\n selectTab(tabId);\n }\n }\n\n function getExistingTabId(query) {\n let existingTabId = undefined;\n angular.forEach($scope.tabsData, function (item) {\n if (item.name === query.name && item.query === query.body) {\n existingTabId = item.id;\n return item;\n }\n });\n\n return existingTabId;\n }\n\n\n // end of query operations\n\n // start of query tab operations\n function findTabIndexByID(id) {\n for (let i = 0; i < $scope.tabsData.length; i++) {\n const tab = $scope.tabsData[i];\n if (tab.id === id) {\n return i;\n }\n }\n }\n\n $scope.$watchCollection('[currentQuery.inference, currentQuery.sameAs]', function () {\n saveQueryToLocal($scope.currentQuery);\n });\n\n function saveTab(id) {\n const idx = findTabIndexByID(id);\n // Tab was deleted, don't try to save it's state\n if (idx === undefined) {\n return {};\n }\n const tab = $scope.tabsData[idx];\n //tab.query = window.editor.getValue();\n $scope.saveQueryToLocal(tab);\n return tab;\n }\n\n function addNewTab(callback, tabName, savedQuery) {\n }\n\n function loadTab() {\n $scope.tabsData = [$scope.currentQuery];\n\n const tab = $scope.currentQuery;\n\n if ($scope.currentQuery.query === null || $scope.currentQuery.query === '') {\n // hack for YASQE bug\n window.editor.setValue(' ');\n } else {\n window.editor.setValue($scope.currentQuery.query || ' ');\n }\n\n $timeout(function () {\n $scope.currentTabConfig = {};\n $scope.currentTabConfig.queryType = tab.queryType;\n $scope.currentTabConfig.resultsCount = tab.resultsCount;\n\n $scope.currentTabConfig.offset = tab.offset;\n $scope.currentTabConfig.allResultsCount = tab.allResultsCount;\n $scope.currentTabConfig.page = tab.page;\n $scope.currentTabConfig.pageSize = tab.pageSize;\n\n $scope.currentTabConfig.timeFinished = tab.timeFinished;\n $scope.currentTabConfig.timeTook = tab.timeTook;\n $scope.currentTabConfig.sizeDelta = tab.sizeDelta;\n $scope.$apply();\n }, 0);\n\n //Remove paddign of yasr so it will be aligned with sparql editor\n $('#yasr').css('padding', '0');\n }\n\n function getQueryID(element) {\n return $(element).attr('data-id');\n }\n\n $scope.$on('tabAction', function (e, tabEvent) {\n if (tabEvent.relatedTarget) {\n $scope.saveTab(getQueryID(tabEvent.relatedTarget));\n }\n $scope.loadTab(getQueryID(tabEvent.target));\n });\n\n $scope.$on('deleteAllexeptSelected', function (e, tabs) {\n $scope.tabsData = tabs;\n $scope.tabs = tabs;\n });\n // end of query tab operations\n\n $scope.currentQuery = angular.copy(defaultTabConfig);\n // $scope.state = {};\n $scope.showSampleQueries = false;\n $scope.savedQuery = {};\n $scope.sampleQueries = {};\n\n $scope.getResultsDescription = function () {\n };\n\n $scope.getUpdateDescription = function () {\n };\n\n $scope.getStaleWarningMessage = function () {\n };\n\n $scope.saveSearchQuery = function () {\n // Should validate that query is SELECT\n if (window.editor.getQueryType() !== 'SELECT') {\n toastr.error($translate.instant('similarity.index.select.queries.constraint'));\n return;\n }\n let data = {\n name: $scope.newIndex.name,\n changedQuery: $scope.currentQuery.query,\n isSearchQuery: $scope.page === 2\n };\n\n return SimilarityRestService.saveSearchQuery(JSON.stringify(data))\n .then(async function () {\n await Notifications.showToastMessageWithDelay($scope.page === 2 ? 'similarity.changed.search.query.msg' : 'similarity.changed.analogical.query.msg');\n $location.url('similarity');\n }, function (response) {\n toastr.error(getError(response), $translate.instant('similarity.change.query.error'));\n });\n };\n\n $scope.getCloseBtnMsg = function () {\n let operationType = $scope.editSearchQuery ? $translate.instant('similarity.query.edition.msg') : $translate.instant('similarity.index.creation.msg');\n return $translate.instant('similarity.close.btn.msg', {operation: operationType});\n }\n}\n"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[44,122],{38:function(e,t){function r(e,t){return{showToastMessageWithDelay:function(r){return new Promise(n=>{e.success(t.instant(r)),setTimeout(n,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",r),r.$inject=["toastr","$translate"]},94:function(e,t,r){"use strict";r.r(t);r(4),r(10),r(14),r(38),r(13);var n=r(0);function a(e,t,r,n,a,i,s){e.pluginName="sparql-template",e.setPluginIsActive=function(t){e.pluginIsActive=t},e.getSparqlTemplates=function(){i.isLicenseValid()&&t.getActiveRepository()&&!t.isActiveRepoOntopType()&&!t.isActiveRepoFedXType()?r.getSparqlTemplates(t.getActiveRepository()).success((function(t){e.sparqlTemplateIds=t})).error((function(e){const t=getError(e);n.error(t,s.instant("sparql.template.get.templates.error"))})):e.sparqlTemplateIds=[]},e.$watch((function(){return t.getActiveRepository()}),(function(){e.getSparqlTemplates()})),e.deleteTemplate=function(i){a.openSimpleModal({title:s.instant("common.warning"),message:s.instant("sparql.template.delete.template.warning",{templateID:i}),warning:!0}).result.then((function(){r.deleteSparqlTemplate(i,t.getActiveRepository()).success((function(){n.success(i,s.instant("sparql.template.delete.template.success")),e.getSparqlTemplates()})).error((function(e){n.error(getError(e),s.instant("sparql.template.delete.template.failure",{templateID:i}))}))}))}}function i(e,t,r,a,i,s,o,c,u,l,p,m){const d=t.hash()||"";e.templateID=(t.search().templateID||"")+(d?"#"+d:""),e.title=(e.templateID?m.instant("edit"):m.instant("common.create.btn"))+" SPARQL Template",e.getNamespaces=function(){v(!0,m.instant("common.refreshing.namespaces"),m.instant("common.extra.message")),c.getRepositoryNamespaces().success((function(t){const r={};t.results.bindings.forEach((function(e){r[e.prefix.value]=e.namespace.value})),e.namespaces=r})).error((function(t){e.repositoryError=getError(t)})).finally((function(){v(!1),I()}))},e.setLoader=v,e.addKnownPrefixes=D,e.noPadding={paddingRight:0,paddingLeft:0},e.currentTabConfig={},e.orientationViewMode=!0,e.currentQuery={};let f=!1;e.$watch((function(){return a.getActiveRepository()}),(function(e,r){e!==r&&t.path("/sparql-templates")}));let g=null;e.goBack=function(){g=s((function(){i.history.back()}),1e3)};const y=e.$on("$locationChangeStart",(function(t){!function(t){e.currentQuery.isPristine||(confirm(m.instant("jdbc.warning.unsaved.changes"))?(window.removeEventListener("beforeunload",w),y(),s.cancel(g)):t.preventDefault())}(t)}));function w(t){e.currentQuery.isPristine||(t.returnValue=!0)}window.addEventListener("beforeunload",w),e.$on("$destroy",(function(e){window.removeEventListener("beforeunload",w),y(),s.cancel(g)}));const T={templateID:"",query:"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX ex: <http://example.com#>\nDELETE {\n ?subject ex:myPredicate ?oldValue .\n} INSERT {\n ?subject ex:myPredicate ?newValue .\n} WHERE {\n ?id rdf:type ex:MyType .\n ?subject ex:isRelatedTo ?id .\n}\n",inference:!0,sameAs:!0,isNewTemplate:!0,isPristine:!0};var q;function v(t,r,n){const a=angular.element(document.getElementById("yasr-inner"));e.queryIsRunning=t,t?(e.queryStartTime=Date.now(),e.countTimeouted=!1,e.progressMessage=r,e.extraMessage=n,a.addClass("hide")):(e.progressMessage="",e.extraMessage="",a.removeClass("hide")),null===e.$$phase&&e.$apply()}function I(){e.tabsData=[e.currentQuery];const t=e.currentQuery;e.currentQuery.query?window.editor.setValue(e.currentQuery.query):window.editor.setValue(" "),s((function(){e.currentTabConfig={},e.currentTabConfig.queryType=t.queryType,e.currentTabConfig.resultsCount=t.resultsCount,e.currentTabConfig.offset=t.offset,e.currentTabConfig.allResultsCount=t.allResultsCount,e.currentTabConfig.page=t.page,e.currentTabConfig.pageSize=t.pageSize,e.currentTabConfig.timeFinished=t.timeFinished,e.currentTabConfig.timeTook=t.timeTook,e.currentTabConfig.sizeDelta=t.sizeDelta,e.$apply()}),0),e.canWriteActiveRepo()||(window.editor.options.readOnly=!0)}function b(){e.tabsData=e.tabs=[T],e.currentQuery=angular.copy(T),window.editor&&(e.setQuery(e.currentQuery.query),I()),e.$watch((function(){return e.currentQuery.query}),(function(t,r){t!==r&&e.setDirty()}))}function D(){u.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(e){angular.isDefined(window.editor)&&angular.isDefined(e)&&e!==window.editor.getValue()&&window.editor.setValue(e)})).error((function(e){const t=getError(e);return r.error(t,m.instant("common.add.known.prefixes.error")),!0}))}function Q(){o.createSparqlTemplate(e.currentQuery,a.getActiveRepository()).success((function(){e.currentQuery.isPristine=!0,e.currentQuery.isNewTemplate=!1,r.success(e.currentQuery.templateID,m.instant("save.sparql.template.success.msg")),e.goBack()})).error((function(t){const n=getError(t);r.error(n,m.instant("save.sparql.template.failure.msg",{templateID:e.currentQuery.templateID}))}))}e.saveTab=function(){},e.setQuery=function(e){window.editor.setValue(e||" ")},e.templateID?(q=e.templateID,o.getSparqlTemplate(q,a.getActiveRepository()).success((function(e){T.query=e,T.templateID=q,T.isNewTemplate=!q,b()})).error((function(t){const n=getError(t);r.error(n,m.instant("sparql.template.get.template.error",{templateID:e.currentQuery.templateID})),e.repositoryError=n}))):b(),e.saveTemplate=function(){(function(){if(!window.editor||"update"!==window.editor.getQueryMode())return r.error(m.instant("sparql.template.query.constraint"),m.instant("jdbc.invalid.query")),!1;return!0})()&&(e.currentQuery.templateID?(e.isInvalidTemplateId=!l.isValidIri(e.currentQuery.templateID),e.isInvalidTemplateId||(e.currentQuery.isNewTemplate?o.getSparqlTemplates(a.getActiveRepository()).success((function(t){f=t.find(t=>t===e.currentQuery.templateID)})).error((function(e){const t=getError(e);r.error(t,m.instant("sparql.template.get.templates.error"))})).then(()=>{if(f){const t=Object(n.decodeHTML)(m.instant("sparql.template.existing.template.error",{templateID:e.currentQuery.templateID}));p.openSimpleModal({title:m.instant("common.confirm.save"),message:t,warning:!0}).result.then((function(){Q()}))}else Q()}):e.currentQuery.isPristine?e.goBack():o.updateSparqlTemplate(e.currentQuery,a.getActiveRepository()).success((function(){e.currentQuery.isPristine=!0,e.currentQuery.isNewTemplate=!1,r.success(e.currentQuery.templateID,m.instant("update.sparql.template.success.msg")),e.goBack()})).error((function(t){const n=getError(t);r.error(n,m.instant("save.sparql.template.failure.msg",{templateID:e.currentQuery.templateID}))})))):r.error(m.instant("sparql.template.iri.constraint")))},$("textarea").on("paste",(function(){s((function(){D()}),0)})),e.setDirty=function(){e.currentQuery.isPristine=!1}}angular.module("graphdb.framework.sparql-template.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.monitoring.service","toastr"],["graphdb.framework.utils.notifications"]).controller("SparqlTemplatesCtrl",a).controller("SparqlTemplateCreateCtrl",i),a.$inject=["$scope","$repositories","SparqlTemplatesRestService","toastr","ModalService","$licenseService","$translate"],i.$inject=["$scope","$location","toastr","$repositories","$window","$timeout","SparqlTemplatesRestService","RDF4JRepositoriesRestService","SparqlRestService","UriUtils","ModalService","$translate"]}}]);
|
|
2
|
+
//# sourceMappingURL=44.ccd45256fba55ce28d80.bundle.js.map
|
package/dist/{43.c67da41a52ba9b0eb508.bundle.js.map → 44.ccd45256fba55ce28d80.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/utils/notifications.js","webpack:///./src/js/angular/sparql-template/controllers.js"],"names":["Notifications","toastr","$translate","showToastMessageWithDelay","message","Promise","r","success","instant","setTimeout","angular","module","factory","$inject","SparqlTemplatesCtrl","$scope","$repositories","SparqlTemplatesRestService","ModalService","$licenseService","pluginName","setPluginIsActive","isPluginActive","pluginIsActive","getSparqlTemplates","isLicenseValid","getActiveRepository","isActiveRepoOntopType","isActiveRepoFedXType","data","sparqlTemplateIds","error","msg","getError","$watch","deleteTemplate","templateID","openSimpleModal","title","warning","result","then","deleteSparqlTemplate","e","SparqlTemplateCreateCtrl","$location","$window","$timeout","RDF4JRepositoriesRestService","SparqlRestService","UriUtils","hash","search","getNamespaces","setLoader","getRepositoryNamespaces","usedPrefixes","results","bindings","forEach","prefix","value","namespace","namespaces","repositoryError","finally","loadTab","addKnownPrefixes","noPadding","paddingRight","paddingLeft","currentTabConfig","orientationViewMode","currentQuery","templateExist","newValue","oldValue","path","timer","goBack","history","back","locationChangeListener","$on","event","isPristine","confirm","window","removeEventListener","showBeforeunloadMessage","cancel","preventDefault","confirmExit","returnValue","addEventListener","defaultTabConfig","query","inference","sameAs","isNewTemplate","isRunning","progressMessage","extraMessage","yasrInnerContainer","element","document","getElementById","queryIsRunning","queryStartTime","Date","now","countTimeouted","addClass","removeClass","$$phase","$apply","tabsData","tab","editor","setValue","queryType","resultsCount","offset","allResultsCount","page","pageSize","timeFinished","timeTook","sizeDelta","canWriteActiveRepo","options","readOnly","setQueryFromTabConfig","tabs","copy","setQuery","setDirty","JSON","stringify","getValue","isDefined","saveNewTemplate","createSparqlTemplate","saveTab","getSparqlTemplate","templateContent","saveTemplate","getQueryMode","validateQuery","isInvalidTemplateId","isValidIri","find","templateId","modalMsg","updateSparqlTemplate","$","on","controller"],"mappings":"+EAMA,SAASA,EAAcC,EAAQC,GAC3B,MAAO,CACHC,0BASJ,SAAmCC,GAC/B,OAAO,IAAIC,QAASC,IAChBL,EAAOM,QAAQL,EAAWM,QAAQJ,IAClCK,WAAWH,EAAG,SApB1BI,QACKC,OAAO,wCAAyC,IAChDC,QAAQ,gBAAiBZ,GAE9BA,EAAca,QAAU,CAAC,SAAU,e,gCCJnC,+CAsBA,SAASC,EAAoBC,EAAQC,EAAeC,EAA4BhB,EAAQiB,EAAcC,EAAiBjB,GAEnHa,EAAOK,WAAa,kBAEpBL,EAAOM,kBAAoB,SAAUC,GACjCP,EAAOQ,eAAiBD,GAG5BP,EAAOS,mBAAqB,WAGpBL,EAAgBM,kBAChBT,EAAcU,wBACNV,EAAcW,0BACVX,EAAcY,uBA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uB/I,GAClC+I,WAAW,2BAA4BjH,GAE5C9B,EAAoBD,QAAU,CAAC,SAAU,gBAAiB,6BAA8B,SAAU,eAAgB,kBAAmB,cAoDrI+B,EAAyB/B,QAAU,CAAC,SAAU,YAAa,SAAU,gBAAiB,UAAW,WAAY,6BAA8B,+BAAgC,oBAAqB,WAAY,eAAgB","file":"43.c67da41a52ba9b0eb508.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.utils.notifications', [])\n .factory('Notifications', Notifications);\n\nNotifications.$inject = ['toastr', '$translate'];\n\nfunction Notifications(toastr, $translate) {\n return {\n showToastMessageWithDelay\n };\n\n /**\n * This method will show message with tiny delay and only after completion\n * of latter redirection to \"graphs-visualizations\" page will happen.\n * @param {string} message The message to be displayed.\n * @return {Promise<any>}\n */\n function showToastMessageWithDelay(message) {\n return new Promise((r) => {\n toastr.success($translate.instant(message));\n setTimeout(r, 200);\n });\n }\n}\n","import 'angular/core/services';\nimport 'angular/core/services/repositories.service';\nimport 'angular/rest/monitoring.rest.service';\nimport 'angular/utils/notifications';\nimport 'angular/utils/uri-utils';\nimport {decodeHTML} from \"../../../app\";\n\nconst modules = [\n 'ui.bootstrap',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.rest.monitoring.service',\n 'toastr'\n];\n\nangular.module('graphdb.framework.sparql-template.controllers', modules, [\n 'graphdb.framework.utils.notifications'\n])\n .controller('SparqlTemplatesCtrl', SparqlTemplatesCtrl)\n .controller('SparqlTemplateCreateCtrl', SparqlTemplateCreateCtrl);\n\nSparqlTemplatesCtrl.$inject = ['$scope', '$repositories', 'SparqlTemplatesRestService', 'toastr', 'ModalService', '$licenseService', '$translate'];\n\nfunction SparqlTemplatesCtrl($scope, $repositories, SparqlTemplatesRestService, toastr, ModalService, $licenseService, $translate) {\n\n $scope.pluginName = 'sparql-template';\n\n $scope.setPluginIsActive = function (isPluginActive) {\n $scope.pluginIsActive = isPluginActive;\n }\n\n $scope.getSparqlTemplates = function () {\n // Only do this if there is an active repo that isn't an Ontop repo.\n // Ontop repos doesn't support update operations.\n if ($licenseService.isLicenseValid() &&\n $repositories.getActiveRepository()\n && !$repositories.isActiveRepoOntopType()\n && !$repositories.isActiveRepoFedXType()) {\n SparqlTemplatesRestService.getSparqlTemplates($repositories.getActiveRepository()).success(function (data) {\n $scope.sparqlTemplateIds = data;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('sparql.template.get.templates.error'));\n });\n } else {\n $scope.sparqlTemplateIds = [];\n }\n };\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, function () {\n $scope.getSparqlTemplates();\n });\n\n $scope.deleteTemplate = function (templateID) {\n ModalService.openSimpleModal({\n title: $translate.instant('common.warning'),\n message: $translate.instant('sparql.template.delete.template.warning', {templateID: templateID}),\n warning: true\n }).result\n .then(function () {\n SparqlTemplatesRestService.deleteSparqlTemplate(templateID, $repositories.getActiveRepository())\n .success(function () {\n toastr.success(templateID, $translate.instant('sparql.template.delete.template.success'));\n $scope.getSparqlTemplates();\n }).error(function (e) {\n toastr.error(getError(e), $translate.instant('sparql.template.delete.template.failure', {templateID: templateID}));\n });\n });\n };\n}\n\nSparqlTemplateCreateCtrl.$inject = ['$scope', '$location', 'toastr', '$repositories', '$window', '$timeout', 'SparqlTemplatesRestService', 'RDF4JRepositoriesRestService', 'SparqlRestService', 'UriUtils', 'ModalService', '$translate'];\n\nfunction SparqlTemplateCreateCtrl($scope, $location, toastr, $repositories, $window, $timeout, SparqlTemplatesRestService, RDF4JRepositoriesRestService, SparqlRestService, UriUtils, ModalService, $translate) {\n\n const hash = $location.hash() || '';\n $scope.templateID = ($location.search().templateID || '') + (hash ? (`#${hash}`) : '');\n $scope.title = ($scope.templateID ? $translate.instant('edit') : $translate.instant('common.create.btn')) + ' SPARQL Template';\n $scope.getNamespaces = getNamespaces;\n $scope.setLoader = setLoader;\n $scope.addKnownPrefixes = addKnownPrefixes;\n $scope.noPadding = {paddingRight: 0, paddingLeft: 0};\n $scope.currentTabConfig = {};\n // This property is obligatory in order to show YASQUE and YASR properly\n $scope.orientationViewMode = true;\n $scope.currentQuery = {};\n let templateExist = false;\n\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, function (newValue, oldValue) {\n if (newValue !== oldValue) {\n $location.path('/sparql-templates');\n }\n });\n\n let timer = null;\n $scope.goBack = function () {\n timer = $timeout(function () {\n $window.history.back();\n }, 1000);\n };\n\n const locationChangeListener = $scope.$on('$locationChangeStart', function (event) {\n confirmExit(event);\n });\n\n window.addEventListener('beforeunload', showBeforeunloadMessage);\n\n function showBeforeunloadMessage(event) {\n if (!$scope.currentQuery.isPristine) {\n event.returnValue = true;\n }\n }\n\n function confirmExit(event) {\n if (!$scope.currentQuery.isPristine) {\n if (!confirm($translate.instant('jdbc.warning.unsaved.changes'))) {\n event.preventDefault();\n } else {\n window.removeEventListener('beforeunload', showBeforeunloadMessage);\n locationChangeListener();\n $timeout.cancel(timer);\n }\n }\n }\n\n $scope.$on('$destroy', function (event) {\n window.removeEventListener('beforeunload', showBeforeunloadMessage);\n locationChangeListener();\n $timeout.cancel(timer);\n });\n\n const defaultTabConfig = {\n templateID: '',\n query: 'PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\\n' +\n 'PREFIX ex: <http://example.com#>\\n' +\n 'DELETE {\\n' +\n ' ?subject ex:myPredicate ?oldValue .\\n' +\n '} INSERT {\\n' +\n ' ?subject ex:myPredicate ?newValue .\\n' +\n '} WHERE {\\n' +\n ' ?id rdf:type ex:MyType .\\n' +\n ' ?subject ex:isRelatedTo ?id .\\n' +\n '}\\n',\n inference: true,\n sameAs: true,\n isNewTemplate: true,\n isPristine: true\n };\n\n $scope.saveTab = function () {\n // Should have this empty function in this view\n };\n\n // Called when user clicks on a sample query\n $scope.setQuery = function (query) {\n // Hack for YASQE bug\n window.editor.setValue(query ? query : ' ');\n };\n\n if ($scope.templateID) {\n getSparqlTemplate($scope.templateID);\n } else {\n setQueryFromTabConfig();\n }\n\n // FIXME: this is copy-pasted in graphs-config.controller.js and query-editor.controller.js. Find a way to avoid duplications\n function getNamespaces() {\n // Signals the namespaces are to be fetched => loader will be shown\n setLoader(true, $translate.instant('common.refreshing.namespaces'), $translate.instant('common.extra.message'));\n RDF4JRepositoriesRestService.getRepositoryNamespaces()\n .success(function (data) {\n const usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.namespaces = usedPrefixes;\n })\n .error(function (data) {\n $scope.repositoryError = getError(data);\n })\n .finally(function () {\n // Signals namespaces were fetched => loader will be hidden\n setLoader(false);\n loadTab();\n });\n }\n\n function setLoader(isRunning, progressMessage, extraMessage) {\n const yasrInnerContainer = angular.element(document.getElementById('yasr-inner'));\n $scope.queryIsRunning = isRunning;\n if (isRunning) {\n $scope.queryStartTime = Date.now();\n $scope.countTimeouted = false;\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n yasrInnerContainer.addClass('hide');\n } else {\n $scope.progressMessage = '';\n $scope.extraMessage = '';\n yasrInnerContainer.removeClass('hide');\n }\n\n // We might call this from angular or outside angular so take care of applying the scope.\n if ($scope.$$phase === null) {\n $scope.$apply();\n }\n }\n\n function loadTab() {\n $scope.tabsData = [$scope.currentQuery];\n\n const tab = $scope.currentQuery;\n\n if (!$scope.currentQuery.query) {\n // hack for YASQE bug\n window.editor.setValue(' ');\n } else {\n window.editor.setValue($scope.currentQuery.query);\n }\n\n $timeout(function () {\n $scope.currentTabConfig = {};\n $scope.currentTabConfig.queryType = tab.queryType;\n $scope.currentTabConfig.resultsCount = tab.resultsCount;\n\n $scope.currentTabConfig.offset = tab.offset;\n $scope.currentTabConfig.allResultsCount = tab.allResultsCount;\n $scope.currentTabConfig.page = tab.page;\n $scope.currentTabConfig.pageSize = tab.pageSize;\n\n $scope.currentTabConfig.timeFinished = tab.timeFinished;\n $scope.currentTabConfig.timeTook = tab.timeTook;\n $scope.currentTabConfig.sizeDelta = tab.sizeDelta;\n $scope.$apply();\n }, 0);\n\n if (!$scope.canWriteActiveRepo()) {\n window.editor.options.readOnly = true;\n }\n }\n\n function getSparqlTemplate(templateID) {\n SparqlTemplatesRestService.getSparqlTemplate(templateID, $repositories.getActiveRepository() ).success(function (templateContent) {\n defaultTabConfig.query = templateContent;\n defaultTabConfig.templateID = templateID;\n\n defaultTabConfig.isNewTemplate = !templateID;\n\n setQueryFromTabConfig();\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('sparql.template.get.template.error', {templateID: $scope.currentQuery.templateID}));\n $scope.repositoryError = msg;\n });\n }\n\n function setQueryFromTabConfig() {\n $scope.tabsData = $scope.tabs = [defaultTabConfig];\n $scope.currentQuery = angular.copy(defaultTabConfig);\n\n if (window.editor) {\n $scope.setQuery($scope.currentQuery.query);\n loadTab();\n }\n\n $scope.$watch(function () {\n return $scope.currentQuery.query;\n }, function (newValue, oldValue) {\n if (newValue !== oldValue) {\n $scope.setDirty();\n }\n });\n }\n\n $scope.saveTemplate = function () {\n if (!validateQuery()) {\n return;\n }\n\n if (!$scope.currentQuery.templateID) {\n toastr.error($translate.instant('sparql.template.iri.constraint'));\n return;\n } else {\n validateTemplateID();\n if ($scope.isInvalidTemplateId) {\n return;\n }\n }\n\n if ($scope.currentQuery.isNewTemplate) {\n checkIfTemplateExists()\n .then(() => {\n if (templateExist) {\n const modalMsg = decodeHTML($translate.instant('sparql.template.existing.template.error', {templateID: $scope.currentQuery.templateID}));\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.save'),\n message: modalMsg,\n warning: true\n }).result\n .then(function () {\n saveNewTemplate();\n });\n } else {\n saveNewTemplate();\n }\n });\n } else {\n if (!$scope.currentQuery.isPristine) {\n SparqlTemplatesRestService.updateSparqlTemplate($scope.currentQuery, $repositories.getActiveRepository()).success(function () {\n $scope.currentQuery.isPristine = true;\n $scope.currentQuery.isNewTemplate = false;\n toastr.success($scope.currentQuery.templateID, $translate.instant('update.sparql.template.success.msg'));\n $scope.goBack();\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('save.sparql.template.failure.msg', {templateID: $scope.currentQuery.templateID}));\n });\n } else {\n // No changes to template query, go back to\n $scope.goBack();\n }\n }\n };\n\n\n // Add known prefixes\n function addKnownPrefixes() {\n SparqlRestService.addKnownPrefixes(JSON.stringify(window.editor.getValue()))\n .success(function (data) {\n if (angular.isDefined(window.editor) && angular.isDefined(data) && data !== window.editor.getValue()) {\n window.editor.setValue(data);\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.add.known.prefixes.error'));\n return true;\n });\n }\n\n $('textarea').on('paste', function () {\n $timeout(function () {\n addKnownPrefixes();\n }, 0);\n });\n\n $scope.setDirty = function () {\n $scope.currentQuery.isPristine = false;\n };\n\n function hasValidQuery() {\n return window.editor && window.editor.getQueryMode() === 'update';\n }\n\n function validateQuery() {\n if (!hasValidQuery()) {\n toastr.error($translate.instant('sparql.template.query.constraint'), $translate.instant('jdbc.invalid.query'));\n return false;\n }\n\n return true;\n }\n\n function validateTemplateID() {\n $scope.isInvalidTemplateId = !UriUtils.isValidIri($scope.currentQuery.templateID);\n }\n\n function saveNewTemplate() {\n SparqlTemplatesRestService.createSparqlTemplate($scope.currentQuery, $repositories.getActiveRepository()).success(function () {\n $scope.currentQuery.isPristine = true;\n $scope.currentQuery.isNewTemplate = false;\n toastr.success($scope.currentQuery.templateID, $translate.instant('save.sparql.template.success.msg'));\n $scope.goBack();\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('save.sparql.template.failure.msg', {templateID: $scope.currentQuery.templateID}));\n });\n }\n\n function checkIfTemplateExists() {\n return SparqlTemplatesRestService\n .getSparqlTemplates($repositories.getActiveRepository())\n .success(function (data) {\n templateExist = data.find((templateId) => templateId === $scope.currentQuery.templateID);\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('sparql.template.get.templates.error'));\n });\n }\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///./src/js/angular/utils/notifications.js","webpack:///./src/js/angular/sparql-template/controllers.js"],"names":["Notifications","toastr","$translate","showToastMessageWithDelay","message","Promise","r","success","instant","setTimeout","angular","module","factory","$inject","SparqlTemplatesCtrl","$scope","$repositories","SparqlTemplatesRestService","ModalService","$licenseService","pluginName","setPluginIsActive","isPluginActive","pluginIsActive","getSparqlTemplates","isLicenseValid","getActiveRepository","isActiveRepoOntopType","isActiveRepoFedXType","data","sparqlTemplateIds","error","msg","getError","$watch","deleteTemplate","templateID","openSimpleModal","title","warning","result","then","deleteSparqlTemplate","e","SparqlTemplateCreateCtrl","$location","$window","$timeout","RDF4JRepositoriesRestService","SparqlRestService","UriUtils","hash","search","getNamespaces","setLoader","getRepositoryNamespaces","usedPrefixes","results","bindings","forEach","prefix","value","namespace","namespaces","repositoryError","finally","loadTab","addKnownPrefixes","noPadding","paddingRight","paddingLeft","currentTabConfig","orientationViewMode","currentQuery","templateExist","newValue","oldValue","path","timer","goBack","history","back","locationChangeListener","$on","event","isPristine","confirm","window","removeEventListener","showBeforeunloadMessage","cancel","preventDefault","confirmExit","returnValue","addEventListener","defaultTabConfig","query","inference","sameAs","isNewTemplate","isRunning","progressMessage","extraMessage","yasrInnerContainer","element","document","getElementById","queryIsRunning","queryStartTime","Date","now","countTimeouted","addClass","removeClass","$$phase","$apply","tabsData","tab","editor","setValue","queryType","resultsCount","offset","allResultsCount","page","pageSize","timeFinished","timeTook","sizeDelta","canWriteActiveRepo","options","readOnly","setQueryFromTabConfig","tabs","copy","setQuery","setDirty","JSON","stringify","getValue","isDefined","saveNewTemplate","createSparqlTemplate","saveTab","getSparqlTemplate","templateContent","saveTemplate","getQueryMode","validateQuery","isInvalidTemplateId","isValidIri","find","templateId","modalMsg","updateSparqlTemplate","$","on","controller"],"mappings":"+EAMA,SAASA,EAAcC,EAAQC,GAC3B,MAAO,CACHC,0BASJ,SAAmCC,GAC/B,OAAO,IAAIC,QAASC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AClEO,EAAOgE,YACRhD,OAAM,SAAUF,GACf,MAAMG,EAAMC,SAASJ,GACrB5B,EAAO8B,MAAMC,EAAK9B,EAAWM,QAAQ,mCAAoC,CAAC4B,WAAYrB,EAAO0D,aAAarC,mBAnClHnC,EAAO8B,MAAM7B,EAAWM,QAAQ,qCA4DxCmJ,EAAE,YAAYC,GAAG,SAAS,WACtB7G,GAAS,WACLoB,MACD,MAGPpD,EAAOyH,SAAW,WACdzH,EAAO0D,aAAaY,YAAa,GAjVzC3E,QAAQC,OAAO,gDAPC,CACZ,eACA,+CACA,4CACA,UAGqE,CACrE,0CAECkJ,WAAW,sBAAuB/I,GAClC+I,WAAW,2BAA4BjH,GAE5C9B,EAAoBD,QAAU,CAAC,SAAU,gBAAiB,6BAA8B,SAAU,eAAgB,kBAAmB,cAoDrI+B,EAAyB/B,QAAU,CAAC,SAAU,YAAa,SAAU,gBAAiB,UAAW,WAAY,6BAA8B,+BAAgC,oBAAqB,WAAY,eAAgB","file":"44.ccd45256fba55ce28d80.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.utils.notifications', [])\n .factory('Notifications', Notifications);\n\nNotifications.$inject = ['toastr', '$translate'];\n\nfunction Notifications(toastr, $translate) {\n return {\n showToastMessageWithDelay\n };\n\n /**\n * This method will show message with tiny delay and only after completion\n * of latter redirection to \"graphs-visualizations\" page will happen.\n * @param {string} message The message to be displayed.\n * @return {Promise<any>}\n */\n function showToastMessageWithDelay(message) {\n return new Promise((r) => {\n toastr.success($translate.instant(message));\n setTimeout(r, 200);\n });\n }\n}\n","import 'angular/core/services';\nimport 'angular/core/services/repositories.service';\nimport 'angular/rest/monitoring.rest.service';\nimport 'angular/utils/notifications';\nimport 'angular/utils/uri-utils';\nimport {decodeHTML} from \"../../../app\";\n\nconst modules = [\n 'ui.bootstrap',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.rest.monitoring.service',\n 'toastr'\n];\n\nangular.module('graphdb.framework.sparql-template.controllers', modules, [\n 'graphdb.framework.utils.notifications'\n])\n .controller('SparqlTemplatesCtrl', SparqlTemplatesCtrl)\n .controller('SparqlTemplateCreateCtrl', SparqlTemplateCreateCtrl);\n\nSparqlTemplatesCtrl.$inject = ['$scope', '$repositories', 'SparqlTemplatesRestService', 'toastr', 'ModalService', '$licenseService', '$translate'];\n\nfunction SparqlTemplatesCtrl($scope, $repositories, SparqlTemplatesRestService, toastr, ModalService, $licenseService, $translate) {\n\n $scope.pluginName = 'sparql-template';\n\n $scope.setPluginIsActive = function (isPluginActive) {\n $scope.pluginIsActive = isPluginActive;\n }\n\n $scope.getSparqlTemplates = function () {\n // Only do this if there is an active repo that isn't an Ontop repo.\n // Ontop repos doesn't support update operations.\n if ($licenseService.isLicenseValid() &&\n $repositories.getActiveRepository()\n && !$repositories.isActiveRepoOntopType()\n && !$repositories.isActiveRepoFedXType()) {\n SparqlTemplatesRestService.getSparqlTemplates($repositories.getActiveRepository()).success(function (data) {\n $scope.sparqlTemplateIds = data;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('sparql.template.get.templates.error'));\n });\n } else {\n $scope.sparqlTemplateIds = [];\n }\n };\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, function () {\n $scope.getSparqlTemplates();\n });\n\n $scope.deleteTemplate = function (templateID) {\n ModalService.openSimpleModal({\n title: $translate.instant('common.warning'),\n message: $translate.instant('sparql.template.delete.template.warning', {templateID: templateID}),\n warning: true\n }).result\n .then(function () {\n SparqlTemplatesRestService.deleteSparqlTemplate(templateID, $repositories.getActiveRepository())\n .success(function () {\n toastr.success(templateID, $translate.instant('sparql.template.delete.template.success'));\n $scope.getSparqlTemplates();\n }).error(function (e) {\n toastr.error(getError(e), $translate.instant('sparql.template.delete.template.failure', {templateID: templateID}));\n });\n });\n };\n}\n\nSparqlTemplateCreateCtrl.$inject = ['$scope', '$location', 'toastr', '$repositories', '$window', '$timeout', 'SparqlTemplatesRestService', 'RDF4JRepositoriesRestService', 'SparqlRestService', 'UriUtils', 'ModalService', '$translate'];\n\nfunction SparqlTemplateCreateCtrl($scope, $location, toastr, $repositories, $window, $timeout, SparqlTemplatesRestService, RDF4JRepositoriesRestService, SparqlRestService, UriUtils, ModalService, $translate) {\n\n const hash = $location.hash() || '';\n $scope.templateID = ($location.search().templateID || '') + (hash ? (`#${hash}`) : '');\n $scope.title = ($scope.templateID ? $translate.instant('edit') : $translate.instant('common.create.btn')) + ' SPARQL Template';\n $scope.getNamespaces = getNamespaces;\n $scope.setLoader = setLoader;\n $scope.addKnownPrefixes = addKnownPrefixes;\n $scope.noPadding = {paddingRight: 0, paddingLeft: 0};\n $scope.currentTabConfig = {};\n // This property is obligatory in order to show YASQUE and YASR properly\n $scope.orientationViewMode = true;\n $scope.currentQuery = {};\n let templateExist = false;\n\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, function (newValue, oldValue) {\n if (newValue !== oldValue) {\n $location.path('/sparql-templates');\n }\n });\n\n let timer = null;\n $scope.goBack = function () {\n timer = $timeout(function () {\n $window.history.back();\n }, 1000);\n };\n\n const locationChangeListener = $scope.$on('$locationChangeStart', function (event) {\n confirmExit(event);\n });\n\n window.addEventListener('beforeunload', showBeforeunloadMessage);\n\n function showBeforeunloadMessage(event) {\n if (!$scope.currentQuery.isPristine) {\n event.returnValue = true;\n }\n }\n\n function confirmExit(event) {\n if (!$scope.currentQuery.isPristine) {\n if (!confirm($translate.instant('jdbc.warning.unsaved.changes'))) {\n event.preventDefault();\n } else {\n window.removeEventListener('beforeunload', showBeforeunloadMessage);\n locationChangeListener();\n $timeout.cancel(timer);\n }\n }\n }\n\n $scope.$on('$destroy', function (event) {\n window.removeEventListener('beforeunload', showBeforeunloadMessage);\n locationChangeListener();\n $timeout.cancel(timer);\n });\n\n const defaultTabConfig = {\n templateID: '',\n query: 'PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\\n' +\n 'PREFIX ex: <http://example.com#>\\n' +\n 'DELETE {\\n' +\n ' ?subject ex:myPredicate ?oldValue .\\n' +\n '} INSERT {\\n' +\n ' ?subject ex:myPredicate ?newValue .\\n' +\n '} WHERE {\\n' +\n ' ?id rdf:type ex:MyType .\\n' +\n ' ?subject ex:isRelatedTo ?id .\\n' +\n '}\\n',\n inference: true,\n sameAs: true,\n isNewTemplate: true,\n isPristine: true\n };\n\n $scope.saveTab = function () {\n // Should have this empty function in this view\n };\n\n // Called when user clicks on a sample query\n $scope.setQuery = function (query) {\n // Hack for YASQE bug\n window.editor.setValue(query ? query : ' ');\n };\n\n if ($scope.templateID) {\n getSparqlTemplate($scope.templateID);\n } else {\n setQueryFromTabConfig();\n }\n\n // FIXME: this is copy-pasted in graphs-config.controller.js and query-editor.controller.js. Find a way to avoid duplications\n function getNamespaces() {\n // Signals the namespaces are to be fetched => loader will be shown\n setLoader(true, $translate.instant('common.refreshing.namespaces'), $translate.instant('common.extra.message'));\n RDF4JRepositoriesRestService.getRepositoryNamespaces()\n .success(function (data) {\n const usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.namespaces = usedPrefixes;\n })\n .error(function (data) {\n $scope.repositoryError = getError(data);\n })\n .finally(function () {\n // Signals namespaces were fetched => loader will be hidden\n setLoader(false);\n loadTab();\n });\n }\n\n function setLoader(isRunning, progressMessage, extraMessage) {\n const yasrInnerContainer = angular.element(document.getElementById('yasr-inner'));\n $scope.queryIsRunning = isRunning;\n if (isRunning) {\n $scope.queryStartTime = Date.now();\n $scope.countTimeouted = false;\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n yasrInnerContainer.addClass('hide');\n } else {\n $scope.progressMessage = '';\n $scope.extraMessage = '';\n yasrInnerContainer.removeClass('hide');\n }\n\n // We might call this from angular or outside angular so take care of applying the scope.\n if ($scope.$$phase === null) {\n $scope.$apply();\n }\n }\n\n function loadTab() {\n $scope.tabsData = [$scope.currentQuery];\n\n const tab = $scope.currentQuery;\n\n if (!$scope.currentQuery.query) {\n // hack for YASQE bug\n window.editor.setValue(' ');\n } else {\n window.editor.setValue($scope.currentQuery.query);\n }\n\n $timeout(function () {\n $scope.currentTabConfig = {};\n $scope.currentTabConfig.queryType = tab.queryType;\n $scope.currentTabConfig.resultsCount = tab.resultsCount;\n\n $scope.currentTabConfig.offset = tab.offset;\n $scope.currentTabConfig.allResultsCount = tab.allResultsCount;\n $scope.currentTabConfig.page = tab.page;\n $scope.currentTabConfig.pageSize = tab.pageSize;\n\n $scope.currentTabConfig.timeFinished = tab.timeFinished;\n $scope.currentTabConfig.timeTook = tab.timeTook;\n $scope.currentTabConfig.sizeDelta = tab.sizeDelta;\n $scope.$apply();\n }, 0);\n\n if (!$scope.canWriteActiveRepo()) {\n window.editor.options.readOnly = true;\n }\n }\n\n function getSparqlTemplate(templateID) {\n SparqlTemplatesRestService.getSparqlTemplate(templateID, $repositories.getActiveRepository() ).success(function (templateContent) {\n defaultTabConfig.query = templateContent;\n defaultTabConfig.templateID = templateID;\n\n defaultTabConfig.isNewTemplate = !templateID;\n\n setQueryFromTabConfig();\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('sparql.template.get.template.error', {templateID: $scope.currentQuery.templateID}));\n $scope.repositoryError = msg;\n });\n }\n\n function setQueryFromTabConfig() {\n $scope.tabsData = $scope.tabs = [defaultTabConfig];\n $scope.currentQuery = angular.copy(defaultTabConfig);\n\n if (window.editor) {\n $scope.setQuery($scope.currentQuery.query);\n loadTab();\n }\n\n $scope.$watch(function () {\n return $scope.currentQuery.query;\n }, function (newValue, oldValue) {\n if (newValue !== oldValue) {\n $scope.setDirty();\n }\n });\n }\n\n $scope.saveTemplate = function () {\n if (!validateQuery()) {\n return;\n }\n\n if (!$scope.currentQuery.templateID) {\n toastr.error($translate.instant('sparql.template.iri.constraint'));\n return;\n } else {\n validateTemplateID();\n if ($scope.isInvalidTemplateId) {\n return;\n }\n }\n\n if ($scope.currentQuery.isNewTemplate) {\n checkIfTemplateExists()\n .then(() => {\n if (templateExist) {\n const modalMsg = decodeHTML($translate.instant('sparql.template.existing.template.error', {templateID: $scope.currentQuery.templateID}));\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.save'),\n message: modalMsg,\n warning: true\n }).result\n .then(function () {\n saveNewTemplate();\n });\n } else {\n saveNewTemplate();\n }\n });\n } else {\n if (!$scope.currentQuery.isPristine) {\n SparqlTemplatesRestService.updateSparqlTemplate($scope.currentQuery, $repositories.getActiveRepository()).success(function () {\n $scope.currentQuery.isPristine = true;\n $scope.currentQuery.isNewTemplate = false;\n toastr.success($scope.currentQuery.templateID, $translate.instant('update.sparql.template.success.msg'));\n $scope.goBack();\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('save.sparql.template.failure.msg', {templateID: $scope.currentQuery.templateID}));\n });\n } else {\n // No changes to template query, go back to\n $scope.goBack();\n }\n }\n };\n\n\n // Add known prefixes\n function addKnownPrefixes() {\n SparqlRestService.addKnownPrefixes(JSON.stringify(window.editor.getValue()))\n .success(function (data) {\n if (angular.isDefined(window.editor) && angular.isDefined(data) && data !== window.editor.getValue()) {\n window.editor.setValue(data);\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.add.known.prefixes.error'));\n return true;\n });\n }\n\n $('textarea').on('paste', function () {\n $timeout(function () {\n addKnownPrefixes();\n }, 0);\n });\n\n $scope.setDirty = function () {\n $scope.currentQuery.isPristine = false;\n };\n\n function hasValidQuery() {\n return window.editor && window.editor.getQueryMode() === 'update';\n }\n\n function validateQuery() {\n if (!hasValidQuery()) {\n toastr.error($translate.instant('sparql.template.query.constraint'), $translate.instant('jdbc.invalid.query'));\n return false;\n }\n\n return true;\n }\n\n function validateTemplateID() {\n $scope.isInvalidTemplateId = !UriUtils.isValidIri($scope.currentQuery.templateID);\n }\n\n function saveNewTemplate() {\n SparqlTemplatesRestService.createSparqlTemplate($scope.currentQuery, $repositories.getActiveRepository()).success(function () {\n $scope.currentQuery.isPristine = true;\n $scope.currentQuery.isNewTemplate = false;\n toastr.success($scope.currentQuery.templateID, $translate.instant('save.sparql.template.success.msg'));\n $scope.goBack();\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('save.sparql.template.failure.msg', {templateID: $scope.currentQuery.templateID}));\n });\n }\n\n function checkIfTemplateExists() {\n return SparqlTemplatesRestService\n .getSparqlTemplates($repositories.getActiveRepository())\n .success(function (data) {\n templateExist = data.find((templateId) => templateId === $scope.currentQuery.templateID);\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('sparql.template.get.templates.error'));\n });\n }\n}\n"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{54:function(e,t,o){"use strict";o.r(t);o(18);function n(e,t,o,n,r,c,i,u,a,s){let l;function d(){l&&t.cancel(l)}e.pluginName="autocomplete",e.setPluginIsActive=function(t){e.pluginIsActive=t};const f=function(){u.checkAutocompleteStatus().success((function(t){e.autocompleteEnabled=t,a.setAutocompleteStatus(t)})).error((function(e){o.error(getError(e))}))},p=function(){u.refreshIndexIRIs().success((function(t){e.shouldIndexIRIs=t})).error((function(e){o.error(getError(e))}))},g=function(){u.refreshIndexStatus().success((function(t){e.indexStatus=t})).error((function(e){o.error(getError(e))}))},m=function(){u.refreshLabelConfig().success((function(t){e.labelConfig=t})).error((function(e){o.error(getError(e))}))};e.checkForPlugin=function(){e.pluginFound=!1,e.setLoader(!0),u.checkForPlugin().success((function(t){e.pluginFound=!0===t,e.pluginFound?(f(),p(),g(),m()):(e.autocompleteEnabled=!1,e.loading=!1)})).error((function(e){o.error(getError(e))})).finally((function(){e.setLoader(!1)}))};const b=function(){l=t((function(){e.$broadcast("checkIsActive"),e.autocompleteEnabled&&g()}),5e3)};e.$on("$destroy",(function(){d()}));e.setLoader=function(t,o){i.cancel(e.loaderTimeout),t?e.loaderTimeout=i((function(){e.loader=t,e.loaderMessage=o}),300):e.loader=!1},e.getLoaderMessage=function(){return e.loaderMessage||s.instant("common.loading")},e.toggleAutocomplete=function(){const t=!e.autocompleteEnabled;e.setLoader(!0,t?s.instant("autocomplete.enabling"):s.instant("autocomplete.disabling")),u.toggleAutocomplete(t).success((function(){f(),g()})).error((function(e){o.error(getError(e))})).finally((function(){e.setLoader(!1)}))},e.toggleIndexIRIs=function(){e.setLoader(!0,s.instant("autocomplete.index.iri")),u.toggleIndexIRIs(!e.shouldIndexIRIs).success((function(){p(),g()})).error((function(e){o.error(getError(e))})).finally((function(){e.setLoader(!1)}))},e.buildIndex=function(){e.setLoader(!0,s.instant("autocomplete.index.build")),u.buildIndex().success((function(){e.indexStatus="BUILDING"})).error((function(e){o.error(getError(e))})).finally((function(){e.setLoader(!1)}))},e.interruptIndexing=function(){e.setLoader(!0,s.instant("index.interrupt")),u.interruptIndexing().success((function(){g()})).error((function(e){o.error(getError(e))})).finally((function(){e.setLoader(!1)}))},e.getDegradedReason=function(){return n.getDegradedReason()},e.addLabel=function(){e.editLabel({labelIri:"",languages:""},!0)},e.editLabel=function(t,n){c.open({templateUrl:"js/angular/autocomplete/templates/modal/add-label.html",controller:"AddLabelCtrl",resolve:{data:function(){return{label:t,isNew:n}}}}).result.then((function(t){!function(t){e.setLoader(!0,s.instant("autocomplete.update")),u.addLabelConfig(t).success((function(){m(),g()})).error((function(e){o.error(getError(e))})).finally((function(){e.setLoader(!1)}))}(t)}))},e.removeLabel=function(t){!function(t){e.setLoader(!0,s.instant("autocomplete.update")),u.removeLabelConfig(t).success((function(){m(),g()})).error((function(e){o.error(getError(e))})).finally((function(){e.setLoader(!1)}))}(t)},e.$on("repositoryIsSet",(function(){d(),r.isLicenseValid()&&n.getActiveRepository()&&!n.isActiveRepoOntopType()&&!n.isActiveRepoFedXType()&&(e.checkForPlugin(),b())})),r.isLicenseValid()&&n.getActiveRepository()&&!n.isActiveRepoOntopType()&&!n.isActiveRepoFedXType()&&(e.checkForPlugin(),b())}function r(e,t,o,n){e.label=angular.copy(n.label),e.isNew=n.isNew,e.ok=function(){e.form.$valid&&t.close(e.label)},e.cancel=function(){t.dismiss("cancel")},e.setTemplate=function(t){e.label.labelIri=t,o((function(){$("#wb-autocomplete-languages").focus()}),0)}}angular.module("graphdb.framework.autocomplete.controllers",["toastr","graphdb.framework.rest.autocomplete.service"]).controller("AutocompleteCtrl",n).controller("AddLabelCtrl",r),n.$inject=["$scope","$interval","toastr","$repositories","$licenseService","$modal","$timeout","AutocompleteRestService","$autocompleteStatus","$translate"],r.$inject=["$scope","$modalInstance","$timeout","data"]}}]);
|
|
2
|
+
//# sourceMappingURL=45.f1cb114b656ef4af2bc5.bundle.js.map
|
package/dist/{44.6d8cff7a83daeb5ef962.bundle.js.map → 45.f1cb114b656ef4af2bc5.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/autocomplete/controllers.js"],"names":["AutocompleteCtrl","$scope","$interval","toastr","$repositories","$licenseService","$modal","$timeout","AutocompleteRestService","$autocompleteStatus","$translate","timer","cancelTimer","cancel","pluginName","setPluginIsActive","isPluginActive","pluginIsActive","refreshEnabledStatus","checkAutocompleteStatus","success","data","autocompleteEnabled","setAutocompleteStatus","error","getError","refreshIndexIRIs","shouldIndexIRIs","refreshIndexStatus","indexStatus","refreshLabelConfig","labelConfig","checkForPlugin","pluginFound","setLoader","loading","finally","pullStatus","$broadcast","$on","loader","message","loaderTimeout","loaderMessage","getLoaderMessage","instant","toggleAutocomplete","newValue","toggleIndexIRIs","buildIndex","interruptIndexing","getDegradedReason","addLabel","editLabel","labelIri","languages","label","isNew","open","templateUrl","controller","resolve","result","then","addLabelConfig","removeLabel","removeLabelConfig","isLicenseValid","getActiveRepository","isActiveRepoOntopType","isActiveRepoFedXType","AddLabelCtrl","$modalInstance","angular","copy","ok","form","$valid","close","dismiss","setTemplate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,EAAOY,OAAS,WACZ2D,EAAeO,QAAQ,WAG3B9E,EAAO+E,YAAc,SAAUC,GAC3BhF,EAAOuD,MAAMF,SAAW2B,EACxB1E,GAAS,WACL2E,EAAE,8BAA8BC,UACjC,IAnRXV,QACKW,OAAO,6CANI,CACZ,SACA,gDAKCxB,WAAW,mBAAoB5D,GAC/B4D,WAAW,eAAgBW,GAEhCvE,EAAiBqF,QAAU,CAAC,SAAU,YAAa,SAAU,gBAAiB,kBAAmB,SAAU,WAAY,0BAA2B,sBAAuB,cA0PzKd,EAAac,QAAU,CAAC,SAAU,iBAAkB,WAAY","file":"44.6d8cff7a83daeb5ef962.bundle.js","sourcesContent":["import 'angular/rest/autocomplete.rest.service';\n\nconst modules = [\n 'toastr',\n 'graphdb.framework.rest.autocomplete.service'\n];\n\nangular\n .module('graphdb.framework.autocomplete.controllers', modules)\n .controller('AutocompleteCtrl', AutocompleteCtrl)\n .controller('AddLabelCtrl', AddLabelCtrl);\n\nAutocompleteCtrl.$inject = ['$scope', '$interval', 'toastr', '$repositories', '$licenseService', '$modal', '$timeout', 'AutocompleteRestService', '$autocompleteStatus', '$translate'];\n\nfunction AutocompleteCtrl($scope, $interval, toastr, $repositories, $licenseService, $modal, $timeout, AutocompleteRestService, $autocompleteStatus, $translate) {\n\n let timer;\n\n function cancelTimer() {\n if (timer) {\n $interval.cancel(timer);\n }\n }\n\n $scope.pluginName = 'autocomplete';\n\n $scope.setPluginIsActive = function (isPluginActive) {\n $scope.pluginIsActive = isPluginActive;\n };\n\n const refreshEnabledStatus = function () {\n AutocompleteRestService.checkAutocompleteStatus()\n .success(function (data) {\n $scope.autocompleteEnabled = data;\n $autocompleteStatus.setAutocompleteStatus(data);\n }).error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const refreshIndexIRIs = function () {\n AutocompleteRestService.refreshIndexIRIs()\n .success(function (data) {\n $scope.shouldIndexIRIs = data;\n }).error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const refreshIndexStatus = function () {\n AutocompleteRestService.refreshIndexStatus()\n .success(function (data) {\n $scope.indexStatus = data;\n })\n .error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const refreshLabelConfig = function () {\n AutocompleteRestService.refreshLabelConfig()\n .success(function (data) {\n $scope.labelConfig = data;\n }).error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const addLabelConfig = function (label) {\n $scope.setLoader(true, $translate.instant('autocomplete.update'));\n\n\n AutocompleteRestService.addLabelConfig(label)\n .success(function () {\n refreshLabelConfig();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n const removeLabelConfig = function (label) {\n $scope.setLoader(true, $translate.instant('autocomplete.update'));\n\n AutocompleteRestService.removeLabelConfig(label)\n .success(function () {\n refreshLabelConfig();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.checkForPlugin = function () {\n $scope.pluginFound = false;\n\n $scope.setLoader(true);\n\n AutocompleteRestService.checkForPlugin()\n .success(function (data) {\n $scope.pluginFound = data === true;\n if ($scope.pluginFound) {\n refreshEnabledStatus();\n refreshIndexIRIs();\n refreshIndexStatus();\n refreshLabelConfig();\n } else {\n $scope.autocompleteEnabled = false;\n $scope.loading = false;\n }\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n const pullStatus = function () {\n timer = $interval(function () {\n $scope.$broadcast('checkIsActive');\n if ($scope.autocompleteEnabled) {\n refreshIndexStatus();\n }\n }, 5000);\n };\n\n $scope.$on(\"$destroy\", function () {\n cancelTimer();\n });\n\n const init = function() {\n if (!$licenseService.isLicenseValid() ||\n !$repositories.getActiveRepository() ||\n $repositories.isActiveRepoOntopType() ||\n $repositories.isActiveRepoFedXType()) {\n return;\n }\n $scope.checkForPlugin();\n pullStatus();\n };\n\n $scope.setLoader = function (loader, message) {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderTimeout = $timeout(function () {\n $scope.loader = loader;\n $scope.loaderMessage = message;\n }, 300);\n } else {\n $scope.loader = false;\n }\n };\n\n $scope.getLoaderMessage = function () {\n return $scope.loaderMessage || $translate.instant('common.loading');\n };\n\n $scope.toggleAutocomplete = function () {\n const newValue = !$scope.autocompleteEnabled;\n $scope.setLoader(true, newValue ? $translate.instant('autocomplete.enabling') : $translate.instant('autocomplete.disabling'));\n\n AutocompleteRestService.toggleAutocomplete(newValue)\n .success(function () {\n refreshEnabledStatus();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.toggleIndexIRIs = function () {\n $scope.setLoader(true, ($translate.instant('autocomplete.index.iri')));\n\n AutocompleteRestService.toggleIndexIRIs(!$scope.shouldIndexIRIs)\n .success(function () {\n refreshIndexIRIs();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.buildIndex = function () {\n $scope.setLoader(true, $translate.instant('autocomplete.index.build'));\n\n AutocompleteRestService.buildIndex()\n .success(function () {\n $scope.indexStatus = 'BUILDING';\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.interruptIndexing = function () {\n $scope.setLoader(true, $translate.instant('index.interrupt'));\n\n AutocompleteRestService.interruptIndexing()\n .success(function () {\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.getDegradedReason = function () {\n return $repositories.getDegradedReason();\n };\n\n $scope.addLabel = function () {\n $scope.editLabel({labelIri: '', languages: ''}, true);\n };\n\n $scope.editLabel = function (label, isNew) {\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/autocomplete/templates/modal/add-label.html',\n controller: 'AddLabelCtrl',\n resolve: {\n data: function () {\n return {\n label: label,\n isNew: isNew\n };\n }\n }\n });\n\n modalInstance.result.then(function (label) {\n addLabelConfig(label);\n });\n };\n\n $scope.removeLabel = function (label) {\n removeLabelConfig(label);\n };\n\n $scope.$on('repositoryIsSet', function () {\n cancelTimer();\n if (!$licenseService.isLicenseValid() ||\n !$repositories.getActiveRepository() ||\n $repositories.isActiveRepoOntopType() ||\n $repositories.isActiveRepoFedXType()) {\n return;\n }\n $scope.checkForPlugin();\n pullStatus();\n });\n\n init();\n}\n\nAddLabelCtrl.$inject = ['$scope', '$modalInstance', '$timeout', 'data'];\n\nfunction AddLabelCtrl($scope, $modalInstance, $timeout, data) {\n $scope.label = angular.copy(data.label);\n $scope.isNew = data.isNew;\n\n $scope.ok = function () {\n if ($scope.form.$valid) {\n $modalInstance.close($scope.label);\n }\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n\n $scope.setTemplate = function (iri) {\n $scope.label.labelIri = iri;\n $timeout(function () {\n $('#wb-autocomplete-languages').focus();\n }, 0);\n };\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///./src/js/angular/autocomplete/controllers.js"],"names":["AutocompleteCtrl","$scope","$interval","toastr","$repositories","$licenseService","$modal","$timeout","AutocompleteRestService","$autocompleteStatus","$translate","timer","cancelTimer","cancel","pluginName","setPluginIsActive","isPluginActive","pluginIsActive","refreshEnabledStatus","checkAutocompleteStatus","success","data","autocompleteEnabled","setAutocompleteStatus","error","getError","refreshIndexIRIs","shouldIndexIRIs","refreshIndexStatus","indexStatus","refreshLabelConfig","labelConfig","checkForPlugin","pluginFound","setLoader","loading","finally","pullStatus","$broadcast","$on","loader","message","loaderTimeout","loaderMessage","getLoaderMessage","instant","toggleAutocomplete","newValue","toggleIndexIRIs","buildIndex","interruptIndexing","getDegradedReason","addLabel","editLabel","labelIri","languages","label","isNew","open","templateUrl","controller","resolve","result","then","addLabelConfig","removeLabel","removeLabelConfig","isLicenseValid","getActiveRepository","isActiveRepoOntopType","isActiveRepoFedXType","AddLabelCtrl","$modalInstance","angular","copy","ok","form","$valid","close","dismiss","setTemplate","iri","$","focus","module","$inject"],"mappings":"0FAAA,aAcA,SAASA,EAAiBC,EAAQC,EAAWC,EAAQC,EAAeC,EAAiBC,EAAQC,EAAUC,EAAyBC,EAAqBC,GAEjJ,IAAIC,EAEJ,SAASC,IACDD,GACAT,EAAUW,OAAOF,GAIzBV,EAAOa,WAAa,eAEpBb,EAAOc,kBAAoB,SAAUC,GACjCf,EAAOgB,eAAiBD,GAG5B,MAAME,EAAuB,WACzBV,EAAwBW,0BACnBC,SAAQ,SAAUC,GACfpB,EAAOqB,oBAAsBD,EAC7BZ,EAAoBc,sBAAsBF,MAC3CG,OAAM,SAAUH,GACnBlB,EAAOqB,MAAMC,SAASJ,QAIxBK,EAAmB,WACrBlB,EAAwBkB,mBACnBN,SAAQ,SAAUC,GACfpB,EAAO0B,gBAAkBN,KAC1BG,OAAM,SAAUH,GACnBlB,EAAOqB,MAAMC,SAASJ,QAIxBO,EAAqB,WACvBpB,EAAwBoB,qBACnBR,SAAQ,SAAUC,GACfpB,EAAO4B,YAAcR,KAExBG,OAAM,SAAUH,GACblB,EAAOqB,MAAMC,SAASJ,QAI5BS,EAAqB,WACvBtB,EAAwBsB,qBACnBV,SAAQ,SAAUC,GACfpB,EAAO8B,YAAcV,KACtBG,OAAM,SAAUH,GACnBlB,EAAOqB,MAAMC,SAASJ,QAiC9BpB,EAAO+B,eAAiB,WACpB/B,EAAOgC,aAAc,EAErBhC,EAAOiC,WAAU,GAEjB1B,EAAwBwB,iBACnBZ,SAAQ,SAAUC,GACfpB,EAAOgC,aAAuB,IAATZ,EACjBpB,EAAOgC,aACPf,IACAQ,IACAE,IACAE,MAEA7B,EAAOqB,qBAAsB,EAC7BrB,EAAOkC,SAAU,MAEtBX,OAAM,SAAUH,GACnBlB,EAAOqB,MAAMC,SAASJ,OACvBe,SAAQ,WACPnC,EAAOiC,WAAU,OAIzB,MAAMG,EAAa,WACf1B,EAA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J1E,EAAO2E,KAAKC,QACZL,EAAeM,MAAM7E,EAAOuD,QAIpCvD,EAAOY,OAAS,WACZ2D,EAAeO,QAAQ,WAG3B9E,EAAO+E,YAAc,SAAUC,GAC3BhF,EAAOuD,MAAMF,SAAW2B,EACxB1E,GAAS,WACL2E,EAAE,8BAA8BC,UACjC,IAnRXV,QACKW,OAAO,6CANI,CACZ,SACA,gDAKCxB,WAAW,mBAAoB5D,GAC/B4D,WAAW,eAAgBW,GAEhCvE,EAAiBqF,QAAU,CAAC,SAAU,YAAa,SAAU,gBAAiB,kBAAmB,SAAU,WAAY,0BAA2B,sBAAuB,cA0PzKd,EAAac,QAAU,CAAC,SAAU,iBAAkB,WAAY","file":"45.f1cb114b656ef4af2bc5.bundle.js","sourcesContent":["import 'angular/rest/autocomplete.rest.service';\n\nconst modules = [\n 'toastr',\n 'graphdb.framework.rest.autocomplete.service'\n];\n\nangular\n .module('graphdb.framework.autocomplete.controllers', modules)\n .controller('AutocompleteCtrl', AutocompleteCtrl)\n .controller('AddLabelCtrl', AddLabelCtrl);\n\nAutocompleteCtrl.$inject = ['$scope', '$interval', 'toastr', '$repositories', '$licenseService', '$modal', '$timeout', 'AutocompleteRestService', '$autocompleteStatus', '$translate'];\n\nfunction AutocompleteCtrl($scope, $interval, toastr, $repositories, $licenseService, $modal, $timeout, AutocompleteRestService, $autocompleteStatus, $translate) {\n\n let timer;\n\n function cancelTimer() {\n if (timer) {\n $interval.cancel(timer);\n }\n }\n\n $scope.pluginName = 'autocomplete';\n\n $scope.setPluginIsActive = function (isPluginActive) {\n $scope.pluginIsActive = isPluginActive;\n };\n\n const refreshEnabledStatus = function () {\n AutocompleteRestService.checkAutocompleteStatus()\n .success(function (data) {\n $scope.autocompleteEnabled = data;\n $autocompleteStatus.setAutocompleteStatus(data);\n }).error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const refreshIndexIRIs = function () {\n AutocompleteRestService.refreshIndexIRIs()\n .success(function (data) {\n $scope.shouldIndexIRIs = data;\n }).error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const refreshIndexStatus = function () {\n AutocompleteRestService.refreshIndexStatus()\n .success(function (data) {\n $scope.indexStatus = data;\n })\n .error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const refreshLabelConfig = function () {\n AutocompleteRestService.refreshLabelConfig()\n .success(function (data) {\n $scope.labelConfig = data;\n }).error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const addLabelConfig = function (label) {\n $scope.setLoader(true, $translate.instant('autocomplete.update'));\n\n\n AutocompleteRestService.addLabelConfig(label)\n .success(function () {\n refreshLabelConfig();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n const removeLabelConfig = function (label) {\n $scope.setLoader(true, $translate.instant('autocomplete.update'));\n\n AutocompleteRestService.removeLabelConfig(label)\n .success(function () {\n refreshLabelConfig();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.checkForPlugin = function () {\n $scope.pluginFound = false;\n\n $scope.setLoader(true);\n\n AutocompleteRestService.checkForPlugin()\n .success(function (data) {\n $scope.pluginFound = data === true;\n if ($scope.pluginFound) {\n refreshEnabledStatus();\n refreshIndexIRIs();\n refreshIndexStatus();\n refreshLabelConfig();\n } else {\n $scope.autocompleteEnabled = false;\n $scope.loading = false;\n }\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n const pullStatus = function () {\n timer = $interval(function () {\n $scope.$broadcast('checkIsActive');\n if ($scope.autocompleteEnabled) {\n refreshIndexStatus();\n }\n }, 5000);\n };\n\n $scope.$on(\"$destroy\", function () {\n cancelTimer();\n });\n\n const init = function() {\n if (!$licenseService.isLicenseValid() ||\n !$repositories.getActiveRepository() ||\n $repositories.isActiveRepoOntopType() ||\n $repositories.isActiveRepoFedXType()) {\n return;\n }\n $scope.checkForPlugin();\n pullStatus();\n };\n\n $scope.setLoader = function (loader, message) {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderTimeout = $timeout(function () {\n $scope.loader = loader;\n $scope.loaderMessage = message;\n }, 300);\n } else {\n $scope.loader = false;\n }\n };\n\n $scope.getLoaderMessage = function () {\n return $scope.loaderMessage || $translate.instant('common.loading');\n };\n\n $scope.toggleAutocomplete = function () {\n const newValue = !$scope.autocompleteEnabled;\n $scope.setLoader(true, newValue ? $translate.instant('autocomplete.enabling') : $translate.instant('autocomplete.disabling'));\n\n AutocompleteRestService.toggleAutocomplete(newValue)\n .success(function () {\n refreshEnabledStatus();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.toggleIndexIRIs = function () {\n $scope.setLoader(true, ($translate.instant('autocomplete.index.iri')));\n\n AutocompleteRestService.toggleIndexIRIs(!$scope.shouldIndexIRIs)\n .success(function () {\n refreshIndexIRIs();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.buildIndex = function () {\n $scope.setLoader(true, $translate.instant('autocomplete.index.build'));\n\n AutocompleteRestService.buildIndex()\n .success(function () {\n $scope.indexStatus = 'BUILDING';\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.interruptIndexing = function () {\n $scope.setLoader(true, $translate.instant('index.interrupt'));\n\n AutocompleteRestService.interruptIndexing()\n .success(function () {\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.getDegradedReason = function () {\n return $repositories.getDegradedReason();\n };\n\n $scope.addLabel = function () {\n $scope.editLabel({labelIri: '', languages: ''}, true);\n };\n\n $scope.editLabel = function (label, isNew) {\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/autocomplete/templates/modal/add-label.html',\n controller: 'AddLabelCtrl',\n resolve: {\n data: function () {\n return {\n label: label,\n isNew: isNew\n };\n }\n }\n });\n\n modalInstance.result.then(function (label) {\n addLabelConfig(label);\n });\n };\n\n $scope.removeLabel = function (label) {\n removeLabelConfig(label);\n };\n\n $scope.$on('repositoryIsSet', function () {\n cancelTimer();\n if (!$licenseService.isLicenseValid() ||\n !$repositories.getActiveRepository() ||\n $repositories.isActiveRepoOntopType() ||\n $repositories.isActiveRepoFedXType()) {\n return;\n }\n $scope.checkForPlugin();\n pullStatus();\n });\n\n init();\n}\n\nAddLabelCtrl.$inject = ['$scope', '$modalInstance', '$timeout', 'data'];\n\nfunction AddLabelCtrl($scope, $modalInstance, $timeout, data) {\n $scope.label = angular.copy(data.label);\n $scope.isNew = data.isNew;\n\n $scope.ok = function () {\n if ($scope.form.$valid) {\n $modalInstance.close($scope.label);\n }\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n\n $scope.setTemplate = function (iri) {\n $scope.label.labelIri = iri;\n $timeout(function () {\n $('#wb-autocomplete-languages').focus();\n }, 0);\n };\n}\n"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{99:function(e,t){PluginRegistry.add("route",{url:"/autocomplete",module:"graphdb.framework.autocomplete",path:"autocomplete/app",chunk:"autocomplete",controller:"AutocompleteCtrl",templateUrl:"pages/autocomplete.html",title:"view.autocomplete.title",helpInfo:"view.autocomplete.helpInfo"}),PluginRegistry.add("main.menu",{items:[{label:"Setup",labelKey:"menu.setup.label",href:"#",order:5,role:"IS_AUTHENTICATED_FULLY",icon:"icon-settings",guideSelector:"menu-setup"},{label:"Autocomplete",labelKey:"menu.autocomplete.label",href:"autocomplete",order:40,parent:"Setup",role:"IS_AUTHENTICATED_FULLY",guideSelector:"sub-menu-autocomplete"}]})}}]);
|
|
2
|
+
//# sourceMappingURL=46.a9d1c07290ab98930744.bundle.js.map
|