@maggioli-design-system/magma 1.11.5 → 1.11.6

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.
@@ -433,12 +433,13 @@ const MdsInputUpload = class {
433
433
  this.t.lang(this.host);
434
434
  this.actionTitle = this.t.get('clickOrDrag', { maxFiles: this.maxFiles });
435
435
  this.userSort = (_a = localStorage.getItem(LOCALSTORAGE_KEY_USER_SORT)) !== null && _a !== void 0 ? _a : 'date';
436
+ this.updateInitialValue(this.initialValue);
436
437
  }
437
438
  componentDidLoad() {
438
439
  this.updateCSSCustomProps();
439
440
  }
440
- updateInitialValue(newValue, oldValue) {
441
- if ((!oldValue || oldValue.length === 0) && newValue) {
441
+ updateInitialValue(newValue) {
442
+ if (newValue) {
442
443
  this.onAdd(newValue);
443
444
  }
444
445
  }
@@ -615,12 +616,12 @@ const MdsInputUpload = class {
615
616
  return !!this.sort && this.files.length > 1;
616
617
  }
617
618
  render() {
618
- return (index.h(index.Host, { key: '64fd13514b3166b6944f979193e32b282865590b' }, index.h("div", { key: '6da244c559b2f3db324a811efeba5eec09427d9b', class: "drag-area", onDrop: this.onDropHandler, onDragOver: this.onDragOverHandler, onDragEnter: this.onDragEnterHandler, onDragLeave: this.onDragLeaveHandler, ref: dragArea => this.elDragArea = dragArea }, index.h("div", { key: '121ac8c11bcece89876c35caa0d8b7fe0db705ee', class: "main-action" }, index.h("div", { key: '1d17dbe2cdfe125dee111f621662fb032e4bdd3e', class: "main-action-icon" }, index.h("i", { key: '0b8e3628bda0a797fdcc45839241e7c2f02753e1', class: "icon", innerHTML: miBaselineAddCircle })), index.h("mds-text", { key: '367df10b5c8cf6cfb39f50efc64f730d0ffe54fb', animation: this.animateText ? 'yugop' : 'none', variant: "title", typography: "action", text: this.actionTitle })), index.h("div", { key: '8d33fd4a06db1ec030e68edf3fb0c4cd0121eda2', class: "main-actions" }, index.h("mds-button", { key: '19a16d19d74056b91489d12fd5fe597dda4d040f', variant: 'primary', onClick: () => { var _a; return (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.click(); } }, " ", this.files ? this.t.get('addFile', { maxFiles: this.maxFiles }) : this.t.get('selectFile')), this.files.length > 0 && index.h("mds-button", { key: '2dc5c882dd0dd4a50a436bfd48de5cf5245947c2', variant: 'error', onClick: this.onReset }, this.t.get('cancel'))), index.h("div", { key: '003925161b2dc8db7a9f3bb64cb1f144200f0aee', class: "main-infos" }, index.h("mds-progress", { key: '4f02401ecbc1f13103f6c3dcfea63d574f851190', "aria-hidden": "true", class: "progress-bar", progress: this.progress }), this.files.length < 1
619
+ return (index.h(index.Host, { key: '6140022f85d4a662c1b61a40c38ed30f9fb14a49' }, index.h("div", { key: '1e89f777a3697def6e343904b19c24d6bc80cde2', class: "drag-area", onDrop: this.onDropHandler, onDragOver: this.onDragOverHandler, onDragEnter: this.onDragEnterHandler, onDragLeave: this.onDragLeaveHandler, ref: dragArea => this.elDragArea = dragArea }, index.h("div", { key: '18e6c6a5c18f44e0c6804b32b01aef0b2228988c', class: "main-action" }, index.h("div", { key: 'a3ca7b1ede7acb8902afae3745117a4bb4443a8e', class: "main-action-icon" }, index.h("i", { key: '5311081174389e679a3c1acdad40deae10440bf2', class: "icon", innerHTML: miBaselineAddCircle })), index.h("mds-text", { key: '46c8b6e1ac1f2c1147d96c946c2cf486524a8c3d', animation: this.animateText ? 'yugop' : 'none', variant: "title", typography: "action", text: this.actionTitle })), index.h("div", { key: '0ad8ee3fac7185ccd650056fed8911706043fe12', class: "main-actions" }, index.h("mds-button", { key: 'b76958fcadff4e698aa31240895aed738f9b7e6f', variant: 'primary', onClick: () => { var _a; return (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.click(); } }, " ", this.files ? this.t.get('addFile', { maxFiles: this.maxFiles }) : this.t.get('selectFile')), this.files.length > 0 && index.h("mds-button", { key: 'd4c1c6fd33bc786b4129f1d8d32627a6bb13b98d', variant: 'error', onClick: this.onReset }, this.t.get('cancel'))), index.h("div", { key: 'f14afe5c5a4b56558b2fb2f447c7debf1ba82119', class: "main-infos" }, index.h("mds-progress", { key: '72843fa6e98aa1f36d555a138723096627c2ed25', "aria-hidden": "true", class: "progress-bar", progress: this.progress }), this.files.length < 1
619
620
  ? index.h("mds-text", { variant: "info", typography: "caption" }, this.t.get('maxFilesUpload', { maxFiles: this.maxFiles }))
620
621
  : index.h("mds-text", { variant: "info", typography: "caption" }, this.maxFiles
621
622
  ? this.t.get('currentFilesWithMax', { currentFiles: this.files.length, maxFiles: this.maxFiles })
622
- : this.t.get('currentFilesNoMax', { currentFiles: this.files.length })))), index.h("input", { key: '361c4d80369e0c42724d749271e855d302b84b79', type: 'file', accept: this.accept, hidden: true, ref: i => this.nativeInput = i, onChange: this.onAdd, multiple: this.maxFiles > 1 }), index.h("div", { key: '901be8f68888bf2edf57fe362dfb4971561ff38c', class: "additional-infos" }, index.h("div", { key: 'ebaf9679a643913df6ac7a0425f1da040d982c44', class: clsx.clsx('file-specs', this.isSortTabShown() && 'file-specs-sort') }, index.h("mds-text", { key: 'c0b7b70c2b6da485d28ea27d8a4278784207ba98', variant: "info", typography: "caption" }, this.extensions ? `${this.t.get('canUpload')} ${this.extensions}` : this.t.get('canUploadAll')), index.h("mds-text", { key: '13f3cb1f431bbb058dd2944a7ffb57e7f3b71635', variant: "info", typography: "caption" }, this.t.get('maxFileSizePerFile', { maxFileSize: this.maxFileSize }))), this.isSortTabShown() &&
623
- index.h("mds-tab", { key: '8aa2fc09ef9eaf277c7646e8abd424b322b0f9d1', class: "action-sort", onMdsTabChange: event => this.onChangeTab(event.detail) }, index.h("mds-tab-item", { key: 'f1e4197a97118ce768225347a4ca4d29cb2ea1b1', icon: iconSortById, selected: this.userSort === 'date', title: this.t.get('sortByDate'), value: 'date' }), index.h("mds-tab-item", { key: 'ee763fadf59a50f22ce15158403478f52f38b877', icon: iconSortByStatus, selected: this.userSort === 'status', title: this.t.get('sortByStatus'), value: 'status' }))), index.h("div", { key: '2930aa1cf12f053c68c43465664fbbb4abcf09ce', class: clsx.clsx('file-list', this.files.length > this.cssMinCols && 'file-list--more-items') }, this.files.map(file => {
623
+ : this.t.get('currentFilesNoMax', { currentFiles: this.files.length })))), index.h("input", { key: 'baf6f4b9de84b6fea0dd604853fcfce7bb2037fd', type: 'file', accept: this.accept, hidden: true, ref: i => this.nativeInput = i, onChange: this.onAdd, multiple: this.maxFiles > 1 }), index.h("div", { key: 'bb032ae20ec8cf2c2c1701acfab78fe07edda2c3', class: "additional-infos" }, index.h("div", { key: '2d5d3b9531f8befd068942996569a6bdc5b22213', class: clsx.clsx('file-specs', this.isSortTabShown() && 'file-specs-sort') }, index.h("mds-text", { key: '218901b57785bb033f320669e410c8532c796ddc', variant: "info", typography: "caption" }, this.extensions ? `${this.t.get('canUpload')} ${this.extensions}` : this.t.get('canUploadAll')), index.h("mds-text", { key: '6fd21a036580aa038919d41347d16651c25244f7', variant: "info", typography: "caption" }, this.t.get('maxFileSizePerFile', { maxFileSize: this.maxFileSize }))), this.isSortTabShown() &&
624
+ index.h("mds-tab", { key: 'd03c65e4b97e53301736d323a5e80742aa66cc05', class: "action-sort", onMdsTabChange: event => this.onChangeTab(event.detail) }, index.h("mds-tab-item", { key: '1f4363815dd1f4bd7335dc4f71e0ee1ea6b42c86', icon: iconSortById, selected: this.userSort === 'date', title: this.t.get('sortByDate'), value: 'date' }), index.h("mds-tab-item", { key: '3afbd2bee7cfbcd66b7f41fec1f1a1122fa15aff', icon: iconSortByStatus, selected: this.userSort === 'status', title: this.t.get('sortByStatus'), value: 'status' }))), index.h("div", { key: 'a43595768967936157583fc7dd54764702a78820', class: clsx.clsx('file-list', this.files.length > this.cssMinCols && 'file-list--more-items') }, this.files.map(file => {
624
625
  switch (file.status) {
625
626
  case Status.ERROR:
626
627
  return (index.h("mds-file-preview", { deletable: true, variant: "error", filename: file.file.name, filesize: file.file.size.toString(), onMdsFileDelete: () => this.onCancel(file.key), message: file.errorMessage }));
@@ -123,12 +123,13 @@ export class MdsInputUpload {
123
123
  this.t.lang(this.host);
124
124
  this.actionTitle = this.t.get('clickOrDrag', { maxFiles: this.maxFiles });
125
125
  this.userSort = (_a = localStorage.getItem(LOCALSTORAGE_KEY_USER_SORT)) !== null && _a !== void 0 ? _a : 'date';
126
+ this.updateInitialValue(this.initialValue);
126
127
  }
127
128
  componentDidLoad() {
128
129
  this.updateCSSCustomProps();
129
130
  }
130
- updateInitialValue(newValue, oldValue) {
131
- if ((!oldValue || oldValue.length === 0) && newValue) {
131
+ updateInitialValue(newValue) {
132
+ if (newValue) {
132
133
  this.onAdd(newValue);
133
134
  }
134
135
  }
@@ -305,12 +306,12 @@ export class MdsInputUpload {
305
306
  return !!this.sort && this.files.length > 1;
306
307
  }
307
308
  render() {
308
- return (h(Host, { key: '64fd13514b3166b6944f979193e32b282865590b' }, h("div", { key: '6da244c559b2f3db324a811efeba5eec09427d9b', class: "drag-area", onDrop: this.onDropHandler, onDragOver: this.onDragOverHandler, onDragEnter: this.onDragEnterHandler, onDragLeave: this.onDragLeaveHandler, ref: dragArea => this.elDragArea = dragArea }, h("div", { key: '121ac8c11bcece89876c35caa0d8b7fe0db705ee', class: "main-action" }, h("div", { key: '1d17dbe2cdfe125dee111f621662fb032e4bdd3e', class: "main-action-icon" }, h("i", { key: '0b8e3628bda0a797fdcc45839241e7c2f02753e1', class: "icon", innerHTML: miBaselineAddCircle })), h("mds-text", { key: '367df10b5c8cf6cfb39f50efc64f730d0ffe54fb', animation: this.animateText ? 'yugop' : 'none', variant: "title", typography: "action", text: this.actionTitle })), h("div", { key: '8d33fd4a06db1ec030e68edf3fb0c4cd0121eda2', class: "main-actions" }, h("mds-button", { key: '19a16d19d74056b91489d12fd5fe597dda4d040f', variant: 'primary', onClick: () => { var _a; return (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.click(); } }, " ", this.files ? this.t.get('addFile', { maxFiles: this.maxFiles }) : this.t.get('selectFile')), this.files.length > 0 && h("mds-button", { key: '2dc5c882dd0dd4a50a436bfd48de5cf5245947c2', variant: 'error', onClick: this.onReset }, this.t.get('cancel'))), h("div", { key: '003925161b2dc8db7a9f3bb64cb1f144200f0aee', class: "main-infos" }, h("mds-progress", { key: '4f02401ecbc1f13103f6c3dcfea63d574f851190', "aria-hidden": "true", class: "progress-bar", progress: this.progress }), this.files.length < 1
309
+ return (h(Host, { key: '6140022f85d4a662c1b61a40c38ed30f9fb14a49' }, h("div", { key: '1e89f777a3697def6e343904b19c24d6bc80cde2', class: "drag-area", onDrop: this.onDropHandler, onDragOver: this.onDragOverHandler, onDragEnter: this.onDragEnterHandler, onDragLeave: this.onDragLeaveHandler, ref: dragArea => this.elDragArea = dragArea }, h("div", { key: '18e6c6a5c18f44e0c6804b32b01aef0b2228988c', class: "main-action" }, h("div", { key: 'a3ca7b1ede7acb8902afae3745117a4bb4443a8e', class: "main-action-icon" }, h("i", { key: '5311081174389e679a3c1acdad40deae10440bf2', class: "icon", innerHTML: miBaselineAddCircle })), h("mds-text", { key: '46c8b6e1ac1f2c1147d96c946c2cf486524a8c3d', animation: this.animateText ? 'yugop' : 'none', variant: "title", typography: "action", text: this.actionTitle })), h("div", { key: '0ad8ee3fac7185ccd650056fed8911706043fe12', class: "main-actions" }, h("mds-button", { key: 'b76958fcadff4e698aa31240895aed738f9b7e6f', variant: 'primary', onClick: () => { var _a; return (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.click(); } }, " ", this.files ? this.t.get('addFile', { maxFiles: this.maxFiles }) : this.t.get('selectFile')), this.files.length > 0 && h("mds-button", { key: 'd4c1c6fd33bc786b4129f1d8d32627a6bb13b98d', variant: 'error', onClick: this.onReset }, this.t.get('cancel'))), h("div", { key: 'f14afe5c5a4b56558b2fb2f447c7debf1ba82119', class: "main-infos" }, h("mds-progress", { key: '72843fa6e98aa1f36d555a138723096627c2ed25', "aria-hidden": "true", class: "progress-bar", progress: this.progress }), this.files.length < 1
309
310
  ? h("mds-text", { variant: "info", typography: "caption" }, this.t.get('maxFilesUpload', { maxFiles: this.maxFiles }))
310
311
  : h("mds-text", { variant: "info", typography: "caption" }, this.maxFiles
311
312
  ? this.t.get('currentFilesWithMax', { currentFiles: this.files.length, maxFiles: this.maxFiles })
312
- : this.t.get('currentFilesNoMax', { currentFiles: this.files.length })))), h("input", { key: '361c4d80369e0c42724d749271e855d302b84b79', type: 'file', accept: this.accept, hidden: true, ref: i => this.nativeInput = i, onChange: this.onAdd, multiple: this.maxFiles > 1 }), h("div", { key: '901be8f68888bf2edf57fe362dfb4971561ff38c', class: "additional-infos" }, h("div", { key: 'ebaf9679a643913df6ac7a0425f1da040d982c44', class: clsx('file-specs', this.isSortTabShown() && 'file-specs-sort') }, h("mds-text", { key: 'c0b7b70c2b6da485d28ea27d8a4278784207ba98', variant: "info", typography: "caption" }, this.extensions ? `${this.t.get('canUpload')} ${this.extensions}` : this.t.get('canUploadAll')), h("mds-text", { key: '13f3cb1f431bbb058dd2944a7ffb57e7f3b71635', variant: "info", typography: "caption" }, this.t.get('maxFileSizePerFile', { maxFileSize: this.maxFileSize }))), this.isSortTabShown() &&
313
- h("mds-tab", { key: '8aa2fc09ef9eaf277c7646e8abd424b322b0f9d1', class: "action-sort", onMdsTabChange: event => this.onChangeTab(event.detail) }, h("mds-tab-item", { key: 'f1e4197a97118ce768225347a4ca4d29cb2ea1b1', icon: iconSortById, selected: this.userSort === 'date', title: this.t.get('sortByDate'), value: 'date' }), h("mds-tab-item", { key: 'ee763fadf59a50f22ce15158403478f52f38b877', icon: iconSortByStatus, selected: this.userSort === 'status', title: this.t.get('sortByStatus'), value: 'status' }))), h("div", { key: '2930aa1cf12f053c68c43465664fbbb4abcf09ce', class: clsx('file-list', this.files.length > this.cssMinCols && 'file-list--more-items') }, this.files.map(file => {
313
+ : this.t.get('currentFilesNoMax', { currentFiles: this.files.length })))), h("input", { key: 'baf6f4b9de84b6fea0dd604853fcfce7bb2037fd', type: 'file', accept: this.accept, hidden: true, ref: i => this.nativeInput = i, onChange: this.onAdd, multiple: this.maxFiles > 1 }), h("div", { key: 'bb032ae20ec8cf2c2c1701acfab78fe07edda2c3', class: "additional-infos" }, h("div", { key: '2d5d3b9531f8befd068942996569a6bdc5b22213', class: clsx('file-specs', this.isSortTabShown() && 'file-specs-sort') }, h("mds-text", { key: '218901b57785bb033f320669e410c8532c796ddc', variant: "info", typography: "caption" }, this.extensions ? `${this.t.get('canUpload')} ${this.extensions}` : this.t.get('canUploadAll')), h("mds-text", { key: '6fd21a036580aa038919d41347d16651c25244f7', variant: "info", typography: "caption" }, this.t.get('maxFileSizePerFile', { maxFileSize: this.maxFileSize }))), this.isSortTabShown() &&
314
+ h("mds-tab", { key: 'd03c65e4b97e53301736d323a5e80742aa66cc05', class: "action-sort", onMdsTabChange: event => this.onChangeTab(event.detail) }, h("mds-tab-item", { key: '1f4363815dd1f4bd7335dc4f71e0ee1ea6b42c86', icon: iconSortById, selected: this.userSort === 'date', title: this.t.get('sortByDate'), value: 'date' }), h("mds-tab-item", { key: '3afbd2bee7cfbcd66b7f41fec1f1a1122fa15aff', icon: iconSortByStatus, selected: this.userSort === 'status', title: this.t.get('sortByStatus'), value: 'status' }))), h("div", { key: 'a43595768967936157583fc7dd54764702a78820', class: clsx('file-list', this.files.length > this.cssMinCols && 'file-list--more-items') }, this.files.map(file => {
314
315
  switch (file.status) {
315
316
  case Status.ERROR:
316
317
  return (h("mds-file-preview", { deletable: true, variant: "error", filename: file.file.name, filesize: file.file.size.toString(), onMdsFileDelete: () => this.onCancel(file.key), message: file.errorMessage }));
@@ -435,12 +435,13 @@ const MdsInputUpload$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputUpload e
435
435
  this.t.lang(this.host);
436
436
  this.actionTitle = this.t.get('clickOrDrag', { maxFiles: this.maxFiles });
437
437
  this.userSort = (_a = localStorage.getItem(LOCALSTORAGE_KEY_USER_SORT)) !== null && _a !== void 0 ? _a : 'date';
438
+ this.updateInitialValue(this.initialValue);
438
439
  }
439
440
  componentDidLoad() {
440
441
  this.updateCSSCustomProps();
441
442
  }
442
- updateInitialValue(newValue, oldValue) {
443
- if ((!oldValue || oldValue.length === 0) && newValue) {
443
+ updateInitialValue(newValue) {
444
+ if (newValue) {
444
445
  this.onAdd(newValue);
445
446
  }
446
447
  }
@@ -617,12 +618,12 @@ const MdsInputUpload$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputUpload e
617
618
  return !!this.sort && this.files.length > 1;
618
619
  }
619
620
  render() {
620
- return (h(Host, { key: '64fd13514b3166b6944f979193e32b282865590b' }, h("div", { key: '6da244c559b2f3db324a811efeba5eec09427d9b', class: "drag-area", onDrop: this.onDropHandler, onDragOver: this.onDragOverHandler, onDragEnter: this.onDragEnterHandler, onDragLeave: this.onDragLeaveHandler, ref: dragArea => this.elDragArea = dragArea }, h("div", { key: '121ac8c11bcece89876c35caa0d8b7fe0db705ee', class: "main-action" }, h("div", { key: '1d17dbe2cdfe125dee111f621662fb032e4bdd3e', class: "main-action-icon" }, h("i", { key: '0b8e3628bda0a797fdcc45839241e7c2f02753e1', class: "icon", innerHTML: miBaselineAddCircle })), h("mds-text", { key: '367df10b5c8cf6cfb39f50efc64f730d0ffe54fb', animation: this.animateText ? 'yugop' : 'none', variant: "title", typography: "action", text: this.actionTitle })), h("div", { key: '8d33fd4a06db1ec030e68edf3fb0c4cd0121eda2', class: "main-actions" }, h("mds-button", { key: '19a16d19d74056b91489d12fd5fe597dda4d040f', variant: 'primary', onClick: () => { var _a; return (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.click(); } }, " ", this.files ? this.t.get('addFile', { maxFiles: this.maxFiles }) : this.t.get('selectFile')), this.files.length > 0 && h("mds-button", { key: '2dc5c882dd0dd4a50a436bfd48de5cf5245947c2', variant: 'error', onClick: this.onReset }, this.t.get('cancel'))), h("div", { key: '003925161b2dc8db7a9f3bb64cb1f144200f0aee', class: "main-infos" }, h("mds-progress", { key: '4f02401ecbc1f13103f6c3dcfea63d574f851190', "aria-hidden": "true", class: "progress-bar", progress: this.progress }), this.files.length < 1
621
+ return (h(Host, { key: '6140022f85d4a662c1b61a40c38ed30f9fb14a49' }, h("div", { key: '1e89f777a3697def6e343904b19c24d6bc80cde2', class: "drag-area", onDrop: this.onDropHandler, onDragOver: this.onDragOverHandler, onDragEnter: this.onDragEnterHandler, onDragLeave: this.onDragLeaveHandler, ref: dragArea => this.elDragArea = dragArea }, h("div", { key: '18e6c6a5c18f44e0c6804b32b01aef0b2228988c', class: "main-action" }, h("div", { key: 'a3ca7b1ede7acb8902afae3745117a4bb4443a8e', class: "main-action-icon" }, h("i", { key: '5311081174389e679a3c1acdad40deae10440bf2', class: "icon", innerHTML: miBaselineAddCircle })), h("mds-text", { key: '46c8b6e1ac1f2c1147d96c946c2cf486524a8c3d', animation: this.animateText ? 'yugop' : 'none', variant: "title", typography: "action", text: this.actionTitle })), h("div", { key: '0ad8ee3fac7185ccd650056fed8911706043fe12', class: "main-actions" }, h("mds-button", { key: 'b76958fcadff4e698aa31240895aed738f9b7e6f', variant: 'primary', onClick: () => { var _a; return (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.click(); } }, " ", this.files ? this.t.get('addFile', { maxFiles: this.maxFiles }) : this.t.get('selectFile')), this.files.length > 0 && h("mds-button", { key: 'd4c1c6fd33bc786b4129f1d8d32627a6bb13b98d', variant: 'error', onClick: this.onReset }, this.t.get('cancel'))), h("div", { key: 'f14afe5c5a4b56558b2fb2f447c7debf1ba82119', class: "main-infos" }, h("mds-progress", { key: '72843fa6e98aa1f36d555a138723096627c2ed25', "aria-hidden": "true", class: "progress-bar", progress: this.progress }), this.files.length < 1
621
622
  ? h("mds-text", { variant: "info", typography: "caption" }, this.t.get('maxFilesUpload', { maxFiles: this.maxFiles }))
622
623
  : h("mds-text", { variant: "info", typography: "caption" }, this.maxFiles
623
624
  ? this.t.get('currentFilesWithMax', { currentFiles: this.files.length, maxFiles: this.maxFiles })
624
- : this.t.get('currentFilesNoMax', { currentFiles: this.files.length })))), h("input", { key: '361c4d80369e0c42724d749271e855d302b84b79', type: 'file', accept: this.accept, hidden: true, ref: i => this.nativeInput = i, onChange: this.onAdd, multiple: this.maxFiles > 1 }), h("div", { key: '901be8f68888bf2edf57fe362dfb4971561ff38c', class: "additional-infos" }, h("div", { key: 'ebaf9679a643913df6ac7a0425f1da040d982c44', class: clsx('file-specs', this.isSortTabShown() && 'file-specs-sort') }, h("mds-text", { key: 'c0b7b70c2b6da485d28ea27d8a4278784207ba98', variant: "info", typography: "caption" }, this.extensions ? `${this.t.get('canUpload')} ${this.extensions}` : this.t.get('canUploadAll')), h("mds-text", { key: '13f3cb1f431bbb058dd2944a7ffb57e7f3b71635', variant: "info", typography: "caption" }, this.t.get('maxFileSizePerFile', { maxFileSize: this.maxFileSize }))), this.isSortTabShown() &&
625
- h("mds-tab", { key: '8aa2fc09ef9eaf277c7646e8abd424b322b0f9d1', class: "action-sort", onMdsTabChange: event => this.onChangeTab(event.detail) }, h("mds-tab-item", { key: 'f1e4197a97118ce768225347a4ca4d29cb2ea1b1', icon: iconSortById, selected: this.userSort === 'date', title: this.t.get('sortByDate'), value: 'date' }), h("mds-tab-item", { key: 'ee763fadf59a50f22ce15158403478f52f38b877', icon: iconSortByStatus, selected: this.userSort === 'status', title: this.t.get('sortByStatus'), value: 'status' }))), h("div", { key: '2930aa1cf12f053c68c43465664fbbb4abcf09ce', class: clsx('file-list', this.files.length > this.cssMinCols && 'file-list--more-items') }, this.files.map(file => {
625
+ : this.t.get('currentFilesNoMax', { currentFiles: this.files.length })))), h("input", { key: 'baf6f4b9de84b6fea0dd604853fcfce7bb2037fd', type: 'file', accept: this.accept, hidden: true, ref: i => this.nativeInput = i, onChange: this.onAdd, multiple: this.maxFiles > 1 }), h("div", { key: 'bb032ae20ec8cf2c2c1701acfab78fe07edda2c3', class: "additional-infos" }, h("div", { key: '2d5d3b9531f8befd068942996569a6bdc5b22213', class: clsx('file-specs', this.isSortTabShown() && 'file-specs-sort') }, h("mds-text", { key: '218901b57785bb033f320669e410c8532c796ddc', variant: "info", typography: "caption" }, this.extensions ? `${this.t.get('canUpload')} ${this.extensions}` : this.t.get('canUploadAll')), h("mds-text", { key: '6fd21a036580aa038919d41347d16651c25244f7', variant: "info", typography: "caption" }, this.t.get('maxFileSizePerFile', { maxFileSize: this.maxFileSize }))), this.isSortTabShown() &&
626
+ h("mds-tab", { key: 'd03c65e4b97e53301736d323a5e80742aa66cc05', class: "action-sort", onMdsTabChange: event => this.onChangeTab(event.detail) }, h("mds-tab-item", { key: '1f4363815dd1f4bd7335dc4f71e0ee1ea6b42c86', icon: iconSortById, selected: this.userSort === 'date', title: this.t.get('sortByDate'), value: 'date' }), h("mds-tab-item", { key: '3afbd2bee7cfbcd66b7f41fec1f1a1122fa15aff', icon: iconSortByStatus, selected: this.userSort === 'status', title: this.t.get('sortByStatus'), value: 'status' }))), h("div", { key: 'a43595768967936157583fc7dd54764702a78820', class: clsx('file-list', this.files.length > this.cssMinCols && 'file-list--more-items') }, this.files.map(file => {
626
627
  switch (file.status) {
627
628
  case Status.ERROR:
628
629
  return (h("mds-file-preview", { deletable: true, variant: "error", filename: file.file.name, filesize: file.file.size.toString(), onMdsFileDelete: () => this.onCancel(file.key), message: file.errorMessage }));
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-04-14T12:08:26",
2
+ "timestamp": "2026-04-20T11:16:50",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.27.2",
@@ -429,12 +429,13 @@ const MdsInputUpload = class {
429
429
  this.t.lang(this.host);
430
430
  this.actionTitle = this.t.get('clickOrDrag', { maxFiles: this.maxFiles });
431
431
  this.userSort = (_a = localStorage.getItem(LOCALSTORAGE_KEY_USER_SORT)) !== null && _a !== void 0 ? _a : 'date';
432
+ this.updateInitialValue(this.initialValue);
432
433
  }
433
434
  componentDidLoad() {
434
435
  this.updateCSSCustomProps();
435
436
  }
436
- updateInitialValue(newValue, oldValue) {
437
- if ((!oldValue || oldValue.length === 0) && newValue) {
437
+ updateInitialValue(newValue) {
438
+ if (newValue) {
438
439
  this.onAdd(newValue);
439
440
  }
440
441
  }
@@ -611,12 +612,12 @@ const MdsInputUpload = class {
611
612
  return !!this.sort && this.files.length > 1;
612
613
  }
613
614
  render() {
614
- return (h(Host, { key: '64fd13514b3166b6944f979193e32b282865590b' }, h("div", { key: '6da244c559b2f3db324a811efeba5eec09427d9b', class: "drag-area", onDrop: this.onDropHandler, onDragOver: this.onDragOverHandler, onDragEnter: this.onDragEnterHandler, onDragLeave: this.onDragLeaveHandler, ref: dragArea => this.elDragArea = dragArea }, h("div", { key: '121ac8c11bcece89876c35caa0d8b7fe0db705ee', class: "main-action" }, h("div", { key: '1d17dbe2cdfe125dee111f621662fb032e4bdd3e', class: "main-action-icon" }, h("i", { key: '0b8e3628bda0a797fdcc45839241e7c2f02753e1', class: "icon", innerHTML: miBaselineAddCircle })), h("mds-text", { key: '367df10b5c8cf6cfb39f50efc64f730d0ffe54fb', animation: this.animateText ? 'yugop' : 'none', variant: "title", typography: "action", text: this.actionTitle })), h("div", { key: '8d33fd4a06db1ec030e68edf3fb0c4cd0121eda2', class: "main-actions" }, h("mds-button", { key: '19a16d19d74056b91489d12fd5fe597dda4d040f', variant: 'primary', onClick: () => { var _a; return (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.click(); } }, " ", this.files ? this.t.get('addFile', { maxFiles: this.maxFiles }) : this.t.get('selectFile')), this.files.length > 0 && h("mds-button", { key: '2dc5c882dd0dd4a50a436bfd48de5cf5245947c2', variant: 'error', onClick: this.onReset }, this.t.get('cancel'))), h("div", { key: '003925161b2dc8db7a9f3bb64cb1f144200f0aee', class: "main-infos" }, h("mds-progress", { key: '4f02401ecbc1f13103f6c3dcfea63d574f851190', "aria-hidden": "true", class: "progress-bar", progress: this.progress }), this.files.length < 1
615
+ return (h(Host, { key: '6140022f85d4a662c1b61a40c38ed30f9fb14a49' }, h("div", { key: '1e89f777a3697def6e343904b19c24d6bc80cde2', class: "drag-area", onDrop: this.onDropHandler, onDragOver: this.onDragOverHandler, onDragEnter: this.onDragEnterHandler, onDragLeave: this.onDragLeaveHandler, ref: dragArea => this.elDragArea = dragArea }, h("div", { key: '18e6c6a5c18f44e0c6804b32b01aef0b2228988c', class: "main-action" }, h("div", { key: 'a3ca7b1ede7acb8902afae3745117a4bb4443a8e', class: "main-action-icon" }, h("i", { key: '5311081174389e679a3c1acdad40deae10440bf2', class: "icon", innerHTML: miBaselineAddCircle })), h("mds-text", { key: '46c8b6e1ac1f2c1147d96c946c2cf486524a8c3d', animation: this.animateText ? 'yugop' : 'none', variant: "title", typography: "action", text: this.actionTitle })), h("div", { key: '0ad8ee3fac7185ccd650056fed8911706043fe12', class: "main-actions" }, h("mds-button", { key: 'b76958fcadff4e698aa31240895aed738f9b7e6f', variant: 'primary', onClick: () => { var _a; return (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.click(); } }, " ", this.files ? this.t.get('addFile', { maxFiles: this.maxFiles }) : this.t.get('selectFile')), this.files.length > 0 && h("mds-button", { key: 'd4c1c6fd33bc786b4129f1d8d32627a6bb13b98d', variant: 'error', onClick: this.onReset }, this.t.get('cancel'))), h("div", { key: 'f14afe5c5a4b56558b2fb2f447c7debf1ba82119', class: "main-infos" }, h("mds-progress", { key: '72843fa6e98aa1f36d555a138723096627c2ed25', "aria-hidden": "true", class: "progress-bar", progress: this.progress }), this.files.length < 1
615
616
  ? h("mds-text", { variant: "info", typography: "caption" }, this.t.get('maxFilesUpload', { maxFiles: this.maxFiles }))
616
617
  : h("mds-text", { variant: "info", typography: "caption" }, this.maxFiles
617
618
  ? this.t.get('currentFilesWithMax', { currentFiles: this.files.length, maxFiles: this.maxFiles })
618
- : this.t.get('currentFilesNoMax', { currentFiles: this.files.length })))), h("input", { key: '361c4d80369e0c42724d749271e855d302b84b79', type: 'file', accept: this.accept, hidden: true, ref: i => this.nativeInput = i, onChange: this.onAdd, multiple: this.maxFiles > 1 }), h("div", { key: '901be8f68888bf2edf57fe362dfb4971561ff38c', class: "additional-infos" }, h("div", { key: 'ebaf9679a643913df6ac7a0425f1da040d982c44', class: clsx('file-specs', this.isSortTabShown() && 'file-specs-sort') }, h("mds-text", { key: 'c0b7b70c2b6da485d28ea27d8a4278784207ba98', variant: "info", typography: "caption" }, this.extensions ? `${this.t.get('canUpload')} ${this.extensions}` : this.t.get('canUploadAll')), h("mds-text", { key: '13f3cb1f431bbb058dd2944a7ffb57e7f3b71635', variant: "info", typography: "caption" }, this.t.get('maxFileSizePerFile', { maxFileSize: this.maxFileSize }))), this.isSortTabShown() &&
619
- h("mds-tab", { key: '8aa2fc09ef9eaf277c7646e8abd424b322b0f9d1', class: "action-sort", onMdsTabChange: event => this.onChangeTab(event.detail) }, h("mds-tab-item", { key: 'f1e4197a97118ce768225347a4ca4d29cb2ea1b1', icon: iconSortById, selected: this.userSort === 'date', title: this.t.get('sortByDate'), value: 'date' }), h("mds-tab-item", { key: 'ee763fadf59a50f22ce15158403478f52f38b877', icon: iconSortByStatus, selected: this.userSort === 'status', title: this.t.get('sortByStatus'), value: 'status' }))), h("div", { key: '2930aa1cf12f053c68c43465664fbbb4abcf09ce', class: clsx('file-list', this.files.length > this.cssMinCols && 'file-list--more-items') }, this.files.map(file => {
619
+ : this.t.get('currentFilesNoMax', { currentFiles: this.files.length })))), h("input", { key: 'baf6f4b9de84b6fea0dd604853fcfce7bb2037fd', type: 'file', accept: this.accept, hidden: true, ref: i => this.nativeInput = i, onChange: this.onAdd, multiple: this.maxFiles > 1 }), h("div", { key: 'bb032ae20ec8cf2c2c1701acfab78fe07edda2c3', class: "additional-infos" }, h("div", { key: '2d5d3b9531f8befd068942996569a6bdc5b22213', class: clsx('file-specs', this.isSortTabShown() && 'file-specs-sort') }, h("mds-text", { key: '218901b57785bb033f320669e410c8532c796ddc', variant: "info", typography: "caption" }, this.extensions ? `${this.t.get('canUpload')} ${this.extensions}` : this.t.get('canUploadAll')), h("mds-text", { key: '6fd21a036580aa038919d41347d16651c25244f7', variant: "info", typography: "caption" }, this.t.get('maxFileSizePerFile', { maxFileSize: this.maxFileSize }))), this.isSortTabShown() &&
620
+ h("mds-tab", { key: 'd03c65e4b97e53301736d323a5e80742aa66cc05', class: "action-sort", onMdsTabChange: event => this.onChangeTab(event.detail) }, h("mds-tab-item", { key: '1f4363815dd1f4bd7335dc4f71e0ee1ea6b42c86', icon: iconSortById, selected: this.userSort === 'date', title: this.t.get('sortByDate'), value: 'date' }), h("mds-tab-item", { key: '3afbd2bee7cfbcd66b7f41fec1f1a1122fa15aff', icon: iconSortByStatus, selected: this.userSort === 'status', title: this.t.get('sortByStatus'), value: 'status' }))), h("div", { key: 'a43595768967936157583fc7dd54764702a78820', class: clsx('file-list', this.files.length > this.cssMinCols && 'file-list--more-items') }, this.files.map(file => {
620
621
  switch (file.status) {
621
622
  case Status.ERROR:
622
623
  return (h("mds-file-preview", { deletable: true, variant: "error", filename: file.file.name, filesize: file.file.size.toString(), onMdsFileDelete: () => this.onCancel(file.key), message: file.errorMessage }));