@genexus/genexus-ide-ui 0.0.139 → 0.0.140

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 (44) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-bpm-import-files.cjs.entry.js +103 -0
  3. package/dist/cjs/gx-ide-bpm-import-files.cjs.entry.js.map +1 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/collection/collection-manifest.json +3 -3
  6. package/dist/collection/components/bpm/import-files/gx-ide-assets/bpm-import-files/langs/bpm-import-files.lang.en.json +18 -0
  7. package/dist/collection/components/bpm/import-files/helpers.js.map +1 -0
  8. package/dist/collection/components/bpm/{files-selector/files-selector.css → import-files/import-files.css} +27 -0
  9. package/dist/collection/components/bpm/{files-selector/files-selector.js → import-files/import-files.js} +32 -33
  10. package/dist/collection/components/bpm/import-files/import-files.js.map +1 -0
  11. package/dist/components/gx-ide-bpm-import-files.d.ts +11 -0
  12. package/dist/components/gx-ide-bpm-import-files.js +172 -0
  13. package/dist/components/gx-ide-bpm-import-files.js.map +1 -0
  14. package/dist/esm/genexus-ide-ui.js +1 -1
  15. package/dist/esm/gx-ide-bpm-import-files.entry.js +99 -0
  16. package/dist/esm/gx-ide-bpm-import-files.entry.js.map +1 -0
  17. package/dist/esm/loader.js +1 -1
  18. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  19. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  20. package/dist/genexus-ide-ui/gx-ide-assets/bpm-import-files/langs/bpm-import-files.lang.en.json +18 -0
  21. package/dist/genexus-ide-ui/{p-82291acd.entry.js → p-03b2a741.entry.js} +43 -19
  22. package/dist/genexus-ide-ui/p-03b2a741.entry.js.map +1 -0
  23. package/dist/types/components/bpm/{files-selector/files-selector.d.ts → import-files/import-files.d.ts} +11 -5
  24. package/dist/types/components.d.ts +34 -32
  25. package/package.json +1 -1
  26. package/dist/cjs/gx-ide-bpm-files-selector.cjs.entry.js +0 -101
  27. package/dist/cjs/gx-ide-bpm-files-selector.cjs.entry.js.map +0 -1
  28. package/dist/collection/components/bpm/files-selector/files-selector.js.map +0 -1
  29. package/dist/collection/components/bpm/files-selector/gx-ide-assets/bpm-files-selector/langs/bpm-files-selector.lang.en.json +0 -14
  30. package/dist/collection/components/bpm/files-selector/helpers.js.map +0 -1
  31. package/dist/components/gx-ide-bpm-files-selector.d.ts +0 -11
  32. package/dist/components/gx-ide-bpm-files-selector.js +0 -164
  33. package/dist/components/gx-ide-bpm-files-selector.js.map +0 -1
  34. package/dist/esm/gx-ide-bpm-files-selector.entry.js +0 -97
  35. package/dist/esm/gx-ide-bpm-files-selector.entry.js.map +0 -1
  36. package/dist/genexus-ide-ui/gx-ide-assets/bpm-files-selector/langs/bpm-files-selector.lang.en.json +0 -14
  37. package/dist/genexus-ide-ui/p-82291acd.entry.js.map +0 -1
  38. package/dist/types/components/bpm/import-gxpm/import-gxpm.d.ts +0 -21
  39. /package/dist/collection/components/bpm/{files-selector/gx-ide-assets/bpm-files-selector/langs/bpm-files-selector.lang.ja.json → import-files/gx-ide-assets/bpm-import-files/langs/bpm-import-files.lang.ja.json} +0 -0
  40. /package/dist/collection/components/bpm/{files-selector/gx-ide-assets/bpm-files-selector/langs/bpm-files-selector.lang.zh.json → import-files/gx-ide-assets/bpm-import-files/langs/bpm-import-files.lang.zh.json} +0 -0
  41. /package/dist/collection/components/bpm/{files-selector → import-files}/helpers.js +0 -0
  42. /package/dist/genexus-ide-ui/gx-ide-assets/{bpm-files-selector/langs/bpm-files-selector.lang.ja.json → bpm-import-files/langs/bpm-import-files.lang.ja.json} +0 -0
  43. /package/dist/genexus-ide-ui/gx-ide-assets/{bpm-files-selector/langs/bpm-files-selector.lang.zh.json → bpm-import-files/langs/bpm-import-files.lang.zh.json} +0 -0
  44. /package/dist/types/components/bpm/{files-selector → import-files}/helpers.d.ts +0 -0
@@ -0,0 +1,103 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-5ab4492a.js');
6
+ const config = require('./config-8246d533.js');
7
+ const locale = require('./locale-bf43b87c.js');
8
+ const renderListItem = require('./render-list-item-c7e24eb8.js');
9
+
10
+ const filesToListItemsData = (files) => {
11
+ const itemsData = [];
12
+ files.forEach(file => {
13
+ const itemId = typeof file === "string" ? file : file.name;
14
+ const itemValue = typeof file === "string" ? file : file.name;
15
+ const itemIcon = undefined;
16
+ const itemChecked = false;
17
+ itemsData.push({
18
+ itemId: itemId,
19
+ itemValue: itemValue,
20
+ itemIcon: itemIcon,
21
+ itemChecked: itemChecked
22
+ });
23
+ });
24
+ return itemsData;
25
+ };
26
+
27
+ const importFilesCss = ":root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-01--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-02{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-02--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--color-on-primary)}.gxg-title-03{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-03--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-04{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-04--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-05{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-05--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable)}.gxg-text--negative{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text--gray{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--dimmed)}.gxg-quote{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);font-style:italic}.gxg-quote--negative{color:var(--ds-base-font-color--negative)}.gxg-link{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--ds-base-font-color--link-hover)}.gxg-link:active{color:var(--ds-base-font-color--link-active)}.gxg-link-gray{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed)}.gxg-link-gray:hover{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed);filter:brightness(1.4)}.gxg-alert-error{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--error);display:inline-block}.gxg-alert-warning{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--warning);display:inline-block}.gxg-alert-success{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--success);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--ds-base-font-family-primary);font-weight:var(--gxg-label-font-weight);font-size:var(--gxg-label-font-size);color:var(--gxg-label-color);text-align:center;line-height:1.455em;display:flex;align-items:center}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-scrollbar{}.gxg-scrollbar::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gxg-scrollbar::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gxg-scrollbar::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}.justify-start{display:flex;justify-content:start}.justify-center{display:flex;justify-content:center}.justify-end{display:flex;justify-content:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--mer-color__neutral-gray--800)}ch-grid-column:first-child{padding-inline-start:var(--gx-ide-container__padding) !important}ch-grid-column:last-child{padding-inline-end:var(--gx-ide-container__padding) !important}ch-grid-cell{--mer-spacing--xs:var(--gx-ide-container__padding)}.layout{display:grid;gap:var(--mer-spacing--lg);box-sizing:border-box}.layout--two-cols{grid-template-columns:1fr 1fr}.layout--space-above{padding-block-start:var(--mer-spacing--lg)}gxg-tabs{box-shadow:none}:host(.gx-ide-component){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(--mer-font__weight--regular);font-size:var(--mer-font__size--xs);font-family:var(--mer-font-family--primary);height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-main::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-main::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-main::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-overflow::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.tree-container{display:flex;height:100%;width:100%;box-sizing:border-box}p{margin:0;font-size:var(--mer-font__size--xxs)}.control-wrapper{display:flex;gap:var(--mer-spacing--xs);align-items:center}.control-wrapper--vertical{flex-direction:column;align-items:start}.controls-wrapper{display:flex;gap:var(--mer-spacing--xs)}.controls-wrapper--vertical{flex-direction:column;align-items:start}.input-text{box-sizing:border-box;background-color:transparent;border:var(--mer-border__width--sm) solid var(--mer-border-color__dim);border-radius:var(--mer-border__width--lg);height:26px;color:var(--mer-text__bright);font-size:var(--mer-font__size--xxs)}.input-text--full-width{align-self:stretch}:host{display:block}.main{display:grid;grid-template-rows:1fr auto;height:100%;gap:var(--gx-ide-form-items-gap)}.path-list{width:100%;height:100%}gx-ide-list-selector::part(list){height:100%}.hidden-input{display:none}.checkbox-container{display:flex;gap:0.5rem}.footer{display:flex;flex-direction:column;gap:var(--gx-ide-form-items-gap)}";
28
+
29
+ const GxIdeTemplate = class {
30
+ constructor(hostRef) {
31
+ index.registerInstance(this, hostRef);
32
+ this.componentDidRenderFirstTime = index.createEvent(this, "componentDidRenderFirstTime", 7);
33
+ this.selectionChanged = index.createEvent(this, "selectionChanged", 7);
34
+ this.renderedFirstTime = false;
35
+ // 7.LISTENERS //
36
+ // 8.PUBLIC METHODS API //
37
+ // 9.LOCAL METHODS //
38
+ this.fileSelectionChangedHandler = (selectedItem) => {
39
+ this.selectionChanged.emit();
40
+ const selectedFiles = Array.isArray(selectedItem.detail)
41
+ ? selectedItem.detail
42
+ : [selectedItem.detail];
43
+ this.selectedFiles = selectedFiles.map(item => item.itemValue);
44
+ };
45
+ this.loadFileHandle = async () => {
46
+ this.fileInput.click();
47
+ };
48
+ this.handleFileInputChange = (event) => {
49
+ const fileInput = event.target;
50
+ if (fileInput.files && fileInput.files.length > 0) {
51
+ const newFiles = Array.from(fileInput.files);
52
+ const uniqueFiles = newFiles.filter(newFile => !this.files.some(existingFile => existingFile.name === newFile.name));
53
+ this.files = [...this.files, ...uniqueFiles];
54
+ }
55
+ this.fileInput.value = null;
56
+ };
57
+ this.confirmCallbackHandle = async () => {
58
+ if (this.confirmCallback && this.files.length > 0) {
59
+ const data = {
60
+ automaticBackup: this.automaticBackupEl.checked,
61
+ files: this.files
62
+ };
63
+ await this.confirmCallback(data);
64
+ }
65
+ };
66
+ this.removeFiles = (filesToRemove) => {
67
+ this.files = this.files.filter(file => !filesToRemove.includes(file.name));
68
+ this.selectedFiles = [];
69
+ this.fileInput.value = null;
70
+ };
71
+ this.handleRemoveButtonClick = () => {
72
+ this.removeFiles(this.selectedFiles);
73
+ };
74
+ this.files = [];
75
+ this.selectedFiles = [];
76
+ this.displayTitle = false;
77
+ this.allowedExtensions = undefined;
78
+ this.confirmCallback = undefined;
79
+ this.cancelCallback = undefined;
80
+ }
81
+ // 6.COMPONENT LIFECYCLE METHODS //
82
+ async componentWillLoad() {
83
+ this._componentLocale = await locale.Locale.getComponentStrings(this.el);
84
+ }
85
+ componentDidRender() {
86
+ if (!this.renderedFirstTime) {
87
+ this.componentDidRenderFirstTime.emit(this._componentLocale.componentName);
88
+ this.renderedFirstTime = true;
89
+ }
90
+ }
91
+ // 10.RENDER() FUNCTION //
92
+ render() {
93
+ var _a;
94
+ return (index.h(index.Host, { class: "gx-ide-component" }, index.h("div", { class: "gx-ide-main-wrapper" }, index.h("gx-ide-container", { containerTitle: this.displayTitle ? this._componentLocale.componentName : null, slimmerFooter: config.config.gxIdeContainer.slimmerFooter }, index.h("div", { class: "main" }, index.h("div", { class: "controls-wrapper controls-wrapper--vertical" }, index.h("label", { htmlFor: "path-list" }, this._componentLocale.main.listLabel), index.h("gx-ide-list-selector", { id: "path-list", type: "multi-selection", listName: "path-list", ordered: true, onSelectionChanged: this.fileSelectionChangedHandler, class: "path-list" }, renderListItem.renderListItems(filesToListItemsData(this.files)))), index.h("div", { class: "footer" }, index.h("div", { class: "checkbox-container" }, index.h("ch-checkbox", { id: "automatic-backup", accessibleName: this._componentLocale.main.automaticBackupLabel, checkedValue: "true", unCheckedValue: "false", value: "checked", ref: el => (this.automaticBackupEl = el) }), index.h("label", { htmlFor: "automatic-backup" }, this._componentLocale.main.automaticBackupLabel)), index.h("div", { class: "controls-wrapper" }, index.h("input", { type: "file", id: "input_file", accept: (_a = this.allowedExtensions) === null || _a === void 0 ? void 0 : _a.join(", "), ref: el => (this.fileInput = el), onChange: this.handleFileInputChange, class: "hidden-input", multiple: true }), index.h("button", { onClick: this.loadFileHandle }, this._componentLocale.main.addFilesButton), index.h("button", { onClick: this.handleRemoveButtonClick, disabled: this.selectedFiles.length === 0 }, this._componentLocale.main.removeFilesButton, " (", this.selectedFiles.length, ")")))), index.h("button", { slot: "footer-end", onClick: this.confirmCallbackHandle }, this._componentLocale.footer.confirmButton), index.h("button", { slot: "footer-end", onClick: this.cancelCallback }, this._componentLocale.footer.cancelButton)))));
95
+ }
96
+ static get assetsDirs() { return ["gx-ide-assets/bpm-import-files"]; }
97
+ get el() { return index.getElement(this); }
98
+ };
99
+ GxIdeTemplate.style = importFilesCss;
100
+
101
+ exports.gx_ide_bpm_import_files = GxIdeTemplate;
102
+
103
+ //# sourceMappingURL=gx-ide-bpm-import-files.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"gx-ide-bpm-import-files.entry.cjs.js","mappings":";;;;;;;;;AAEO,MAAM,oBAAoB,GAAG,CAAC,KAAwB;IAC3D,MAAM,SAAS,GAAe,EAAE,CAAC;IACj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oBAAoB,CAC1C,CACJ,EACNA,iBAAK,KAAK,EAAC,kBAAkB,IAC3BA,mBACE,IAAI,EAAC,MAAM,EACX,EAAE,EAAC,YAAY,EACf,MAAM,EAAE,MAAA,IAAI,CAAC,iBAAiB,0CAAE,IAAI,CAAC,IAAI,CAAC,EAC1C,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,SAAS,GAAG,EAAsB,CAAC,EACpD,QAAQ,EAAE,IAAI,CAAC,qBAAqB,EACpC,KAAK,EAAC,cAAc,EACpB,QAAQ,SACR,EACFA,oBAAQ,OAAO,EAAE,IAAI,CAAC,cAAc,IACjC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,cAAc,CACnC,EACTA,oBACE,OAAO,EAAE,IAAI,CAAC,uBAAuB,EACrC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC,IAExC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,iBAAiB,QAC5C,IAAI,CAAC,aAAa,CAAC,MAAM,MACnB,CACL,CACF,CACF,EAENA,oBAAQ,IAAI,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,qBAAqB,IAC1D,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,aAAa,CACpC,EACTA,oBAAQ,IAAI,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,cAAc,IACnD,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,YAAY,CACnC,CACQ,CACf,CACD,EACP;KACH;;;;;;;;","names":["Locale","h","Host","config","renderListItems"],"sources":["src/components/bpm/import-files/helpers.ts","src/components/bpm/import-files/import-files.scss?tag=gx-ide-bpm-import-files&encapsulation=shadow","src/components/bpm/import-files/import-files.tsx"],"sourcesContent":["import { ItemData } from \"../../_helpers/list-selector/list-selector-item/list-selector-item\";\n\nexport const filesToListItemsData = (files: string[] | File[]): ItemData[] => {\n const itemsData: ItemData[] = [];\n files.forEach(file => {\n const itemId = typeof file === \"string\" ? file : file.name;\n const itemValue = typeof file === \"string\" ? file : file.name;\n const itemIcon: string = undefined;\n const itemChecked: boolean = false;\n itemsData.push({\n itemId: itemId,\n itemValue: itemValue,\n itemIcon: itemIcon,\n itemChecked: itemChecked\n });\n });\n return itemsData;\n};\n","@import \"../../../global/gx-ide-common.scss\";\n@import \"../../../global/gx-ide-mixins.scss\";\n@import \"../../../global/temporary-tokens-chameleon.scss\";\n\n:host {\n display: block;\n}\n\n.main {\n display: grid;\n grid-template-rows: 1fr auto;\n height: 100%;\n gap: var(--gx-ide-form-items-gap);\n}\n.path-list {\n width: 100%;\n height: 100%;\n}\ngx-ide-list-selector::part(list) {\n height: 100%;\n}\n.hidden-input {\n display: none;\n}\n.checkbox-container {\n display: flex;\n gap: 0.5rem;\n}\n.footer {\n display: flex;\n flex-direction: column;\n gap: var(--gx-ide-form-items-gap);\n}\n","/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n State\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\nimport { CheckedItemsInfo } from \"../../_helpers/list-selector/list-selector\";\n/* CUSTOM IMPORTS */\nimport { config } from \"../../../common/config\";\nimport { Locale } from \"../../../common/locale\";\nimport { renderListItems } from \"../../../common/render-list-item\";\nimport { filesToListItemsData } from \"./helpers\";\n\n@Component({\n tag: \"gx-ide-bpm-import-files\",\n styleUrl: \"import-files.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/bpm-import-files\"]\n})\nexport class GxIdeTemplate {\n // 1.OWN PROPERTIES //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n\n private renderedFirstTime = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeBpmImportFilesElement;\n\n private fileInput: HTMLInputElement;\n private automaticBackupEl: HTMLChCheckboxElement;\n\n // 3.STATE() VARIABLES //\n /**\n * Contains the list of files\n */\n @State() files: File[] = [];\n\n /**\n * Contains the list of selected files\n */\n @State() selectedFiles: string[] = [];\n\n // 4.PUBLIC PROPERTY API | WATCH'S //\n\n /**\n * If true it displays the component title on the header\n */\n @Prop() readonly displayTitle = false;\n\n /**\n * Allowed extensions when 'Add files' button is pressed\n */\n @Prop() readonly allowedExtensions: string[];\n\n /**\n * Callback invoked when user press 'OK' button\n */\n @Prop() readonly confirmCallback: (data: ImportData) => Promise<boolean>;\n\n /**\n * Callback invoked when user press 'Cancel' button.\n */\n @Prop() readonly cancelCallback: () => Promise<void>;\n\n // 5.EVENTS (EMIT) //\n\n /**\n * @description Gets fired when the component has rendered for the first time.\n */\n @Event() componentDidRenderFirstTime: EventEmitter<string>;\n\n /**\n * @description Gets fired when something changes on items section.\n */\n @Event() selectionChanged: EventEmitter<void>;\n\n // 6.COMPONENT LIFECYCLE METHODS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n componentDidRender() {\n if (!this.renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(\n this._componentLocale.componentName\n );\n this.renderedFirstTime = true;\n }\n }\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n private fileSelectionChangedHandler = (\n selectedItem: CustomEvent<CheckedItemsInfo>\n ) => {\n this.selectionChanged.emit();\n\n const selectedFiles = Array.isArray(selectedItem.detail)\n ? selectedItem.detail\n : [selectedItem.detail];\n\n this.selectedFiles = selectedFiles.map(item => item.itemValue);\n };\n\n private loadFileHandle = async () => {\n this.fileInput.click();\n };\n\n private handleFileInputChange = (event: Event) => {\n const fileInput = event.target as HTMLInputElement;\n\n if (fileInput.files && fileInput.files.length > 0) {\n const newFiles: File[] = Array.from(fileInput.files);\n const uniqueFiles = newFiles.filter(\n newFile =>\n !this.files.some(existingFile => existingFile.name === newFile.name)\n );\n this.files = [...this.files, ...uniqueFiles];\n }\n\n this.fileInput.value = null;\n };\n\n private confirmCallbackHandle = async () => {\n if (this.confirmCallback && this.files.length > 0) {\n const data: ImportData = {\n automaticBackup: this.automaticBackupEl.checked,\n files: this.files\n };\n\n await this.confirmCallback(data);\n }\n };\n\n private removeFiles = (filesToRemove: string[]) => {\n this.files = this.files.filter(file => !filesToRemove.includes(file.name));\n\n this.selectedFiles = [];\n this.fileInput.value = null;\n };\n\n private handleRemoveButtonClick = () => {\n this.removeFiles(this.selectedFiles);\n };\n\n // 10.RENDER() FUNCTION //\n\n render() {\n return (\n <Host class=\"gx-ide-component\">\n <div class=\"gx-ide-main-wrapper\">\n <gx-ide-container\n containerTitle={\n this.displayTitle ? this._componentLocale.componentName : null\n }\n slimmerFooter={config.gxIdeContainer.slimmerFooter}\n >\n <div class=\"main\">\n {/* path list*/}\n <div class=\"controls-wrapper controls-wrapper--vertical\">\n <label htmlFor=\"path-list\">\n {this._componentLocale.main.listLabel}\n </label>\n <gx-ide-list-selector\n id=\"path-list\"\n type=\"multi-selection\"\n listName=\"path-list\"\n ordered\n onSelectionChanged={this.fileSelectionChangedHandler}\n class=\"path-list\"\n >\n {renderListItems(filesToListItemsData(this.files))}\n </gx-ide-list-selector>\n </div>\n\n <div class=\"footer\">\n <div class=\"checkbox-container\">\n <ch-checkbox\n id=\"automatic-backup\"\n accessibleName={\n this._componentLocale.main.automaticBackupLabel\n }\n checkedValue=\"true\"\n unCheckedValue=\"false\"\n value=\"checked\"\n ref={el =>\n (this.automaticBackupEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n <label htmlFor=\"automatic-backup\">\n {this._componentLocale.main.automaticBackupLabel}\n </label>\n </div>\n <div class=\"controls-wrapper\">\n <input\n type=\"file\"\n id=\"input_file\"\n accept={this.allowedExtensions?.join(\", \")}\n ref={el => (this.fileInput = el as HTMLInputElement)}\n onChange={this.handleFileInputChange}\n class=\"hidden-input\"\n multiple\n />\n <button onClick={this.loadFileHandle}>\n {this._componentLocale.main.addFilesButton}\n </button>\n <button\n onClick={this.handleRemoveButtonClick}\n disabled={this.selectedFiles.length === 0}\n >\n {this._componentLocale.main.removeFilesButton} (\n {this.selectedFiles.length})\n </button>\n </div>\n </div>\n </div>\n\n <button slot=\"footer-end\" onClick={this.confirmCallbackHandle}>\n {this._componentLocale.footer.confirmButton}\n </button>\n <button slot=\"footer-end\" onClick={this.cancelCallback}>\n {this._componentLocale.footer.cancelButton}\n </button>\n </gx-ide-container>\n </div>\n </Host>\n );\n }\n}\n\nexport type ImportData = {\n files: File[];\n automaticBackup: boolean;\n};\n"],"version":3}