graphdb-workbench 3.1.0-TR7 → 3.1.0-TR9
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/10142.50847c485a7f78a9840b.bundle.js +2 -0
- package/dist/10142.50847c485a7f78a9840b.bundle.js.map +1 -0
- package/dist/{12396.75b93ca806a447ab1996.bundle.js → 12396.cbd351b8adc2b5af44ae.bundle.js} +2 -2
- package/dist/{12396.75b93ca806a447ab1996.bundle.js.map → 12396.cbd351b8adc2b5af44ae.bundle.js.map} +1 -1
- package/dist/{15535.19ce46b0a4b36dd0f96b.bundle.js → 15535.4f979f5a7dbe8a2658e4.bundle.js} +2 -2
- package/dist/{15535.19ce46b0a4b36dd0f96b.bundle.js.map → 15535.4f979f5a7dbe8a2658e4.bundle.js.map} +1 -1
- package/dist/{16162.a3441017ce868475ef7c.bundle.js → 16162.e14694e038f17d230885.bundle.js} +2 -2
- package/dist/{16162.a3441017ce868475ef7c.bundle.js.map → 16162.e14694e038f17d230885.bundle.js.map} +1 -1
- package/dist/{20287.ea17646466c254199b21.bundle.js → 20287.1e9afb2423c3fe873e36.bundle.js} +2 -2
- package/dist/{20287.ea17646466c254199b21.bundle.js.map → 20287.1e9afb2423c3fe873e36.bundle.js.map} +1 -1
- package/dist/{21136.8ef598aef32fdc172c2c.bundle.js → 21136.5a1250377772cb3195a3.bundle.js} +2 -2
- package/dist/{21136.8ef598aef32fdc172c2c.bundle.js.map → 21136.5a1250377772cb3195a3.bundle.js.map} +1 -1
- package/dist/{21142.f1544ad2137f8de986d3.bundle.js → 21142.9dcd7e03e12facac1086.bundle.js} +2 -2
- package/dist/{21142.f1544ad2137f8de986d3.bundle.js.map → 21142.9dcd7e03e12facac1086.bundle.js.map} +1 -1
- package/dist/{21170.c0de17dbd2943fd44ce4.bundle.js → 21170.d94a531bf4739c9b8605.bundle.js} +2 -2
- package/dist/{21170.c0de17dbd2943fd44ce4.bundle.js.map → 21170.d94a531bf4739c9b8605.bundle.js.map} +1 -1
- package/dist/{21195.7800fd930cfbe20d39d9.bundle.js → 21195.49a6f9b0fdea13e4fa1a.bundle.js} +2 -2
- package/dist/{21195.7800fd930cfbe20d39d9.bundle.js.map → 21195.49a6f9b0fdea13e4fa1a.bundle.js.map} +1 -1
- package/dist/{25747.c589e0dddaf47030673f.bundle.js → 25747.56693e59322edce9791b.bundle.js} +2 -2
- package/dist/{25747.c589e0dddaf47030673f.bundle.js.map → 25747.56693e59322edce9791b.bundle.js.map} +1 -1
- package/dist/{27580.7dc5844c4afaabfeaae7.bundle.js → 27580.46e0085c4f0549e4bb9f.bundle.js} +2 -2
- package/dist/{27580.7dc5844c4afaabfeaae7.bundle.js.map → 27580.46e0085c4f0549e4bb9f.bundle.js.map} +1 -1
- package/dist/{31636.f50ca2ade67b87d63f12.bundle.js → 31636.825216a6a817aea7c2e5.bundle.js} +2 -2
- package/dist/{31636.f50ca2ade67b87d63f12.bundle.js.map → 31636.825216a6a817aea7c2e5.bundle.js.map} +1 -1
- package/dist/{32489.9307b8976b5b3187223e.bundle.js → 32489.ff95b720e4c6b3fb21d6.bundle.js} +2 -2
- package/dist/{32489.9307b8976b5b3187223e.bundle.js.map → 32489.ff95b720e4c6b3fb21d6.bundle.js.map} +1 -1
- package/dist/{33524.10558ac848ce64b2b722.bundle.js → 33524.35fe079bcb99a78babaf.bundle.js} +2 -2
- package/dist/33524.35fe079bcb99a78babaf.bundle.js.map +1 -0
- package/dist/36644.b8ead0ab81253aa03ade.bundle.js +2 -0
- package/dist/36644.b8ead0ab81253aa03ade.bundle.js.map +1 -0
- package/dist/{38360.53936cc1df95e7a1b39d.bundle.js → 38360.d06f8ac25d4347b8c94a.bundle.js} +2 -2
- package/dist/{38360.53936cc1df95e7a1b39d.bundle.js.map → 38360.d06f8ac25d4347b8c94a.bundle.js.map} +1 -1
- package/dist/{38644.e8d7a8ff0b538f59f6c3.bundle.js → 38644.1370edd16031835a57fc.bundle.js} +2 -2
- package/dist/{38644.e8d7a8ff0b538f59f6c3.bundle.js.map → 38644.1370edd16031835a57fc.bundle.js.map} +1 -1
- package/dist/{38843.9124577a5f2e542b8135.bundle.js → 38843.1b8dad7984c1368e0f26.bundle.js} +2 -2
- package/dist/{38843.9124577a5f2e542b8135.bundle.js.map → 38843.1b8dad7984c1368e0f26.bundle.js.map} +1 -1
- package/dist/{39518.506568d61f094739e414.bundle.js → 39518.460c8138d3b1479470eb.bundle.js} +2 -2
- package/dist/{39518.506568d61f094739e414.bundle.js.map → 39518.460c8138d3b1479470eb.bundle.js.map} +1 -1
- package/dist/{39539.bf87d8eda9342eba37cf.bundle.js → 39539.e69068aea8046d154307.bundle.js} +2 -2
- package/dist/{39539.bf87d8eda9342eba37cf.bundle.js.map → 39539.e69068aea8046d154307.bundle.js.map} +1 -1
- package/dist/39874.6ca23ead080b52dc1bc6.bundle.js +2 -0
- package/dist/39874.6ca23ead080b52dc1bc6.bundle.js.map +1 -0
- package/dist/{41453.cbb85e8825e15d9875dc.bundle.js → 41453.f2e20c7c42ea9e9ca281.bundle.js} +2 -2
- package/dist/{41453.cbb85e8825e15d9875dc.bundle.js.map → 41453.f2e20c7c42ea9e9ca281.bundle.js.map} +1 -1
- package/dist/{42129.5369407e5c39404263ed.bundle.js → 42129.8894dd599262ed62f5f9.bundle.js} +2 -2
- package/dist/{42129.5369407e5c39404263ed.bundle.js.map → 42129.8894dd599262ed62f5f9.bundle.js.map} +1 -1
- package/dist/{44444.8b07608bcd9f51e6ce1c.bundle.js → 44444.751ec83bdd2a4fd15395.bundle.js} +2 -2
- package/dist/{44444.8b07608bcd9f51e6ce1c.bundle.js.map → 44444.751ec83bdd2a4fd15395.bundle.js.map} +1 -1
- package/dist/{5470.27701a523ebe9e973fc2.bundle.js → 5470.7c17c7d3b58c8c0d0786.bundle.js} +2 -2
- package/dist/5470.7c17c7d3b58c8c0d0786.bundle.js.map +1 -0
- package/dist/{55862.f9264ede1f9e8641e979.bundle.js → 55862.4ff9c451d6d5b20139aa.bundle.js} +2 -2
- package/dist/{55862.f9264ede1f9e8641e979.bundle.js.map → 55862.4ff9c451d6d5b20139aa.bundle.js.map} +1 -1
- package/dist/{58306.afb4bed817c836e63e58.bundle.js → 58306.448be402acad05bbb584.bundle.js} +2 -2
- package/dist/{58306.afb4bed817c836e63e58.bundle.js.map → 58306.448be402acad05bbb584.bundle.js.map} +1 -1
- package/dist/{66014.5e25419235a79d858595.bundle.js → 66014.336bc4291da2fbc96cd1.bundle.js} +2 -2
- package/dist/66014.336bc4291da2fbc96cd1.bundle.js.map +1 -0
- package/dist/{67888.859075c676ffe04298bf.bundle.js → 67888.17384107edbc72dadc2d.bundle.js} +2 -2
- package/dist/{67888.859075c676ffe04298bf.bundle.js.map → 67888.17384107edbc72dadc2d.bundle.js.map} +1 -1
- package/dist/{72379.86c189a27a254f8ad22b.bundle.js → 72379.275ae82f8396d9088028.bundle.js} +2 -2
- package/dist/{72379.86c189a27a254f8ad22b.bundle.js.map → 72379.275ae82f8396d9088028.bundle.js.map} +1 -1
- package/dist/{73667.350239676e59334fff54.bundle.js → 73667.e746a61fe0db60bf2b6a.bundle.js} +2 -2
- package/dist/{73667.350239676e59334fff54.bundle.js.map → 73667.e746a61fe0db60bf2b6a.bundle.js.map} +1 -1
- package/dist/{73793.fcde01f064aa64e84b9c.bundle.js → 73793.05e78e0c3ccbe1ad5f09.bundle.js} +2 -2
- package/dist/{73793.fcde01f064aa64e84b9c.bundle.js.map → 73793.05e78e0c3ccbe1ad5f09.bundle.js.map} +1 -1
- package/dist/{75282.5094de293638333c7097.bundle.js → 75282.4033542c93f0fda84c66.bundle.js} +2 -2
- package/dist/{75282.5094de293638333c7097.bundle.js.map → 75282.4033542c93f0fda84c66.bundle.js.map} +1 -1
- package/dist/{75849.d329e1cb6909ad19ab6e.bundle.js → 75849.fca2b927fc8d73fd31ee.bundle.js} +2 -2
- package/dist/{75849.d329e1cb6909ad19ab6e.bundle.js.map → 75849.fca2b927fc8d73fd31ee.bundle.js.map} +1 -1
- package/dist/{78250.a137ba2afa4989250f69.bundle.js → 78250.9032061f1de28529cc5b.bundle.js} +2 -2
- package/dist/{78250.a137ba2afa4989250f69.bundle.js.map → 78250.9032061f1de28529cc5b.bundle.js.map} +1 -1
- package/dist/79329.5e745025419b44e7a2f6.bundle.js +2 -0
- package/dist/79329.5e745025419b44e7a2f6.bundle.js.map +1 -0
- package/dist/82206.b3b37c3e0cc1aa18148c.bundle.js +2 -0
- package/dist/82206.b3b37c3e0cc1aa18148c.bundle.js.map +1 -0
- package/dist/{82926.f01799164b6cc7a909a5.bundle.js → 82926.c948b5ffd52a13d07e9a.bundle.js} +2 -2
- package/dist/{82926.f01799164b6cc7a909a5.bundle.js.map → 82926.c948b5ffd52a13d07e9a.bundle.js.map} +1 -1
- package/dist/{86287.2a9cda65f67eb0a277d5.bundle.js → 86287.c47005c01ccbdfb1dc23.bundle.js} +2 -2
- package/dist/{86287.2a9cda65f67eb0a277d5.bundle.js.map → 86287.c47005c01ccbdfb1dc23.bundle.js.map} +1 -1
- package/dist/{9062.6f9de79a28c9bd48ec14.bundle.js → 9062.1ed9bc6c2668d65d1cfd.bundle.js} +2 -2
- package/dist/{9062.6f9de79a28c9bd48ec14.bundle.js.map → 9062.1ed9bc6c2668d65d1cfd.bundle.js.map} +1 -1
- package/dist/{95953.04709fa59d2ed50632d3.bundle.js → 95953.55471092942564b75541.bundle.js} +2 -2
- package/dist/95953.55471092942564b75541.bundle.js.map +1 -0
- package/dist/{99448.08fbd142db866ed20f97.bundle.js → 99448.c6f1cb6efb46d34452fa.bundle.js} +2 -2
- package/dist/{99448.08fbd142db866ed20f97.bundle.js.map → 99448.c6f1cb6efb46d34452fa.bundle.js.map} +1 -1
- package/dist/api/ontotext-workbench-api.d.ts +1 -0
- package/dist/api/ontotext-workbench-api.js +1 -1
- package/dist/api/ontotext-workbench-api.js.map +1 -1
- package/dist/api/services/security/authentication-storage.service.d.ts +3 -0
- package/dist/api/services/window/index.d.ts +1 -0
- package/dist/api/services/window/window.service.d.ts +4 -10
- package/dist/i18n/locale-en.json +5 -1
- package/dist/i18n/locale-fr.json +5 -1
- package/dist/index.html +8 -8
- package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
- package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
- package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
- package/dist/js/angular/core/templates/search-resource-input.html +1 -1
- package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
- package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
- package/dist/js/angular/graphql/templates/graphql-playground.html +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
- package/dist/js/angular/security/templates/user.html +2 -2
- package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
- package/dist/js/angular/ttyg/templates/autocomplete-iri-discovery-search.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +4 -4
- package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
- package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
- package/dist/legacyWorkbench.5ed5aeadc238c6ce65fa.js +3 -0
- package/dist/{legacyWorkbench.cbccad23cea068ec41a9.js.map → legacyWorkbench.5ed5aeadc238c6ce65fa.js.map} +1 -1
- package/dist/{main.224d2a416195ee7c3d4a.js → main.95051b60e5b08481a1ff.js} +3 -3
- package/dist/main.95051b60e5b08481a1ff.js.map +1 -0
- package/dist/pages/aclmanagement.html +2 -2
- 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 +1 -1
- 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 +8 -8
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +2 -2
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/login.html +1 -1
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +1 -1
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-editor.html +1 -1
- package/dist/pages/sparql-template-create.html +1 -1
- package/dist/pages/ux-test1.html +2 -2
- package/dist/pages/webapi.html +2 -2
- package/dist/plugins.js +1 -1
- package/dist/res/swagger5/index.html +11 -11
- package/dist/shared-components/cjs/onto-footer.onto-header.onto-navbar.onto-permission-banner.onto-toastr.onto-tooltip.entry.cjs.js.map +1 -1
- package/dist/shared-components/cjs/onto-footer_6.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-footer_6.cjs.entry.js.map +1 -1
- package/dist/shared-components/cjs/onto-language-selector.onto-license-alert.onto-operations-notification.onto-rdf-search.onto-repository-selector.onto-search-icon.onto-search-resource-input.onto-user-login.onto-user-menu.entry.cjs.js.map +1 -1
- package/dist/shared-components/cjs/onto-language-selector_9.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-language-selector_9.cjs.entry.js.map +1 -1
- package/dist/shared-components/cjs/onto-layout.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-layout.cjs.entry.js.map +1 -1
- package/dist/shared-components/cjs/onto-layout.entry.cjs.js.map +1 -1
- package/dist/shared-components/collection/components/onto-footer/onto-footer.js +1 -1
- package/dist/shared-components/collection/components/onto-footer/onto-footer.js.map +1 -1
- package/dist/shared-components/collection/components/onto-header/onto-header.js +1 -1
- package/dist/shared-components/collection/components/onto-header/onto-header.js.map +1 -1
- package/dist/shared-components/collection/components/onto-layout/onto-layout.js +1 -1
- package/dist/shared-components/collection/components/onto-layout/onto-layout.js.map +1 -1
- package/dist/shared-components/collection/components/onto-license-alert/onto-license-alert.js +1 -1
- package/dist/shared-components/collection/components/onto-license-alert/onto-license-alert.js.map +1 -1
- package/dist/shared-components/collection/components/onto-operations-notification/onto-operations-notification.js +1 -1
- package/dist/shared-components/collection/components/onto-operations-notification/onto-operations-notification.js.map +1 -1
- package/dist/shared-components/collection/components/onto-toastr/onto-toastr.js +1 -1
- package/dist/shared-components/collection/components/onto-toastr/onto-toastr.js.map +1 -1
- package/dist/shared-components/collection/components/onto-user-login/onto-user-login.js +1 -1
- package/dist/shared-components/collection/components/onto-user-login/onto-user-login.js.map +1 -1
- package/dist/shared-components/esm/onto-footer.onto-header.onto-navbar.onto-permission-banner.onto-toastr.onto-tooltip.entry.js.map +1 -1
- package/dist/shared-components/esm/onto-footer_6.entry.js +1 -1
- package/dist/shared-components/esm/onto-footer_6.entry.js.map +1 -1
- package/dist/shared-components/esm/onto-language-selector.onto-license-alert.onto-operations-notification.onto-rdf-search.onto-repository-selector.onto-search-icon.onto-search-resource-input.onto-user-login.onto-user-menu.entry.js.map +1 -1
- package/dist/shared-components/esm/onto-language-selector_9.entry.js +1 -1
- package/dist/shared-components/esm/onto-language-selector_9.entry.js.map +1 -1
- package/dist/shared-components/esm/onto-layout.entry.js +1 -1
- package/dist/shared-components/esm/onto-layout.entry.js.map +1 -1
- package/dist/shared-components/shared-components/onto-footer.onto-header.onto-navbar.onto-permission-banner.onto-toastr.onto-tooltip.entry.esm.js.map +1 -1
- package/dist/shared-components/shared-components/onto-language-selector.onto-license-alert.onto-operations-notification.onto-rdf-search.onto-repository-selector.onto-search-icon.onto-search-resource-input.onto-user-login.onto-user-menu.entry.esm.js.map +1 -1
- package/dist/shared-components/shared-components/onto-layout.entry.esm.js.map +1 -1
- package/dist/shared-components/shared-components/p-28a4ce8f.entry.js +1 -0
- package/dist/shared-components/shared-components/p-28a4ce8f.entry.js.map +1 -0
- package/dist/shared-components/shared-components/p-b2cc3f1e.entry.js +1 -0
- package/dist/shared-components/shared-components/p-b2cc3f1e.entry.js.map +1 -0
- package/dist/shared-components/shared-components/p-fa30a30a.entry.js +1 -0
- package/dist/shared-components/shared-components/p-fa30a30a.entry.js.map +1 -0
- package/dist/shared-components/shared-components/shared-components.esm.js +1 -1
- package/dist/shared-components/types/components/onto-license-alert/onto-license-alert.d.ts +0 -1
- package/dist/shared-components/types/components/onto-operations-notification/onto-operations-notification.d.ts +0 -1
- package/dist/shared-components/types/home/ubuntu/workspace/PRO/GraphDB UI Jobs/graphdb-workbench-release/packages/shared-components/.stencil/api/src/services/window/index.d.ts +1 -0
- package/dist/shared-components/types/home/ubuntu/workspace/PRO/GraphDB UI Jobs/graphdb-workbench-release/packages/shared-components/.stencil/api/src/services/window/window.service.d.ts +11 -0
- package/package.json +1 -1
- package/dist/10142.aeee60d794f7a5458f7e.bundle.js +0 -2
- package/dist/10142.aeee60d794f7a5458f7e.bundle.js.map +0 -1
- package/dist/33524.10558ac848ce64b2b722.bundle.js.map +0 -1
- package/dist/36644.836e5d041e0d9261c165.bundle.js +0 -2
- package/dist/36644.836e5d041e0d9261c165.bundle.js.map +0 -1
- package/dist/39874.d024d8dcc51bd55a9c59.bundle.js +0 -2
- package/dist/39874.d024d8dcc51bd55a9c59.bundle.js.map +0 -1
- package/dist/5470.27701a523ebe9e973fc2.bundle.js.map +0 -1
- package/dist/66014.5e25419235a79d858595.bundle.js.map +0 -1
- package/dist/79329.dd73d019c61e2414ed51.bundle.js +0 -2
- package/dist/79329.dd73d019c61e2414ed51.bundle.js.map +0 -1
- package/dist/82206.c251c5be920eed354934.bundle.js +0 -2
- package/dist/82206.c251c5be920eed354934.bundle.js.map +0 -1
- package/dist/95953.04709fa59d2ed50632d3.bundle.js.map +0 -1
- package/dist/legacyWorkbench.cbccad23cea068ec41a9.js +0 -3
- package/dist/main.224d2a416195ee7c3d4a.js.map +0 -1
- package/dist/shared-components/shared-components/p-ca82e5cb.entry.js +0 -1
- package/dist/shared-components/shared-components/p-ca82e5cb.entry.js.map +0 -1
- package/dist/shared-components/shared-components/p-d37f4d40.entry.js +0 -1
- package/dist/shared-components/shared-components/p-d37f4d40.entry.js.map +0 -1
- package/dist/shared-components/shared-components/p-e101f18e.entry.js +0 -1
- package/dist/shared-components/shared-components/p-e101f18e.entry.js.map +0 -1
- /package/dist/{legacyWorkbench.cbccad23cea068ec41a9.js.LICENSE.txt → legacyWorkbench.5ed5aeadc238c6ce65fa.js.LICENSE.txt} +0 -0
- /package/dist/{main.224d2a416195ee7c3d4a.js.LICENSE.txt → main.95051b60e5b08481a1ff.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const __webpack_id__=39539;export const __webpack_ids__=[39539];export const __webpack_modules__={39539:(e,i,d)=>{d.r(i),d.d(i,{default:()=>l});const l='<link href="css/dynamic-form.css?v=3.1.0-
|
|
2
|
-
//# sourceMappingURL=39539.
|
|
1
|
+
export const __webpack_id__=39539;export const __webpack_ids__=[39539];export const __webpack_modules__={39539:(e,i,d)=>{d.r(i),d.d(i,{default:()=>l});const l='<link href="css/dynamic-form.css?v=3.1.0-TR9" rel="stylesheet"/> <div class="dynamic-form-container"> <form name="dynamicForm" novalidate class="dynamic-form"> <div ng-repeat="model in formModel.models"> <div ng-if="model.groupId && (model.fields.length > 0 || showAllFields)" class="form-group"> <h5 class="group-title"> <span gdb-tooltip="{{(translationKeyPrefix ? (translationKeyPrefix + model.groupId + \'.tooltip\') : null) | translate}}"> {{(translationKeyPrefix ? (translationKeyPrefix + model.groupId + \'.label\') : model.groupId) | translate}} </span> </h5> <dynamic-form-field ng-repeat="field in model.fields" field="field" form="dynamicForm" translation-key-prefix="translationKeyPrefix"> </dynamic-form-field> <div class="hidden-fields"> <dynamic-form-field ng-if="showAllFields" ng-repeat="field in model.hiddenFields" field="field" form="dynamicForm" translation-key-prefix="translationKeyPrefix"> </dynamic-form-field> </div> </div> <dynamic-form-field ng-if="!model.groupId" field="model" form-name="dynamicForm" translation-key-prefix="translationKeyPrefix"> </dynamic-form-field> </div> </form> </div> '}};
|
|
2
|
+
//# sourceMappingURL=39539.e69068aea8046d154307.bundle.js.map
|
package/dist/{39539.bf87d8eda9342eba37cf.bundle.js.map → 39539.e69068aea8046d154307.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"39539.
|
|
1
|
+
{"version":3,"file":"39539.e69068aea8046d154307.bundle.js","mappings":"uJAGA,QAFW,omC","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/dynamic-form/templates/dynamic-form.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/dynamic-form.css?v=3.1.0-TR9\" rel=\"stylesheet\"/> <div class=\"dynamic-form-container\"> <form name=\"dynamicForm\" novalidate class=\"dynamic-form\"> <div ng-repeat=\"model in formModel.models\"> <div ng-if=\"model.groupId && (model.fields.length > 0 || showAllFields)\" class=\"form-group\"> <h5 class=\"group-title\"> <span gdb-tooltip=\"{{(translationKeyPrefix ? (translationKeyPrefix + model.groupId + '.tooltip') : null) | translate}}\"> {{(translationKeyPrefix ? (translationKeyPrefix + model.groupId + '.label') : model.groupId) | translate}} </span> </h5> <dynamic-form-field ng-repeat=\"field in model.fields\" field=\"field\" form=\"dynamicForm\" translation-key-prefix=\"translationKeyPrefix\"> </dynamic-form-field> <div class=\"hidden-fields\"> <dynamic-form-field ng-if=\"showAllFields\" ng-repeat=\"field in model.hiddenFields\" field=\"field\" form=\"dynamicForm\" translation-key-prefix=\"translationKeyPrefix\"> </dynamic-form-field> </div> </div> <dynamic-form-field ng-if=\"!model.groupId\" field=\"model\" form-name=\"dynamicForm\" translation-key-prefix=\"translationKeyPrefix\"> </dynamic-form-field> </div> </form> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export const __webpack_id__=39874;export const __webpack_ids__=[39874];export const __webpack_modules__={39874:(e,i,t)=>{t.r(i),t.d(i,{onto_layout:()=>r});var s=t(87848),a=t(57154);const r=class{constructor(e){(0,s.r)(this,e),this.securityContextService=a.ServiceProvider.get(a.SecurityContextService),this.authenticationService=a.ServiceProvider.get(a.AuthenticationService),this.navigationContextService=a.ServiceProvider.get(a.NavigationContextService),this.isLowResolution=!1,this.hasPermission=!0,this.showFooter=this.isAuthenticatedFully(),this.subscriptions=new a.SubscriptionList,this.isNavbarCollapsed=!1,this.windowResizeObserver=function(e,i=300){let t;return(...s)=>{clearTimeout(t),t=setTimeout(()=>e.apply(this,s),i)}}(()=>this.windowResizeHandler(),50),a.WindowService.getWindow().addEventListener("storage",this.handleStorageChange)}componentDidLoad(){this.windowResizeHandler()}connectedCallback(){this.subscribeToSecurityChanges(),this.updateVisibility(),this.subscriptions.add(this.securityContextService.onRestrictedPagesChanged(e=>this.setPermission(e))),this.subscriptions.add(a.ServiceProvider.get(a.EventService).subscribe(a.EventName.NAVIGATION_END,e=>{this.navigationContextService.updatePreviousRoute(e.oldUrl),this.setPermission(this.securityContextService.getRestrictedPages())})),this.setPermission(this.securityContextService.getRestrictedPages())}disconnectedCallback(){this.subscriptions.unsubscribeAll()}render(){return(0,s.h)(s.a,{key:"5d814f892fde4148f87848dbfb6a1297479b110d",class:"wb-layout"},(0,s.h)("div",{key:"3189f4fd2434630807d924b656e70e0f91aac9ec",class:"default-slot-wrapper"},(0,s.h)("slot",{key:"58aafe83a0ca87647bf9de541228b07f2acebdc8",name:"default"})),(0,s.h)("header",{key:"ee1a6fc5254f30e198b190725bdbfebf76c3932d",class:"wb-header"},this.isVisible&&(0,s.h)("onto-header",{key:"6eed310ab3e1707d24c4331fe70962b41e628bb9"})),(0,s.h)("nav",{key:"7759747f8d91d95e569e9a603b9d11c20d46a75c",class:"wb-navbar"},(0,s.h)("onto-navbar",{key:"08946fa871e0cb2bd84831b4ab57592ade2813b1",ref:this.assignNavbarRef(),"navbar-collapsed":this.isLowResolution})),this.hasPermission?(0,s.h)("div",{class:"main-slot-wrapper"},(0,s.h)("slot",{name:"main"})):(0,s.h)("onto-permission-banner",null),(0,s.h)("footer",{key:"c7340dc1f4f10ff700a89fe2500e63ea782b341d",class:"wb-footer"},this.isVisible&&(0,s.h)("onto-footer",{key:"cb8907cf8f7254be6624a1891ca3a31edaa6554c"})),(0,s.h)("onto-tooltip",{key:"23f587a3461d7deae856897b7ceb92e5fc1446a8"}),(0,s.h)("onto-toastr",{key:"8f49abb3110ba0bb92d9ab2530f95bbc7f9b019f"}))}onNavbarToggled(e){this.isNavbarCollapsed=e.detail.payload,this.isNavbarCollapsed?this.hostElement.classList.add("expanded"):this.hostElement.classList.remove("expanded")}onResize(){this.windowResizeObserver()}windowResizeHandler(){this.isLowResolution=a.WindowService.getWindow().innerWidth<=768,this.isLowResolution||this.isNavbarCollapsed?this.hostElement.classList.add("expanded"):this.hostElement.classList.remove("expanded")}handleStorageChange(e){a.ServiceProvider.get(a.LocalStorageSubscriptionHandlerService).handleStorageChange(e)}subscribeToSecurityChanges(){const e=a.ServiceProvider.get(a.SecurityContextService);this.subscriptions.add(e.onAuthenticatedUserChanged(e=>{this.authenticatedUser=e,this.updateVisibility()})),this.subscriptions.add(e.onSecurityConfigChanged(e=>{this.securityConfig=e,this.updateVisibility()})),this.subscriptions.add(a.ServiceProvider.get(a.EventService).subscribe(a.EventName.LOGOUT,()=>{this.setNavbarItemVisibility(),this.updateVisibility(),this.securityContextService.updateRestrictedPages(new a.RestrictedPages)})),this.subscriptions.add(e.onAuthTokenChanged(()=>{this.setNavbarItemVisibility(),this.updateVisibility()}))}setPermission(e){if(e){const i=(0,a.getPathName)();this.hasPermission=!e.isRestricted(i)||!this.authenticationService.hasAuthority()}else this.hasPermission=!0;const i=document.querySelector(".wb-layout main");i&&(i.style.display=this.hasPermission?"block":"none")}updateVisibility(){if(this.authenticationService.isSecurityEnabled()){const e=!!this.authenticatedUser&&!!this.securityConfig,i=this.authenticationService.isAuthenticated()||this.authenticationService.hasFreeAccess();this.isVisible=e&&i,this.showFooter=i}else this.isVisible=!0,this.showFooter=!0}isAuthenticatedFully(){const e=a.ServiceProvider.get(a.AuthenticationService);return!e.isSecurityEnabled()||e.isAuthenticated()||e.hasFreeAccess()}shouldShowMenu(e){return this.isAuthenticatedFully()&&a.ServiceProvider.get(a.AuthenticationService).hasRole(e)}assignNavbarRef(){return e=>{this.navbarRef=e,this.navbarRef.menuItems=a.WindowService.getWindow().PluginRegistry.get("main.menu"),this.setNavbarItemVisibility()}}setNavbarItemVisibility(){var e,i,t;if(!(null===(e=this.navbarRef)||void 0===e?void 0:e.menuItems))return;const s=e=>{var i;e.shouldShow=this.shouldShowMenu(e.role),(null===(i=e.children)||void 0===i?void 0:i.length)&&e.children.forEach(s)};null===(t=null===(i=this.navbarRef)||void 0===i?void 0:i.menuItems)||void 0===t||t.forEach(e=>{e.items.forEach(s)}),this.navbarRef.menuItems=[...this.navbarRef.menuItems]}get hostElement(){return(0,s.g)(this)}};r.style=':host{display:block;height:100%}.wb-layout{display:grid;grid-template-columns:15rem minmax(200px, 1fr);grid-template-rows:auto 1fr auto;grid-template-areas:"nav header" "nav main" "nav footer";min-height:100vh;margin:0}.wb-layout.expanded{grid-template-columns:4.375rem 1fr}.wb-layout nav{grid-area:nav}.wb-layout header{grid-area:header}.wb-layout main{grid-area:main}.wb-layout main .main-container{margin-left:0}.wb-layout .default-slot-wrapper{display:none}.wb-layout footer{grid-area:footer}.wb-header{position:sticky;top:0;z-index:999}'}};
|
|
2
|
+
//# sourceMappingURL=39874.6ca23ead080b52dc1bc6.bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"39874.6ca23ead080b52dc1bc6.bundle.js","mappings":"qLAAO,MCwBMA,EAAU,MAsCrBC,WAAAA,CAAAC,I,eAlCiB,KAAAC,uBAAyBC,EAAAA,gBAAgBC,IAAIC,EAAAA,wBAC7C,KAAAC,sBAAwBH,EAAAA,gBAAgBC,IAAIG,EAAAA,uBAC5C,KAAAC,yBAA2BL,EAAAA,gBAAgBC,IAAIK,EAAAA,0BAcvD,KAAeC,iBAAG,EAClB,KAAaC,eAAY,EACzB,KAAAC,WAAaC,KAAKC,uBASV,KAAAC,cAAkC,IAAIC,EAAAA,iBAE/C,KAAiBC,mBAAG,EAM1BJ,KAAKK,qB,SC/DgBC,EAAMC,EAAO,KACpC,IAAIC,EACJ,MAAO,IAAIC,KACTC,aAAaF,GACbA,EAAQG,WAAW,IAAML,EAAKM,MAAMZ,KAAMS,GAAOF,GAErD,CDyDgCM,CAAS,IAAMb,KAAKc,sBAAuB,IACvEC,EAAAA,cAAcC,YAAYC,iBAAiB,UAAWjB,KAAKkB,oBAC5D,CAEDC,gBAAAA,GACEnB,KAAKc,qB,CAGPM,iBA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,O,CAIvDwB,gBAAAA,GACN,GAAKtB,KAAKP,sBAAsBkF,oBAGzB,CACL,MAAMC,IAAY5E,KAAKyD,qBAAuBzD,KAAK2D,eAC7CkB,EAAkB7E,KAAKP,sBAAsBoF,mBAAqB7E,KAAKP,sBAAsBqF,gBAEnG9E,KAAK2C,UAAYiC,GAAWC,EAC5B7E,KAAKD,WAAa8E,C,MAPlB7E,KAAK2C,WAAY,EACjB3C,KAAKD,YAAa,C,CAUdE,oBAAAA,GACN,MAAM8E,EAAczF,EAAAA,gBAAgBC,IAAIG,EAAAA,uBACxC,OAAQqF,EAAYJ,qBAAuBI,EAAYF,mBAAqBE,EAAYD,e,CAGlFE,cAAAA,CAAeC,GACrB,OAAOjF,KAAKC,wBACPX,EAAAA,gBAAgBC,IAAIG,EAAAA,uBAAuBwF,QAAQD,E,CAMlDpC,eAAAA,GACN,OAAQsC,IACNnF,KAAKoF,UAAYD,EACjBnF,KAAKoF,UAAUC,UAAYtE,EAAAA,cAAcC,YAAYsE,eAAe/F,IAAI,aACxES,KAAK6D,0B,CAIDA,uBAAAA,G,UACN,KAAqB,QAAhB0B,EAAAvF,KAAKoF,iBAAW,IAAAG,OAAA,EAAAA,EAAAF,WACnB,OAGF,MAAMG,EAAeC,I,MACnBA,EAAKC,WAAa1F,KAAKgF,eAAeS,EAAKR,OACxB,QAAfM,EAAAE,EAAKE,gBAAU,IAAAJ,OAAA,EAAAA,EAAAK,SACjBH,EAAKE,SAASE,QAAQL,IAID,QAAzBM,EAAc,QAAdC,EAAA/F,KAAKoF,iBAAS,IAAAW,OAAA,EAAAA,EAAEV,iBAAS,IAAAS,GAAAA,EAAED,QAAQG,IACjCA,EAAOC,MAAMJ,QAAQL,KAGvBxF,KAAKoF,UAAUC,UAAY,IAAIrF,KAAKoF,UAAUC,U,iDE3Q5B,+hB","sources":["webpack://root-config/src/models/constants.ts","webpack://root-config/src/components/onto-layout/onto-layout.tsx","webpack://root-config/src/utils/function-utils.ts","webpack://root-config/src/components/onto-layout/onto-layout.scss"],"sourcesContent":["export const RESPONSIVE_BREAKPOINTS = {\n SM: 640,\n MD: 768,\n LG: 1024,\n XL: 1280,\n XXL: 1400,\n};\n\n/**\n * The width of the window in pixels at which the navbar should collapse.\n */\nexport const WINDOW_WIDTH_FOR_COLLAPSED_NAVBAR = RESPONSIVE_BREAKPOINTS.MD;\n","import {Component, Host, h, Listen, Element, State} from '@stencil/core';\nimport {NavbarToggledEvent} from \"../onto-navbar/navbar-toggled-event\";\nimport {debounce} from \"../../utils/function-utils\";\nimport {WINDOW_WIDTH_FOR_COLLAPSED_NAVBAR} from \"../../models/constants\";\nimport {\n ServiceProvider,\n LocalStorageSubscriptionHandlerService,\n SecurityContextService,\n RestrictedPages,\n EventService,\n EventName,\n SubscriptionList,\n AuthenticatedUser,\n SecurityConfig,\n Authority,\n AuthenticationService, NavigationEndPayload, NavigationContextService, getPathName, WindowService\n} from '@ontotext/workbench-api';\nimport {ExternalMenuItemModel} from '../onto-navbar/external-menu-model';\n\n@Component({\n tag: 'onto-layout',\n styleUrl: 'onto-layout.scss',\n shadow: false,\n})\nexport class OntoLayout {\n // ========================\n // Services\n // ========================\n private readonly securityContextService = ServiceProvider.get(SecurityContextService);\n private readonly authenticationService = ServiceProvider.get(AuthenticationService);\n private readonly navigationContextService = ServiceProvider.get(NavigationContextService);\n\n // ========================\n // DOM Refs\n // ========================\n @Element() hostElement: HTMLOntoLayoutElement;\n private navbarRef: HTMLOntoNavbarElement;\n\n // ========================\n // State\n // ========================\n @State() authenticatedUser: AuthenticatedUser;\n @State() authToken: string | null;\n @State() securityConfig: SecurityConfig;\n @State() isLowResolution = false;\n @State() hasPermission: boolean = true;\n @State() showFooter = this.isAuthenticatedFully();\n @State() isVisible: boolean;\n\n // ========================\n // Private\n // ========================\n /**\n * List of subscriptions to manage component lifecycle\n * */\n private readonly subscriptions: SubscriptionList = new SubscriptionList();\n private readonly windowResizeObserver: (...args: any) => void;\n private isNavbarCollapsed = false;\n\n // ========================\n // Lifecycle methods\n // ========================\n constructor() {\n this.windowResizeObserver = debounce(() => this.windowResizeHandler(), 50);\n WindowService.getWindow().addEventListener(\"storage\", this.handleStorageChange);\n }\n\n componentDidLoad() {\n this.windowResizeHandler();\n }\n\n connectedCallback() {\n this.subscribeToSecurityChanges();\n this.updateVisibility();\n // Subscribing here, because after a disconnectedCallback the connectedCallback is called, instead of componentDidLoad or constructor\n this.subscriptions.add(this.securityContextService.onRestrictedPagesChanged((restrictedPages) => this.setPermission(restrictedPages)));\n this.subscriptions.add(\n ServiceProvider.get(EventService).subscribe(EventName.NAVIGATION_END, (navigationEndPayload: NavigationEndPayload) => {\n this.navigationContextService.updatePreviousRoute(navigationEndPayload.oldUrl);\n this.setPermission(this.securityContextService.getRestrictedPages());\n }));\n this.setPermission(this.securityContextService.getRestrictedPages());\n }\n\n /**\n * Lifecycle method called when the component is about to be removed from the DOM.\n * Unsubscribes from all subscriptions to prevent memory leaks.\n */\n disconnectedCallback() {\n this.subscriptions.unsubscribeAll();\n }\n\n render() {\n return (\n <Host class=\"wb-layout\">\n {/* Default slot is explicitly defined to be able to hide the main content in the user permission check */}\n <div class=\"default-slot-wrapper\">\n <slot name=\"default\"></slot>\n </div>\n <header class=\"wb-header\">\n {this.isVisible && <onto-header></onto-header>}\n </header>\n\n <nav class=\"wb-navbar\">\n <onto-navbar ref={this.assignNavbarRef()}\n navbar-collapsed={this.isLowResolution}></onto-navbar>\n </nav>\n\n {this.hasPermission ? (\n <div class='main-slot-wrapper'>\n <slot name=\"main\"></slot></div>\n ) : (\n <onto-permission-banner></onto-permission-banner>\n )}\n <footer class=\"wb-footer\">\n {this.isVisible && <onto-footer></onto-footer>}\n </footer>\n <onto-tooltip></onto-tooltip>\n <onto-toastr></onto-toastr>\n </Host>\n );\n }\n\n // ========================\n // Event Listeners\n // ========================\n /**\n * Event listener for the navbar toggled event. The layout needs to respond properly when the navbar is toggled in\n * order to fit the content.\n * @param event\n */\n @Listen('navbarToggled')\n onNavbarToggled(event: CustomEvent<NavbarToggledEvent>) {\n this.isNavbarCollapsed = event.detail.payload;\n if (this.isNavbarCollapsed) {\n this.hostElement.classList.add('expanded');\n } else {\n this.hostElement.classList.remove('expanded');\n }\n }\n\n /**\n * Event listener for window resize event. We need to handle this in order to allow the navbar to collapse when the\n * window is resized.\n */\n @Listen('resize', {target: 'window'})\n onResize() {\n this.windowResizeObserver();\n }\n\n // ========================\n // Handlers\n // ========================\n private windowResizeHandler(): void {\n this.isLowResolution = WindowService.getWindow().innerWidth <= WINDOW_WIDTH_FOR_COLLAPSED_NAVBAR;\n if (!this.isLowResolution && !this.isNavbarCollapsed) {\n this.hostElement.classList.remove('expanded');\n } else {\n this.hostElement.classList.add('expanded');\n }\n }\n\n private handleStorageChange(event: StorageEvent) {\n const service = ServiceProvider.get(LocalStorageSubscriptionHandlerService);\n service.handleStorageChange(event);\n }\n\n // ========================\n // Security & Permissions\n // ========================\n private subscribeToSecurityChanges() {\n const securityContextService = ServiceProvider.get(SecurityContextService);\n this.subscriptions.add(\n securityContextService.onAuthenticatedUserChanged((authenticatedUser) => {\n this.authenticatedUser = authenticatedUser;\n this.updateVisibility();\n })\n );\n\n this.subscriptions.add(\n securityContextService.onSecurityConfigChanged((securityConfig) => {\n this.securityConfig = securityConfig;\n this.updateVisibility();\n })\n );\n\n this.subscriptions.add(\n ServiceProvider.get(EventService).subscribe(EventName.LOGOUT, () => {\n this.setNavbarItemVisibility();\n this.updateVisibility();\n this.securityContextService.updateRestrictedPages(new RestrictedPages());\n })\n );\n this.subscriptions.add(\n securityContextService.onAuthTokenChanged(()=>{\n this.setNavbarItemVisibility();\n this.updateVisibility();\n })\n );\n }\n\n private setPermission(permissions: RestrictedPages) {\n if (permissions) {\n const path = getPathName();\n // Delegate to legacy, when a user has authority in order to show the authority banner, which is not migrated yet\n this.hasPermission = !permissions.isRestricted(path) ? true : !this.authenticationService.hasAuthority();\n } else {\n // If the permissions are undefined, the user can access the url\n this.hasPermission = true;\n }\n\n const mainContent = document.querySelector('.wb-layout main') as HTMLElement;\n if (mainContent) {\n mainContent.style.display = this.hasPermission ? 'block' : 'none';\n }\n }\n\n private updateVisibility() {\n if (!this.authenticationService.isSecurityEnabled()) {\n this.isVisible = true;\n this.showFooter = true;\n } else {\n const hasAuth = !!this.authenticatedUser && !!this.securityConfig;\n const isAuthenticated = this.authenticationService.isAuthenticated() || this.authenticationService.hasFreeAccess();\n\n this.isVisible = hasAuth && isAuthenticated;\n this.showFooter = isAuthenticated;\n }\n }\n\n private isAuthenticatedFully() {\n const authService = ServiceProvider.get(AuthenticationService);\n return !authService.isSecurityEnabled() || authService.isAuthenticated() || authService.hasFreeAccess();\n }\n\n private shouldShowMenu(role: Authority): boolean {\n return this.isAuthenticatedFully()\n && ServiceProvider.get(AuthenticationService).hasRole(role);\n }\n\n // ========================\n // Navbar logic\n // ========================\n private assignNavbarRef() {\n return (navbar: HTMLOntoNavbarElement) => {\n this.navbarRef = navbar;\n this.navbarRef.menuItems = WindowService.getWindow().PluginRegistry.get('main.menu');\n this.setNavbarItemVisibility();\n }\n }\n\n private setNavbarItemVisibility() {\n if (!this.navbarRef?.menuItems) {\n return;\n }\n // recursively check for children and set their shouldShow property\n const processItem = (item: ExternalMenuItemModel) => {\n item.shouldShow = this.shouldShowMenu(item.role as Authority);\n if (item.children?.length) {\n item.children.forEach(processItem);\n }\n };\n\n this.navbarRef?.menuItems?.forEach(plugin => {\n plugin.items.forEach(processItem);\n });\n // Update the reference to trigger a re-render\n this.navbarRef.menuItems = [...this.navbarRef.menuItems];\n }\n}\n","export function debounce(func, wait = 300) {\n let timer: string | number | NodeJS.Timeout;\n return (...args: any) => {\n clearTimeout(timer);\n timer = setTimeout(() => func.apply(this, args), wait);\n };\n}\n",":host {\n display: block;\n height: 100%;\n}\n.wb-layout {\n display: grid;\n grid-template-columns: 15rem minmax(200px, 1fr);\n grid-template-rows: auto 1fr auto;\n grid-template-areas:\n \"nav header\"\n \"nav main\"\n \"nav footer\";\n min-height: 100vh;\n margin: 0;\n\n &.expanded {\n grid-template-columns: 4.375rem 1fr;\n }\n\n nav {\n grid-area: nav;\n }\n\n header {\n grid-area: header;\n }\n\n main {\n grid-area: main;\n }\n\n main .main-container {\n /* This is a temporary solution to properly align the main container next to the sidebar until a proper layout is in place. */\n margin-left: 0;\n }\n\n .default-slot-wrapper {\n display: none;\n }\n\n footer {\n grid-area: footer;\n }\n}\n\n.wb-header {\n position: sticky;\n top: 0;\n z-index: 999;\n}\n"],"names":["OntoLayout","constructor","hostRef","securityContextService","ServiceProvider","get","SecurityContextService","authenticationService","AuthenticationService","navigationContextService","NavigationContextService","isLowResolution","hasPermission","showFooter","this","isAuthenticatedFully","subscriptions","SubscriptionList","isNavbarCollapsed","windowResizeObserver","func","wait","timer","args","clearTimeout","setTimeout","apply","debounce","windowResizeHandler","WindowService","getWindow","addEventListener","handleStorageChange","componentDidLoad","connectedCallback","subscribeToSecurityChanges","updateVisibility","add","onRestrictedPagesChanged","restrictedPages","setPermission","EventService","subscribe","EventName","NAVIGATION_END","navigationEndPayload","updatePreviousRoute","oldUrl","getRestrictedPages","disconnectedCallback","unsubscribeAll","render","h","Host","key","class","name","isVisible","ref","assignNavbarRef","onNavbarToggled","event","detail","payload","hostElement","classList","remove","onResize","innerWidth","LocalStorageSubscriptionHandlerService","onAuthenticatedUserChanged","authenticatedUser","onSecurityConfigChanged","securityConfig","LOGOUT","setNavbarItemVisibility","updateRestrictedPages","RestrictedPages","onAuthTokenChanged","permissions","path","getPathName","isRestricted","hasAuthority","mainContent","document","querySelector","style","display","isSecurityEnabled","hasAuth","isAuthenticated","hasFreeAccess","authService","shouldShowMenu","role","hasRole","navbar","navbarRef","menuItems","PluginRegistry","_a","processItem","item","shouldShow","children","length","forEach","_c","_b","plugin","items"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const __webpack_id__=41453;export const __webpack_ids__=[41453];export const __webpack_modules__={41453:(n,t,a)=>{a.r(t),a.d(t,{default:()=>e});const e='<link href="css/graphql/graphql-endpoint-configuration-modal.css?v=3.1.0-
|
|
2
|
-
//# sourceMappingURL=41453.
|
|
1
|
+
export const __webpack_id__=41453;export const __webpack_ids__=[41453];export const __webpack_modules__={41453:(n,t,a)=>{a.r(t),a.d(t,{default:()=>e});const e='<link href="css/graphql/graphql-endpoint-configuration-modal.css?v=3.1.0-TR9" rel="stylesheet"/> <div class="modal-header"> <h3 class="modal-title">{{\'graphql.endpoints_management.endpoint_configuration_modal.title\' | translate}}</h3> <span ng-click="toggleAdvancedSettings()" class="toggle-advanced-settings"> <input type="checkbox" class="switch" ng-checked="showAdvancedSettings"/> <label></label> <span>{{\'graphql.endpoints_management.endpoint_configuration_modal.actions.show_advanced_settings.label\' | translate}}</span> </span> </div> <div class="modal-body graphql-endpoint-configuration-modal-body"> <div class="graphql-endpoint-configuration-loader" onto-loader-new hide-message="true" size="100" ng-show="loadingEndpointConfigurationSettings"></div> <dynamic-form ng-if="!loadingEndpointConfigurationSettings" form-model="endpointConfigurationSettings.settings" on-validity-change="handleValidityChange(valid)" show-all-fields="showAdvancedSettings" translation-key-prefix="graphql.endpoints_management.endpoint_configuration_modal.settings." form-ctrl="formCtrl"> </dynamic-form> </div> <div class="modal-footer mt-0"> <button type="button" class="btn btn-secondary cancel-btn" ng-click="cancel()">{{\'common.cancel.btn\' | translate}} </button> <button id="graphql-endpoint-configuration-modal-submit" class="btn btn-primary" ng-disabled="!endpointConfigurationSettingsValid || savingEndpointSettings || formCtrl.$pristine" ng-click="ok()" type="submit"> <span>{{\'save.changes.label\' | translate}}</span> <span class="saving-endpoint-settings" ng-if="savingEndpointSettings" onto-loader-fancy hide-message="true" size="15"></span> </button> </div> '}};
|
|
2
|
+
//# sourceMappingURL=41453.f2e20c7c42ea9e9ca281.bundle.js.map
|
package/dist/{41453.cbb85e8825e15d9875dc.bundle.js.map → 41453.f2e20c7c42ea9e9ca281.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"41453.
|
|
1
|
+
{"version":3,"file":"41453.f2e20c7c42ea9e9ca281.bundle.js","mappings":"uJAGA,QAFW,qoD","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/graphql/templates/modal/endpoint-configuration-modal.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/graphql/graphql-endpoint-configuration-modal.css?v=3.1.0-TR9\" rel=\"stylesheet\"/> <div class=\"modal-header\"> <h3 class=\"modal-title\">{{'graphql.endpoints_management.endpoint_configuration_modal.title' | translate}}</h3> <span ng-click=\"toggleAdvancedSettings()\" class=\"toggle-advanced-settings\"> <input type=\"checkbox\" class=\"switch\" ng-checked=\"showAdvancedSettings\"/> <label></label> <span>{{'graphql.endpoints_management.endpoint_configuration_modal.actions.show_advanced_settings.label' | translate}}</span> </span> </div> <div class=\"modal-body graphql-endpoint-configuration-modal-body\"> <div class=\"graphql-endpoint-configuration-loader\" onto-loader-new hide-message=\"true\" size=\"100\" ng-show=\"loadingEndpointConfigurationSettings\"></div> <dynamic-form ng-if=\"!loadingEndpointConfigurationSettings\" form-model=\"endpointConfigurationSettings.settings\" on-validity-change=\"handleValidityChange(valid)\" show-all-fields=\"showAdvancedSettings\" translation-key-prefix=\"graphql.endpoints_management.endpoint_configuration_modal.settings.\" form-ctrl=\"formCtrl\"> </dynamic-form> </div> <div class=\"modal-footer mt-0\"> <button type=\"button\" class=\"btn btn-secondary cancel-btn\" ng-click=\"cancel()\">{{'common.cancel.btn' | translate}} </button> <button id=\"graphql-endpoint-configuration-modal-submit\" class=\"btn btn-primary\" ng-disabled=\"!endpointConfigurationSettingsValid || savingEndpointSettings || formCtrl.\\$pristine\" ng-click=\"ok()\" type=\"submit\"> <span>{{'save.changes.label' | translate}}</span> <span class=\"saving-endpoint-settings\" ng-if=\"savingEndpointSettings\" onto-loader-fancy hide-message=\"true\" size=\"15\"></span> </button> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const __webpack_id__=42129;export const __webpack_ids__=[42129];export const __webpack_modules__={42129:(e,l,t)=>{t.r(l),t.d(l,{default:()=>s});const s='<link href="css/shuttle-multiselect.css?v=3.1.0-
|
|
2
|
-
//# sourceMappingURL=42129.
|
|
1
|
+
export const __webpack_id__=42129;export const __webpack_ids__=[42129];export const __webpack_modules__={42129:(e,l,t)=>{t.r(l),t.d(l,{default:()=>s});const s='<link href="css/shuttle-multiselect.css?v=3.1.0-TR9" rel="stylesheet"/> <div class="shuttle-multiselect"> <div class="shuttle-panel available-options"> <div class="shuttle-panel-header"> <h5>{{labels.availableOptionsTitle | translate}}</h5> </div> <div class="shuttle-panel-toolbar toolbar-left"> <input type="text" class="form-control filter-selected" placeholder="{{labels.availableOptionsFilter | translate}}" ng-model="searchLeft"> <a href="#" ng-click="selectAll()" class="btn-link secondary add-all-btn" gdb-tooltip="{{labels.selectAllTooltip | translate}}" tooltip-placement="top">{{labels.selectAllLabel | translate}}</a> </div> <div class="options-list"> <div class="option-item" ng-repeat="item in availableOptions | searchFilter:searchLeft | orderBy:\'label\' track by $index"> <span>{{item.label}}</span> <a href="#" ng-click="selectOption(item)" class="btn-link secondary item-action add-btn" gdb-tooltip="{{labels.selectTooltip | translate}}" tooltip-placement="top"> <span class="fa fa-plus-circle"></span> </a> </div> </div> </div> <div class="shuttle-panel selected-options"> <div class="shuttle-panel-header"> <h5>{{labels.selectedOptionsTitle | translate}}</h5> </div> <div class="shuttle-panel-toolbar toolbar-right"> <div ng-if="selectedOptions.length" class="selected-items-message"> {{labels.selectedOptionsCount | translate:{count: selectedOptions.length} }} </div> <a href="#" ng-click="deselectAll()" class="btn-link secondary remove-all-btn" gdb-tooltip="{{labels.deselectAllTooltip | translate}}" tooltip-placement="top">{{labels.deselectAllLabel | translate}}</a> </div> <div class="options-list"> <div class="option-item" ng-repeat="item in selectedOptions | orderBy:\'label\' track by $index"> <span>{{item.label}}</span> <a href="#" ng-click="deselectOption(item)" class="btn-link secondary item-action remove-btn" gdb-tooltip="{{labels.deselectTooltip | translate}}" tooltip-placement="top"> <span class="fa fa-minus-circle"></span> </a> </div> </div> </div> </div> '}};
|
|
2
|
+
//# sourceMappingURL=42129.8894dd599262ed62f5f9.bundle.js.map
|
package/dist/{42129.5369407e5c39404263ed.bundle.js.map → 42129.8894dd599262ed62f5f9.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"42129.
|
|
1
|
+
{"version":3,"file":"42129.8894dd599262ed62f5f9.bundle.js","mappings":"uJAGA,QAFW,i9D","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/shuttle-multiselect.css?v=3.1.0-TR9\" rel=\"stylesheet\"/> <div class=\"shuttle-multiselect\"> <div class=\"shuttle-panel available-options\"> <div class=\"shuttle-panel-header\"> <h5>{{labels.availableOptionsTitle | translate}}</h5> </div> <div class=\"shuttle-panel-toolbar toolbar-left\"> <input type=\"text\" class=\"form-control filter-selected\" placeholder=\"{{labels.availableOptionsFilter | translate}}\" ng-model=\"searchLeft\"> <a href=\"#\" ng-click=\"selectAll()\" class=\"btn-link secondary add-all-btn\" gdb-tooltip=\"{{labels.selectAllTooltip | translate}}\" tooltip-placement=\"top\">{{labels.selectAllLabel | translate}}</a> </div> <div class=\"options-list\"> <div class=\"option-item\" ng-repeat=\"item in availableOptions | searchFilter:searchLeft | orderBy:'label' track by \\$index\"> <span>{{item.label}}</span> <a href=\"#\" ng-click=\"selectOption(item)\" class=\"btn-link secondary item-action add-btn\" gdb-tooltip=\"{{labels.selectTooltip | translate}}\" tooltip-placement=\"top\"> <span class=\"fa fa-plus-circle\"></span> </a> </div> </div> </div> <div class=\"shuttle-panel selected-options\"> <div class=\"shuttle-panel-header\"> <h5>{{labels.selectedOptionsTitle | translate}}</h5> </div> <div class=\"shuttle-panel-toolbar toolbar-right\"> <div ng-if=\"selectedOptions.length\" class=\"selected-items-message\"> {{labels.selectedOptionsCount | translate:{count: selectedOptions.length} }} </div> <a href=\"#\" ng-click=\"deselectAll()\" class=\"btn-link secondary remove-all-btn\" gdb-tooltip=\"{{labels.deselectAllTooltip | translate}}\" tooltip-placement=\"top\">{{labels.deselectAllLabel | translate}}</a> </div> <div class=\"options-list\"> <div class=\"option-item\" ng-repeat=\"item in selectedOptions | orderBy:'label' track by \\$index\"> <span>{{item.label}}</span> <a href=\"#\" ng-click=\"deselectOption(item)\" class=\"btn-link secondary item-action remove-btn\" gdb-tooltip=\"{{labels.deselectTooltip | translate}}\" tooltip-placement=\"top\"> <span class=\"fa fa-minus-circle\"></span> </a> </div> </div> </div> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const __webpack_id__=44444;export const __webpack_ids__=[44444];export const __webpack_modules__={44444:(t,e,a)=>{a.r(e),a.d(e,{default:()=>s});const s='<link href="css/ttyg/no-agents-view.css?v=3.1.0-
|
|
2
|
-
//# sourceMappingURL=44444.
|
|
1
|
+
export const __webpack_id__=44444;export const __webpack_ids__=[44444];export const __webpack_modules__={44444:(t,e,a)=>{a.r(e),a.d(e,{default:()=>s});const s='<link href="css/ttyg/no-agents-view.css?v=3.1.0-TR9" rel="stylesheet"/> <div class="no-agents-view-component" data-test="no-agents-view-component"> <div class="content"> <div class="alert alert-help mb-3" data-test="ttyg-info-message" ng-bind-html="\'ttyg.agent.messages.help_1\' | translate | trustAsHtml"></div> <div class="alert alert-help mb-3" data-test="ttyg-agent-message" ng-bind-html="\'ttyg.agent.messages.help_2\' | translate | trustAsHtml"></div> <div class="actions"> <button class="btn btn-outline-primary btn-lg text-xs-left create-agent-btn" gdb-tooltip="{{!canModifyAgent ? (\'ttyg.agent.fat_btn.create_agent.tooltip_disabled\' | translate) : \'\'}}" ng-disabled="!canModifyAgent" ng-click="onCreateAgent()" guide-selector="create-agent-btn"> <i class="fa fa-message-bot fa-xl"></i> <span class="text">{{\'ttyg.agent.fat_btn.create_agent.label\' | translate}}</span> </button> </div> <div class="alert alert-warning mt-3" data-test="ttyg-api-key-message"> <div ng-bind-html="\'ttyg.agent.messages.help_config\' | translate: {talkToGraphDocumentationLink: talkToGraphDocumentationLink} | trustAsHtml"></div> </div> </div> </div> '}};
|
|
2
|
+
//# sourceMappingURL=44444.751ec83bdd2a4fd15395.bundle.js.map
|
package/dist/{44444.8b07608bcd9f51e6ce1c.bundle.js.map → 44444.751ec83bdd2a4fd15395.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"44444.
|
|
1
|
+
{"version":3,"file":"44444.751ec83bdd2a4fd15395.bundle.js","mappings":"uJAGA,QAFW,2nC","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/templates/no-agents-view.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/ttyg/no-agents-view.css?v=3.1.0-TR9\" rel=\"stylesheet\"/> <div class=\"no-agents-view-component\" data-test=\"no-agents-view-component\"> <div class=\"content\"> <div class=\"alert alert-help mb-3\" data-test=\"ttyg-info-message\" ng-bind-html=\"'ttyg.agent.messages.help_1' | translate | trustAsHtml\"></div> <div class=\"alert alert-help mb-3\" data-test=\"ttyg-agent-message\" ng-bind-html=\"'ttyg.agent.messages.help_2' | translate | trustAsHtml\"></div> <div class=\"actions\"> <button class=\"btn btn-outline-primary btn-lg text-xs-left create-agent-btn\" gdb-tooltip=\"{{!canModifyAgent ? ('ttyg.agent.fat_btn.create_agent.tooltip_disabled' | translate) : ''}}\" ng-disabled=\"!canModifyAgent\" ng-click=\"onCreateAgent()\" guide-selector=\"create-agent-btn\"> <i class=\"fa fa-message-bot fa-xl\"></i> <span class=\"text\">{{'ttyg.agent.fat_btn.create_agent.label' | translate}}</span> </button> </div> <div class=\"alert alert-warning mt-3\" data-test=\"ttyg-api-key-message\"> <div ng-bind-html=\"'ttyg.agent.messages.help_config' | translate: {talkToGraphDocumentationLink: talkToGraphDocumentationLink} | trustAsHtml\"></div> </div> </div> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const __webpack_id__=5470;export const __webpack_ids__=[5470,11637,14102,15435,22093,27473,41233,50083,50479,56139,71156,98551];export const __webpack_modules__={5470:(e,i,t)=>{t.r(i),t(56139),t(32150),t(81655);var r=t(27473),n=t(85727),s=t(15435),a=t(71156),y=t(22093),l=t(98551),o=t(50479),d=t(41233),u=t(14604),c=t(50083),I=t(57154);function m(e,i,t,m,S,p,h,T,x,g,Q,E,A,f,v,R){e.productInfo=T,e.SimilarityQueryType=l.SimilarityQueryType,e.SimilarityIndexType=o.SimilarityIndexType,e.similarityIndexInfo=void 0,e.samples=void 0,e.yasguiConfig=void 0,e.saveOrUpdateExecuted=!1,e.loadingControllerResources=!1,e.helpHidden=1===Q.get(E.HIDE_SIMILARITY_HELP),e.savingIndex=!1;let L,w,C,M=!1,D=y.SimilarityViewMode.CREATE,N=!0;e.changeSimilarityIndexType=(i,t=l.SimilarityQueryType.DATA)=>{e.similarityIndexInfo.setType(i),e.similarityIndexInfo.isPredicationType()?e.samples=w[o.SimilarityIndexType.PREDICATION]:e.samples=w[o.SimilarityIndexType.TEXT],e.changeQueryTab(t).then(i=>{_(e.similarityIndexInfo),e.setEditorQuery(e.similarityIndexInfo.getQuery())})},e.changeQueryTab=i=>{const t=e.similarityIndexInfo.getSelectedQueryType();return t===i?Promise.resolve():(e.similarityIndexInfo.setSelectedQueryType(i),O(e.similarityIndexInfo,t).then(e=>Z(e,t)).then(e=>K(e,t)).catch(e=>{e instanceof d.SimilarityIndexError||console.log(e)}).finally(()=>{const i=H();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode()),e.similarityIndexInfo.isDataQueryTypeSelected()?i.showYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]):i.hideYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]),i.setQuery(e.similarityIndexInfo.getQuery())}))},e.createSimilarityIndex=()=>{e.saveOrUpdateExecuted=!0,e.savingIndex=!0,O(e.similarityIndexInfo).then(Z).then(K).then(k).then(z).then(e=>U(e.getSimilarityIndex())).then(()=>V()).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),A.instant("similarity.could.not.get.indexes.error"))}).finally(()=>{e.savingIndex=!1})},e.viewQuery=()=>{O(e.similarityIndexInfo).then(k).then(P).then(Y).catch(e=>i.error(getError(e)))},e.preview=()=>{O(e.similarityIndexInfo).then(K).then(Z).then(()=>{const i=H();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASR),i.query(e.similarityIndexInfo.getSelectedYasguiRenderMode())})},e.saveSearchQuery=function(){M?(e.saveOrUpdateExecuted=!0,e.savingIndex=!0,O(e.similarityIndexInfo).then(F).then(Z).then(K).then(W).then(J).then(b).then(e=>x.showToastMessageWithDelay(e?"similarity.changed.search.query.msg":"similarity.changed.analogical.query.msg")).then(()=>{h.url("similarity")}).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),A.instant("similarity.change.query.error"))}).finally(()=>{e.savingIndex=!1})):h.url("similarity")},e.setEditorQuery=i=>{e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1),e.yasguiConfig?H().setQuery(i):q({initialQuery:i||" "})},e.similarityIndexNameChanged=()=>{e.setDirty(),e.similarityIndexInfo.isNameExist=!1},e.queryChanged=()=>{e.setDirty(),e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1)},e.isCloneViewMode=()=>y.SimilarityViewMode.CLONE===D,e.isEditViewMode=()=>y.SimilarityViewMode.EDIT===D,e.isCreateViewMode=()=>y.SimilarityViewMode.CREATE===D,e.setDirty=()=>{M=!0},e.isYasqeShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasqeRenderMode(),e.isYasrShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasrRenderMode(),e.showEditor=()=>{const i=H();i.abortQuery().then(()=>i.setQuery(e.similarityIndexInfo.getQuery())).then(()=>(e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode())))},e.toggleHelp=i=>{void 0===i&&(i=Q.get(E.HIDE_SIMILARITY_HELP)),1!==i?(Q.set(E.HIDE_SIMILARITY_HELP,1),e.helpHidden=!0):(Q.set(E.HIDE_SIMILARITY_HELP,0),e.helpHidden=!1)},e.getCloseBtnMsg=function(){let i=e.editSearchQuery?A.instant("similarity.query.edition.msg"):A.instant("similarity.index.creation.msg");return A.instant("similarity.close.btn.msg",{operation:i})},e.hasQueryError=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();return l.SimilarityQueryType.DATA===i?e.hasSelectQueryError():l.SimilarityQueryType.SEARCH===i?e.hasSearchQueryError():l.SimilarityQueryType.ANALOGICAL===i&&e.hasAnalogicalQueryError()},e.hasSelectQueryError=()=>!e.similarityIndexInfo.hasSelectQuery()||e.similarityIndexInfo.invalidSelectQuery||e.similarityIndexInfo.invalidSelectQueryType,e.hasSearchQueryError=()=>!e.similarityIndexInfo.hasSearchQuery()||e.similarityIndexInfo.invalidSearchQuery||e.similarityIndexInfo.invalidSearchQueryType,e.hasAnalogicalQueryError=()=>!e.similarityIndexInfo.hasAnalogicalQuery()||e.similarityIndexInfo.invalidAnalogicalQuery||e.similarityIndexInfo.invalidAnalogicalQueryType,e.getQueryErrorMessage=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();let t=!1,r=!1,n=!1;l.SimilarityQueryType.DATA===i?(t=!e.similarityIndexInfo.hasSelectQuery(),r=e.similarityIndexInfo.invalidSelectQueryType,n=e.similarityIndexInfo.invalidSelectQuery):l.SimilarityQueryType.SEARCH===i?(t=!e.similarityIndexInfo.hasSearchQuery(),r=e.similarityIndexInfo.invalidSearchQueryType,n=e.similarityIndexInfo.invalidSearchQuery):l.SimilarityQueryType.ANALOGICAL===i&&(t=!e.similarityIndexInfo.hasAnalogicalQuery(),r=e.similarityIndexInfo.invalidAnalogicalQueryType,n=e.similarityIndexInfo.invalidAnalogicalQuery);const s={queryType:A.instant(`similarity.query.type.${i}.name`)};return t?A.instant("similarity.error.query.empty",s):n?A.instant("similarity.error.query.invalid",s):r?A.instant("similarity.error.query.invalid_type",s):""};const O=(e,i=void 0)=>H().getQuery().then(t=>e.setQuery(t,i)).then(()=>e),P=e=>S.getQuery({indexName:e.getName(),indexOptions:e.getOptions(),query:e.getQuery(),indexStopList:e.getStopList(),queryInference:e.getInference(),querySameAs:e.getSameAs(),viewType:e.getSelectedQueryType(),indexAnalyzer:e.getAnalyzer()}).then(e=>e.data),Y=e=>{e&&t.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},_=i=>{const t=i.getType();if(!e.isEditViewMode()&&L&&(i.setQuery(L[t],l.SimilarityQueryType.SEARCH),i.setQuery(L.analogical,l.SimilarityQueryType.ANALOGICAL)),w)if(o.SimilarityIndexType.PREDICATION===t){const e=w[o.SimilarityIndexType.PREDICATION].predication;i.setQuery(e,l.SimilarityQueryType.DATA)}else{const e=w[o.SimilarityIndexType.TEXT].literals;i.setQuery(e,l.SimilarityQueryType.DATA)}},q=i=>{const t={endpoint:B,componentId:"create-index",showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showYasqeActionButtons:!1,showQueryButton:!1,downloadAsOn:!1,showResultInfo:!1,showYasqeResizer:!1,pageSize:100,prefixes:C,render:e.similarityIndexInfo.getSelectedYasguiRenderMode(),yasqeActionButtons:e.isEditViewMode()||!e.similarityIndexInfo.isDataQueryTypeSelected()?n.DISABLE_YASQE_BUTTONS_CONFIGURATION:n.INFERRED_AND_SAME_AS_BUTTONS_CONFIGURATION,maxPersistentResponseSize:0,yasqeMode:e.canWriteActiveRepo()?a.YasqeMode.WRITE:a.YasqeMode.READ},r={};angular.extend(r,t,i),e.yasguiConfig=r},B=()=>`repositories/${f.getActiveRepository()}`,U=t=>{if(void 0!==e.literalIndexes){const i=t.inputIndex;i!==e.literalIndexes[0]&&(t.options=t.options+(""===t.options?"":" ")+"-input_index "+i)}return"true"===t.isLiteralIndex&&(t.options=t.options+(""===t.options?"":" ")+"-literal_index true",t.type=o.SimilarityIndexType.TEXT_LITERAL),M=!1,S.createIndex("POST",t.name,t.options,t.selectQuery,t.searchQuery,t.isPredicationType()?t.analogicalQuery:"",t.stopList,t.infer,t.sameAs,t.type,t.analyzer).then(()=>(i.success(A.instant("similarity.create.index.successfully")),t)).catch(function(e){const t=getError(e);return i.error(t,A.instant("similarity.create.index.error")),console.log(t),Promise.reject(new d.SimilarityIndexError("Could not create index."))})},b=e=>{const i=e.isSearchQueryTypeSelected();let t={name:e.getSimilarityIndex().name,changedQuery:e.getQuery(),isSearchQuery:i};return S.saveSearchQuery(JSON.stringify(t)).then(()=>(M=!1,i))},V=()=>{m(()=>h.url("similarity"),100)},H=()=>n.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor"),G=()=>{const i=h.search().name||"";return e.isCloneViewMode()?`${A.instant("similarity.copy_of.prefix")}_${i}`:i},$=()=>{const e=h.search().type;return void 0===e||e.startsWith("text")?o.SimilarityIndexType.TEXT:e},j=(e,i)=>{const t=e.options.split(" ");for(let r=0;r<t.length;r++)if(t[r]===i&&r+1<t.length){const i=t[r+1];return delete t[r],delete t[r+1],e.options=t.join(" "),i}},k=e=>Promise.all([F(e).then(X).then(W).then(J).then(K).then(Z)]).then(()=>e),z=e=>S.getIndexes().then(i=>i.data.some(i=>i.name===e.getName())?(e.isNameExist=!0,Promise.reject(new d.SimilarityIndexError("Similarity index name exists."))):e),F=e=>e.getSimilarityIndex().name?e.isNameValid()?Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Invalid similarity name.")):Promise.reject(new d.SimilarityIndexError("Missing similarity name.")),X=e=>e.hasSelectQuery()?e.invalidSelectQuery?Promise.reject(new d.SimilarityIndexError("Invalid select query")):e.invalidSelectQueryType?Promise.reject(new d.SimilarityIndexError("Invalid select query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing select query.")),W=e=>e.hasSearchQuery()?e.invalidSearchQuery?Promise.reject(new d.SimilarityIndexError("Invalid search query")):e.invalidSearchQueryType?Promise.reject(new d.SimilarityIndexError("Invalid search query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing search query.")),J=e=>e.isPredicationType()&&!e.hasAnalogicalQuery()?Promise.reject(new d.SimilarityIndexError("Missing analogical query.")):e.invalidAnalogicalQuery?Promise.reject(new d.SimilarityIndexError("Invalid analogical query")):e.invalidAnalogicalQueryType?Promise.reject(new d.SimilarityIndexError("Invalid analogical query type")):Promise.resolve(e),K=(e,i=void 0)=>H().getQueryType().then(t=>u.QueryType.SELECT!==t?(e.markInvalidQueryType(i),Promise.reject(new d.SimilarityIndexError("Query type is not valid."))):(e.markInvalidQueryType(i,!1),e)),Z=(e,i=void 0)=>H().isQueryValid().then(t=>t?(e.markInvalidQuery(i,!1),e):(e.markInvalidQuery(i),Promise.reject(new d.SimilarityIndexError("Query is not valid.")))),ee=(e,i,t,r)=>{R.openSimpleModal({title:e,message:i,warning:!0}).result.then(function(){angular.isFunction(t)&&t()},function(){angular.isFunction(r)&&r()})},ie=()=>{e.isYasrShown()&&e.similarityIndexInfo.isDataQueryTypeSelected()&&e.showEditor(),e.canEditActiveRepo=e.canWriteActiveRepo();const i={...e.yasguiConfig,yasqeMode:e.canWriteActiveRepo()};q(i)},te=e=>{M&&(e.returnValue=!0)},re=()=>{window.removeEventListener("beforeunload",te),ne.forEach(e=>e())},ne=[],se=I.ServiceProvider.get(I.RepositoryContextService).onSelectedRepositoryChanged(()=>{N?N=!1:V()},()=>new Promise(function(i){if(e.isCreateViewMode()||e.isCloneViewMode())return void i(!0);const t=()=>{M=!1,i(!0)};if(M){const e=()=>{i(!1)},r=A.instant("common.confirm"),n=A.instant("similarity.warning.unsaved.changes");ee(r,n,t,e)}else t()}));ne.push(se),ne.push(e.$on("$locationChangeStart",(e,i)=>{if(M){e.preventDefault();const t=A.instant("common.confirm"),r=A.instant("similarity.warning.unsaved.changes");ee(t,r,()=>{re();const e=h.absUrl().length-h.url().length,t=i.substring(e);h.path(t)})}else re()})),ne.push(e.$on("$destroy",re)),window.addEventListener("beforeunload",te),D=(()=>{if(void 0===h.search().name)return y.SimilarityViewMode.CREATE;const e=h.search().editSearchQuery;return void 0===e?y.SimilarityViewMode.CLONE:"string"==typeof e?"false"===e?y.SimilarityViewMode.CLONE:y.SimilarityViewMode.EDIT:e?y.SimilarityViewMode.EDIT:y.SimilarityViewMode.CLONE})();const ae=e.$watch(function(){return e.getActiveRepositoryObject()},function(t){t&&(e.loadingControllerResources=!0,Promise.all([S.getSearchQueries(),S.getSamples(),f.getPrefixes(t.id)]).then(([t,n,s])=>{e.canEditActiveRepo=e.canWriteActiveRepo(),L=t?t.data:[],w=n?n.data:[],C=s,(()=>{const t=new c.SimilarityIndexInfo;t.setName(G()),t.setType($()),t.setSelectedQueryType(e.isEditViewMode()?l.SimilarityQueryType.SEARCH:l.SimilarityQueryType.DATA);const n=h.search().options;n?t.setOptions(n):t.setOptions(t.isTextType()?"-termweight idf":""),_(t);const s=h.search().searchQuery;s&&t.setQuery(s,l.SimilarityQueryType.SEARCH);const a=h.search().selectQuery;a&&t.setQuery(a,l.SimilarityQueryType.DATA);const y=h.search().analogicalQuery;if(y&&t.setQuery(y,l.SimilarityQueryType.ANALOGICAL),t.isTextType()){t.setStopList(h.search().stopList),t.setAnalyzer(h.search().analyzer);const e=j(t.getSimilarityIndex(),"-literal_index");void 0!==e&&t.setLiteralIndex(e)}return t.isPredicationType()?S.getIndexes().then(i=>{const n=(0,r.mapIndexesResponseToSimilarityIndex)(i.data).filter(e=>e.isTextLiteralType()&&(e.isBuiltStatus()||e.isOutdatedStatus())).map(e=>e.name);if(e.literalIndexes=["no-index"].concat(n),void 0===t.getInputIndex()){const i=j(t.getSimilarityIndex(),"-input_index");if(void 0!==i)for(let r=0;r<e.literalIndexes.length;r++)i===e.literalIndexes[r]&&t.setInputIndex(e.literalIndexes[r])}return void 0===t.getInputIndex()&&t.setInputIndex(e.literalIndexes[0]),t}).catch(function(e){const t=getError(e);i.error(t,A.instant("similarity.could.not.get.indexes.error"))}):Promise.resolve(t)})().then(i=>{e.similarityIndexInfo=i;let t=l.SimilarityQueryType.DATA;e.isEditViewMode()&&(t=l.SimilarityQueryType.SEARCH),e.changeSimilarityIndexType(i.getType(),t)})}).catch(i=>{console.log(i),e.repositoryError=getError(i)}).finally(()=>{ne.push(e.$on("repositoryIsSet",ie)),ae(),e.loadingControllerResources=!1}))})}angular.module("graphdb.framework.similarity.controllers.create",["graphdb.framework.utils.notifications","graphdb.framework.utils.localstorageadapter"]).controller("CreateSimilarityIdxCtrl",m),m.$inject=["$scope","toastr","$uibModal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate","$repositories","EventEmitterService","ModalService"]},11637:(e,i,t)=>{t.r(i),t.d(i,{SimilarityIndexStatus:()=>r});const r={CREATING:"CREATING",BUILDING:"BUILDING",BUILT:"BUILT",REBUILDING:"REBUILDING",OUTDATED:"OUTDATED",INTERRUPTED:"INTERRUPTED",OBSOLETE:"OBSOLETE",FAILED:"FAILED",isCreatingStatus:e=>r.CREATING===e,isBuildingStatus:e=>r.BUILDING===e,isBuiltStatus:e=>r.BUILT===e,isRebuildingStatus:e=>r.REBUILDING===e,isOutdatedStatus:e=>r.OUTDATED===e,isInterruptedStatus:e=>r.INTERRUPTED===e,isObsoleteStatus:e=>r.OBSOLETE===e,isFailedStatus:e=>r.FAILED===e}},14102:(e,i,t)=>{t.r(i),t.d(i,{SimilarityIndex:()=>s});var r=t(50479),n=t(11637);class s{constructor(){this.analyzer="",this.infer=!0,this.options="",this.sameAs=!0,this.searchQuery="",this.selectQuery="",this.stopList=void 0,this.name="",this.type=r.SimilarityIndexType.TEXT,this.status=void 0,this.analogicalQuery=void 0,this.inputIndex=void 0,this.isLiteralIndex=""}isTextType(){return r.SimilarityIndexType.isTextType(this.type)}isTextLiteralType(){return r.SimilarityIndexType.isTextLiteralType(this.type)}isPredicationType(){return r.SimilarityIndexType.isPredicationType(this.type)}isCreatingStatus(){return n.SimilarityIndexStatus.isCreatingStatus(this.status)}isBuildingStatus(){return n.SimilarityIndexStatus.isBuildingStatus(this.status)}isBuiltStatus(){return n.SimilarityIndexStatus.isBuiltStatus(this.status)}isRebuildingStatus(){return n.SimilarityIndexStatus.isRebuildingStatus(this.status)}isOutdatedStatus(){return n.SimilarityIndexStatus.isOutdatedStatus(this.status)}isInterruptedStatus(){return n.SimilarityIndexStatus.isInterruptedStatus(this.status)}isObsoleteStatus(){return n.SimilarityIndexStatus.isObsoleteStatus(this.status)}isFailedStatus(){return n.SimilarityIndexStatus.isFailedStatus(this.status)}}},15435:(e,i,t)=>{t.r(i),t.d(i,{RenderingMode:()=>r});const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},22093:(e,i,t)=>{t.r(i),t.d(i,{SimilarityViewMode:()=>r});const r={CREATE:"CREATE",EDIT:"EDIT",CLONE:"CLONE"}},27473:(e,i,t)=>{t.r(i),t.d(i,{mapIndexesResponseToSimilarityIndex:()=>n});var r=t(14102);const n=e=>e.map(e=>{const i=new r.SimilarityIndex;return i.type=e.type,i.stopList=e.stopList,i.status=e.status,i.selectQuery=e.selectQuery,i.searchQuery=e.searchQuery,i.sameAs=e.sameAs,i.options=e.options,i.name=e.name,i.infer=e.infer,i.analyzer=e.analyzer,i.analogicalQuery=e.analogicalQuery,i})},41233:(e,i,t)=>{t.r(i),t.d(i,{SimilarityIndexError:()=>r});class r extends Error{}},50083:(e,i,t)=>{t.r(i),t.d(i,{SimilarityIndexInfo:()=>y});var r=t(14102),n=t(98551),s=t(15435);const a=new RegExp("^[a-zA-Z0-9-_]+$");class y{constructor(){this.similarityIndex=new r.SimilarityIndex,this.isNameExist=!1,this.invalidSelectQueryType=!1,this.invalidSelectQuery=!1,this.invalidSearchQueryType=!1,this.invalidSearchQuery=!1,this.invalidAnalogicalQueryType=!1,this.invalidAnalogicalQuery=!1,this.selectedQueryType=n.SimilarityQueryType.DATA,this.selectedYasguiRenderMode=s.RenderingMode.YASQE}setQuery(e,i=void 0){const t=i||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.similarityIndex.analogicalQuery=e):this.similarityIndex.searchQuery=e:this.similarityIndex.selectQuery=e}getQuery(e=void 0){switch(e||this.selectedQueryType){case n.SimilarityQueryType.DATA:return this.similarityIndex.selectQuery;case n.SimilarityQueryType.SEARCH:return this.similarityIndex.searchQuery;case n.SimilarityQueryType.ANALOGICAL:return this.similarityIndex.analogicalQuery}}markInvalidQuery(e=void 0,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQuery=i):this.invalidSearchQuery=i:this.invalidSelectQuery=i}markInvalidQueryType(e=void 0,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQueryType=i):this.invalidSearchQueryType=i:this.invalidSelectQueryType=i}setSelectedQueryType(e){this.selectedQueryType=e}getSelectedQueryType(){return this.selectedQueryType}setSelectedYasguiRenderMode(e){this.selectedYasguiRenderMode=e}getSelectedYasguiRenderMode(){return this.selectedYasguiRenderMode}isDataQueryTypeSelected(){return n.SimilarityQueryType.DATA===this.selectedQueryType}isSearchQueryTypeSelected(){return n.SimilarityQueryType.SEARCH===this.selectedQueryType}isAnalogicalQueryTypeSelected(){return n.SimilarityQueryType.ANALOGICAL===this.selectedQueryType}isTextType(){return this.similarityIndex.isTextType()}isPredicationType(){return this.similarityIndex.isPredicationType()}isTextLiteralType(){return this.similarityIndex.isTextLiteralType()}hasName(){return!!this.similarityIndex.name}isNameValid(){return a.test(this.similarityIndex.name)}hasSelectQuery(){return!!this.similarityIndex.selectQuery}hasSearchQuery(){return!!this.similarityIndex.searchQuery}hasAnalogicalQuery(){return!!this.similarityIndex.analogicalQuery}isYasqeRenderMode(){return s.RenderingMode.YASQE===this.getSelectedYasguiRenderMode()}isYasrRenderMode(){return s.RenderingMode.YASR===this.getSelectedYasguiRenderMode()}getName(){return this.similarityIndex.name}setName(e){this.similarityIndex.name=e}setInputIndex(e){this.similarityIndex.inputIndex=e}getInputIndex(){return this.similarityIndex.inputIndex}setLiteralIndex(e=!1){this.similarityIndex.isLiteralIndex=e}getSimilarityIndex(){return this.similarityIndex}setStopList(e){this.similarityIndex.stopList=e}getStopList(){return this.similarityIndex.stopList}setAnalyzer(e="org.apache.lucene.analysis.en.EnglishAnalyzer"){this.similarityIndex.analyzer=e}getAnalyzer(){return this.similarityIndex.analyzer}setType(e){this.similarityIndex.type=e}getType(){return this.similarityIndex.type}setOptions(e){this.similarityIndex.options=e}getOptions(){return this.similarityIndex.options}getInference(){return this.similarityIndex.infer}getSameAs(){return this.similarityIndex.sameAs}}},50479:(e,i,t)=>{t.r(i),t.d(i,{SimilarityIndexType:()=>r});const r={TEXT:"text",TEXT_LITERAL:"textLiteral",PREDICATION:"predication",isTextType:e=>r.TEXT===e,isTextLiteralType:e=>r.TEXT_LITERAL===e,isPredicationType:e=>r.PREDICATION===e}},56139:()=>{function e(e,i){return{showToastMessageWithDelay:function(t){return new Promise(r=>{e.success(i.instant(t)),setTimeout(r,300)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",e),e.$inject=["toastr","$translate"]},71156:(e,i,t)=>{t.r(i),t.d(i,{YasqeMode:()=>r});const r={WRITE:"WRITE",READ:"READ",PROTECTED:"PROTECTED"}},98551:(e,i,t)=>{t.r(i),t.d(i,{SimilarityQueryType:()=>r});const r={DATA:"DATA",SEARCH:"SEARCH",ANALOGICAL:"ANALOGICAL"}}};
|
|
2
|
-
//# sourceMappingURL=5470.
|
|
1
|
+
export const __webpack_id__=5470;export const __webpack_ids__=[5470,11637,14102,15435,22093,27473,41233,50083,50479,56139,71156,98551];export const __webpack_modules__={5470:(e,i,t)=>{t.r(i),t(56139),t(32150),t(81655);var r=t(27473),n=t(85727),s=t(15435),a=t(71156),y=t(22093),l=t(98551),o=t(50479),d=t(41233),u=t(14604),c=t(50083),I=t(57154);function m(e,i,t,m,S,p,h,T,x,g,Q,E,A,f,v,R){e.productInfo=T,e.SimilarityQueryType=l.SimilarityQueryType,e.SimilarityIndexType=o.SimilarityIndexType,e.similarityIndexInfo=void 0,e.samples=void 0,e.yasguiConfig=void 0,e.saveOrUpdateExecuted=!1,e.loadingControllerResources=!1,e.helpHidden=1===Q.get(E.HIDE_SIMILARITY_HELP),e.savingIndex=!1;let L,w,C,M=!1,D=y.SimilarityViewMode.CREATE,N=!0;e.changeSimilarityIndexType=(i,t=l.SimilarityQueryType.DATA)=>{e.similarityIndexInfo.setType(i),e.similarityIndexInfo.isPredicationType()?e.samples=w[o.SimilarityIndexType.PREDICATION]:e.samples=w[o.SimilarityIndexType.TEXT],e.changeQueryTab(t).then(i=>{_(e.similarityIndexInfo),e.setEditorQuery(e.similarityIndexInfo.getQuery())})},e.changeQueryTab=i=>{const t=e.similarityIndexInfo.getSelectedQueryType();return t===i?Promise.resolve():(e.similarityIndexInfo.setSelectedQueryType(i),O(e.similarityIndexInfo,t).then(e=>Z(e,t)).then(e=>K(e,t)).catch(e=>{e instanceof d.SimilarityIndexError||console.log(e)}).finally(()=>{const i=H();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode()),e.similarityIndexInfo.isDataQueryTypeSelected()?i.showYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]):i.hideYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]),i.setQuery(e.similarityIndexInfo.getQuery())}))},e.createSimilarityIndex=()=>{e.saveOrUpdateExecuted=!0,e.savingIndex=!0,O(e.similarityIndexInfo).then(Z).then(K).then(k).then(z).then(e=>U(e.getSimilarityIndex())).then(()=>V()).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),A.instant("similarity.could.not.get.indexes.error"))}).finally(()=>{e.savingIndex=!1})},e.viewQuery=()=>{O(e.similarityIndexInfo).then(k).then(P).then(Y).catch(e=>i.error(getError(e)))},e.preview=()=>{O(e.similarityIndexInfo).then(K).then(Z).then(()=>{const i=H();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASR),i.query(e.similarityIndexInfo.getSelectedYasguiRenderMode())})},e.saveSearchQuery=function(){M?(e.saveOrUpdateExecuted=!0,e.savingIndex=!0,O(e.similarityIndexInfo).then(F).then(Z).then(K).then(W).then(J).then(b).then(e=>x.showToastMessageWithDelay(e?"similarity.changed.search.query.msg":"similarity.changed.analogical.query.msg")).then(()=>{h.url("similarity")}).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),A.instant("similarity.change.query.error"))}).finally(()=>{e.savingIndex=!1})):h.url("similarity")},e.setEditorQuery=i=>{e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1),e.yasguiConfig?H().setQuery(i):q({initialQuery:i||" "})},e.similarityIndexNameChanged=()=>{e.setDirty(),e.similarityIndexInfo.isNameExist=!1},e.queryChanged=()=>{e.setDirty(),e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1)},e.isCloneViewMode=()=>y.SimilarityViewMode.CLONE===D,e.isEditViewMode=()=>y.SimilarityViewMode.EDIT===D,e.isCreateViewMode=()=>y.SimilarityViewMode.CREATE===D,e.setDirty=()=>{M=!0},e.isYasqeShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasqeRenderMode(),e.isYasrShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasrRenderMode(),e.showEditor=()=>{const i=H();i.abortQuery().then(()=>i.setQuery(e.similarityIndexInfo.getQuery())).then(()=>(e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode())))},e.toggleHelp=i=>{void 0===i&&(i=Q.get(E.HIDE_SIMILARITY_HELP)),1!==i?(Q.set(E.HIDE_SIMILARITY_HELP,1),e.helpHidden=!0):(Q.set(E.HIDE_SIMILARITY_HELP,0),e.helpHidden=!1)},e.getCloseBtnMsg=function(){let i=e.editSearchQuery?A.instant("similarity.query.edition.msg"):A.instant("similarity.index.creation.msg");return A.instant("similarity.close.btn.msg",{operation:i})},e.hasQueryError=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();return l.SimilarityQueryType.DATA===i?e.hasSelectQueryError():l.SimilarityQueryType.SEARCH===i?e.hasSearchQueryError():l.SimilarityQueryType.ANALOGICAL===i&&e.hasAnalogicalQueryError()},e.hasSelectQueryError=()=>!e.similarityIndexInfo.hasSelectQuery()||e.similarityIndexInfo.invalidSelectQuery||e.similarityIndexInfo.invalidSelectQueryType,e.hasSearchQueryError=()=>!e.similarityIndexInfo.hasSearchQuery()||e.similarityIndexInfo.invalidSearchQuery||e.similarityIndexInfo.invalidSearchQueryType,e.hasAnalogicalQueryError=()=>!e.similarityIndexInfo.hasAnalogicalQuery()||e.similarityIndexInfo.invalidAnalogicalQuery||e.similarityIndexInfo.invalidAnalogicalQueryType,e.getQueryErrorMessage=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();let t=!1,r=!1,n=!1;l.SimilarityQueryType.DATA===i?(t=!e.similarityIndexInfo.hasSelectQuery(),r=e.similarityIndexInfo.invalidSelectQueryType,n=e.similarityIndexInfo.invalidSelectQuery):l.SimilarityQueryType.SEARCH===i?(t=!e.similarityIndexInfo.hasSearchQuery(),r=e.similarityIndexInfo.invalidSearchQueryType,n=e.similarityIndexInfo.invalidSearchQuery):l.SimilarityQueryType.ANALOGICAL===i&&(t=!e.similarityIndexInfo.hasAnalogicalQuery(),r=e.similarityIndexInfo.invalidAnalogicalQueryType,n=e.similarityIndexInfo.invalidAnalogicalQuery);const s={queryType:A.instant(`similarity.query.type.${i}.name`)};return t?A.instant("similarity.error.query.empty",s):n?A.instant("similarity.error.query.invalid",s):r?A.instant("similarity.error.query.invalid_type",s):""};const O=(e,i=void 0)=>H().getQuery().then(t=>e.setQuery(t,i)).then(()=>e),P=e=>S.getQuery({indexName:e.getName(),indexOptions:e.getOptions(),query:e.getQuery(),indexStopList:e.getStopList(),queryInference:e.getInference(),querySameAs:e.getSameAs(),viewType:e.getSelectedQueryType(),indexAnalyzer:e.getAnalyzer()}).then(e=>e.data),Y=e=>{e&&t.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},_=i=>{const t=i.getType();if(!e.isEditViewMode()&&L&&(i.setQuery(L[t],l.SimilarityQueryType.SEARCH),i.setQuery(L.analogical,l.SimilarityQueryType.ANALOGICAL)),w)if(o.SimilarityIndexType.PREDICATION===t){const e=w[o.SimilarityIndexType.PREDICATION].predication;i.setQuery(e,l.SimilarityQueryType.DATA)}else{const e=w[o.SimilarityIndexType.TEXT].literals;i.setQuery(e,l.SimilarityQueryType.DATA)}},q=i=>{const t={endpoint:B,componentId:"create-index",showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showYasqeActionButtons:!1,showQueryButton:!1,downloadAsOn:!1,showResultInfo:!1,showYasqeResizer:!1,pageSize:100,prefixes:C,render:e.similarityIndexInfo.getSelectedYasguiRenderMode(),yasqeActionButtons:e.isEditViewMode()||!e.similarityIndexInfo.isDataQueryTypeSelected()?n.DISABLE_YASQE_BUTTONS_CONFIGURATION:n.INFERRED_AND_SAME_AS_BUTTONS_CONFIGURATION,maxPersistentResponseSize:0,yasqeMode:e.canWriteActiveRepo()?a.YasqeMode.WRITE:a.YasqeMode.READ},r={};angular.extend(r,t,i),e.yasguiConfig=r},B=()=>`repositories/${f.getActiveRepository()}`,U=t=>{if(void 0!==e.literalIndexes){const i=t.inputIndex;i!==e.literalIndexes[0]&&(t.options=t.options+(""===t.options?"":" ")+"-input_index "+i)}return"true"===t.isLiteralIndex&&(t.options=t.options+(""===t.options?"":" ")+"-literal_index true",t.type=o.SimilarityIndexType.TEXT_LITERAL),M=!1,S.createIndex("POST",t.name,t.options,t.selectQuery,t.searchQuery,t.isPredicationType()?t.analogicalQuery:"",t.stopList,t.infer,t.sameAs,t.type,t.analyzer).then(()=>(i.success(A.instant("similarity.create.index.successfully")),t)).catch(function(e){const t=getError(e);return i.error(t,A.instant("similarity.create.index.error")),console.log(t),Promise.reject(new d.SimilarityIndexError("Could not create index."))})},b=e=>{const i=e.isSearchQueryTypeSelected();let t={name:e.getSimilarityIndex().name,changedQuery:e.getQuery(),isSearchQuery:i};return S.saveSearchQuery(JSON.stringify(t)).then(()=>(M=!1,i))},V=()=>{m(()=>h.url("similarity"),100)},H=()=>n.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor"),G=()=>{const i=h.search().name||"";return e.isCloneViewMode()?`${A.instant("similarity.copy_of.prefix")}_${i}`:i},$=()=>{const e=h.search().type;return void 0===e||e.startsWith("text")?o.SimilarityIndexType.TEXT:e},j=(e,i)=>{const t=e.options.split(" ");for(let r=0;r<t.length;r++)if(t[r]===i&&r+1<t.length){const i=t[r+1];return delete t[r],delete t[r+1],e.options=t.join(" "),i}},k=e=>Promise.all([F(e).then(X).then(W).then(J).then(K).then(Z)]).then(()=>e),z=e=>S.getIndexes().then(i=>i.data.some(i=>i.name===e.getName())?(e.isNameExist=!0,Promise.reject(new d.SimilarityIndexError("Similarity index name exists."))):e),F=e=>e.getSimilarityIndex().name?e.isNameValid()?Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Invalid similarity name.")):Promise.reject(new d.SimilarityIndexError("Missing similarity name.")),X=e=>e.hasSelectQuery()?e.invalidSelectQuery?Promise.reject(new d.SimilarityIndexError("Invalid select query")):e.invalidSelectQueryType?Promise.reject(new d.SimilarityIndexError("Invalid select query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing select query.")),W=e=>e.hasSearchQuery()?e.invalidSearchQuery?Promise.reject(new d.SimilarityIndexError("Invalid search query")):e.invalidSearchQueryType?Promise.reject(new d.SimilarityIndexError("Invalid search query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing search query.")),J=e=>e.isPredicationType()&&!e.hasAnalogicalQuery()?Promise.reject(new d.SimilarityIndexError("Missing analogical query.")):e.invalidAnalogicalQuery?Promise.reject(new d.SimilarityIndexError("Invalid analogical query")):e.invalidAnalogicalQueryType?Promise.reject(new d.SimilarityIndexError("Invalid analogical query type")):Promise.resolve(e),K=(e,i=void 0)=>H().getQueryType().then(t=>u.QueryType.SELECT!==t?(e.markInvalidQueryType(i),Promise.reject(new d.SimilarityIndexError("Query type is not valid."))):(e.markInvalidQueryType(i,!1),e)),Z=(e,i=void 0)=>H().isQueryValid().then(t=>t?(e.markInvalidQuery(i,!1),e):(e.markInvalidQuery(i),Promise.reject(new d.SimilarityIndexError("Query is not valid.")))),ee=(e,i,t,r)=>{R.openSimpleModal({title:e,message:i,warning:!0}).result.then(function(){angular.isFunction(t)&&t()},function(){angular.isFunction(r)&&r()})},ie=()=>{e.isYasrShown()&&e.similarityIndexInfo.isDataQueryTypeSelected()&&e.showEditor(),e.canEditActiveRepo=e.canWriteActiveRepo();const i={...e.yasguiConfig,yasqeMode:e.canWriteActiveRepo()};q(i)},te=e=>{M&&(e.returnValue=!0)},re=()=>{window.removeEventListener("beforeunload",te),ne.forEach(e=>e())},ne=[],se=I.ServiceProvider.get(I.RepositoryContextService).onSelectedRepositoryChanged(e=>{e&&(N?N=!1:V())},()=>new Promise(function(i){if(e.isCreateViewMode()||e.isCloneViewMode())return void i(!0);const t=()=>{M=!1,i(!0)};if(M){const e=()=>{i(!1)},r=A.instant("common.confirm"),n=A.instant("similarity.warning.unsaved.changes");ee(r,n,t,e)}else t()}));ne.push(se),ne.push(e.$on("$locationChangeStart",(e,i)=>{if(M){e.preventDefault();const t=A.instant("common.confirm"),r=A.instant("similarity.warning.unsaved.changes");ee(t,r,()=>{re();const e=h.absUrl().length-h.url().length,t=i.substring(e);h.path(t)})}else re()})),ne.push(e.$on("$destroy",re)),window.addEventListener("beforeunload",te),D=(()=>{if(void 0===h.search().name)return y.SimilarityViewMode.CREATE;const e=h.search().editSearchQuery;return void 0===e?y.SimilarityViewMode.CLONE:"string"==typeof e?"false"===e?y.SimilarityViewMode.CLONE:y.SimilarityViewMode.EDIT:e?y.SimilarityViewMode.EDIT:y.SimilarityViewMode.CLONE})();const ae=e.$watch(function(){return e.getActiveRepositoryObject()},function(t){t&&(e.loadingControllerResources=!0,Promise.all([S.getSearchQueries(),S.getSamples(),f.getPrefixes(t.id)]).then(([t,n,s])=>{e.canEditActiveRepo=e.canWriteActiveRepo(),L=t?t.data:[],w=n?n.data:[],C=s,(()=>{const t=new c.SimilarityIndexInfo;t.setName(G()),t.setType($()),t.setSelectedQueryType(e.isEditViewMode()?l.SimilarityQueryType.SEARCH:l.SimilarityQueryType.DATA);const n=h.search().options;n?t.setOptions(n):t.setOptions(t.isTextType()?"-termweight idf":""),_(t);const s=h.search().searchQuery;s&&t.setQuery(s,l.SimilarityQueryType.SEARCH);const a=h.search().selectQuery;a&&t.setQuery(a,l.SimilarityQueryType.DATA);const y=h.search().analogicalQuery;if(y&&t.setQuery(y,l.SimilarityQueryType.ANALOGICAL),t.isTextType()){t.setStopList(h.search().stopList),t.setAnalyzer(h.search().analyzer);const e=j(t.getSimilarityIndex(),"-literal_index");void 0!==e&&t.setLiteralIndex(e)}return t.isPredicationType()?S.getIndexes().then(i=>{const n=(0,r.mapIndexesResponseToSimilarityIndex)(i.data).filter(e=>e.isTextLiteralType()&&(e.isBuiltStatus()||e.isOutdatedStatus())).map(e=>e.name);if(e.literalIndexes=["no-index"].concat(n),void 0===t.getInputIndex()){const i=j(t.getSimilarityIndex(),"-input_index");if(void 0!==i)for(let r=0;r<e.literalIndexes.length;r++)i===e.literalIndexes[r]&&t.setInputIndex(e.literalIndexes[r])}return void 0===t.getInputIndex()&&t.setInputIndex(e.literalIndexes[0]),t}).catch(function(e){const t=getError(e);i.error(t,A.instant("similarity.could.not.get.indexes.error"))}):Promise.resolve(t)})().then(i=>{e.similarityIndexInfo=i;let t=l.SimilarityQueryType.DATA;e.isEditViewMode()&&(t=l.SimilarityQueryType.SEARCH),e.changeSimilarityIndexType(i.getType(),t)})}).catch(i=>{console.log(i),e.repositoryError=getError(i)}).finally(()=>{ne.push(e.$on("repositoryIsSet",ie)),ae(),e.loadingControllerResources=!1}))})}angular.module("graphdb.framework.similarity.controllers.create",["graphdb.framework.utils.notifications","graphdb.framework.utils.localstorageadapter"]).controller("CreateSimilarityIdxCtrl",m),m.$inject=["$scope","toastr","$uibModal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate","$repositories","EventEmitterService","ModalService"]},11637:(e,i,t)=>{t.r(i),t.d(i,{SimilarityIndexStatus:()=>r});const r={CREATING:"CREATING",BUILDING:"BUILDING",BUILT:"BUILT",REBUILDING:"REBUILDING",OUTDATED:"OUTDATED",INTERRUPTED:"INTERRUPTED",OBSOLETE:"OBSOLETE",FAILED:"FAILED",isCreatingStatus:e=>r.CREATING===e,isBuildingStatus:e=>r.BUILDING===e,isBuiltStatus:e=>r.BUILT===e,isRebuildingStatus:e=>r.REBUILDING===e,isOutdatedStatus:e=>r.OUTDATED===e,isInterruptedStatus:e=>r.INTERRUPTED===e,isObsoleteStatus:e=>r.OBSOLETE===e,isFailedStatus:e=>r.FAILED===e}},14102:(e,i,t)=>{t.r(i),t.d(i,{SimilarityIndex:()=>s});var r=t(50479),n=t(11637);class s{constructor(){this.analyzer="",this.infer=!0,this.options="",this.sameAs=!0,this.searchQuery="",this.selectQuery="",this.stopList=void 0,this.name="",this.type=r.SimilarityIndexType.TEXT,this.status=void 0,this.analogicalQuery=void 0,this.inputIndex=void 0,this.isLiteralIndex=""}isTextType(){return r.SimilarityIndexType.isTextType(this.type)}isTextLiteralType(){return r.SimilarityIndexType.isTextLiteralType(this.type)}isPredicationType(){return r.SimilarityIndexType.isPredicationType(this.type)}isCreatingStatus(){return n.SimilarityIndexStatus.isCreatingStatus(this.status)}isBuildingStatus(){return n.SimilarityIndexStatus.isBuildingStatus(this.status)}isBuiltStatus(){return n.SimilarityIndexStatus.isBuiltStatus(this.status)}isRebuildingStatus(){return n.SimilarityIndexStatus.isRebuildingStatus(this.status)}isOutdatedStatus(){return n.SimilarityIndexStatus.isOutdatedStatus(this.status)}isInterruptedStatus(){return n.SimilarityIndexStatus.isInterruptedStatus(this.status)}isObsoleteStatus(){return n.SimilarityIndexStatus.isObsoleteStatus(this.status)}isFailedStatus(){return n.SimilarityIndexStatus.isFailedStatus(this.status)}}},15435:(e,i,t)=>{t.r(i),t.d(i,{RenderingMode:()=>r});const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},22093:(e,i,t)=>{t.r(i),t.d(i,{SimilarityViewMode:()=>r});const r={CREATE:"CREATE",EDIT:"EDIT",CLONE:"CLONE"}},27473:(e,i,t)=>{t.r(i),t.d(i,{mapIndexesResponseToSimilarityIndex:()=>n});var r=t(14102);const n=e=>e.map(e=>{const i=new r.SimilarityIndex;return i.type=e.type,i.stopList=e.stopList,i.status=e.status,i.selectQuery=e.selectQuery,i.searchQuery=e.searchQuery,i.sameAs=e.sameAs,i.options=e.options,i.name=e.name,i.infer=e.infer,i.analyzer=e.analyzer,i.analogicalQuery=e.analogicalQuery,i})},41233:(e,i,t)=>{t.r(i),t.d(i,{SimilarityIndexError:()=>r});class r extends Error{}},50083:(e,i,t)=>{t.r(i),t.d(i,{SimilarityIndexInfo:()=>y});var r=t(14102),n=t(98551),s=t(15435);const a=new RegExp("^[a-zA-Z0-9-_]+$");class y{constructor(){this.similarityIndex=new r.SimilarityIndex,this.isNameExist=!1,this.invalidSelectQueryType=!1,this.invalidSelectQuery=!1,this.invalidSearchQueryType=!1,this.invalidSearchQuery=!1,this.invalidAnalogicalQueryType=!1,this.invalidAnalogicalQuery=!1,this.selectedQueryType=n.SimilarityQueryType.DATA,this.selectedYasguiRenderMode=s.RenderingMode.YASQE}setQuery(e,i=void 0){const t=i||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.similarityIndex.analogicalQuery=e):this.similarityIndex.searchQuery=e:this.similarityIndex.selectQuery=e}getQuery(e=void 0){switch(e||this.selectedQueryType){case n.SimilarityQueryType.DATA:return this.similarityIndex.selectQuery;case n.SimilarityQueryType.SEARCH:return this.similarityIndex.searchQuery;case n.SimilarityQueryType.ANALOGICAL:return this.similarityIndex.analogicalQuery}}markInvalidQuery(e=void 0,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQuery=i):this.invalidSearchQuery=i:this.invalidSelectQuery=i}markInvalidQueryType(e=void 0,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQueryType=i):this.invalidSearchQueryType=i:this.invalidSelectQueryType=i}setSelectedQueryType(e){this.selectedQueryType=e}getSelectedQueryType(){return this.selectedQueryType}setSelectedYasguiRenderMode(e){this.selectedYasguiRenderMode=e}getSelectedYasguiRenderMode(){return this.selectedYasguiRenderMode}isDataQueryTypeSelected(){return n.SimilarityQueryType.DATA===this.selectedQueryType}isSearchQueryTypeSelected(){return n.SimilarityQueryType.SEARCH===this.selectedQueryType}isAnalogicalQueryTypeSelected(){return n.SimilarityQueryType.ANALOGICAL===this.selectedQueryType}isTextType(){return this.similarityIndex.isTextType()}isPredicationType(){return this.similarityIndex.isPredicationType()}isTextLiteralType(){return this.similarityIndex.isTextLiteralType()}hasName(){return!!this.similarityIndex.name}isNameValid(){return a.test(this.similarityIndex.name)}hasSelectQuery(){return!!this.similarityIndex.selectQuery}hasSearchQuery(){return!!this.similarityIndex.searchQuery}hasAnalogicalQuery(){return!!this.similarityIndex.analogicalQuery}isYasqeRenderMode(){return s.RenderingMode.YASQE===this.getSelectedYasguiRenderMode()}isYasrRenderMode(){return s.RenderingMode.YASR===this.getSelectedYasguiRenderMode()}getName(){return this.similarityIndex.name}setName(e){this.similarityIndex.name=e}setInputIndex(e){this.similarityIndex.inputIndex=e}getInputIndex(){return this.similarityIndex.inputIndex}setLiteralIndex(e=!1){this.similarityIndex.isLiteralIndex=e}getSimilarityIndex(){return this.similarityIndex}setStopList(e){this.similarityIndex.stopList=e}getStopList(){return this.similarityIndex.stopList}setAnalyzer(e="org.apache.lucene.analysis.en.EnglishAnalyzer"){this.similarityIndex.analyzer=e}getAnalyzer(){return this.similarityIndex.analyzer}setType(e){this.similarityIndex.type=e}getType(){return this.similarityIndex.type}setOptions(e){this.similarityIndex.options=e}getOptions(){return this.similarityIndex.options}getInference(){return this.similarityIndex.infer}getSameAs(){return this.similarityIndex.sameAs}}},50479:(e,i,t)=>{t.r(i),t.d(i,{SimilarityIndexType:()=>r});const r={TEXT:"text",TEXT_LITERAL:"textLiteral",PREDICATION:"predication",isTextType:e=>r.TEXT===e,isTextLiteralType:e=>r.TEXT_LITERAL===e,isPredicationType:e=>r.PREDICATION===e}},56139:()=>{function e(e,i){return{showToastMessageWithDelay:function(t){return new Promise(r=>{e.success(i.instant(t)),setTimeout(r,300)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",e),e.$inject=["toastr","$translate"]},71156:(e,i,t)=>{t.r(i),t.d(i,{YasqeMode:()=>r});const r={WRITE:"WRITE",READ:"READ",PROTECTED:"PROTECTED"}},98551:(e,i,t)=>{t.r(i),t.d(i,{SimilarityQueryType:()=>r});const r={DATA:"DATA",SEARCH:"SEARCH",ANALOGICAL:"ANALOGICAL"}}};
|
|
2
|
+
//# sourceMappingURL=5470.7c17c7d3b58c8c0d0786.bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"5470.7c17c7d3b58c8c0d0786.bundle.js","mappings":"uVA2CA,SAASA,EACLC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAMAf,EAAOO,YAAcA,EAErBP,EAAOgB,oBAAsBA,EAAAA,oBAC7BhB,EAAOiB,oBAAsBA,EAAAA,oBAK7BjB,EAAOkB,yBAAsBC,EAC7BnB,EAAOoB,aAAUD,EACjBnB,EAAOqB,kBAAeF,EACtBnB,EAAOsB,sBAAuB,EAC9BtB,EAAOuB,4BAA6B,EACpCvB,EAAOwB,WAAsE,IAAzDd,EAAoBe,IAAId,EAAOe,sBAKnD1B,EAAO2B,aAAc,EAErB,IACIC,EACAC,EACAC,EAHAC,GAAU,EAIVC,EAAWC,EAAAA,mBAAmBC,OAK9BC,GAA2B,EAa/BnC,EAAOoC,0BAA4B,CAACC,EAAqBC,EAAsBtB,EAAAA,oBAAoBuB,QAC/FvC,EAAOkB,oBAAoBsB,QAAQH,GAC/BrC,EAAOkB,oBAAoBuB,oBAC3BzC,EAAOoB,QAAUS,EAAWZ,EAAAA,oBAAoByB,aAEhD1C,EAAOoB,QAAUS,EAAWZ,EAAAA,oBAAoB0B,MAEpD3C,EAAO4C,eAAeN,GACjBO,KAAM3B,IACH4B,EAAkB9C,EAAOkB,qBACzBlB,EAA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AAgBa,MAChC,E,4DCxPG,MAAM/L,EAAsB,CAC/B,KAAQ,OACR,aAAgB,cAChB,YAAe,cAEf,WAAeuL,GACJvL,EAAoB0B,OAAS6J,EAGxC,kBAAsBA,GACXvL,EAAoBwL,eAAiBD,EAGhD,kBAAsBA,GACXvL,EAAoByB,cAAgB8J,E,aCRnD,SAAShM,EAAcP,EAAQW,GAC3B,MAAO,CACHqF,0BASJ,SAAmCqJ,GAC/B,OAAO,IAAInM,QAASyS,IAChB3V,EAAOiN,QAAQtM,EAAWwE,QAAQkK,IAClCuG,WAAWD,EAAG,MAEtB,EACJ,CAvBA5J,QACK0H,OAAO,wCAAyC,IAChDoC,QAAQ,gBAAiBtV,GAE9BA,EAAcmT,QAAU,CAAC,SAAU,a,kDCJ5B,MAAM9H,EAAY,CAIrBC,MAAO,QAKPC,KAAM,OAKNgK,UAAW,Y,4DCdR,MAAM/U,EAAsB,CAC/B,KAAQ,OACR,OAAU,SACV,WAAc,a","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/similarity/controllers/create-index.controller.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-index-status.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-index.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ontotext-yasgui/rendering-mode.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-view-mode.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/rest/mappers/similarity-index-mapper.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-index-error.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-index-info.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-index-type.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/utils/notifications.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ontotext-yasgui/yasqe-mode.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-query-type.js"],"sourcesContent":["import 'angular/utils/notifications';\nimport 'angular/utils/local-storage-adapter';\nimport 'angular/core/services/event-emitter-service';\nimport {mapIndexesResponseToSimilarityIndex} from \"../../rest/mappers/similarity-index-mapper\";\nimport {\n DISABLE_YASQE_BUTTONS_CONFIGURATION, INFERRED_AND_SAME_AS_BUTTONS_CONFIGURATION, YasguiComponentDirectiveUtil, YasqeButtonName,\n} from \"../../core/directives/yasgui-component/yasgui-component-directive.util\";\nimport {RenderingMode} from \"../../models/ontotext-yasgui/rendering-mode\";\nimport {YasqeMode} from \"../../models/ontotext-yasgui/yasqe-mode\";\nimport {SimilarityViewMode} from \"../../models/similarity/similarity-view-mode\";\nimport {SimilarityQueryType} from \"../../models/similarity/similarity-query-type\";\nimport {SimilarityIndexType} from \"../../models/similarity/similarity-index-type\";\nimport {SimilarityIndexError} from \"../../models/similarity/similarity-index-error\";\nimport {QueryType} from \"../../models/ontotext-yasgui/query-type\";\nimport {SimilarityIndexInfo} from \"../../models/similarity/similarity-index-info\";\nimport {RepositoryContextService, ServiceProvider} from \"@ontotext/workbench-api\";\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 = [\n '$scope',\n 'toastr',\n '$uibModal',\n '$timeout',\n 'SimilarityRestService',\n 'SparqlRestService',\n '$location',\n 'productInfo',\n 'Notifications',\n 'RDF4JRepositoriesRestService',\n 'LocalStorageAdapter',\n 'LSKeys',\n '$translate',\n '$repositories',\n 'EventEmitterService',\n 'ModalService'\n];\n\nfunction CreateSimilarityIdxCtrl(\n $scope,\n toastr,\n $uibModal,\n $timeout,\n SimilarityRestService,\n SparqlRestService,\n $location,\n productInfo,\n Notifications,\n RDF4JRepositoriesRestService,\n LocalStorageAdapter,\n LSKeys,\n $translate,\n $repositories,\n EventEmitterService,\n ModalService\n) {\n\n /**\n * @type {ProductInfo}\n */\n $scope.productInfo = productInfo;\n\n $scope.SimilarityQueryType = SimilarityQueryType;\n $scope.SimilarityIndexType = SimilarityIndexType;\n\n /**\n * @type {SimilarityIndexInfo}\n */\n $scope.similarityIndexInfo = undefined;\n $scope.samples = undefined;\n $scope.yasguiConfig = undefined;\n $scope.saveOrUpdateExecuted = false;\n $scope.loadingControllerResources = false;\n $scope.helpHidden = LocalStorageAdapter.get(LSKeys.HIDE_SIMILARITY_HELP) === 1;\n /**\n * Flag that indicates if the index save operation is in progress.\n * @type {boolean}\n */\n $scope.savingIndex = false;\n\n let isDirty = false;\n let searchQueries = undefined;\n let allSamples = undefined;\n let usedPrefixes = undefined;\n let viewMode = SimilarityViewMode.CREATE;\n const textDefaultOptions = '-termweight idf';\n const predDefaultOptions = '';\n\n // This flag is used to prevent triggering the repository change event listener on initial subscription.\n let initialRepoChangeTrigger = true;\n\n\n // =========================\n // Public functions\n // =========================\n /**\n * Changes the similarity index type. (\"Create text similarity index\" or \"Create predication index\").\n *\n * @param {string} similarityIndexType - the new value of similarity index type. The value have to be one of {@link SimilarityIndexType}.\n * @param {string} similarityQueryType - the type of similarity query that have to be shown. Default value is data query.\n * The value have to be one of {@link SimilarityQueryType}.\n */\n $scope.changeSimilarityIndexType = (similarityIndexType, similarityQueryType = SimilarityQueryType.DATA) => {\n $scope.similarityIndexInfo.setType(similarityIndexType);\n if ($scope.similarityIndexInfo.isPredicationType()) {\n $scope.samples = allSamples[SimilarityIndexType.PREDICATION];\n } else {\n $scope.samples = allSamples[SimilarityIndexType.TEXT];\n }\n $scope.changeQueryTab(similarityQueryType)\n .then((similarityIndexInfo) => {\n setDefaultQueries($scope.similarityIndexInfo);\n $scope.setEditorQuery($scope.similarityIndexInfo.getQuery());\n });\n }\n\n /**\n * Changes the query tab. (\"Data query\", \"Search query\" or \"Analogical query\").\n *\n * @param {string} similarityQueryType - the type of query that have to be shown. The value have to be one of {@link SimilarityQueryType}.\n */\n $scope.changeQueryTab = (similarityQueryType) => {\n const oldSimilarityQueryType = $scope.similarityIndexInfo.getSelectedQueryType();\n if (oldSimilarityQueryType === similarityQueryType) {\n return Promise.resolve();\n }\n $scope.similarityIndexInfo.setSelectedQueryType(similarityQueryType);\n return updateQueryFromEditor($scope.similarityIndexInfo, oldSimilarityQueryType)\n .then((similarityIndexInfo) => validateQuery(similarityIndexInfo, oldSimilarityQueryType))\n .then((similarityIndexInfo) => validateQueryType(similarityIndexInfo, oldSimilarityQueryType))\n .catch((error) => {\n if (!(error instanceof SimilarityIndexError)) {\n console.log(error);\n }\n })\n .finally(() => {\n const ontotextYasgui = getOntotextYasgui();\n $scope.similarityIndexInfo.setSelectedYasguiRenderMode(RenderingMode.YASQE);\n ontotextYasgui.changeRenderMode($scope.similarityIndexInfo.getSelectedYasguiRenderMode());\n if ($scope.similarityIndexInfo.isDataQueryTypeSelected()) {\n ontotextYasgui.showYasqeActionButton([YasqeButtonName.INFER_STATEMENTS, YasqeButtonName.EXPANDS_RESULTS]);\n } else {\n ontotextYasgui.hideYasqeActionButton([YasqeButtonName.INFER_STATEMENTS, YasqeButtonName.EXPANDS_RESULTS]);\n }\n ontotextYasgui.setQuery($scope.similarityIndexInfo.getQuery());\n });\n }\n\n /**\n * Validates all similarity index data, and if everything is ok calls backend server to create an index.\n */\n $scope.createSimilarityIndex = () => {\n $scope.saveOrUpdateExecuted = true;\n $scope.savingIndex = true;\n updateQueryFromEditor($scope.similarityIndexInfo)\n .then(validateQuery)\n .then(validateQueryType)\n .then(validateSimilarityIndex)\n .then(validateSimilarityIndexNameExistence)\n .then((similarityIndexInfo) => createIndex(similarityIndexInfo.getSimilarityIndex()))\n .then(() => goToSimilarityIndexesView())\n .catch((error) => {\n if (!(error instanceof SimilarityIndexError)) {\n toastr.error(getError(error), $translate.instant('similarity.could.not.get.indexes.error'));\n }\n })\n .finally(() => {\n $scope.savingIndex = false;\n });\n };\n\n /**\n * Opens a modal dialog and displays the sparql query of currently selected index type query.\n */\n $scope.viewQuery = () => {\n updateQueryFromEditor($scope.similarityIndexInfo)\n .then(validateSimilarityIndex)\n .then(fetchSparqlQuery)\n .then(showSparqlQuery)\n .catch((error) => toastr.error(getError(error)));\n };\n\n /**\n * Executes the query.\n */\n $scope.preview = () => {\n updateQueryFromEditor($scope.similarityIndexInfo)\n .then(validateQueryType)\n .then(validateQuery)\n .then(() => {\n const ontotextYasgui = getOntotextYasgui();\n $scope.similarityIndexInfo.setSelectedYasguiRenderMode(RenderingMode.YASR);\n ontotextYasgui.query($scope.similarityIndexInfo.getSelectedYasguiRenderMode());\n });\n }\n\n $scope.saveSearchQuery = function () {\n if (!isDirty) {\n $location.url('similarity');\n } else {\n $scope.saveOrUpdateExecuted = true;\n $scope.savingIndex = true;\n updateQueryFromEditor($scope.similarityIndexInfo)\n .then(validateSimilarityIndexName)\n .then(validateQuery)\n .then(validateQueryType)\n .then(validateSearchQuery)\n .then(validateAnalogicalQuery)\n .then(saveQuery)\n .then((isSearchQuery) => {\n // toastr should be triggered before the redirect because the redirect will remove the toast\n return Notifications.showToastMessageWithDelay(isSearchQuery ? 'similarity.changed.search.query.msg' : 'similarity.changed.analogical.query.msg');\n })\n .then(() => {\n $location.url('similarity');\n })\n .catch((error) => {\n if (!(error instanceof SimilarityIndexError)) {\n toastr.error(getError(error), $translate.instant('similarity.change.query.error'));\n }\n })\n .finally(() => {\n $scope.savingIndex = false;\n });\n }\n };\n\n /**\n * Sets the <code>query</code> to the sparql editor.\n *\n * @param {string} query - a sparql query.\n */\n $scope.setEditorQuery = (query) => {\n $scope.similarityIndexInfo.markInvalidQuery(undefined, false);\n $scope.similarityIndexInfo.markInvalidQueryType(undefined, false);\n if ($scope.yasguiConfig) {\n getOntotextYasgui().setQuery(query);\n } else {\n updateYasguiComponent({initialQuery: query || ' '});\n }\n }\n\n $scope.similarityIndexNameChanged = () => {\n $scope.setDirty();\n $scope.similarityIndexInfo.isNameExist = false;\n }\n\n $scope.queryChanged = () => {\n $scope.setDirty();\n $scope.similarityIndexInfo.markInvalidQuery(undefined, false);\n $scope.similarityIndexInfo.markInvalidQueryType(undefined, false);\n }\n\n $scope.isCloneViewMode = () => {\n return SimilarityViewMode.CLONE === viewMode;\n }\n\n $scope.isEditViewMode = () => {\n return SimilarityViewMode.EDIT === viewMode;\n }\n\n $scope.isCreateViewMode = () => {\n return SimilarityViewMode.CREATE === viewMode;\n }\n\n $scope.setDirty = () => {\n isDirty = true;\n };\n\n $scope.isYasqeShown = () => {\n return $scope.similarityIndexInfo && $scope.similarityIndexInfo.isYasqeRenderMode();\n }\n\n $scope.isYasrShown = () => {\n return $scope.similarityIndexInfo && $scope.similarityIndexInfo.isYasrRenderMode();\n }\n\n $scope.showEditor = () => {\n const ontotextYasgui = getOntotextYasgui();\n ontotextYasgui.abortQuery().then(() => {\n return ontotextYasgui.setQuery($scope.similarityIndexInfo.getQuery());\n }).then(() => {\n $scope.similarityIndexInfo.setSelectedYasguiRenderMode(RenderingMode.YASQE);\n return ontotextYasgui.changeRenderMode($scope.similarityIndexInfo.getSelectedYasguiRenderMode());\n });\n };\n\n $scope.toggleHelp = (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.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 $scope.hasQueryError = () => {\n const similarityQueryType = $scope.similarityIndexInfo.getSelectedQueryType();\n\n if (SimilarityQueryType.DATA === similarityQueryType) {\n return $scope.hasSelectQueryError();\n }\n\n if (SimilarityQueryType.SEARCH === similarityQueryType) {\n return $scope.hasSearchQueryError();\n }\n\n if (SimilarityQueryType.ANALOGICAL === similarityQueryType) {\n return $scope.hasAnalogicalQueryError();\n }\n\n return false;\n }\n\n $scope.hasSelectQueryError = () => {\n return !$scope.similarityIndexInfo.hasSelectQuery() ||\n $scope.similarityIndexInfo.invalidSelectQuery ||\n $scope.similarityIndexInfo.invalidSelectQueryType;\n }\n\n $scope.hasSearchQueryError = () => {\n return !$scope.similarityIndexInfo.hasSearchQuery() ||\n $scope.similarityIndexInfo.invalidSearchQuery ||\n $scope.similarityIndexInfo.invalidSearchQueryType;\n }\n\n $scope.hasAnalogicalQueryError = () => {\n return !$scope.similarityIndexInfo.hasAnalogicalQuery() ||\n $scope.similarityIndexInfo.invalidAnalogicalQuery ||\n $scope.similarityIndexInfo.invalidAnalogicalQueryType;\n }\n\n $scope.getQueryErrorMessage = () => {\n const similarityQueryType = $scope.similarityIndexInfo.getSelectedQueryType();\n let isEmpty = false;\n let invalidQueryType = false;\n let invalidQuery = false;\n\n if (SimilarityQueryType.DATA === similarityQueryType) {\n isEmpty = !$scope.similarityIndexInfo.hasSelectQuery();\n invalidQueryType = $scope.similarityIndexInfo.invalidSelectQueryType;\n invalidQuery = $scope.similarityIndexInfo.invalidSelectQuery;\n } else if (SimilarityQueryType.SEARCH === similarityQueryType) {\n isEmpty = !$scope.similarityIndexInfo.hasSearchQuery();\n invalidQueryType = $scope.similarityIndexInfo.invalidSearchQueryType;\n invalidQuery = $scope.similarityIndexInfo.invalidSearchQuery;\n } else if (SimilarityQueryType.ANALOGICAL === similarityQueryType) {\n isEmpty = !$scope.similarityIndexInfo.hasAnalogicalQuery();\n invalidQueryType = $scope.similarityIndexInfo.invalidAnalogicalQueryType;\n invalidQuery = $scope.similarityIndexInfo.invalidAnalogicalQuery;\n }\n\n const labelParams = {queryType: $translate.instant(`similarity.query.type.${similarityQueryType}.name`)};\n if (isEmpty) {\n return $translate.instant('similarity.error.query.empty', labelParams);\n } else if (invalidQuery) {\n return $translate.instant('similarity.error.query.invalid', labelParams);\n } else if (invalidQueryType) {\n return $translate.instant('similarity.error.query.invalid_type', labelParams);\n }\n\n return '';\n }\n // =========================\n // Private functions\n // =========================\n /**\n * Initializes all view components.\n */\n const init = () => {\n getSimilarityIndex()\n .then((similarityIndexInfo) => {\n $scope.similarityIndexInfo = similarityIndexInfo;\n let initialQueryTab = SimilarityQueryType.DATA;\n if ($scope.isEditViewMode()) {\n initialQueryTab = SimilarityQueryType.SEARCH;\n }\n $scope.changeSimilarityIndexType(similarityIndexInfo.getType(), initialQueryTab)\n });\n }\n\n /**\n * Validates the editor query and updates error statuses of <code>SimilarityIndexInfo</code>. Updates <code>SimilarityIndexInfo</code> query with editor one.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @param {string} similarityQueryType - the type of similarity query that have to be shown. If parameter is undefined then currently selected query type will be used.\n * The value have to be one of {@link SimilarityQueryType}.\n * @return {Promise<SimilarityIndexInfo>}\n */\n const updateQueryFromEditor = (similarityIndexInfo, similarityQueryType = undefined) => {\n return getOntotextYasgui().getQuery()\n .then((query) => similarityIndexInfo.setQuery(query, similarityQueryType))\n .then(() => similarityIndexInfo);\n }\n\n /**\n * Fetches the sparql query of currently chosen query type from the backed server.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<string>} the sparql query of currently chosen query type.\n */\n const fetchSparqlQuery = (similarityIndexInfo) => {\n return SimilarityRestService.getQuery({\n indexName: similarityIndexInfo.getName(),\n indexOptions: similarityIndexInfo.getOptions(),\n query: similarityIndexInfo.getQuery(),\n indexStopList: similarityIndexInfo.getStopList(),\n queryInference: similarityIndexInfo.getInference(),\n querySameAs: similarityIndexInfo.getSameAs(),\n viewType: similarityIndexInfo.getSelectedQueryType(),\n indexAnalyzer: similarityIndexInfo.getAnalyzer()\n }).then((response) => response.data);\n }\n\n /**\n * Shows a modal dialog that displays the <code>query</code>.\n *\n * @param {string} query which will be displayed.\n */\n const showSparqlQuery = (query) => {\n if (query) {\n $uibModal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function () {\n return query;\n }\n }\n });\n }\n }\n\n const setDefaultQueries = (similarityIndexInfo) => {\n const similarityIndexType = similarityIndexInfo.getType();\n if (!$scope.isEditViewMode() && searchQueries) {\n similarityIndexInfo.setQuery(searchQueries[similarityIndexType], SimilarityQueryType.SEARCH);\n similarityIndexInfo.setQuery(searchQueries['analogical'], SimilarityQueryType.ANALOGICAL);\n }\n\n if (allSamples) {\n if (SimilarityIndexType.PREDICATION === similarityIndexType) {\n const allSampleElement = allSamples[SimilarityIndexType.PREDICATION]['predication'];\n similarityIndexInfo.setQuery(allSampleElement, SimilarityQueryType.DATA);\n } else {\n const allSampleElement1 = allSamples[SimilarityIndexType.TEXT]['literals'];\n similarityIndexInfo.setQuery(allSampleElement1, SimilarityQueryType.DATA);\n }\n }\n }\n\n /**\n * Initializes the similarity index info object with default values if view is opened for create or populates values from url if\n * view is opened for edit.\n *\n * @return {Promise<SimilarityIndexInfo>}\n */\n const getSimilarityIndex = () => {\n const similarityIndexInfo = new SimilarityIndexInfo();\n similarityIndexInfo.setName(getSimilarityIndexName());\n similarityIndexInfo.setType(getSimilarityType());\n similarityIndexInfo.setSelectedQueryType($scope.isEditViewMode() ? SimilarityQueryType.SEARCH : SimilarityQueryType.DATA);\n const options = $location.search().options;\n if (options) {\n similarityIndexInfo.setOptions(options);\n } else {\n similarityIndexInfo.setOptions(similarityIndexInfo.isTextType() ? textDefaultOptions : predDefaultOptions);\n }\n\n setDefaultQueries(similarityIndexInfo);\n const searchQuery = $location.search().searchQuery;\n if (searchQuery) {\n similarityIndexInfo.setQuery(searchQuery, SimilarityQueryType.SEARCH);\n }\n\n\n const selectQuery = $location.search().selectQuery;\n if (selectQuery) {\n similarityIndexInfo.setQuery(selectQuery, SimilarityQueryType.DATA);\n }\n\n const analogicalQuery = $location.search().analogicalQuery;\n if (analogicalQuery) {\n similarityIndexInfo.setQuery(analogicalQuery, SimilarityQueryType.ANALOGICAL);\n }\n\n if (similarityIndexInfo.isTextType()) {\n similarityIndexInfo.setStopList($location.search().stopList)\n similarityIndexInfo.setAnalyzer($location.search().analyzer);\n const isLiteralIndex = getAndRemoveOption(similarityIndexInfo.getSimilarityIndex(), '-literal_index');\n if (isLiteralIndex !== undefined) {\n similarityIndexInfo.setLiteralIndex(isLiteralIndex);\n }\n }\n\n if (similarityIndexInfo.isPredicationType()) {\n return SimilarityRestService.getIndexes()\n .then((response) => {\n const indexesNotInProgress = mapIndexesResponseToSimilarityIndex(response.data)\n .filter((similarityIndex) => similarityIndex.isTextLiteralType() && (similarityIndex.isBuiltStatus() || similarityIndex.isOutdatedStatus()))\n .map((similarityIndex) => similarityIndex.name);\n\n $scope.literalIndexes = ['no-index'].concat(indexesNotInProgress);\n\n if (similarityIndexInfo.getInputIndex() === undefined) {\n const desiredIdx = getAndRemoveOption(similarityIndexInfo.getSimilarityIndex(), '-input_index');\n if (desiredIdx !== undefined) {\n for (let j = 0; j < $scope.literalIndexes.length; j++) {\n if (desiredIdx === $scope.literalIndexes[j]) {\n similarityIndexInfo.setInputIndex($scope.literalIndexes[j]);\n }\n }\n }\n }\n if (similarityIndexInfo.getInputIndex() === undefined) {\n similarityIndexInfo.setInputIndex($scope.literalIndexes[0]);\n }\n return similarityIndexInfo;\n })\n .catch(function (error) {\n const msg = getError(error);\n toastr.error(msg, $translate.instant('similarity.could.not.get.indexes.error'));\n });\n }\n\n return Promise.resolve(similarityIndexInfo);\n }\n\n const updateYasguiComponent = (config) => {\n const defaultConfig = {\n endpoint: getQueryEndpoint,\n componentId: 'create-index',\n showEditorTabs: false,\n showToolbar: false,\n showResultTabs: false,\n showYasqeActionButtons: false,\n showQueryButton: false,\n downloadAsOn: false,\n showResultInfo: false,\n showYasqeResizer: false,\n pageSize: 100,\n prefixes: usedPrefixes,\n render: $scope.similarityIndexInfo.getSelectedYasguiRenderMode(),\n yasqeActionButtons: $scope.isEditViewMode() || !$scope.similarityIndexInfo.isDataQueryTypeSelected() ? DISABLE_YASQE_BUTTONS_CONFIGURATION : INFERRED_AND_SAME_AS_BUTTONS_CONFIGURATION,\n maxPersistentResponseSize: 0,\n yasqeMode: $scope.canWriteActiveRepo() ? YasqeMode.WRITE : YasqeMode.READ,\n }\n\n const yasguiConfig = {}\n angular.extend(yasguiConfig, defaultConfig, config);\n $scope.yasguiConfig = yasguiConfig;\n }\n\n const getQueryEndpoint = () => {\n return `repositories/${$repositories.getActiveRepository()}`;\n };\n\n /**\n * Call backend server to create a similarity index with data filled in <code>similarityIndexInfo</code>.\n *\n * @param {SimilarityIndex} similarityIndex - objects holds all needed data to create a similarity index.\n * @return {*}\n */\n const createIndex = (similarityIndex) => {\n if ($scope.literalIndexes !== undefined) {\n const inputIndex = similarityIndex.inputIndex;\n if (inputIndex !== $scope.literalIndexes[0]) {\n similarityIndex.options = similarityIndex.options + (similarityIndex.options === '' ? '' : ' ') + '-input_index' + ' ' + inputIndex;\n }\n }\n if (similarityIndex.isLiteralIndex === 'true') {\n similarityIndex.options = similarityIndex.options + (similarityIndex.options === '' ? '' : ' ') + '-literal_index' + ' true';\n similarityIndex.type = SimilarityIndexType.TEXT_LITERAL;\n }\n isDirty = false;\n return SimilarityRestService.createIndex('POST',\n similarityIndex.name,\n similarityIndex.options,\n similarityIndex.selectQuery,\n similarityIndex.searchQuery,\n similarityIndex.isPredicationType() ? similarityIndex.analogicalQuery : '',\n similarityIndex.stopList,\n similarityIndex.infer,\n similarityIndex.sameAs,\n similarityIndex.type,\n similarityIndex.analyzer)\n .then(() => {\n toastr.success($translate.instant('similarity.create.index.successfully'));\n return similarityIndex;\n })\n .catch(function (err) {\n const errorMessage = getError(err);\n toastr.error(errorMessage, $translate.instant('similarity.create.index.error'));\n console.log(errorMessage);\n return Promise.reject(new SimilarityIndexError('Could not create index.'));\n });\n }\n\n const notifySaveSuccess = async (isSearchQuery) => {\n await Notifications.showToastMessageWithDelay(isSearchQuery ? 'similarity.changed.search.query.msg' : 'similarity.changed.analogical.query.msg');\n $location.url('similarity');\n }\n\n const saveQuery = (similarityIndexInfo) => {\n const isSearchQuery = similarityIndexInfo.isSearchQueryTypeSelected();\n let data = {\n name: similarityIndexInfo.getSimilarityIndex().name,\n changedQuery: similarityIndexInfo.getQuery(),\n isSearchQuery\n };\n return SimilarityRestService.saveSearchQuery(JSON.stringify(data))\n .then(() => {\n isDirty = false;\n return isSearchQuery\n })\n }\n\n const goToSimilarityIndexesView = () => {\n $timeout(() =>\n $location.url('similarity')\n , 100);\n }\n\n const getOntotextYasgui = () => {\n return YasguiComponentDirectiveUtil.getOntotextYasguiElement('#query-editor');\n };\n\n /**\n * Fetches similarity index name from url parameters. Adds clone prefix if view mode is in clone mode.\n *\n * @return {string}\n */\n const getSimilarityIndexName = () => {\n const indexNameFromLocation = $location.search().name || '';\n return $scope.isCloneViewMode() ? `${$translate.instant('similarity.copy_of.prefix')}_${indexNameFromLocation}` : indexNameFromLocation;\n };\n\n /**\n * Fetches similarity index type from url parameters if any. Default value is {@see SimilarityIndexType.TEXT}.\n *\n * @return {*|string}\n */\n const getSimilarityType = () => {\n const indexType = $location.search().type;\n if (indexType === undefined || indexType.startsWith('text')) {\n return SimilarityIndexType.TEXT;\n } else {\n return indexType;\n }\n }\n\n // TODO simplify\n const getAndRemoveOption = (similarityIndex, key) => {\n const optArr = similarityIndex.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 similarityIndex.options = optArr.join(' ');\n\n return value;\n }\n }\n return undefined;\n }\n\n /**\n * Calculates the view mode. The view mode can be any value of {@see SimilarityViewMode}.\n * @return {string}\n */\n const getViewMode = () => {\n if ($location.search().name === undefined) {\n return SimilarityViewMode.CREATE;\n }\n\n const editSearchQuery = $location.search().editSearchQuery;\n if (editSearchQuery === undefined) {\n return SimilarityViewMode.CLONE;\n }\n\n // Cast is needed because when view is opened from another view the type value is boolean but if\n // page is refreshed the value is boolean (\"false\" for example).\n // TODO: Check why this happened.\n if (typeof editSearchQuery === 'string') {\n return editSearchQuery === 'false' ? SimilarityViewMode.CLONE : SimilarityViewMode.EDIT;\n }\n\n return editSearchQuery ? SimilarityViewMode.EDIT : SimilarityViewMode.CLONE;\n }\n\n\n // =========================\n // Validation functions\n // =========================\n /**\n * Validates all similarity index data and updates the error fields of the similarityIndexInfo object according to the validations.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n */\n const validateSimilarityIndex = (similarityIndexInfo) => {\n return Promise.all([validateSimilarityIndexName(similarityIndexInfo)\n .then(validateSelectQuery)\n .then(validateSearchQuery)\n .then(validateAnalogicalQuery)\n .then(validateQueryType)\n .then(validateQuery)])\n .then(() => similarityIndexInfo);\n }\n\n /**\n * Checks if typed similarity index name already exist.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n * @throws {SimilarityIndexError} if similarity already exist.\n */\n const validateSimilarityIndexNameExistence = (similarityIndexInfo) => {\n return SimilarityRestService.getIndexes()\n .then((response) => {\n if (response.data.some((index) => index.name === similarityIndexInfo.getName())) {\n similarityIndexInfo.isNameExist = true;\n return Promise.reject(new SimilarityIndexError('Similarity index name exists.'));\n }\n\n return similarityIndexInfo;\n });\n };\n\n /**\n * Check if similarity index name is filed and if is filled if it's value is correct.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n * @throws {SimilarityIndexError} if similarity index name is empty, or it's name is not correct.\n */\n const validateSimilarityIndexName = (similarityIndexInfo) => {\n if (!similarityIndexInfo.getSimilarityIndex().name) {\n return Promise.reject(new SimilarityIndexError('Missing similarity name.'));\n }\n if (!similarityIndexInfo.isNameValid()) {\n return Promise.reject(new SimilarityIndexError('Invalid similarity name.'));\n }\n return Promise.resolve(similarityIndexInfo);\n }\n\n /**\n * Validates if similarity index select query exist.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n * @throws {SimilarityIndexError} if select query is empty.\n */\n const validateSelectQuery = (similarityIndexInfo) => {\n if (!similarityIndexInfo.hasSelectQuery()) {\n return Promise.reject(new SimilarityIndexError('Missing select query.'));\n } else if (similarityIndexInfo.invalidSelectQuery) {\n return Promise.reject(new SimilarityIndexError('Invalid select query'));\n } else if (similarityIndexInfo.invalidSelectQueryType) {\n return Promise.reject(new SimilarityIndexError('Invalid select query type'));\n }\n return Promise.resolve(similarityIndexInfo);\n }\n\n /**\n * Validates if similarity index search query exist.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n * @throws {SimilarityIndexError} if search query is empty.\n */\n const validateSearchQuery = (similarityIndexInfo) => {\n if (!similarityIndexInfo.hasSearchQuery()) {\n return Promise.reject(new SimilarityIndexError('Missing search query.'));\n } else if (similarityIndexInfo.invalidSearchQuery) {\n return Promise.reject(new SimilarityIndexError('Invalid search query'));\n } else if (similarityIndexInfo.invalidSearchQueryType) {\n return Promise.reject(new SimilarityIndexError('Invalid search query type'));\n }\n return Promise.resolve(similarityIndexInfo);\n }\n\n /**\n * Validates if analogical index search query exist.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n * @throws {SimilarityIndexError} if analogical query is empty.\n */\n const validateAnalogicalQuery = (similarityIndexInfo) => {\n if (similarityIndexInfo.isPredicationType() && !similarityIndexInfo.hasAnalogicalQuery()) {\n return Promise.reject(new SimilarityIndexError('Missing analogical query.'));\n } else if (similarityIndexInfo.invalidAnalogicalQuery) {\n return Promise.reject(new SimilarityIndexError('Invalid analogical query'));\n } else if (similarityIndexInfo.invalidAnalogicalQueryType) {\n return Promise.reject(new SimilarityIndexError('Invalid analogical query type'));\n }\n return Promise.resolve(similarityIndexInfo);\n }\n\n /**\n * Checks if query mode is valid. The mode have to be \"SELECT\".\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n * @throws {SimilarityIndexError} if query type is not ot type \"SELECT\".\n */\n const validateQueryType = (similarityIndexInfo, similarityQueryType = undefined) => {\n return getOntotextYasgui().getQueryType()\n .then((queryType) => {\n if (QueryType.SELECT !== queryType) {\n similarityIndexInfo.markInvalidQueryType(similarityQueryType);\n return Promise.reject(new SimilarityIndexError('Query type is not valid.'));\n } else {\n similarityIndexInfo.markInvalidQueryType(similarityQueryType, false);\n }\n return similarityIndexInfo;\n });\n };\n\n /**\n * Checks if query is valid.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n * @throws {SimilarityIndexError} if query is not valid.\n */\n const validateQuery = (similarityIndexInfo, similarityQueryType = undefined) => {\n return getOntotextYasgui().isQueryValid()\n .then((valid) => {\n if (!valid) {\n similarityIndexInfo.markInvalidQuery(similarityQueryType);\n return Promise.reject(new SimilarityIndexError('Query is not valid.'));\n } else {\n similarityIndexInfo.markInvalidQuery(similarityQueryType, false);\n }\n return similarityIndexInfo;\n });\n };\n\n const openConfirmDialog = (title, message, onConfirm, onCancel) => {\n ModalService.openSimpleModal({\n title,\n message,\n warning: true\n }).result.then(function () {\n if (angular.isFunction(onConfirm)) {\n onConfirm();\n }\n }, function () {\n if (angular.isFunction(onCancel)) {\n onCancel();\n }\n });\n };\n\n // =========================\n // Subscriptions handlers\n // =========================\n const repositoryWillChangeHandler = () => {\n return new Promise(function (resolve) {\n\n if ($scope.isCreateViewMode() || $scope.isCloneViewMode()) {\n resolve(true);\n return;\n }\n\n const onConfirm = () => {\n isDirty = false;\n resolve(true);\n };\n\n if (isDirty) {\n const onCancel = () => {\n resolve(false);\n };\n const title = $translate.instant('common.confirm');\n const message = $translate.instant('similarity.warning.unsaved.changes');\n openConfirmDialog(title, message, onConfirm, onCancel);\n } else {\n onConfirm();\n }\n });\n };\n\n const repositoryChangedHandler = (repository) => {\n if (!repository) {\n return;\n }\n if (initialRepoChangeTrigger) {\n initialRepoChangeTrigger = false;\n } else {\n goToSimilarityIndexesView();\n }\n };\n\n const activeRepositoryHandler = () => {\n // when repository is changed we have to switch yasgui back to editor mode\n if ($scope.isYasrShown() && $scope.similarityIndexInfo.isDataQueryTypeSelected()) {\n $scope.showEditor();\n }\n $scope.canEditActiveRepo = $scope.canWriteActiveRepo();\n const config = {...$scope.yasguiConfig, yasqeMode: $scope.canWriteActiveRepo()};\n updateYasguiComponent(config);\n };\n\n const locationChangedHandler = (event, newPath) => {\n if (isDirty) {\n event.preventDefault();\n const title = $translate.instant('common.confirm');\n const message = $translate.instant('similarity.warning.unsaved.changes');\n const onConfirm = () => {\n removeAllListeners();\n const baseLen = $location.absUrl().length - $location.url().length;\n const path = newPath.substring(baseLen);\n $location.path(path);\n };\n openConfirmDialog(title, message, onConfirm);\n } else {\n removeAllListeners();\n }\n };\n\n const beforeunloadHandler = (event) => {\n if (isDirty) {\n event.returnValue = true;\n }\n };\n\n const removeAllListeners = () => {\n window.removeEventListener('beforeunload', beforeunloadHandler);\n subscriptions.forEach((subscription) => subscription());\n };\n\n // =========================\n // Subscriptions\n // =========================\n const subscriptions = [];\n\n const repositoryContextService = ServiceProvider.get(RepositoryContextService);\n const repositoryChangeSubscription = repositoryContextService.onSelectedRepositoryChanged(repositoryChangedHandler, repositoryWillChangeHandler)\n\n subscriptions.push(repositoryChangeSubscription);\n subscriptions.push($scope.$on('$locationChangeStart', locationChangedHandler));\n subscriptions.push($scope.$on('$destroy', removeAllListeners));\n // Prevent go out of the current page? check\n window.addEventListener('beforeunload', beforeunloadHandler);\n\n viewMode = getViewMode();\n\n // Wait until the active repository object is set, otherwise \"canWriteActiveRepo()\" may return a wrong result and the \"ontotext-yasgui\"\n // readOnly configuration may be incorrect.\n const repoIsInitialized = $scope.$watch(function () {\n return $scope.getActiveRepositoryObject();\n }, function (activeRepo) {\n if (activeRepo) {\n $scope.loadingControllerResources = true;\n Promise.all([SimilarityRestService.getSearchQueries(), SimilarityRestService.getSamples(), $repositories.getPrefixes(activeRepo.id)])\n .then(([searchQueriesResponses, samplesResponse, usedPrefixesResponse]) => {\n $scope.canEditActiveRepo = $scope.canWriteActiveRepo();\n searchQueries = searchQueriesResponses ? searchQueriesResponses.data : [];\n allSamples = samplesResponse ? samplesResponse.data : [];\n usedPrefixes = usedPrefixesResponse;\n init();\n }).catch((error) => {\n console.log(error)\n $scope.repositoryError = getError(error);\n }).finally(() => {\n subscriptions.push($scope.$on('repositoryIsSet', activeRepositoryHandler));\n repoIsInitialized();\n $scope.loadingControllerResources = false;\n });\n }\n });\n}\n","export const SimilarityIndexStatus = {\n 'CREATING': 'CREATING',\n 'BUILDING': 'BUILDING',\n 'BUILT': 'BUILT',\n 'REBUILDING': 'REBUILDING',\n 'OUTDATED': 'OUTDATED',\n 'INTERRUPTED': 'INTERRUPTED',\n 'OBSOLETE': 'OBSOLETE',\n 'FAILED': 'FAILED',\n\n 'isCreatingStatus': (status) => {\n return SimilarityIndexStatus.CREATING === status;\n },\n\n 'isBuildingStatus': (status) => {\n return SimilarityIndexStatus.BUILDING === status;\n },\n\n 'isBuiltStatus': (status) => {\n return SimilarityIndexStatus.BUILT === status;\n },\n\n 'isRebuildingStatus': (status) => {\n return SimilarityIndexStatus.REBUILDING === status;\n },\n\n 'isOutdatedStatus': (status) => {\n return SimilarityIndexStatus.OUTDATED === status;\n },\n\n 'isInterruptedStatus': (status) => {\n return SimilarityIndexStatus.INTERRUPTED === status;\n },\n\n 'isObsoleteStatus': (status) => {\n return SimilarityIndexStatus.OBSOLETE === status;\n },\n\n 'isFailedStatus': (status) => {\n return SimilarityIndexStatus.FAILED === status;\n }\n};\n","import {SimilarityIndexType} from \"./similarity-index-type\";\nimport {SimilarityIndexStatus} from \"./similarity-index-status\";\n\nexport class SimilarityIndex {\n constructor() {\n this.analyzer = '';\n this.infer = true;\n this.options = '';\n this.sameAs = true;\n this.searchQuery = '';\n this.selectQuery = '';\n this.stopList = undefined;\n this.name = '';\n\n /**\n * The similarity index type.\n *\n * @type {string}\n */\n this.type = SimilarityIndexType.TEXT;\n\n /**\n * The similarity index type.\n *\n * @type {SimilarityIndexStatus}\n */\n this.status = undefined;\n\n this.analogicalQuery = undefined;\n this.inputIndex = undefined;\n this.isLiteralIndex = '';\n }\n\n isTextType() {\n return SimilarityIndexType.isTextType(this.type);\n }\n\n isTextLiteralType() {\n return SimilarityIndexType.isTextLiteralType(this.type);\n }\n\n isPredicationType() {\n return SimilarityIndexType.isPredicationType(this.type);\n }\n\n isCreatingStatus() {\n return SimilarityIndexStatus.isCreatingStatus(this.status);\n }\n\n isBuildingStatus() {\n return SimilarityIndexStatus.isBuildingStatus(this.status);\n }\n\n isBuiltStatus() {\n return SimilarityIndexStatus.isBuiltStatus(this.status);\n }\n\n isRebuildingStatus() {\n return SimilarityIndexStatus.isRebuildingStatus(this.status);\n }\n\n isOutdatedStatus() {\n return SimilarityIndexStatus.isOutdatedStatus(this.status);\n }\n\n isInterruptedStatus() {\n return SimilarityIndexStatus.isInterruptedStatus(this.status);\n }\n\n isObsoleteStatus() {\n return SimilarityIndexStatus.isObsoleteStatus(this.status);\n }\n\n isFailedStatus() {\n return SimilarityIndexStatus.isFailedStatus(this.status);\n }\n}\n","export const RenderingMode = {\n YASGUI: 'mode-yasgui',\n YASQE: 'mode-yasqe',\n YASR: 'mode-yasr'\n};\n","export const SimilarityViewMode = {\n 'CREATE': 'CREATE',\n 'EDIT': 'EDIT',\n 'CLONE': 'CLONE'\n};\n","import {SimilarityIndex} from \"../../models/similarity/similarity-index\";\n\n/**\n * Maps the response data to SimilarityIndex objects.\n * @param {*} responseData\n * @return {SimilarityIndex[]}\n */\nexport const mapIndexesResponseToSimilarityIndex = (responseData) => {\n return responseData.map((index) => {\n const similarityIndex = new SimilarityIndex();\n similarityIndex.type = index.type;\n similarityIndex.stopList = index.stopList;\n similarityIndex.status = index.status;\n similarityIndex.selectQuery = index.selectQuery;\n similarityIndex.searchQuery = index.searchQuery;\n similarityIndex.sameAs = index.sameAs;\n similarityIndex.options = index.options;\n similarityIndex.name = index.name;\n similarityIndex.infer = index.infer;\n similarityIndex.analyzer = index.analyzer;\n similarityIndex.analogicalQuery = index.analogicalQuery;\n return similarityIndex;\n });\n};\n","export class SimilarityIndexError extends Error {\n\n}\n","import {SimilarityIndex} from \"./similarity-index\";\nimport {SimilarityQueryType} from \"./similarity-query-type\";\nimport {RenderingMode} from \"../ontotext-yasgui/rendering-mode\";\n\nconst filenamePattern = new RegExp('^[a-zA-Z0-9-_]+$');\n\nexport class SimilarityIndexInfo {\n constructor() {\n this.similarityIndex = new SimilarityIndex();\n this.isNameExist = false;\n this.invalidSelectQueryType = false;\n this.invalidSelectQuery = false;\n this.invalidSearchQueryType = false;\n this.invalidSearchQuery = false;\n this.invalidAnalogicalQueryType = false;\n this.invalidAnalogicalQuery = false;\n /**\n * Holds the type of the selected query to be displayed, which determines the active tab.\n *\n * @type {string} - any of {@SimilarityQueryType} values.\n */\n this.selectedQueryType = SimilarityQueryType.DATA;\n this.selectedYasguiRenderMode = RenderingMode.YASQE;\n }\n\n /**\n * Sets the <code>query</code> as query of type <code>similarityQueryType</code>. If <code>similarityQueryType</code> not passed then the\n * currently selected type will be used. {@see SimilarityIndexInfo#selectedQueryType}.\n *\n * @param {string} query - the query to be set.\n * @param {string | undefined} similarityQueryType - the new value of similarity index type. The value have to be one of {@link SimilarityQueryType}.\n */\n setQuery(query, similarityQueryType = undefined) {\n const queryType = similarityQueryType || this.selectedQueryType;\n if (SimilarityQueryType.DATA === queryType) {\n this.similarityIndex.selectQuery = query;\n return;\n }\n\n if (SimilarityQueryType.SEARCH === queryType) {\n this.similarityIndex.searchQuery = query;\n return;\n }\n\n if (SimilarityQueryType.ANALOGICAL === queryType) {\n this.similarityIndex.analogicalQuery = query;\n }\n }\n\n /**\n * Fetches the query depends on <code>similarityQueryType</code>. If <code>similarityQueryType</code> not passed then the\n * currently selected type will be used. {@see SimilarityIndexInfo#selectedQueryType}.\n *\n * @param {string | undefined} similarityQueryType - the type of query that have to be returned. The value have to be one of {@link SimilarityQueryType}.\n * @return {string} the requested query.\n */\n getQuery(similarityQueryType = undefined) {\n const queryType = similarityQueryType || this.selectedQueryType;\n switch (queryType) {\n case SimilarityQueryType.DATA:\n return this.similarityIndex.selectQuery;\n case SimilarityQueryType.SEARCH:\n return this.similarityIndex.searchQuery;\n case SimilarityQueryType.ANALOGICAL:\n return this.similarityIndex.analogicalQuery;\n }\n }\n\n /**\n * Marks a SPARQL query as valid/invalid depends on the <code>isValid</code> value. If <code>similarityQueryType</code> is not passed,\n * then the currently selected type will be used.\n *\n * @param {string} similarityQueryType - the type of SPARQL query, that have to be marked as valid/invalid. The value must be one of {@see SimilarityQueryType} values.\n * @param {boolean} isInvalid - if true the SPARQL query of type <code>similarityQueryType</code> will be marked as invalid, If false will be marked as valid.\n */\n markInvalidQuery(similarityQueryType = undefined, isInvalid = true) {\n const queryType = similarityQueryType || this.selectedQueryType;\n if (SimilarityQueryType.DATA === queryType) {\n this.invalidSelectQuery = isInvalid;\n return;\n }\n\n if (SimilarityQueryType.SEARCH === queryType) {\n this.invalidSearchQuery = isInvalid;\n return;\n }\n if (SimilarityQueryType.ANALOGICAL === queryType) {\n this.invalidAnalogicalQuery = isInvalid;\n }\n }\n\n /**\n * Marks a SPARQL query type as valid/invalid depends on the <code>isValid</code> value. If <code>similarityQueryType</code> is not passed,\n * then the currently selected type will be used.\n *\n * @param {string} similarityQueryType - the type of similarity query, that have to be marked as valid/invalid query type. The value must be one of {@see SimilarityQueryType} values.\n * @param {boolean} isInvalid - if true the SPARQL query of type <code>similarityQueryType</code> will be marked as invalid SPARQL query type, If false will be marked as valid.\n */\n markInvalidQueryType(similarityQueryType = undefined, isInvalid = true) {\n const queryType = similarityQueryType || this.selectedQueryType;\n if (SimilarityQueryType.DATA === queryType) {\n this.invalidSelectQueryType = isInvalid;\n return;\n }\n\n if (SimilarityQueryType.SEARCH === queryType) {\n this.invalidSearchQueryType = isInvalid;\n return;\n }\n if (SimilarityQueryType.ANALOGICAL === queryType) {\n this.invalidAnalogicalQueryType = isInvalid;\n }\n }\n\n setSelectedQueryType(queryType) {\n this.selectedQueryType = queryType;\n }\n\n getSelectedQueryType() {\n return this.selectedQueryType;\n }\n\n setSelectedYasguiRenderMode(renderMode) {\n this.selectedYasguiRenderMode = renderMode;\n }\n\n getSelectedYasguiRenderMode() {\n return this.selectedYasguiRenderMode;\n }\n\n isDataQueryTypeSelected() {\n return SimilarityQueryType.DATA === this.selectedQueryType;\n }\n\n isSearchQueryTypeSelected() {\n return SimilarityQueryType.SEARCH === this.selectedQueryType;\n }\n\n isAnalogicalQueryTypeSelected() {\n return SimilarityQueryType.ANALOGICAL === this.selectedQueryType;\n }\n\n isTextType() {\n return this.similarityIndex.isTextType();\n }\n\n isPredicationType() {\n return this.similarityIndex.isPredicationType();\n }\n\n isTextLiteralType() {\n return this.similarityIndex.isTextLiteralType();\n }\n\n hasName() {\n return !!this.similarityIndex.name;\n }\n\n isNameValid() {\n return filenamePattern.test(this.similarityIndex.name);\n }\n\n hasSelectQuery() {\n return !!this.similarityIndex.selectQuery;\n }\n\n hasSearchQuery() {\n return !!this.similarityIndex.searchQuery;\n }\n\n hasAnalogicalQuery() {\n return !!this.similarityIndex.analogicalQuery;\n }\n\n isYasqeRenderMode() {\n return RenderingMode.YASQE === this.getSelectedYasguiRenderMode();\n }\n\n isYasrRenderMode() {\n return RenderingMode.YASR === this.getSelectedYasguiRenderMode();\n }\n\n ///////////////////////////////////////\n // Similarity index getters and setters\n ///////////////////////////////////////\n\n getName() {\n return this.similarityIndex.name;\n }\n\n setName(name) {\n this.similarityIndex.name = name;\n }\n\n setInputIndex(inputIndex) {\n this.similarityIndex.inputIndex = inputIndex;\n }\n\n getInputIndex() {\n return this.similarityIndex.inputIndex;\n }\n\n setLiteralIndex(literalIndex = false) {\n this.similarityIndex.isLiteralIndex = literalIndex;\n }\n\n getSimilarityIndex() {\n return this.similarityIndex;\n }\n\n setStopList(stopList) {\n this.similarityIndex.stopList = stopList;\n }\n\n getStopList() {\n return this.similarityIndex.stopList;\n }\n\n setAnalyzer(analyzer = 'org.apache.lucene.analysis.en.EnglishAnalyzer') {\n this.similarityIndex.analyzer = analyzer;\n }\n\n getAnalyzer() {\n return this.similarityIndex.analyzer;\n }\n\n setType(type) {\n this.similarityIndex.type = type;\n }\n\n getType() {\n return this.similarityIndex.type;\n }\n\n setOptions(options) {\n this.similarityIndex.options = options;\n }\n\n getOptions() {\n return this.similarityIndex.options;\n }\n\n getInference() {\n return this.similarityIndex.infer;\n }\n\n getSameAs() {\n return this.similarityIndex.sameAs;\n }\n}\n","export const SimilarityIndexType = {\n 'TEXT': 'text',\n 'TEXT_LITERAL': 'textLiteral',\n 'PREDICATION': 'predication',\n\n 'isTextType': (type) => {\n return SimilarityIndexType.TEXT === type;\n },\n\n 'isTextLiteralType': (type) => {\n return SimilarityIndexType.TEXT_LITERAL === type;\n },\n\n 'isPredicationType': (type) => {\n return SimilarityIndexType.PREDICATION === type;\n }\n};\n","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, 300);\n });\n }\n}\n","export const YasqeMode = {\n /**\n * The query can be edited.\n */\n WRITE: 'WRITE',\n\n /**\n * The editor is read-only, but the query can be copied.\n */\n READ: 'READ',\n\n /**\n * The editor is read-only and the query can't be copied.\n */\n PROTECTED: 'PROTECTED'\n};\n","export const SimilarityQueryType = {\n 'DATA': 'DATA',\n 'SEARCH': 'SEARCH',\n 'ANALOGICAL': 'ANALOGICAL'\n};\n"],"names":["CreateSimilarityIdxCtrl","$scope","toastr","$uibModal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate","$repositories","EventEmitterService","ModalService","SimilarityQueryType","SimilarityIndexType","similarityIndexInfo","undefined","samples","yasguiConfig","saveOrUpdateExecuted","loadingControllerResources","helpHidden","get","HIDE_SIMILARITY_HELP","savingIndex","searchQueries","allSamples","usedPrefixes","isDirty","viewMode","SimilarityViewMode","CREATE","initialRepoChangeTrigger","changeSimilarityIndexType","similarityIndexType","similarityQueryType","DATA","setType","isPredicationType","PREDICATION","TEXT","changeQueryTab","then","setDefaultQueries","setEditorQuery","getQuery","oldSimilarityQueryType","getSelectedQueryType","Promise","resolve","setSelectedQueryType","updateQueryFromEditor","validateQuery","validateQueryType","catch","error","SimilarityIndexError","console","log","finally","ontotextYasgui","getOntotextYasgui","setSelectedYasguiRenderMode","RenderingMode","YASQE","changeRenderMode","getSelectedYasguiRenderMode","isDataQueryTypeSelected","showYasqeActionButton","YasqeButtonName","INFER_STATEMENTS","EXPANDS_RESULTS","hideYasqeActionButton","setQuery","createSimilarityIndex","validateSimilarityIndex","validateSimilarityIndexNameExistence","createIndex","getSimilarityIndex","goToSimilarityIndexesView","getError","instant","viewQuery","fetchSparqlQuery","showSparqlQuery","preview","YASR","query","saveSearchQuery","validateSimilarityIndexName","validateSearchQuery","validateAnalogicalQuery","saveQuery","isSearchQuery","showToastMessageWithDelay","url","markInvalidQuery","markInvalidQueryType","updateYasguiComponent","initialQuery","similarityIndexNameChanged","setDirty","isNameExist","queryChanged","isCloneViewMode","CLONE","isEditViewMode","EDIT","isCreateViewMode","isYasqeShown","isYasqeRenderMode","isYasrShown","isYasrRenderMode","showEditor","abortQuery","toggleHelp","value","set","getCloseBtnMsg","operationType","editSearchQuery","operation","hasQueryError","hasSelectQueryError","SEARCH","hasSearchQueryError","ANALOGICAL","hasAnalogicalQueryError","hasSelectQuery","invalidSelectQuery","invalidSelectQueryType","hasSearchQuery","invalidSearchQuery","invalidSearchQueryType","hasAnalogicalQuery","invalidAnalogicalQuery","invalidAnalogicalQueryType","getQueryErrorMessage","isEmpty","invalidQueryType","invalidQuery","labelParams","queryType","indexName","getName","indexOptions","getOptions","indexStopList","getStopList","queryInference","getInference","querySameAs","getSameAs","viewType","indexAnalyzer","getAnalyzer","response","data","open","templateUrl","controller","getType","allSampleElement","allSampleElement1","config","defaultConfig","endpoint","getQueryEndpoint","componentId","showEditorTabs","showToolbar","showResultTabs","showYasqeActionButtons","showQueryButton","downloadAsOn","showResultInfo","showYasqeResizer","pageSize","prefixes","render","yasqeActionButtons","DISABLE_YASQE_BUTTONS_CONFIGURATION","INFERRED_AND_SAME_AS_BUTTONS_CONFIGURATION","maxPersistentResponseSize","yasqeMode","canWriteActiveRepo","YasqeMode","WRITE","READ","angular","extend","getActiveRepository","similarityIndex","literalIndexes","inputIndex","options","isLiteralIndex","type","TEXT_LITERAL","name","selectQuery","searchQuery","analogicalQuery","stopList","infer","sameAs","analyzer","success","err","errorMessage","reject","isSearchQueryTypeSelected","changedQuery","JSON","stringify","YasguiComponentDirectiveUtil","getOntotextYasguiElement","getSimilarityIndexName","indexNameFromLocation","search","getSimilarityType","indexType","startsWith","getAndRemoveOption","key","optArr","split","i","length","join","all","validateSelectQuery","getIndexes","some","index","isNameValid","getQueryType","QueryType","SELECT","isQueryValid","valid","openConfirmDialog","title","message","onConfirm","onCancel","openSimpleModal","warning","result","isFunction","activeRepositoryHandler","canEditActiveRepo","beforeunloadHandler","event","returnValue","removeAllListeners","window","removeEventListener","subscriptions","forEach","subscription","repositoryChangeSubscription","ServiceProvider","RepositoryContextService","onSelectedRepositoryChanged","repository","repositoryWillChangeHandler","push","$on","locationChangedHandler","newPath","preventDefault","baseLen","absUrl","path","substring","addEventListener","getViewMode","repoIsInitialized","$watch","getActiveRepositoryObject","activeRepo","getSearchQueries","getSamples","getPrefixes","id","searchQueriesResponses","samplesResponse","usedPrefixesResponse","SimilarityIndexInfo","setName","setOptions","isTextType","setStopList","setAnalyzer","setLiteralIndex","indexesNotInProgress","mapIndexesResponseToSimilarityIndex","filter","isTextLiteralType","isBuiltStatus","isOutdatedStatus","map","concat","getInputIndex","desiredIdx","j","setInputIndex","msg","initialQueryTab","repositoryError","module","$inject","SimilarityIndexStatus","status","CREATING","BUILDING","BUILT","REBUILDING","OUTDATED","INTERRUPTED","OBSOLETE","FAILED","SimilarityIndex","constructor","this","isCreatingStatus","isBuildingStatus","isRebuildingStatus","isInterruptedStatus","isObsoleteStatus","isFailedStatus","YASGUI","responseData","Error","filenamePattern","RegExp","selectedQueryType","selectedYasguiRenderMode","isInvalid","renderMode","isAnalogicalQueryTypeSelected","hasName","test","literalIndex","r","setTimeout","factory","PROTECTED"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const __webpack_id__=55862;export const __webpack_ids__=[55862];export const __webpack_modules__={55862:(e,r,n)=>{n.r(r),n.d(r,{default:()=>t});const t='<link href="css/graphql/endpoint-generation-failure-result-modal.css?v=3.1.0-
|
|
2
|
-
//# sourceMappingURL=55862.
|
|
1
|
+
export const __webpack_id__=55862;export const __webpack_ids__=[55862];export const __webpack_modules__={55862:(e,r,n)=>{n.r(r),n.d(r,{default:()=>t});const t='<link href="css/graphql/endpoint-generation-failure-result-modal.css?v=3.1.0-TR9" rel="stylesheet"/> <div class="modal-header"> <button type="button" class="close" ng-click="close()"></button> <h3 class="modal-title"> {{\'graphql.endpoints_management.generation_failure_report_modal.title\' | translate}}</h3> </div> <div class="modal-body endpoint-generation-failure-result-modal-body"> <div ng-if="endpointReport.errors > 0" class="alert alert-danger"> {{\'graphql.endpoints_management.generation_failure_report_modal.failing_reason_message\' | translate}} </div> <div ng-if="endpointReport.warnings > 0 && endpointReport.errors === 0" class="alert alert-info"> {{\'graphql.endpoints_management.generation_failure_report_modal.warning_reason_message\' | translate}} </div> <table class="report table table-bordered" aria-label="Endpoint generation failure report table"> <thead> <tr class="labels-row"> <th scope="col"> <strong class="errors-count mr-2">{{\'graphql.endpoints_management.generation_failure_report_modal.errors\' | translate: {errorCount: endpointReport.errors} }}</strong> <strong class="warnings-count">{{\'graphql.endpoints_management.generation_failure_report_modal.warnings\' | translate: {warningCount: endpointReport.warnings} }}</strong> </th> </tr> </thead> <tbody> <tr ng-repeat="error in endpointReport.messages.errors" class="error-row"> <td> <div class="alert alert-danger">{{error}}</div> </td> </tr> <tr ng-repeat="warning in endpointReport.messages.warnings" class="warning-row"> <td> <div class="alert alert-warning">{{warning}}</div> </td> </tr> </tbody> </table> </div> <div class="modal-footer mt-0"> <button id="download-failure-report" class="btn btn-secondary mr-1" ng-click="downloadReport()"> <i class="fa fa-arrow-down-to-line"></i> <span>{{\'graphql.endpoints_management.generation_failure_report_modal.actions.download_report.label\' | translate}}</span> </button> <button ng-if="endpointReport.errors === 0 && endpointReport.warnings > 0" id="delete-warnings" class="btn btn-primary" ng-click="deleteReport()"> <span>{{\'graphql.endpoints_management.generation_failure_report_modal.actions.delete_report.label\' | translate}}</span> </button> </div> '}};
|
|
2
|
+
//# sourceMappingURL=55862.4ff9c451d6d5b20139aa.bundle.js.map
|
package/dist/{55862.f9264ede1f9e8641e979.bundle.js.map → 55862.4ff9c451d6d5b20139aa.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"55862.
|
|
1
|
+
{"version":3,"file":"55862.4ff9c451d6d5b20139aa.bundle.js","mappings":"uJAGA,QAFW,spE","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/graphql/endpoint-generation-failure-result-modal.css?v=3.1.0-TR9\" rel=\"stylesheet\"/> <div class=\"modal-header\"> <button type=\"button\" class=\"close\" ng-click=\"close()\"></button> <h3 class=\"modal-title\"> {{'graphql.endpoints_management.generation_failure_report_modal.title' | translate}}</h3> </div> <div class=\"modal-body endpoint-generation-failure-result-modal-body\"> <div ng-if=\"endpointReport.errors > 0\" class=\"alert alert-danger\"> {{'graphql.endpoints_management.generation_failure_report_modal.failing_reason_message' | translate}} </div> <div ng-if=\"endpointReport.warnings > 0 && endpointReport.errors === 0\" class=\"alert alert-info\"> {{'graphql.endpoints_management.generation_failure_report_modal.warning_reason_message' | translate}} </div> <table class=\"report table table-bordered\" aria-label=\"Endpoint generation failure report table\"> <thead> <tr class=\"labels-row\"> <th scope=\"col\"> <strong class=\"errors-count mr-2\">{{'graphql.endpoints_management.generation_failure_report_modal.errors' | translate: {errorCount: endpointReport.errors} }}</strong> <strong class=\"warnings-count\">{{'graphql.endpoints_management.generation_failure_report_modal.warnings' | translate: {warningCount: endpointReport.warnings} }}</strong> </th> </tr> </thead> <tbody> <tr ng-repeat=\"error in endpointReport.messages.errors\" class=\"error-row\"> <td> <div class=\"alert alert-danger\">{{error}}</div> </td> </tr> <tr ng-repeat=\"warning in endpointReport.messages.warnings\" class=\"warning-row\"> <td> <div class=\"alert alert-warning\">{{warning}}</div> </td> </tr> </tbody> </table> </div> <div class=\"modal-footer mt-0\"> <button id=\"download-failure-report\" class=\"btn btn-secondary mr-1\" ng-click=\"downloadReport()\"> <i class=\"fa fa-arrow-down-to-line\"></i> <span>{{'graphql.endpoints_management.generation_failure_report_modal.actions.download_report.label' | translate}}</span> </button> <button ng-if=\"endpointReport.errors === 0 && endpointReport.warnings > 0\" id=\"delete-warnings\" class=\"btn btn-primary\" ng-click=\"deleteReport()\"> <span>{{'graphql.endpoints_management.generation_failure_report_modal.actions.delete_report.label' | translate}}</span> </button> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
|