@genexus/genexus-ide-ui 0.0.31 → 0.0.32

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.
Files changed (41) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +2 -2
  3. package/dist/cjs/gx-ide-team-dev-update-partial-selection.cjs.entry.js +17 -32
  4. package/dist/cjs/gx-ide-team-dev-update-to-revision.cjs.entry.js +16 -1
  5. package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +33 -31
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/components/team-dev-commit/team-dev-commit.js +11 -17
  8. package/dist/collection/components/team-dev-update/team-dev-update.js +75 -35
  9. package/dist/collection/components/team-dev-update-partial-selection/gx-ide-assets/team-dev-update-partial-selection/langs/team-dev-update-partial-selection.lang.en.json +4 -2
  10. package/dist/collection/components/team-dev-update-partial-selection/team-dev-update-partial-selection.css +1 -0
  11. package/dist/collection/components/team-dev-update-partial-selection/team-dev-update-partial-selection.js +22 -46
  12. package/dist/collection/components/team-dev-update-to-revision/gx-ide-assets/team-dev-update-to-revision/langs/team-dev-update-to-revision.lang.en.json +1 -1
  13. package/dist/collection/components/team-dev-update-to-revision/team-dev-update-to-revision.js +33 -1
  14. package/dist/components/gx-ide-team-dev-commit.js +3 -3
  15. package/dist/components/gx-ide-team-dev-update-partial-selection.js +18 -33
  16. package/dist/components/gx-ide-team-dev-update-to-revision.js +17 -1
  17. package/dist/components/gx-ide-team-dev-update.js +36 -32
  18. package/dist/esm/genexus-ide-ui.js +1 -1
  19. package/dist/esm/gx-ide-team-dev-commit.entry.js +2 -2
  20. package/dist/esm/gx-ide-team-dev-update-partial-selection.entry.js +17 -32
  21. package/dist/esm/gx-ide-team-dev-update-to-revision.entry.js +16 -1
  22. package/dist/esm/gx-ide-team-dev-update.entry.js +33 -31
  23. package/dist/esm/loader.js +1 -1
  24. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  25. package/dist/genexus-ide-ui/gx-ide-assets/team-dev-update-partial-selection/langs/team-dev-update-partial-selection.lang.en.json +4 -2
  26. package/dist/genexus-ide-ui/gx-ide-assets/team-dev-update-to-revision/langs/team-dev-update-to-revision.lang.en.json +1 -1
  27. package/dist/genexus-ide-ui/p-1b6b11e1.entry.js +1 -0
  28. package/dist/genexus-ide-ui/p-8592f072.entry.js +1 -0
  29. package/dist/genexus-ide-ui/p-b2923298.entry.js +1 -0
  30. package/dist/genexus-ide-ui/p-f794dc13.entry.js +1 -0
  31. package/dist/types/common/types.d.ts +9 -0
  32. package/dist/types/components/team-dev-commit/team-dev-commit.d.ts +8 -15
  33. package/dist/types/components/team-dev-update/team-dev-update.d.ts +16 -13
  34. package/dist/types/components/team-dev-update-partial-selection/team-dev-update-partial-selection.d.ts +11 -14
  35. package/dist/types/components/team-dev-update-to-revision/team-dev-update-to-revision.d.ts +8 -0
  36. package/dist/types/components.d.ts +39 -19
  37. package/package.json +1 -1
  38. package/dist/genexus-ide-ui/p-32b8abf6.entry.js +0 -1
  39. package/dist/genexus-ide-ui/p-53d36ef7.entry.js +0 -1
  40. package/dist/genexus-ide-ui/p-6e80380b.entry.js +0 -1
  41. package/dist/genexus-ide-ui/p-b54f448c.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as o,H as e,g as r}from"./p-976c3a09.js";import{L as a}from"./p-26957490.js";const l=class{constructor(e){i(this,e),this.componentDidLoadEvent=t(this,"componentDidLoadEvent",7),this.renderObjects=()=>o("gxg-grid",null,o("ch-grid",{"row-selection-mode":"multiple",ref:i=>this.chGridEl=i,part:"ch-grid-objects"},o("ch-grid-columnset",null,o("ch-grid-column",{columnName:"",settingable:!1,sortable:!1}),o("ch-grid-column",{columnName:this._componentLocale.tableHead.name,settingable:!1}),o("ch-grid-column",{columnName:this._componentLocale.tableHead.type,settingable:!1}),o("ch-grid-column",{columnName:this._componentLocale.tableHead.description,settingable:!1}),o("ch-grid-column",{columnName:this._componentLocale.tableHead.modifiedOn,settingable:!1})),this.selection.map((i=>o("ch-grid-row",{rowid:i.id},o("ch-grid-cell",null,o("gxg-icon",{type:i.typeIcon,color:"auto"})),o("ch-grid-cell",null," ",i.name," "),o("ch-grid-cell",null," ",i.type," "),o("ch-grid-cell",null," ",i.description," "),o("ch-grid-cell",null,`${i.modifiedOn.toISOString().slice(0,10)}`)))))),this.getObjectsHandler=()=>{this.addCallback().then((i=>{(null==i?void 0:i.length)>0&&(this.selection=[...this.selection,...i],this.selectedObjectsIds=[],this.deselectAllHandler())}))},this.removeObjectsHandler=()=>{this.selection=this.selection.filter((i=>!this.selectedObjectsIds.includes(i.id))),this.selectedObjectsIds=[],this.deselectAllHandler()},this.confirmHandler=()=>{if(this.confirmCallback){const i=[];this.selection.forEach((t=>{i.push(t.id)})),this.confirmCallback(i)}},this.cancelHandler=()=>{this.cancelCallback()},this.deselectAllHandler=()=>{this.chGridEl.selectAllRows(!1)},this.listenChanges=()=>{this.chGridEl.addEventListener("selectionChanged",(i=>{this.selectedObjectsIds=i.detail.rowsId}))},this.addCallback=void 0,this.cancelCallback=void 0,this.confirmCallback=void 0,this.selection=[],this.selectedObjectsIds=[]}async componentWillLoad(){this._componentLocale=await a.getComponentStrings(this.el),this.componentDidLoadEvent.emit(!0)}componentDidLoad(){this.listenChanges()}async validate(){return!0}render(){return o(e,{class:{"gxi-team-dev-update-partial-selection":!0}},o("div",{class:"main-wrapper"},o("gxg-container",{containerTitle:this._componentLocale.title},o("div",{class:"top-actions"},o("gxg-button",{id:"button-add",type:"outlined",onClick:this.getObjectsHandler,part:"add"},this._componentLocale.addObject),o("gxg-button",{id:"button-remove",type:"outlined",onClick:this.removeObjectsHandler,part:"remove",disabled:!(this.selectedObjectsIds.length>0)},this._componentLocale.removeObject)),this.renderObjects(),o("gxg-container",{displayBorderTop:!0},o("div",{class:"grid actions"},o("div",null,o("gxg-button",{id:"button-clear",type:"outlined",onClick:this.deselectAllHandler,part:"clear",disabled:!(this.selectedObjectsIds.length>0)},this._componentLocale.footer.btnDeselectAll)),o("div",null,o("gxg-button",{id:"button-ok",type:"primary-text-only",onClick:this.confirmHandler,part:"confirm"},this._componentLocale.footer.btnConfirm),o("gxg-button",{id:"button-cancel",type:"outlined",onClick:this.cancelHandler,part:"cancel"},this._componentLocale.footer.btnCancel)))))))}static get assetsDirs(){return["gx-ide-assets/team-dev-update-partial-selection"]}get el(){return r(this)}};l.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}:host(.gx-ide-component){box-shadow:var(--box-shadow-01) !important;height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--font-weight-regular);font-size:var(--font-size-lg);line-height:1.6em;height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:6px;height:6px}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-main .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:6px;height:6px}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-overflow .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}:host{display:block;border:1px solid var(--gxg-border-color--regular);background-color:var(--color-background)}:host(.gxi-object-selector--shadow){border:none;box-shadow:var(--box-shadow-01)}.top-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--gx-ide-grid-row-gap)}.actions{grid-template-columns:repeat(2, 1fr)}.actions>*{display:flex;flex-direction:row;gap:var(--gx-ide-grid-row-gap)}.actions>*:nth-child(2){justify-content:flex-end}";export{l as gx_ide_team_dev_update_partial_selection}
@@ -0,0 +1 @@
1
+ import{r as i,c as r,h as o,H as t,g as e}from"./p-976c3a09.js";import{L as a}from"./p-26957490.js";const s=class{constructor(o){i(this,o),this.componentDidLoadEvent=r(this,"componentDidLoadEvent",7),this.setInitialCheckedRadio=()=>{void 0===this.currentRevision?this.updateToLatestEl.checked=!0:this.updateToRevisionEl.checked=!0},this.confirm=()=>{let i;this.updateToRevisionEl.checked&&(i=this.revisionNumberEl.value),this.confirmCallback(i)},this.cancel=()=>{this.cancelCallback()},this.updateToRevisionOnFocusHandler=()=>{this.updateToRevisionEl.checked=!0},this.cancelCallback=void 0,this.confirmCallback=void 0,this.currentRevision=void 0}async componentWillLoad(){this._componentLocale=await a.getComponentStrings(this.el)}componentDidLoad(){this.componentDidLoadEvent.emit(!0),this.setInitialCheckedRadio()}async validate(){return!0}render(){return o(t,{class:{"gxi-team-dev-update-to-revision":!0}},o("div",{class:"main-wrapper"},o("gxg-container",null,o("gxg-form-radio-group",null,o("gxg-form-radio",{label:this._componentLocale.options.updateToLatest,value:"updateToLatest",ref:i=>this.updateToLatestEl=i,part:"radio-to-latest"}),o("div",{class:"revision-number"},o("gxg-form-radio",{label:this._componentLocale.options.updateToRevision,value:"updateToRevision",ref:i=>this.updateToRevisionEl=i,part:"radio-to-revision"}),o("gxg-form-text",{ref:i=>this.revisionNumberEl=i,onFocus:this.updateToRevisionOnFocusHandler,value:this.currentRevision,part:"revision-number"})))),o("gxg-container",{displayBorderTop:!0},o("div",{class:"actions"},o("gxg-button",{id:"button-ok",type:"primary-text-only",onClick:this.confirm,part:"update"},this._componentLocale.footer.btnUpdate),o("gxg-button",{id:"button-cancel",type:"outlined",onClick:this.cancel,part:"cancel"},this._componentLocale.footer.btnCancel)))))}static get assetsDirs(){return["gx-ide-assets/team-dev-update-to-revision"]}get el(){return e(this)}};s.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}:host(.gx-ide-component){box-shadow:var(--box-shadow-01) !important;height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--font-weight-regular);font-size:var(--font-size-lg);line-height:1.6em;height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:6px;height:6px}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-main .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:6px;height:6px}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-overflow .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}:host{display:block;border:1px solid var(--gxg-border-color--regular);background-color:var(--color-background)}:host(.gxi-object-selector--shadow){border:none;box-shadow:var(--box-shadow-01)}.revision-number{display:flex;align-items:center;gap:var(--gx-ide-grid-row-gap)}.revision-number>:nth-child(2){width:auto !important}.actions{display:flex;justify-content:flex-end;align-items:center;gap:var(--gx-ide-grid-row-gap)}";export{s as gx_ide_team_dev_update_to_revision}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,H as o,g as a}from"./p-976c3a09.js";import{L as l}from"./p-26957490.js";import{f as s,r}from"./p-72303355.js";const n=class{constructor(o){t(this,o),this.componentDidLoadEvent=i(this,"componentDidLoadEvent",7),this.loadDataCalledFirstTime=!1,this.markAllPendingCommitsRows=()=>{this.chGridPendingCommitsEl.markAllRows()},this.togglePendingCommitsCheckboxes=async t=>{if(this.chGridPendingCommitsEl){const i=t.itemsToCheck,e=t.itemsToUncheck;for(const t of i)await this.chGridPendingCommitsEl.markRow(t,!0);for(const t of e)await this.chGridPendingCommitsEl.markRow(t,!1)}},this.revertPendingCommitsCheckboxes=async(t,i)=>{if(this.chGridPendingCommitsEl){for(const i of t)await this.chGridPendingCommitsEl.markRow(i,!1);for(const t of i)await this.chGridPendingCommitsEl.markRow(t,!0)}},this.renderIconState=t=>{let i,o;switch(t){case"inserted":i="gx-server/new",o="success";break;case"modified":i="gx-server/changes-commit-pending",o="primary-active";break;case"deleted":i="gx-server/delete",o="error";break;case"conflicted":i="gx-server/conflict",o="warning"}return e("gxg-icon",{type:i,color:o})},this.pendingCommitsRowMarkingChangedHandler=async t=>{if(this.chGridPendingCommitsEl.removeEventListener("rowMarkingChanged",this.pendingCommitsRowMarkingChangedHandler),this.chGridPendingCommitsEl){const i=t.detail.addedRowsId,e=t.detail.removedRowsId,o=await this.pendingItemsCheckedCallback({itemsChecked:i,itemsUnchecked:e});void 0===o?await this.revertPendingCommitsCheckboxes(i,e):await this.togglePendingCommitsCheckboxes(o),this.chGridPendingCommitsEl.addEventListener("rowMarkingChanged",this.pendingCommitsRowMarkingChangedHandler)}},this.objectsOnContextMenuCallbackHandler=t=>async i=>{i.preventDefault(),i.stopPropagation();let e=[];"commit"===t?e=i.detail.selectedRowsId:"ignored"===t&&(e=await this.chGridIgnoredObjectsEl.getSelectedRows()),this.objectsContextMenuCallback&&await this.objectsContextMenuCallback(t,{selection:e,clientX:i.detail.clientX,clientY:i.detail.clientY})},this.gridOnSelectionChangedCallbackHandler=t=>async i=>{this.selectCallback&&await this.selectCallback(t,i.detail.rowsId)},this.renderPendingCommitsGrid=()=>e("gxg-grid",null,e("ch-grid",{rowSelectionMode:"multiple",ref:t=>this.chGridPendingCommitsEl=t,part:"ch-grid-pending-commits",class:"no-border",onRowContextMenu:this.objectsOnContextMenuCallbackHandler("commit"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("commit")},e("ch-grid-columnset",null,e("ch-grid-column",{columnType:"rich",richRowSelector:!0,richRowSelectorMode:"mark",settingable:!1,sortable:!1,size:"auto"}),e("ch-grid-column",{columnName:"State",settingable:!1,sortable:!1,size:"auto"}),e("ch-grid-column",{settingable:!1,sortable:!1,size:"auto"}),e("ch-grid-column",{sortable:!0,columnName:"Name",settingable:!1,size:"auto"}),e("ch-grid-column",{sortable:!0,columnName:"Type",settingable:!1,size:"auto"}),e("ch-grid-column",{columnName:"Description",settingable:!1,size:"auto"}),e("ch-grid-column",{sortable:!0,columnName:"Modified On",settingable:!1}),e("ch-grid-column",{columnName:"Module",settingable:!1,size:"auto"}),e("ch-grid-column",{columnName:"Local State",settingable:!1,size:"auto"}),e("ch-grid-column",{columnName:"Last Synchronized",settingable:!1,size:"150px"}),e("ch-grid-column",{sortable:!0,columnName:"User",settingable:!1,size:"auto"})),this.pendingCommits.map((t=>e("ch-grid-row",{rowid:t.id},e("ch-grid-cell",{"cell-type":"rich","row-selector":!0}),e("ch-grid-cell",null," ",this.renderIconState(t.state)," "),e("ch-grid-cell",null,e("gxg-icon",{color:"auto",type:t.iconType})),e("ch-grid-cell",null," ",t.name," "),e("ch-grid-cell",null," ",t.type," "),e("ch-grid-cell",null," ",t.description," "),e("ch-grid-cell",null,`${s(t.modifiedOn)}`),e("ch-grid-cell",null," ",t.module," "),e("ch-grid-cell",null," ",t.localState," "),e("ch-grid-cell",null,`${s(t.lastSynchronized)}`),e("ch-grid-cell",null," ",t.user," ")))))),this.renderIgnoredObjectsGrid=()=>e("gxg-grid",null,e("ch-grid",{rowSelectionMode:"multiple",ref:t=>this.chGridIgnoredObjectsEl=t,part:"ch-grid-pending-commits",onRowContextMenu:this.objectsOnContextMenuCallbackHandler("ignored"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("ignored")},e("ch-grid-columnset",null,e("ch-grid-column",{columnName:"",settingable:!1}),e("ch-grid-column",{columnName:"TypeIcon",settingable:!1}),e("ch-grid-column",{columnName:"Name",settingable:!1,sortable:!0}),e("ch-grid-column",{columnName:"Type",settingable:!1}),e("ch-grid-column",{columnName:"Description",settingable:!1}),e("ch-grid-column",{columnName:"Modified On",settingable:!1}),e("ch-grid-column",{columnName:"Module",settingable:!1}),e("ch-grid-column",{columnName:"Local State",settingable:!1}),e("ch-grid-column",{columnName:"Last Synchronized",settingable:!1}),e("ch-grid-column",{columnName:"User",settingable:!1})),this.ignoredObjects.map((t=>e("ch-grid-row",{rowid:t.id,selected:!0},e("ch-grid-cell",null," ",this.renderIconState(t.state)," "),e("ch-grid-cell",null,e("gxg-icon",{color:"auto",type:t.iconType})),e("ch-grid-cell",null," ",t.name," "),e("ch-grid-cell",null," ",t.type," "),e("ch-grid-cell",null," ",t.description," "),e("ch-grid-cell",null,`${s(t.modifiedOn)}`),e("ch-grid-cell",null," ",t.module," "),e("ch-grid-cell",null," ",t.localState," "),e("ch-grid-cell",null,`${s(t.lastSynchronized)}`),e("ch-grid-cell",null," ",t.user," ")))))),this.getRecentCommentHandler=async()=>{if(this.getRecentCommentCallback){const t=await this.getRecentCommentCallback();t&&(this.comment=t)}},this.commitCallbackHandler=async()=>{const t=this.commitComment.value;this.chGridPendingCommitsEl.getMarkedRows().then((async i=>{await this.commitCallback(i,t)}))},this.loadData=async()=>{const t={pattern:this.patternEl.value,changeSet:this.changeSetEl.value,folder:this.foldersEl.value,category:this.categoriesEl.value,type:this.typesEl.value};return await this.loadCallback(t).then((async({pending:t,ignored:i})=>{this.pendingCommits=t,this.ignoredObjects=i}))},this.toggleFiltersHandler=()=>{this.filtersHidden=!this.filtersHidden},this.filtersHidden=!0,this.comment="",this.pendingCommits=[],this.ignoredObjects=[],this.changeSet=void 0,this.types=void 0,this.folders=void 0,this.categories=void 0,this.getRecentCommentCallback=void 0,this.loadCallback=void 0,this.commitCallback=void 0,this.selectCallback=void 0,this.pendingItemsCheckedCallback=void 0,this.objectsContextMenuCallback=void 0}async componentWillLoad(){this._componentLocale=await l.getComponentStrings(this.el)}async componentDidLoad(){await this.loadData(),this.loadDataCalledFirstTime=!0,this.componentDidLoadEvent.emit(!0)}async componentDidRender(){this.loadDataCalledFirstTime&&(await this.markAllPendingCommitsRows(),this.chGridPendingCommitsEl.addEventListener("rowMarkingChanged",this.pendingCommitsRowMarkingChangedHandler),this.loadDataCalledFirstTime=!1)}async reload(){this.loadData()}render(){return e(o,{class:"gx-ide-component"},e("div",{class:"gx-ide-main-wrapper gx-ide-overflow"},e("gxg-container",null,e("header",{class:"header grid"},e("gxg-form-textarea",{id:"gxg-textarea",height:"100px",label:this._componentLocale.topMenu.commentLabel,value:this.comment,ref:t=>this.commitComment=t,placeholder:this._componentLocale.topMenu.commentPlaceholder,part:"comment"}),e("gxg-button",{class:"header-button",type:"outlined",part:"location",onClick:this.getRecentCommentHandler},this._componentLocale.topMenu.recentCommentsButton))),e("main",{class:"main"},e("gxg-container",{fieldset:!0,noContentPadding:!!this.filtersHidden},e("div",{class:"grid second-grid"},e("div",{class:"actions-row grid"},e("gxg-form-text",{class:this.filtersHidden?"hidden":null,"disable-filter":!0,label:this._componentLocale.filtersMenu.patternLabel,labelPosition:"start",value:"",ref:t=>this.patternEl=t,"display-validation-styles":!0,"display-validation-message":!0,part:"pattern",onInput:this.loadData}),e("div",{class:"action-buttons",slot:"tab-bar"},e("gxg-button",{onClick:this.toggleFiltersHandler,type:"secondary-icon-only",icon:"patterns/filters",part:"gxg-button gxg-button--show-filter"}),e("gxg-button",{type:"secondary-icon-only",icon:"gemini-tools/reset",onClick:this.loadData,part:"gxg-button gxg-button--reload"}))),e("div",{class:"filters-grid grid "+(this.filtersHidden?"hidden":null)},e("div",{class:"first-row grid"},e("gxg-combo-box",{labelPosition:"start",label:this._componentLocale.filtersMenu.changesetLabel,value:this.changeSet[0].id,ref:t=>this.changeSetEl=t,part:"change-set","display-validation-styles":!0,"display-validation-message":!0,onValueChanged:this.loadData},r(this.changeSet)),e("gxg-combo-box",{labelPosition:"start",label:this._componentLocale.filtersMenu.typeLabel,value:this.types[0].id,ref:t=>this.typesEl=t,part:"type",onValueChanged:this.loadData},r(this.types))),e("div",{class:"second-row grid"},e("gxg-combo-box",{labelPosition:"start",label:this._componentLocale.filtersMenu.folderLabel,value:this.folders[0].id,ref:t=>this.foldersEl=t,part:"folder","display-validation-styles":!0,"display-validation-message":!0,onValueChanged:this.loadData},r(this.folders)),e("gxg-combo-box",{labelPosition:"start",label:this._componentLocale.filtersMenu.categoryLabel,value:this.categories[0].id,ref:t=>this.categoriesEl=t,part:"categories",onValueChanged:this.loadData},r(this.categories)))))),e("gxg-container",null,e("gxg-tabs",{height:"100%",position:"top",class:"gxg-tabs"},e("gxg-tab-bar",{slot:"tab-bar-container"},e("gxg-tab-button",{slot:"tab-bar","tab-label":`${this._componentLocale.tabs.pendingCommits} (${this.pendingCommits.length})`,tab:"pending-commits","is-selected":!0}),e("gxg-tab-button",{slot:"tab-bar","tab-label":`${this._componentLocale.tabs.ignoredObjects} (${this.ignoredObjects.length})`,tab:"ignored-objects"})),e("gxg-tab",{tab:"pending-commits","no-padding":!0},this.renderPendingCommitsGrid()),e("gxg-tab",{tab:"ignored-objects","no-padding":!0},this.renderIgnoredObjectsGrid())),e("gxg-button",{slot:"footer",type:"primary-text-only",onClick:this.commitCallbackHandler,part:"commit-button"},this._componentLocale.footer.commitButton)))))}static get assetsDirs(){return["gx-ide-assets/team-dev-commit"]}get el(){return a(this)}};n.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}:host(.gx-ide-component){box-shadow:var(--box-shadow-01) !important;height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--font-weight-regular);font-size:var(--font-size-lg);line-height:1.6em;height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:6px;height:6px}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-main .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:6px;height:6px}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-overflow .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}:host{display:block}.main-wrapper{width:100%}.gxg-tabs{margin-top:0;box-shadow:none}.header{grid-template-columns:4fr auto}.header .header-button{height:fit-content}.second-grid{grid-template-rows:1fr auto}.second-grid .actions-row{grid-template-columns:1fr auto}.action-buttons{justify-self:flex-end}.hidden{display:none}.filters-grid{grid-template-rows:repeat(2, 1fr)}.filters-grid .first-row{grid-template-columns:repeat(2, 1fr)}.filters-grid .second-row{grid-template-columns:repeat(2, 1fr)}";export{n as gx_ide_team_dev_commit}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,H as r,g as o}from"./p-976c3a09.js";import{L as s}from"./p-26957490.js";import{f as a,r as n}from"./p-72303355.js";const l=class{constructor(r){t(this,r),this.componentDidLoadEvent=i(this,"componentDidLoadEvent",7),this.loadDataCalledFirstTime=!1,this.onRowContextMenuHandler=t=>async i=>{if(this.objectsContextMenuCallback){i.preventDefault(),i.stopPropagation();let e=[];"pending"===t?e=await this.chGridPendingForUpdateEl.getSelectedRows():"ignored"===t?e=await this.chGridIgnoredObjectsEl.getSelectedRows():"results"===t&&(e=await this.chGridResultsEl.getSelectedRows()),await this.objectsContextMenuCallback(t,{selection:e,clientX:i.detail.clientX,clientY:i.detail.clientY})}},this.markAllPendingToUpdateRows=()=>{this.chGridPendingForUpdateEl.markAllRows()},this.gridOnSelectionChangedCallbackHandler=t=>async i=>{this.selectCallback&&await this.selectCallback(t,i.detail.rowsId)},this.renderOptions=()=>e("gxg-container",{part:"options-container"},e("div",{class:"grid options-grid"},e("gxg-container",{displayBorder:!0,part:"options-update-from",containerTitle:this._componentLocale.options.updateFrom},e("div",{class:"grid options-update-from-grid"},e("gxg-text",{type:"text-regular"},this._componentLocale.options.updateFrom,":"),e("gxg-text",{type:"text-link",onClick:this.openServerCallback},this.updateFrom?this.updateFrom.serverUrl:""),e("gxg-text",{type:"text-regular"},this._componentLocale.options.knowledgeBase,":"),e("gxg-text",{type:"text-regular"},this.updateFrom?this.updateFrom.kbName:""),e("gxg-text",{type:"text-regular"},this._componentLocale.options.version,":"),e("gxg-text",{type:"text-regular"},this.updateFrom?this.updateFrom.versionName:""),e("gxg-text",{type:"text-regular"},this._componentLocale.options.lastFullUpdate,":"),e("gxg-text",{type:"text-regular"},this.updateFrom?a(this.updateFrom.lastFullUpdate):""))),e("gxg-container",{displayBorder:!0,part:"options-scope",containerTitle:this._componentLocale.options.scope},e("div",{class:"grid options-scope-grid"},e("gxg-text",{type:"text-regular"},this._componentLocale.options.objects,":"),e("gxg-text",{type:"text-regular"},e("span",{class:{bold:"partial"===this.objectScopeText}},this._componentLocale.options.scopeData.objects[this.objectScopeText.toLocaleLowerCase()])),e("gxg-button",{id:"button-scope-objects-change",type:"outlined",onClick:this.objectsScope,part:"gxg-button gxg-button--scope-objects-change"},this._componentLocale.options.changeBtn),e("gxg-text",{type:"text-regular"},this._componentLocale.options.revision,":"),e("gxg-text",{type:"text-regular"},e("span",{class:{bold:void 0!==this.revisionScopeText}},void 0===this.revisionScopeText?this._componentLocale.options.scopeData.revision.latest:this.revisionScopeText)),e("gxg-button",{id:"button-scope-revision-change",type:"outlined",onClick:this.revisionScope,part:"gxg-button gxg-button--scope-revision-change"},this._componentLocale.options.changeBtn),e("gxg-form-checkbox",{label:this._componentLocale.options.kbProperties,class:"align-center",part:"option-kb-properties"}))))),this.renderFilter=()=>e("gxg-container",{part:"filters-container"},e("div",{class:"filters-container-body with-gap"},e("div",{class:{grid:!0,"filter-grid":!0,hide:!this.showFilter}},e("gxg-form-text",{"label-position":"above",label:this._componentLocale.filter.pattern,ref:t=>this.filterPatternEl=t,part:"filter-pattern",onInput:this.loadData}),e("gxg-combo-box",{"disable-filter":!0,label:this._componentLocale.filter.type,disabled:!this.types,ref:t=>this.filterTypeEl=t,onValueChanged:this.loadData,part:"filter-type",value:this.types[0].id},n(this.types))),e("div",{class:{actions:!0,close:!this.showFilter}},e("gxg-button",{type:"secondary-icon-only",icon:"patterns/filters",onClick:this.toggleFilter,part:"gxg-button gxg-button--show-filter"}),e("gxg-button",{type:"secondary-icon-only",icon:"gemini-tools/reset",onClick:this.loadData,part:"gxg-button gxg-button--reload"})))),this.renderData=()=>e("gxg-container",{part:"data-container"},e("gxg-tabs",{id:"dataTabs",part:"data-tabs"},e("gxg-tab-bar",{slot:"tab-bar-container"},e("gxg-tab-button",{slot:"tab-bar","tab-label":this._componentLocale.tabs.pendingForUpdate,tab:"pendingForUpdate",key:"pendingForUpdate",isSelected:!0}),e("gxg-tab-button",{slot:"tab-bar","tab-label":this._componentLocale.tabs.ignoredObjects,tab:"ignoredObjects",key:"ignoredObjects"}),e("gxg-tab-button",{slot:"tab-bar","tab-label":this._componentLocale.tabs.results,tab:"results",key:"results",ref:t=>this.gxgTabButtonResultsEl=t})),e("gxg-tab",{tab:"pendingForUpdate",key:"pendingForUpdate",isSelected:!0},this.renderPendingForUpdate()),e("gxg-tab",{tab:"ignoredObjects",key:"ignoredObjects"},this.renderIgnoredObjects()),e("gxg-tab",{tab:"results",key:"results"},this.renderResults()))),this.renderPendingForUpdate=()=>e("gxg-grid",null,e("ch-grid",{"row-selection-mode":"multiple",ref:t=>this.chGridPendingForUpdateEl=t,part:"ch-grid-pending-for-updates",class:"no-border",onRowContextMenu:this.onRowContextMenuHandler("pending"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("pending")},e("ch-grid-columnset",null,e("ch-grid-column",{settingable:!1,sortable:!1,"column-type":"rich",richRowSelector:!0,richRowSelectorMode:"mark"}),e("ch-grid-column",{settingable:!1,sortable:!1}),e("ch-grid-column",{settingable:!1,sortable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.name,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.type,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.description,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.modifiedOn,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.status,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.action,settingable:!1})),this.updateData.pendingForUpdate.map((t=>e("ch-grid-row",{rowid:t.id},e("ch-grid-cell",{"cell-type":"rich","row-selector":!0}),e("ch-grid-cell",null,e("gxg-icon",{type:t.typeIcon,color:"auto"})),e("ch-grid-cell",null," ",this.renderIconState(t.state)," "),e("ch-grid-cell",null," ",t.name," "),e("ch-grid-cell",null," ",t.type," "),e("ch-grid-cell",null," ",t.description," "),e("ch-grid-cell",null,`${a(t.modifiedOn)}`),e("ch-grid-cell",null," ",t.status," "),e("ch-grid-cell",null," ",t.action," ")))))),this.renderIgnoredObjects=()=>e("gxg-grid",null,e("ch-grid",{"row-selection-mode":"multiple",ref:t=>this.chGridIgnoredObjectsEl=t,part:"ch-grid-ignored-objects",class:"no-border",onRowContextMenu:this.onRowContextMenuHandler("ignored"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("ignored")},e("ch-grid-columnset",null,e("ch-grid-column",{settingable:!1,sortable:!1,size:"min-content"}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.name,settingable:!1,size:"1fr"}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.type,settingable:!1,size:"1fr"})),this.updateData.ignoredObjects.map((t=>e("ch-grid-row",{rowid:t.id},e("ch-grid-cell",null,e("gxg-icon",{type:t.typeIcon,color:"auto"})),e("ch-grid-cell",null," ",t.name," "),e("ch-grid-cell",null," ",t.type," ")))))),this.renderResults=()=>e("gxg-grid",null,e("ch-grid",{"row-selection-mode":"multiple",ref:t=>this.chGridResultsEl=t,part:"ch-grid-results",class:"no-border",onRowContextMenu:this.onRowContextMenuHandler("results"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("results")},e("ch-grid-columnset",null,e("ch-grid-column",{settingable:!1,sortable:!1,"column-type":"tree"}),e("ch-grid-column",{settingable:!1,sortable:!1}),e("ch-grid-column",{settingable:!1,sortable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.name,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.type,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.description,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.notes,settingable:!1})),this.updateResultData.map((t=>e("ch-grid-row",{rowid:t.id},e("ch-grid-cell",null," ",this.renderIconResult(t.result)," "),e("ch-grid-cell",null,e("gxg-icon",{type:t.typeIcon,color:"auto"})),e("ch-grid-cell",null," ",this.renderIconState(t.state)," "),e("ch-grid-cell",null," ",t.name," "),e("ch-grid-cell",null," ",t.type," "),e("ch-grid-cell",null," ",t.description," "),e("ch-grid-cell",null," ",t.notes," "),e("ch-grid-rowset",null,t.messages.map((t=>{let i;switch(t.type){case"info":i="text-alert-info";break;case"success":i="text-alert-success";break;case"warning":i="text-alert-warning";break;case"error":i="text-alert-error"}return e("ch-grid-rowset-empty",null,e("gxg-text",{type:i},t.text))})))))))),this.renderIconState=t=>{let i,r;switch(t){case"modified":i="gx-server/changes-commit-pending",r="primary-active";break;case"inserted":i="gx-server/new",r="success";break;case"deleted":i="gx-server/delete",r="error";break;case"conflicted":i="gx-server/conflict",r="warning"}return e("gxg-icon",{type:i,color:r})},this.renderIconResult=t=>{let i,r;switch(t){case"info":i="gemini-tools/notice",r="primary-active";break;case"success":i="gemini-tools/success",r="success";break;case"warning":i="gemini-tools/warning",r="warning";break;case"error":i="gemini-tools/error",r="error"}return e("gxg-icon",{type:i,color:r})},this.loadData=async()=>{const t={pattern:this.showFilter?this.filterPatternEl.value:null,type:this.showFilter?this.filterTypeEl.value:null};this.isLoading=!0,this.updateData=await this.loadCallback(t),this.isLoading=!1,this.loadDataCalledFirstTime||(this.loadDataCalledFirstTime=!0)},this.update=async()=>{if(this.updateCallback){const t=await this.chGridPendingForUpdateEl.getMarkedRows();this.updateCallback(t).then((t=>{this.updateResultData=t,this.gxgTabButtonResultsEl.tabButtonClick()}))}},this.toggleFilter=()=>{this.showFilter=!this.showFilter},this.objectsScope=()=>{this.objectsScopeCallback&&this.objectsScopeCallback().then((t=>{t&&(this.objectScopeText=t)}))},this.revisionScope=()=>{this.revisionScopeCallback&&this.revisionScopeCallback().then((t=>{this.revisionScopeText=t}))},this.pendingForUpdatesRowMarkingChangedHandler=async t=>{if(this.chGridPendingForUpdateEl.removeEventListener("rowMarkingChanged",this.pendingForUpdatesRowMarkingChangedHandler),this.chGridPendingForUpdateEl){const i=t.detail.addedRowsId,e=t.detail.removedRowsId,r=await this.pendingItemsCheckedCallback({itemsChecked:i,itemsUnchecked:e});void 0===r?await this.revertPendingCommitsCheckboxes(i,e):await this.togglePendingCommitsCheckboxes(r),this.chGridPendingForUpdateEl.addEventListener("rowMarkingChanged",this.pendingForUpdatesRowMarkingChangedHandler)}this.chGridPendingForUpdateEl.addEventListener("rowMarkingChanged",this.pendingForUpdatesRowMarkingChangedHandler)},this.togglePendingCommitsCheckboxes=async t=>{if(this.chGridPendingForUpdateEl){const i=t.itemsToCheck,e=t.itemsToUncheck;for(const t of i)await this.chGridPendingForUpdateEl.markRow(t,!0);for(const t of e)await this.chGridPendingForUpdateEl.markRow(t,!1)}},this.revertPendingCommitsCheckboxes=async(t,i)=>{if(this.chGridPendingForUpdateEl){for(const i of t)await this.chGridPendingForUpdateEl.markRow(i,!1);for(const t of i)await this.chGridPendingForUpdateEl.markRow(t,!0)}},this.isLoading=!1,this.objectScopeText="all",this.openTab="pending",this.revisionScopeText=void 0,this.showFilter=!1,this.updateData={pendingForUpdate:[],ignoredObjects:[]},this.updateResultData=[],this.confirmCallback=void 0,this.gridContextMenuCallback=void 0,this.loadCallback=void 0,this.objectsScopeCallback=void 0,this.openServerCallback=void 0,this.pendingItemsCheckedCallback=void 0,this.revisionScopeCallback=void 0,this.objectsContextMenuCallback=void 0,this.selectCallback=void 0,this.types=void 0,this.updateCallback=void 0,this.updateFrom=void 0}async componentWillLoad(){this._componentLocale=await s.getComponentStrings(this.el),this.componentDidLoadEvent.emit(!0)}async componentDidLoad(){await this.loadData()}async componentDidRender(){this.loadDataCalledFirstTime&&(await this.markAllPendingToUpdateRows(),this.chGridPendingForUpdateEl.addEventListener("rowMarkingChanged",this.pendingForUpdatesRowMarkingChangedHandler),this.loadDataCalledFirstTime=!1)}async validate(){return!0}render(){return e(r,{class:"gx-ide-component"},e("div",{class:"gx-ide-main-wrapper gx-ide-overflow"},this.renderOptions(),this.renderFilter(),this.renderData(),e("gxg-container",{displayBorderTop:!0},e("div",{class:"align-center with-gap actions"},e("gxg-button",{id:"button-update",type:"primary-text-only",onClick:this.update,part:"gxg-button gxg-button--update",disabled:this.isLoading},this._componentLocale.footer.btnUpdate)))))}static get assetsDirs(){return["gx-ide-assets/team-dev-update"]}get el(){return o(this)}};l.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}:host(.gx-ide-component){box-shadow:var(--box-shadow-01) !important;height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--font-weight-regular);font-size:var(--font-size-lg);line-height:1.6em;height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:6px;height:6px}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-main .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:6px;height:6px}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-overflow .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}:host{display:block;border:1px solid var(--gxg-border-color--regular);background-color:var(--color-background)}:host(.gxi-object-selector--shadow){border:none;box-shadow:var(--box-shadow-01)}.options-grid{grid-template-columns:1fr auto}.options-grid .options-update-from-grid{grid-template-columns:auto 1fr;grid-row-gap:0}.options-grid .options-scope-grid{grid-template-columns:auto 1fr auto}.options-grid .options-scope-grid>:nth-child(7){grid-area:3/1/4/4}.flex{display:flex;flex-direction:row;align-items:center}.with-gap{gap:var(--gx-ide-grid-row-gap)}.hide{display:none !important}.filters-container-body{width:100%;display:flex;align-items:flex-end;justify-content:space-between}.filters-container-body .filter-grid{flex:1;grid-template-columns:repeat(2, 1fr)}.filters-container-body .actions{display:flex;justify-content:flex-end;align-items:center}.filters-container-body .actions.close{width:100%}.data-grid{grid-template-columns:repeat(3, 1fr)}.data-grid>:nth-child(1){grid-area:1/1/2/2}.data-grid>:nth-child(2){grid-area:1/2/2/4}.data-panel-grid{grid-template-columns:repeat(2, 1fr)}.data-preview img{max-width:100%}.data-max-height{max-height:300px;overflow-y:auto}.actions{justify-content:flex-end}.no-border{border:0}.bold{font-weight:bold}";export{l as gx_ide_team_dev_update}
@@ -34,3 +34,12 @@ export type ContextMenuInfo = {
34
34
  clientX: number;
35
35
  clientY: number;
36
36
  };
37
+ export type ItemsCheckedState = {
38
+ itemsChecked: string[];
39
+ itemsUnchecked: string[];
40
+ };
41
+ export type ItemsCheckedResult = {
42
+ itemsToCheck: string[];
43
+ itemsToUncheck: string[];
44
+ };
45
+ export type ResultState = "info" | "success" | "warning" | "error";
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from "../../stencil-public-runtime";
2
- import { GxOption, ObjectState, ContextMenuInfo, ObjectType } from "../../common/types";
2
+ import { GxOption, ObjectState, ContextMenuInfo, ObjectType, ItemsCheckedState, ItemsCheckedResult } from "../../common/types";
3
3
  export declare class GxIdeTeamDevCommit {
4
4
  /**
5
5
  * The component hard-coded strings translations.
@@ -50,11 +50,11 @@ export declare class GxIdeTeamDevCommit {
50
50
  /**
51
51
  * Callback that should be invoked when the user selects rows from the grids
52
52
  */
53
- readonly selectCallback: SelectCallback;
53
+ readonly selectCallback: CommitSelectCallback;
54
54
  /**
55
55
  * Callback invoked when user check/uncheck any item from the 'Pending to Commit' grid
56
56
  */
57
- readonly pendingItemCheckedCallback: (pendingItemsCheckedState: PendingItemsCheckedState) => Promise<PendingItemCheckedResult | undefined>;
57
+ readonly pendingItemsCheckedCallback: PendingItemsCheckedCallback;
58
58
  /**
59
59
  * Callback that must be invoked when user activate the context menu in any of the grids
60
60
  */
@@ -88,10 +88,11 @@ export declare class GxIdeTeamDevCommit {
88
88
  export type GetRecentComment = () => Promise<string | undefined>;
89
89
  export type LoadCallback = (filters: FiltersData) => Promise<CommitData>;
90
90
  export type CommitCallback = (selection: string[], commitComment: string) => Promise<boolean>;
91
- export type SelectCallback = (grid: SourceType, selectionIds: string[]) => Promise<void>;
92
- export type PendingItemCheckedCallback = (checkedItemIds: string[]) => Promise<PendingItemCheckedResult | undefined>;
93
- export type ObjectsContextMenuCallback = (grid: SourceType, contextMenuInfo: ContextMenuInfo) => Promise<void>;
94
- export type SourceType = "commit" | "ignored";
91
+ export type PendingItemsCheckedCallback = (pendingItemsCheckedState: ItemsCheckedState) => Promise<ItemsCheckedResult | undefined>;
92
+ export type CommitSelectCallback = (grid: CommitSourceType, selectionIds: string[]) => Promise<void>;
93
+ export type ItemCheckedCallback = (checkedItemIds: string[]) => Promise<ItemsCheckedResult | undefined>;
94
+ export type ObjectsContextMenuCallback = (grid: CommitSourceType, contextMenuInfo: ContextMenuInfo) => Promise<void>;
95
+ export type CommitSourceType = "commit" | "ignored";
95
96
  export type CommitData = {
96
97
  pending: ModifiedObjectData[];
97
98
  ignored: ModifiedObjectData[];
@@ -116,11 +117,3 @@ export type FiltersData = {
116
117
  folder: string;
117
118
  category: string;
118
119
  };
119
- export type PendingItemCheckedResult = {
120
- itemsToCheck: string[];
121
- itemsToUncheck: string[];
122
- };
123
- export type PendingItemsCheckedState = {
124
- itemsChecked: string[];
125
- itemsUnchecked: string[];
126
- };
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from "../../stencil-public-runtime";
2
- import { ObjectState, ObjectType } from "../../common/types";
2
+ import { ObjectState, ObjectType, ContextMenuInfo, ItemsCheckedState, ItemsCheckedResult, ResultState } from "../../common/types";
3
3
  export declare class GxIdeTeamDevUpdate {
4
4
  /**
5
5
  * The component hard-coded strings translations.
@@ -64,11 +64,19 @@ export declare class GxIdeTeamDevUpdate {
64
64
  /**
65
65
  * This is a function provided by the developer that return the information of a Font type of data.
66
66
  */
67
- readonly pendingItemCheckedCallback: PendingItemCheckedCallback;
67
+ readonly pendingItemsCheckedCallback: PendingItemsCheckedCallback;
68
68
  /**
69
69
  * This is a function provided by the developer to call when the user wants to select the revision to work on.
70
70
  */
71
71
  readonly revisionScopeCallback: () => Promise<string | undefined>;
72
+ /**
73
+ * Callback that should be invoked when the user activates the context menu on any of the grids. It receives the internal IDs of the selected elements and in which grid the event occurred. It should prevent the default browser context menu from appearing
74
+ */
75
+ readonly objectsContextMenuCallback: ObjectsContextMenuCallback;
76
+ /**
77
+ * Callback that should be invoked when the user selects rows from the grids
78
+ */
79
+ readonly selectCallback: UpdateSelectCallback;
72
80
  /**
73
81
  * Possibly values for the filter type
74
82
  */
@@ -92,7 +100,9 @@ export declare class GxIdeTeamDevUpdate {
92
100
  * Validate necessary data input
93
101
  */
94
102
  validate(): Promise<boolean>;
103
+ private onRowContextMenuHandler;
95
104
  private markAllPendingToUpdateRows;
105
+ private gridOnSelectionChangedCallbackHandler;
96
106
  private renderOptions;
97
107
  private renderFilter;
98
108
  private renderData;
@@ -106,7 +116,6 @@ export declare class GxIdeTeamDevUpdate {
106
116
  private toggleFilter;
107
117
  private objectsScope;
108
118
  private revisionScope;
109
- private addListeners;
110
119
  private pendingForUpdatesRowMarkingChangedHandler;
111
120
  private togglePendingCommitsCheckboxes;
112
121
  private revertPendingCommitsCheckboxes;
@@ -114,8 +123,11 @@ export declare class GxIdeTeamDevUpdate {
114
123
  }
115
124
  export type LoadCallback = (filters: FiltersData) => Promise<UpdateData>;
116
125
  export type UpdateCallback = (selection: string[]) => Promise<UpdateResultData[]>;
117
- export type PendingItemCheckedCallback = (pendingItemsCheckedState: PendingItemsCheckedState) => Promise<PendingItemCheckedResult | undefined>;
126
+ export type PendingItemsCheckedCallback = (pendingItemsCheckedState: ItemsCheckedState) => Promise<ItemsCheckedResult | undefined>;
127
+ export type UpdateSelectCallback = (grid: UpdateSourceType, selectionIds: string[]) => Promise<void>;
128
+ export type UpdateSourceType = "pending" | "ignored" | "results";
118
129
  export type GridContextMenuCallback = (selection: string[], grid: "update" | "ignored" | "results") => Promise<void>;
130
+ export type ObjectsContextMenuCallback = (source: UpdateSourceType, contextMenuInfo: ContextMenuInfo) => Promise<void>;
119
131
  export type ConfirmCallback = (data: any) => Promise<boolean>;
120
132
  export interface UpdateFromData {
121
133
  serverUrl: string;
@@ -157,12 +169,3 @@ export interface MessageData {
157
169
  type: "info" | "success" | "warning" | "error";
158
170
  text: string;
159
171
  }
160
- export type ResultState = "info" | "success" | "warning" | "error";
161
- export interface PendingItemCheckedResult {
162
- itemsToCheck: string[];
163
- itemsToUncheck: string[];
164
- }
165
- export interface PendingItemsCheckedState {
166
- itemsChecked: string[];
167
- itemsUnchecked: string[];
168
- }
@@ -7,15 +7,15 @@ export declare class GxIdeTeamDevUpdatePartialSelection {
7
7
  /**
8
8
  * This is a function provided by the developer that return a list of new objects to populate the table of objects.
9
9
  */
10
- readonly addCallback: AddCallbackFn;
10
+ readonly addCallback: AddCallback;
11
11
  /**
12
12
  * This is a function provided by the developer for execute when cancel button is pressed.
13
13
  */
14
- readonly cancelCallback: CancelCallbackFn;
14
+ readonly cancelCallback: CancelCallback;
15
15
  /**
16
16
  * This is a function provided by the developer and is invoked when the action confirm is executed passing the selected objects of the grid
17
17
  */
18
- readonly confirmCallback: ConfirmCallbackFn;
18
+ readonly confirmCallback: ConfirmCallback;
19
19
  /**
20
20
  * The categories render in the filter category selector
21
21
  */
@@ -32,25 +32,22 @@ export declare class GxIdeTeamDevUpdatePartialSelection {
32
32
  componentDidLoadEvent: EventEmitter<boolean>;
33
33
  componentWillLoad(): Promise<void>;
34
34
  componentDidLoad(): void;
35
- keyDownHandler(eventInfo: KeyboardEvent): void;
36
35
  /**
37
36
  * Validate necessary data input
38
37
  */
39
38
  validate(): Promise<boolean>;
40
- private handleKeyDownEvent;
41
- private keyDownEventHandler;
42
39
  private renderObjects;
43
- private getObjects;
44
- private removeObjects;
45
- private confirm;
46
- private cancel;
47
- private deselectAll;
40
+ private getObjectsHandler;
41
+ private removeObjectsHandler;
42
+ private confirmHandler;
43
+ private cancelHandler;
44
+ private deselectAllHandler;
48
45
  private listenChanges;
49
46
  render(): void;
50
47
  }
51
- export type AddCallbackFn = () => Promise<ObjectData[]>;
52
- export type CancelCallbackFn = () => Promise<void>;
53
- export type ConfirmCallbackFn = (ids: string[]) => Promise<void>;
48
+ export type AddCallback = () => Promise<ObjectData[]>;
49
+ export type CancelCallback = () => Promise<void>;
50
+ export type ConfirmCallback = (ids: string[]) => Promise<void>;
54
51
  export interface ObjectData {
55
52
  id: string;
56
53
  typeIcon: string;
@@ -12,20 +12,28 @@ export declare class GxIdeTeamDevUpdateToRevision {
12
12
  * This is a function provided by the developer and is invoked when the action confirm is executed passing the selected objects of the grid
13
13
  */
14
14
  readonly confirmCallback: confirmCallbackFn;
15
+ /**
16
+ * Set an initial value for the review
17
+ */
18
+ readonly currentRevision: string | undefined;
15
19
  el: HTMLGxIdeTeamDevUpdateToRevisionElement;
16
20
  private revisionNumberEl;
17
21
  private updateToRevisionEl;
22
+ private updateToLatestEl;
18
23
  /**
19
24
  * This event is emitted once just after the component is fully loaded and the first render() occurs.
20
25
  */
21
26
  componentDidLoadEvent: EventEmitter<boolean>;
22
27
  componentWillLoad(): Promise<void>;
28
+ componentDidLoad(): void;
23
29
  /**
24
30
  * Validate necessary data input
25
31
  */
26
32
  validate(): Promise<boolean>;
33
+ private setInitialCheckedRadio;
27
34
  private confirm;
28
35
  private cancel;
36
+ private updateToRevisionOnFocusHandler;
29
37
  render(): void;
30
38
  }
31
39
  export type addCallbackFn = () => Promise<ObjectData[]>;
@@ -15,10 +15,10 @@ import { GxOption, ObjectType } from "./common/types";
15
15
  import { CancelCallback, ChangedCallback, CreateCallback } from "./components/new-environment/new-environment";
16
16
  import { CancelCallback as CancelCallback1, CreateCallback as CreateCallback1, SelectLocationCallback } from "./components/new-kb/new-kb";
17
17
  import { LoadReferencesCallback, ObjectData, OpenObjectCallback, OpenSelectorDialogCallback, SelectorSourceCallback, SelectReferenceCallback } from "./components/references/references";
18
- import { CommitCallback, GetRecentComment, LoadCallback, ObjectsContextMenuCallback, PendingItemCheckedResult, PendingItemsCheckedState, SelectCallback } from "./components/team-dev-commit/team-dev-commit";
18
+ import { CommitCallback, CommitSelectCallback, GetRecentComment, LoadCallback, ObjectsContextMenuCallback, PendingItemsCheckedCallback } from "./components/team-dev-commit/team-dev-commit";
19
19
  import { cancelCallback, confirmCallback } from "./components/team-dev-select-recent-comment/team-dev-select-recent-comment";
20
- import { ConfirmCallback, GridContextMenuCallback, LoadCallback as LoadCallback1, PendingItemCheckedCallback, UpdateCallback, UpdateFromData } from "./components/team-dev-update/team-dev-update";
21
- import { AddCallbackFn, CancelCallbackFn, ConfirmCallbackFn, ObjectData as ObjectData1 } from "./components/team-dev-update-partial-selection/team-dev-update-partial-selection";
20
+ import { ConfirmCallback, GridContextMenuCallback, LoadCallback as LoadCallback1, ObjectsContextMenuCallback as ObjectsContextMenuCallback1, PendingItemsCheckedCallback as PendingItemsCheckedCallback1, UpdateCallback, UpdateFromData, UpdateSelectCallback } from "./components/team-dev-update/team-dev-update";
21
+ import { AddCallback, CancelCallback as CancelCallback2, ConfirmCallback as ConfirmCallback1, ObjectData as ObjectData1 } from "./components/team-dev-update-partial-selection/team-dev-update-partial-selection";
22
22
  import { cancelCallbackFn, confirmCallbackFn } from "./components/team-dev-update-to-revision/team-dev-update-to-revision";
23
23
  import { GxgTreeItemData } from "@genexus/gemini/dist/types/components/tree-item/gxg-tree-item";
24
24
  export namespace Components {
@@ -398,9 +398,7 @@ export namespace Components {
398
398
  /**
399
399
  * Callback invoked when user check/uncheck any item from the 'Pending to Commit' grid
400
400
  */
401
- "pendingItemCheckedCallback": (
402
- pendingItemsCheckedState: PendingItemsCheckedState
403
- ) => Promise<PendingItemCheckedResult | undefined>;
401
+ "pendingItemsCheckedCallback": PendingItemsCheckedCallback;
404
402
  /**
405
403
  * The method used by the Host to instruct the component to force a data refresh in the grids.
406
404
  */
@@ -408,7 +406,7 @@ export namespace Components {
408
406
  /**
409
407
  * Callback that should be invoked when the user selects rows from the grids
410
408
  */
411
- "selectCallback": SelectCallback;
409
+ "selectCallback": CommitSelectCallback;
412
410
  /**
413
411
  * Possible values for Type filter
414
412
  */
@@ -441,6 +439,10 @@ export namespace Components {
441
439
  * This is a function provided by the developer that return the list of types of data loaded from file or url.
442
440
  */
443
441
  "loadCallback": LoadCallback;
442
+ /**
443
+ * Callback that should be invoked when the user activates the context menu on any of the grids. It receives the internal IDs of the selected elements and in which grid the event occurred. It should prevent the default browser context menu from appearing
444
+ */
445
+ "objectsContextMenuCallback": ObjectsContextMenuCallback;
444
446
  /**
445
447
  * This is a function provided by the developer to call when the user makes a partial selection from button Change of Scope group.
446
448
  */
@@ -452,11 +454,15 @@ export namespace Components {
452
454
  /**
453
455
  * This is a function provided by the developer that return the information of a Font type of data.
454
456
  */
455
- "pendingItemCheckedCallback": PendingItemCheckedCallback;
457
+ "pendingItemsCheckedCallback": PendingItemsCheckedCallback;
456
458
  /**
457
459
  * This is a function provided by the developer to call when the user wants to select the revision to work on.
458
460
  */
459
461
  "revisionScopeCallback": () => Promise<string | undefined>;
462
+ /**
463
+ * Callback that should be invoked when the user selects rows from the grids
464
+ */
465
+ "selectCallback": UpdateSelectCallback;
460
466
  /**
461
467
  * Possibly values for the filter type
462
468
  */
@@ -478,15 +484,15 @@ export namespace Components {
478
484
  /**
479
485
  * This is a function provided by the developer that return a list of new objects to populate the table of objects.
480
486
  */
481
- "addCallback": AddCallbackFn;
487
+ "addCallback": AddCallback;
482
488
  /**
483
489
  * This is a function provided by the developer for execute when cancel button is pressed.
484
490
  */
485
- "cancelCallback": CancelCallbackFn;
491
+ "cancelCallback": CancelCallback;
486
492
  /**
487
493
  * This is a function provided by the developer and is invoked when the action confirm is executed passing the selected objects of the grid
488
494
  */
489
- "confirmCallback": ConfirmCallbackFn;
495
+ "confirmCallback": ConfirmCallback;
490
496
  /**
491
497
  * The categories render in the filter category selector
492
498
  */
@@ -505,6 +511,10 @@ export namespace Components {
505
511
  * This is a function provided by the developer and is invoked when the action confirm is executed passing the selected objects of the grid
506
512
  */
507
513
  "confirmCallback": confirmCallbackFn;
514
+ /**
515
+ * Set an initial value for the review
516
+ */
517
+ "currentRevision": string | undefined;
508
518
  /**
509
519
  * Validate necessary data input
510
520
  */
@@ -1114,13 +1124,11 @@ declare namespace LocalJSX {
1114
1124
  /**
1115
1125
  * Callback invoked when user check/uncheck any item from the 'Pending to Commit' grid
1116
1126
  */
1117
- "pendingItemCheckedCallback"?: (
1118
- pendingItemsCheckedState: PendingItemsCheckedState
1119
- ) => Promise<PendingItemCheckedResult | undefined>;
1127
+ "pendingItemsCheckedCallback": PendingItemsCheckedCallback;
1120
1128
  /**
1121
1129
  * Callback that should be invoked when the user selects rows from the grids
1122
1130
  */
1123
- "selectCallback"?: SelectCallback;
1131
+ "selectCallback"?: CommitSelectCallback;
1124
1132
  /**
1125
1133
  * Possible values for Type filter
1126
1134
  */
@@ -1157,6 +1165,10 @@ declare namespace LocalJSX {
1157
1165
  * This is a function provided by the developer that return the list of types of data loaded from file or url.
1158
1166
  */
1159
1167
  "loadCallback": LoadCallback;
1168
+ /**
1169
+ * Callback that should be invoked when the user activates the context menu on any of the grids. It receives the internal IDs of the selected elements and in which grid the event occurred. It should prevent the default browser context menu from appearing
1170
+ */
1171
+ "objectsContextMenuCallback": ObjectsContextMenuCallback;
1160
1172
  /**
1161
1173
  * This is a function provided by the developer to call when the user makes a partial selection from button Change of Scope group.
1162
1174
  */
@@ -1172,11 +1184,15 @@ declare namespace LocalJSX {
1172
1184
  /**
1173
1185
  * This is a function provided by the developer that return the information of a Font type of data.
1174
1186
  */
1175
- "pendingItemCheckedCallback": PendingItemCheckedCallback;
1187
+ "pendingItemsCheckedCallback": PendingItemsCheckedCallback;
1176
1188
  /**
1177
1189
  * This is a function provided by the developer to call when the user wants to select the revision to work on.
1178
1190
  */
1179
1191
  "revisionScopeCallback": () => Promise<string | undefined>;
1192
+ /**
1193
+ * Callback that should be invoked when the user selects rows from the grids
1194
+ */
1195
+ "selectCallback"?: UpdateSelectCallback;
1180
1196
  /**
1181
1197
  * Possibly values for the filter type
1182
1198
  */
@@ -1194,15 +1210,15 @@ declare namespace LocalJSX {
1194
1210
  /**
1195
1211
  * This is a function provided by the developer that return a list of new objects to populate the table of objects.
1196
1212
  */
1197
- "addCallback": AddCallbackFn;
1213
+ "addCallback": AddCallback;
1198
1214
  /**
1199
1215
  * This is a function provided by the developer for execute when cancel button is pressed.
1200
1216
  */
1201
- "cancelCallback": CancelCallbackFn;
1217
+ "cancelCallback": CancelCallback;
1202
1218
  /**
1203
1219
  * This is a function provided by the developer and is invoked when the action confirm is executed passing the selected objects of the grid
1204
1220
  */
1205
- "confirmCallback": ConfirmCallbackFn;
1221
+ "confirmCallback": ConfirmCallback;
1206
1222
  /**
1207
1223
  * This event is emitted once just after the component is fully loaded and the first render() occurs.
1208
1224
  */
@@ -1221,6 +1237,10 @@ declare namespace LocalJSX {
1221
1237
  * This is a function provided by the developer and is invoked when the action confirm is executed passing the selected objects of the grid
1222
1238
  */
1223
1239
  "confirmCallback": confirmCallbackFn;
1240
+ /**
1241
+ * Set an initial value for the review
1242
+ */
1243
+ "currentRevision"?: string | undefined;
1224
1244
  /**
1225
1245
  * This event is emitted once just after the component is fully loaded and the first render() occurs.
1226
1246
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genexus/genexus-ide-ui",
3
3
  "license": "Apache-2.0",
4
- "version": "0.0.31",
4
+ "version": "0.0.32",
5
5
  "description": "GeneXus IDE UI components",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.js",
@@ -1 +0,0 @@
1
- import{r,c as o,h as i,H as e,g as t}from"./p-976c3a09.js";import{L as a}from"./p-26957490.js";const n=class{constructor(i){r(this,i),this.componentDidLoadEvent=o(this,"componentDidLoadEvent",7),this.confirm=()=>{let r;this.updateToRevisionEl.checked&&(r=this.revisionNumberEl.value),this.confirmCallback(r)},this.cancel=()=>{this.cancelCallback()},this.cancelCallback=void 0,this.confirmCallback=void 0}async componentWillLoad(){this._componentLocale=await a.getComponentStrings(this.el),this.componentDidLoadEvent.emit(!0)}async validate(){return!0}render(){return i(e,{class:{"gxi-team-dev-update-to-revision":!0}},i("div",{class:"main-wrapper"},i("gxg-container",null,i("gxg-form-radio-group",null,i("gxg-form-radio",{label:this._componentLocale.options.updateToLatest,value:"updateToLatest",part:"radio-to-latest"}),i("div",{class:"revision-number"},i("gxg-form-radio",{label:this._componentLocale.options.updateToRevision,value:"updateToRevision",ref:r=>this.updateToRevisionEl=r,part:"radio-to-revision"}),i("gxg-form-text",{ref:r=>this.revisionNumberEl=r,part:"revision-number"})))),i("gxg-container",{displayBorderTop:!0},i("div",{class:"actions"},i("gxg-button",{id:"button-ok",type:"primary-text-only",onClick:this.confirm,part:"gxg-button gxg-button--ok"},this._componentLocale.footer.btnOk),i("gxg-button",{id:"button-cancel",type:"outlined",onClick:this.cancel,part:"gxg-button gxg-button--cancel"},this._componentLocale.footer.btnCancel)))))}static get assetsDirs(){return["gx-ide-assets/team-dev-update-to-revision"]}get el(){return t(this)}};n.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}:host(.gx-ide-component){box-shadow:var(--box-shadow-01) !important;height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--font-weight-regular);font-size:var(--font-size-lg);line-height:1.6em;height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:6px;height:6px}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-main .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:6px;height:6px}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-overflow .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}:host{display:block;border:1px solid var(--gxg-border-color--regular);background-color:var(--color-background)}:host(.gxi-object-selector--shadow){border:none;box-shadow:var(--box-shadow-01)}.revision-number{display:flex;align-items:center;gap:var(--gx-ide-grid-row-gap)}.revision-number>:nth-child(2){width:auto !important}.actions{display:flex;justify-content:flex-end;align-items:center;gap:var(--gx-ide-grid-row-gap)}";export{n as gx_ide_team_dev_update_to_revision}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e,H as r,g as s}from"./p-976c3a09.js";import{L as o}from"./p-26957490.js";import{f as a,r as n}from"./p-72303355.js";const l=class{constructor(r){t(this,r),this.componentDidLoadEvent=i(this,"componentDidLoadEvent",7),this.loadDataCalledFirstTime=!1,this.markAllPendingToUpdateRows=()=>{this.chGridPendingForUpdateEl.markAllRows()},this.renderOptions=()=>e("gxg-container",{part:"options-container"},e("div",{class:"grid options-grid"},e("gxg-container",{displayBorder:!0,part:"options-update-from",containerTitle:this._componentLocale.options.updateFrom},e("div",{class:"grid options-update-from-grid"},e("gxg-text",{type:"text-regular"},this._componentLocale.options.updateFrom,":"),e("gxg-text",{type:"text-link",onClick:this.openServerCallback},this.updateFrom?this.updateFrom.serverUrl:""),e("gxg-text",{type:"text-regular"},this._componentLocale.options.knowledgeBase,":"),e("gxg-text",{type:"text-regular"},this.updateFrom?this.updateFrom.kbName:""),e("gxg-text",{type:"text-regular"},this._componentLocale.options.version,":"),e("gxg-text",{type:"text-regular"},this.updateFrom?this.updateFrom.versionName:""),e("gxg-text",{type:"text-regular"},this._componentLocale.options.lastFullUpdate,":"),e("gxg-text",{type:"text-regular"},this.updateFrom?a(this.updateFrom.lastFullUpdate):""))),e("gxg-container",{displayBorder:!0,part:"options-scope",containerTitle:this._componentLocale.options.scope},e("div",{class:"grid options-scope-grid"},e("gxg-text",{type:"text-regular"},this._componentLocale.options.objects,":"),e("gxg-text",{type:"text-regular"},e("span",{class:{bold:"partial"===this.objectScopeText}},this._componentLocale.options.scopeData.objects[this.objectScopeText.toLocaleLowerCase()])),e("gxg-button",{id:"button-scope-objects-change",type:"outlined",onClick:this.objectsScope,part:"gxg-button gxg-button--scope-objects-change"},this._componentLocale.options.changeBtn),e("gxg-text",{type:"text-regular"},this._componentLocale.options.revision,":"),e("gxg-text",{type:"text-regular"},e("span",{class:{bold:void 0!==this.revisionScopeText}},void 0===this.revisionScopeText?this._componentLocale.options.scopeData.revision.latest:this.revisionScopeText)),e("gxg-button",{id:"button-scope-revision-change",type:"outlined",onClick:this.revisionScope,part:"gxg-button gxg-button--scope-revision-change"},this._componentLocale.options.changeBtn),e("gxg-form-checkbox",{label:this._componentLocale.options.kbProperties,class:"align-center",part:"option-kb-properties"}))))),this.renderFilter=()=>e("gxg-container",{part:"filters-container"},e("div",{class:"filters-container-body with-gap"},e("div",{class:{grid:!0,"filter-grid":!0,hide:!this.showFilter}},e("gxg-form-text",{"label-position":"above",label:this._componentLocale.filter.pattern,ref:t=>this.filterPatternEl=t,part:"filter-pattern",onInput:this.loadData}),e("gxg-combo-box",{"disable-filter":!0,label:this._componentLocale.filter.type,disabled:!this.types,ref:t=>this.filterTypeEl=t,onValueChanged:this.loadData,part:"filter-type",value:this.types[0].id},n(this.types))),e("div",{class:{actions:!0,close:!this.showFilter}},e("gxg-button",{type:"secondary-icon-only",icon:"patterns/filters",onClick:this.toggleFilter,part:"gxg-button gxg-button--show-filter"}),e("gxg-button",{type:"secondary-icon-only",icon:"gemini-tools/reset",onClick:this.loadData,part:"gxg-button gxg-button--reload"})))),this.renderData=()=>e("gxg-container",{part:"data-container"},e("gxg-tabs",{id:"dataTabs",part:"data-tabs"},e("gxg-tab-bar",{slot:"tab-bar-container"},e("gxg-tab-button",{slot:"tab-bar","tab-label":this._componentLocale.tabs.pendingForUpdate,tab:"pendingForUpdate",key:"pendingForUpdate",isSelected:!0}),e("gxg-tab-button",{slot:"tab-bar","tab-label":this._componentLocale.tabs.ignoredObjects,tab:"ignoredObjects",key:"ignoredObjects"}),e("gxg-tab-button",{slot:"tab-bar","tab-label":this._componentLocale.tabs.results,tab:"results",key:"results",ref:t=>this.gxgTabButtonResultsEl=t})),e("gxg-tab",{tab:"pendingForUpdate",key:"pendingForUpdate",isSelected:!0},this.renderPendingForUpdate()),e("gxg-tab",{tab:"ignoredObjects",key:"ignoredObjects"},this.renderIgnoredObjects()),e("gxg-tab",{tab:"results",key:"results"},this.renderResults()))),this.renderPendingForUpdate=()=>e("gxg-grid",null,e("ch-grid",{"row-selection-mode":"none",ref:t=>this.chGridPendingForUpdateEl=t,part:"ch-grid-pending-for-updates",class:"no-border"},e("ch-grid-columnset",null,e("ch-grid-column",{settingable:!1,sortable:!1,"column-type":"rich",richRowSelector:!0,richRowSelectorMode:"mark"}),e("ch-grid-column",{settingable:!1,sortable:!1}),e("ch-grid-column",{settingable:!1,sortable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.name,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.type,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.description,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.modifiedOn,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.status,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.action,settingable:!1})),this.updateData.pendingForUpdate.map((t=>e("ch-grid-row",{rowid:t.id},e("ch-grid-cell",{"cell-type":"rich","row-selector":!0}),e("ch-grid-cell",null,e("gxg-icon",{type:t.typeIcon})),e("ch-grid-cell",null," ",this.renderIconState(t.state)," "),e("ch-grid-cell",null," ",t.name," "),e("ch-grid-cell",null," ",t.type," "),e("ch-grid-cell",null," ",t.description," "),e("ch-grid-cell",null,`${a(t.modifiedOn)}`),e("ch-grid-cell",null," ",t.status," "),e("ch-grid-cell",null," ",t.action," ")))))),this.renderIgnoredObjects=()=>e("gxg-grid",null,e("ch-grid",{"row-selection-mode":"multiple",ref:t=>this.chGridIgnoredObjectsEl=t,part:"ch-grid-ignored-objects",class:"no-border"},e("ch-grid-columnset",null,e("ch-grid-column",{settingable:!1,sortable:!1,size:"min-content"}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.name,settingable:!1,size:"1fr"}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.type,settingable:!1,size:"1fr"})),this.updateData.ignoredObjects.map((t=>e("ch-grid-row",{rowid:t.id},e("ch-grid-cell",null,e("gxg-icon",{type:t.typeIcon})),e("ch-grid-cell",null," ",t.name," "),e("ch-grid-cell",null," ",t.type," ")))))),this.renderResults=()=>e("gxg-grid",null,e("ch-grid",{"row-selection-mode":"multiple",ref:t=>this.chGridResultsEl=t,part:"ch-grid-results",class:"no-border"},e("ch-grid-columnset",null,e("ch-grid-column",{settingable:!1,sortable:!1,"column-type":"tree"}),e("ch-grid-column",{settingable:!1,sortable:!1}),e("ch-grid-column",{settingable:!1,sortable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.name,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.type,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.description,settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.notes,settingable:!1})),this.updateResultData.map((t=>e("ch-grid-row",{rowid:t.id},e("ch-grid-cell",null," ",this.renderIconResult(t.result)," "),e("ch-grid-cell",null,e("gxg-icon",{type:t.typeIcon})),e("ch-grid-cell",null," ",this.renderIconState(t.state)," "),e("ch-grid-cell",null," ",t.name," "),e("ch-grid-cell",null," ",t.type," "),e("ch-grid-cell",null," ",t.description," "),e("ch-grid-cell",null," ",t.notes," "),e("ch-grid-rowset",null,t.messages.map((t=>{let i;switch(t.type){case"info":i="text-alert-info";break;case"success":i="text-alert-success";break;case"warning":i="text-alert-warning";break;case"error":i="text-alert-error"}return e("ch-grid-rowset-empty",null,e("gxg-text",{type:i},t.text))})))))))),this.renderIconState=t=>{let i,r;switch(t){case"modified":i="gx-server/changes-commit-pending",r="primary-active";break;case"inserted":i="gx-server/new",r="success";break;case"deleted":i="gx-server/delete",r="error";break;case"conflicted":i="gx-server/conflict",r="warning"}return e("gxg-icon",{type:i,color:r})},this.renderIconResult=t=>{let i,r;switch(t){case"info":i="gemini-tools/notice",r="primary-active";break;case"success":i="gemini-tools/success",r="success";break;case"warning":i="gemini-tools/warning",r="warning";break;case"error":i="gemini-tools/error",r="error"}return e("gxg-icon",{type:i,color:r})},this.loadData=async()=>{const t={pattern:this.showFilter?this.filterPatternEl.value:null,type:this.showFilter?this.filterTypeEl.value:null};this.isLoading=!0,this.updateData=await this.loadCallback(t),this.isLoading=!1,this.loadDataCalledFirstTime||(this.loadDataCalledFirstTime=!0)},this.update=async()=>{if(this.updateCallback){const t=await this.chGridPendingForUpdateEl.getMarkedRows();this.updateCallback(t).then((t=>{this.updateResultData=t,this.gxgTabButtonResultsEl.tabButtonClick()}))}},this.toggleFilter=()=>{this.showFilter=!this.showFilter},this.objectsScope=()=>{this.objectsScopeCallback&&this.objectsScopeCallback().then((t=>{t&&(this.objectScopeText=t)}))},this.revisionScope=()=>{this.revisionScopeCallback&&this.revisionScopeCallback().then((t=>{this.revisionScopeText=t}))},this.addListeners=async()=>{this.updateData.pendingForUpdate&&this.chGridPendingForUpdateEl.addEventListener("contextmenu",(async t=>{t.preventDefault(),t.stopPropagation();const i=await this.chGridPendingForUpdateEl.getMarkedRows();this.gridContextMenuCallback(i,"update")})),this.chGridIgnoredObjectsEl.addEventListener("contextmenu",(async t=>{t.preventDefault(),t.stopPropagation();const i=await this.chGridIgnoredObjectsEl.getSelectedRows();this.gridContextMenuCallback(i,"ignored")})),this.chGridResultsEl.addEventListener("contextmenu",(async t=>{t.preventDefault(),t.stopPropagation();const i=await this.chGridResultsEl.getMarkedRows();this.gridContextMenuCallback(i,"results")}))},this.pendingForUpdatesRowMarkingChangedHandler=async t=>{if(this.chGridPendingForUpdateEl.removeEventListener("rowMarkingChanged",this.pendingForUpdatesRowMarkingChangedHandler),this.chGridPendingForUpdateEl){const i=t.detail.addedRowsId,e=t.detail.removedRowsId,r=await this.pendingItemCheckedCallback({itemsChecked:i,itemsUnchecked:e});void 0===r?await this.revertPendingCommitsCheckboxes(i,e):await this.togglePendingCommitsCheckboxes(r),this.chGridPendingForUpdateEl.addEventListener("rowMarkingChanged",this.pendingForUpdatesRowMarkingChangedHandler)}this.chGridPendingForUpdateEl.addEventListener("rowMarkingChanged",this.pendingForUpdatesRowMarkingChangedHandler)},this.togglePendingCommitsCheckboxes=async t=>{if(this.chGridPendingForUpdateEl){const i=t.itemsToCheck,e=t.itemsToUncheck;for(const t of i)await this.chGridPendingForUpdateEl.markRow(t,!0);for(const t of e)await this.chGridPendingForUpdateEl.markRow(t,!1)}},this.revertPendingCommitsCheckboxes=async(t,i)=>{if(this.chGridPendingForUpdateEl){for(const i of t)await this.chGridPendingForUpdateEl.markRow(i,!1);for(const t of i)await this.chGridPendingForUpdateEl.markRow(t,!0)}},this.isLoading=!1,this.objectScopeText="all",this.openTab="pending",this.revisionScopeText=void 0,this.showFilter=!1,this.updateData={pendingForUpdate:[],ignoredObjects:[]},this.updateResultData=[],this.confirmCallback=void 0,this.gridContextMenuCallback=void 0,this.loadCallback=void 0,this.objectsScopeCallback=void 0,this.openServerCallback=void 0,this.pendingItemCheckedCallback=void 0,this.revisionScopeCallback=void 0,this.types=void 0,this.updateCallback=void 0,this.updateFrom=void 0}async componentWillLoad(){this._componentLocale=await o.getComponentStrings(this.el),this.componentDidLoadEvent.emit(!0)}async componentDidLoad(){await this.loadData(),this.addListeners()}async componentDidRender(){this.loadDataCalledFirstTime&&(await this.markAllPendingToUpdateRows(),this.chGridPendingForUpdateEl.addEventListener("rowMarkingChanged",this.pendingForUpdatesRowMarkingChangedHandler),this.loadDataCalledFirstTime=!1)}async validate(){return!0}render(){return e(r,{class:"gx-ide-component"},e("div",{class:"gx-ide-main-wrapper gx-ide-overflow"},this.renderOptions(),this.renderFilter(),this.renderData(),e("gxg-container",{displayBorderTop:!0},e("div",{class:"align-center with-gap actions"},e("gxg-button",{id:"button-update",type:"primary-text-only",onClick:this.update,part:"gxg-button gxg-button--update",disabled:this.isLoading},this._componentLocale.footer.btnUpdate)))))}static get assetsDirs(){return["gx-ide-assets/team-dev-update"]}get el(){return s(this)}};l.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}:host(.gx-ide-component){box-shadow:var(--box-shadow-01) !important;height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--font-weight-regular);font-size:var(--font-size-lg);line-height:1.6em;height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:6px;height:6px}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-main .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:6px;height:6px}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-overflow .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}:host{display:block;border:1px solid var(--gxg-border-color--regular);background-color:var(--color-background)}:host(.gxi-object-selector--shadow){border:none;box-shadow:var(--box-shadow-01)}.options-grid{grid-template-columns:1fr auto}.options-grid .options-update-from-grid{grid-template-columns:auto 1fr;grid-row-gap:0}.options-grid .options-scope-grid{grid-template-columns:auto 1fr auto}.options-grid .options-scope-grid>:nth-child(7){grid-area:3/1/4/4}.flex{display:flex;flex-direction:row;align-items:center}.with-gap{gap:var(--gx-ide-grid-row-gap)}.hide{display:none !important}.filters-container-body{width:100%;display:flex;align-items:flex-end;justify-content:space-between}.filters-container-body .filter-grid{flex:1;grid-template-columns:repeat(2, 1fr)}.filters-container-body .actions{display:flex;justify-content:flex-end;align-items:center}.filters-container-body .actions.close{width:100%}.data-grid{grid-template-columns:repeat(3, 1fr)}.data-grid>:nth-child(1){grid-area:1/1/2/2}.data-grid>:nth-child(2){grid-area:1/2/2/4}.data-panel-grid{grid-template-columns:repeat(2, 1fr)}.data-preview img{max-width:100%}.data-max-height{max-height:300px;overflow-y:auto}.actions{justify-content:flex-end}.no-border{border:0}.bold{font-weight:bold}";export{l as gx_ide_team_dev_update}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as o,H as e,g as r}from"./p-976c3a09.js";import{L as n}from"./p-26957490.js";const a=class{constructor(e){t(this,e),this.componentDidLoadEvent=i(this,"componentDidLoadEvent",7),this.handleKeyDownEvent=t=>{t?document.addEventListener("keydown",this.keyDownEventHandler):document.removeEventListener("keydown",this.keyDownEventHandler)},this.keyDownEventHandler=t=>{console.log(t.detail)},this.renderObjects=()=>o("gxg-grid",null,o("ch-grid",{"row-selection-mode":"multiple",ref:t=>this.chGridEl=t,part:"ch-grid-objects"},o("ch-grid-columnset",null,o("ch-grid-column",{columnName:"",settingable:!1,sortable:!1}),o("ch-grid-column",{columnName:this._componentLocale.tableHead.name,settingable:!1}),o("ch-grid-column",{columnName:this._componentLocale.tableHead.type,settingable:!1}),o("ch-grid-column",{columnName:this._componentLocale.tableHead.description,settingable:!1}),o("ch-grid-column",{columnName:this._componentLocale.tableHead.modifiedOn,settingable:!1})),this.selection.map((t=>o("ch-grid-row",{rowid:t.id},o("ch-grid-cell",null,o("gxg-icon",{type:t.typeIcon})),o("ch-grid-cell",null," ",t.name," "),o("ch-grid-cell",null," ",t.type," "),o("ch-grid-cell",null," ",t.description," "),o("ch-grid-cell",null,`${t.modifiedOn.toISOString().slice(0,10)}`)))))),this.getObjects=()=>{this.addCallback().then((t=>{(null==t?void 0:t.length)>0&&(this.selection=[...this.selection,...t],this.selectedObjectsIds=[],this.deselectAll())}))},this.removeObjects=()=>{this.selection=this.selection.filter((t=>!this.selectedObjectsIds.includes(t.id))),this.selectedObjectsIds=[],this.deselectAll()},this.confirm=()=>{this.confirmCallback(this.selectedObjectsIds)},this.cancel=()=>{this.cancelCallback()},this.deselectAll=()=>{this.chGridEl.selectAllRows(!1)},this.listenChanges=()=>{this.chGridEl.addEventListener("selectionChanged",(t=>{this.selectedObjectsIds=t.detail.rowsId}))},this.addCallback=void 0,this.cancelCallback=void 0,this.confirmCallback=void 0,this.selection=[],this.selectedObjectsIds=[]}async componentWillLoad(){this._componentLocale=await n.getComponentStrings(this.el),this.componentDidLoadEvent.emit(!0),this.handleKeyDownEvent(!0)}componentDidLoad(){this.listenChanges()}keyDownHandler(t){document.activeElement===this.el&&"Delete"===t.key&&this.removeObjects()}async validate(){return!0}render(){return o(e,{class:{"gxi-team-dev-update-partial-selection":!0}},o("div",{class:"main-wrapper"},o("gxg-container",{containerTitle:this._componentLocale.title},o("div",{class:"top-actions"},o("gxg-button",{id:"button-add",type:"secondary-icon-only",icon:"gemini-tools/add-circle",onClick:this.getObjects,part:"gxg-button gxg-button--add"}),o("gxg-button",{id:"button-remove",type:"secondary-icon-only",icon:"gemini-tools/minus-circle",onClick:this.removeObjects,part:"gxg-button gxg-button--remove"})),this.renderObjects(),o("gxg-container",{displayBorderTop:!0},o("div",{class:"grid actions"},o("div",null,o("gxg-button",{id:"button-clear",type:"primary-text-only",onClick:this.deselectAll,part:"gxg-button gxg-button--clear"},this._componentLocale.footer.btnClear)),o("div",null,o("gxg-button",{id:"button-ok",type:"primary-text-only",onClick:this.confirm,part:"gxg-button gxg-button--ok"},this._componentLocale.footer.btnOk),o("gxg-button",{id:"button-cancel",type:"outlined",onClick:this.cancel,part:"gxg-button gxg-button--cancel"},this._componentLocale.footer.btnCancel)))))))}static get assetsDirs(){return["gx-ide-assets/team-dev-update-partial-selection"]}get el(){return r(this)}};a.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}:host(.gx-ide-component){box-shadow:var(--box-shadow-01) !important;height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--font-weight-regular);font-size:var(--font-size-lg);line-height:1.6em;height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:6px;height:6px}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-main .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:6px;height:6px}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-overflow .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}:host{display:block;border:1px solid var(--gxg-border-color--regular);background-color:var(--color-background)}:host(.gxi-object-selector--shadow){border:none;box-shadow:var(--box-shadow-01)}.top-actions{display:flex;align-items:center;justify-content:flex-end}.actions{grid-template-columns:repeat(2, 1fr)}.actions>*{display:flex;flex-direction:row;gap:var(--gx-ide-grid-row-gap)}.actions>*:nth-child(2){justify-content:flex-end}";export{a as gx_ide_team_dev_update_partial_selection}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e,H as o,g as a}from"./p-976c3a09.js";import{L as l}from"./p-26957490.js";import{f as s,r}from"./p-72303355.js";const n=class{constructor(o){t(this,o),this.componentDidLoadEvent=i(this,"componentDidLoadEvent",7),this.loadDataCalledFirstTime=!1,this.markAllPendingCommitsRows=()=>{this.chGridPendingCommitsEl.markAllRows()},this.togglePendingCommitsCheckboxes=async t=>{if(this.chGridPendingCommitsEl){const i=t.itemsToCheck,e=t.itemsToUncheck;for(const t of i)await this.chGridPendingCommitsEl.markRow(t,!0);for(const t of e)await this.chGridPendingCommitsEl.markRow(t,!1)}},this.revertPendingCommitsCheckboxes=async(t,i)=>{if(this.chGridPendingCommitsEl){for(const i of t)await this.chGridPendingCommitsEl.markRow(i,!1);for(const t of i)await this.chGridPendingCommitsEl.markRow(t,!0)}},this.renderIconState=t=>{let i,o;switch(t){case"inserted":i="gx-server/new",o="success";break;case"modified":i="gx-server/changes-commit-pending",o="primary-active";break;case"deleted":i="gx-server/delete",o="error";break;case"conflicted":i="gx-server/conflict",o="warning"}return e("gxg-icon",{type:i,color:o})},this.pendingCommitsRowMarkingChangedHandler=async t=>{if(this.chGridPendingCommitsEl.removeEventListener("rowMarkingChanged",this.pendingCommitsRowMarkingChangedHandler),this.chGridPendingCommitsEl){const i=t.detail.addedRowsId,e=t.detail.removedRowsId,o=await this.pendingItemCheckedCallback({itemsChecked:i,itemsUnchecked:e});void 0===o?await this.revertPendingCommitsCheckboxes(i,e):await this.togglePendingCommitsCheckboxes(o),this.chGridPendingCommitsEl.addEventListener("rowMarkingChanged",this.pendingCommitsRowMarkingChangedHandler)}},this.objectsOnContextMenuCallbackHandler=t=>async i=>{i.preventDefault(),i.stopPropagation();let e=[];"commit"===t?e=i.detail.selectedRowsId:"ignored"===t&&(e=await this.chGridIgnoredObjectsEl.getSelectedRows()),this.objectsContextMenuCallback&&await this.objectsContextMenuCallback(t,{selection:e,clientX:i.detail.clientX,clientY:i.detail.clientY})},this.gridOnSelectionChangedCallbackHandler=t=>async i=>{this.selectCallback&&await this.selectCallback(t,i.detail.rowsId)},this.renderPendingCommitsGrid=()=>e("gxg-grid",null,e("ch-grid",{rowSelectionMode:"multiple",ref:t=>this.chGridPendingCommitsEl=t,part:"ch-grid-pending-commits",class:"no-border",onRowContextMenu:this.objectsOnContextMenuCallbackHandler("commit"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("commit")},e("ch-grid-columnset",null,e("ch-grid-column",{columnType:"rich",richRowSelector:!0,richRowSelectorMode:"mark",settingable:!1,sortable:!1,size:"auto"}),e("ch-grid-column",{columnName:"State",settingable:!1,sortable:!1,size:"auto"}),e("ch-grid-column",{settingable:!1,sortable:!1,size:"auto"}),e("ch-grid-column",{sortable:!0,columnName:"Name",settingable:!1,size:"auto"}),e("ch-grid-column",{sortable:!0,columnName:"Type",settingable:!1,size:"auto"}),e("ch-grid-column",{columnName:"Description",settingable:!1,size:"auto"}),e("ch-grid-column",{sortable:!0,columnName:"Modified On",settingable:!1}),e("ch-grid-column",{columnName:"Module",settingable:!1,size:"auto"}),e("ch-grid-column",{columnName:"Local State",settingable:!1,size:"auto"}),e("ch-grid-column",{columnName:"Last Synchronized",settingable:!1,size:"150px"}),e("ch-grid-column",{sortable:!0,columnName:"User",settingable:!1,size:"auto"})),this.pendingCommits.map((t=>e("ch-grid-row",{rowid:t.id},e("ch-grid-cell",{"cell-type":"rich","row-selector":!0}),e("ch-grid-cell",null," ",this.renderIconState(t.state)," "),e("ch-grid-cell",null,e("gxg-icon",{color:"auto",type:t.iconType})),e("ch-grid-cell",null," ",t.name," "),e("ch-grid-cell",null," ",t.type," "),e("ch-grid-cell",null," ",t.description," "),e("ch-grid-cell",null,`${s(t.modifiedOn)}`),e("ch-grid-cell",null," ",t.module," "),e("ch-grid-cell",null," ",t.localState," "),e("ch-grid-cell",null,`${s(t.lastSynchronized)}`),e("ch-grid-cell",null," ",t.user," ")))))),this.renderIgnoredObjectsGrid=()=>e("gxg-grid",null,e("ch-grid",{rowSelectionMode:"multiple",ref:t=>this.chGridIgnoredObjectsEl=t,part:"ch-grid-pending-commits",onRowContextMenu:this.objectsOnContextMenuCallbackHandler("ignored"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("ignored")},e("ch-grid-columnset",null,e("ch-grid-column",{columnName:"",settingable:!1}),e("ch-grid-column",{columnName:"TypeIcon",settingable:!1}),e("ch-grid-column",{columnName:"Name",settingable:!1,sortable:!0}),e("ch-grid-column",{columnName:"Type",settingable:!1}),e("ch-grid-column",{columnName:"Description",settingable:!1}),e("ch-grid-column",{columnName:"Modified On",settingable:!1}),e("ch-grid-column",{columnName:"Module",settingable:!1}),e("ch-grid-column",{columnName:"Local State",settingable:!1}),e("ch-grid-column",{columnName:"Last Synchronized",settingable:!1}),e("ch-grid-column",{columnName:"User",settingable:!1})),this.ignoredObjects.map((t=>e("ch-grid-row",{rowid:t.id,selected:!0},e("ch-grid-cell",null," ",this.renderIconState(t.state)," "),e("ch-grid-cell",null,e("gxg-icon",{color:"auto",type:t.iconType})),e("ch-grid-cell",null," ",t.name," "),e("ch-grid-cell",null," ",t.type," "),e("ch-grid-cell",null," ",t.description," "),e("ch-grid-cell",null,`${s(t.modifiedOn)}`),e("ch-grid-cell",null," ",t.module," "),e("ch-grid-cell",null," ",t.localState," "),e("ch-grid-cell",null,`${s(t.lastSynchronized)}`),e("ch-grid-cell",null," ",t.user," ")))))),this.getRecentCommentHandler=async()=>{if(this.getRecentCommentCallback){const t=await this.getRecentCommentCallback();t&&(this.comment=t)}},this.commitCallbackHandler=async()=>{const t=this.commitComment.value;this.chGridPendingCommitsEl.getMarkedRows().then((async i=>{await this.commitCallback(i,t)}))},this.loadData=async()=>{const t={pattern:this.patternEl.value,changeSet:this.changeSetEl.value,folder:this.foldersEl.value,category:this.categoriesEl.value,type:this.typesEl.value};return await this.loadCallback(t).then((async({pending:t,ignored:i})=>{this.pendingCommits=t,this.ignoredObjects=i}))},this.toggleFiltersHandler=()=>{this.filtersHidden=!this.filtersHidden},this.filtersHidden=!0,this.comment="",this.pendingCommits=[],this.ignoredObjects=[],this.changeSet=void 0,this.types=void 0,this.folders=void 0,this.categories=void 0,this.getRecentCommentCallback=void 0,this.loadCallback=void 0,this.commitCallback=void 0,this.selectCallback=void 0,this.pendingItemCheckedCallback=void 0,this.objectsContextMenuCallback=void 0}async componentWillLoad(){this._componentLocale=await l.getComponentStrings(this.el)}async componentDidLoad(){await this.loadData(),this.loadDataCalledFirstTime=!0,this.componentDidLoadEvent.emit(!0)}async componentDidRender(){this.loadDataCalledFirstTime&&(await this.markAllPendingCommitsRows(),this.chGridPendingCommitsEl.addEventListener("rowMarkingChanged",this.pendingCommitsRowMarkingChangedHandler),this.loadDataCalledFirstTime=!1)}async reload(){this.loadData()}render(){return e(o,{class:"gx-ide-component"},e("div",{class:"gx-ide-main-wrapper gx-ide-overflow"},e("gxg-container",null,e("header",{class:"header grid"},e("gxg-form-textarea",{id:"gxg-textarea",height:"100px",label:this._componentLocale.topMenu.commentLabel,value:this.comment,ref:t=>this.commitComment=t,placeholder:this._componentLocale.topMenu.commentPlaceholder,part:"comment"}),e("gxg-button",{class:"header-button",type:"outlined",part:"location",onClick:this.getRecentCommentHandler},this._componentLocale.topMenu.recentCommentsButton))),e("main",{class:"main"},e("gxg-container",{fieldset:!0,noContentPadding:!!this.filtersHidden},e("div",{class:"grid second-grid"},e("div",{class:"actions-row grid"},e("gxg-form-text",{class:this.filtersHidden?"hidden":null,"disable-filter":!0,label:this._componentLocale.filtersMenu.patternLabel,labelPosition:"start",value:"",ref:t=>this.patternEl=t,"display-validation-styles":!0,"display-validation-message":!0,part:"pattern",onInput:this.loadData}),e("div",{class:"action-buttons",slot:"tab-bar"},e("gxg-button",{onClick:this.toggleFiltersHandler,type:"secondary-icon-only",icon:"patterns/filters",part:"gxg-button gxg-button--show-filter"}),e("gxg-button",{type:"secondary-icon-only",icon:"gemini-tools/reset",onClick:this.loadData,part:"gxg-button gxg-button--reload"}))),e("div",{class:"filters-grid grid "+(this.filtersHidden?"hidden":null)},e("div",{class:"first-row grid"},e("gxg-combo-box",{labelPosition:"start",label:this._componentLocale.filtersMenu.changesetLabel,value:this.changeSet[0].id,ref:t=>this.changeSetEl=t,part:"change-set","display-validation-styles":!0,"display-validation-message":!0,onValueChanged:this.loadData},r(this.changeSet)),e("gxg-combo-box",{labelPosition:"start",label:this._componentLocale.filtersMenu.typeLabel,value:this.types[0].id,ref:t=>this.typesEl=t,part:"type",onValueChanged:this.loadData},r(this.types))),e("div",{class:"second-row grid"},e("gxg-combo-box",{labelPosition:"start",label:this._componentLocale.filtersMenu.folderLabel,value:this.folders[0].id,ref:t=>this.foldersEl=t,part:"folder","display-validation-styles":!0,"display-validation-message":!0,onValueChanged:this.loadData},r(this.folders)),e("gxg-combo-box",{labelPosition:"start",label:this._componentLocale.filtersMenu.categoryLabel,value:this.categories[0].id,ref:t=>this.categoriesEl=t,part:"categories",onValueChanged:this.loadData},r(this.categories)))))),e("gxg-container",null,e("gxg-tabs",{height:"100%",position:"top",class:"gxg-tabs"},e("gxg-tab-bar",{slot:"tab-bar-container"},e("gxg-tab-button",{slot:"tab-bar","tab-label":`${this._componentLocale.tabs.pendingCommits} (${this.pendingCommits.length})`,tab:"pending-commits","is-selected":!0}),e("gxg-tab-button",{slot:"tab-bar","tab-label":`${this._componentLocale.tabs.ignoredObjects} (${this.ignoredObjects.length})`,tab:"ignored-objects"})),e("gxg-tab",{tab:"pending-commits","no-padding":!0},this.renderPendingCommitsGrid()),e("gxg-tab",{tab:"ignored-objects","no-padding":!0},this.renderIgnoredObjectsGrid())),e("gxg-button",{slot:"footer",type:"primary-text-only",onClick:this.commitCallbackHandler,part:"commit-button"},this._componentLocale.footer.commitButton)))))}static get assetsDirs(){return["gx-ide-assets/team-dev-commit"]}get el(){return a(this)}};n.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}:host(.gx-ide-component){box-shadow:var(--box-shadow-01) !important;height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--font-weight-regular);font-size:var(--font-size-lg);line-height:1.6em;height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:6px;height:6px}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-main .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:6px;height:6px}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-overflow .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}:host{display:block}.main-wrapper{width:100%}.gxg-tabs{margin-top:0;box-shadow:none}.header{grid-template-columns:4fr auto}.header .header-button{height:fit-content}.second-grid{grid-template-rows:1fr auto}.second-grid .actions-row{grid-template-columns:1fr auto}.action-buttons{justify-self:flex-end}.hidden{display:none}.filters-grid{grid-template-rows:repeat(2, 1fr)}.filters-grid .first-row{grid-template-columns:repeat(2, 1fr)}.filters-grid .second-row{grid-template-columns:repeat(2, 1fr)}";export{n as gx_ide_team_dev_commit}