@genexus/genexus-ide-ui 0.0.53 → 0.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/gx-ide-new-object.cjs.entry.js +18 -19
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js +2 -32
- package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +3 -3
- package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +4 -5
- package/dist/cjs/gx-ide-ww-images.cjs.entry.js +4 -2
- package/dist/cjs/helpers-9523495a.js +34 -0
- package/dist/collection/common/helpers.js +1 -1
- package/dist/collection/components/new-object/gx-ide-assets/new-object/langs/new-object.lang.en.json +3 -2
- package/dist/collection/components/new-object/new-object.js +18 -19
- package/dist/collection/components/object-selector/object-selector.js +1 -1
- package/dist/collection/components/team-dev-commit/team-dev-commit.js +2 -2
- package/dist/collection/components/team-dev-update/team-dev-update.js +4 -5
- package/dist/collection/components/ww-images/ww-images.css +1 -1
- package/dist/collection/components/ww-images/ww-images.js +3 -1
- package/dist/components/gx-ide-new-object.js +18 -19
- package/dist/components/gx-ide-object-selector.js +2 -32
- package/dist/components/gx-ide-team-dev-commit.js +2 -2
- package/dist/components/gx-ide-team-dev-update.js +4 -5
- package/dist/components/gx-ide-ww-images.js +4 -2
- package/dist/components/helpers2.js +32 -0
- package/dist/esm/gx-ide-new-object.entry.js +18 -19
- package/dist/esm/gx-ide-object-selector.entry.js +2 -32
- package/dist/esm/gx-ide-team-dev-commit.entry.js +2 -2
- package/dist/esm/gx-ide-team-dev-update.entry.js +4 -5
- package/dist/esm/gx-ide-ww-images.entry.js +4 -2
- package/dist/esm/helpers-b99024f5.js +32 -0
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/new-object/langs/new-object.lang.en.json +3 -2
- package/dist/genexus-ide-ui/p-462a8f83.entry.js +1 -0
- package/dist/genexus-ide-ui/p-522ebadf.entry.js +1 -0
- package/dist/genexus-ide-ui/p-9a6cb543.entry.js +1 -0
- package/dist/genexus-ide-ui/p-c63d5b08.js +1 -0
- package/dist/genexus-ide-ui/p-cef1a182.entry.js +1 -0
- package/dist/genexus-ide-ui/p-ffddd3ad.entry.js +1 -0
- package/dist/types/components/new-object/new-object.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/format-date-c32a19bd.js +0 -15
- package/dist/components/format-date.js +0 -13
- package/dist/esm/format-date-3c7cead5.js +0 -13
- package/dist/genexus-ide-ui/p-0516b501.entry.js +0 -1
- package/dist/genexus-ide-ui/p-8866ca9d.entry.js +0 -1
- package/dist/genexus-ide-ui/p-9794ba9b.entry.js +0 -1
- package/dist/genexus-ide-ui/p-98906eb4.js +0 -1
- package/dist/genexus-ide-ui/p-a86a5a89.entry.js +0 -1
- package/dist/genexus-ide-ui/p-aab4d172.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as t,h as e,H as l,g as s}from"./p-976c3a09.js";import{L as o}from"./p-26957490.js";import{r as a}from"./p-11af125f.js";import{f as r}from"./p-c63d5b08.js";import{g as n}from"./p-c6a7b93c.js";import{F as d}from"./p-6010dc9d.js";const h=class{constructor(l){i(this,l),this.componentDidRenderEvent=t(this,"componentDidRenderEvent",7),this.componentDidLoadEvent=t(this,"componentDidLoadEvent",7),this.renderFilter=()=>{var i,t;return e("gxg-container",{displayBorderBottom:!0,containerTitle:this._componentLocale.filter.title,part:"filters-container"},e("div",{class:"grid filter-grid"},e("gxg-form-text",{"label-position":"above",label:this._componentLocale.filter.pattern,ref:i=>this.filterPatternEl=i,value:this.patternValue,part:"filter-pattern"}),e("gxg-combo-box",{"disable-filter":!0,label:this._componentLocale.filter.type,value:this.defaultType,disabled:!this.types,"display-validation-styles":!0,"display-validation-message":!0,ref:i=>this.filterTypeEl=i,part:"filter-type"},a(null!==(i=this.types)&&void 0!==i?i:[])),e("gxg-combo-box",{"disable-filter":!0,label:this._componentLocale.filter.category,value:this.defaultCategory,disabled:!this.categories,"display-validation-styles":!0,"display-validation-message":!0,ref:i=>this.filterCategoryEl=i,part:"filter-category"},a(null!==(t=this.categories)&&void 0!==t?t:[])),e("gx-ide-entity-selector",{label:this._componentLocale.filter.module,"label-position":"above",value:this.defaultModule,defaultValue:this.defaultModule,selectEntityCallback:this.selectModuleCallback,ref:i=>this.filterModuleEl=i}),e("div",{class:"flex with-gap"},e("gxg-form-checkbox",{label:this._componentLocale.filter.modified,class:"align-center",ref:i=>this.filterModifiedEl=i,part:"filter-modified"}),e("gxg-combo-box",{class:{hide:!this.filterModified},"disable-filter":!0,value:this.filterAfterType,"display-validation-styles":!0,"display-validation-message":!0,ref:i=>this.filterAfterTypeEl=i,part:"filter-after-type"},a([{id:d.NONE,label:this._componentLocale.filter.afterNone,value:d.NONE},{id:d.DATE_TIME,label:this._componentLocale.filter[d.DATE_TIME],value:d.DATE_TIME},{id:d.IMPORT,label:this._componentLocale.filter[d.IMPORT],value:d.IMPORT},{id:d.LAST_BUILD,label:this._componentLocale.filter[d.LAST_BUILD],value:d.LAST_BUILD}])),e("gxg-form-text",{class:{hide:!this.filterModified},"label-position":"start",label:this._componentLocale.filter.user,"max-width":"150px",ref:i=>this.filterUserEl=i,part:"filter-user"}),e("div",{class:{flex:!0,hide:!this.filterModified||this.filterAfterType!==d.DATE_TIME},part:"filter-datetime"},e("gxg-label",{"label-position":"start"},this._componentLocale.filter.dateTime),e("gxg-date-picker",{ref:i=>this.filterModifiedDateEl=i})))))},this.renderObjects=()=>e("gxg-grid",{"ellipsis-cell-wrapper":!0,noBorder:!0},e("ch-grid",{"row-selection-mode":this.multiSelection?"multiple":"single",ref:i=>this.chGridEl=i,onKeyDown:this.chGridKeyDownHandler,part:"ch-grid-objects"},e("ch-grid-columnset",null,e("ch-grid-column",{"column-name-position":"text",settingable:!1,size:n.colSize.auto}),e("ch-grid-column",{"column-name":this._componentLocale.tableHead.name,"column-name-position":"text",settingable:!1,size:n.colSize.auto}),e("ch-grid-column",{"column-name":this._componentLocale.tableHead.type,"column-name-position":"text",settingable:!1,size:n.colSize.auto}),e("ch-grid-column",{"column-name":this._componentLocale.tableHead.module,"column-name-position":"text",settingable:!1,size:n.colSize.auto}),e("ch-grid-column",{"column-name":this._componentLocale.tableHead.description,"column-name-position":"text",settingable:!1,size:n.colSize.common}),e("ch-grid-column",{"column-name":this._componentLocale.tableHead.modifiedDate,"column-name-position":"text",settingable:!1,size:n.colSize.auto}),e("ch-grid-column",{"column-name":this._componentLocale.tableHead.importDate,"column-name-position":"text",settingable:!1,size:n.colSize.auto})),this.objects.map((i=>e("ch-grid-row",{rowid:i.id,onDblClick:this.openSelectionCallbackHandler},e("ch-grid-cell",null,e("span",{class:"cell-wrapper"},e("gxg-icon",{type:i.icon,color:"auto"}))),e("ch-grid-cell",null,e("span",{class:"cell-wrapper"}," ",i.name," ")),e("ch-grid-cell",null,e("span",{class:"cell-wrapper"},i.type)),e("ch-grid-cell",null,e("span",{class:"cell-wrapper"},i.module)),e("ch-grid-cell",null,e("span",{class:"cell-wrapper"},i.description)),e("ch-grid-cell",null,e("span",{class:"cell-wrapper"},`${r(i.modifiedDate,"date-time")}`)),e("ch-grid-cell",null,e("span",{class:"cell-wrapper"},`${r(i.importDate,"date-time")}`))))))),this.getObjects=()=>{var i,t,e,l,s,o,a,r;const n=this.filterModifiedEl.checked,h=this.filterAfterTypeEl.value,c=null===(t=null===(i=this.filterUserEl)||void 0===i?void 0:i.value)||void 0===t?void 0:t.trim(),g={pattern:null===(e=this.filterPatternEl)||void 0===e?void 0:e.value,type:null===(l=this.filterTypeEl)||void 0===l?void 0:l.value,category:null===(s=this.filterCategoryEl)||void 0===s?void 0:s.value,module:null===(a=null===(o=this.filterModuleEl)||void 0===o?void 0:o.value)||void 0===a?void 0:a.id,modifiedAfter:n&&h?h:null,modifiedBy:n&&c?c:null,modifiedDate:n&&h===d.DATE_TIME?null===(r=this.filterModifiedDateEl)||void 0===r?void 0:r.value:null};this.loadCallback(g).then((i=>{this.objects=i,this.selectedObjectsIds=[],this.deselectAll()}))},this.openSelectionCallbackHandler=i=>{i.stopPropagation(),this.openSelectionCallback(this.selectedObjectsIds)},this.cancelCallbackHandle=()=>{this.cancelCallback()},this.selectAll=()=>{this.chGridEl.selectAllRows()},this.deselectAll=()=>{this.chGridEl.selectAllRows(!1)},this.newObjectCallbackHandle=()=>{this.newObjectCallback()},this.listenChanges=async()=>{this.filterPatternEl.addEventListener("input",(()=>{this.getObjects()})),this.filterTypeEl.addEventListener("valueChanged",(()=>{this.getObjects()})),this.filterCategoryEl.addEventListener("valueChanged",(()=>{this.getObjects()})),this.filterModuleEl.addEventListener("valueChanged",(()=>{this.getObjects()})),this.filterModifiedEl.addEventListener("change",(i=>{this.filterModified=i.detail.value,this.getObjects()})),this.filterAfterTypeEl.addEventListener("valueChanged",(()=>{this.filterAfterType=this.filterAfterTypeEl.value,this.getObjects()})),this.filterUserEl.addEventListener("input",(()=>{this.getObjects()})),this.filterModifiedDateEl.addEventListener("valueChanged",(()=>{this.getObjects()})),this.chGridEl.addEventListener("selectionChanged",(i=>{this.selectedObjectsIds=i.detail.rowsId}))},this.chGridKeyDownHandler=i=>{"Enter"===i.key&&this.openSelectionCallbackHandler(i)},this.hostKeyPressHandler=i=>{"Enter"===i.key&&i.stopPropagation()},this.filterAfterType="",this.filterModified=!1,this.objects=[],this.selectedObjectsIds=[],this.multiSelection=!0,this.patternValue=void 0,this.types=void 0,this.defaultType=void 0,this.categories=void 0,this.defaultCategory=void 0,this.defaultModule=void 0,this.selectModuleCallback=void 0,this.cancelCallback=void 0,this.loadCallback=void 0,this.newObjectCallback=void 0,this.openSelectionCallback=void 0}async componentWillLoad(){this._componentLocale=await o.getComponentStrings(this.el),this.componentDidLoadEvent.emit(!0)}componentDidLoad(){this.listenChanges(),this.getObjects()}componentDidRender(){this.componentDidRenderEvent.emit(this._componentLocale.componentName)}async validate(){return!0}render(){return e(l,{class:"gx-ide-component",onKeyPress:this.hostKeyPressHandler},e("div",{class:"gx-ide-main-wrapper"},this.renderFilter(),this.renderObjects(),e("gxg-container",{displayBorderTop:!0},e("div",{class:"grid objects-count"},e("gxg-text",{class:"align-end",part:"objects-selected"},`${this.selectedObjectsIds.length} ${this._componentLocale.objCount.selected}`),e("gxg-text",{class:"align-end",part:"objects-matching"},`${this.objects.length} ${this._componentLocale.objCount.matching}`))),e("gxg-container",{displayBorderTop:!0},e("div",{class:"grid actions"},e("div",null,e("gxg-button",{id:"button-select-all",type:"primary-text-only",onClick:this.selectAll,part:"gxg-button gxg-button--select-all"},this._componentLocale.footer.btnSelectAll),e("gxg-button",{id:"button-new",type:"primary-text-only",onClick:this.newObjectCallbackHandle,part:"gxg-button gxg-button--new"},this._componentLocale.footer.btnNew)),e("div",null,e("gxg-button",{id:"button-ok",type:"primary-text-only",onClick:this.openSelectionCallbackHandler,part:"gxg-button gxg-button--ok"},this._componentLocale.footer.btnConfirm),e("gxg-button",{id:"button-cancel",type:"outlined",onClick:this.cancelCallbackHandle,part:"gxg-button gxg-button--cancel"},this._componentLocale.footer.btnCancel))))))}static get assetsDirs(){return["gx-ide-assets/object-selector"]}get el(){return s(this)}};h.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.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}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--gray-01)}gxg-tabs{box-shadow:none}: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)}.filter-grid{grid-template-columns:repeat(2, 1fr)}.filter-grid *:nth-child(5){grid-area:3/1/4/3}.flex{display:flex;flex-direction:row;align-items:center}.with-gap{gap:var(--gx-ide-grid-row-gap)}.hide{display:none}.objects-count{grid-template-columns:repeat(2, 1fr)}.objects-count *:nth-child(2){justify-content:flex-end;align-items:flex-start}.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{h as gx_ide_object_selector}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,H as r,g as s}from"./p-976c3a09.js";import{L as a}from"./p-26957490.js";import{g as o}from"./p-c6a7b93c.js";import{r as l}from"./p-11af125f.js";import{f as n}from"./p-c63d5b08.js";const c=class{constructor(r){t(this,r),this.componentDidLoadEvent=e(this,"componentDidLoadEvent",7),this.componentDidRenderEvent=e(this,"componentDidRenderEvent",7),this.loadDataCalledFirstTime=!1,this.onRowContextMenuHandler=t=>async e=>{if(this.objectsContextMenuCallback){e.preventDefault(),e.stopPropagation();let i=[];"pending"===t?i=await this.chGridPendingForUpdateEl.getSelectedRows():"ignored"===t?i=await this.chGridIgnoredObjectsEl.getSelectedRows():"results"===t&&(i=await this.chGridResultsEl.getSelectedRows()),await this.objectsContextMenuCallback(t,{selection:i,clientX:e.detail.clientX,clientY:e.detail.clientY})}},this.markAllPendingToUpdateRows=()=>{this.chGridPendingForUpdateEl.markAllRows()},this.gridOnSelectionChangedCallbackHandler=t=>async e=>{this.selectCallback&&await this.selectCallback(t,e.detail.rowsId)},this.renderOptions=()=>i("gx-ide-container",{part:"options-container"},i("div",{class:"grid options-grid"},i("gx-ide-container",{displayBorder:!0,part:"options-update-from",containerTitle:this._componentLocale.options.updateFrom},i("div",{class:"grid options-update-from-grid"},i("gxg-text",{type:"text-regular"},this._componentLocale.options.updateFrom,":"),i("gxg-text",{type:"text-link",onClick:this.openServerCallback},this.updateFrom?this.updateFrom.serverUrl:""),i("gxg-text",{type:"text-regular"},this._componentLocale.options.knowledgeBase,":"),i("gxg-text",{type:"text-regular"},this.updateFrom?this.updateFrom.kbName:""),i("gxg-text",{type:"text-regular"},this._componentLocale.options.version,":"),i("gxg-text",{type:"text-regular"},this.updateFrom?this.updateFrom.versionName:""),i("gxg-text",{type:"text-regular"},this._componentLocale.options.lastFullUpdate,":"),i("gxg-text",{type:"text-regular"},n(this.updateFrom.lastFullUpdate)))),i("gx-ide-container",{displayBorder:!0,part:"options-scope",containerTitle:this._componentLocale.options.scope},i("div",{class:"grid options-scope-grid"},i("gxg-text",{type:"text-regular"},this._componentLocale.options.objects,":"),i("gxg-text",{type:"text-regular"},i("span",{class:{bold:"partial"===this.objectScopeText}},this._componentLocale.options.scopeData.objects[this.objectScopeText.toLocaleLowerCase()])),i("gxg-button",{id:"button-scope-objects-change",type:"outlined",onClick:this.objectsScope,part:"gxg-button gxg-button--scope-objects-change"},this._componentLocale.options.changeBtn),i("gxg-text",{type:"text-regular"},this._componentLocale.options.revision,":"),i("gxg-text",{type:"text-regular"},i("span",{class:{bold:void 0!==this.revisionScopeText}},void 0===this.revisionScopeText?this._componentLocale.options.scopeData.revision.latest:this.revisionScopeText)),i("gxg-button",{id:"button-scope-revision-change",type:"outlined",onClick:this.revisionScope,part:"gxg-button gxg-button--scope-revision-change"},this._componentLocale.options.changeBtn),i("gxg-form-checkbox",{label:this._componentLocale.options.kbProperties,class:"align-center",part:"option-kb-properties"}))))),this.renderFilter=()=>i("gx-ide-container",{part:"filters-container"},i("div",{class:"filters-container-body with-gap"},i("div",{class:{grid:!0,"filter-grid":!0,hide:!this.showFilter}},i("gxg-form-text",{"label-position":"above",label:this._componentLocale.filter.pattern,ref:t=>this.filterPatternEl=t,part:"filter-pattern",onInput:this.loadData}),i("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},l(this.types))),i("div",{class:{actions:!0,close:!this.showFilter}},i("gxg-button",{type:"secondary-icon-only",icon:"patterns/filters",onClick:this.toggleFilter,part:"gxg-button gxg-button--show-filter"}),i("gxg-button",{type:"secondary-icon-only",icon:"gemini-tools/reset",onClick:this.loadData,part:"gxg-button gxg-button--reload"})))),this.renderData=()=>i("gx-ide-container",{part:"data-container",noContentPadding:!0,fullHeight:!0,class:"gxi-overflow-auto"},i("gxg-tabs",{id:"dataTabs",part:"data-tabs"},i("gxg-tab-bar",{slot:"tab-bar-container",displayBorder:!0},i("gxg-tab-button",{slot:"tab-bar","tab-label":this._componentLocale.tabs.pendingForUpdate,tab:"pendingForUpdate",key:"pendingForUpdate",isSelected:!0}),i("gxg-tab-button",{slot:"tab-bar","tab-label":this._componentLocale.tabs.ignoredObjects,tab:"ignoredObjects",key:"ignoredObjects"}),i("gxg-tab-button",{slot:"tab-bar","tab-label":this._componentLocale.tabs.results,tab:"results",key:"results",ref:t=>this.gxgTabButtonResultsEl=t})),i("gxg-tab",{tab:"pendingForUpdate",key:"pendingForUpdate",noPadding:!0,isSelected:!0},this.renderPendingForUpdate()),i("gxg-tab",{tab:"ignoredObjects",key:"ignoredObjects",noPadding:!0},this.renderIgnoredObjects()),i("gxg-tab",{tab:"results",key:"results",noPadding:!0},this.renderResults()))),this.renderPendingForUpdate=()=>i("gxg-grid",{"ellipsis-cell-wrapper":!0,noBorder:!0},i("ch-grid",{"row-selection-mode":"multiple",ref:t=>this.chGridPendingForUpdateEl=t,part:"ch-grid-pending-for-updates",onRowContextMenu:this.onRowContextMenuHandler("pending"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("pending")},i("ch-grid-columnset",null,i("ch-grid-column",{settingable:!1,sortable:!1,"column-type":"rich",richRowSelector:!0,richRowSelectorMode:"mark",size:o.colSize.auto}),i("ch-grid-column",{settingable:!1,sortable:!1,size:o.colSize.auto}),i("ch-grid-column",{settingable:!1,sortable:!1,size:o.colSize.auto}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.name,settingable:!1,size:o.colSize.auto}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.type,settingable:!1,size:o.colSize.auto}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.description,settingable:!1,size:o.colSize.common}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.modifiedOn,settingable:!1,size:o.colSize.auto}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.status,settingable:!1,size:o.colSize.auto}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.action,settingable:!1,size:o.colSize.auto})),this.updateData.pendingForUpdate.map((t=>i("ch-grid-row",{rowid:t.id},i("ch-grid-cell",{"cell-type":"rich","row-selector":!0}),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},i("gxg-icon",{type:t.typeIcon,color:"auto"}))),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"}),this.renderIconState(t.state)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.name," ")),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.type)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.description)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},`${n(t.modifiedOn)}`)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.status)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.action))))))),this.renderIgnoredObjects=()=>i("gxg-grid",{"ellipsis-cell-wrapper":!0,noBorder:!0},i("ch-grid",{"row-selection-mode":"multiple",ref:t=>this.chGridIgnoredObjectsEl=t,part:"ch-grid-ignored-objects",onRowContextMenu:this.onRowContextMenuHandler("ignored"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("ignored")},i("ch-grid-columnset",null,i("ch-grid-column",{settingable:!1,sortable:!1,size:"min-content"}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.name,settingable:!1,size:"1fr"}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.type,settingable:!1,size:"1fr"})),this.updateData.ignoredObjects.map((t=>i("ch-grid-row",{rowid:t.id},i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},i("gxg-icon",{type:t.typeIcon,color:"auto"}))),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.name)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.type))))))),this.renderResults=()=>i("gxg-grid",{"ellipsis-cell-wrapper":!0,noBorder:!0},i("ch-grid",{"row-selection-mode":"multiple",ref:t=>this.chGridResultsEl=t,part:"ch-grid-results",onRowContextMenu:this.onRowContextMenuHandler("results"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("results")},i("ch-grid-columnset",null,i("ch-grid-column",{settingable:!1,sortable:!1,"column-type":"tree"}),i("ch-grid-column",{settingable:!1,sortable:!1}),i("ch-grid-column",{settingable:!1,sortable:!1}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.name,settingable:!1}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.type,settingable:!1}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.description,settingable:!1}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.notes,settingable:!1})),this.updateResultData.map((t=>i("ch-grid-row",{rowid:t.id},i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},this.renderIconResult(t.result))),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},i("gxg-icon",{type:t.typeIcon,color:"auto"}))),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},this.renderIconState(t.state))),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.name)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.type)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.description)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.notes)),i("ch-grid-rowset",null,t.messages.map((t=>{let e;switch(t.type){case"info":e="text-alert-info";break;case"success":e="text-alert-success";break;case"warning":e="text-alert-warning";break;case"error":e="text-alert-error"}return i("ch-grid-rowset-empty",null,i("gxg-text",{type:e},t.text))})))))))),this.renderIconState=t=>{let e,r;switch(t){case"modified":e="gx-server/changes-commit-pending",r="primary-active";break;case"inserted":e="gx-server/new",r="success";break;case"deleted":e="gx-server/delete",r="error";break;case"conflicted":e="gx-server/conflict",r="warning"}return i("gxg-icon",{type:e,color:r})},this.renderIconResult=t=>{let e,r;switch(t){case"info":e="gemini-tools/notice",r="primary-active";break;case"success":e="gemini-tools/success",r="success";break;case"warning":e="gemini-tools/warning",r="warning";break;case"error":e="gemini-tools/error",r="error"}return i("gxg-icon",{type:e,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 e=t.detail.addedRowsId,i=t.detail.removedRowsId,r=await this.pendingItemsCheckedCallback({itemsChecked:e,itemsUnchecked:i});void 0===r?await this.revertPendingCommitsCheckboxes(e,i):await this.togglePendingCommitsCheckboxes(r),this.chGridPendingForUpdateEl.addEventListener("rowMarkingChanged",this.pendingForUpdatesRowMarkingChangedHandler)}this.chGridPendingForUpdateEl.addEventListener("rowMarkingChanged",this.pendingForUpdatesRowMarkingChangedHandler)},this.togglePendingCommitsCheckboxes=async t=>{if(this.chGridPendingForUpdateEl){const e=t.itemsToCheck,i=t.itemsToUncheck;for(const t of e)await this.chGridPendingForUpdateEl.markRow(t,!0);for(const t of i)await this.chGridPendingForUpdateEl.markRow(t,!1)}},this.revertPendingCommitsCheckboxes=async(t,e)=>{if(this.chGridPendingForUpdateEl){for(const e of t)await this.chGridPendingForUpdateEl.markRow(e,!1);for(const t of e)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 a.getComponentStrings(this.el),this.componentDidLoadEvent.emit(!0)}async componentDidLoad(){await this.loadData()}async componentDidRender(){this.componentDidRenderEvent.emit(this._componentLocale.componentName),this.loadDataCalledFirstTime&&(await this.markAllPendingToUpdateRows(),this.chGridPendingForUpdateEl.addEventListener("rowMarkingChanged",this.pendingForUpdatesRowMarkingChangedHandler),this.loadDataCalledFirstTime=!1)}async validate(){return!0}render(){return i(r,{class:"gx-ide-component"},i("div",{class:"gx-ide-main-wrapper"},this.renderOptions(),this.renderFilter(),this.renderData(),i("gx-ide-container",{displayBorderTop:!0},i("div",{class:"align-center with-gap actions"},i("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)}};c.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.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}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--gray-01)}gxg-tabs{box-shadow:none}: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{c as gx_ide_team_dev_update}
|
|
@@ -15,7 +15,6 @@ export declare class GxIdeNewObject {
|
|
|
15
15
|
nameIsValid: boolean;
|
|
16
16
|
name: string;
|
|
17
17
|
description: string;
|
|
18
|
-
watchPropHandler(newSelectedType: TypeData | null): void;
|
|
19
18
|
/**
|
|
20
19
|
* Applies a shadow all around
|
|
21
20
|
*/
|
|
@@ -48,6 +47,7 @@ export declare class GxIdeNewObject {
|
|
|
48
47
|
* Callback invoked when user wants to confirm object creation
|
|
49
48
|
*/
|
|
50
49
|
readonly cancelCallback: CancelCallback;
|
|
50
|
+
watchSelectedTypeHandler(): void;
|
|
51
51
|
/**
|
|
52
52
|
* This event emm=its the data needed to create a new object
|
|
53
53
|
*/
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const formatDate = (dateObject) => {
|
|
4
|
-
const date = dateObject.toISOString().slice(0, 10);
|
|
5
|
-
const hours = dateObject.getHours();
|
|
6
|
-
const minutes = dateObject.getMinutes();
|
|
7
|
-
const time = `${hours}:${minutes}`;
|
|
8
|
-
let period = "AM"; // Assume it's AM by default
|
|
9
|
-
if (hours >= 12) {
|
|
10
|
-
period = "PM";
|
|
11
|
-
}
|
|
12
|
-
return `${date} ${time}${period} `;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
exports.formatDate = formatDate;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const formatDate = (dateObject) => {
|
|
2
|
-
const date = dateObject.toISOString().slice(0, 10);
|
|
3
|
-
const hours = dateObject.getHours();
|
|
4
|
-
const minutes = dateObject.getMinutes();
|
|
5
|
-
const time = `${hours}:${minutes}`;
|
|
6
|
-
let period = "AM"; // Assume it's AM by default
|
|
7
|
-
if (hours >= 12) {
|
|
8
|
-
period = "PM";
|
|
9
|
-
}
|
|
10
|
-
return `${date} ${time}${period} `;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export { formatDate as f };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const formatDate = (dateObject) => {
|
|
2
|
-
const date = dateObject.toISOString().slice(0, 10);
|
|
3
|
-
const hours = dateObject.getHours();
|
|
4
|
-
const minutes = dateObject.getMinutes();
|
|
5
|
-
const time = `${hours}:${minutes}`;
|
|
6
|
-
let period = "AM"; // Assume it's AM by default
|
|
7
|
-
if (hours >= 12) {
|
|
8
|
-
period = "PM";
|
|
9
|
-
}
|
|
10
|
-
return `${date} ${time}${period} `;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export { formatDate as f };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as o,g as e}from"./p-976c3a09.js";import{L as a}from"./p-26957490.js";const r=class{constructor(o){t(this,o),this.create=i(this,"create",7),this.validateName=i(this,"validateName",7),this.cancel=i(this,"cancel",7),this.componentDidLoadEvent=i(this,"componentDidLoadEvent",7),this.descriptionModifiedByUser=!1,this.validateInitialName=async()=>{const t=await this.validateNameCallback(this.name);this.validateNameHandler(t)},this.renderModuleFolder=()=>{if(this.selectedType.hasModule||this.selectedType.hasFolder){let t=this._componentLocale.moduleFolder;return this.selectedType.hasFolder?this.selectedType.hasModule||(t=this._componentLocale.folderOnly):t=this._componentLocale.moduleOnly,[s("gxg-label",{labelPosition:"start"},t),s("gx-ide-entity-selector",{value:this.parent,defaultValue:this.defaultParent,selectEntityCallback:this.selectModuleCallback,ref:t=>this.parentEl=t,part:"module"})]}return null},this.init=()=>{this.selectedType&&this.selectedType.name.length>0&&(this.name=this.selectedType.name,this.description=this.selectedType.name)},this.onInputNameHandler=t=>{this.descriptionModifiedByUser||(this.descriptionEl.value=t.detail)},this.onBlurNameHandler=async()=>{const t=await this.validateNameCallback(this.nameEl.value);this.validateNameHandler(t)},this.onNameValueChangedHandler=async t=>{const i=t.detail,s=await this.validateNameCallback(i);this.validateNameHandler(s)},this.onInputDescriptionHandler=t=>{this.description=t.detail,this.descriptionModifiedByUser=!0},this.validateNameHandler=t=>{void 0!==t?(this.nameEl.validationMessage=t,this.nameEl.validationStatus="error",this.nameIsValid=!1):(this.nameEl.validationMessage=null,this.nameEl.validationStatus="indeterminate",this.nameIsValid=!0)},this.createCallbackHandler=async()=>{var t;const i={typeId:null===(t=this.selectedType)||void 0===t?void 0:t.id,name:this.nameEl.value,description:this.descriptionEl.value,moduleId:this.parentEl.value.id},s=await this.createCallback(i);this.validateNameHandler(s)},this.cancelCallbackHandler=async()=>{await this.cancelCallback()},this.categoryOnSelectionChangedHandler=t=>{const i=t.detail.items;i.length>0&&(this.selectedCategory=this.typeCategories[i[0].index],this.selectedCategory.types[0]&&(this.selectedType=this.selectedCategory.types[0]))},this.typeOnSelectionChangedHandler=t=>{const i=t.detail.items;i.length>0&&(this.selectedType=this.selectedCategory.types[i[0].index])},this.selectedCategory=void 0,this.selectedType=void 0,this.nameIsValid=!1,this.name=void 0,this.description=void 0,this.shadow=!1,this.typeCategories=void 0,this.parent=void 0,this.defaultParent=void 0,this.selectModuleCallback=void 0,this.validateNameCallback=void 0,this.createCallback=void 0,this.cancelCallback=void 0}watchPropHandler(t){this.name=t.name,this.description=t.name,this.descriptionModifiedByUser=!1,this.nameEl&&this.nameEl.focus()}async componentWillLoad(){this.selectedCategory=this.typeCategories[0],this.selectedType=this.typeCategories[0].types[0],this.init(),this._componentLocale=await a.getComponentStrings(this.el)}componentDidLoad(){this.nameEl.focus(),this.validateInitialName(),this.componentDidLoadEvent.emit(!0)}render(){var t;return s(o,{class:{"gxi-new-kb":!0,"gxi-new-object--shadow":this.shadow}},s("div",{class:"gx-ide-main-wrapper gx-ide-overflow"},s("main",{class:"main"},s("gxg-container",{displayBorderBottom:!0},s("div",{class:"grid first-row"},this.typeCategories.length>1?s("gxg-list-box",{"single-selection":!0,"the-title":this._componentLocale.categorySelection,onSelectionChanged:this.categoryOnSelectionChangedHandler},this.typeCategories.map((t=>s("gxg-list-box-item",{key:t.id,value:t.id,icon:t.icon,part:`${t}-${t.id}`},t.name)))):null,s("gxg-list-box",{"single-selection":!0,"the-title":this._componentLocale.typeSelection,onSelectionChanged:this.typeOnSelectionChangedHandler},this.selectedCategory.types?this.selectedCategory.types.map((t=>s("gxg-list-box-item",{key:`${this.selectedCategory.id}-${t.id}`,icon:t.icon,selected:this.selectedType.id===t.id,part:`${t}-${t.id}`},t.name))):null),s("gxg-title",{type:"title-05"},null===(t=this.selectedType)||void 0===t?void 0:t.description))),s("gxg-container",null,s("div",{class:"grid"},s("header",{class:"header grid"},s("gxg-label",{labelPosition:"start"},this._componentLocale.name),s("gxg-form-text",{"label-position":"start",placeholder:"Name","max-width":"100%",value:this.name,ref:t=>this.nameEl=t,onInput:this.onInputNameHandler,onBlur:this.onBlurNameHandler,onValueChanged:this.onNameValueChangedHandler,debounce:!0,part:"name","display-validation-styles":!0,"display-validation-message":!0}),s("gxg-label",{labelPosition:"start"},this._componentLocale.description),s("gxg-form-text",{"label-position":"start",placeholder:"Description","max-width":"100%",value:this.description,ref:t=>this.descriptionEl=t,onInput:this.onInputDescriptionHandler,part:"description","display-validation-styles":!0,"display-validation-message":!0}),this.renderModuleFolder()))),s("gxg-container",{displayBorderTop:!0},s("gxg-button",{id:"button-create",slot:"footer",type:"primary-text-only",onClick:this.createCallbackHandler,disabled:!this.nameIsValid,part:"gxg-button gxg-button--create"},this._componentLocale.footer.btnCreate),s("gxg-button",{id:"button-cancel",slot:"footer",type:"outlined",onClick:this.cancelCallbackHandler,part:"gxg-button gxg-button--cancel"},this._componentLocale.footer.btnCancel)))))}static get assetsDirs(){return["gx-ide-assets/new-object"]}get el(){return e(this)}static get watchers(){return{selectedType:["watchPropHandler"]}}};r.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.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}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--gray-01)}gxg-tabs{box-shadow:none}: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-new-object--shadow){border:none;box-shadow:var(--box-shadow-01)}.header{grid-template-columns:auto 1fr}.first-row{grid-template-columns:1fr 3fr;grid-template-rows:1fr}.first-row *:nth-child(3){grid-column:1/3}";export{r as gx_ide_new_object}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as e,h as t,H as s,g as l}from"./p-976c3a09.js";import{L as a}from"./p-26957490.js";import{g as o}from"./p-c6a7b93c.js";import{r}from"./p-11af125f.js";import{f as n}from"./p-98906eb4.js";const c=class{constructor(s){i(this,s),this.componentDidRenderEvent=e(this,"componentDidRenderEvent",7),this.componentDidLoadEvent=e(this,"componentDidLoadEvent",7),this.loadDataCalledFirstTime=!1,this.conditionToCommit=async()=>{const i=!!this.commitCommentEl.value.length,e=await this.chGridPendingCommitsEl.getMarkedRows();this.commitButtonEnabled=!!(i&&e.length>0)},this.markAllPendingCommitsRows=()=>{this.chGridPendingCommitsEl.markAllRows()},this.togglePendingCommitsCheckboxes=async i=>{if(this.chGridPendingCommitsEl){const e=i.itemsToCheck,t=i.itemsToUncheck;for(const i of e)await this.chGridPendingCommitsEl.markRow(i,!0);for(const i of t)await this.chGridPendingCommitsEl.markRow(i,!1)}},this.revertPendingCommitsCheckboxes=async(i,e)=>{if(this.chGridPendingCommitsEl){for(const e of i)await this.chGridPendingCommitsEl.markRow(e,!1);for(const i of e)await this.chGridPendingCommitsEl.markRow(i,!0)}},this.renderIconState=i=>{let e,s;switch(i){case"inserted":e="gx-server/new",s="success";break;case"modified":e="gx-server/changes-commit-pending",s="primary-active";break;case"deleted":e="gx-server/delete",s="error";break;case"conflicted":e="gx-server/conflict",s="warning"}return t("gxg-icon",{type:e,color:s})},this.pendingCommitsRowMarkingChangedHandler=async i=>{if(this.chGridPendingCommitsEl.removeEventListener("rowMarkingChanged",this.pendingCommitsRowMarkingChangedHandler),this.chGridPendingCommitsEl){const e=i.detail.addedRowsId,t=i.detail.removedRowsId,s=await this.pendingItemsCheckedCallback({itemsChecked:e,itemsUnchecked:t});void 0===s?await this.revertPendingCommitsCheckboxes(e,t):await this.togglePendingCommitsCheckboxes(s),this.conditionToCommit(),this.chGridPendingCommitsEl.addEventListener("rowMarkingChanged",this.pendingCommitsRowMarkingChangedHandler)}},this.objectsOnContextMenuCallbackHandler=i=>async e=>{e.preventDefault(),e.stopPropagation();let t=[];"commit"===i?t=e.detail.selectedRowsId:"ignored"===i&&(t=await this.chGridIgnoredObjectsEl.getSelectedRows()),this.objectsContextMenuCallback&&await this.objectsContextMenuCallback(i,{selection:t,clientX:e.detail.clientX,clientY:e.detail.clientY})},this.gridOnSelectionChangedCallbackHandler=i=>async e=>{this.selectCallback&&await this.selectCallback(i,e.detail.rowsId)},this.renderPendingCommitsGrid=()=>t("gxg-grid",{"ellipsis-cell-wrapper":!0,noBorder:!0},t("ch-grid",{rowSelectionMode:"multiple",ref:i=>this.chGridPendingCommitsEl=i,part:"ch-grid-pending-commits",onRowContextMenu:this.objectsOnContextMenuCallbackHandler("commit"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("commit")},t("ch-grid-columnset",null,t("ch-grid-column",{columnType:"rich",richRowSelector:!0,richRowSelectorMode:"mark",settingable:!1,sortable:!1,size:o.colSize.auto}),t("ch-grid-column",{columnName:"State",settingable:!1,sortable:!1,size:o.colSize.auto}),t("ch-grid-column",{settingable:!1,sortable:!1,size:o.colSize.auto}),t("ch-grid-column",{sortable:!0,columnName:"Name",settingable:!1,size:o.colSize.common}),t("ch-grid-column",{sortable:!0,columnName:"Type",settingable:!1,size:o.colSize.common}),t("ch-grid-column",{columnName:"Description",settingable:!1,size:o.colSize.common}),t("ch-grid-column",{sortable:!0,columnName:"Modified On",settingable:!1}),t("ch-grid-column",{columnName:"Module",settingable:!1,size:o.colSize.common}),t("ch-grid-column",{columnName:"Local State",settingable:!1,size:o.colSize.common}),t("ch-grid-column",{columnName:"Last Synchronized",settingable:!1,size:o.colSize.common}),t("ch-grid-column",{sortable:!0,columnName:"User",settingable:!1,size:o.colSize.common})),this.pendingCommits.map((i=>t("ch-grid-row",{rowid:i.id},t("ch-grid-cell",{"cell-type":"rich","row-selector":!0}),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},this.renderIconState(i.state))),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},t("gxg-icon",{color:"auto",type:i.iconType}))),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},i.name)),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},i.type)),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},i.description)),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},`${n(i.modifiedOn)}`)),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},i.module)),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},i.localState)),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},`${n(i.lastSynchronized)}`)),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},i.user))))))),this.renderIgnoredObjectsGrid=()=>t("gxg-grid",{"ellipsis-cell-wrapper":!0,noBorder:!0},t("ch-grid",{rowSelectionMode:"multiple",ref:i=>this.chGridIgnoredObjectsEl=i,part:"ch-grid-pending-commits",onRowContextMenu:this.objectsOnContextMenuCallbackHandler("ignored"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("ignored")},t("ch-grid-columnset",null,t("ch-grid-column",{columnName:"",settingable:!1,size:o.colSize.auto}),t("ch-grid-column",{columnName:"TypeIcon",settingable:!1,size:o.colSize.auto}),t("ch-grid-column",{columnName:"Name",settingable:!1,sortable:!0,size:o.colSize.common}),t("ch-grid-column",{columnName:"Type",settingable:!1,size:o.colSize.common}),t("ch-grid-column",{columnName:"Description",settingable:!1,size:o.colSize.common}),t("ch-grid-column",{columnName:"Modified On",settingable:!1,size:o.colSize.common}),t("ch-grid-column",{columnName:"Module",settingable:!1,size:o.colSize.common}),t("ch-grid-column",{columnName:"Local State",settingable:!1,size:o.colSize.common}),t("ch-grid-column",{columnName:"Last Synchronized",settingable:!1,size:o.colSize.common}),t("ch-grid-column",{columnName:"User",settingable:!1,size:o.colSize.common})),this.ignoredObjects.map((i=>t("ch-grid-row",{rowid:i.id,selected:!0},t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},this.renderIconState(i.state))),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},t("gxg-icon",{color:"auto",type:i.iconType}))),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},i.name)),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},i.type)),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},i.description)),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},`${n(i.modifiedOn)}`)),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},i.module)),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},i.localState)),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},`${n(i.lastSynchronized)}`)),t("ch-grid-cell",null,t("span",{class:"cell-wrapper"},i.user))))))),this.getRecentCommentHandler=async()=>{if(this.getRecentCommentCallback){const i=await this.getRecentCommentCallback();i&&(this.comment=i)}},this.commitCallbackHandler=async()=>{const i=this.commitCommentEl.value;this.chGridPendingCommitsEl.getMarkedRows().then((async e=>{await this.commitCallback(e,i)}))},this.loadData=async()=>{const i={pattern:this.patternEl.value,changeSet:this.changeSetEl.value,folder:this.foldersEl.value,category:this.categoriesEl.value,type:this.typesEl.value};return await this.loadCallback(i).then((async({pending:i,ignored:e})=>{this.pendingCommits=i,this.ignoredObjects=e}))},this.toggleFiltersHandler=()=>{this.filtersHidden=!this.filtersHidden},this.filtersHidden=!0,this.comment="",this.pendingCommits=[],this.ignoredObjects=[],this.commitButtonEnabled=!1,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 a.getComponentStrings(this.el)}async componentDidLoad(){await this.loadData(),this.loadDataCalledFirstTime=!0,this.componentDidLoadEvent.emit(!0),this.conditionToCommit()}async componentDidRender(){this.componentDidRenderEvent.emit(this._componentLocale.componentName),this.loadDataCalledFirstTime&&(await this.markAllPendingCommitsRows(),this.chGridPendingCommitsEl.addEventListener("rowMarkingChanged",this.pendingCommitsRowMarkingChangedHandler),this.loadDataCalledFirstTime=!1)}async reload(){this.loadData()}render(){return t(s,{class:"gx-ide-component"},t("div",{class:"gx-ide-main-wrapper"},t("gx-ide-container",null,t("header",{class:"header grid"},t("gxg-form-textarea",{id:"gxg-textarea",height:"100px",label:this._componentLocale.topMenu.commentLabel,value:this.comment,ref:i=>this.commitCommentEl=i,onInput:this.conditionToCommit,placeholder:this._componentLocale.topMenu.commentPlaceholder,part:"comment"}),t("gxg-button",{class:"header-button",type:"outlined",part:"location",onClick:this.getRecentCommentHandler},this._componentLocale.topMenu.recentCommentsButton))),t("main",{class:"main gxi-full-height gx-ide-overflow"},t("gx-ide-container",{noContentPadding:!!this.filtersHidden},t("div",{class:"grid second-grid"},t("div",{class:"actions-row grid"},t("gxg-form-text",{class:this.filtersHidden?"hidden":null,"disable-filter":!0,label:this._componentLocale.filtersMenu.patternLabel,labelPosition:"start",value:"",ref:i=>this.patternEl=i,"display-validation-styles":!0,"display-validation-message":!0,part:"pattern",onInput:this.loadData}),t("div",{class:"action-buttons",slot:"tab-bar"},t("gxg-button",{onClick:this.toggleFiltersHandler,type:"secondary-icon-only",icon:"patterns/filters",part:"gxg-button gxg-button--show-filter"}),t("gxg-button",{type:"secondary-icon-only",icon:"gemini-tools/reset",onClick:this.loadData,part:"gxg-button gxg-button--reload"}))),t("div",{class:"filters-grid grid "+(this.filtersHidden?"hidden":null)},t("div",{class:"first-row grid"},t("gxg-combo-box",{labelPosition:"start",label:this._componentLocale.filtersMenu.changesetLabel,value:this.changeSet[0].id,ref:i=>this.changeSetEl=i,part:"change-set","display-validation-styles":!0,"display-validation-message":!0,onValueChanged:this.loadData},r(this.changeSet)),t("gxg-combo-box",{labelPosition:"start",label:this._componentLocale.filtersMenu.typeLabel,value:this.types[0].id,ref:i=>this.typesEl=i,part:"type",onValueChanged:this.loadData},r(this.types))),t("div",{class:"second-row grid"},t("gxg-combo-box",{labelPosition:"start",label:this._componentLocale.filtersMenu.folderLabel,value:this.folders[0].id,ref:i=>this.foldersEl=i,part:"folder","display-validation-styles":!0,"display-validation-message":!0,onValueChanged:this.loadData},r(this.folders)),t("gxg-combo-box",{labelPosition:"start",label:this._componentLocale.filtersMenu.categoryLabel,value:this.categories[0].id,ref:i=>this.categoriesEl=i,part:"categories",onValueChanged:this.loadData},r(this.categories)))))),t("gx-ide-container",{noContentPadding:!0,fullHeight:!0,class:"gxi-overflow-auto"},t("gxg-tabs",{class:"gxg-tabs"},t("gxg-tab-bar",{slot:"tab-bar-container",displayBorder:!0},t("gxg-tab-button",{slot:"tab-bar","tab-label":`${this._componentLocale.tabs.pendingCommits} (${this.pendingCommits.length})`,tab:"pending-commits","is-selected":!0}),t("gxg-tab-button",{slot:"tab-bar","tab-label":`${this._componentLocale.tabs.ignoredObjects} (${this.ignoredObjects.length})`,tab:"ignored-objects"})),t("gxg-tab",{tab:"pending-commits","no-padding":!0,flex:!0},this.renderPendingCommitsGrid()),t("gxg-tab",{tab:"ignored-objects","no-padding":!0,flex:!0},this.renderIgnoredObjectsGrid())))),t("gx-ide-container",{displayBorderTop:!0},t("gxg-button",{slot:"footer-end",type:"primary-text-only",onClick:this.commitCallbackHandler,part:"commit-button",disabled:!this.commitButtonEnabled},this._componentLocale.footer.commitButton))))}static get assetsDirs(){return["gx-ide-assets/team-dev-commit"]}get el(){return l(this)}};c.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.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}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--gray-01)}gxg-tabs{box-shadow:none}: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}.header{grid-template-columns:4fr auto}.header .header-button{height:fit-content}.main{display:flex;flex-direction:column}ch-grid{height:auto}.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{c as gx_ide_team_dev_commit}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as r,g as s}from"./p-976c3a09.js";import{L as a}from"./p-26957490.js";import{r as o}from"./p-11af125f.js";import{f as l}from"./p-98906eb4.js";const n=class{constructor(r){t(this,r),this.componentDidLoadEvent=e(this,"componentDidLoadEvent",7),this.componentDidRenderEvent=e(this,"componentDidRenderEvent",7),this.loadDataCalledFirstTime=!1,this.onRowContextMenuHandler=t=>async e=>{if(this.objectsContextMenuCallback){e.preventDefault(),e.stopPropagation();let i=[];"pending"===t?i=await this.chGridPendingForUpdateEl.getSelectedRows():"ignored"===t?i=await this.chGridIgnoredObjectsEl.getSelectedRows():"results"===t&&(i=await this.chGridResultsEl.getSelectedRows()),await this.objectsContextMenuCallback(t,{selection:i,clientX:e.detail.clientX,clientY:e.detail.clientY})}},this.markAllPendingToUpdateRows=()=>{this.chGridPendingForUpdateEl.markAllRows()},this.gridOnSelectionChangedCallbackHandler=t=>async e=>{this.selectCallback&&await this.selectCallback(t,e.detail.rowsId)},this.renderOptions=()=>i("gx-ide-container",{part:"options-container"},i("div",{class:"grid options-grid"},i("gx-ide-container",{displayBorder:!0,part:"options-update-from",containerTitle:this._componentLocale.options.updateFrom},i("div",{class:"grid options-update-from-grid"},i("gxg-text",{type:"text-regular"},this._componentLocale.options.updateFrom,":"),i("gxg-text",{type:"text-link",onClick:this.openServerCallback},this.updateFrom?this.updateFrom.serverUrl:""),i("gxg-text",{type:"text-regular"},this._componentLocale.options.knowledgeBase,":"),i("gxg-text",{type:"text-regular"},this.updateFrom?this.updateFrom.kbName:""),i("gxg-text",{type:"text-regular"},this._componentLocale.options.version,":"),i("gxg-text",{type:"text-regular"},this.updateFrom?this.updateFrom.versionName:""),i("gxg-text",{type:"text-regular"},this._componentLocale.options.lastFullUpdate,":"),i("gxg-text",{type:"text-regular"},this.updateFrom?l(this.updateFrom.lastFullUpdate):""))),i("gx-ide-container",{displayBorder:!0,part:"options-scope",containerTitle:this._componentLocale.options.scope},i("div",{class:"grid options-scope-grid"},i("gxg-text",{type:"text-regular"},this._componentLocale.options.objects,":"),i("gxg-text",{type:"text-regular"},i("span",{class:{bold:"partial"===this.objectScopeText}},this._componentLocale.options.scopeData.objects[this.objectScopeText.toLocaleLowerCase()])),i("gxg-button",{id:"button-scope-objects-change",type:"outlined",onClick:this.objectsScope,part:"gxg-button gxg-button--scope-objects-change"},this._componentLocale.options.changeBtn),i("gxg-text",{type:"text-regular"},this._componentLocale.options.revision,":"),i("gxg-text",{type:"text-regular"},i("span",{class:{bold:void 0!==this.revisionScopeText}},void 0===this.revisionScopeText?this._componentLocale.options.scopeData.revision.latest:this.revisionScopeText)),i("gxg-button",{id:"button-scope-revision-change",type:"outlined",onClick:this.revisionScope,part:"gxg-button gxg-button--scope-revision-change"},this._componentLocale.options.changeBtn),i("gxg-form-checkbox",{label:this._componentLocale.options.kbProperties,class:"align-center",part:"option-kb-properties"}))))),this.renderFilter=()=>i("gx-ide-container",{part:"filters-container"},i("div",{class:"filters-container-body with-gap"},i("div",{class:{grid:!0,"filter-grid":!0,hide:!this.showFilter}},i("gxg-form-text",{"label-position":"above",label:this._componentLocale.filter.pattern,ref:t=>this.filterPatternEl=t,part:"filter-pattern",onInput:this.loadData}),i("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},o(this.types))),i("div",{class:{actions:!0,close:!this.showFilter}},i("gxg-button",{type:"secondary-icon-only",icon:"patterns/filters",onClick:this.toggleFilter,part:"gxg-button gxg-button--show-filter"}),i("gxg-button",{type:"secondary-icon-only",icon:"gemini-tools/reset",onClick:this.loadData,part:"gxg-button gxg-button--reload"})))),this.renderData=()=>i("gx-ide-container",{part:"data-container",noContentPadding:!0,fullHeight:!0,class:"gxi-overflow-auto"},i("gxg-tabs",{id:"dataTabs",part:"data-tabs"},i("gxg-tab-bar",{slot:"tab-bar-container",displayBorder:!0},i("gxg-tab-button",{slot:"tab-bar","tab-label":this._componentLocale.tabs.pendingForUpdate,tab:"pendingForUpdate",key:"pendingForUpdate",isSelected:!0}),i("gxg-tab-button",{slot:"tab-bar","tab-label":this._componentLocale.tabs.ignoredObjects,tab:"ignoredObjects",key:"ignoredObjects"}),i("gxg-tab-button",{slot:"tab-bar","tab-label":this._componentLocale.tabs.results,tab:"results",key:"results",ref:t=>this.gxgTabButtonResultsEl=t})),i("gxg-tab",{tab:"pendingForUpdate",key:"pendingForUpdate",noPadding:!0,isSelected:!0},this.renderPendingForUpdate()),i("gxg-tab",{tab:"ignoredObjects",key:"ignoredObjects",noPadding:!0},this.renderIgnoredObjects()),i("gxg-tab",{tab:"results",key:"results",noPadding:!0},this.renderResults()))),this.renderPendingForUpdate=()=>i("gxg-grid",{"ellipsis-cell-wrapper":!0,noBorder:!0},i("ch-grid",{"row-selection-mode":"multiple",ref:t=>this.chGridPendingForUpdateEl=t,part:"ch-grid-pending-for-updates",onRowContextMenu:this.onRowContextMenuHandler("pending"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("pending")},i("ch-grid-columnset",null,i("ch-grid-column",{settingable:!1,sortable:!1,"column-type":"rich",richRowSelector:!0,richRowSelectorMode:"mark"}),i("ch-grid-column",{settingable:!1,sortable:!1}),i("ch-grid-column",{settingable:!1,sortable:!1}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.name,settingable:!1}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.type,settingable:!1}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.description,settingable:!1}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.modifiedOn,settingable:!1}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.status,settingable:!1}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.action,settingable:!1})),this.updateData.pendingForUpdate.map((t=>i("ch-grid-row",{rowid:t.id},i("ch-grid-cell",{"cell-type":"rich","row-selector":!0}),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},i("gxg-icon",{type:t.typeIcon,color:"auto"}))),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"}),this.renderIconState(t.state)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.name," ")),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.type)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.description)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},`${l(t.modifiedOn)}`)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.status)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.action))))))),this.renderIgnoredObjects=()=>i("gxg-grid",{"ellipsis-cell-wrapper":!0,noBorder:!0},i("ch-grid",{"row-selection-mode":"multiple",ref:t=>this.chGridIgnoredObjectsEl=t,part:"ch-grid-ignored-objects",onRowContextMenu:this.onRowContextMenuHandler("ignored"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("ignored")},i("ch-grid-columnset",null,i("ch-grid-column",{settingable:!1,sortable:!1,size:"min-content"}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.name,settingable:!1,size:"1fr"}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.type,settingable:!1,size:"1fr"})),this.updateData.ignoredObjects.map((t=>i("ch-grid-row",{rowid:t.id},i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},i("gxg-icon",{type:t.typeIcon,color:"auto"}))),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.name)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.type))))))),this.renderResults=()=>i("gxg-grid",{"ellipsis-cell-wrapper":!0,noBorder:!0},i("ch-grid",{"row-selection-mode":"multiple",ref:t=>this.chGridResultsEl=t,part:"ch-grid-results",onRowContextMenu:this.onRowContextMenuHandler("results"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("results")},i("ch-grid-columnset",null,i("ch-grid-column",{settingable:!1,sortable:!1,"column-type":"tree"}),i("ch-grid-column",{settingable:!1,sortable:!1}),i("ch-grid-column",{settingable:!1,sortable:!1}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.name,settingable:!1}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.type,settingable:!1}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.description,settingable:!1}),i("ch-grid-column",{columnName:this._componentLocale.tableHead.notes,settingable:!1})),this.updateResultData.map((t=>i("ch-grid-row",{rowid:t.id},i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},this.renderIconResult(t.result))),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},i("gxg-icon",{type:t.typeIcon,color:"auto"}))),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},this.renderIconState(t.state))),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.name)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.type)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.description)),i("ch-grid-cell",null,i("span",{class:"cell-wrapper"},t.notes)),i("ch-grid-rowset",null,t.messages.map((t=>{let e;switch(t.type){case"info":e="text-alert-info";break;case"success":e="text-alert-success";break;case"warning":e="text-alert-warning";break;case"error":e="text-alert-error"}return i("ch-grid-rowset-empty",null,i("gxg-text",{type:e},t.text))})))))))),this.renderIconState=t=>{let e,r;switch(t){case"modified":e="gx-server/changes-commit-pending",r="primary-active";break;case"inserted":e="gx-server/new",r="success";break;case"deleted":e="gx-server/delete",r="error";break;case"conflicted":e="gx-server/conflict",r="warning"}return i("gxg-icon",{type:e,color:r})},this.renderIconResult=t=>{let e,r;switch(t){case"info":e="gemini-tools/notice",r="primary-active";break;case"success":e="gemini-tools/success",r="success";break;case"warning":e="gemini-tools/warning",r="warning";break;case"error":e="gemini-tools/error",r="error"}return i("gxg-icon",{type:e,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 e=t.detail.addedRowsId,i=t.detail.removedRowsId,r=await this.pendingItemsCheckedCallback({itemsChecked:e,itemsUnchecked:i});void 0===r?await this.revertPendingCommitsCheckboxes(e,i):await this.togglePendingCommitsCheckboxes(r),this.chGridPendingForUpdateEl.addEventListener("rowMarkingChanged",this.pendingForUpdatesRowMarkingChangedHandler)}this.chGridPendingForUpdateEl.addEventListener("rowMarkingChanged",this.pendingForUpdatesRowMarkingChangedHandler)},this.togglePendingCommitsCheckboxes=async t=>{if(this.chGridPendingForUpdateEl){const e=t.itemsToCheck,i=t.itemsToUncheck;for(const t of e)await this.chGridPendingForUpdateEl.markRow(t,!0);for(const t of i)await this.chGridPendingForUpdateEl.markRow(t,!1)}},this.revertPendingCommitsCheckboxes=async(t,e)=>{if(this.chGridPendingForUpdateEl){for(const e of t)await this.chGridPendingForUpdateEl.markRow(e,!1);for(const t of e)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 a.getComponentStrings(this.el),this.componentDidLoadEvent.emit(!0)}async componentDidLoad(){await this.loadData()}async componentDidRender(){this.componentDidRenderEvent.emit(this._componentLocale.componentName),this.loadDataCalledFirstTime&&(await this.markAllPendingToUpdateRows(),this.chGridPendingForUpdateEl.addEventListener("rowMarkingChanged",this.pendingForUpdatesRowMarkingChangedHandler),this.loadDataCalledFirstTime=!1)}async validate(){return!0}render(){return i(r,{class:"gx-ide-component"},i("div",{class:"gx-ide-main-wrapper"},this.renderOptions(),this.renderFilter(),this.renderData(),i("gx-ide-container",{displayBorderTop:!0},i("div",{class:"align-center with-gap actions"},i("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)}};n.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.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}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--gray-01)}gxg-tabs{box-shadow:none}: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{n as gx_ide_team_dev_update}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t=t=>{const $=t.toISOString().slice(0,10),e=t.getHours();let n="AM";return e>=12&&(n="PM"),`${$} ${e}:${t.getMinutes()}${n} `};export{t as f}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,h as e,H as l,g as s}from"./p-976c3a09.js";import{L as o}from"./p-26957490.js";import{r as a}from"./p-11af125f.js";import{g as r}from"./p-c6a7b93c.js";import{F as n}from"./p-6010dc9d.js";const d=(i,t="date")=>{var e;let l;if(null==i)return"";if(i.getTime()!=i.getTime())return"Invalid date";let s="en-US";return"es"===(null===(e=document.getElementsByTagName("html")[0].getAttribute("lang"))||void 0===e?void 0:e.valueOf())&&(s="es-ES"),l=i.toLocaleDateString(s),"date-time"===t&&(l+=` | ${i.toLocaleTimeString()}`),l},h=class{constructor(l){i(this,l),this.componentDidRenderEvent=t(this,"componentDidRenderEvent",7),this.componentDidLoadEvent=t(this,"componentDidLoadEvent",7),this.renderFilter=()=>{var i,t;return e("gxg-container",{displayBorderBottom:!0,containerTitle:this._componentLocale.filter.title,part:"filters-container"},e("div",{class:"grid filter-grid"},e("gxg-form-text",{"label-position":"above",label:this._componentLocale.filter.pattern,ref:i=>this.filterPatternEl=i,value:this.patternValue,part:"filter-pattern"}),e("gxg-combo-box",{"disable-filter":!0,label:this._componentLocale.filter.type,value:this.defaultType,disabled:!this.types,"display-validation-styles":!0,"display-validation-message":!0,ref:i=>this.filterTypeEl=i,part:"filter-type"},a(null!==(i=this.types)&&void 0!==i?i:[])),e("gxg-combo-box",{"disable-filter":!0,label:this._componentLocale.filter.category,value:this.defaultCategory,disabled:!this.categories,"display-validation-styles":!0,"display-validation-message":!0,ref:i=>this.filterCategoryEl=i,part:"filter-category"},a(null!==(t=this.categories)&&void 0!==t?t:[])),e("gx-ide-entity-selector",{label:this._componentLocale.filter.module,"label-position":"above",value:this.defaultModule,defaultValue:this.defaultModule,selectEntityCallback:this.selectModuleCallback,ref:i=>this.filterModuleEl=i}),e("div",{class:"flex with-gap"},e("gxg-form-checkbox",{label:this._componentLocale.filter.modified,class:"align-center",ref:i=>this.filterModifiedEl=i,part:"filter-modified"}),e("gxg-combo-box",{class:{hide:!this.filterModified},"disable-filter":!0,value:this.filterAfterType,"display-validation-styles":!0,"display-validation-message":!0,ref:i=>this.filterAfterTypeEl=i,part:"filter-after-type"},a([{id:n.NONE,label:this._componentLocale.filter.afterNone,value:n.NONE},{id:n.DATE_TIME,label:this._componentLocale.filter[n.DATE_TIME],value:n.DATE_TIME},{id:n.IMPORT,label:this._componentLocale.filter[n.IMPORT],value:n.IMPORT},{id:n.LAST_BUILD,label:this._componentLocale.filter[n.LAST_BUILD],value:n.LAST_BUILD}])),e("gxg-form-text",{class:{hide:!this.filterModified},"label-position":"start",label:this._componentLocale.filter.user,"max-width":"150px",ref:i=>this.filterUserEl=i,part:"filter-user"}),e("div",{class:{flex:!0,hide:!this.filterModified||this.filterAfterType!==n.DATE_TIME},part:"filter-datetime"},e("gxg-label",{"label-position":"start"},this._componentLocale.filter.dateTime),e("gxg-date-picker",{ref:i=>this.filterModifiedDateEl=i})))))},this.renderObjects=()=>e("gxg-grid",{"ellipsis-cell-wrapper":!0,noBorder:!0},e("ch-grid",{"row-selection-mode":this.multiSelection?"multiple":"single",ref:i=>this.chGridEl=i,onKeyDown:this.chGridKeyDownHandler,part:"ch-grid-objects"},e("ch-grid-columnset",null,e("ch-grid-column",{"column-name-position":"text",settingable:!1,size:r.colSize.auto}),e("ch-grid-column",{"column-name":this._componentLocale.tableHead.name,"column-name-position":"text",settingable:!1,size:r.colSize.common}),e("ch-grid-column",{"column-name":this._componentLocale.tableHead.type,"column-name-position":"text",settingable:!1,size:r.colSize.common}),e("ch-grid-column",{"column-name":this._componentLocale.tableHead.module,"column-name-position":"text",settingable:!1,size:r.colSize.common}),e("ch-grid-column",{"column-name":this._componentLocale.tableHead.description,"column-name-position":"text",settingable:!1,size:r.colSize.common}),e("ch-grid-column",{"column-name":this._componentLocale.tableHead.modifiedDate,"column-name-position":"text",settingable:!1,size:r.colSize.auto}),e("ch-grid-column",{"column-name":this._componentLocale.tableHead.importDate,"column-name-position":"text",settingable:!1,size:r.colSize.auto})),this.objects.map((i=>e("ch-grid-row",{rowid:i.id,onDblClick:this.openSelectionCallbackHandler},e("ch-grid-cell",null,e("span",{class:"cell-wrapper"},e("gxg-icon",{type:i.icon,color:"auto"}))),e("ch-grid-cell",null,e("span",{class:"cell-wrapper"}," ",i.name," ")),e("ch-grid-cell",null,e("span",{class:"cell-wrapper"},i.type)),e("ch-grid-cell",null,e("span",{class:"cell-wrapper"},i.module)),e("ch-grid-cell",null,e("span",{class:"cell-wrapper"},i.description)),e("ch-grid-cell",null,e("span",{class:"cell-wrapper"},`${d(i.modifiedDate,"date-time")}`)),e("ch-grid-cell",null,e("span",{class:"cell-wrapper"},`${d(i.importDate,"date-time")}`))))))),this.getObjects=()=>{var i,t,e,l,s,o,a,r;const d=this.filterModifiedEl.checked,h=this.filterAfterTypeEl.value,g=null===(t=null===(i=this.filterUserEl)||void 0===i?void 0:i.value)||void 0===t?void 0:t.trim(),c={pattern:null===(e=this.filterPatternEl)||void 0===e?void 0:e.value,type:null===(l=this.filterTypeEl)||void 0===l?void 0:l.value,category:null===(s=this.filterCategoryEl)||void 0===s?void 0:s.value,module:null===(a=null===(o=this.filterModuleEl)||void 0===o?void 0:o.value)||void 0===a?void 0:a.id,modifiedAfter:d&&h?h:null,modifiedBy:d&&g?g:null,modifiedDate:d&&h===n.DATE_TIME?null===(r=this.filterModifiedDateEl)||void 0===r?void 0:r.value:null};this.loadCallback(c).then((i=>{this.objects=i,this.selectedObjectsIds=[],this.deselectAll()}))},this.openSelectionCallbackHandler=i=>{i.stopPropagation(),this.openSelectionCallback(this.selectedObjectsIds)},this.cancelCallbackHandle=()=>{this.cancelCallback()},this.selectAll=()=>{this.chGridEl.selectAllRows()},this.deselectAll=()=>{this.chGridEl.selectAllRows(!1)},this.newObjectCallbackHandle=()=>{this.newObjectCallback()},this.listenChanges=async()=>{this.filterPatternEl.addEventListener("input",(()=>{this.getObjects()})),this.filterTypeEl.addEventListener("valueChanged",(()=>{this.getObjects()})),this.filterCategoryEl.addEventListener("valueChanged",(()=>{this.getObjects()})),this.filterModuleEl.addEventListener("valueChanged",(()=>{this.getObjects()})),this.filterModifiedEl.addEventListener("change",(i=>{this.filterModified=i.detail.value,this.getObjects()})),this.filterAfterTypeEl.addEventListener("valueChanged",(()=>{this.filterAfterType=this.filterAfterTypeEl.value,this.getObjects()})),this.filterUserEl.addEventListener("input",(()=>{this.getObjects()})),this.filterModifiedDateEl.addEventListener("valueChanged",(()=>{this.getObjects()})),this.chGridEl.addEventListener("selectionChanged",(i=>{this.selectedObjectsIds=i.detail.rowsId}))},this.chGridKeyDownHandler=i=>{"Enter"===i.key&&this.openSelectionCallbackHandler(i)},this.hostKeyPressHandler=i=>{"Enter"===i.key&&i.stopPropagation()},this.filterAfterType="",this.filterModified=!1,this.objects=[],this.selectedObjectsIds=[],this.multiSelection=!0,this.patternValue=void 0,this.types=void 0,this.defaultType=void 0,this.categories=void 0,this.defaultCategory=void 0,this.defaultModule=void 0,this.selectModuleCallback=void 0,this.cancelCallback=void 0,this.loadCallback=void 0,this.newObjectCallback=void 0,this.openSelectionCallback=void 0}async componentWillLoad(){this._componentLocale=await o.getComponentStrings(this.el),this.componentDidLoadEvent.emit(!0)}componentDidLoad(){this.listenChanges(),this.getObjects()}componentDidRender(){this.componentDidRenderEvent.emit(this._componentLocale.componentName)}async validate(){return!0}render(){return e(l,{class:"gx-ide-component",onKeyPress:this.hostKeyPressHandler},e("div",{class:"gx-ide-main-wrapper"},this.renderFilter(),this.renderObjects(),e("gxg-container",{displayBorderTop:!0},e("div",{class:"grid objects-count"},e("gxg-text",{class:"align-end",part:"objects-selected"},`${this.selectedObjectsIds.length} ${this._componentLocale.objCount.selected}`),e("gxg-text",{class:"align-end",part:"objects-matching"},`${this.objects.length} ${this._componentLocale.objCount.matching}`))),e("gxg-container",{displayBorderTop:!0},e("div",{class:"grid actions"},e("div",null,e("gxg-button",{id:"button-select-all",type:"primary-text-only",onClick:this.selectAll,part:"gxg-button gxg-button--select-all"},this._componentLocale.footer.btnSelectAll),e("gxg-button",{id:"button-new",type:"primary-text-only",onClick:this.newObjectCallbackHandle,part:"gxg-button gxg-button--new"},this._componentLocale.footer.btnNew)),e("div",null,e("gxg-button",{id:"button-ok",type:"primary-text-only",onClick:this.openSelectionCallbackHandler,part:"gxg-button gxg-button--ok"},this._componentLocale.footer.btnConfirm),e("gxg-button",{id:"button-cancel",type:"outlined",onClick:this.cancelCallbackHandle,part:"gxg-button gxg-button--cancel"},this._componentLocale.footer.btnCancel))))))}static get assetsDirs(){return["gx-ide-assets/object-selector"]}get el(){return s(this)}};h.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.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}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--gray-01)}gxg-tabs{box-shadow:none}: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)}.filter-grid{grid-template-columns:repeat(2, 1fr)}.filter-grid *:nth-child(5){grid-area:3/1/4/3}.flex{display:flex;flex-direction:row;align-items:center}.with-gap{gap:var(--gx-ide-grid-row-gap)}.hide{display:none}.objects-count{grid-template-columns:repeat(2, 1fr)}.objects-count *:nth-child(2){justify-content:flex-end;align-items:flex-start}.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{h as gx_ide_object_selector}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,h as e,H as l,g as s}from"./p-976c3a09.js";import{L as a}from"./p-26957490.js";import{r}from"./p-b8d5c561.js";import{F as o}from"./p-6010dc9d.js";const h=class{constructor(l){i(this,l),this.componentDidLoadEvent=t(this,"componentDidLoadEvent",7),this.renderFilter=()=>{var i,t,l,s,a;return e("gxg-container",{displayBorder:!0,containerTitle:this._componentLocale.filter.title,part:"filters-container"},e("div",{class:"grid filter-grid"},e("gxg-form-text",{"label-position":"above",label:this._componentLocale.filter.name,ref:i=>this.filterNameEl=i,part:"filter-name"}),e("gx-ide-entity-selector",{label:this._componentLocale.filter.moduleFolder,"label-position":"above",value:this.defaultModule,defaultValue:this.defaultModule,selectEntityCallback:this.selectModuleCallback,ref:i=>this.filterModuleEl=i,part:"filter-module-folder"}),e("div",null,e("gxg-button",{id:"button-more-less",type:"primary-text-only",onClick:this.showMoreFilter,part:"gxg-button gxg-button--more-less"},this.filterMore?this._componentLocale.filter.btnLess:this._componentLocale.filter.btnMore)),e("gxg-form-text",{class:{hide:!this.filterMore},"label-position":"above",label:this._componentLocale.filter.search,ref:i=>this.filterSearchContentsEl=i,part:"filter-search"}),e("gxg-combo-box",{class:{hide:!this.filterMore},"disable-filter":!0,label:this._componentLocale.filter.category,value:this.defaultCategory,disabled:!this.categories,ref:i=>this.filterCategoryEl=i,part:"filter-category"},r("gxg-combo-box-item",null!==(i=this.categories)&&void 0!==i?i:[])),e("div",{class:{hide:!this.filterMore}},e("gxg-form-checkbox",{label:this._componentLocale.filter.allDescendants,class:"align-center",ref:i=>this.filterAllDescendantsEl=i,part:"filter-all-descendants"})),e("div",{class:{flex:!0,"with-gap":!0,hide:!this.filterMore}},e("gxg-form-checkbox",{label:this._componentLocale.filter.modified,class:"align-center",ref:i=>this.filterModifiedEl=i,part:"filter-modified"}),e("gxg-combo-box",{class:{hide:!this.filterModified},"disable-filter":!0,value:this.filterAfterType,ref:i=>this.filterAfterTypeEl=i,part:"filter-after-type"},r("gxg-combo-box-item",[{id:o.NONE,label:this._componentLocale.filter.afterNone,value:o.NONE},{id:o.DATE_TIME,label:this._componentLocale.filter[o.DATE_TIME],value:o.DATE_TIME},{id:o.IMPORT,label:this._componentLocale.filter[o.IMPORT],value:o.IMPORT},{id:o.LAST_BUILD,label:this._componentLocale.filter[o.LAST_BUILD],value:o.LAST_BUILD}])),e("gxg-form-text",{class:{hide:!this.filterModified},"label-position":"start",label:this._componentLocale.filter.user,"max-width":"150px",ref:i=>this.filterUserEl=i,part:"filter-user"}),e("div",{class:{flex:!0,hide:!this.filterModified||this.filterAfterType!==o.DATE_TIME},part:"filter-datetime"},e("gxg-label",{"label-position":"start"},this._componentLocale.filter.dateTime),e("gxg-date-picker",{ref:i=>this.filterModifiedDateEl=i}))),e("gxg-combo-box",{class:{hide:!this.filterMore},"disable-filter":!0,label:this._componentLocale.filter.style,disabled:!this.styles,ref:i=>this.filterStyleEl=i,part:"filter-style"},r("gxg-combo-box-item",null!==(t=this.styles)&&void 0!==t?t:[])),e("gxg-combo-box",{class:{hide:!this.filterMore},"disable-filter":!0,label:this._componentLocale.filter.language,disabled:!this.languages,ref:i=>this.filterLanguageEl=i,part:"filter-language"},r("gxg-combo-box-item",null!==(l=this.languages)&&void 0!==l?l:[])),e("gxg-combo-box",{class:{hide:!this.filterMore},"disable-filter":!0,label:this._componentLocale.filter.density,disabled:!this.densities,ref:i=>this.filterDensityEl=i,part:"filter-density"},r("gxg-combo-box-item",null!==(s=this.densities)&&void 0!==s?s:[])),e("gxg-combo-box",{class:{hide:!this.filterMore},"disable-filter":!0,label:this._componentLocale.filter.layer,disabled:!this.layers,ref:i=>this.filterLayerEl=i,part:"filter-layer"},r("gxg-combo-box-item",null!==(a=this.layers)&&void 0!==a?a:[]))))},this.renderImages=()=>e("gxg-grid",{part:"images-table"},e("ch-grid",{"row-selection-mode":"multiple",ref:i=>this.chGridEl=i,part:"ch-grid-images"},e("ch-grid-columnset",null,e("ch-grid-column",{columnName:"",columnNamePosition:"text",settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.name,columnNamePosition:"text",settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.module,columnNamePosition:"text",settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.description,columnNamePosition:"text",settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.modifiedDate,columnNamePosition:"text",settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.lastUser,columnNamePosition:"text",settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.importDate,columnNamePosition:"text",settingable:!1}),e("ch-grid-column",{columnName:this._componentLocale.tableHead.lastBuildDate,columnNamePosition:"text",settingable:!1})),this.images.map((i=>e("ch-grid-row",{rowid:i.id},e("ch-grid-cell",null,e("gxg-icon",{type:i.icon,color:"auto"})),e("ch-grid-cell",null," ",i.name," "),e("ch-grid-cell",null," ",i.module," "),e("ch-grid-cell",null," ",i.description," "),e("ch-grid-cell",null,`${i.modifiedDate.toISOString().slice(0,10)}`),e("ch-grid-cell",null," ",i.lastUser," "),e("ch-grid-cell",null,`${i.importDate.toISOString().slice(0,10)}`),e("ch-grid-cell",null,`${i.lastBuildDate.toISOString().slice(0,10)}`)))))),this.renderImageData=()=>e("gxg-container",{displayBorder:!0,containerTitle:this._componentLocale.imageDataTitle,part:"image-data-container"},e("div",{class:"grid images-data-flex"},this.imagesSelectedItems.map((i=>e("div",{class:"image-item"},e("div",{class:"img"},e("img",{src:i.url,alt:i.id})),e("gxg-text",{type:"text-regular"},i.name)))))),this.getImages=()=>{let i={name:this.filterNameEl.value,parent:this.filterModuleEl.value?this.filterModuleEl.value.id:null};if(this.filterMore){const t=this.filterModifiedEl.checked,e=this.filterAfterTypeEl.value;i=Object.assign(Object.assign({},i),{searchContents:this.filterSearchContentsEl.value,category:this.filterCategoryEl.value,allDescendants:this.filterAllDescendantsEl.checked,modifiedAfter:t?e:null,modifiedBy:t?this.filterUserEl.value:null,modifiedDate:t&&e===o.DATE_TIME?this.filterModifiedDateEl.value:null,style:this.filterStyleEl.value,language:this.filterLanguageEl.value,density:this.filterDensityEl.value,layer:this.filterLayerEl.value})}this.loadCallback(i).then((i=>{this.images=i,this.selectedObjectsIds=[],this.deselectAll()}))},this.newObjectCallbackHandler=()=>{this.newObjectCallback()},this.openSelectionCallBackHandler=()=>{this.openSelectionCallback(this.selectedObjectsIds)},this.deleteSelectionCallbackHandler=()=>{this.deleteSelectionCallback(this.selectedObjectsIds)},this.showMoreFilter=()=>{this.filterMore=!this.filterMore},this.selectAll=()=>{this.chGridEl.selectAllRows()},this.deselectAll=()=>{this.chGridEl.selectAllRows(!1)},this.listenChanges=()=>{this.filterNameEl.addEventListener("change",(()=>{this.getImages()})),this.filterSearchContentsEl.addEventListener("change",(()=>{this.getImages()})),this.filterAllDescendantsEl.addEventListener("change",(()=>{this.getImages()})),this.filterModifiedEl.addEventListener("change",(i=>{this.filterModified=i.detail.value,this.getImages()})),this.filterUserEl.addEventListener("change",(()=>{this.getImages()})),this.filterCategoryEl.addEventListener("valueChanged",(()=>{this.getImages()})),this.filterModuleEl.addEventListener("valueChanged",(()=>{this.getImages()})),this.filterAfterTypeEl.addEventListener("valueChanged",(()=>{this.filterAfterType=this.filterAfterTypeEl.value,this.getImages()})),this.chGridEl.addEventListener("rowClicked",(i=>{this.loadImageItemsCallback(i.detail.rowId).then((i=>{this.imagesSelectedItems=i}))})),this.chGridEl.addEventListener("rowDoubleClicked",(()=>{this.openSelectionCallBackHandler()})),this.chGridEl.addEventListener("selectionChanged",(i=>{this.selectedObjectsIds=i.detail.rowsId,this.selectionObjectChangedCallback(this.selectedObjectsIds)})),this.chGridEl.addEventListener("rowContextMenu",(i=>{i.preventDefault(),i.stopPropagation(),this.contextMenuCallback({selection:i.detail.selectedRowsId,clientX:i.detail.clientX,clientY:i.detail.clientY})}))},this.filterAfterType="",this.filterModified=!1,this.filterMore=!1,this.images=[],this.imagesSelectedItems=[],this.selectedObjectsIds=[],this.categories=void 0,this.densities=void 0,this.defaultCategory=void 0,this.defaultModule=void 0,this.defaultType=void 0,this.filterModules=void 0,this.languages=void 0,this.layers=void 0,this.contextMenuCallback=void 0,this.deleteSelectionCallback=void 0,this.loadCallback=void 0,this.loadImageItemsCallback=void 0,this.newObjectCallback=void 0,this.openSelectionCallback=void 0,this.selectModuleCallback=void 0,this.selectionObjectChangedCallback=void 0,this.shadow=!1,this.styles=void 0,this.types=void 0}async componentWillLoad(){this._componentLocale=await a.getComponentStrings(this.el),this.componentDidLoadEvent.emit(!0)}componentDidLoad(){this.listenChanges(),this.getImages()}keyDownHandler(i){if(document.activeElement===this.el)switch(i.key){case"Enter":this.openSelectionCallBackHandler();break;case"Delete":this.deleteSelectionCallbackHandler()}}async validate(){return!0}async reload(){this.filterUserEl.value=null,this.filterAfterTypeEl.value=null,this.filterAfterType=null,this.filterModifiedEl.checked=!1,this.filterAllDescendantsEl.checked=!1,this.filterModuleEl.value=null,this.filterCategoryEl.value=null,this.filterSearchContentsEl.value=null,this.filterNameEl.value=null,this.filterStyleEl.value=null,this.filterLanguageEl.value=null,this.filterDensityEl.value=null,this.filterLayerEl.value=null,this.filterMore=!1,this.getImages()}render(){return e(l,{class:"gx-ide-component"},e("div",{class:"gx-ide-main-wrapper gx-ide-overflow"},this.renderFilter(),e("gxg-container",null,e("div",{class:"grid images-grid"},this.renderImages(),this.renderImageData())),e("gxg-container",null,e("div",{class:"grid objects-count"},e("div",{class:"flex with-gap"},e("gxg-button",{id:"button-select-all",type:"primary-text-only",onClick:this.selectAll,part:"gxg-button gxg-button--select-all"},this._componentLocale.footer.btnSelectAll),e("gxg-button",{id:"button-new-file",type:"primary-text-only",onClick:this.newObjectCallbackHandler,part:"gxg-button gxg-button--new-file"},this._componentLocale.footer.btnNew)),e("gxg-text",{class:"align-end",part:"objects-matching"},`${this.images.length} ${this._componentLocale.objCount.matching}`)))))}static get assetsDirs(){return["gx-ide-assets/ww-images"]}get el(){return s(this)}};h.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.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}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--gray-01)}gxg-tabs{box-shadow:none}: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)}.filter-grid{grid-template-columns:repeat(4, 1fr)}.filter-grid>:nth-child(3),.filter-grid>:nth-child(6){display:flex;flex-direction:row;align-items:flex-end}.filter-grid>:nth-child(4){grid-area:2/1/3/4}.filter-grid>:nth-child(5){grid-area:3/1/4/2}.filter-grid>:nth-child(6){grid-area:3/4/4/5}.filter-grid>:nth-child(7){grid-area:4/1/5/4}.filter-grid>:nth-child(8){grid-area:5/1/6/2}.filter-grid>:nth-child(9){grid-area:5/2/6/3}.filter-grid>:nth-child(10){grid-area:5/3/6/4}.filter-grid>:nth-child(11){grid-area:5/4/6/5}.flex{display:flex;flex-direction:row;align-items:center}.with-gap{gap:var(--gx-ide-grid-row-gap)}.hide{display:none !important}.images-grid{grid-template-columns:repeat(3, 1fr);grid-column-gap:0}.images-grid>:nth-child(1){grid-area:1/1/1/3}.images-data-flex{display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--gx-ide-grid-row-gap);text-overflow:ellipsis;overflow:hidden}.images-data-flex .image-item{display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:120px}.images-data-flex .image-item .img{width:50px;height:50px;display:flex;align-items:center;justify-content:center;border:1px solid var(--gxg-border-color--regular);padding:var(--gx-ide-grid-row-gap)}.images-data-flex .image-item .img img{max-width:100%;max-height:100%}.objects-count{grid-template-columns:repeat(2, 1fr)}.objects-count *:nth-child(2){justify-content:flex-end;align-items:flex-start}";export{h as gx_ide_ww_images}
|