@genexus/genexus-ide-ui 0.0.140 → 0.0.142

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 (107) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-bpm-export-xpdl.cjs.entry.js +78 -0
  3. package/dist/cjs/gx-ide-bpm-export-xpdl.cjs.entry.js.map +1 -0
  4. package/dist/cjs/gx-ide-bpm-objects-selector.cjs.entry.js +123 -0
  5. package/dist/cjs/gx-ide-bpm-objects-selector.cjs.entry.js.map +1 -0
  6. package/dist/cjs/gx-ide-design-import.cjs.entry.js +567 -0
  7. package/dist/cjs/gx-ide-design-import.cjs.entry.js.map +1 -0
  8. package/dist/cjs/gx-ide-entity-selector.cjs.entry.js +1 -1
  9. package/dist/cjs/gx-ide-entity-selector.cjs.entry.js.map +1 -1
  10. package/dist/cjs/gx-ide-list-selector_2.cjs.entry.js +1 -1
  11. package/dist/cjs/gx-ide-list-selector_2.cjs.entry.js.map +1 -1
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/collection/collection-manifest.json +3 -1
  14. package/dist/collection/components/_helpers/entity-selector/entity-selector.css +2 -2
  15. package/dist/collection/components/_helpers/entity-selector/entity-selector.js.map +1 -1
  16. package/dist/collection/components/_helpers/list-selector/list-selector-item/list-selector-item.css +8 -10
  17. package/dist/collection/components/bpm/export-xpdl/export-xpdl.css +574 -0
  18. package/dist/collection/components/bpm/export-xpdl/export-xpdl.js +238 -0
  19. package/dist/collection/components/bpm/export-xpdl/export-xpdl.js.map +1 -0
  20. package/dist/collection/components/bpm/export-xpdl/gx-ide-assets/bpm-export-xpdl/langs/bpm-export-xpdl.lang.en.json +19 -0
  21. package/dist/collection/components/bpm/objects-selector/gx-ide-assets/bpm-objects-selector/langs/bpm-objects-selector.lang.en.json +17 -0
  22. package/dist/collection/components/bpm/objects-selector/gx-ide-assets/bpm-objects-selector/langs/bpm-objects-selector.lang.ja.json +3 -0
  23. package/dist/collection/components/bpm/objects-selector/helpers.js +17 -0
  24. package/dist/collection/components/bpm/objects-selector/helpers.js.map +1 -0
  25. package/dist/collection/components/bpm/objects-selector/objects-selector.css +574 -0
  26. package/dist/collection/components/bpm/objects-selector/objects-selector.js +259 -0
  27. package/dist/collection/components/bpm/objects-selector/objects-selector.js.map +1 -0
  28. package/dist/collection/components/{import-from-design/import-from-design.js → design-import/design-import.js} +115 -64
  29. package/dist/collection/components/design-import/design-import.js.map +1 -0
  30. package/dist/collection/components/{import-from-design/gx-ide-assets/import-from-design/langs/import-from-design.lang.en.json → design-import/gx-ide-assets/design-import/langs/design-import.lang.en.json} +2 -1
  31. package/dist/components/entity-selector.js +1 -1
  32. package/dist/components/entity-selector.js.map +1 -1
  33. package/dist/components/gx-ide-bpm-export-xpdl.d.ts +11 -0
  34. package/dist/components/gx-ide-bpm-export-xpdl.js +155 -0
  35. package/dist/components/gx-ide-bpm-export-xpdl.js.map +1 -0
  36. package/dist/components/gx-ide-bpm-objects-selector.d.ts +11 -0
  37. package/dist/components/gx-ide-bpm-objects-selector.js +8 -0
  38. package/dist/components/gx-ide-bpm-objects-selector.js.map +1 -0
  39. package/dist/components/gx-ide-design-import.d.ts +11 -0
  40. package/dist/components/{gx-ide-import-from-design.js → gx-ide-design-import.js} +95 -49
  41. package/dist/components/gx-ide-design-import.js.map +1 -0
  42. package/dist/components/list-selector-item.js +1 -1
  43. package/dist/components/list-selector-item.js.map +1 -1
  44. package/dist/components/objects-selector.js +189 -0
  45. package/dist/components/objects-selector.js.map +1 -0
  46. package/dist/esm/genexus-ide-ui.js +1 -1
  47. package/dist/esm/gx-ide-bpm-export-xpdl.entry.js +74 -0
  48. package/dist/esm/gx-ide-bpm-export-xpdl.entry.js.map +1 -0
  49. package/dist/esm/gx-ide-bpm-objects-selector.entry.js +119 -0
  50. package/dist/esm/gx-ide-bpm-objects-selector.entry.js.map +1 -0
  51. package/dist/esm/gx-ide-design-import.entry.js +563 -0
  52. package/dist/esm/gx-ide-design-import.entry.js.map +1 -0
  53. package/dist/esm/gx-ide-entity-selector.entry.js +1 -1
  54. package/dist/esm/gx-ide-entity-selector.entry.js.map +1 -1
  55. package/dist/esm/gx-ide-list-selector_2.entry.js +1 -1
  56. package/dist/esm/gx-ide-list-selector_2.entry.js.map +1 -1
  57. package/dist/esm/loader.js +1 -1
  58. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  59. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  60. package/dist/genexus-ide-ui/gx-ide-assets/bpm-export-xpdl/langs/bpm-export-xpdl.lang.en.json +19 -0
  61. package/dist/genexus-ide-ui/gx-ide-assets/bpm-export-xpdl/langs/bpm-export-xpdl.lang.zh.json +3 -0
  62. package/dist/genexus-ide-ui/gx-ide-assets/bpm-objects-selector/langs/bpm-objects-selector.lang.en.json +17 -0
  63. package/dist/genexus-ide-ui/gx-ide-assets/bpm-objects-selector/langs/bpm-objects-selector.lang.ja.json +3 -0
  64. package/dist/genexus-ide-ui/gx-ide-assets/bpm-objects-selector/langs/bpm-objects-selector.lang.zh.json +3 -0
  65. package/dist/genexus-ide-ui/gx-ide-assets/bpm-timer-duration/langs/timer-duration.lang.ja.json +3 -0
  66. package/dist/genexus-ide-ui/gx-ide-assets/bpm-timer-duration/langs/timer-duration.lang.zh.json +3 -0
  67. package/dist/genexus-ide-ui/gx-ide-assets/{import-from-design/langs/import-from-design.lang.en.json → design-import/langs/design-import.lang.en.json} +2 -1
  68. package/dist/genexus-ide-ui/gx-ide-assets/design-import/langs/design-import.lang.ja.json +3 -0
  69. package/dist/genexus-ide-ui/gx-ide-assets/design-import/langs/design-import.lang.zh.json +3 -0
  70. package/dist/genexus-ide-ui/{p-972b18a0.entry.js → p-0e47720b.entry.js} +2 -2
  71. package/dist/genexus-ide-ui/p-0e47720b.entry.js.map +1 -0
  72. package/dist/genexus-ide-ui/p-7364d5d1.entry.js +109 -0
  73. package/dist/genexus-ide-ui/p-7364d5d1.entry.js.map +1 -0
  74. package/dist/genexus-ide-ui/p-832a8a94.entry.js +160 -0
  75. package/dist/genexus-ide-ui/p-832a8a94.entry.js.map +1 -0
  76. package/dist/genexus-ide-ui/{p-9bf62c5c.entry.js → p-c46c7974.entry.js} +244 -175
  77. package/dist/genexus-ide-ui/p-c46c7974.entry.js.map +1 -0
  78. package/dist/genexus-ide-ui/{p-3345a1bc.entry.js → p-e07809d0.entry.js} +2 -2
  79. package/dist/genexus-ide-ui/p-e07809d0.entry.js.map +1 -0
  80. package/dist/types/components/bpm/export-xpdl/export-xpdl.d.ts +66 -0
  81. package/dist/types/components/bpm/import-gxpm/import-gxpm.d.ts +21 -0
  82. package/dist/types/components/bpm/objects-selector/helpers.d.ts +7 -0
  83. package/dist/types/components/bpm/objects-selector/objects-selector.d.ts +61 -0
  84. package/dist/types/components/{import-from-design/import-from-design.d.ts → design-import/design-import.d.ts} +24 -10
  85. package/dist/types/components.d.ts +371 -208
  86. package/package.json +1 -1
  87. package/dist/cjs/gx-ide-import-from-design.cjs.entry.js +0 -522
  88. package/dist/cjs/gx-ide-import-from-design.cjs.entry.js.map +0 -1
  89. package/dist/collection/components/import-from-design/import-from-design.js.map +0 -1
  90. package/dist/components/gx-ide-import-from-design.d.ts +0 -11
  91. package/dist/components/gx-ide-import-from-design.js.map +0 -1
  92. package/dist/esm/gx-ide-import-from-design.entry.js +0 -518
  93. package/dist/esm/gx-ide-import-from-design.entry.js.map +0 -1
  94. package/dist/genexus-ide-ui/p-3345a1bc.entry.js.map +0 -1
  95. package/dist/genexus-ide-ui/p-972b18a0.entry.js.map +0 -1
  96. package/dist/genexus-ide-ui/p-9bf62c5c.entry.js.map +0 -1
  97. /package/dist/collection/components/bpm/{timer-duration/gx-ide-assets/bpm-timer-duration/langs/bpm-timer-duration.lang.ja.json → export-xpdl/gx-ide-assets/bpm-export-xpdl/langs/bpm-export-xpdl.lang.ja.json} +0 -0
  98. /package/dist/collection/components/bpm/{timer-duration/gx-ide-assets/bpm-timer-duration/langs/bpm-timer-duration.lang.zh.json → export-xpdl/gx-ide-assets/bpm-export-xpdl/langs/bpm-export-xpdl.lang.zh.json} +0 -0
  99. /package/dist/collection/components/{import-from-design/gx-ide-assets/import-from-design/langs/import-from-design.lang.zh.json → bpm/objects-selector/gx-ide-assets/bpm-objects-selector/langs/bpm-objects-selector.lang.zh.json} +0 -0
  100. /package/dist/collection/components/bpm/timer-duration/gx-ide-assets/bpm-timer-duration/langs/{bpm-timer-duration.lang.en.json → timer-duration.lang.en.json} +0 -0
  101. /package/dist/collection/components/{import-from-design/gx-ide-assets/import-from-design/langs/import-from-design.lang.ja.json → bpm/timer-duration/gx-ide-assets/bpm-timer-duration/langs/timer-duration.lang.ja.json} +0 -0
  102. /package/dist/{genexus-ide-ui/gx-ide-assets/bpm-timer-duration/langs/bpm-timer-duration.lang.zh.json → collection/components/bpm/timer-duration/gx-ide-assets/bpm-timer-duration/langs/timer-duration.lang.zh.json} +0 -0
  103. /package/dist/collection/components/{import-from-design/import-from-design.css → design-import/design-import.css} +0 -0
  104. /package/dist/{genexus-ide-ui/gx-ide-assets/bpm-timer-duration/langs/bpm-timer-duration.lang.ja.json → collection/components/design-import/gx-ide-assets/design-import/langs/design-import.lang.ja.json} +0 -0
  105. /package/dist/{genexus-ide-ui/gx-ide-assets/import-from-design/langs/import-from-design.lang.zh.json → collection/components/design-import/gx-ide-assets/design-import/langs/design-import.lang.zh.json} +0 -0
  106. /package/dist/genexus-ide-ui/gx-ide-assets/{import-from-design/langs/import-from-design.lang.ja.json → bpm-export-xpdl/langs/bpm-export-xpdl.lang.ja.json} +0 -0
  107. /package/dist/genexus-ide-ui/gx-ide-assets/bpm-timer-duration/langs/{bpm-timer-duration.lang.en.json → timer-duration.lang.en.json} +0 -0
@@ -1,8 +1,8 @@
1
- import { r as e, c as t, h as a, H as r, g as i } from "./p-48217969.js";
1
+ import { r as t, c as e, h as a, H as i, g as r } from "./p-48217969.js";
2
2
 
3
- import { L as o } from "./p-74d59062.js";
3
+ import { L as s } from "./p-74d59062.js";
4
4
 
5
- import { c as s } from "./p-9c1b4eb9.js";
5
+ import { c as o } from "./p-9c1b4eb9.js";
6
6
 
7
7
  import { r as l } from "./p-350f49ac.js";
8
8
 
@@ -19,13 +19,18 @@ const h = "design_system";
19
19
  const b = "fonts";
20
20
 
21
21
  const f = class {
22
- constructor(r) {
23
- e(this, r);
24
- this.componentDidRenderFirstTime = t(this, "componentDidRenderFirstTime", 7);
22
+ constructor(i) {
23
+ t(this, i);
24
+ this.componentDidRenderFirstTime = e(this, "componentDidRenderFirstTime", 7);
25
25
  this.renderedFirstTime = false;
26
26
  /**
27
27
  * An array that keeps track of the tree items id's (design system data type + item id) along with the content, that will be used to save and retrieve items information, in order to avoid using a callback to get items information that was already get. loadedItemsArray will be reset every time a new design is loaded.
28
28
  */ this.loadedItems = new Map;
29
+ /**
30
+ * The path/URL value when loadCallback was called for the last time. This is used to determine
31
+ * if there is a difference with the actual path/URL value, in order to know if calling loadCallback
32
+ * again is required on blur on Path/URL/File input.
33
+ */ this.pathOnLoadCallback = "";
29
34
  this.panelsSelected = [];
30
35
  this.stencilsSelected = [];
31
36
  // private imagesSelected: string[] = [];
@@ -46,104 +51,109 @@ const f = class {
46
51
  this.treeMouseLeave = () => {
47
52
  this.shrunkenTree = true;
48
53
  };
49
- this.messageType = e => {
50
- if (e.type === "error") {
54
+ this.messageType = t => {
55
+ if (t.type === "error") {
51
56
  return "text-alert-error";
52
- } else if (e.type === "warning") {
57
+ } else if (t.type === "warning") {
53
58
  return "text-alert-warning";
54
59
  } else {
55
60
  return "text-gray";
56
61
  }
57
62
  };
58
- this.objectsTreeSelectedItemsChangedHandler = async e => {
59
- var t;
60
- if (e.detail.length) {
61
- const a = (t = e.detail[0]) === null || t === void 0 ? void 0 : t.item;
62
- const r = a.id;
63
- const i = r.split("@");
64
- const o = i[0];
65
- const s = i[1];
66
- if (o && o !== "parent") {
67
- this.selectedDesignType = s;
68
- const e = this.getLoadedItem(r);
69
- if (!e) {
70
- const e = await this.getDesignDataDetail(o, this.selectedDesignType);
71
- this.loadedItems.set(r, {
63
+ this.objectsTreeSelectedItemsChangedHandler = async t => {
64
+ var e;
65
+ if (t.detail.length) {
66
+ const a = (e = t.detail[0]) === null || e === void 0 ? void 0 : e.item;
67
+ const i = a.id;
68
+ const r = i.split("@");
69
+ const s = r[0];
70
+ const o = r[1];
71
+ const l = s && s !== "parent";
72
+ const n = o === "design_system";
73
+ if (l || n) {
74
+ this.selectedDesignType = o;
75
+ const t = this.getLoadedItem(i);
76
+ if (!t) {
77
+ const t = await this.getDesignDataDetail(s, this.selectedDesignType);
78
+ this.loadedItems.set(i, {
72
79
  designType: this.selectedDesignType,
73
- designDataDetail: e
80
+ designDataDetail: t
74
81
  });
75
82
  } else {
76
83
  /* Item has been queried already. The item content exists already. */
77
- this.selectedDesignType = e.designType;
78
- this.selectedDesignItem = e.designDataDetail;
79
- this.getCodeFactory(e.designType);
80
- this.renderDetailDataTree(e.designType);
84
+ this.selectedDesignType = t.designType;
85
+ this.selectedDesignItem = t.designDataDetail;
86
+ this.getCodeFactory(t.designType);
87
+ this.renderDetailDataTree(t.designType);
81
88
  }
82
89
  }
83
90
  }
84
91
  };
85
- this.getLoadedItem = e => {
86
- var t;
87
- return (t = this.loadedItems) === null || t === void 0 ? void 0 : t.get(e);
92
+ this.getLoadedItem = t => {
93
+ var e;
94
+ return (e = this.loadedItems) === null || e === void 0 ? void 0 : e.get(t);
88
95
  };
89
- this.objectsTreeCheckedItemsChangedHandler = e => {
90
- const t = Array.from(e.detail.values());
96
+ this.objectsTreeCheckedItemsChangedHandler = t => {
97
+ const e = Array.from(t.detail.values());
91
98
  let a = null;
92
- const r = {};
93
- for (const e of t) {
94
- if (e.item.id.startsWith("parent@")) {
95
- a = e.item.id.split("@")[1];
96
- r[a] = [];
97
- } else if (e.item.checked && a) {
98
- const t = e.item.id.split("@")[1];
99
- if (t === a) {
100
- const t = e.item.id.split("@")[0];
101
- r[a].push(t);
99
+ const i = {};
100
+ for (const t of e) {
101
+ if (t.item.id.startsWith("parent@")) {
102
+ a = t.item.id.split("@")[1];
103
+ i[a] = [];
104
+ } else if (t.item.checked && a) {
105
+ const e = t.item.id.split("@")[1];
106
+ if (e === a) {
107
+ const e = t.item.id.split("@")[0];
108
+ i[a].push(e);
102
109
  }
103
110
  }
104
111
  }
105
112
  // const { designSystem, fonts, images, panels, stencils } = result;
106
- const {fonts: i, panels: o, stencils: s} = r;
113
+ const {fonts: r, panels: s, stencils: o} = i;
107
114
  // this.designSystemSelected = designSystem;
108
- this.fontsSelected = i;
115
+ this.fontsSelected = r;
109
116
  // this.imagesSelected = images;
110
- this.panelsSelected = o;
111
- this.stencilsSelected = s;
117
+ this.panelsSelected = s;
118
+ this.stencilsSelected = o;
112
119
  };
113
120
  this.selectFile = () => {
114
- this.optionPathEl.openFile();
115
- };
116
- this.pathOnInputHandler = e => {
117
- this.path = e.detail;
121
+ this.pathURLFile.openFile();
118
122
  };
119
- this.pathOnFileSelected = e => {
120
- this.selectedFile = e.detail[0];
121
- const t = e.detail[0].name;
122
- this.path = t;
123
- this.evaluateAccessToken();
123
+ this.pathOnFileSelected = async t => {
124
+ this.selectedFile = t.detail[0];
125
+ const e = t.detail[0].name;
126
+ this.path = e;
127
+ this.showAccessToken = await this.requiresAccessTokenCallback(this.pathURLFile.value);
124
128
  };
125
- this.evaluateAccessToken = async () => {
126
- this.showAccessToken = await this.requiresAccessTokenCallback(this.optionPathEl.value);
129
+ this.pathURLFileBlurHandler = async () => {
130
+ this.showAccessToken = await this.requiresAccessTokenCallback(this.pathURLFile.value);
131
+ if (this.path !== this.pathOnLoadCallback) {
132
+ // if loadOnBlur is true, and the actual path/URL value differs from the one
133
+ // when loadCallback was called the last time, it is required to call loadCallback
134
+ // again, because the DesignData might differ from the actual.
135
+ this.loadData();
136
+ }
127
137
  };
128
138
  this.loadData = async () => {
129
139
  this.isLoading = true;
130
- const e = this.selectedFile ? this.selectedFile : this.path;
131
- const t = this.accessTokenEl ? this.accessTokenEl.value : undefined;
140
+ const t = this.selectedFile ? this.selectedFile : this.path;
141
+ const e = this.accessTokenEl ? this.accessTokenEl.value : undefined;
132
142
  this.designData = null;
133
- await this.loadCallback(e, t, this.messageCallback).then((e => {
143
+ await this.loadCallback(t, e, this.messageCallback).then((t => {
134
144
  // this.isLoading = false;
135
145
  this.messages = [];
136
- this.designData = e;
146
+ this.designData = t;
137
147
  if (this.designData) {
138
- this.panelsSelected = [ ...this.designData.panels.map((e => e.id)) ];
139
- this.stencilsSelected = [ ...this.designData.stencils.map((e => e.id)) ];
148
+ this.panelsSelected = [ ...this.designData.panels.map((t => t.id)) ];
149
+ this.stencilsSelected = [ ...this.designData.stencils.map((t => t.id)) ];
140
150
  // this.imagesSelected = [
141
151
  // ...this.designData.images.map(item => item.id)
142
152
  // ];
143
153
  // this.designSystemSelected = [
144
154
  // ...this.designData.designSystem.map(item => item.id)
145
155
  // ];
146
- this.fontsSelected = [ ...this.designData.fonts.map((e => e.id)) ];
156
+ this.fontsSelected = [ ...this.designData.fonts.map((t => t.id)) ];
147
157
  } else {
148
158
  // There was probably an error
149
159
  this.panelsSelected = [];
@@ -153,14 +163,15 @@ const f = class {
153
163
  this.fontsSelected = [];
154
164
  }
155
165
  }));
166
+ this.pathOnLoadCallback = this.path;
156
167
  this.isLoading = false;
157
168
  };
158
- this.messageCallback = e => {
159
- this.messages = [ ...this.messages, e ];
169
+ this.messageCallback = t => {
170
+ this.messages = [ ...this.messages, t ];
160
171
  };
161
- this.getDesignDataDetail = async (e, t) => {
172
+ this.getDesignDataDetail = async (t, e) => {
162
173
  let a;
163
- switch (t) {
174
+ switch (e) {
164
175
  case d:
165
176
  a = this.loadImageCallback;
166
177
  break;
@@ -178,24 +189,24 @@ const f = class {
178
189
  a = this.loadPanelDataCallback;
179
190
  break;
180
191
  }
181
- let r;
182
- await a(e).then((e => {
183
- this.selectedDesignType = t;
184
- this.selectedDesignItem = e;
185
- this.getCodeFactory(t);
186
- this.renderDetailDataTree(t);
187
- r = e;
192
+ let i;
193
+ await a(t).then((t => {
194
+ this.selectedDesignType = e;
195
+ this.selectedDesignItem = t;
196
+ this.getCodeFactory(e);
197
+ this.renderDetailDataTree(e);
198
+ i = t;
188
199
  }));
189
- return r;
200
+ return i;
190
201
  };
191
202
  this.confirm = () => {
192
- var e, t;
203
+ var t, e;
193
204
  this.confirmCallback({
194
205
  panels: this.panelsSelected,
195
206
  stencils: this.stencilsSelected,
196
207
  fonts: this.fontsSelected,
197
208
  /* images: this.imagesSelected, */
198
- moduleId: (t = (e = this.filterModuleEl) === null || e === void 0 ? void 0 : e.value) === null || t === void 0 ? void 0 : t.id,
209
+ moduleId: (e = (t = this.filterModuleEl) === null || t === void 0 ? void 0 : t.value) === null || e === void 0 ? void 0 : e.id,
199
210
  styleName: this.optionStyleEl.value,
200
211
  importAsWebPanels: this.optionImportAsEl.checked
201
212
  });
@@ -204,21 +215,33 @@ const f = class {
204
215
  this.cancelCallback();
205
216
  this.isLoading = false;
206
217
  };
207
- this.fitImagesHandler = e => {
208
- this.fitImages = e.detail.value;
218
+ this.fitImagesHandler = t => {
219
+ this.fitImages = t.detail.value;
209
220
  };
210
- this.shrinkTreeHandler = e => {
211
- const t = e.detail.value;
212
- this.shrinkTree = t;
213
- if (t) {
221
+ this.shrinkTreeHandler = t => {
222
+ const e = t.detail.value;
223
+ this.shrinkTree = e;
224
+ if (e) {
214
225
  this.shrunkenTree = true;
215
226
  } else {
216
227
  this.shrunkenTree = false;
217
228
  }
218
229
  };
230
+ this.importAsWebPanelsChangedHandler = () => {
231
+ // When "Import as Web Panels" checkbox value changes, loadCallback has to be
232
+ // called again, because the received DesignData differs between having
233
+ // "Import as Web Panels" checked or not. This only makes sense if a file is
234
+ // selected or the Path/URL input is not empty
235
+ if (this.path.length !== 0 || !this.selectedFile) {
236
+ this.loadData();
237
+ }
238
+ };
239
+ this.pathURLFileValueChangedHandler = t => {
240
+ this.path = t.detail;
241
+ };
219
242
  // 9.LOCAL METHODS -> RENDERS //
220
243
  this.renderOptions = () => {
221
- var e;
244
+ var t;
222
245
  return a("div", {
223
246
  class: {
224
247
  "options grid": true,
@@ -230,16 +253,17 @@ const f = class {
230
253
  class: "path-url-wrapper"
231
254
  }, a("gxg-form-text", {
232
255
  value: this.path,
233
- onInput: this.pathOnInputHandler,
234
256
  onFileSelected: this.pathOnFileSelected,
235
- onBlur: this.evaluateAccessToken,
236
- ref: e => this.optionPathEl = e,
257
+ onBlur: this.pathURLFileBlurHandler,
258
+ ref: t => this.pathURLFile = t,
259
+ clearButton: true,
237
260
  part: "option-path",
238
261
  disabled: this.isLoading,
239
262
  type: "file",
240
263
  acceptFile: this.extensions,
241
264
  class: "path-url",
242
- placeholder: this._componentLocale.options.pathPlaceholder
265
+ placeholder: this._componentLocale.options.pathPlaceholder,
266
+ onValueChanged: this.pathURLFileValueChangedHandler
243
267
  }), a("div", {
244
268
  class: "path-url-wrapper__buttons-container"
245
269
  }, a("gxg-button", {
@@ -264,7 +288,7 @@ const f = class {
264
288
  class: {
265
289
  "access-token": true
266
290
  },
267
- ref: e => this.accessTokenEl = e,
291
+ ref: t => this.accessTokenEl = t,
268
292
  part: "access-token",
269
293
  disabled: this.isLoading
270
294
  }) ] : null, a("gxg-label", {
@@ -273,25 +297,26 @@ const f = class {
273
297
  disabled: !this.styles || this.isLoading,
274
298
  "display-validation-styles": true,
275
299
  "display-validation-message": true,
276
- ref: e => this.optionStyleEl = e,
300
+ ref: t => this.optionStyleEl = t,
277
301
  part: "option-style",
278
302
  class: "style"
279
- }, l("gxg-combo-box-item", (e = this.styles) !== null && e !== void 0 ? e : [])), a("gxg-label", {
303
+ }, l("gxg-combo-box-item", (t = this.styles) !== null && t !== void 0 ? t : [])), a("gxg-label", {
280
304
  class: "module-label"
281
305
  }, this._componentLocale.options.module), a("gx-ide-entity-selector", {
282
306
  value: this.defaultModule,
283
307
  defaultValue: this.defaultModule,
284
308
  selectEntityCallback: this.selectModuleCallback,
285
- ref: e => this.filterModuleEl = e,
309
+ ref: t => this.filterModuleEl = t,
286
310
  class: "module"
287
311
  }), a("div", {
288
312
  class: "checkboxes-options"
289
313
  }, a("gxg-form-checkbox", {
290
314
  label: this._componentLocale.options.importAs,
291
315
  class: "import-as-web-panels",
292
- ref: e => this.optionImportAsEl = e,
316
+ ref: t => this.optionImportAsEl = t,
293
317
  part: "option-import-as-web-panels",
294
- disabled: this.isLoading
318
+ disabled: this.isLoading,
319
+ onChange: this.importAsWebPanelsChangedHandler
295
320
  }), a("div", {
296
321
  class: {
297
322
  "checkboxes-options__col-right": true,
@@ -311,10 +336,10 @@ const f = class {
311
336
  };
312
337
  this.renderMessages = () => this.messages.length > 0 ? a("div", {
313
338
  class: "messages-container",
314
- ref: e => this.messagesList = e
315
- }, this.messages.map((e => a("gxg-text", {
316
- type: this.messageType(e)
317
- }, e.type, ": ", e.text)))) : null;
339
+ ref: t => this.messagesList = t
340
+ }, this.messages.map((t => a("gxg-text", {
341
+ type: this.messageType(t)
342
+ }, t.type, ": ", t.text)))) : null;
318
343
  this.renderMain = () => {
319
344
  if (this.designData) {
320
345
  /* #main*/
@@ -335,10 +360,10 @@ const f = class {
335
360
  this.renderNoDesignData = () => {
336
361
  if (!this.isLoading) {
337
362
  return a("gxg-text", {
338
- textAlign: s.gxgMessage.common.textAlign,
339
- padding: s.gxgMessage.common.textAlign,
340
- type: s.gxgMessage.common.type,
341
- maxWidth: s.gxgMessage.common.maxWidth,
363
+ textAlign: o.gxgMessage.common.textAlign,
364
+ padding: o.gxgMessage.common.textAlign,
365
+ type: o.gxgMessage.common.type,
366
+ maxWidth: o.gxgMessage.common.maxWidth,
342
367
  part: "no-design-selected"
343
368
  }, this._componentLocale.messages.noDesignSelected, " ", a("br", null), a("gxg-text", {
344
369
  type: "text-link-no-line",
@@ -361,7 +386,7 @@ const f = class {
361
386
  checked: true,
362
387
  onCheckedItemsChange: this.objectsTreeCheckedItemsChangedHandler,
363
388
  onSelectedItemsChange: this.objectsTreeSelectedItemsChangedHandler,
364
- ref: e => this.treeDataEl = e
389
+ ref: t => this.treeDataEl = t
365
390
  }));
366
391
  this.renderFooter = () => [ a("gxg-button", {
367
392
  id: "button-ok",
@@ -378,11 +403,11 @@ const f = class {
378
403
  slot: "footer-end"
379
404
  }, this._componentLocale.footer.btnCancel) ];
380
405
  this.renderPanelTab = () => {
381
- const e = (this.selectedDesignType === c || this.selectedDesignType === g) && this.detailTreeModel.length > 0;
406
+ const t = (this.selectedDesignType === c || this.selectedDesignType === g) && this.detailTreeModel.length > 0;
382
407
  return a("div", {
383
408
  class: {
384
409
  "panel-tab": true,
385
- "panel-tab--controls-tree": e
410
+ "panel-tab--controls-tree": t
386
411
  },
387
412
  part: "data-panel-composition-container"
388
413
  }, this.selectedDesignItem && this.selectedDesignItem.composition && this.selectedDesignItem.composition.preview ? a("div", {
@@ -391,7 +416,7 @@ const f = class {
391
416
  }, a("img", {
392
417
  src: this.selectedDesignItem && this.selectedDesignItem.composition ? this.selectedDesignItem.composition.preview : undefined,
393
418
  alt: "Preview"
394
- })) : null, e ? a("gxg-tree-view", {
419
+ })) : null, t ? a("gxg-tree-view", {
395
420
  part: "data-panel-composition-tree",
396
421
  class: "panel-item",
397
422
  id: "gxg-tree-panel-data",
@@ -407,6 +432,22 @@ const f = class {
407
432
  src: this.selectedDesignItem ? this.selectedDesignItem : undefined,
408
433
  alt: "Preview"
409
434
  }));
435
+ this.tabActivatedHandler = t => {
436
+ if (t.detail) {
437
+ const e = t.detail.tab;
438
+ this.activeTabs = Object.assign(Object.assign({}, this.activeTabs), {
439
+ [this.selectedDesignType]: e
440
+ });
441
+ }
442
+ };
443
+ this.isTabActive = t => {
444
+ const e = this.selectedDesignType;
445
+ if (this.activeTabs[e] === t) {
446
+ return true;
447
+ } else {
448
+ return false;
449
+ }
450
+ };
410
451
  this.renderDesignTabs = () => a("gxg-tabs", {
411
452
  class: {
412
453
  "design-tabs": true,
@@ -424,50 +465,81 @@ const f = class {
424
465
  "tab-label": this._componentLocale.tabs.tokens,
425
466
  tab: "tokens",
426
467
  key: "tokens",
427
- "is-selected": true
468
+ onTabActivated: this.tabActivatedHandler,
469
+ isSelected: this.isTabActive("tokens")
428
470
  }), a("gxg-tab-button", {
429
471
  hidden: !this.selectedDesignType || this.selectedDesignType !== h,
430
472
  slot: "tab-bar",
431
473
  "tab-label": this._componentLocale.tabs.styles,
432
474
  tab: "styles",
433
- key: "styles"
475
+ key: "styles",
476
+ onTabActivated: this.tabActivatedHandler,
477
+ isSelected: this.isTabActive("styles")
434
478
  }), a("gxg-tab-button", {
435
479
  hidden: !this.selectedDesignType || this.selectedDesignType === h,
436
480
  slot: "tab-bar",
437
481
  "tab-label": this._componentLocale.tabs.composition,
438
482
  tab: "composition",
439
483
  key: "composition",
440
- "is-selected": true
484
+ onTabActivated: this.tabActivatedHandler,
485
+ isSelected: this.isTabActive("composition")
486
+ }), a("gxg-tab-button", {
487
+ hidden: !this.selectedDesignType || this.selectedDesignType !== c && this.selectedDesignType !== g,
488
+ slot: "tab-bar",
489
+ "tab-label": this._componentLocale.tabs.layout,
490
+ tab: "layout",
491
+ key: "layout",
492
+ onTabActivated: this.tabActivatedHandler,
493
+ isSelected: this.isTabActive("layout")
441
494
  }), a("gxg-tab-button", {
442
495
  hidden: !this.selectedDesignType || this.selectedDesignType !== c && this.selectedDesignType !== g,
443
496
  slot: "tab-bar",
444
497
  "tab-label": this._componentLocale.tabs.code,
445
498
  tab: "code",
446
- key: "code"
499
+ key: "code",
500
+ onTabActivated: this.tabActivatedHandler,
501
+ isSelected: this.isTabActive("code")
447
502
  })), a("gxg-tab", {
448
503
  tab: "tokens",
449
- key: "tokens"
504
+ key: "tokens",
505
+ isSelected: this.isTabActive("tokens")
450
506
  }, a("div", {
451
- ref: e => this.tokensFactoryRenderEl = e
507
+ ref: t => this.tokensFactoryRenderEl = t
452
508
  })), a("gxg-tab", {
453
509
  tab: "styles",
454
- key: "styles"
510
+ key: "styles",
511
+ isSelected: this.isTabActive("styles")
455
512
  }, a("div", {
456
- ref: e => this.stylesFactoryRenderEl = e
513
+ ref: t => this.stylesFactoryRenderEl = t
457
514
  })), a("gxg-tab", {
458
515
  tab: "composition",
459
- key: "composition"
516
+ key: "composition",
517
+ isSelected: this.isTabActive("composition")
460
518
  }, this.selectedDesignType === d || this.selectedDesignType === b ? this.renderImageTab() : this.renderPanelTab()), a("gxg-tab", {
519
+ tab: "layout",
520
+ key: "layout",
521
+ isSelected: this.isTabActive("layout")
522
+ }, a("div", {
523
+ ref: t => this.layoutFactoryRenderEl = t
524
+ })), a("gxg-tab", {
461
525
  tab: "code",
462
- key: "code"
526
+ key: "code",
527
+ isSelected: this.isTabActive("code")
463
528
  }, a("div", {
464
- ref: e => this.codeFactoryRenderEl = e
529
+ ref: t => this.codeFactoryRenderEl = t
465
530
  })));
531
+ this.activeTabs = {
532
+ panels: "composition",
533
+ stencils: "composition",
534
+ images: "composition",
535
+ fonts: "composition",
536
+ design_system: "tokens"
537
+ };
538
+ this.path = "";
466
539
  this.designData = null;
467
540
  this.detailTreeModel = [];
468
541
  this.isLoading = false;
469
542
  this.messages = [];
470
- this.path = "";
471
543
  this.selectedFile = undefined;
472
544
  this.selectedDesignType = undefined;
473
545
  this.selectedDesignItem = undefined;
@@ -494,9 +566,10 @@ const f = class {
494
566
  this.styles = undefined;
495
567
  this.textEditorFactoryCallback = undefined;
496
568
  }
497
- watchDesignDataHandler(e) {
498
- if (e) {
569
+ watchDesignDataHandler(t) {
570
+ if (t) {
499
571
  this.designDataTreeDataModel = [ {
572
+ order: 0,
500
573
  id: `parent@${c}`,
501
574
  class: "category tree-view-item",
502
575
  leaf: false,
@@ -505,16 +578,18 @@ const f = class {
505
578
  checkbox: true,
506
579
  checked: true,
507
580
  expanded: true,
508
- items: this.designData.panels.map((e => ({
509
- id: `${e.id}@${c}`,
581
+ items: this.designData.panels.map(((t, e) => ({
582
+ id: `${t.id}@${c}`,
510
583
  class: "object tree-view-item",
511
584
  leaf: true,
512
- caption: e.name,
585
+ caption: t.name,
513
586
  startImgSrc: "general/generator",
514
587
  checkbox: true,
515
- checked: true
588
+ checked: true,
589
+ selected: e === 0
516
590
  })))
517
591
  }, {
592
+ order: 1,
518
593
  id: `parent@${g}`,
519
594
  class: "category tree-view-item",
520
595
  leaf: false,
@@ -523,16 +598,17 @@ const f = class {
523
598
  checkbox: true,
524
599
  checked: true,
525
600
  expanded: true,
526
- items: this.designData.stencils.map((e => ({
527
- id: `${e.id}@${g}`,
601
+ items: this.designData.stencils.map((t => ({
602
+ id: `${t.id}@${g}`,
528
603
  class: "object tree-view-item",
529
604
  leaf: true,
530
- caption: e.name,
605
+ caption: t.name,
531
606
  startImgSrc: "general/generator",
532
607
  checkbox: true,
533
608
  checked: true
534
609
  })))
535
610
  }, {
611
+ order: 2,
536
612
  id: `parent@${d}`,
537
613
  class: "category tree-view-item",
538
614
  leaf: false,
@@ -541,56 +617,48 @@ const f = class {
541
617
  checkbox: true,
542
618
  checked: true,
543
619
  expanded: true,
544
- items: this.designData.images.map((e => ({
545
- id: `${e.id}@${d}`,
620
+ items: this.designData.images.map((t => ({
621
+ id: `${t.id}@${d}`,
546
622
  class: "object tree-view-item",
547
623
  leaf: true,
548
- caption: e.name,
624
+ caption: t.name,
549
625
  startImgSrc: "general/generator",
550
626
  checkbox: true,
551
627
  checked: true
552
628
  })))
553
629
  }, {
554
- id: `parent@${h}`,
630
+ order: 3,
631
+ id: `parent@${b}`,
555
632
  class: "category tree-view-item",
556
633
  leaf: false,
557
- caption: this._componentLocale.tree.designSystem,
634
+ caption: this._componentLocale.tree.fonts,
558
635
  startImgSrc: "general/knowledge-base",
559
636
  checkbox: true,
560
637
  checked: true,
561
638
  expanded: true,
562
- items: this.designData.designSystem.map((e => ({
639
+ items: this.designData.fonts.map((t => ({
640
+ id: `${t.id}@${b}`,
563
641
  class: "object tree-view-item",
564
642
  leaf: true,
565
- id: `${e.id}@${h}`,
566
- caption: e.name,
643
+ caption: t.name,
567
644
  startImgSrc: "general/generator",
568
645
  checkbox: true,
569
646
  checked: true
570
647
  })))
571
648
  }, {
572
- id: `parent@${b}`,
649
+ order: 4,
650
+ id: `parent@${h}`,
573
651
  class: "category tree-view-item",
574
- leaf: false,
575
- caption: this._componentLocale.tree.fonts,
652
+ leaf: true,
653
+ caption: this._componentLocale.tree.designSystem,
576
654
  startImgSrc: "general/knowledge-base",
577
655
  checkbox: true,
578
- checked: true,
579
- expanded: true,
580
- items: this.designData.fonts.map((e => ({
581
- id: `${e.id}@${b}`,
582
- class: "object tree-view-item",
583
- leaf: true,
584
- caption: e.name,
585
- startImgSrc: "general/generator",
586
- checkbox: true,
587
- checked: true
588
- })))
656
+ checked: true
589
657
  } ];
590
658
  }
591
659
  }
592
- watchShrinkTreeHandler(e) {
593
- if (e) {
660
+ watchShrinkTreeHandler(t) {
661
+ if (t) {
594
662
  this.attachTreeMouseListeners();
595
663
  } else {
596
664
  this.removeTreeMouseListeners();
@@ -598,7 +666,7 @@ const f = class {
598
666
  }
599
667
  // 6.COMPONENT LIFECYCLE EVENTS //
600
668
  async componentWillLoad() {
601
- this._componentLocale = await o.getComponentStrings(this.el);
669
+ this._componentLocale = await s.getComponentStrings(this.el);
602
670
  }
603
671
  componentDidRender() {
604
672
  if (!this.renderedFirstTime) {
@@ -610,8 +678,8 @@ const f = class {
610
678
  this.removeTreeMouseListeners();
611
679
  }
612
680
  // 7.LISTENERS //
613
- watchMessagesHandler(e, t) {
614
- if (e !== t) {
681
+ watchMessagesHandler(t, e) {
682
+ if (t !== e) {
615
683
  if (this.messagesList) {
616
684
  this.messagesList.scrollTop = this.messagesList.scrollHeight;
617
685
  }
@@ -622,13 +690,13 @@ const f = class {
622
690
  * Validate necessary data input
623
691
  */
624
692
  async validate() {
625
- const e = true;
626
- return e;
693
+ const t = true;
694
+ return t;
627
695
  }
628
- loadTreeItemCompositionModel(e) {
629
- const t = [];
630
- for (const a of e) {
631
- let e = {
696
+ loadTreeItemCompositionModel(t) {
697
+ const e = [];
698
+ for (const a of t) {
699
+ let t = {
632
700
  id: a.name,
633
701
  caption: a.name,
634
702
  startImgSrc: a.type,
@@ -637,19 +705,20 @@ const f = class {
637
705
  leaf: a.leaf
638
706
  };
639
707
  if (a.controls) {
640
- e = Object.assign(Object.assign({}, e), {
708
+ t = Object.assign(Object.assign({}, t), {
641
709
  items: this.loadTreeItemCompositionModel(a.controls)
642
710
  });
643
711
  }
644
- t.push(e);
712
+ e.push(t);
645
713
  }
646
- return t;
714
+ return e;
647
715
  }
648
- getCodeFactory(e) {
649
- switch (e) {
716
+ getCodeFactory(t) {
717
+ switch (t) {
650
718
  case c:
651
719
  case g:
652
720
  this.textEditorFactoryCallback("html", this.codeFactoryRenderEl, this.selectedDesignItem.code);
721
+ this.textEditorFactoryCallback("html", this.layoutFactoryRenderEl, this.selectedDesignItem.layout);
653
722
  break;
654
723
 
655
724
  case h:
@@ -658,8 +727,8 @@ const f = class {
658
727
  break;
659
728
  }
660
729
  }
661
- renderDetailDataTree(e) {
662
- switch (e) {
730
+ renderDetailDataTree(t) {
731
+ switch (t) {
663
732
  case c:
664
733
  case g:
665
734
  this.detailTreeModel = this.loadTreeItemCompositionModel(this.selectedDesignItem.composition.controls);
@@ -668,7 +737,7 @@ const f = class {
668
737
  }
669
738
  // 10.RENDER() FUNCTION //
670
739
  render() {
671
- return a(r, {
740
+ return a(i, {
672
741
  class: "gx-ide-component"
673
742
  }, a("div", {
674
743
  class: "gx-ide-main-wrapper"
@@ -677,15 +746,15 @@ const f = class {
677
746
  noContentGap: true,
678
747
  displayBorderBottom: true,
679
748
  part: "options-container",
680
- slimmerFooter: s.gxIdeContainer.slimmerFooter,
749
+ slimmerFooter: o.gxIdeContainer.slimmerFooter,
681
750
  containerTitle: this.displayTitle ? this._componentLocale.componentName : null
682
751
  }, this.renderOptions(), this.renderMain(), this.renderFooter())));
683
752
  }
684
753
  static get assetsDirs() {
685
- return [ "gx-ide-assets/import-from-design" ];
754
+ return [ "gx-ide-assets/design-import" ];
686
755
  }
687
756
  get el() {
688
- return i(this);
757
+ return r(this);
689
758
  }
690
759
  static get watchers() {
691
760
  return {
@@ -698,5 +767,5 @@ const f = class {
698
767
 
699
768
  f.style = n;
700
769
 
701
- export { f as gx_ide_import_from_design };
702
- //# sourceMappingURL=p-9bf62c5c.entry.js.map
770
+ export { f as gx_ide_design_import };
771
+ //# sourceMappingURL=p-c46c7974.entry.js.map