@genexus/genexus-ide-ui 1.1.48 → 1.1.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/cjs/{form-validation-178cf461.js → form-validation-54acc775.js} +11 -1
  2. package/dist/cjs/form-validation-54acc775.js.map +1 -0
  3. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  4. package/dist/cjs/gx-ide-connect-gx-server.cjs.entry.js +1 -1
  5. package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js +1 -1
  6. package/dist/cjs/gx-ide-curl-inspector.cjs.entry.js +1 -1
  7. package/dist/cjs/gx-ide-json-import.cjs.entry.js +1 -1
  8. package/dist/cjs/gx-ide-name-picker.cjs.entry.js +2 -1
  9. package/dist/cjs/gx-ide-name-picker.cjs.entry.js.map +1 -1
  10. package/dist/cjs/gx-ide-new-environment.cjs.entry.js +1 -1
  11. package/dist/cjs/gx-ide-new-kb.cjs.entry.js +1 -1
  12. package/dist/cjs/gx-ide-new-version.cjs.entry.js +1 -1
  13. package/dist/cjs/gx-ide-server-selector.cjs.entry.js +61 -30
  14. package/dist/cjs/gx-ide-server-selector.cjs.entry.js.map +1 -1
  15. package/dist/cjs/gx-ide-share-kb.cjs.entry.js +1 -1
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/collection/common/form-validation.js +9 -0
  18. package/dist/collection/common/form-validation.js.map +1 -1
  19. package/dist/collection/components/name-picker/name-picker.js +2 -1
  20. package/dist/collection/components/name-picker/name-picker.js.map +1 -1
  21. package/dist/collection/components/team-dev/server-selector/server-selector.css +4 -0
  22. package/dist/collection/components/team-dev/server-selector/server-selector.js +72 -32
  23. package/dist/collection/components/team-dev/server-selector/server-selector.js.map +1 -1
  24. package/dist/components/form-validation.js +10 -1
  25. package/dist/components/form-validation.js.map +1 -1
  26. package/dist/components/gx-ide-name-picker.js +2 -1
  27. package/dist/components/gx-ide-name-picker.js.map +1 -1
  28. package/dist/components/gx-ide-server-selector.js +61 -31
  29. package/dist/components/gx-ide-server-selector.js.map +1 -1
  30. package/dist/esm/{form-validation-cd0215c6.js → form-validation-21ab3766.js} +11 -2
  31. package/dist/esm/form-validation-21ab3766.js.map +1 -0
  32. package/dist/esm/genexus-ide-ui.js +1 -1
  33. package/dist/esm/gx-ide-connect-gx-server.entry.js +1 -1
  34. package/dist/esm/gx-ide-create-kb-from-server.entry.js +1 -1
  35. package/dist/esm/gx-ide-curl-inspector.entry.js +1 -1
  36. package/dist/esm/gx-ide-json-import.entry.js +1 -1
  37. package/dist/esm/gx-ide-name-picker.entry.js +2 -1
  38. package/dist/esm/gx-ide-name-picker.entry.js.map +1 -1
  39. package/dist/esm/gx-ide-new-environment.entry.js +1 -1
  40. package/dist/esm/gx-ide-new-kb.entry.js +1 -1
  41. package/dist/esm/gx-ide-new-version.entry.js +1 -1
  42. package/dist/esm/gx-ide-server-selector.entry.js +61 -30
  43. package/dist/esm/gx-ide-server-selector.entry.js.map +1 -1
  44. package/dist/esm/gx-ide-share-kb.entry.js +1 -1
  45. package/dist/esm/loader.js +1 -1
  46. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  47. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  48. package/dist/genexus-ide-ui/{p-4b06b578.entry.js → p-06561f7e.entry.js} +147 -121
  49. package/dist/genexus-ide-ui/p-06561f7e.entry.js.map +1 -0
  50. package/dist/genexus-ide-ui/{p-16a88fc3.entry.js → p-098a7288.entry.js} +2 -2
  51. package/dist/genexus-ide-ui/{p-0ae0616f.entry.js → p-5f65a4bb.entry.js} +2 -2
  52. package/dist/genexus-ide-ui/{p-443fc479.entry.js → p-5fe6189e.entry.js} +11 -11
  53. package/dist/genexus-ide-ui/{p-137a252f.entry.js → p-67cf4af1.entry.js} +2 -2
  54. package/dist/genexus-ide-ui/p-b32b6b1f.js +49 -0
  55. package/dist/genexus-ide-ui/p-b32b6b1f.js.map +1 -0
  56. package/dist/genexus-ide-ui/{p-d01bbc7a.entry.js → p-cccd6565.entry.js} +2 -2
  57. package/dist/genexus-ide-ui/{p-b34ecbdc.entry.js → p-d24c1115.entry.js} +2 -2
  58. package/dist/genexus-ide-ui/{p-09a634fc.entry.js → p-db07c544.entry.js} +8 -8
  59. package/dist/genexus-ide-ui/{p-af975c83.entry.js → p-eacc81c8.entry.js} +2 -2
  60. package/dist/genexus-ide-ui/{p-e3bce13e.entry.js → p-ee7232f2.entry.js} +33 -32
  61. package/dist/genexus-ide-ui/p-ee7232f2.entry.js.map +1 -0
  62. package/dist/types/common/form-validation.d.ts +1 -0
  63. package/dist/types/components/team-dev/server-selector/server-selector.d.ts +2 -6
  64. package/dist/types/components.d.ts +8 -6
  65. package/package.json +1 -1
  66. package/dist/cjs/form-validation-178cf461.js.map +0 -1
  67. package/dist/esm/form-validation-cd0215c6.js.map +0 -1
  68. package/dist/genexus-ide-ui/p-289c3290.js +0 -39
  69. package/dist/genexus-ide-ui/p-289c3290.js.map +0 -1
  70. package/dist/genexus-ide-ui/p-4b06b578.entry.js.map +0 -1
  71. package/dist/genexus-ide-ui/p-e3bce13e.entry.js.map +0 -1
  72. /package/dist/genexus-ide-ui/{p-16a88fc3.entry.js.map → p-098a7288.entry.js.map} +0 -0
  73. /package/dist/genexus-ide-ui/{p-0ae0616f.entry.js.map → p-5f65a4bb.entry.js.map} +0 -0
  74. /package/dist/genexus-ide-ui/{p-443fc479.entry.js.map → p-5fe6189e.entry.js.map} +0 -0
  75. /package/dist/genexus-ide-ui/{p-137a252f.entry.js.map → p-67cf4af1.entry.js.map} +0 -0
  76. /package/dist/genexus-ide-ui/{p-d01bbc7a.entry.js.map → p-cccd6565.entry.js.map} +0 -0
  77. /package/dist/genexus-ide-ui/{p-b34ecbdc.entry.js.map → p-d24c1115.entry.js.map} +0 -0
  78. /package/dist/genexus-ide-ui/{p-09a634fc.entry.js.map → p-db07c544.entry.js.map} +0 -0
  79. /package/dist/genexus-ide-ui/{p-af975c83.entry.js.map → p-eacc81c8.entry.js.map} +0 -0
@@ -2,7 +2,7 @@ import { r as e, h as t, H as s, a as i } from "./p-97107ecc.js";
2
2
 
3
3
  import { L as o } from "./p-311eedf3.js";
4
4
 
5
- import { v as n } from "./p-289c3290.js";
5
+ import { v as n } from "./p-b32b6b1f.js";
6
6
 
7
7
  import { c as a } from "./p-9a03ac9f.js";
8
8
 
@@ -215,4 +215,4 @@ v = new WeakMap, w = new WeakMap, m = new WeakMap, b = new WeakMap;
215
215
  W.style = c;
216
216
 
217
217
  export { W as gx_ide_new_version };
218
- //# sourceMappingURL=p-0ae0616f.entry.js.map
218
+ //# sourceMappingURL=p-5f65a4bb.entry.js.map
@@ -4,7 +4,7 @@ import { c as n } from "./p-9a03ac9f.js";
4
4
 
5
5
  import { L as o } from "./p-311eedf3.js";
6
6
 
7
- import { v as a } from "./p-289c3290.js";
7
+ import { v as a } from "./p-b32b6b1f.js";
8
8
 
9
9
  const l = ':host{display:grid;grid-template-rows:max-content 1fr max-content;block-size:100%;overflow:auto}.section{display:contents}.main{display:grid;overflow:auto}.field-group-name-description-module{align-items:center;grid-template-areas:"name-label name-input" "description-label description-input" "module-label module-entity-selector";grid-template-columns:max-content 1fr}.name-label{grid-area:name-label}.name-input{grid-area:name-input}.description-label{grid-area:description-label}.description-input{grid-area:description-input}.module-label{grid-area:module-label}.module-entity-selector{grid-area:module-entity-selector}.tooltip{height:0}';
10
10
 
@@ -21,7 +21,7 @@ var d = undefined && undefined.__classPrivateFieldSet || function(t, i, e, s, n)
21
21
  return s === "a" ? n.call(t, e) : n ? n.value = e : i.set(t, e), e;
22
22
  };
23
23
 
24
- var h, c, f, u, p, m, v, b, w, g, y, k, M, W;
24
+ var h, c, f, u, p, m, b, v, w, g, y, k, M, W;
25
25
 
26
26
  const x = [ "resets/box-sizing", "components/tooltip", "utils/form--full", "utils/layout", "utils/typography", "utils/spacing", "chameleon/scrollbar" ];
27
27
 
@@ -34,8 +34,8 @@ const E = class {
34
34
  u.set(this, void 0);
35
35
  p.set(this, void 0);
36
36
  m.set(this, void 0);
37
- v.set(this, void 0);
38
37
  b.set(this, void 0);
38
+ v.set(this, void 0);
39
39
  w.set(this, (() => {
40
40
  const t = [ r(this, p, "f"), r(this, u, "f") ];
41
41
  t.forEach((t => {
@@ -79,19 +79,19 @@ const E = class {
79
79
  if (i.length) {
80
80
  d(this, m, i[0], "f");
81
81
  r(this, m, "f").addEventListener("input", r(this, k, "f"));
82
- d(this, v, (t => {
82
+ d(this, b, (t => {
83
83
  this.curlContent = t.detail.content;
84
84
  r(this, k, "f").call(this);
85
85
  }), "f");
86
- r(this, m, "f").addEventListener("curl-content-change", r(this, v, "f"));
87
- d(this, b, (t => {
86
+ r(this, m, "f").addEventListener("curl-content-change", r(this, b, "f"));
87
+ d(this, v, (t => {
88
88
  if ((t.ctrlKey || t.metaKey) && t.key === "v") {
89
89
  setTimeout((() => {
90
90
  r(this, k, "f").call(this);
91
91
  }), 0);
92
92
  }
93
93
  }), "f");
94
- r(this, m, "f").addEventListener("keydown", r(this, b, "f"));
94
+ r(this, m, "f").addEventListener("keydown", r(this, v, "f"));
95
95
  this.curlContent = r(this, m, "f").text;
96
96
  r(this, y, "f").call(this);
97
97
  }
@@ -128,8 +128,8 @@ const E = class {
128
128
  disconnectedCallback() {
129
129
  if (r(this, m, "f") && r(this, m, "f").removeEventListener) {
130
130
  r(this, m, "f").removeEventListener("input", r(this, k, "f"));
131
- r(this, m, "f").removeEventListener("curl-content-change", r(this, v, "f"));
132
- r(this, m, "f").removeEventListener("keydown", r(this, b, "f"));
131
+ r(this, m, "f").removeEventListener("curl-content-change", r(this, b, "f"));
132
+ r(this, m, "f").removeEventListener("keydown", r(this, v, "f"));
133
133
  }
134
134
  }
135
135
  /**
@@ -208,10 +208,10 @@ const E = class {
208
208
  };
209
209
 
210
210
  h = new WeakMap, c = new WeakMap, f = new WeakMap, u = new WeakMap, p = new WeakMap,
211
- m = new WeakMap, v = new WeakMap, b = new WeakMap, w = new WeakMap, g = new WeakMap,
211
+ m = new WeakMap, b = new WeakMap, v = new WeakMap, w = new WeakMap, g = new WeakMap,
212
212
  y = new WeakMap, k = new WeakMap, M = new WeakMap, W = new WeakMap;
213
213
 
214
214
  E.style = l;
215
215
 
216
216
  export { E as gx_ide_curl_inspector };
217
- //# sourceMappingURL=p-443fc479.entry.js.map
217
+ //# sourceMappingURL=p-5fe6189e.entry.js.map
@@ -8,7 +8,7 @@ import { r, m as h } from "./p-1972b953.js";
8
8
 
9
9
  import { s as c, g as d } from "./p-8c2e9df4.js";
10
10
 
11
- import { v as l } from "./p-289c3290.js";
11
+ import { v as l } from "./p-b32b6b1f.js";
12
12
 
13
13
  import { r as f } from "./p-1252519a.js";
14
14
 
@@ -442,4 +442,4 @@ N = new WeakMap;
442
442
  Z.style = u;
443
443
 
444
444
  export { Z as gx_ide_new_environment };
445
- //# sourceMappingURL=p-137a252f.entry.js.map
445
+ //# sourceMappingURL=p-67cf4af1.entry.js.map
@@ -0,0 +1,49 @@
1
+ // formSubmitValidation will be deprecated. use "validateControls" instead.
2
+ // TODO: Improve the way we mark components with error. We must not use error classes.
3
+ const o = {
4
+ "ch-checkbox": "checkbox-error",
5
+ "ch-combo-box-render": "combo-box-error",
6
+ "ch-edit": "input-error"
7
+ };
8
+
9
+ const toggleErrorClass = (c, e) => {
10
+ const s = e.tagName.toLowerCase();
11
+ const n = o[s];
12
+ if (c) {
13
+ e.classList.add(n);
14
+ } else {
15
+ e.classList.remove(n);
16
+ }
17
+ };
18
+
19
+ const validateControls = (o, c) => {
20
+ const e = new Map(c);
21
+ o.fieldErrors.forEach((o => {
22
+ const c = o.key;
23
+ const s = o.hasError;
24
+ const n = e.get(c);
25
+ if (n === null || n === void 0 ? void 0 : n.reference) {
26
+ // toggle class to add or remove error style
27
+ toggleErrorClass(s, n.reference);
28
+ e.set(c, Object.assign(Object.assign({}, n), {
29
+ hasError: s,
30
+ message: o.message
31
+ }));
32
+ }
33
+ }));
34
+ // return validatableControls updated.
35
+ return e;
36
+ };
37
+
38
+ const clearControlError = (o, c) => {
39
+ const e = o.get(c);
40
+ if (e === null || e === void 0 ? void 0 : e.reference) {
41
+ toggleErrorClass(false, e.reference);
42
+ e.hasError = false;
43
+ e.message = "";
44
+ o.set(c, e);
45
+ }
46
+ };
47
+
48
+ export { clearControlError as c, validateControls as v };
49
+ //# sourceMappingURL=p-b32b6b1f.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["formElementsErrorClassesDictionary","toggleErrorClass","hasError","element","elementTagName","tagName","toLowerCase","errorClass","classList","add","remove","validateControls","formSubmitResult","validatableControls","validatableControlsUpdated","Map","fieldErrors","forEach","fieldResult","fieldKey","key","fieldHasError","controlMapRecord","get","reference","set","Object","assign","message","clearControlError","controlId","control"],"sources":["src/common/form-validation.ts"],"sourcesContent":["import { FormSubmitResult, ConnectionResultData } from \"../common/types\";\nimport { FormComponent } from \"@genexus/gemini/dist/types/common/interfaces\";\n\n// formSubmitValidation will be deprecated. use \"validateControls\" instead.\nexport const formSubmitValidation = (\n result: FormSubmitResult | ConnectionResultData,\n ref: any\n) => {\n result.fieldErrors?.forEach(element => {\n const key = element.key;\n const message = element.message;\n const hasError = element.hasError;\n\n const reference: FormComponent = ref[`${key}El`];\n if (reference && hasError && message.trim()) {\n reference.validationStatus = \"error\";\n reference.validationMessage = message;\n } else if (reference && !hasError) {\n reference.validationStatus = \"indeterminate\";\n reference.validationMessage = null;\n }\n });\n};\n\n// TODO: Improve the way we mark components with error. We must not use error classes.\nconst formElementsErrorClassesDictionary = {\n \"ch-checkbox\": \"checkbox-error\",\n \"ch-combo-box-render\": \"combo-box-error\",\n \"ch-edit\": \"input-error\"\n} as const;\n\nconst toggleErrorClass = (hasError: boolean, element: HTMLElement) => {\n const elementTagName = element.tagName.toLowerCase();\n const errorClass =\n formElementsErrorClassesDictionary[\n elementTagName as keyof typeof formElementsErrorClassesDictionary\n ];\n if (hasError) {\n element.classList.add(errorClass);\n } else {\n element.classList.remove(errorClass);\n }\n};\n\nexport const validateControls = (\n formSubmitResult: FormSubmitResult,\n validatableControls: Map<string, ControlValidation>\n): Map<string, ControlValidation> => {\n const validatableControlsUpdated = new Map(validatableControls);\n formSubmitResult.fieldErrors.forEach(fieldResult => {\n const fieldKey = fieldResult.key;\n const fieldHasError = fieldResult.hasError;\n const controlMapRecord = validatableControlsUpdated.get(fieldKey);\n if (controlMapRecord?.reference) {\n // toggle class to add or remove error style\n toggleErrorClass(fieldHasError, controlMapRecord.reference);\n validatableControlsUpdated.set(fieldKey, {\n ...controlMapRecord,\n hasError: fieldHasError,\n message: fieldResult.message\n });\n }\n });\n // return validatableControls updated.\n return validatableControlsUpdated;\n};\n\nexport const clearControlError = (\n validatableControls: Map<string, ControlValidation>,\n controlId: string\n) => {\n const control = validatableControls.get(controlId);\n if (control?.reference) {\n toggleErrorClass(false, control.reference);\n control.hasError = false;\n control.message = \"\";\n validatableControls.set(controlId, control);\n }\n};\n\nexport type ControlValidation = {\n reference: HTMLElement;\n hasError: boolean;\n message: string;\n};\n"],"mappings":";;AAyBA,MAAMA,IAAqC;EACzC,eAAe;EACf,uBAAuB;EACvB,WAAW;;;AAGb,MAAMC,mBAAmB,CAACC,GAAmBC;EAC3C,MAAMC,IAAiBD,EAAQE,QAAQC;EACvC,MAAMC,IACJP,EACEI;EAEJ,IAAIF,GAAU;IACZC,EAAQK,UAAUC,IAAIF;SACjB;IACLJ,EAAQK,UAAUE,OAAOH;;;;MAIhBI,mBAAmB,CAC9BC,GACAC;EAEA,MAAMC,IAA6B,IAAIC,IAAIF;EAC3CD,EAAiBI,YAAYC,SAAQC;IACnC,MAAMC,IAAWD,EAAYE;IAC7B,MAAMC,IAAgBH,EAAYhB;IAClC,MAAMoB,IAAmBR,EAA2BS,IAAIJ;IACxD,IAAIG,MAAgB,QAAhBA,WAAgB,aAAhBA,EAAkBE,WAAW;;MAE/BvB,iBAAiBoB,GAAeC,EAAiBE;MACjDV,EAA2BW,IAAIN,GAAQO,OAAAC,OAAAD,OAAAC,OAAA,IAClCL,IAAgB;QACnBpB,UAAUmB;QACVO,SAASV,EAAYU;;;;;IAK3B,OAAOd;AAA0B;;MAGtBe,oBAAoB,CAC/BhB,GACAiB;EAEA,MAAMC,IAAUlB,EAAoBU,IAAIO;EACxC,IAAIC,MAAO,QAAPA,WAAO,aAAPA,EAASP,WAAW;IACtBvB,iBAAiB,OAAO8B,EAAQP;IAChCO,EAAQ7B,WAAW;IACnB6B,EAAQH,UAAU;IAClBf,EAAoBY,IAAIK,GAAWC"}
@@ -6,7 +6,7 @@ import { c as a } from "./p-9a03ac9f.js";
6
6
 
7
7
  import { L as l } from "./p-311eedf3.js";
8
8
 
9
- import { v as r } from "./p-289c3290.js";
9
+ import { v as r } from "./p-b32b6b1f.js";
10
10
 
11
11
  const d = ':host{display:grid;grid-template-rows:max-content 1fr max-content;block-size:100%;overflow:auto}.section{display:contents}.main{display:grid;grid-template-rows:1fr max-content;overflow:auto}.field-group-name-description-module{grid-template-areas:"name-label name-input" "description-label description-input" "module-label module-entity-selector";grid-template-columns:max-content 1fr}.name-label{grid-area:name-label}.name-input{grid-area:name-input}.description-label{grid-area:description-label}.description-input{grid-area:description-input}.module-label{grid-area:module-label}.module-entity-selector{grid-area:module-entity-selector}.radio-file-input-wrapper{grid-template-columns:max-content 1fr}div.field-file-input{grid-template-columns:1fr max-content}.json-area{display:grid;grid-template-rows:1fr max-content;overflow:auto}.slotted-container{overflow:auto;block-size:100%}.input-file{display:grid;grid-template-columns:1fr max-content}.radio-group{gap:30px !important}.tooltip{height:0px}';
12
12
 
@@ -323,4 +323,4 @@ I = new WeakMap, L = new WeakMap;
323
323
  A.style = d;
324
324
 
325
325
  export { A as gx_ide_json_import };
326
- //# sourceMappingURL=p-d01bbc7a.entry.js.map
326
+ //# sourceMappingURL=p-cccd6565.entry.js.map
@@ -4,7 +4,7 @@ import { g as o } from "./p-401bfc97.js";
4
4
 
5
5
  import { c as r } from "./p-9a03ac9f.js";
6
6
 
7
- import { v as l } from "./p-289c3290.js";
7
+ import { v as l } from "./p-b32b6b1f.js";
8
8
 
9
9
  import { L as h } from "./p-311eedf3.js";
10
10
 
@@ -351,4 +351,4 @@ A = new WeakMap, P = new WeakMap, z = new WeakMap, L = new WeakMap;
351
351
  K.style = c;
352
352
 
353
353
  export { K as gx_ide_create_kb_from_server };
354
- //# sourceMappingURL=p-b34ecbdc.entry.js.map
354
+ //# sourceMappingURL=p-d24c1115.entry.js.map
@@ -2,7 +2,7 @@ import { r as e, h as t, H as i, a as s } from "./p-97107ecc.js";
2
2
 
3
3
  import { c as a } from "./p-9a03ac9f.js";
4
4
 
5
- import { v as n } from "./p-289c3290.js";
5
+ import { v as n } from "./p-b32b6b1f.js";
6
6
 
7
7
  import { L as o } from "./p-311eedf3.js";
8
8
 
@@ -26,7 +26,7 @@ var d = undefined && undefined.__classPrivateFieldSet || function(e, t, i, s, a)
26
26
  return s === "a" ? a.call(e, i) : a ? a.value = i : t.set(e, i), i;
27
27
  };
28
28
 
29
- var h, c, u, p, f, v, m, w, y, b, g, k;
29
+ var h, c, u, p, f, v, m, w, b, y, g, k;
30
30
 
31
31
  const M = [ "resets/box-sizing", "components/tooltip", "utils/form--full", "utils/layout", "utils/typography", "utils/spacing", "chameleon/scrollbar" ];
32
32
 
@@ -75,7 +75,7 @@ const W = class {
75
75
  name: (s = this.authenticationTypesComboBoxModel[0]) === null || s === void 0 ? void 0 : s.caption
76
76
  };
77
77
  }));
78
- y.set(this, (() => {
78
+ b.set(this, (() => {
79
79
  // populate #controlsValidation with the controls that could have errors.
80
80
  const e = [ l(this, c, "f"), l(this, u, "f"), l(this, p, "f") ];
81
81
  e.forEach((e => {
@@ -88,7 +88,7 @@ const W = class {
88
88
  }
89
89
  }));
90
90
  }));
91
- b.set(this, (e => {
91
+ y.set(this, (e => {
92
92
  const t = e.detail;
93
93
  const i = this.authenticationTypes.findIndex((e => e.id === t));
94
94
  const s = this.authenticationTypes[i].name;
@@ -131,7 +131,7 @@ const W = class {
131
131
  l(this, w, "f").call(this);
132
132
  }
133
133
  async componentDidLoad() {
134
- l(this, y, "f").call(this);
134
+ l(this, b, "f").call(this);
135
135
  }
136
136
  render() {
137
137
  var e, s, a, n;
@@ -169,7 +169,7 @@ const W = class {
169
169
  model: this.authenticationTypesComboBoxModel,
170
170
  placeholder: "Select an authentication type",
171
171
  value: (s = this.gxServerConnectionData) === null || s === void 0 ? void 0 : s.authenticationType.id,
172
- onInput: l(this, b, "f")
172
+ onInput: l(this, y, "f")
173
173
  })), t("div", {
174
174
  // username
175
175
  class: "field field-block user-name"
@@ -225,10 +225,10 @@ const W = class {
225
225
  };
226
226
 
227
227
  h = new WeakMap, c = new WeakMap, u = new WeakMap, p = new WeakMap, f = new WeakMap,
228
- v = new WeakMap, m = new WeakMap, w = new WeakMap, y = new WeakMap, b = new WeakMap,
228
+ v = new WeakMap, m = new WeakMap, w = new WeakMap, b = new WeakMap, y = new WeakMap,
229
229
  g = new WeakMap, k = new WeakMap;
230
230
 
231
231
  W.style = r;
232
232
 
233
233
  export { W as gx_ide_connect_gx_server };
234
- //# sourceMappingURL=p-09a634fc.entry.js.map
234
+ //# sourceMappingURL=p-db07c544.entry.js.map
@@ -10,7 +10,7 @@ import { s as l, g as r } from "./p-8c2e9df4.js";
10
10
 
11
11
  import { r as d, m as c } from "./p-1972b953.js";
12
12
 
13
- import { v as f } from "./p-289c3290.js";
13
+ import { v as f } from "./p-b32b6b1f.js";
14
14
 
15
15
  import { r as p } from "./p-1252519a.js";
16
16
 
@@ -750,4 +750,4 @@ et = new WeakMap, at = new WeakMap, ot = new WeakMap, nt = new WeakMap;
750
750
  ut.style = u;
751
751
 
752
752
  export { ut as gx_ide_new_kb };
753
- //# sourceMappingURL=p-af975c83.entry.js.map
753
+ //# sourceMappingURL=p-eacc81c8.entry.js.map
@@ -2,51 +2,52 @@ import { r as t, h as e, H as i, a as s } from "./p-97107ecc.js";
2
2
 
3
3
  import { c as n } from "./p-9a03ac9f.js";
4
4
 
5
- import { v as o } from "./p-289c3290.js";
5
+ import { c as o, v as a } from "./p-b32b6b1f.js";
6
6
 
7
- import { L as a } from "./p-311eedf3.js";
7
+ import { L as r } from "./p-311eedf3.js";
8
8
 
9
- const r = ":host{display:grid;block-size:100%;grid-template-rows:1fr max-content}.field-group{grid-auto-rows:max-content}.main{overflow:auto}.section{display:contents}.tooltip{position:absolute}";
9
+ const l = ":host{display:grid;block-size:100%;grid-template-rows:1fr max-content}.field-group{grid-auto-rows:max-content}.main{overflow:auto}.section{display:contents}.tooltip{position:absolute}";
10
10
 
11
- var l = undefined && undefined.__classPrivateFieldGet || function(t, e, i, s) {
11
+ var c = undefined && undefined.__classPrivateFieldGet || function(t, e, i, s) {
12
12
  if (i === "a" && !s) throw new TypeError("Private accessor was defined without a getter");
13
13
  if (typeof e === "function" ? t !== e || !s : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
14
  return i === "m" ? s : i === "a" ? s.call(t) : s ? s.value : e.get(t);
15
15
  };
16
16
 
17
- var c = undefined && undefined.__classPrivateFieldSet || function(t, e, i, s, n) {
17
+ var d = undefined && undefined.__classPrivateFieldSet || function(t, e, i, s, n) {
18
18
  if (s === "m") throw new TypeError("Private method is not writable");
19
19
  if (s === "a" && !n) throw new TypeError("Private accessor was defined without a setter");
20
20
  if (typeof e === "function" ? t !== e || !n : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
21
21
  return s === "a" ? n.call(t, i) : n ? n.value = i : e.set(t, i), i;
22
22
  };
23
23
 
24
- var d, h, f, p, u, m, w;
24
+ var h, f, p, u, m, w, b;
25
25
 
26
26
  const v = [ "resets/box-sizing", "utils/form", "utils/spacing", "utils/layout", "chameleon/scrollbar", "components/button", "components/edit", "components/tooltip" ];
27
27
 
28
- const b = class {
28
+ const g = class {
29
29
  constructor(i) {
30
30
  t(this, i);
31
31
  /**
32
32
  * The component hard-coded strings translations.
33
33
  */
34
34
  // eslint-disable-next-line @stencil-community/own-props-must-be-private
35
- d.set(this, void 0);
36
- h.set(this, void 0);
37
- f.set(this, (t => {
35
+ h.set(this, void 0);
36
+ f.set(this, void 0);
37
+ p.set(this, (t => {
38
38
  this.inputValue = t.detail;
39
+ o(this.validatableControls, "input-name");
39
40
  }));
40
- p.set(this, (async () => {
41
+ u.set(this, (async () => {
41
42
  this.cancelCallback();
42
43
  }));
43
- u.set(this, (async () => {
44
+ m.set(this, (async () => {
44
45
  const t = await this.createCallback(this.inputValue);
45
- this.validatableControls = o(t, this.validatableControls);
46
+ this.validatableControls = a(t, this.validatableControls);
46
47
  }));
47
- m.set(this, (() => {
48
+ w.set(this, (() => {
48
49
  // populate validatableControls with the controls that could have errors.
49
- const t = [ l(this, h, "f") ];
50
+ const t = [ c(this, f, "f") ];
50
51
  t.forEach((t => {
51
52
  if (t.id) {
52
53
  this.validatableControls.set(t.id, {
@@ -59,7 +60,7 @@ const b = class {
59
60
  }));
60
61
  // TODO: evaluate if this should be a global helper function.
61
62
  // It is used on other dialogs as well.
62
- w.set(this, (t => {
63
+ b.set(this, (t => {
63
64
  var i, s, o;
64
65
  return ((s = (i = this.validatableControls) === null || i === void 0 ? void 0 : i.get(t === null || t === void 0 ? void 0 : t.id)) === null || s === void 0 ? void 0 : s.hasError) && ((o = this.validatableControls.get(t.id)) === null || o === void 0 ? void 0 : o.message) && e("ch-tooltip", {
65
66
  class: "tooltip",
@@ -79,11 +80,11 @@ const b = class {
79
80
  this.inputValue = t;
80
81
  }
81
82
  async componentWillLoad() {
82
- c(this, d, await a.getComponentStrings(this.el), "f");
83
+ d(this, h, await r.getComponentStrings(this.el), "f");
83
84
  this.defaultInputValueChanged(this.defaultInputValue);
84
85
  }
85
86
  componentDidLoad() {
86
- l(this, m, "f").call(this);
87
+ c(this, w, "f").call(this);
87
88
  }
88
89
  render() {
89
90
  const t = !this.inputValue || this.inputValue.length === 0;
@@ -100,26 +101,26 @@ const b = class {
100
101
  }, e("label", {
101
102
  class: "label",
102
103
  htmlFor: "input-name"
103
- }, l(this, d, "f").labels.name), e("ch-edit", {
104
+ }, c(this, h, "f").labels.name), e("ch-edit", {
104
105
  type: "text",
105
106
  id: "input-name",
106
107
  class: "input",
107
- placeholder: l(this, d, "f").placeHolders.name,
108
+ placeholder: c(this, h, "f").placeHolders.name,
108
109
  value: this.inputValue,
109
- onInput: l(this, f, "f"),
110
- ref: t => c(this, h, t, "f")
111
- }), l(this, w, "f").call(this, l(this, h, "f")))), e("footer", {
110
+ onInput: c(this, p, "f"),
111
+ ref: t => d(this, f, t, "f")
112
+ }), c(this, b, "f").call(this, c(this, f, "f")))), e("footer", {
112
113
  class: "control-footer-with-border spacing-body"
113
114
  }, e("div", {
114
115
  class: "buttons-spacer"
115
116
  }, e("button", {
116
117
  class: "button-secondary",
117
- onClick: l(this, p, "f")
118
- }, l(this, d, "f").buttons.cancel), e("button", {
118
+ onClick: c(this, u, "f")
119
+ }, c(this, h, "f").buttons.cancel), e("button", {
119
120
  class: "button-primary",
120
- onClick: l(this, u, "f"),
121
+ onClick: c(this, m, "f"),
121
122
  disabled: t
122
- }, l(this, d, "f").buttons.confirm)))));
123
+ }, c(this, h, "f").buttons.confirm)))));
123
124
  }
124
125
  static get assetsDirs() {
125
126
  return [ "gx-ide-assets/name-picker" ];
@@ -134,10 +135,10 @@ const b = class {
134
135
  }
135
136
  };
136
137
 
137
- d = new WeakMap, h = new WeakMap, f = new WeakMap, p = new WeakMap, u = new WeakMap,
138
- m = new WeakMap, w = new WeakMap;
138
+ h = new WeakMap, f = new WeakMap, p = new WeakMap, u = new WeakMap, m = new WeakMap,
139
+ w = new WeakMap, b = new WeakMap;
139
140
 
140
- b.style = r;
141
+ g.style = l;
141
142
 
142
- export { b as gx_ide_name_picker };
143
- //# sourceMappingURL=p-e3bce13e.entry.js.map
143
+ export { g as gx_ide_name_picker };
144
+ //# sourceMappingURL=p-ee7232f2.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["namePickerCss","CSS_BUNDLES","GxIdeNamePicker","_GxIdeNamePicker_componentLocale","set","this","_GxIdeNamePicker_inputValueEl","_GxIdeNamePicker_handleInputValueChange","event","inputValue","detail","clearControlError","validatableControls","_GxIdeNamePicker_cancelClickHandler","async","cancelCallback","_GxIdeNamePicker_confirmClickHandler","formSubmitResult","createCallback","validateControls","_GxIdeNamePicker_initializeValidatableControls","__classPrivateFieldGet","forEach","validatableControl","id","reference","hasError","message","undefined","_GxIdeNamePicker_evaluateTooltipRender","controlReference","_b","_a","get","_c","h","class","actionElement","blockAlign","config","tooltipSettings","inlineAlign","delay","Map","defaultInputValueChanged","newDefaultInputValue","componentWillLoad","__classPrivateFieldSet","Locale","getComponentStrings","el","defaultInputValue","componentDidLoad","call","render","confirmButtonDisabled","length","Host","model","htmlFor","labels","name","type","placeholder","placeHolders","value","onInput","ref","onClick","buttons","cancel","disabled","confirm"],"sources":["src/components/name-picker/name-picker.scss?tag=gx-ide-name-picker&encapsulation=shadow","src/components/name-picker/name-picker.tsx"],"sourcesContent":[":host {\n display: grid;\n block-size: 100%;\n grid-template-rows: 1fr max-content;\n}\n\n.field-group {\n grid-auto-rows: max-content;\n}\n\n.main {\n overflow: auto;\n}\n\n.section {\n display: contents;\n}\n\n.tooltip {\n position: absolute;\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from \"@stencil/core\";\n\nimport { MercuryBundles } from \"@genexus/mercury\";\nimport { config } from \"../../common/config\";\nimport {\n clearControlError,\n ControlValidation,\n validateControls\n} from \"../../common/form-validation\";\nimport { Locale } from \"../../common/locale\";\nimport { FormSubmitResult } from \"../../components\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/form\",\n \"utils/spacing\",\n \"utils/layout\",\n \"chameleon/scrollbar\",\n \"components/button\",\n \"components/edit\",\n \"components/tooltip\"\n];\n\n@Component({\n tag: \"gx-ide-name-picker\",\n styleUrl: \"name-picker.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/name-picker\"]\n})\nexport class GxIdeNamePicker {\n /**\n * The component hard-coded strings translations.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n\n #inputValueEl!: HTMLChEditElement;\n\n @Element() el: HTMLGxIdeNamePickerElement;\n\n /**\n * The input name\n */\n @State() inputValue: string;\n\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * Callback that must be invoked when the 'Cancel' button is pressed.\n */\n @Prop() readonly cancelCallback: () => Promise<void>;\n\n /**\n * Callback that must be invoked when the 'Create' button is pressed.\n */\n @Prop() readonly createCallback: (\n inputValue: string\n ) => Promise<FormSubmitResult>;\n\n /**\n * This property is used to set the initial values of the input field when the component is loaded.\n */\n @Prop() readonly defaultInputValue: string;\n @Watch(\"defaultInputValue\")\n defaultInputValueChanged(newDefaultInputValue: string) {\n this.inputValue = newDefaultInputValue;\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.defaultInputValueChanged(this.defaultInputValue);\n }\n\n componentDidLoad() {\n this.#initializeValidatableControls();\n }\n\n #handleInputValueChange = (event: CustomEvent<string> | InputEvent) => {\n this.inputValue = event.detail as string;\n clearControlError(this.validatableControls, \"input-name\");\n };\n\n #cancelClickHandler = async () => {\n this.cancelCallback();\n };\n\n #confirmClickHandler = async () => {\n const formSubmitResult = await this.createCallback(this.inputValue);\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n };\n\n #initializeValidatableControls = () => {\n // populate validatableControls with the controls that could have errors.\n const validatableControls: HTMLElement[] = [this.#inputValueEl];\n validatableControls.forEach(validatableControl => {\n if (validatableControl.id) {\n this.validatableControls.set(validatableControl.id, {\n reference: validatableControl,\n hasError: false,\n message: undefined\n });\n }\n });\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs as well.\n #evaluateTooltipRender = (\n controlReference: HTMLElement\n ): HTMLChTooltipElement =>\n this.validatableControls?.get(controlReference?.id)?.hasError &&\n this.validatableControls.get(controlReference.id)?.message && (\n <ch-tooltip\n class=\"tooltip\"\n actionElement={controlReference as unknown as HTMLButtonElement}\n blockAlign={config.tooltipSettings.blockAlign}\n inlineAlign={config.tooltipSettings.inlineAlign}\n delay={config.tooltipSettings.delay}\n >\n {this.validatableControls.get(controlReference.id).message}\n </ch-tooltip>\n );\n\n render() {\n const confirmButtonDisabled =\n !this.inputValue || this.inputValue.length === 0;\n\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <section class=\"section\">\n <div class=\"main scrollable field-group spacing-body\">\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"input-name\">\n {this.#componentLocale.labels.name}\n </label>\n <ch-edit\n type=\"text\"\n id=\"input-name\"\n class=\"input\"\n placeholder={this.#componentLocale.placeHolders.name}\n value={this.inputValue}\n onInput={this.#handleInputValueChange}\n ref={(el: HTMLChEditElement) =>\n (this.#inputValueEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#inputValueEl)}\n </div>\n </div>\n\n <footer class=\"control-footer-with-border spacing-body\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n onClick={this.#cancelClickHandler}\n >\n {this.#componentLocale.buttons.cancel}\n </button>\n\n <button\n class=\"button-primary\"\n onClick={this.#confirmClickHandler}\n disabled={confirmButtonDisabled}\n >\n {this.#componentLocale.buttons.confirm}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n"],"mappings":";;;;;;;;AAAA,MAAMA,IAAgB;;;;;;;;;;;;;;;;;ACYtB,MAAMC,IAA8B,EAClC,qBACA,cACA,iBACA,gBACA,uBACA,qBACA,mBACA;;MASWC,IAAe;;;;;;;QAK1BC,EAAAC,IAAAC,WAAA;IAEAC,EAAAF,IAAAC,WAAA;IAyCAE,EAAAH,IAAAC,OAA2BG;MACzBH,KAAKI,aAAaD,EAAME;MACxBC,EAAkBN,KAAKO,qBAAqB;AAAa;IAG3DC,EAAAT,IAAAC,OAAsBS;MACpBT,KAAKU;AAAgB;IAGvBC,EAAAZ,IAAAC,OAAuBS;MACrB,MAAMG,UAAyBZ,KAAKa,eAAeb,KAAKI;MACxDJ,KAAKO,sBAAsBO,EACzBF,GACAZ,KAAKO;AACN;IAGHQ,EAAAhB,IAAAC,OAAiC;;MAE/B,MAAMO,IAAqC,EAACS,EAAAhB,MAAIC,GAAA;MAChDM,EAAoBU,SAAQC;QAC1B,IAAIA,EAAmBC,IAAI;UACzBnB,KAAKO,oBAAoBR,IAAImB,EAAmBC,IAAI;YAClDC,WAAWF;YACXG,UAAU;YACVC,SAASC;;;;AAGb;;;QAKJC,EAAAzB,IAAAC,OACEyB;;MAEA,SAAAC,KAAAC,IAAA3B,KAAKO,yBAAmB,QAAAoB,WAAA,aAAAA,EAAEC,IAAIH,MAAgB,QAAhBA,WAAgB,aAAhBA,EAAkBN,SAAG,QAAAO,WAAA,aAAAA,EAAEL,eACrDQ,IAAA7B,KAAKO,oBAAoBqB,IAAIH,EAAiBN,SAAG,QAAAU,WAAA,aAAAA,EAAEP,YACjDQ,EAAA;QACEC,OAAM;QACNC,eAAeP;QACfQ,YAAYC,EAAOC,gBAAgBF;QACnCG,aAAaF,EAAOC,gBAAgBC;QACpCC,OAAOH,EAAOC,gBAAgBE;SAE7BrC,KAAKO,oBAAoBqB,IAAIH,EAAiBN,IAAIG;AAEtD;;+BA/E4B,IAAIgB;;;;;EAmBnC,wBAAAC,CAAyBC;IACvBxC,KAAKI,aAAaoC;;EAGpB,uBAAMC;IACJC,EAAA1C,MAAIF,SAA0B6C,EAAOC,oBAAoB5C,KAAK6C,KAAG;IACjE7C,KAAKuC,yBAAyBvC,KAAK8C;;EAGrC,gBAAAC;IACE/B,EAAAhB,MAAIe,GAAA,KAA+BiC,KAAnChD;;EAoDF,MAAAiD;IACE,MAAMC,KACHlD,KAAKI,cAAcJ,KAAKI,WAAW+C,WAAW;IAEjD,OACErB,EAACsB,GAAI;MAACrB,OAAM;OACVD,EAAA;MAAUuB,OAAOzD;QACjBkC,EAAA;MAASC,OAAM;OACbD,EAAA;MAAKC,OAAM;OACTD,EAAA;MAAKC,OAAM;OACTD,EAAA;MAAOC,OAAM;MAAQuB,SAAQ;OAC1BtC,EAAAhB,MAAIF,GAAA,KAAkByD,OAAOC,OAEhC1B,EAAA;MACE2B,MAAK;MACLtC,IAAG;MACHY,OAAM;MACN2B,aAAa1C,EAAAhB,MAAIF,GAAA,KAAkB6D,aAAaH;MAChDI,OAAO5D,KAAKI;MACZyD,SAAS7C,EAAAhB,MAAIE,GAAA;MACb4D,KAAMjB,KACHH,EAAA1C,MAAIC,GAAiB4C,GAAuB;QAGhD7B,EAAAhB,MAAIwB,GAAA,KAAuBwB,KAA3BhD,MAA4BgB,EAAAhB,MAAIC,GAAA,SAIrC6B,EAAA;MAAQC,OAAM;OACZD,EAAA;MAAKC,OAAM;OACTD,EAAA;MACEC,OAAM;MACNgC,SAAS/C,EAAAhB,MAAIQ,GAAA;OAEZQ,EAAAhB,MAAIF,GAAA,KAAkBkE,QAAQC,SAGjCnC,EAAA;MACEC,OAAM;MACNgC,SAAS/C,EAAAhB,MAAIW,GAAA;MACbuD,UAAUhB;OAETlC,EAAAhB,MAAIF,GAAA,KAAkBkE,QAAQG"}
@@ -1,6 +1,7 @@
1
1
  import { FormSubmitResult, ConnectionResultData } from "../common/types";
2
2
  export declare const formSubmitValidation: (result: FormSubmitResult | ConnectionResultData, ref: any) => void;
3
3
  export declare const validateControls: (formSubmitResult: FormSubmitResult, validatableControls: Map<string, ControlValidation>) => Map<string, ControlValidation>;
4
+ export declare const clearControlError: (validatableControls: Map<string, ControlValidation>, controlId: string) => void;
4
5
  export type ControlValidation = {
5
6
  reference: HTMLElement;
6
7
  hasError: boolean;
@@ -12,10 +12,6 @@ export declare class GxIdeServerSelector {
12
12
  * State to track if this is the first selection made by the user.
13
13
  */
14
14
  isFirstSelection: boolean;
15
- /**
16
- * State to track if the server URL is valid.
17
- */
18
- isValidUrl: boolean;
19
15
  /**
20
16
  * The current server URL input value.
21
17
  */
@@ -64,15 +60,15 @@ export declare class GxIdeServerSelector {
64
60
  /**
65
61
  * Callback that must be invoked when the 'Confirm' button is pressed and the Select Server option is checked.
66
62
  */
67
- readonly selectServerCallback: (authenticationSessionOrigin: AuthenticationSessionOrigin) => Promise<void>;
63
+ readonly selectServerCallback: (authenticationSessionOrigin: AuthenticationSessionOrigin, connectionOption: ConnectionOption) => Promise<FormSubmitResult>;
68
64
  componentWillLoad(): Promise<void>;
65
+ componentDidRender(): void;
69
66
  render(): void;
70
67
  }
71
68
  export type ConnectionResultData = {
72
69
  formResult: FormSubmitResult;
73
70
  };
74
71
  export type ConnectionOption = "select" | "new";
75
- export type ServerType = "legacy" | "next";
76
72
  export type ServerAccessLevel = "public" | "private";
77
73
  export type AuthenticationSessionOrigin = {
78
74
  uri: string;
@@ -56,7 +56,7 @@ import { PluginAction, PluginData } from "./components/plugin-explorer/plugin-ex
56
56
  import { LoadReferencesCallback, ObjectData as ObjectData1, OpenObjectCallback, OpenSelectorDialogCallback, SelectorSourceCallback, SelectReferenceCallback } from "./components/references/references";
57
57
  import { CheckboxType, DialogAction, ItemNode } from "./components/select-kb-items/select-kb-items";
58
58
  import { TeamData } from "./components/select-user-team/select-user-team";
59
- import { AuthenticationSessionOrigin, ConnectedGXServerData } from "./components/team-dev/server-selector/server-selector";
59
+ import { AuthenticationSessionOrigin, ConnectedGXServerData, ConnectionOption } from "./components/team-dev/server-selector/server-selector";
60
60
  import { KBVersion as KBVersion1, ShareKBData } from "./components/team-dev/share-kb/share-kb";
61
61
  import { AuthStep, TeamData as TeamData1 } from "./components/sign-in-team/sign-in-team";
62
62
  import { MessageType } from "./components/splash/splash";
@@ -128,7 +128,7 @@ export { PluginAction, PluginData } from "./components/plugin-explorer/plugin-ex
128
128
  export { LoadReferencesCallback, ObjectData as ObjectData1, OpenObjectCallback, OpenSelectorDialogCallback, SelectorSourceCallback, SelectReferenceCallback } from "./components/references/references";
129
129
  export { CheckboxType, DialogAction, ItemNode } from "./components/select-kb-items/select-kb-items";
130
130
  export { TeamData } from "./components/select-user-team/select-user-team";
131
- export { AuthenticationSessionOrigin, ConnectedGXServerData } from "./components/team-dev/server-selector/server-selector";
131
+ export { AuthenticationSessionOrigin, ConnectedGXServerData, ConnectionOption } from "./components/team-dev/server-selector/server-selector";
132
132
  export { KBVersion as KBVersion1, ShareKBData } from "./components/team-dev/share-kb/share-kb";
133
133
  export { AuthStep, TeamData as TeamData1 } from "./components/sign-in-team/sign-in-team";
134
134
  export { MessageType } from "./components/splash/splash";
@@ -1935,8 +1935,9 @@ export namespace Components {
1935
1935
  * Callback that must be invoked when the 'Confirm' button is pressed and the Select Server option is checked.
1936
1936
  */
1937
1937
  "selectServerCallback": (
1938
- authenticationSessionOrigin: AuthenticationSessionOrigin
1939
- ) => Promise<void>;
1938
+ authenticationSessionOrigin: AuthenticationSessionOrigin,
1939
+ connectionOption: ConnectionOption
1940
+ ) => Promise<FormSubmitResult>;
1940
1941
  }
1941
1942
  interface GxIdeShareKb {
1942
1943
  /**
@@ -5425,8 +5426,9 @@ declare namespace LocalJSX {
5425
5426
  * Callback that must be invoked when the 'Confirm' button is pressed and the Select Server option is checked.
5426
5427
  */
5427
5428
  "selectServerCallback": (
5428
- authenticationSessionOrigin: AuthenticationSessionOrigin
5429
- ) => Promise<void>;
5429
+ authenticationSessionOrigin: AuthenticationSessionOrigin,
5430
+ connectionOption: ConnectionOption
5431
+ ) => Promise<FormSubmitResult>;
5430
5432
  }
5431
5433
  interface GxIdeShareKb {
5432
5434
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genexus/genexus-ide-ui",
3
3
  "license": "Apache-2.0",
4
- "version": "1.1.48",
4
+ "version": "1.1.50",
5
5
  "description": "GeneXus IDE UI components",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.js",
@@ -1 +0,0 @@
1
- {"file":"form-validation-178cf461.js","mappings":";;AAGA;AAqBA;AACA,MAAM,kCAAkC,GAAG;IACzC,aAAa,EAAE,gBAAgB;IAC/B,qBAAqB,EAAE,iBAAiB;IACxC,SAAS,EAAE,aAAa;CAChB,CAAC;AAEX,MAAM,gBAAgB,GAAG,CAAC,QAAiB,EAAE,OAAoB;IAC/D,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;IACrD,MAAM,UAAU,GACd,kCAAkC,CAChC,cAAiE,CAClE,CAAC;IACJ,IAAI,QAAQ,EAAE;QACZ,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;KACnC;SAAM;QACL,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;KACtC;AACH,CAAC,CAAC;MAEW,gBAAgB,GAAG,CAC9B,gBAAkC,EAClC,mBAAmD;IAEnD,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAChE,gBAAgB,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW;QAC9C,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC;QACjC,MAAM,aAAa,GAAG,WAAW,CAAC,QAAQ,CAAC;QAC3C,MAAM,gBAAgB,GAAG,0BAA0B,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAClE,IAAI,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,SAAS,EAAE;;YAE/B,gBAAgB,CAAC,aAAa,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;YAC5D,0BAA0B,CAAC,GAAG,CAAC,QAAQ,kCAClC,gBAAgB,KACnB,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,WAAW,CAAC,OAAO,IAC5B,CAAC;SACJ;KACF,CAAC,CAAC;;IAEH,OAAO,0BAA0B,CAAC;AACpC;;;;","names":[],"sources":["src/common/form-validation.ts"],"sourcesContent":["import { FormSubmitResult, ConnectionResultData } from \"../common/types\";\nimport { FormComponent } from \"@genexus/gemini/dist/types/common/interfaces\";\n\n// formSubmitValidation will be deprecated. use \"validateControls\" instead.\nexport const formSubmitValidation = (\n result: FormSubmitResult | ConnectionResultData,\n ref: any\n) => {\n result.fieldErrors?.forEach(element => {\n const key = element.key;\n const message = element.message;\n const hasError = element.hasError;\n\n const reference: FormComponent = ref[`${key}El`];\n if (reference && hasError && message.trim()) {\n reference.validationStatus = \"error\";\n reference.validationMessage = message;\n } else if (reference && !hasError) {\n reference.validationStatus = \"indeterminate\";\n reference.validationMessage = null;\n }\n });\n};\n\n// TODO: Improve the way we mark components with error. We must not use error classes.\nconst formElementsErrorClassesDictionary = {\n \"ch-checkbox\": \"checkbox-error\",\n \"ch-combo-box-render\": \"combo-box-error\",\n \"ch-edit\": \"input-error\"\n} as const;\n\nconst toggleErrorClass = (hasError: boolean, element: HTMLElement) => {\n const elementTagName = element.tagName.toLowerCase();\n const errorClass =\n formElementsErrorClassesDictionary[\n elementTagName as keyof typeof formElementsErrorClassesDictionary\n ];\n if (hasError) {\n element.classList.add(errorClass);\n } else {\n element.classList.remove(errorClass);\n }\n};\n\nexport const validateControls = (\n formSubmitResult: FormSubmitResult,\n validatableControls: Map<string, ControlValidation>\n): Map<string, ControlValidation> => {\n const validatableControlsUpdated = new Map(validatableControls);\n formSubmitResult.fieldErrors.forEach(fieldResult => {\n const fieldKey = fieldResult.key;\n const fieldHasError = fieldResult.hasError;\n const controlMapRecord = validatableControlsUpdated.get(fieldKey);\n if (controlMapRecord?.reference) {\n // toggle class to add or remove error style\n toggleErrorClass(fieldHasError, controlMapRecord.reference);\n validatableControlsUpdated.set(fieldKey, {\n ...controlMapRecord,\n hasError: fieldHasError,\n message: fieldResult.message\n });\n }\n });\n // return validatableControls updated.\n return validatableControlsUpdated;\n};\n\nexport type ControlValidation = {\n reference: HTMLElement;\n hasError: boolean;\n message: string;\n};\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"form-validation-cd0215c6.js","mappings":"AAGA;AAqBA;AACA,MAAM,kCAAkC,GAAG;IACzC,aAAa,EAAE,gBAAgB;IAC/B,qBAAqB,EAAE,iBAAiB;IACxC,SAAS,EAAE,aAAa;CAChB,CAAC;AAEX,MAAM,gBAAgB,GAAG,CAAC,QAAiB,EAAE,OAAoB;IAC/D,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;IACrD,MAAM,UAAU,GACd,kCAAkC,CAChC,cAAiE,CAClE,CAAC;IACJ,IAAI,QAAQ,EAAE;QACZ,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;KACnC;SAAM;QACL,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;KACtC;AACH,CAAC,CAAC;MAEW,gBAAgB,GAAG,CAC9B,gBAAkC,EAClC,mBAAmD;IAEnD,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAChE,gBAAgB,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW;QAC9C,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC;QACjC,MAAM,aAAa,GAAG,WAAW,CAAC,QAAQ,CAAC;QAC3C,MAAM,gBAAgB,GAAG,0BAA0B,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAClE,IAAI,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,SAAS,EAAE;;YAE/B,gBAAgB,CAAC,aAAa,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;YAC5D,0BAA0B,CAAC,GAAG,CAAC,QAAQ,kCAClC,gBAAgB,KACnB,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,WAAW,CAAC,OAAO,IAC5B,CAAC;SACJ;KACF,CAAC,CAAC;;IAEH,OAAO,0BAA0B,CAAC;AACpC;;;;","names":[],"sources":["src/common/form-validation.ts"],"sourcesContent":["import { FormSubmitResult, ConnectionResultData } from \"../common/types\";\nimport { FormComponent } from \"@genexus/gemini/dist/types/common/interfaces\";\n\n// formSubmitValidation will be deprecated. use \"validateControls\" instead.\nexport const formSubmitValidation = (\n result: FormSubmitResult | ConnectionResultData,\n ref: any\n) => {\n result.fieldErrors?.forEach(element => {\n const key = element.key;\n const message = element.message;\n const hasError = element.hasError;\n\n const reference: FormComponent = ref[`${key}El`];\n if (reference && hasError && message.trim()) {\n reference.validationStatus = \"error\";\n reference.validationMessage = message;\n } else if (reference && !hasError) {\n reference.validationStatus = \"indeterminate\";\n reference.validationMessage = null;\n }\n });\n};\n\n// TODO: Improve the way we mark components with error. We must not use error classes.\nconst formElementsErrorClassesDictionary = {\n \"ch-checkbox\": \"checkbox-error\",\n \"ch-combo-box-render\": \"combo-box-error\",\n \"ch-edit\": \"input-error\"\n} as const;\n\nconst toggleErrorClass = (hasError: boolean, element: HTMLElement) => {\n const elementTagName = element.tagName.toLowerCase();\n const errorClass =\n formElementsErrorClassesDictionary[\n elementTagName as keyof typeof formElementsErrorClassesDictionary\n ];\n if (hasError) {\n element.classList.add(errorClass);\n } else {\n element.classList.remove(errorClass);\n }\n};\n\nexport const validateControls = (\n formSubmitResult: FormSubmitResult,\n validatableControls: Map<string, ControlValidation>\n): Map<string, ControlValidation> => {\n const validatableControlsUpdated = new Map(validatableControls);\n formSubmitResult.fieldErrors.forEach(fieldResult => {\n const fieldKey = fieldResult.key;\n const fieldHasError = fieldResult.hasError;\n const controlMapRecord = validatableControlsUpdated.get(fieldKey);\n if (controlMapRecord?.reference) {\n // toggle class to add or remove error style\n toggleErrorClass(fieldHasError, controlMapRecord.reference);\n validatableControlsUpdated.set(fieldKey, {\n ...controlMapRecord,\n hasError: fieldHasError,\n message: fieldResult.message\n });\n }\n });\n // return validatableControls updated.\n return validatableControlsUpdated;\n};\n\nexport type ControlValidation = {\n reference: HTMLElement;\n hasError: boolean;\n message: string;\n};\n"],"version":3}
@@ -1,39 +0,0 @@
1
- // formSubmitValidation will be deprecated. use "validateControls" instead.
2
- // TODO: Improve the way we mark components with error. We must not use error classes.
3
- const o = {
4
- "ch-checkbox": "checkbox-error",
5
- "ch-combo-box-render": "combo-box-error",
6
- "ch-edit": "input-error"
7
- };
8
-
9
- const toggleErrorClass = (c, e) => {
10
- const r = e.tagName.toLowerCase();
11
- const t = o[r];
12
- if (c) {
13
- e.classList.add(t);
14
- } else {
15
- e.classList.remove(t);
16
- }
17
- };
18
-
19
- const validateControls = (o, c) => {
20
- const e = new Map(c);
21
- o.fieldErrors.forEach((o => {
22
- const c = o.key;
23
- const r = o.hasError;
24
- const t = e.get(c);
25
- if (t === null || t === void 0 ? void 0 : t.reference) {
26
- // toggle class to add or remove error style
27
- toggleErrorClass(r, t.reference);
28
- e.set(c, Object.assign(Object.assign({}, t), {
29
- hasError: r,
30
- message: o.message
31
- }));
32
- }
33
- }));
34
- // return validatableControls updated.
35
- return e;
36
- };
37
-
38
- export { validateControls as v };
39
- //# sourceMappingURL=p-289c3290.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["formElementsErrorClassesDictionary","toggleErrorClass","hasError","element","elementTagName","tagName","toLowerCase","errorClass","classList","add","remove","validateControls","formSubmitResult","validatableControls","validatableControlsUpdated","Map","fieldErrors","forEach","fieldResult","fieldKey","key","fieldHasError","controlMapRecord","get","reference","set","Object","assign","message"],"sources":["src/common/form-validation.ts"],"sourcesContent":["import { FormSubmitResult, ConnectionResultData } from \"../common/types\";\nimport { FormComponent } from \"@genexus/gemini/dist/types/common/interfaces\";\n\n// formSubmitValidation will be deprecated. use \"validateControls\" instead.\nexport const formSubmitValidation = (\n result: FormSubmitResult | ConnectionResultData,\n ref: any\n) => {\n result.fieldErrors?.forEach(element => {\n const key = element.key;\n const message = element.message;\n const hasError = element.hasError;\n\n const reference: FormComponent = ref[`${key}El`];\n if (reference && hasError && message.trim()) {\n reference.validationStatus = \"error\";\n reference.validationMessage = message;\n } else if (reference && !hasError) {\n reference.validationStatus = \"indeterminate\";\n reference.validationMessage = null;\n }\n });\n};\n\n// TODO: Improve the way we mark components with error. We must not use error classes.\nconst formElementsErrorClassesDictionary = {\n \"ch-checkbox\": \"checkbox-error\",\n \"ch-combo-box-render\": \"combo-box-error\",\n \"ch-edit\": \"input-error\"\n} as const;\n\nconst toggleErrorClass = (hasError: boolean, element: HTMLElement) => {\n const elementTagName = element.tagName.toLowerCase();\n const errorClass =\n formElementsErrorClassesDictionary[\n elementTagName as keyof typeof formElementsErrorClassesDictionary\n ];\n if (hasError) {\n element.classList.add(errorClass);\n } else {\n element.classList.remove(errorClass);\n }\n};\n\nexport const validateControls = (\n formSubmitResult: FormSubmitResult,\n validatableControls: Map<string, ControlValidation>\n): Map<string, ControlValidation> => {\n const validatableControlsUpdated = new Map(validatableControls);\n formSubmitResult.fieldErrors.forEach(fieldResult => {\n const fieldKey = fieldResult.key;\n const fieldHasError = fieldResult.hasError;\n const controlMapRecord = validatableControlsUpdated.get(fieldKey);\n if (controlMapRecord?.reference) {\n // toggle class to add or remove error style\n toggleErrorClass(fieldHasError, controlMapRecord.reference);\n validatableControlsUpdated.set(fieldKey, {\n ...controlMapRecord,\n hasError: fieldHasError,\n message: fieldResult.message\n });\n }\n });\n // return validatableControls updated.\n return validatableControlsUpdated;\n};\n\nexport type ControlValidation = {\n reference: HTMLElement;\n hasError: boolean;\n message: string;\n};\n"],"mappings":";;AAyBA,MAAMA,IAAqC;EACzC,eAAe;EACf,uBAAuB;EACvB,WAAW;;;AAGb,MAAMC,mBAAmB,CAACC,GAAmBC;EAC3C,MAAMC,IAAiBD,EAAQE,QAAQC;EACvC,MAAMC,IACJP,EACEI;EAEJ,IAAIF,GAAU;IACZC,EAAQK,UAAUC,IAAIF;SACjB;IACLJ,EAAQK,UAAUE,OAAOH;;;;MAIhBI,mBAAmB,CAC9BC,GACAC;EAEA,MAAMC,IAA6B,IAAIC,IAAIF;EAC3CD,EAAiBI,YAAYC,SAAQC;IACnC,MAAMC,IAAWD,EAAYE;IAC7B,MAAMC,IAAgBH,EAAYhB;IAClC,MAAMoB,IAAmBR,EAA2BS,IAAIJ;IACxD,IAAIG,MAAgB,QAAhBA,WAAgB,aAAhBA,EAAkBE,WAAW;;MAE/BvB,iBAAiBoB,GAAeC,EAAiBE;MACjDV,EAA2BW,IAAIN,GAAQO,OAAAC,OAAAD,OAAAC,OAAA,IAClCL,IAAgB;QACnBpB,UAAUmB;QACVO,SAASV,EAAYU;;;;;IAK3B,OAAOd;AAA0B"}