ontotext-yasgui-web-component 1.3.21 → 1.3.23
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/cjs/confirmation-dialog_9.cjs.entry.js +17 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ontotext-yasgui-web-component.cjs.js +1 -1
- package/dist/collection/components/ontotext-yasgui-web-component/ontotext-yasgui-web-component.js +5 -0
- package/dist/collection/components/save-query-dialog/save-query-dialog.js +6 -3
- package/dist/collection/components/saved-queries-popup/saved-queries-popup.js +1 -1
- package/dist/collection/models/saved-query-configuration.js +2 -1
- package/dist/components/ontotext-yasgui.js +5 -0
- package/dist/components/save-query-dialog2.js +6 -3
- package/dist/components/saved-queries-popup2.js +1 -1
- package/dist/components/saved-query-configuration.js +2 -1
- package/dist/components/translation.service.js +4 -0
- package/dist/esm/confirmation-dialog_9.entry.js +17 -5
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ontotext-yasgui-web-component.js +1 -1
- package/dist/ontotext-yasgui-web-component/ontotext-yasgui-web-component.esm.js +1 -1
- package/dist/ontotext-yasgui-web-component/p-051ec01a.entry.js +1 -0
- package/dist/types/components/save-query-dialog/save-query-dialog.d.ts +4 -0
- package/dist/types/models/saved-query-configuration.d.ts +3 -1
- package/package.json +1 -1
- package/dist/ontotext-yasgui-web-component/p-e1e37638.entry.js +0 -1
|
@@ -434,6 +434,8 @@ const en = {
|
|
|
434
434
|
"yasqe.actions.save_query.dialog.cancel.button": "Cancel",
|
|
435
435
|
"yasqe.actions.show_saved_queries.button.tooltip": "Show saved queries",
|
|
436
436
|
"yasqe.actions.edit_saved_query.button.tooltip": "Edit",
|
|
437
|
+
"yasqe.actions.edit_query.dialog.title": "Edit Saved Query",
|
|
438
|
+
"yasqe.actions.save_query.dialog.save.button": "Save",
|
|
437
439
|
"yasqe.actions.delete_saved_query.button.tooltip": "Delete",
|
|
438
440
|
"yasqe.actions.delete_saved_query.confirm.dialog.label": "Confirm",
|
|
439
441
|
"yasqe.actions.delete_saved_query.confirm.dialog.message": "Are you sure you want to delete the saved query '{{query}}'?",
|
|
@@ -707,6 +709,8 @@ const fr = {
|
|
|
707
709
|
"yasqe.actions.save_query.dialog.cancel.button": "Annuler",
|
|
708
710
|
"yasqe.actions.show_saved_queries.button.tooltip": "Afficher les requêtes enregistrées",
|
|
709
711
|
"yasqe.actions.edit_saved_query.button.tooltip": "Modifier",
|
|
712
|
+
"yasqe.actions.edit_query.dialog.title": "Modifier la requête enregistrée",
|
|
713
|
+
"yasqe.actions.save_query.dialog.save.button": "Enregistrer",
|
|
710
714
|
"yasqe.actions.delete_saved_query.button.tooltip": "Supprimer",
|
|
711
715
|
"yasqe.actions.delete_saved_query.confirm.dialog.label": "Confirmer",
|
|
712
716
|
"yasqe.actions.delete_saved_query.confirm.dialog.message": "Êtes-vous sûr de vouloir supprimer la requête enregistrée '{{query}}' ?",
|
|
@@ -4684,12 +4688,14 @@ const OntotextYasguiWebComponent = class {
|
|
|
4684
4688
|
* Handler for the event fired when the query should be saved by the component client.
|
|
4685
4689
|
*/
|
|
4686
4690
|
createSavedQueryHandler(event) {
|
|
4691
|
+
this.savedQueryData = undefined;
|
|
4687
4692
|
this.createSavedQuery.emit(event.detail);
|
|
4688
4693
|
}
|
|
4689
4694
|
/**
|
|
4690
4695
|
* Handler for the event fired when the query should be saved by the component client.
|
|
4691
4696
|
*/
|
|
4692
4697
|
updateSavedQueryHandler(event) {
|
|
4698
|
+
this.savedQueryData = undefined;
|
|
4693
4699
|
this.updateSavedQuery.emit(event.detail);
|
|
4694
4700
|
}
|
|
4695
4701
|
/**
|
|
@@ -4697,6 +4703,8 @@ const OntotextYasguiWebComponent = class {
|
|
|
4697
4703
|
*/
|
|
4698
4704
|
closeSaveDialogHandler() {
|
|
4699
4705
|
this.showSaveQueryDialog = false;
|
|
4706
|
+
this.savedQueryData = undefined;
|
|
4707
|
+
this.saveQueryData = undefined;
|
|
4700
4708
|
}
|
|
4701
4709
|
/**
|
|
4702
4710
|
* Handler for the event fired when the show saved queries button in the yasqe toolbar is triggered.
|
|
@@ -4905,6 +4913,7 @@ const OntotextYasguiWebComponent = class {
|
|
|
4905
4913
|
data.savedQueriesList = this.savedQueryConfig.savedQueries.map((savedQuery) => {
|
|
4906
4914
|
return {
|
|
4907
4915
|
queryName: savedQuery.queryName,
|
|
4916
|
+
originalQueryName: savedQuery.queryName,
|
|
4908
4917
|
query: savedQuery.query,
|
|
4909
4918
|
isPublic: savedQuery.isPublic,
|
|
4910
4919
|
owner: savedQuery.owner,
|
|
@@ -5123,10 +5132,11 @@ OntotextYasguiWebComponent.style = ontotextYasguiWebComponentCss;
|
|
|
5123
5132
|
|
|
5124
5133
|
// TODO: rename to be like internal model
|
|
5125
5134
|
class SaveQueryData {
|
|
5126
|
-
constructor(queryName, query, isPublic, isNew, readonly, owner, messages) {
|
|
5135
|
+
constructor(queryName, query, isPublic, originalQueryName, isNew, readonly, owner, messages) {
|
|
5127
5136
|
this.queryName = queryName;
|
|
5128
5137
|
this.query = query;
|
|
5129
5138
|
this.isPublic = isPublic;
|
|
5139
|
+
this.originalQueryName = originalQueryName;
|
|
5130
5140
|
this.isNew = isNew;
|
|
5131
5141
|
this.readonly = readonly;
|
|
5132
5142
|
this.owner = owner;
|
|
@@ -5149,6 +5159,7 @@ const SaveQueryDialog = class {
|
|
|
5149
5159
|
this.serviceFactory = undefined;
|
|
5150
5160
|
this.data = undefined;
|
|
5151
5161
|
this.queryName = '';
|
|
5162
|
+
this.originalQueryName = '';
|
|
5152
5163
|
this.query = '';
|
|
5153
5164
|
this.isPublic = false;
|
|
5154
5165
|
this.isNew = false;
|
|
@@ -5169,6 +5180,7 @@ const SaveQueryDialog = class {
|
|
|
5169
5180
|
this.translationService = this.serviceFactory.get(TranslationService);
|
|
5170
5181
|
if (this.data) {
|
|
5171
5182
|
this.queryName = this.data.queryName || this.queryName;
|
|
5183
|
+
this.originalQueryName = this.data.queryName || this.queryName;
|
|
5172
5184
|
this.query = this.data.query || this.query;
|
|
5173
5185
|
this.isPublic = this.data.isPublic !== undefined ? this.data.isPublic : this.isPublic;
|
|
5174
5186
|
this.isNew = this.data.isNew !== undefined ? this.data.isNew : this.isNew;
|
|
@@ -5200,10 +5212,10 @@ const SaveQueryDialog = class {
|
|
|
5200
5212
|
const query = this.query;
|
|
5201
5213
|
const isPublic = this.isPublic;
|
|
5202
5214
|
if (this.isNew) {
|
|
5203
|
-
this.internalSaveQueryEvent.emit(new SaveQueryData(queryName, query, isPublic));
|
|
5215
|
+
this.internalSaveQueryEvent.emit(new SaveQueryData(queryName, query, isPublic, this.originalQueryName));
|
|
5204
5216
|
}
|
|
5205
5217
|
else {
|
|
5206
|
-
this.internalUpdateQueryEvent.emit(new UpdateQueryData(queryName, query, isPublic));
|
|
5218
|
+
this.internalUpdateQueryEvent.emit(new UpdateQueryData(queryName, query, isPublic, this.originalQueryName));
|
|
5207
5219
|
}
|
|
5208
5220
|
}
|
|
5209
5221
|
handleQueryNameChange(event) {
|
|
@@ -5250,7 +5262,7 @@ const SaveQueryDialog = class {
|
|
|
5250
5262
|
return this.hasMissingFields() || ((_a = this.data.messages) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
5251
5263
|
}
|
|
5252
5264
|
render() {
|
|
5253
|
-
return (index.h(index.Host, { tabindex: '-1' }, index.h("div", { class: "dialog-overlay", onClick: (evt) => this.onClose(evt) }, index.h("div", { class: "dialog" }, index.h("div", { class: "dialog-header" }, index.h("h3", { class: "dialog-title" }, this.translationService.translate('yasqe.actions.save_query.dialog.title')), index.h("button", { class: "close-button icon-close", onClick: (evt) => this.onClose(evt) })), index.h("div", { class: "dialog-body" }, index.h("div", { class: "save-query-form" }, index.h("div", { class: "form-field query-name-field" }, index.h("input", { type: "text", name: "queryName", id: "queryName", required: true, value: this.queryName, class: !this.queryName.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query_name.label'), onInput: (evt) => this.handleQueryNameChange(evt) })), index.h("div", { class: "form-field is-public-field" }, index.h("yasgui-tooltip", { placement: "top", "data-tooltip": this.translationService.translate('yasqe.actions.save_query.dialog.public_query.tooltip') }, index.h("label", null, index.h("input", { type: "checkbox", name: "publicQuery", id: "publicQuery", checked: this.isPublic, onChange: (evt) => this.handleIsPublicChange(evt) }), this.translationService.translate('yasqe.actions.save_query.dialog.public_query.label')))), index.h("div", { class: "form-field query-field" }, index.h("textarea", { name: "query", id: "query", required: true, rows: 8, class: !this.query.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query.label'), value: this.query, onInput: (evt) => this.handleQueryChange(evt) })), this.showErrorMessage() && index.h(Alert, { messages: this.getErrorMessages() }, "\u00A0"))), index.h("div", { class: "dialog-footer" }, index.h("button", { class: "cancel-button", onClick: (evt) => this.onClose(evt), ref: (el) => (this.cancelButton = el) }, this.translationService.translate('yasqe.actions.save_query.dialog.cancel.button')), index.h("button", { class: "ok-button", disabled: !this.isSaveAllowed, onClick: (evt) => this.onCreate(evt) }, this.translationService.translate('yasqe.actions.save_query.dialog.create.button')))))));
|
|
5265
|
+
return (index.h(index.Host, { tabindex: '-1' }, index.h("div", { class: "dialog-overlay", onClick: (evt) => this.onClose(evt) }, index.h("div", { class: "dialog" }, index.h("div", { class: "dialog-header" }, index.h("h3", { class: "dialog-title" }, this.translationService.translate(this.isNew ? 'yasqe.actions.save_query.dialog.title' : 'yasqe.actions.edit_query.dialog.title')), index.h("button", { class: "close-button icon-close", onClick: (evt) => this.onClose(evt) })), index.h("div", { class: "dialog-body" }, index.h("div", { class: "save-query-form" }, index.h("div", { class: "form-field query-name-field" }, index.h("input", { type: "text", name: "queryName", id: "queryName", required: true, value: this.queryName, class: !this.queryName.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query_name.label'), onInput: (evt) => this.handleQueryNameChange(evt) })), index.h("div", { class: "form-field is-public-field" }, index.h("yasgui-tooltip", { placement: "top", "data-tooltip": this.translationService.translate('yasqe.actions.save_query.dialog.public_query.tooltip') }, index.h("label", null, index.h("input", { type: "checkbox", name: "publicQuery", id: "publicQuery", checked: this.isPublic, onChange: (evt) => this.handleIsPublicChange(evt) }), this.translationService.translate('yasqe.actions.save_query.dialog.public_query.label')))), index.h("div", { class: "form-field query-field" }, index.h("textarea", { name: "query", id: "query", required: true, rows: 8, class: !this.query.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query.label'), value: this.query, onInput: (evt) => this.handleQueryChange(evt) })), this.showErrorMessage() && index.h(Alert, { messages: this.getErrorMessages() }, "\u00A0"))), index.h("div", { class: "dialog-footer" }, index.h("button", { class: "cancel-button", onClick: (evt) => this.onClose(evt), ref: (el) => (this.cancelButton = el) }, this.translationService.translate('yasqe.actions.save_query.dialog.cancel.button')), index.h("button", { class: "ok-button", disabled: !this.isSaveAllowed, onClick: (evt) => this.onCreate(evt) }, this.translationService.translate(this.isNew ? 'yasqe.actions.save_query.dialog.create.button' : 'yasqe.actions.save_query.dialog.save.button')))))));
|
|
5254
5266
|
}
|
|
5255
5267
|
get hostElement() { return index.getElement(this); }
|
|
5256
5268
|
};
|
|
@@ -5299,7 +5311,7 @@ const SavedQueriesPopup = class {
|
|
|
5299
5311
|
}
|
|
5300
5312
|
onEdit(evt, selectedQuery) {
|
|
5301
5313
|
evt.stopPropagation();
|
|
5302
|
-
this.internalEditSavedQueryEvent.emit(new UpdateQueryData(selectedQuery.queryName, selectedQuery.query, selectedQuery.isPublic, false));
|
|
5314
|
+
this.internalEditSavedQueryEvent.emit(new UpdateQueryData(selectedQuery.queryName, selectedQuery.query, selectedQuery.isPublic, selectedQuery.originalQueryName, false));
|
|
5303
5315
|
}
|
|
5304
5316
|
onDelete(evt, selectedQuery) {
|
|
5305
5317
|
evt.stopPropagation();
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["ontotext-download-as.cjs",[[0,"ontotext-download-as",{"translationService":[16],"nameLabelKey":[1,"name-label-key"],"tooltipLabelKey":[1,"tooltip-label-key"],"items":[16],"pluginName":[1,"plugin-name"],"query":[1],"infer":[4],"sameAs":[4,"same-as"]}]]],["keyboard-shortcuts-dialog.cjs",[[0,"keyboard-shortcuts-dialog",{"items":[16],"translationService":[16],"open":[32]},[[8,"keydown","keydownListener"]]]]],["alert-box.cjs",[[0,"alert-box",{"type":[1],"message":[1],"noIcon":[4,"no-icon"],"noButton":[4,"no-button"],"isVisible":[32]}]]],["copy-resource-link-button.cjs",[[0,"copy-resource-link-button",{"uri":[1],"classes":[1]}]]],["loader-component.cjs",[[1,"loader-component",{"timeFormattingService":[16],"showQueryProgress":[4,"show-query-progress"],"message":[1],"additionalMessage":[1,"additional-message"],"size":[1],"hidden":[4],"queryProgress":[32]}]]],["ontotext-editable-text-field.cjs",[[0,"ontotext-editable-text-field",{"value":[1025],"edit":[1028],"translationService":[16]},[[8,"click","handleClickOutside"],[4,"keydown","keydownListener"]]]]],["ontotext-pagination.cjs",[[0,"ontotext-pagination",{"pageNumber":[2,"page-number"],"pageSize":[2,"page-size"],"totalElements":[2,"total-elements"],"pageElements":[2,"page-elements"],"hasMorePages":[4,"has-more-pages"]}]]],["confirmation-dialog_9.cjs",[[0,"ontotext-yasgui",{"config":[16],"language":[1],"savedQueryConfig":[16],"saveQueryData":[32],"savedQueryData":[32],"deleteQueryData":[32],"isVerticalOrientation":[32],"renderingMode":[32],"showSaveQueryDialog":[32],"showSavedQueriesPopup":[32],"showSavedQueriesPopupTarget":[32],"showConfirmationDialog":[32],"showShareQueryDialog":[32],"showCopyResourceLinkDialog":[32],"copiedResourceLink":[32],"loaderMessage":[32],"additionalLoaderMessage":[32],"yasqeBtnLabel":[32],"yasguiBtnLabel":[32],"yasrBtnLabel":[32],"changeRenderMode":[64],"setQuery":[64],"query":[64],"getQuery":[64],"isQueryValid":[64],"openTab":[64],"getQueryMode":[64],"getQueryType":[64],"getEmbeddedResultAsJson":[64],"getEmbeddedResultAsCSV":[64],"hideYasqeActionButton":[64],"showYasqeActionButton":[64],"getOngoingRequestsInfo":[64],"abortQuery":[64],"abortAllRequests":[64],"reInitYasgui":[64],"isQueryDirty":[64]},[[9,"resize","onResize"],[8,"beforeunload","onBeforeunloadHandler"],[0,"internalCreateSavedQueryEvent","saveQueryHandler"],[0,"internalSaveQueryEvent","createSavedQueryHandler"],[0,"internalUpdateQueryEvent","updateSavedQueryHandler"],[0,"internalSaveQueryDialogClosedEvent","closeSaveDialogHandler"],[0,"internalShowSavedQueriesEvent","showSavedQueriesHandler"],[0,"internalSaveQuerySelectedEvent","savedQuerySelectedHandler"],[0,"internalEditSavedQueryEvent","editSavedQueryHandler"],[0,"internalSavedQuerySelectedForDeleteEvent","savedQuerySelectedForEditHandler"],[0,"internalConfirmationApprovedEvent","deleteSavedQueryHandler"],[0,"internalConfirmationRejectedEvent","closeSavedQueryDeleteConfirmationHandler"],[0,"internalCloseSavedQueriesPopupEvent","closeSavedQueriesPopupHandler"],[0,"internalSavedQuerySelectedForShareEvent","savedQuerySelectedForShareHandler"],[0,"internalShareQueryEvent","shareQueryHandler"],[0,"internalQueryShareLinkCopiedEvent","savedQueryShareLinkCopiedHandler"],[0,"internalShareQueryDialogClosedEvent","closeShareQueryDialogHandler"],[0,"internalResourceLinkDialogClosedEvent","resourceLinkDialogClosedHandler"],[0,"internalResourceLinkCopiedEvent","resourceLinkCopiedHandler"],[0,"internalShowResourceCopyLinkDialogEvent","showResourceCopyLinkDialogHandler"],[0,"internalDownloadAsEvent","onDownloadAsEventHandler"],[0,"internalNotificationMessageEvent","notificationMessageHandler"],[0,"internalQueryEvent","onQuery"],[0,"internalQueryExecuted","onInternalQueryExecuted"],[0,"internalCountQueryEvent","onCountQuery"],[0,"internalCountQueryResponseEvent","onCountQueryResponse"],[0,"internalRequestAbortedEvent","onQueryAborted"]]],[0,"copy-resource-link-dialog",{"serviceFactory":[16],"resourceLink":[1,"resource-link"]}],[0,"share-query-dialog",{"config":[16],"serviceFactory":[16]}],[0,"save-query-dialog",{"serviceFactory":[16],"data":[16],"queryName":[32],"query":[32],"isPublic":[32],"isNew":[32],"isSaveAllowed":[32]},[[8,"keydown","keydownListener"]]],[0,"confirmation-dialog",{"translationService":[16],"config":[16]},[[8,"keydown","keydownListener"]]],[0,"saved-queries-popup",{"config":[16],"serviceFactory":[16]},[[8,"click","onWindowResize"],[8,"keydown","keydownListener"]]],[0,"copy-link-dialog",{"config":[16],"serviceFactory":[16],"copyLinkEventsObserver":[16],"classes":[1]}],[4,"yasgui-tooltip",{"dataTooltip":[1,"data-tooltip"],"placement":[1],"showOnClick":[4,"show-on-click"]}],[4,"ontotext-dialog-web-component",{"config":[16]},[[4,"keydown","keydownListener"]]]]],["ontotext-dropdown.cjs",[[0,"ontotext-dropdown",{"translationService":[16],"nameLabelKey":[1,"name-label-key"],"tooltipLabelKey":[1,"tooltip-label-key"],"items":[16],"iconClass":[1,"icon-class"],"open":[32],"showTooltip":[32]},[[8,"keydown","keydownListener"],[8,"click","mouseClickListener"]]]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["ontotext-download-as.cjs",[[0,"ontotext-download-as",{"translationService":[16],"nameLabelKey":[1,"name-label-key"],"tooltipLabelKey":[1,"tooltip-label-key"],"items":[16],"pluginName":[1,"plugin-name"],"query":[1],"infer":[4],"sameAs":[4,"same-as"]}]]],["keyboard-shortcuts-dialog.cjs",[[0,"keyboard-shortcuts-dialog",{"items":[16],"translationService":[16],"open":[32]},[[8,"keydown","keydownListener"]]]]],["alert-box.cjs",[[0,"alert-box",{"type":[1],"message":[1],"noIcon":[4,"no-icon"],"noButton":[4,"no-button"],"isVisible":[32]}]]],["copy-resource-link-button.cjs",[[0,"copy-resource-link-button",{"uri":[1],"classes":[1]}]]],["loader-component.cjs",[[1,"loader-component",{"timeFormattingService":[16],"showQueryProgress":[4,"show-query-progress"],"message":[1],"additionalMessage":[1,"additional-message"],"size":[1],"hidden":[4],"queryProgress":[32]}]]],["ontotext-editable-text-field.cjs",[[0,"ontotext-editable-text-field",{"value":[1025],"edit":[1028],"translationService":[16]},[[8,"click","handleClickOutside"],[4,"keydown","keydownListener"]]]]],["ontotext-pagination.cjs",[[0,"ontotext-pagination",{"pageNumber":[2,"page-number"],"pageSize":[2,"page-size"],"totalElements":[2,"total-elements"],"pageElements":[2,"page-elements"],"hasMorePages":[4,"has-more-pages"]}]]],["confirmation-dialog_9.cjs",[[0,"ontotext-yasgui",{"config":[16],"language":[1],"savedQueryConfig":[16],"saveQueryData":[32],"savedQueryData":[32],"deleteQueryData":[32],"isVerticalOrientation":[32],"renderingMode":[32],"showSaveQueryDialog":[32],"showSavedQueriesPopup":[32],"showSavedQueriesPopupTarget":[32],"showConfirmationDialog":[32],"showShareQueryDialog":[32],"showCopyResourceLinkDialog":[32],"copiedResourceLink":[32],"loaderMessage":[32],"additionalLoaderMessage":[32],"yasqeBtnLabel":[32],"yasguiBtnLabel":[32],"yasrBtnLabel":[32],"changeRenderMode":[64],"setQuery":[64],"query":[64],"getQuery":[64],"isQueryValid":[64],"openTab":[64],"getQueryMode":[64],"getQueryType":[64],"getEmbeddedResultAsJson":[64],"getEmbeddedResultAsCSV":[64],"hideYasqeActionButton":[64],"showYasqeActionButton":[64],"getOngoingRequestsInfo":[64],"abortQuery":[64],"abortAllRequests":[64],"reInitYasgui":[64],"isQueryDirty":[64]},[[9,"resize","onResize"],[8,"beforeunload","onBeforeunloadHandler"],[0,"internalCreateSavedQueryEvent","saveQueryHandler"],[0,"internalSaveQueryEvent","createSavedQueryHandler"],[0,"internalUpdateQueryEvent","updateSavedQueryHandler"],[0,"internalSaveQueryDialogClosedEvent","closeSaveDialogHandler"],[0,"internalShowSavedQueriesEvent","showSavedQueriesHandler"],[0,"internalSaveQuerySelectedEvent","savedQuerySelectedHandler"],[0,"internalEditSavedQueryEvent","editSavedQueryHandler"],[0,"internalSavedQuerySelectedForDeleteEvent","savedQuerySelectedForEditHandler"],[0,"internalConfirmationApprovedEvent","deleteSavedQueryHandler"],[0,"internalConfirmationRejectedEvent","closeSavedQueryDeleteConfirmationHandler"],[0,"internalCloseSavedQueriesPopupEvent","closeSavedQueriesPopupHandler"],[0,"internalSavedQuerySelectedForShareEvent","savedQuerySelectedForShareHandler"],[0,"internalShareQueryEvent","shareQueryHandler"],[0,"internalQueryShareLinkCopiedEvent","savedQueryShareLinkCopiedHandler"],[0,"internalShareQueryDialogClosedEvent","closeShareQueryDialogHandler"],[0,"internalResourceLinkDialogClosedEvent","resourceLinkDialogClosedHandler"],[0,"internalResourceLinkCopiedEvent","resourceLinkCopiedHandler"],[0,"internalShowResourceCopyLinkDialogEvent","showResourceCopyLinkDialogHandler"],[0,"internalDownloadAsEvent","onDownloadAsEventHandler"],[0,"internalNotificationMessageEvent","notificationMessageHandler"],[0,"internalQueryEvent","onQuery"],[0,"internalQueryExecuted","onInternalQueryExecuted"],[0,"internalCountQueryEvent","onCountQuery"],[0,"internalCountQueryResponseEvent","onCountQueryResponse"],[0,"internalRequestAbortedEvent","onQueryAborted"]]],[0,"copy-resource-link-dialog",{"serviceFactory":[16],"resourceLink":[1,"resource-link"]}],[0,"share-query-dialog",{"config":[16],"serviceFactory":[16]}],[0,"save-query-dialog",{"serviceFactory":[16],"data":[16],"queryName":[32],"originalQueryName":[32],"query":[32],"isPublic":[32],"isNew":[32],"isSaveAllowed":[32]},[[8,"keydown","keydownListener"]]],[0,"confirmation-dialog",{"translationService":[16],"config":[16]},[[8,"keydown","keydownListener"]]],[0,"saved-queries-popup",{"config":[16],"serviceFactory":[16]},[[8,"click","onWindowResize"],[8,"keydown","keydownListener"]]],[0,"copy-link-dialog",{"config":[16],"serviceFactory":[16],"copyLinkEventsObserver":[16],"classes":[1]}],[4,"yasgui-tooltip",{"dataTooltip":[1,"data-tooltip"],"placement":[1],"showOnClick":[4,"show-on-click"]}],[4,"ontotext-dialog-web-component",{"config":[16]},[[4,"keydown","keydownListener"]]]]],["ontotext-dropdown.cjs",[[0,"ontotext-dropdown",{"translationService":[16],"nameLabelKey":[1,"name-label-key"],"tooltipLabelKey":[1,"tooltip-label-key"],"items":[16],"iconClass":[1,"icon-class"],"open":[32],"showTooltip":[32]},[[8,"keydown","keydownListener"],[8,"click","mouseClickListener"]]]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["ontotext-download-as.cjs",[[0,"ontotext-download-as",{"translationService":[16],"nameLabelKey":[1,"name-label-key"],"tooltipLabelKey":[1,"tooltip-label-key"],"items":[16],"pluginName":[1,"plugin-name"],"query":[1],"infer":[4],"sameAs":[4,"same-as"]}]]],["keyboard-shortcuts-dialog.cjs",[[0,"keyboard-shortcuts-dialog",{"items":[16],"translationService":[16],"open":[32]},[[8,"keydown","keydownListener"]]]]],["alert-box.cjs",[[0,"alert-box",{"type":[1],"message":[1],"noIcon":[4,"no-icon"],"noButton":[4,"no-button"],"isVisible":[32]}]]],["copy-resource-link-button.cjs",[[0,"copy-resource-link-button",{"uri":[1],"classes":[1]}]]],["loader-component.cjs",[[1,"loader-component",{"timeFormattingService":[16],"showQueryProgress":[4,"show-query-progress"],"message":[1],"additionalMessage":[1,"additional-message"],"size":[1],"hidden":[4],"queryProgress":[32]}]]],["ontotext-editable-text-field.cjs",[[0,"ontotext-editable-text-field",{"value":[1025],"edit":[1028],"translationService":[16]},[[8,"click","handleClickOutside"],[4,"keydown","keydownListener"]]]]],["ontotext-pagination.cjs",[[0,"ontotext-pagination",{"pageNumber":[2,"page-number"],"pageSize":[2,"page-size"],"totalElements":[2,"total-elements"],"pageElements":[2,"page-elements"],"hasMorePages":[4,"has-more-pages"]}]]],["confirmation-dialog_9.cjs",[[0,"ontotext-yasgui",{"config":[16],"language":[1],"savedQueryConfig":[16],"saveQueryData":[32],"savedQueryData":[32],"deleteQueryData":[32],"isVerticalOrientation":[32],"renderingMode":[32],"showSaveQueryDialog":[32],"showSavedQueriesPopup":[32],"showSavedQueriesPopupTarget":[32],"showConfirmationDialog":[32],"showShareQueryDialog":[32],"showCopyResourceLinkDialog":[32],"copiedResourceLink":[32],"loaderMessage":[32],"additionalLoaderMessage":[32],"yasqeBtnLabel":[32],"yasguiBtnLabel":[32],"yasrBtnLabel":[32],"changeRenderMode":[64],"setQuery":[64],"query":[64],"getQuery":[64],"isQueryValid":[64],"openTab":[64],"getQueryMode":[64],"getQueryType":[64],"getEmbeddedResultAsJson":[64],"getEmbeddedResultAsCSV":[64],"hideYasqeActionButton":[64],"showYasqeActionButton":[64],"getOngoingRequestsInfo":[64],"abortQuery":[64],"abortAllRequests":[64],"reInitYasgui":[64],"isQueryDirty":[64]},[[9,"resize","onResize"],[8,"beforeunload","onBeforeunloadHandler"],[0,"internalCreateSavedQueryEvent","saveQueryHandler"],[0,"internalSaveQueryEvent","createSavedQueryHandler"],[0,"internalUpdateQueryEvent","updateSavedQueryHandler"],[0,"internalSaveQueryDialogClosedEvent","closeSaveDialogHandler"],[0,"internalShowSavedQueriesEvent","showSavedQueriesHandler"],[0,"internalSaveQuerySelectedEvent","savedQuerySelectedHandler"],[0,"internalEditSavedQueryEvent","editSavedQueryHandler"],[0,"internalSavedQuerySelectedForDeleteEvent","savedQuerySelectedForEditHandler"],[0,"internalConfirmationApprovedEvent","deleteSavedQueryHandler"],[0,"internalConfirmationRejectedEvent","closeSavedQueryDeleteConfirmationHandler"],[0,"internalCloseSavedQueriesPopupEvent","closeSavedQueriesPopupHandler"],[0,"internalSavedQuerySelectedForShareEvent","savedQuerySelectedForShareHandler"],[0,"internalShareQueryEvent","shareQueryHandler"],[0,"internalQueryShareLinkCopiedEvent","savedQueryShareLinkCopiedHandler"],[0,"internalShareQueryDialogClosedEvent","closeShareQueryDialogHandler"],[0,"internalResourceLinkDialogClosedEvent","resourceLinkDialogClosedHandler"],[0,"internalResourceLinkCopiedEvent","resourceLinkCopiedHandler"],[0,"internalShowResourceCopyLinkDialogEvent","showResourceCopyLinkDialogHandler"],[0,"internalDownloadAsEvent","onDownloadAsEventHandler"],[0,"internalNotificationMessageEvent","notificationMessageHandler"],[0,"internalQueryEvent","onQuery"],[0,"internalQueryExecuted","onInternalQueryExecuted"],[0,"internalCountQueryEvent","onCountQuery"],[0,"internalCountQueryResponseEvent","onCountQueryResponse"],[0,"internalRequestAbortedEvent","onQueryAborted"]]],[0,"copy-resource-link-dialog",{"serviceFactory":[16],"resourceLink":[1,"resource-link"]}],[0,"share-query-dialog",{"config":[16],"serviceFactory":[16]}],[0,"save-query-dialog",{"serviceFactory":[16],"data":[16],"queryName":[32],"query":[32],"isPublic":[32],"isNew":[32],"isSaveAllowed":[32]},[[8,"keydown","keydownListener"]]],[0,"confirmation-dialog",{"translationService":[16],"config":[16]},[[8,"keydown","keydownListener"]]],[0,"saved-queries-popup",{"config":[16],"serviceFactory":[16]},[[8,"click","onWindowResize"],[8,"keydown","keydownListener"]]],[0,"copy-link-dialog",{"config":[16],"serviceFactory":[16],"copyLinkEventsObserver":[16],"classes":[1]}],[4,"yasgui-tooltip",{"dataTooltip":[1,"data-tooltip"],"placement":[1],"showOnClick":[4,"show-on-click"]}],[4,"ontotext-dialog-web-component",{"config":[16]},[[4,"keydown","keydownListener"]]]]],["ontotext-dropdown.cjs",[[0,"ontotext-dropdown",{"translationService":[16],"nameLabelKey":[1,"name-label-key"],"tooltipLabelKey":[1,"tooltip-label-key"],"items":[16],"iconClass":[1,"icon-class"],"open":[32],"showTooltip":[32]},[[8,"keydown","keydownListener"],[8,"click","mouseClickListener"]]]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["ontotext-download-as.cjs",[[0,"ontotext-download-as",{"translationService":[16],"nameLabelKey":[1,"name-label-key"],"tooltipLabelKey":[1,"tooltip-label-key"],"items":[16],"pluginName":[1,"plugin-name"],"query":[1],"infer":[4],"sameAs":[4,"same-as"]}]]],["keyboard-shortcuts-dialog.cjs",[[0,"keyboard-shortcuts-dialog",{"items":[16],"translationService":[16],"open":[32]},[[8,"keydown","keydownListener"]]]]],["alert-box.cjs",[[0,"alert-box",{"type":[1],"message":[1],"noIcon":[4,"no-icon"],"noButton":[4,"no-button"],"isVisible":[32]}]]],["copy-resource-link-button.cjs",[[0,"copy-resource-link-button",{"uri":[1],"classes":[1]}]]],["loader-component.cjs",[[1,"loader-component",{"timeFormattingService":[16],"showQueryProgress":[4,"show-query-progress"],"message":[1],"additionalMessage":[1,"additional-message"],"size":[1],"hidden":[4],"queryProgress":[32]}]]],["ontotext-editable-text-field.cjs",[[0,"ontotext-editable-text-field",{"value":[1025],"edit":[1028],"translationService":[16]},[[8,"click","handleClickOutside"],[4,"keydown","keydownListener"]]]]],["ontotext-pagination.cjs",[[0,"ontotext-pagination",{"pageNumber":[2,"page-number"],"pageSize":[2,"page-size"],"totalElements":[2,"total-elements"],"pageElements":[2,"page-elements"],"hasMorePages":[4,"has-more-pages"]}]]],["confirmation-dialog_9.cjs",[[0,"ontotext-yasgui",{"config":[16],"language":[1],"savedQueryConfig":[16],"saveQueryData":[32],"savedQueryData":[32],"deleteQueryData":[32],"isVerticalOrientation":[32],"renderingMode":[32],"showSaveQueryDialog":[32],"showSavedQueriesPopup":[32],"showSavedQueriesPopupTarget":[32],"showConfirmationDialog":[32],"showShareQueryDialog":[32],"showCopyResourceLinkDialog":[32],"copiedResourceLink":[32],"loaderMessage":[32],"additionalLoaderMessage":[32],"yasqeBtnLabel":[32],"yasguiBtnLabel":[32],"yasrBtnLabel":[32],"changeRenderMode":[64],"setQuery":[64],"query":[64],"getQuery":[64],"isQueryValid":[64],"openTab":[64],"getQueryMode":[64],"getQueryType":[64],"getEmbeddedResultAsJson":[64],"getEmbeddedResultAsCSV":[64],"hideYasqeActionButton":[64],"showYasqeActionButton":[64],"getOngoingRequestsInfo":[64],"abortQuery":[64],"abortAllRequests":[64],"reInitYasgui":[64],"isQueryDirty":[64]},[[9,"resize","onResize"],[8,"beforeunload","onBeforeunloadHandler"],[0,"internalCreateSavedQueryEvent","saveQueryHandler"],[0,"internalSaveQueryEvent","createSavedQueryHandler"],[0,"internalUpdateQueryEvent","updateSavedQueryHandler"],[0,"internalSaveQueryDialogClosedEvent","closeSaveDialogHandler"],[0,"internalShowSavedQueriesEvent","showSavedQueriesHandler"],[0,"internalSaveQuerySelectedEvent","savedQuerySelectedHandler"],[0,"internalEditSavedQueryEvent","editSavedQueryHandler"],[0,"internalSavedQuerySelectedForDeleteEvent","savedQuerySelectedForEditHandler"],[0,"internalConfirmationApprovedEvent","deleteSavedQueryHandler"],[0,"internalConfirmationRejectedEvent","closeSavedQueryDeleteConfirmationHandler"],[0,"internalCloseSavedQueriesPopupEvent","closeSavedQueriesPopupHandler"],[0,"internalSavedQuerySelectedForShareEvent","savedQuerySelectedForShareHandler"],[0,"internalShareQueryEvent","shareQueryHandler"],[0,"internalQueryShareLinkCopiedEvent","savedQueryShareLinkCopiedHandler"],[0,"internalShareQueryDialogClosedEvent","closeShareQueryDialogHandler"],[0,"internalResourceLinkDialogClosedEvent","resourceLinkDialogClosedHandler"],[0,"internalResourceLinkCopiedEvent","resourceLinkCopiedHandler"],[0,"internalShowResourceCopyLinkDialogEvent","showResourceCopyLinkDialogHandler"],[0,"internalDownloadAsEvent","onDownloadAsEventHandler"],[0,"internalNotificationMessageEvent","notificationMessageHandler"],[0,"internalQueryEvent","onQuery"],[0,"internalQueryExecuted","onInternalQueryExecuted"],[0,"internalCountQueryEvent","onCountQuery"],[0,"internalCountQueryResponseEvent","onCountQueryResponse"],[0,"internalRequestAbortedEvent","onQueryAborted"]]],[0,"copy-resource-link-dialog",{"serviceFactory":[16],"resourceLink":[1,"resource-link"]}],[0,"share-query-dialog",{"config":[16],"serviceFactory":[16]}],[0,"save-query-dialog",{"serviceFactory":[16],"data":[16],"queryName":[32],"originalQueryName":[32],"query":[32],"isPublic":[32],"isNew":[32],"isSaveAllowed":[32]},[[8,"keydown","keydownListener"]]],[0,"confirmation-dialog",{"translationService":[16],"config":[16]},[[8,"keydown","keydownListener"]]],[0,"saved-queries-popup",{"config":[16],"serviceFactory":[16]},[[8,"click","onWindowResize"],[8,"keydown","keydownListener"]]],[0,"copy-link-dialog",{"config":[16],"serviceFactory":[16],"copyLinkEventsObserver":[16],"classes":[1]}],[4,"yasgui-tooltip",{"dataTooltip":[1,"data-tooltip"],"placement":[1],"showOnClick":[4,"show-on-click"]}],[4,"ontotext-dialog-web-component",{"config":[16]},[[4,"keydown","keydownListener"]]]]],["ontotext-dropdown.cjs",[[0,"ontotext-dropdown",{"translationService":[16],"nameLabelKey":[1,"name-label-key"],"tooltipLabelKey":[1,"tooltip-label-key"],"items":[16],"iconClass":[1,"icon-class"],"open":[32],"showTooltip":[32]},[[8,"keydown","keydownListener"],[8,"click","mouseClickListener"]]]]]], options);
|
|
19
19
|
});
|
package/dist/collection/components/ontotext-yasgui-web-component/ontotext-yasgui-web-component.js
CHANGED
|
@@ -296,12 +296,14 @@ export class OntotextYasguiWebComponent {
|
|
|
296
296
|
* Handler for the event fired when the query should be saved by the component client.
|
|
297
297
|
*/
|
|
298
298
|
createSavedQueryHandler(event) {
|
|
299
|
+
this.savedQueryData = undefined;
|
|
299
300
|
this.createSavedQuery.emit(event.detail);
|
|
300
301
|
}
|
|
301
302
|
/**
|
|
302
303
|
* Handler for the event fired when the query should be saved by the component client.
|
|
303
304
|
*/
|
|
304
305
|
updateSavedQueryHandler(event) {
|
|
306
|
+
this.savedQueryData = undefined;
|
|
305
307
|
this.updateSavedQuery.emit(event.detail);
|
|
306
308
|
}
|
|
307
309
|
/**
|
|
@@ -309,6 +311,8 @@ export class OntotextYasguiWebComponent {
|
|
|
309
311
|
*/
|
|
310
312
|
closeSaveDialogHandler() {
|
|
311
313
|
this.showSaveQueryDialog = false;
|
|
314
|
+
this.savedQueryData = undefined;
|
|
315
|
+
this.saveQueryData = undefined;
|
|
312
316
|
}
|
|
313
317
|
/**
|
|
314
318
|
* Handler for the event fired when the show saved queries button in the yasqe toolbar is triggered.
|
|
@@ -517,6 +521,7 @@ export class OntotextYasguiWebComponent {
|
|
|
517
521
|
data.savedQueriesList = this.savedQueryConfig.savedQueries.map((savedQuery) => {
|
|
518
522
|
return {
|
|
519
523
|
queryName: savedQuery.queryName,
|
|
524
|
+
originalQueryName: savedQuery.queryName,
|
|
520
525
|
query: savedQuery.query,
|
|
521
526
|
isPublic: savedQuery.isPublic,
|
|
522
527
|
owner: savedQuery.owner,
|
|
@@ -7,6 +7,7 @@ export class SaveQueryDialog {
|
|
|
7
7
|
this.serviceFactory = undefined;
|
|
8
8
|
this.data = undefined;
|
|
9
9
|
this.queryName = '';
|
|
10
|
+
this.originalQueryName = '';
|
|
10
11
|
this.query = '';
|
|
11
12
|
this.isPublic = false;
|
|
12
13
|
this.isNew = false;
|
|
@@ -27,6 +28,7 @@ export class SaveQueryDialog {
|
|
|
27
28
|
this.translationService = this.serviceFactory.get(TranslationService);
|
|
28
29
|
if (this.data) {
|
|
29
30
|
this.queryName = this.data.queryName || this.queryName;
|
|
31
|
+
this.originalQueryName = this.data.queryName || this.queryName;
|
|
30
32
|
this.query = this.data.query || this.query;
|
|
31
33
|
this.isPublic = this.data.isPublic !== undefined ? this.data.isPublic : this.isPublic;
|
|
32
34
|
this.isNew = this.data.isNew !== undefined ? this.data.isNew : this.isNew;
|
|
@@ -58,10 +60,10 @@ export class SaveQueryDialog {
|
|
|
58
60
|
const query = this.query;
|
|
59
61
|
const isPublic = this.isPublic;
|
|
60
62
|
if (this.isNew) {
|
|
61
|
-
this.internalSaveQueryEvent.emit(new SaveQueryData(queryName, query, isPublic));
|
|
63
|
+
this.internalSaveQueryEvent.emit(new SaveQueryData(queryName, query, isPublic, this.originalQueryName));
|
|
62
64
|
}
|
|
63
65
|
else {
|
|
64
|
-
this.internalUpdateQueryEvent.emit(new UpdateQueryData(queryName, query, isPublic));
|
|
66
|
+
this.internalUpdateQueryEvent.emit(new UpdateQueryData(queryName, query, isPublic, this.originalQueryName));
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
69
|
handleQueryNameChange(event) {
|
|
@@ -108,7 +110,7 @@ export class SaveQueryDialog {
|
|
|
108
110
|
return this.hasMissingFields() || ((_a = this.data.messages) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
109
111
|
}
|
|
110
112
|
render() {
|
|
111
|
-
return (h(Host, { tabindex: '-1' }, h("div", { class: "dialog-overlay", onClick: (evt) => this.onClose(evt) }, h("div", { class: "dialog" }, h("div", { class: "dialog-header" }, h("h3", { class: "dialog-title" }, this.translationService.translate('yasqe.actions.save_query.dialog.title')), h("button", { class: "close-button icon-close", onClick: (evt) => this.onClose(evt) })), h("div", { class: "dialog-body" }, h("div", { class: "save-query-form" }, h("div", { class: "form-field query-name-field" }, h("input", { type: "text", name: "queryName", id: "queryName", required: true, value: this.queryName, class: !this.queryName.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query_name.label'), onInput: (evt) => this.handleQueryNameChange(evt) })), h("div", { class: "form-field is-public-field" }, h("yasgui-tooltip", { placement: "top", "data-tooltip": this.translationService.translate('yasqe.actions.save_query.dialog.public_query.tooltip') }, h("label", null, h("input", { type: "checkbox", name: "publicQuery", id: "publicQuery", checked: this.isPublic, onChange: (evt) => this.handleIsPublicChange(evt) }), this.translationService.translate('yasqe.actions.save_query.dialog.public_query.label')))), h("div", { class: "form-field query-field" }, h("textarea", { name: "query", id: "query", required: true, rows: 8, class: !this.query.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query.label'), value: this.query, onInput: (evt) => this.handleQueryChange(evt) })), this.showErrorMessage() && h(Alert, { messages: this.getErrorMessages() }, "\u00A0"))), h("div", { class: "dialog-footer" }, h("button", { class: "cancel-button", onClick: (evt) => this.onClose(evt), ref: (el) => (this.cancelButton = el) }, this.translationService.translate('yasqe.actions.save_query.dialog.cancel.button')), h("button", { class: "ok-button", disabled: !this.isSaveAllowed, onClick: (evt) => this.onCreate(evt) }, this.translationService.translate('yasqe.actions.save_query.dialog.create.button')))))));
|
|
113
|
+
return (h(Host, { tabindex: '-1' }, h("div", { class: "dialog-overlay", onClick: (evt) => this.onClose(evt) }, h("div", { class: "dialog" }, h("div", { class: "dialog-header" }, h("h3", { class: "dialog-title" }, this.translationService.translate(this.isNew ? 'yasqe.actions.save_query.dialog.title' : 'yasqe.actions.edit_query.dialog.title')), h("button", { class: "close-button icon-close", onClick: (evt) => this.onClose(evt) })), h("div", { class: "dialog-body" }, h("div", { class: "save-query-form" }, h("div", { class: "form-field query-name-field" }, h("input", { type: "text", name: "queryName", id: "queryName", required: true, value: this.queryName, class: !this.queryName.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query_name.label'), onInput: (evt) => this.handleQueryNameChange(evt) })), h("div", { class: "form-field is-public-field" }, h("yasgui-tooltip", { placement: "top", "data-tooltip": this.translationService.translate('yasqe.actions.save_query.dialog.public_query.tooltip') }, h("label", null, h("input", { type: "checkbox", name: "publicQuery", id: "publicQuery", checked: this.isPublic, onChange: (evt) => this.handleIsPublicChange(evt) }), this.translationService.translate('yasqe.actions.save_query.dialog.public_query.label')))), h("div", { class: "form-field query-field" }, h("textarea", { name: "query", id: "query", required: true, rows: 8, class: !this.query.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query.label'), value: this.query, onInput: (evt) => this.handleQueryChange(evt) })), this.showErrorMessage() && h(Alert, { messages: this.getErrorMessages() }, "\u00A0"))), h("div", { class: "dialog-footer" }, h("button", { class: "cancel-button", onClick: (evt) => this.onClose(evt), ref: (el) => (this.cancelButton = el) }, this.translationService.translate('yasqe.actions.save_query.dialog.cancel.button')), h("button", { class: "ok-button", disabled: !this.isSaveAllowed, onClick: (evt) => this.onCreate(evt) }, this.translationService.translate(this.isNew ? 'yasqe.actions.save_query.dialog.create.button' : 'yasqe.actions.save_query.dialog.save.button')))))));
|
|
112
114
|
}
|
|
113
115
|
static get is() { return "save-query-dialog"; }
|
|
114
116
|
static get originalStyleUrls() {
|
|
@@ -168,6 +170,7 @@ export class SaveQueryDialog {
|
|
|
168
170
|
static get states() {
|
|
169
171
|
return {
|
|
170
172
|
"queryName": {},
|
|
173
|
+
"originalQueryName": {},
|
|
171
174
|
"query": {},
|
|
172
175
|
"isPublic": {},
|
|
173
176
|
"isNew": {},
|
|
@@ -35,7 +35,7 @@ export class SavedQueriesPopup {
|
|
|
35
35
|
}
|
|
36
36
|
onEdit(evt, selectedQuery) {
|
|
37
37
|
evt.stopPropagation();
|
|
38
|
-
this.internalEditSavedQueryEvent.emit(new UpdateQueryData(selectedQuery.queryName, selectedQuery.query, selectedQuery.isPublic, false));
|
|
38
|
+
this.internalEditSavedQueryEvent.emit(new UpdateQueryData(selectedQuery.queryName, selectedQuery.query, selectedQuery.isPublic, selectedQuery.originalQueryName, false));
|
|
39
39
|
}
|
|
40
40
|
onDelete(evt, selectedQuery) {
|
|
41
41
|
evt.stopPropagation();
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// TODO: rename to be like internal model
|
|
2
2
|
export class SaveQueryData {
|
|
3
|
-
constructor(queryName, query, isPublic, isNew, readonly, owner, messages) {
|
|
3
|
+
constructor(queryName, query, isPublic, originalQueryName, isNew, readonly, owner, messages) {
|
|
4
4
|
this.queryName = queryName;
|
|
5
5
|
this.query = query;
|
|
6
6
|
this.isPublic = isPublic;
|
|
7
|
+
this.originalQueryName = originalQueryName;
|
|
7
8
|
this.isNew = isNew;
|
|
8
9
|
this.readonly = readonly;
|
|
9
10
|
this.owner = owner;
|
|
@@ -3669,12 +3669,14 @@ const OntotextYasguiWebComponent = /*@__PURE__*/ proxyCustomElement(class extend
|
|
|
3669
3669
|
* Handler for the event fired when the query should be saved by the component client.
|
|
3670
3670
|
*/
|
|
3671
3671
|
createSavedQueryHandler(event) {
|
|
3672
|
+
this.savedQueryData = undefined;
|
|
3672
3673
|
this.createSavedQuery.emit(event.detail);
|
|
3673
3674
|
}
|
|
3674
3675
|
/**
|
|
3675
3676
|
* Handler for the event fired when the query should be saved by the component client.
|
|
3676
3677
|
*/
|
|
3677
3678
|
updateSavedQueryHandler(event) {
|
|
3679
|
+
this.savedQueryData = undefined;
|
|
3678
3680
|
this.updateSavedQuery.emit(event.detail);
|
|
3679
3681
|
}
|
|
3680
3682
|
/**
|
|
@@ -3682,6 +3684,8 @@ const OntotextYasguiWebComponent = /*@__PURE__*/ proxyCustomElement(class extend
|
|
|
3682
3684
|
*/
|
|
3683
3685
|
closeSaveDialogHandler() {
|
|
3684
3686
|
this.showSaveQueryDialog = false;
|
|
3687
|
+
this.savedQueryData = undefined;
|
|
3688
|
+
this.saveQueryData = undefined;
|
|
3685
3689
|
}
|
|
3686
3690
|
/**
|
|
3687
3691
|
* Handler for the event fired when the show saved queries button in the yasqe toolbar is triggered.
|
|
@@ -3890,6 +3894,7 @@ const OntotextYasguiWebComponent = /*@__PURE__*/ proxyCustomElement(class extend
|
|
|
3890
3894
|
data.savedQueriesList = this.savedQueryConfig.savedQueries.map((savedQuery) => {
|
|
3891
3895
|
return {
|
|
3892
3896
|
queryName: savedQuery.queryName,
|
|
3897
|
+
originalQueryName: savedQuery.queryName,
|
|
3893
3898
|
query: savedQuery.query,
|
|
3894
3899
|
isPublic: savedQuery.isPublic,
|
|
3895
3900
|
owner: savedQuery.owner,
|
|
@@ -16,6 +16,7 @@ const SaveQueryDialog = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
16
16
|
this.serviceFactory = undefined;
|
|
17
17
|
this.data = undefined;
|
|
18
18
|
this.queryName = '';
|
|
19
|
+
this.originalQueryName = '';
|
|
19
20
|
this.query = '';
|
|
20
21
|
this.isPublic = false;
|
|
21
22
|
this.isNew = false;
|
|
@@ -36,6 +37,7 @@ const SaveQueryDialog = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
36
37
|
this.translationService = this.serviceFactory.get(TranslationService);
|
|
37
38
|
if (this.data) {
|
|
38
39
|
this.queryName = this.data.queryName || this.queryName;
|
|
40
|
+
this.originalQueryName = this.data.queryName || this.queryName;
|
|
39
41
|
this.query = this.data.query || this.query;
|
|
40
42
|
this.isPublic = this.data.isPublic !== undefined ? this.data.isPublic : this.isPublic;
|
|
41
43
|
this.isNew = this.data.isNew !== undefined ? this.data.isNew : this.isNew;
|
|
@@ -67,10 +69,10 @@ const SaveQueryDialog = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
67
69
|
const query = this.query;
|
|
68
70
|
const isPublic = this.isPublic;
|
|
69
71
|
if (this.isNew) {
|
|
70
|
-
this.internalSaveQueryEvent.emit(new SaveQueryData(queryName, query, isPublic));
|
|
72
|
+
this.internalSaveQueryEvent.emit(new SaveQueryData(queryName, query, isPublic, this.originalQueryName));
|
|
71
73
|
}
|
|
72
74
|
else {
|
|
73
|
-
this.internalUpdateQueryEvent.emit(new UpdateQueryData(queryName, query, isPublic));
|
|
75
|
+
this.internalUpdateQueryEvent.emit(new UpdateQueryData(queryName, query, isPublic, this.originalQueryName));
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
78
|
handleQueryNameChange(event) {
|
|
@@ -117,7 +119,7 @@ const SaveQueryDialog = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
117
119
|
return this.hasMissingFields() || ((_a = this.data.messages) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
118
120
|
}
|
|
119
121
|
render() {
|
|
120
|
-
return (h(Host, { tabindex: '-1' }, h("div", { class: "dialog-overlay", onClick: (evt) => this.onClose(evt) }, h("div", { class: "dialog" }, h("div", { class: "dialog-header" }, h("h3", { class: "dialog-title" }, this.translationService.translate('yasqe.actions.save_query.dialog.title')), h("button", { class: "close-button icon-close", onClick: (evt) => this.onClose(evt) })), h("div", { class: "dialog-body" }, h("div", { class: "save-query-form" }, h("div", { class: "form-field query-name-field" }, h("input", { type: "text", name: "queryName", id: "queryName", required: true, value: this.queryName, class: !this.queryName.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query_name.label'), onInput: (evt) => this.handleQueryNameChange(evt) })), h("div", { class: "form-field is-public-field" }, h("yasgui-tooltip", { placement: "top", "data-tooltip": this.translationService.translate('yasqe.actions.save_query.dialog.public_query.tooltip') }, h("label", null, h("input", { type: "checkbox", name: "publicQuery", id: "publicQuery", checked: this.isPublic, onChange: (evt) => this.handleIsPublicChange(evt) }), this.translationService.translate('yasqe.actions.save_query.dialog.public_query.label')))), h("div", { class: "form-field query-field" }, h("textarea", { name: "query", id: "query", required: true, rows: 8, class: !this.query.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query.label'), value: this.query, onInput: (evt) => this.handleQueryChange(evt) })), this.showErrorMessage() && h(Alert, { messages: this.getErrorMessages() }, "\u00A0"))), h("div", { class: "dialog-footer" }, h("button", { class: "cancel-button", onClick: (evt) => this.onClose(evt), ref: (el) => (this.cancelButton = el) }, this.translationService.translate('yasqe.actions.save_query.dialog.cancel.button')), h("button", { class: "ok-button", disabled: !this.isSaveAllowed, onClick: (evt) => this.onCreate(evt) }, this.translationService.translate('yasqe.actions.save_query.dialog.create.button')))))));
|
|
122
|
+
return (h(Host, { tabindex: '-1' }, h("div", { class: "dialog-overlay", onClick: (evt) => this.onClose(evt) }, h("div", { class: "dialog" }, h("div", { class: "dialog-header" }, h("h3", { class: "dialog-title" }, this.translationService.translate(this.isNew ? 'yasqe.actions.save_query.dialog.title' : 'yasqe.actions.edit_query.dialog.title')), h("button", { class: "close-button icon-close", onClick: (evt) => this.onClose(evt) })), h("div", { class: "dialog-body" }, h("div", { class: "save-query-form" }, h("div", { class: "form-field query-name-field" }, h("input", { type: "text", name: "queryName", id: "queryName", required: true, value: this.queryName, class: !this.queryName.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query_name.label'), onInput: (evt) => this.handleQueryNameChange(evt) })), h("div", { class: "form-field is-public-field" }, h("yasgui-tooltip", { placement: "top", "data-tooltip": this.translationService.translate('yasqe.actions.save_query.dialog.public_query.tooltip') }, h("label", null, h("input", { type: "checkbox", name: "publicQuery", id: "publicQuery", checked: this.isPublic, onChange: (evt) => this.handleIsPublicChange(evt) }), this.translationService.translate('yasqe.actions.save_query.dialog.public_query.label')))), h("div", { class: "form-field query-field" }, h("textarea", { name: "query", id: "query", required: true, rows: 8, class: !this.query.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query.label'), value: this.query, onInput: (evt) => this.handleQueryChange(evt) })), this.showErrorMessage() && h(Alert, { messages: this.getErrorMessages() }, "\u00A0"))), h("div", { class: "dialog-footer" }, h("button", { class: "cancel-button", onClick: (evt) => this.onClose(evt), ref: (el) => (this.cancelButton = el) }, this.translationService.translate('yasqe.actions.save_query.dialog.cancel.button')), h("button", { class: "ok-button", disabled: !this.isSaveAllowed, onClick: (evt) => this.onCreate(evt) }, this.translationService.translate(this.isNew ? 'yasqe.actions.save_query.dialog.create.button' : 'yasqe.actions.save_query.dialog.save.button')))))));
|
|
121
123
|
}
|
|
122
124
|
get hostElement() { return this; }
|
|
123
125
|
static get style() { return saveQueryDialogCss; }
|
|
@@ -125,6 +127,7 @@ const SaveQueryDialog = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
125
127
|
"serviceFactory": [16],
|
|
126
128
|
"data": [16],
|
|
127
129
|
"queryName": [32],
|
|
130
|
+
"originalQueryName": [32],
|
|
128
131
|
"query": [32],
|
|
129
132
|
"isPublic": [32],
|
|
130
133
|
"isNew": [32],
|
|
@@ -45,7 +45,7 @@ const SavedQueriesPopup = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
45
45
|
}
|
|
46
46
|
onEdit(evt, selectedQuery) {
|
|
47
47
|
evt.stopPropagation();
|
|
48
|
-
this.internalEditSavedQueryEvent.emit(new UpdateQueryData(selectedQuery.queryName, selectedQuery.query, selectedQuery.isPublic, false));
|
|
48
|
+
this.internalEditSavedQueryEvent.emit(new UpdateQueryData(selectedQuery.queryName, selectedQuery.query, selectedQuery.isPublic, selectedQuery.originalQueryName, false));
|
|
49
49
|
}
|
|
50
50
|
onDelete(evt, selectedQuery) {
|
|
51
51
|
evt.stopPropagation();
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// TODO: rename to be like internal model
|
|
2
2
|
class SaveQueryData {
|
|
3
|
-
constructor(queryName, query, isPublic, isNew, readonly, owner, messages) {
|
|
3
|
+
constructor(queryName, query, isPublic, originalQueryName, isNew, readonly, owner, messages) {
|
|
4
4
|
this.queryName = queryName;
|
|
5
5
|
this.query = query;
|
|
6
6
|
this.isPublic = isPublic;
|
|
7
|
+
this.originalQueryName = originalQueryName;
|
|
7
8
|
this.isNew = isNew;
|
|
8
9
|
this.readonly = readonly;
|
|
9
10
|
this.owner = owner;
|
|
@@ -249,6 +249,8 @@ const en = {
|
|
|
249
249
|
"yasqe.actions.save_query.dialog.cancel.button": "Cancel",
|
|
250
250
|
"yasqe.actions.show_saved_queries.button.tooltip": "Show saved queries",
|
|
251
251
|
"yasqe.actions.edit_saved_query.button.tooltip": "Edit",
|
|
252
|
+
"yasqe.actions.edit_query.dialog.title": "Edit Saved Query",
|
|
253
|
+
"yasqe.actions.save_query.dialog.save.button": "Save",
|
|
252
254
|
"yasqe.actions.delete_saved_query.button.tooltip": "Delete",
|
|
253
255
|
"yasqe.actions.delete_saved_query.confirm.dialog.label": "Confirm",
|
|
254
256
|
"yasqe.actions.delete_saved_query.confirm.dialog.message": "Are you sure you want to delete the saved query '{{query}}'?",
|
|
@@ -522,6 +524,8 @@ const fr = {
|
|
|
522
524
|
"yasqe.actions.save_query.dialog.cancel.button": "Annuler",
|
|
523
525
|
"yasqe.actions.show_saved_queries.button.tooltip": "Afficher les requêtes enregistrées",
|
|
524
526
|
"yasqe.actions.edit_saved_query.button.tooltip": "Modifier",
|
|
527
|
+
"yasqe.actions.edit_query.dialog.title": "Modifier la requête enregistrée",
|
|
528
|
+
"yasqe.actions.save_query.dialog.save.button": "Enregistrer",
|
|
525
529
|
"yasqe.actions.delete_saved_query.button.tooltip": "Supprimer",
|
|
526
530
|
"yasqe.actions.delete_saved_query.confirm.dialog.label": "Confirmer",
|
|
527
531
|
"yasqe.actions.delete_saved_query.confirm.dialog.message": "Êtes-vous sûr de vouloir supprimer la requête enregistrée '{{query}}' ?",
|
|
@@ -430,6 +430,8 @@ const en = {
|
|
|
430
430
|
"yasqe.actions.save_query.dialog.cancel.button": "Cancel",
|
|
431
431
|
"yasqe.actions.show_saved_queries.button.tooltip": "Show saved queries",
|
|
432
432
|
"yasqe.actions.edit_saved_query.button.tooltip": "Edit",
|
|
433
|
+
"yasqe.actions.edit_query.dialog.title": "Edit Saved Query",
|
|
434
|
+
"yasqe.actions.save_query.dialog.save.button": "Save",
|
|
433
435
|
"yasqe.actions.delete_saved_query.button.tooltip": "Delete",
|
|
434
436
|
"yasqe.actions.delete_saved_query.confirm.dialog.label": "Confirm",
|
|
435
437
|
"yasqe.actions.delete_saved_query.confirm.dialog.message": "Are you sure you want to delete the saved query '{{query}}'?",
|
|
@@ -703,6 +705,8 @@ const fr = {
|
|
|
703
705
|
"yasqe.actions.save_query.dialog.cancel.button": "Annuler",
|
|
704
706
|
"yasqe.actions.show_saved_queries.button.tooltip": "Afficher les requêtes enregistrées",
|
|
705
707
|
"yasqe.actions.edit_saved_query.button.tooltip": "Modifier",
|
|
708
|
+
"yasqe.actions.edit_query.dialog.title": "Modifier la requête enregistrée",
|
|
709
|
+
"yasqe.actions.save_query.dialog.save.button": "Enregistrer",
|
|
706
710
|
"yasqe.actions.delete_saved_query.button.tooltip": "Supprimer",
|
|
707
711
|
"yasqe.actions.delete_saved_query.confirm.dialog.label": "Confirmer",
|
|
708
712
|
"yasqe.actions.delete_saved_query.confirm.dialog.message": "Êtes-vous sûr de vouloir supprimer la requête enregistrée '{{query}}' ?",
|
|
@@ -4680,12 +4684,14 @@ const OntotextYasguiWebComponent = class {
|
|
|
4680
4684
|
* Handler for the event fired when the query should be saved by the component client.
|
|
4681
4685
|
*/
|
|
4682
4686
|
createSavedQueryHandler(event) {
|
|
4687
|
+
this.savedQueryData = undefined;
|
|
4683
4688
|
this.createSavedQuery.emit(event.detail);
|
|
4684
4689
|
}
|
|
4685
4690
|
/**
|
|
4686
4691
|
* Handler for the event fired when the query should be saved by the component client.
|
|
4687
4692
|
*/
|
|
4688
4693
|
updateSavedQueryHandler(event) {
|
|
4694
|
+
this.savedQueryData = undefined;
|
|
4689
4695
|
this.updateSavedQuery.emit(event.detail);
|
|
4690
4696
|
}
|
|
4691
4697
|
/**
|
|
@@ -4693,6 +4699,8 @@ const OntotextYasguiWebComponent = class {
|
|
|
4693
4699
|
*/
|
|
4694
4700
|
closeSaveDialogHandler() {
|
|
4695
4701
|
this.showSaveQueryDialog = false;
|
|
4702
|
+
this.savedQueryData = undefined;
|
|
4703
|
+
this.saveQueryData = undefined;
|
|
4696
4704
|
}
|
|
4697
4705
|
/**
|
|
4698
4706
|
* Handler for the event fired when the show saved queries button in the yasqe toolbar is triggered.
|
|
@@ -4901,6 +4909,7 @@ const OntotextYasguiWebComponent = class {
|
|
|
4901
4909
|
data.savedQueriesList = this.savedQueryConfig.savedQueries.map((savedQuery) => {
|
|
4902
4910
|
return {
|
|
4903
4911
|
queryName: savedQuery.queryName,
|
|
4912
|
+
originalQueryName: savedQuery.queryName,
|
|
4904
4913
|
query: savedQuery.query,
|
|
4905
4914
|
isPublic: savedQuery.isPublic,
|
|
4906
4915
|
owner: savedQuery.owner,
|
|
@@ -5119,10 +5128,11 @@ OntotextYasguiWebComponent.style = ontotextYasguiWebComponentCss;
|
|
|
5119
5128
|
|
|
5120
5129
|
// TODO: rename to be like internal model
|
|
5121
5130
|
class SaveQueryData {
|
|
5122
|
-
constructor(queryName, query, isPublic, isNew, readonly, owner, messages) {
|
|
5131
|
+
constructor(queryName, query, isPublic, originalQueryName, isNew, readonly, owner, messages) {
|
|
5123
5132
|
this.queryName = queryName;
|
|
5124
5133
|
this.query = query;
|
|
5125
5134
|
this.isPublic = isPublic;
|
|
5135
|
+
this.originalQueryName = originalQueryName;
|
|
5126
5136
|
this.isNew = isNew;
|
|
5127
5137
|
this.readonly = readonly;
|
|
5128
5138
|
this.owner = owner;
|
|
@@ -5145,6 +5155,7 @@ const SaveQueryDialog = class {
|
|
|
5145
5155
|
this.serviceFactory = undefined;
|
|
5146
5156
|
this.data = undefined;
|
|
5147
5157
|
this.queryName = '';
|
|
5158
|
+
this.originalQueryName = '';
|
|
5148
5159
|
this.query = '';
|
|
5149
5160
|
this.isPublic = false;
|
|
5150
5161
|
this.isNew = false;
|
|
@@ -5165,6 +5176,7 @@ const SaveQueryDialog = class {
|
|
|
5165
5176
|
this.translationService = this.serviceFactory.get(TranslationService);
|
|
5166
5177
|
if (this.data) {
|
|
5167
5178
|
this.queryName = this.data.queryName || this.queryName;
|
|
5179
|
+
this.originalQueryName = this.data.queryName || this.queryName;
|
|
5168
5180
|
this.query = this.data.query || this.query;
|
|
5169
5181
|
this.isPublic = this.data.isPublic !== undefined ? this.data.isPublic : this.isPublic;
|
|
5170
5182
|
this.isNew = this.data.isNew !== undefined ? this.data.isNew : this.isNew;
|
|
@@ -5196,10 +5208,10 @@ const SaveQueryDialog = class {
|
|
|
5196
5208
|
const query = this.query;
|
|
5197
5209
|
const isPublic = this.isPublic;
|
|
5198
5210
|
if (this.isNew) {
|
|
5199
|
-
this.internalSaveQueryEvent.emit(new SaveQueryData(queryName, query, isPublic));
|
|
5211
|
+
this.internalSaveQueryEvent.emit(new SaveQueryData(queryName, query, isPublic, this.originalQueryName));
|
|
5200
5212
|
}
|
|
5201
5213
|
else {
|
|
5202
|
-
this.internalUpdateQueryEvent.emit(new UpdateQueryData(queryName, query, isPublic));
|
|
5214
|
+
this.internalUpdateQueryEvent.emit(new UpdateQueryData(queryName, query, isPublic, this.originalQueryName));
|
|
5203
5215
|
}
|
|
5204
5216
|
}
|
|
5205
5217
|
handleQueryNameChange(event) {
|
|
@@ -5246,7 +5258,7 @@ const SaveQueryDialog = class {
|
|
|
5246
5258
|
return this.hasMissingFields() || ((_a = this.data.messages) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
5247
5259
|
}
|
|
5248
5260
|
render() {
|
|
5249
|
-
return (h(Host, { tabindex: '-1' }, h("div", { class: "dialog-overlay", onClick: (evt) => this.onClose(evt) }, h("div", { class: "dialog" }, h("div", { class: "dialog-header" }, h("h3", { class: "dialog-title" }, this.translationService.translate('yasqe.actions.save_query.dialog.title')), h("button", { class: "close-button icon-close", onClick: (evt) => this.onClose(evt) })), h("div", { class: "dialog-body" }, h("div", { class: "save-query-form" }, h("div", { class: "form-field query-name-field" }, h("input", { type: "text", name: "queryName", id: "queryName", required: true, value: this.queryName, class: !this.queryName.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query_name.label'), onInput: (evt) => this.handleQueryNameChange(evt) })), h("div", { class: "form-field is-public-field" }, h("yasgui-tooltip", { placement: "top", "data-tooltip": this.translationService.translate('yasqe.actions.save_query.dialog.public_query.tooltip') }, h("label", null, h("input", { type: "checkbox", name: "publicQuery", id: "publicQuery", checked: this.isPublic, onChange: (evt) => this.handleIsPublicChange(evt) }), this.translationService.translate('yasqe.actions.save_query.dialog.public_query.label')))), h("div", { class: "form-field query-field" }, h("textarea", { name: "query", id: "query", required: true, rows: 8, class: !this.query.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query.label'), value: this.query, onInput: (evt) => this.handleQueryChange(evt) })), this.showErrorMessage() && h(Alert, { messages: this.getErrorMessages() }, "\u00A0"))), h("div", { class: "dialog-footer" }, h("button", { class: "cancel-button", onClick: (evt) => this.onClose(evt), ref: (el) => (this.cancelButton = el) }, this.translationService.translate('yasqe.actions.save_query.dialog.cancel.button')), h("button", { class: "ok-button", disabled: !this.isSaveAllowed, onClick: (evt) => this.onCreate(evt) }, this.translationService.translate('yasqe.actions.save_query.dialog.create.button')))))));
|
|
5261
|
+
return (h(Host, { tabindex: '-1' }, h("div", { class: "dialog-overlay", onClick: (evt) => this.onClose(evt) }, h("div", { class: "dialog" }, h("div", { class: "dialog-header" }, h("h3", { class: "dialog-title" }, this.translationService.translate(this.isNew ? 'yasqe.actions.save_query.dialog.title' : 'yasqe.actions.edit_query.dialog.title')), h("button", { class: "close-button icon-close", onClick: (evt) => this.onClose(evt) })), h("div", { class: "dialog-body" }, h("div", { class: "save-query-form" }, h("div", { class: "form-field query-name-field" }, h("input", { type: "text", name: "queryName", id: "queryName", required: true, value: this.queryName, class: !this.queryName.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query_name.label'), onInput: (evt) => this.handleQueryNameChange(evt) })), h("div", { class: "form-field is-public-field" }, h("yasgui-tooltip", { placement: "top", "data-tooltip": this.translationService.translate('yasqe.actions.save_query.dialog.public_query.tooltip') }, h("label", null, h("input", { type: "checkbox", name: "publicQuery", id: "publicQuery", checked: this.isPublic, onChange: (evt) => this.handleIsPublicChange(evt) }), this.translationService.translate('yasqe.actions.save_query.dialog.public_query.label')))), h("div", { class: "form-field query-field" }, h("textarea", { name: "query", id: "query", required: true, rows: 8, class: !this.query.trim().length ? 'invalid' : '', placeholder: this.translationService.translate('yasqe.actions.save_query.dialog.query.label'), value: this.query, onInput: (evt) => this.handleQueryChange(evt) })), this.showErrorMessage() && h(Alert, { messages: this.getErrorMessages() }, "\u00A0"))), h("div", { class: "dialog-footer" }, h("button", { class: "cancel-button", onClick: (evt) => this.onClose(evt), ref: (el) => (this.cancelButton = el) }, this.translationService.translate('yasqe.actions.save_query.dialog.cancel.button')), h("button", { class: "ok-button", disabled: !this.isSaveAllowed, onClick: (evt) => this.onCreate(evt) }, this.translationService.translate(this.isNew ? 'yasqe.actions.save_query.dialog.create.button' : 'yasqe.actions.save_query.dialog.save.button')))))));
|
|
5250
5262
|
}
|
|
5251
5263
|
get hostElement() { return getElement(this); }
|
|
5252
5264
|
};
|
|
@@ -5295,7 +5307,7 @@ const SavedQueriesPopup = class {
|
|
|
5295
5307
|
}
|
|
5296
5308
|
onEdit(evt, selectedQuery) {
|
|
5297
5309
|
evt.stopPropagation();
|
|
5298
|
-
this.internalEditSavedQueryEvent.emit(new UpdateQueryData(selectedQuery.queryName, selectedQuery.query, selectedQuery.isPublic, false));
|
|
5310
|
+
this.internalEditSavedQueryEvent.emit(new UpdateQueryData(selectedQuery.queryName, selectedQuery.query, selectedQuery.isPublic, selectedQuery.originalQueryName, false));
|
|
5299
5311
|
}
|
|
5300
5312
|
onDelete(evt, selectedQuery) {
|
|
5301
5313
|
evt.stopPropagation();
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["ontotext-download-as",[[0,"ontotext-download-as",{"translationService":[16],"nameLabelKey":[1,"name-label-key"],"tooltipLabelKey":[1,"tooltip-label-key"],"items":[16],"pluginName":[1,"plugin-name"],"query":[1],"infer":[4],"sameAs":[4,"same-as"]}]]],["keyboard-shortcuts-dialog",[[0,"keyboard-shortcuts-dialog",{"items":[16],"translationService":[16],"open":[32]},[[8,"keydown","keydownListener"]]]]],["alert-box",[[0,"alert-box",{"type":[1],"message":[1],"noIcon":[4,"no-icon"],"noButton":[4,"no-button"],"isVisible":[32]}]]],["copy-resource-link-button",[[0,"copy-resource-link-button",{"uri":[1],"classes":[1]}]]],["loader-component",[[1,"loader-component",{"timeFormattingService":[16],"showQueryProgress":[4,"show-query-progress"],"message":[1],"additionalMessage":[1,"additional-message"],"size":[1],"hidden":[4],"queryProgress":[32]}]]],["ontotext-editable-text-field",[[0,"ontotext-editable-text-field",{"value":[1025],"edit":[1028],"translationService":[16]},[[8,"click","handleClickOutside"],[4,"keydown","keydownListener"]]]]],["ontotext-pagination",[[0,"ontotext-pagination",{"pageNumber":[2,"page-number"],"pageSize":[2,"page-size"],"totalElements":[2,"total-elements"],"pageElements":[2,"page-elements"],"hasMorePages":[4,"has-more-pages"]}]]],["confirmation-dialog_9",[[0,"ontotext-yasgui",{"config":[16],"language":[1],"savedQueryConfig":[16],"saveQueryData":[32],"savedQueryData":[32],"deleteQueryData":[32],"isVerticalOrientation":[32],"renderingMode":[32],"showSaveQueryDialog":[32],"showSavedQueriesPopup":[32],"showSavedQueriesPopupTarget":[32],"showConfirmationDialog":[32],"showShareQueryDialog":[32],"showCopyResourceLinkDialog":[32],"copiedResourceLink":[32],"loaderMessage":[32],"additionalLoaderMessage":[32],"yasqeBtnLabel":[32],"yasguiBtnLabel":[32],"yasrBtnLabel":[32],"changeRenderMode":[64],"setQuery":[64],"query":[64],"getQuery":[64],"isQueryValid":[64],"openTab":[64],"getQueryMode":[64],"getQueryType":[64],"getEmbeddedResultAsJson":[64],"getEmbeddedResultAsCSV":[64],"hideYasqeActionButton":[64],"showYasqeActionButton":[64],"getOngoingRequestsInfo":[64],"abortQuery":[64],"abortAllRequests":[64],"reInitYasgui":[64],"isQueryDirty":[64]},[[9,"resize","onResize"],[8,"beforeunload","onBeforeunloadHandler"],[0,"internalCreateSavedQueryEvent","saveQueryHandler"],[0,"internalSaveQueryEvent","createSavedQueryHandler"],[0,"internalUpdateQueryEvent","updateSavedQueryHandler"],[0,"internalSaveQueryDialogClosedEvent","closeSaveDialogHandler"],[0,"internalShowSavedQueriesEvent","showSavedQueriesHandler"],[0,"internalSaveQuerySelectedEvent","savedQuerySelectedHandler"],[0,"internalEditSavedQueryEvent","editSavedQueryHandler"],[0,"internalSavedQuerySelectedForDeleteEvent","savedQuerySelectedForEditHandler"],[0,"internalConfirmationApprovedEvent","deleteSavedQueryHandler"],[0,"internalConfirmationRejectedEvent","closeSavedQueryDeleteConfirmationHandler"],[0,"internalCloseSavedQueriesPopupEvent","closeSavedQueriesPopupHandler"],[0,"internalSavedQuerySelectedForShareEvent","savedQuerySelectedForShareHandler"],[0,"internalShareQueryEvent","shareQueryHandler"],[0,"internalQueryShareLinkCopiedEvent","savedQueryShareLinkCopiedHandler"],[0,"internalShareQueryDialogClosedEvent","closeShareQueryDialogHandler"],[0,"internalResourceLinkDialogClosedEvent","resourceLinkDialogClosedHandler"],[0,"internalResourceLinkCopiedEvent","resourceLinkCopiedHandler"],[0,"internalShowResourceCopyLinkDialogEvent","showResourceCopyLinkDialogHandler"],[0,"internalDownloadAsEvent","onDownloadAsEventHandler"],[0,"internalNotificationMessageEvent","notificationMessageHandler"],[0,"internalQueryEvent","onQuery"],[0,"internalQueryExecuted","onInternalQueryExecuted"],[0,"internalCountQueryEvent","onCountQuery"],[0,"internalCountQueryResponseEvent","onCountQueryResponse"],[0,"internalRequestAbortedEvent","onQueryAborted"]]],[0,"copy-resource-link-dialog",{"serviceFactory":[16],"resourceLink":[1,"resource-link"]}],[0,"share-query-dialog",{"config":[16],"serviceFactory":[16]}],[0,"save-query-dialog",{"serviceFactory":[16],"data":[16],"queryName":[32],"query":[32],"isPublic":[32],"isNew":[32],"isSaveAllowed":[32]},[[8,"keydown","keydownListener"]]],[0,"confirmation-dialog",{"translationService":[16],"config":[16]},[[8,"keydown","keydownListener"]]],[0,"saved-queries-popup",{"config":[16],"serviceFactory":[16]},[[8,"click","onWindowResize"],[8,"keydown","keydownListener"]]],[0,"copy-link-dialog",{"config":[16],"serviceFactory":[16],"copyLinkEventsObserver":[16],"classes":[1]}],[4,"yasgui-tooltip",{"dataTooltip":[1,"data-tooltip"],"placement":[1],"showOnClick":[4,"show-on-click"]}],[4,"ontotext-dialog-web-component",{"config":[16]},[[4,"keydown","keydownListener"]]]]],["ontotext-dropdown",[[0,"ontotext-dropdown",{"translationService":[16],"nameLabelKey":[1,"name-label-key"],"tooltipLabelKey":[1,"tooltip-label-key"],"items":[16],"iconClass":[1,"icon-class"],"open":[32],"showTooltip":[32]},[[8,"keydown","keydownListener"],[8,"click","mouseClickListener"]]]]]], options);
|
|
13
|
+
return bootstrapLazy([["ontotext-download-as",[[0,"ontotext-download-as",{"translationService":[16],"nameLabelKey":[1,"name-label-key"],"tooltipLabelKey":[1,"tooltip-label-key"],"items":[16],"pluginName":[1,"plugin-name"],"query":[1],"infer":[4],"sameAs":[4,"same-as"]}]]],["keyboard-shortcuts-dialog",[[0,"keyboard-shortcuts-dialog",{"items":[16],"translationService":[16],"open":[32]},[[8,"keydown","keydownListener"]]]]],["alert-box",[[0,"alert-box",{"type":[1],"message":[1],"noIcon":[4,"no-icon"],"noButton":[4,"no-button"],"isVisible":[32]}]]],["copy-resource-link-button",[[0,"copy-resource-link-button",{"uri":[1],"classes":[1]}]]],["loader-component",[[1,"loader-component",{"timeFormattingService":[16],"showQueryProgress":[4,"show-query-progress"],"message":[1],"additionalMessage":[1,"additional-message"],"size":[1],"hidden":[4],"queryProgress":[32]}]]],["ontotext-editable-text-field",[[0,"ontotext-editable-text-field",{"value":[1025],"edit":[1028],"translationService":[16]},[[8,"click","handleClickOutside"],[4,"keydown","keydownListener"]]]]],["ontotext-pagination",[[0,"ontotext-pagination",{"pageNumber":[2,"page-number"],"pageSize":[2,"page-size"],"totalElements":[2,"total-elements"],"pageElements":[2,"page-elements"],"hasMorePages":[4,"has-more-pages"]}]]],["confirmation-dialog_9",[[0,"ontotext-yasgui",{"config":[16],"language":[1],"savedQueryConfig":[16],"saveQueryData":[32],"savedQueryData":[32],"deleteQueryData":[32],"isVerticalOrientation":[32],"renderingMode":[32],"showSaveQueryDialog":[32],"showSavedQueriesPopup":[32],"showSavedQueriesPopupTarget":[32],"showConfirmationDialog":[32],"showShareQueryDialog":[32],"showCopyResourceLinkDialog":[32],"copiedResourceLink":[32],"loaderMessage":[32],"additionalLoaderMessage":[32],"yasqeBtnLabel":[32],"yasguiBtnLabel":[32],"yasrBtnLabel":[32],"changeRenderMode":[64],"setQuery":[64],"query":[64],"getQuery":[64],"isQueryValid":[64],"openTab":[64],"getQueryMode":[64],"getQueryType":[64],"getEmbeddedResultAsJson":[64],"getEmbeddedResultAsCSV":[64],"hideYasqeActionButton":[64],"showYasqeActionButton":[64],"getOngoingRequestsInfo":[64],"abortQuery":[64],"abortAllRequests":[64],"reInitYasgui":[64],"isQueryDirty":[64]},[[9,"resize","onResize"],[8,"beforeunload","onBeforeunloadHandler"],[0,"internalCreateSavedQueryEvent","saveQueryHandler"],[0,"internalSaveQueryEvent","createSavedQueryHandler"],[0,"internalUpdateQueryEvent","updateSavedQueryHandler"],[0,"internalSaveQueryDialogClosedEvent","closeSaveDialogHandler"],[0,"internalShowSavedQueriesEvent","showSavedQueriesHandler"],[0,"internalSaveQuerySelectedEvent","savedQuerySelectedHandler"],[0,"internalEditSavedQueryEvent","editSavedQueryHandler"],[0,"internalSavedQuerySelectedForDeleteEvent","savedQuerySelectedForEditHandler"],[0,"internalConfirmationApprovedEvent","deleteSavedQueryHandler"],[0,"internalConfirmationRejectedEvent","closeSavedQueryDeleteConfirmationHandler"],[0,"internalCloseSavedQueriesPopupEvent","closeSavedQueriesPopupHandler"],[0,"internalSavedQuerySelectedForShareEvent","savedQuerySelectedForShareHandler"],[0,"internalShareQueryEvent","shareQueryHandler"],[0,"internalQueryShareLinkCopiedEvent","savedQueryShareLinkCopiedHandler"],[0,"internalShareQueryDialogClosedEvent","closeShareQueryDialogHandler"],[0,"internalResourceLinkDialogClosedEvent","resourceLinkDialogClosedHandler"],[0,"internalResourceLinkCopiedEvent","resourceLinkCopiedHandler"],[0,"internalShowResourceCopyLinkDialogEvent","showResourceCopyLinkDialogHandler"],[0,"internalDownloadAsEvent","onDownloadAsEventHandler"],[0,"internalNotificationMessageEvent","notificationMessageHandler"],[0,"internalQueryEvent","onQuery"],[0,"internalQueryExecuted","onInternalQueryExecuted"],[0,"internalCountQueryEvent","onCountQuery"],[0,"internalCountQueryResponseEvent","onCountQueryResponse"],[0,"internalRequestAbortedEvent","onQueryAborted"]]],[0,"copy-resource-link-dialog",{"serviceFactory":[16],"resourceLink":[1,"resource-link"]}],[0,"share-query-dialog",{"config":[16],"serviceFactory":[16]}],[0,"save-query-dialog",{"serviceFactory":[16],"data":[16],"queryName":[32],"originalQueryName":[32],"query":[32],"isPublic":[32],"isNew":[32],"isSaveAllowed":[32]},[[8,"keydown","keydownListener"]]],[0,"confirmation-dialog",{"translationService":[16],"config":[16]},[[8,"keydown","keydownListener"]]],[0,"saved-queries-popup",{"config":[16],"serviceFactory":[16]},[[8,"click","onWindowResize"],[8,"keydown","keydownListener"]]],[0,"copy-link-dialog",{"config":[16],"serviceFactory":[16],"copyLinkEventsObserver":[16],"classes":[1]}],[4,"yasgui-tooltip",{"dataTooltip":[1,"data-tooltip"],"placement":[1],"showOnClick":[4,"show-on-click"]}],[4,"ontotext-dialog-web-component",{"config":[16]},[[4,"keydown","keydownListener"]]]]],["ontotext-dropdown",[[0,"ontotext-dropdown",{"translationService":[16],"nameLabelKey":[1,"name-label-key"],"tooltipLabelKey":[1,"tooltip-label-key"],"items":[16],"iconClass":[1,"icon-class"],"open":[32],"showTooltip":[32]},[[8,"keydown","keydownListener"],[8,"click","mouseClickListener"]]]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|