imm-element-ui 2.6.9 → 2.7.0
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.
|
@@ -7076,6 +7076,12 @@ class UploadRenderer {
|
|
|
7076
7076
|
this.fileList = this.toFileList(params.value);
|
|
7077
7077
|
return true;
|
|
7078
7078
|
}
|
|
7079
|
+
choose(callback) {
|
|
7080
|
+
if (this.isDisabled() || this.loading) {
|
|
7081
|
+
return;
|
|
7082
|
+
}
|
|
7083
|
+
callback();
|
|
7084
|
+
}
|
|
7079
7085
|
uploadHandler(event, fu) {
|
|
7080
7086
|
const files = Array.from(event.files || []);
|
|
7081
7087
|
if (!files.length || this.isDisabled()) {
|
|
@@ -7174,32 +7180,33 @@ class UploadRenderer {
|
|
|
7174
7180
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UploadRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7175
7181
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: UploadRenderer, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
|
|
7176
7182
|
<div class="upload-renderer">
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7183
|
+
@if (!isDisabled()) {
|
|
7184
|
+
<p-fileUpload
|
|
7185
|
+
#fu
|
|
7186
|
+
auto
|
|
7187
|
+
mode="advanced"
|
|
7188
|
+
[name]="uploadParams.name || 'file'"
|
|
7189
|
+
[multiple]="uploadParams.multiple ?? true"
|
|
7190
|
+
[accept]="uploadParams.accept"
|
|
7191
|
+
[maxFileSize]="uploadParams.maxFileSize"
|
|
7192
|
+
[fileLimit]="uploadParams.fileLimit"
|
|
7193
|
+
[withCredentials]="uploadParams.withCredentials ?? false"
|
|
7194
|
+
[customUpload]="true"
|
|
7195
|
+
[disabled]="loading"
|
|
7196
|
+
[styleClass]="'upload-renderer-choose'"
|
|
7197
|
+
(uploadHandler)="uploadHandler($event, fu)">
|
|
7198
|
+
<ng-template
|
|
7199
|
+
#header
|
|
7200
|
+
let-chooseCallback="chooseCallback">
|
|
7201
|
+
<p-button
|
|
7202
|
+
icon="pi pi-cloud-upload"
|
|
7203
|
+
[text]="true"
|
|
7204
|
+
size="small"
|
|
7205
|
+
[disabled]="loading"
|
|
7206
|
+
(onClick)="choose(chooseCallback)" />
|
|
7207
|
+
</ng-template>
|
|
7208
|
+
</p-fileUpload>
|
|
7209
|
+
}
|
|
7203
7210
|
|
|
7204
7211
|
<div class="upload-renderer-files">
|
|
7205
7212
|
@for (file of fileList; track index; let index = $index) {
|
|
@@ -7212,13 +7219,15 @@ class UploadRenderer {
|
|
|
7212
7219
|
(click)="$event.stopPropagation()"
|
|
7213
7220
|
>{{ file }}</a
|
|
7214
7221
|
>
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
+
@if (!isDisabled()) {
|
|
7223
|
+
<p-button
|
|
7224
|
+
icon="pi pi-times"
|
|
7225
|
+
severity="danger"
|
|
7226
|
+
size="small"
|
|
7227
|
+
[text]="true"
|
|
7228
|
+
[disabled]="loading"
|
|
7229
|
+
(onClick)="deleteHandler(file, index)" />
|
|
7230
|
+
}
|
|
7222
7231
|
</div>
|
|
7223
7232
|
}
|
|
7224
7233
|
</div>
|
|
@@ -7229,32 +7238,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
7229
7238
|
type: Component,
|
|
7230
7239
|
args: [{ standalone: true, imports: [ButtonModule, FileUpload], template: `
|
|
7231
7240
|
<div class="upload-renderer">
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7241
|
+
@if (!isDisabled()) {
|
|
7242
|
+
<p-fileUpload
|
|
7243
|
+
#fu
|
|
7244
|
+
auto
|
|
7245
|
+
mode="advanced"
|
|
7246
|
+
[name]="uploadParams.name || 'file'"
|
|
7247
|
+
[multiple]="uploadParams.multiple ?? true"
|
|
7248
|
+
[accept]="uploadParams.accept"
|
|
7249
|
+
[maxFileSize]="uploadParams.maxFileSize"
|
|
7250
|
+
[fileLimit]="uploadParams.fileLimit"
|
|
7251
|
+
[withCredentials]="uploadParams.withCredentials ?? false"
|
|
7252
|
+
[customUpload]="true"
|
|
7253
|
+
[disabled]="loading"
|
|
7254
|
+
[styleClass]="'upload-renderer-choose'"
|
|
7255
|
+
(uploadHandler)="uploadHandler($event, fu)">
|
|
7256
|
+
<ng-template
|
|
7257
|
+
#header
|
|
7258
|
+
let-chooseCallback="chooseCallback">
|
|
7259
|
+
<p-button
|
|
7260
|
+
icon="pi pi-cloud-upload"
|
|
7261
|
+
[text]="true"
|
|
7262
|
+
size="small"
|
|
7263
|
+
[disabled]="loading"
|
|
7264
|
+
(onClick)="choose(chooseCallback)" />
|
|
7265
|
+
</ng-template>
|
|
7266
|
+
</p-fileUpload>
|
|
7267
|
+
}
|
|
7258
7268
|
|
|
7259
7269
|
<div class="upload-renderer-files">
|
|
7260
7270
|
@for (file of fileList; track index; let index = $index) {
|
|
@@ -7267,13 +7277,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
7267
7277
|
(click)="$event.stopPropagation()"
|
|
7268
7278
|
>{{ file }}</a
|
|
7269
7279
|
>
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7280
|
+
@if (!isDisabled()) {
|
|
7281
|
+
<p-button
|
|
7282
|
+
icon="pi pi-times"
|
|
7283
|
+
severity="danger"
|
|
7284
|
+
size="small"
|
|
7285
|
+
[text]="true"
|
|
7286
|
+
[disabled]="loading"
|
|
7287
|
+
(onClick)="deleteHandler(file, index)" />
|
|
7288
|
+
}
|
|
7277
7289
|
</div>
|
|
7278
7290
|
}
|
|
7279
7291
|
</div>
|
|
@@ -7444,12 +7456,12 @@ class GridComponent {
|
|
|
7444
7456
|
this.editingFix();
|
|
7445
7457
|
}
|
|
7446
7458
|
withGridContext(options) {
|
|
7447
|
-
|
|
7459
|
+
this.gridDisable();
|
|
7448
7460
|
return {
|
|
7449
7461
|
...options,
|
|
7450
7462
|
context: {
|
|
7451
7463
|
...(options.context || {}),
|
|
7452
|
-
gridDisabled: () =>
|
|
7464
|
+
gridDisabled: () => this.gridDisable(),
|
|
7453
7465
|
grid: () => this,
|
|
7454
7466
|
},
|
|
7455
7467
|
};
|