@genexus/genexus-ide-ui 0.0.25 → 0.0.26
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/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +18 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/team-dev-commit/team-dev-commit.js +23 -11
- package/dist/components/gx-ide-team-dev-commit.js +19 -7
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-team-dev-commit.entry.js +18 -6
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/p-473714a5.entry.js +1 -0
- package/dist/types/common/types.d.ts +5 -0
- package/dist/types/components/team-dev-commit/team-dev-commit.d.ts +7 -7
- package/dist/types/components.d.ts +10 -10
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-dbebb1a0.entry.js +0 -1
|
@@ -24,3 +24,8 @@ export type FormSubmitResult = {
|
|
|
24
24
|
fieldErrors: FormElementValidation[];
|
|
25
25
|
};
|
|
26
26
|
export type ObjectState = "inserted" | "modified" | "deleted" | "conflicted";
|
|
27
|
+
export type ContextMenuInfo = {
|
|
28
|
+
selection: string[];
|
|
29
|
+
clientX: number;
|
|
30
|
+
clientY: number;
|
|
31
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { GxOption, ObjectState } from "../../common/types";
|
|
2
|
+
import { GxOption, ObjectState, ContextMenuInfo } from "../../common/types";
|
|
4
3
|
export declare class GxIdeTeamDevCommit {
|
|
5
4
|
/**
|
|
6
5
|
* The component hard-coded strings translations.
|
|
@@ -14,6 +13,7 @@ export declare class GxIdeTeamDevCommit {
|
|
|
14
13
|
private foldersEl;
|
|
15
14
|
private categoriesEl;
|
|
16
15
|
private chGridPendingCommitsEl;
|
|
16
|
+
private chGridIgnoredObjectsEl;
|
|
17
17
|
private commitComment;
|
|
18
18
|
filtersHidden: boolean;
|
|
19
19
|
comment: string;
|
|
@@ -58,7 +58,7 @@ export declare class GxIdeTeamDevCommit {
|
|
|
58
58
|
/**
|
|
59
59
|
* Callback that must be invoked when user activate the context menu in any of the grids
|
|
60
60
|
*/
|
|
61
|
-
readonly
|
|
61
|
+
readonly objectsContextMenuCallback: ObjectsContextMenuCallback;
|
|
62
62
|
/**
|
|
63
63
|
* This event is emitted once just after the component is fully loaded and the first render() occurs.
|
|
64
64
|
*/
|
|
@@ -75,7 +75,7 @@ export declare class GxIdeTeamDevCommit {
|
|
|
75
75
|
private revertPendingCommitsCheckboxes;
|
|
76
76
|
private renderIconState;
|
|
77
77
|
private pendingCommitsRowMarkingChangedHandler;
|
|
78
|
-
private
|
|
78
|
+
private objectsOnContextMenuCallbackHandler;
|
|
79
79
|
private gridOnSelectionChangedCallbackHandler;
|
|
80
80
|
private renderPendingCommitsGrid;
|
|
81
81
|
private renderIgnoredObjectsGrid;
|
|
@@ -93,10 +93,10 @@ export type ObjetType = {
|
|
|
93
93
|
export type GetRecentComment = () => Promise<string | undefined>;
|
|
94
94
|
export type LoadCallback = (filters: FiltersData) => Promise<CommitData>;
|
|
95
95
|
export type CommitCallback = (selection: string[], commitComment: string) => Promise<boolean>;
|
|
96
|
-
export type SelectCallback = (grid:
|
|
96
|
+
export type SelectCallback = (grid: SourceType, selectionIds: string[]) => Promise<void>;
|
|
97
97
|
export type PendingItemCheckedCallback = (checkedItemIds: string[]) => Promise<PendingItemCheckedResult | undefined>;
|
|
98
|
-
export type
|
|
99
|
-
export type
|
|
98
|
+
export type ObjectsContextMenuCallback = (grid: SourceType, contextMenuInfo: ContextMenuInfo) => Promise<void>;
|
|
99
|
+
export type SourceType = "commit" | "ignored";
|
|
100
100
|
export type CommitData = {
|
|
101
101
|
pending: ModifiedObjectData[];
|
|
102
102
|
ignored: ModifiedObjectData[];
|
|
@@ -15,9 +15,9 @@ import { GxOption } from "./common/types";
|
|
|
15
15
|
import { CancelCallback, ChangedCallback, CreateCallback } from "./components/new-environment/new-environment";
|
|
16
16
|
import { CancelCallback as CancelCallback1, CreateCallback as CreateCallback1, SelectLocationCallback } from "./components/new-kb/new-kb";
|
|
17
17
|
import { LoadReferencesCallback, ObjectData, OpenObjectCallback, OpenSelectorDialogCallback, SelectorSourceCallback, SelectReferenceCallback } from "./components/references/references";
|
|
18
|
-
import { CommitCallback, GetRecentComment,
|
|
18
|
+
import { CommitCallback, GetRecentComment, LoadCallback, ObjectsContextMenuCallback, ObjetType, PendingItemCheckedResult, PendingItemsCheckedState, SelectCallback } from "./components/team-dev-commit/team-dev-commit";
|
|
19
19
|
import { cancelCallback, confirmCallback } from "./components/team-dev-select-recent-comment/team-dev-select-recent-comment";
|
|
20
|
-
import { ConfirmCallback, GridContextMenuCallback
|
|
20
|
+
import { ConfirmCallback, GridContextMenuCallback, LoadCallback as LoadCallback1, ObjectType, PendingItemCheckedCallback, UpdateCallback, UpdateFromData } from "./components/team-dev-update/team-dev-update";
|
|
21
21
|
import { AddCallbackFn, CancelCallbackFn, ConfirmCallbackFn, ObjectData as ObjectData1 } from "./components/team-dev-update-partial-selection/team-dev-update-partial-selection";
|
|
22
22
|
import { cancelCallbackFn, confirmCallbackFn } from "./components/team-dev-update-to-revision/team-dev-update-to-revision";
|
|
23
23
|
import { GxgTreeItemData } from "@genexus/gemini/dist/types/components/tree-item/gxg-tree-item";
|
|
@@ -387,14 +387,14 @@ export namespace Components {
|
|
|
387
387
|
* Callback invoked when user press Recent Comments button.
|
|
388
388
|
*/
|
|
389
389
|
"getRecentCommentCallback": GetRecentComment;
|
|
390
|
-
/**
|
|
391
|
-
* Callback that must be invoked when user activate the context menu in any of the grids
|
|
392
|
-
*/
|
|
393
|
-
"gridContextMenuCallback": GridContextMenuCallback;
|
|
394
390
|
/**
|
|
395
391
|
* Callback invoked when user wants to reload the grid
|
|
396
392
|
*/
|
|
397
393
|
"loadCallback": LoadCallback;
|
|
394
|
+
/**
|
|
395
|
+
* Callback that must be invoked when user activate the context menu in any of the grids
|
|
396
|
+
*/
|
|
397
|
+
"objectsContextMenuCallback": ObjectsContextMenuCallback;
|
|
398
398
|
/**
|
|
399
399
|
* Callback invoked when user check/uncheck any item from the 'Pending to Commit' grid
|
|
400
400
|
*/
|
|
@@ -1099,14 +1099,14 @@ declare namespace LocalJSX {
|
|
|
1099
1099
|
* Callback invoked when user press Recent Comments button.
|
|
1100
1100
|
*/
|
|
1101
1101
|
"getRecentCommentCallback"?: GetRecentComment;
|
|
1102
|
-
/**
|
|
1103
|
-
* Callback that must be invoked when user activate the context menu in any of the grids
|
|
1104
|
-
*/
|
|
1105
|
-
"gridContextMenuCallback"?: GridContextMenuCallback;
|
|
1106
1102
|
/**
|
|
1107
1103
|
* Callback invoked when user wants to reload the grid
|
|
1108
1104
|
*/
|
|
1109
1105
|
"loadCallback"?: LoadCallback;
|
|
1106
|
+
/**
|
|
1107
|
+
* Callback that must be invoked when user activate the context menu in any of the grids
|
|
1108
|
+
*/
|
|
1109
|
+
"objectsContextMenuCallback"?: ObjectsContextMenuCallback;
|
|
1110
1110
|
/**
|
|
1111
1111
|
* This event is emitted once just after the component is fully loaded and the first render() occurs.
|
|
1112
1112
|
*/
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,h as e,H as o,g as a}from"./p-976c3a09.js";import{L as l}from"./p-26957490.js";import{f as s,r}from"./p-72303355.js";const n=class{constructor(o){i(this,o),this.componentDidLoadEvent=t(this,"componentDidLoadEvent",7),this.loadDataCalledFirstTime=!1,this.markAllPendingCommitsRows=()=>{this.chGridPendingCommitsEl.markAllRows()},this.togglePendingCommitsCheckboxes=async i=>{if(this.chGridPendingCommitsEl){const t=i.itemsToCheck,e=i.itemsToUncheck;for(const i of t)await this.chGridPendingCommitsEl.markRow(i,!0);for(const i of e)await this.chGridPendingCommitsEl.markRow(i,!1)}},this.revertPendingCommitsCheckboxes=async(i,t)=>{if(this.chGridPendingCommitsEl){for(const t of i)await this.chGridPendingCommitsEl.markRow(t,!1);for(const i of t)await this.chGridPendingCommitsEl.markRow(i,!0)}},this.renderIconState=i=>{let t,o;switch(i){case"inserted":t="gx-server/new",o="success";break;case"modified":t="gx-server/changes-commit-pending",o="primary-active";break;case"deleted":t="gx-server/delete",o="error";break;case"conflicted":t="gx-server/conflict",o="warning"}return e("gxg-icon",{type:t,color:o})},this.pendingCommitsRowMarkingChangedHandler=async i=>{if(this.chGridPendingCommitsEl.removeEventListener("rowMarkingChanged",this.pendingCommitsRowMarkingChangedHandler),this.chGridPendingCommitsEl){const t=i.detail.addedRowsId,e=i.detail.removedRowsId,o=await this.pendingItemCheckedCallback({itemsChecked:t,itemsUnchecked:e});void 0===o?await this.revertPendingCommitsCheckboxes(t,e):await this.togglePendingCommitsCheckboxes(o),this.chGridPendingCommitsEl.addEventListener("rowMarkingChanged",this.pendingCommitsRowMarkingChangedHandler)}},this.gridOnContextMenuCallbackHandler=i=>async t=>{t.preventDefault(),t.stopPropagation(),this.gridContextMenuCallback&&await this.gridContextMenuCallback(i,t.detail)},this.gridOnSelectionChangedCallbackHandler=i=>async t=>{this.selectCallback&&await this.selectCallback(i,t.detail.rowsId)},this.renderPendingCommitsGrid=()=>e("gxg-grid",null,e("ch-grid",{rowSelectionMode:"multiple",ref:i=>this.chGridPendingCommitsEl=i,part:"ch-grid-pending-commits",class:"no-border",onRowContextMenu:this.gridOnContextMenuCallbackHandler("commit"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("commit")},e("ch-grid-columnset",null,e("ch-grid-column",{columnType:"rich",richRowSelector:!0,richRowSelectorMode:"mark",settingable:!1,sortable:!1,size:"auto"}),e("ch-grid-column",{columnName:"State",settingable:!1,sortable:!1,size:"auto"}),e("ch-grid-column",{settingable:!1,sortable:!1,size:"auto"}),e("ch-grid-column",{sortable:!0,columnName:"Name",settingable:!1,size:"auto"}),e("ch-grid-column",{sortable:!0,columnName:"Type",settingable:!1,size:"auto"}),e("ch-grid-column",{columnName:"Description",settingable:!1,size:"auto"}),e("ch-grid-column",{sortable:!0,columnName:"Modified On",settingable:!1}),e("ch-grid-column",{columnName:"Module",settingable:!1,size:"auto"}),e("ch-grid-column",{columnName:"Local State",settingable:!1,size:"auto"}),e("ch-grid-column",{columnName:"Last Synchronized",settingable:!1,size:"150px"}),e("ch-grid-column",{sortable:!0,columnName:"User",settingable:!1,size:"auto"})),this.pendingCommits.map((i=>e("ch-grid-row",{rowid:i.id},e("ch-grid-cell",{"cell-type":"rich","row-selector":!0}),e("ch-grid-cell",null," ",this.renderIconState(i.state)," "),e("ch-grid-cell",null,e("gxg-icon",{color:"auto",type:i.iconType})),e("ch-grid-cell",null," ",i.name," "),e("ch-grid-cell",null," ",i.type," "),e("ch-grid-cell",null," ",i.description," "),e("ch-grid-cell",null,`${s(i.modifiedOn)}`),e("ch-grid-cell",null," ",i.module," "),e("ch-grid-cell",null," ",i.localState," "),e("ch-grid-cell",null,`${s(i.lastSynchronized)}`),e("ch-grid-cell",null," ",i.user," ")))))),this.renderIgnoredObjectsGrid=()=>e("gxg-grid",null,e("ch-grid",{rowSelectionMode:"multiple",part:"ch-grid-pending-commits",onRowContextMenu:this.gridOnContextMenuCallbackHandler("ignored"),onSelectionChanged:this.gridOnSelectionChangedCallbackHandler("ignored")},e("ch-grid-columnset",null,e("ch-grid-column",{columnName:"",settingable:!1}),e("ch-grid-column",{columnName:"TypeIcon",settingable:!1}),e("ch-grid-column",{columnName:"Name",settingable:!1,sortable:!0}),e("ch-grid-column",{columnName:"Type",settingable:!1}),e("ch-grid-column",{columnName:"Description",settingable:!1}),e("ch-grid-column",{columnName:"Modified On",settingable:!1}),e("ch-grid-column",{columnName:"Module",settingable:!1}),e("ch-grid-column",{columnName:"Local State",settingable:!1}),e("ch-grid-column",{columnName:"Last Synchronized",settingable:!1}),e("ch-grid-column",{columnName:"User",settingable:!1})),this.ignoredObjects.map((i=>e("ch-grid-row",{"row-id":i.id,selected:!0},e("ch-grid-cell",null," ",this.renderIconState(i.state)," "),e("ch-grid-cell",null,e("gxg-icon",{color:"auto",type:i.iconType})),e("ch-grid-cell",null," ",i.name," "),e("ch-grid-cell",null," ",i.type," "),e("ch-grid-cell",null," ",i.description," "),e("ch-grid-cell",null,`${s(i.modifiedOn)}`),e("ch-grid-cell",null," ",i.module," "),e("ch-grid-cell",null," ",i.localState," "),e("ch-grid-cell",null,`${s(i.lastSynchronized)}`),e("ch-grid-cell",null," ",i.user," ")))))),this.getRecentCommentHandler=async()=>{if(this.getRecentCommentCallback){const i=await this.getRecentCommentCallback();i&&(this.comment=i)}},this.commitCallbackHandler=async()=>{const i=this.commitComment.value;this.chGridPendingCommitsEl.getMarkedRows().then((async t=>{await this.commitCallback(t,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:t})=>{this.pendingCommits=i,this.ignoredObjects=t,this.loadDataCalledFirstTime||(this.loadDataCalledFirstTime=!0)}))},this.toggleFiltersHandler=()=>{this.filtersHidden=!this.filtersHidden},this.filtersHidden=!0,this.comment="",this.pendingCommits=[],this.ignoredObjects=[],this.changeSet=void 0,this.types=void 0,this.folders=void 0,this.categories=void 0,this.getRecentCommentCallback=void 0,this.loadCallback=void 0,this.commitCallback=void 0,this.selectCallback=void 0,this.pendingItemCheckedCallback=void 0,this.gridContextMenuCallback=void 0}async componentWillLoad(){this._componentLocale=await l.getComponentStrings(this.el)}async componentDidLoad(){await this.loadData(),this.componentDidLoadEvent.emit(!0)}async componentDidRender(){this.loadDataCalledFirstTime&&(await this.markAllPendingCommitsRows(),this.chGridPendingCommitsEl.addEventListener("rowMarkingChanged",this.pendingCommitsRowMarkingChangedHandler),this.loadDataCalledFirstTime=!1)}async reload(){this.loadData()}render(){return e(o,{class:"gx-ide-component"},e("div",{class:"gx-ide-main-wrapper gx-ide-overflow"},e("gxg-container",null,e("header",{class:"header grid"},e("gxg-form-textarea",{id:"gxg-textarea",height:"100px",label:this._componentLocale.topMenu.commentLabel,value:this.comment,ref:i=>this.commitComment=i,placeholder:this._componentLocale.topMenu.commentPlaceholder}),e("gxg-button",{type:"outlined",part:"location",onClick:this.getRecentCommentHandler},this._componentLocale.topMenu.recentCommentsButton))),e("main",{class:"main"},e("gxg-container",{fieldset:!0,noContentPadding:!!this.filtersHidden},e("div",{class:"grid second-grid"},e("div",{class:"actions-row grid"},e("gxg-form-text",{class:this.filtersHidden?"hidden":null,"disable-filter":!0,label:this._componentLocale.filtersMenu.patternLabel,labelPosition:"start",value:"",ref:i=>this.patternEl=i,"display-validation-styles":!0,"display-validation-message":!0,part:"pattern",onInput:this.loadData}),e("div",{class:"action-buttons",slot:"tab-bar"},e("gxg-button",{onClick:this.toggleFiltersHandler,type:"secondary-icon-only",icon:"patterns/filters",part:"gxg-button gxg-button--show-filter"}),e("gxg-button",{type:"secondary-icon-only",icon:"gemini-tools/reset",onClick:this.loadData,part:"gxg-button gxg-button--reload"}))),e("div",{class:"filters-grid grid "+(this.filtersHidden?"hidden":null)},e("div",{class:"first-row grid"},e("gxg-combo-box",{labelPosition:"start","disable-filter":!0,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)),e("gxg-combo-box",{labelPosition:"start","disable-filter":!0,label:this._componentLocale.filtersMenu.typeLabel,value:this.types[0].id,ref:i=>this.typesEl=i,part:"type",onValueChanged:this.loadData},r(this.types))),e("div",{class:"second-row grid"},e("gxg-combo-box",{labelPosition:"start","disable-filter":!0,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)),e("gxg-combo-box",{labelPosition:"start","disable-filter":!0,label:this._componentLocale.filtersMenu.categoryLabel,value:this.categories[0].id,ref:i=>this.categoriesEl=i,part:"categories",onValueChanged:this.loadData},r(this.categories)))))),e("gxg-container",null,e("gxg-tabs",{height:"100%",position:"top",class:"gxg-tabs"},e("gxg-tab-bar",{slot:"tab-bar-container"},e("gxg-tab-button",{slot:"tab-bar","tab-label":`${this._componentLocale.tabs.pendingCommits} (${this.pendingCommits.length})`,tab:"pending-commits","is-selected":!0}),e("gxg-tab-button",{slot:"tab-bar","tab-label":`${this._componentLocale.tabs.ignoredObjects} (${this.ignoredObjects.length})`,tab:"ignored-objects"})),e("gxg-tab",{tab:"pending-commits","no-padding":!0},this.renderPendingCommitsGrid()),e("gxg-tab",{tab:"ignored-objects","no-padding":!0},this.renderIgnoredObjectsGrid())),e("gxg-button",{slot:"footer",type:"primary-text-only",onClick:this.commitCallbackHandler,part:"commit-button"},this._componentLocale.footer.commitButton)))))}static get assetsDirs(){return["gx-ide-assets/team-dev-commit"]}get el(){return a(this)}};n.style=".gxi-hidden{display:none !important}.gxi-full-height{height:100%}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}:host(.gx-ide-component){box-shadow:var(--box-shadow-01) !important;height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--font-weight-regular);font-size:var(--font-size-lg);line-height:1.6em;height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:6px;height:6px}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-main::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-main .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:6px;height:6px}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.gx-ide-overflow .gxg-scroll{display:block;overflow-y:auto;padding-inline-end:2px}:host{display:block}.main-wrapper{width:100%}.gxg-tabs{margin-top:0;box-shadow:none}.header{grid-template-columns:4fr auto}.second-grid{grid-template-rows:1fr auto}.second-grid .actions-row{grid-template-columns:1fr auto}.action-buttons{justify-self:flex-end}.hidden{display:none}.filters-grid{grid-template-rows:repeat(2, 1fr)}.filters-grid .first-row{grid-template-columns:repeat(2, 1fr)}.filters-grid .second-row{grid-template-columns:repeat(2, 1fr)}";export{n as gx_ide_team_dev_commit}
|