@solcre-org/core-ui 2.12.10 → 2.12.12
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.
- package/fesm2022/solcre-org-core-ui.mjs +362 -13
- package/fesm2022/solcre-org-core-ui.mjs.map +1 -1
- package/index.d.ts +69 -11
- package/package.json +1 -1
|
@@ -5229,6 +5229,317 @@ const isSameDate = (date1, date2) => {
|
|
|
5229
5229
|
date1.getDate() === date2.getDate());
|
|
5230
5230
|
};
|
|
5231
5231
|
|
|
5232
|
+
class DynamicFieldsHelper {
|
|
5233
|
+
formBuilder = new FormBuilder();
|
|
5234
|
+
config;
|
|
5235
|
+
mode;
|
|
5236
|
+
_editedData = signal(null);
|
|
5237
|
+
_fieldErrors = signal({});
|
|
5238
|
+
_originalData = signal(null);
|
|
5239
|
+
_form = signal(this.formBuilder.group({}));
|
|
5240
|
+
state;
|
|
5241
|
+
constructor(config, mode = ModalMode.CREATE) {
|
|
5242
|
+
this.config = config;
|
|
5243
|
+
this.mode = mode;
|
|
5244
|
+
this.state = {
|
|
5245
|
+
editedData: this._editedData.asReadonly(),
|
|
5246
|
+
fieldErrors: this._fieldErrors.asReadonly(),
|
|
5247
|
+
hasUnsavedChanges: computed(() => this.detectChanges()),
|
|
5248
|
+
isValid: computed(() => this.isFormValid())
|
|
5249
|
+
};
|
|
5250
|
+
this.initializeData();
|
|
5251
|
+
}
|
|
5252
|
+
initializeData() {
|
|
5253
|
+
const initialData = this.config.initialData;
|
|
5254
|
+
let newInstance;
|
|
5255
|
+
if (initialData && Object.keys(initialData).length > 0) {
|
|
5256
|
+
if (this.config.modelFactory) {
|
|
5257
|
+
newInstance = this.config.modelFactory(initialData);
|
|
5258
|
+
}
|
|
5259
|
+
else {
|
|
5260
|
+
newInstance = Object.create(Object.getPrototypeOf(initialData));
|
|
5261
|
+
Object.assign(newInstance, initialData);
|
|
5262
|
+
}
|
|
5263
|
+
}
|
|
5264
|
+
else if (this.mode === ModalMode.CREATE) {
|
|
5265
|
+
if (this.config.modelFactory) {
|
|
5266
|
+
newInstance = this.config.modelFactory({});
|
|
5267
|
+
}
|
|
5268
|
+
else {
|
|
5269
|
+
newInstance = {
|
|
5270
|
+
getId: () => 0,
|
|
5271
|
+
};
|
|
5272
|
+
}
|
|
5273
|
+
}
|
|
5274
|
+
else {
|
|
5275
|
+
this._editedData.set(null);
|
|
5276
|
+
return;
|
|
5277
|
+
}
|
|
5278
|
+
const formGroup = {};
|
|
5279
|
+
this.config.fields.forEach(field => {
|
|
5280
|
+
const fieldKey = field.key;
|
|
5281
|
+
const payloadKey = (field.keyToPayload ?? field.key);
|
|
5282
|
+
const modeConfig = field.modes?.[this.mode];
|
|
5283
|
+
const defaultValue = modeConfig?.defaultValue ?? field.defaultValue;
|
|
5284
|
+
if (this.mode === ModalMode.CREATE) {
|
|
5285
|
+
if (defaultValue !== undefined && newInstance[fieldKey] === undefined) {
|
|
5286
|
+
if (typeof defaultValue === 'function') {
|
|
5287
|
+
const computedValue = defaultValue(newInstance);
|
|
5288
|
+
newInstance[payloadKey] = computedValue;
|
|
5289
|
+
}
|
|
5290
|
+
else {
|
|
5291
|
+
newInstance[payloadKey] = defaultValue;
|
|
5292
|
+
}
|
|
5293
|
+
}
|
|
5294
|
+
}
|
|
5295
|
+
else if (this.mode === ModalMode.EDIT) {
|
|
5296
|
+
if (typeof defaultValue === 'function') {
|
|
5297
|
+
const computedValue = defaultValue(newInstance);
|
|
5298
|
+
newInstance[payloadKey] = computedValue;
|
|
5299
|
+
}
|
|
5300
|
+
}
|
|
5301
|
+
const validators = modeConfig?.validators ?? field.validators ?? [];
|
|
5302
|
+
formGroup[fieldKey] = [newInstance[fieldKey], validators];
|
|
5303
|
+
});
|
|
5304
|
+
this._form.set(this.formBuilder.group(formGroup));
|
|
5305
|
+
this.config.fields.forEach(field => {
|
|
5306
|
+
const fieldKey = field.key;
|
|
5307
|
+
const payloadKey = (field.keyToPayload ?? field.key);
|
|
5308
|
+
if ('dynamicValue' in field && typeof field.dynamicValue === 'function') {
|
|
5309
|
+
const dynamicVal = field.dynamicValue(newInstance);
|
|
5310
|
+
if (dynamicVal !== undefined) {
|
|
5311
|
+
newInstance[payloadKey] = dynamicVal;
|
|
5312
|
+
const control = this._form().get(fieldKey);
|
|
5313
|
+
if (control) {
|
|
5314
|
+
control.setValue(dynamicVal, { emitEvent: false });
|
|
5315
|
+
}
|
|
5316
|
+
}
|
|
5317
|
+
}
|
|
5318
|
+
});
|
|
5319
|
+
this._editedData.set(newInstance);
|
|
5320
|
+
if (this.mode !== ModalMode.VIEW) {
|
|
5321
|
+
const originalCopy = this.config.modelFactory
|
|
5322
|
+
? this.config.modelFactory(newInstance)
|
|
5323
|
+
: Object.create(Object.getPrototypeOf(newInstance));
|
|
5324
|
+
Object.assign(originalCopy, newInstance);
|
|
5325
|
+
this._originalData.set(originalCopy);
|
|
5326
|
+
}
|
|
5327
|
+
setTimeout(() => {
|
|
5328
|
+
Object.values(this._form().controls).forEach(control => {
|
|
5329
|
+
control.markAsUntouched();
|
|
5330
|
+
});
|
|
5331
|
+
this._fieldErrors.set({});
|
|
5332
|
+
}, 0);
|
|
5333
|
+
if (this.config.onDataChange) {
|
|
5334
|
+
setTimeout(() => {
|
|
5335
|
+
this.config.onDataChange(newInstance);
|
|
5336
|
+
}, 1);
|
|
5337
|
+
}
|
|
5338
|
+
}
|
|
5339
|
+
getFieldValue(fieldKey) {
|
|
5340
|
+
const data = this._editedData();
|
|
5341
|
+
return data ? data[fieldKey] : null;
|
|
5342
|
+
}
|
|
5343
|
+
onFieldValueChange(fieldKey, value) {
|
|
5344
|
+
this.updateField(fieldKey, value);
|
|
5345
|
+
const control = this._form().get(fieldKey);
|
|
5346
|
+
if (control) {
|
|
5347
|
+
control.markAsTouched();
|
|
5348
|
+
this.validateField(fieldKey);
|
|
5349
|
+
if (this.config.onDataChange && this._editedData()) {
|
|
5350
|
+
this.config.onDataChange(this._editedData());
|
|
5351
|
+
}
|
|
5352
|
+
}
|
|
5353
|
+
}
|
|
5354
|
+
onFieldBlur(fieldKey) {
|
|
5355
|
+
const control = this._form().get(fieldKey);
|
|
5356
|
+
if (control) {
|
|
5357
|
+
control.markAsTouched();
|
|
5358
|
+
this.validateField(fieldKey);
|
|
5359
|
+
}
|
|
5360
|
+
}
|
|
5361
|
+
getFieldErrors(fieldKey) {
|
|
5362
|
+
return this._fieldErrors()[fieldKey] || [];
|
|
5363
|
+
}
|
|
5364
|
+
validateField(fieldKey) {
|
|
5365
|
+
const field = this.config.fields.find(f => f.key === fieldKey);
|
|
5366
|
+
const control = this._form().get(fieldKey);
|
|
5367
|
+
const errors = [];
|
|
5368
|
+
if (!field || !control)
|
|
5369
|
+
return;
|
|
5370
|
+
if (control.touched && control.errors) {
|
|
5371
|
+
const modeConfig = field.modes?.[this.mode];
|
|
5372
|
+
const errorMessages = modeConfig?.errorMessages ?? field.errorMessages ?? {};
|
|
5373
|
+
Object.keys(control.errors).forEach(errorKey => {
|
|
5374
|
+
const message = errorMessages[errorKey] || errorKey;
|
|
5375
|
+
errors.push(message);
|
|
5376
|
+
});
|
|
5377
|
+
}
|
|
5378
|
+
if (control.touched && this.config.customValidators && this._editedData()) {
|
|
5379
|
+
const customErrors = this.config.customValidators
|
|
5380
|
+
.flatMap(validator => validator(this._editedData()));
|
|
5381
|
+
errors.push(...customErrors);
|
|
5382
|
+
}
|
|
5383
|
+
this._fieldErrors.update(current => {
|
|
5384
|
+
const updated = { ...current };
|
|
5385
|
+
if (errors.length > 0) {
|
|
5386
|
+
updated[fieldKey] = errors;
|
|
5387
|
+
}
|
|
5388
|
+
else {
|
|
5389
|
+
delete updated[fieldKey];
|
|
5390
|
+
}
|
|
5391
|
+
return updated;
|
|
5392
|
+
});
|
|
5393
|
+
if (this.config.onValidationChange) {
|
|
5394
|
+
this.config.onValidationChange(this._fieldErrors());
|
|
5395
|
+
}
|
|
5396
|
+
}
|
|
5397
|
+
validateAllFields() {
|
|
5398
|
+
const allErrors = {};
|
|
5399
|
+
let isValid = true;
|
|
5400
|
+
this.config.fields.forEach(field => {
|
|
5401
|
+
const modeConfig = field.modes?.[this.mode];
|
|
5402
|
+
if (modeConfig?.visible === false)
|
|
5403
|
+
return;
|
|
5404
|
+
const control = this._form().get(field.key);
|
|
5405
|
+
if (control) {
|
|
5406
|
+
control.markAsTouched();
|
|
5407
|
+
if (control.errors) {
|
|
5408
|
+
isValid = false;
|
|
5409
|
+
const errorMessages = modeConfig?.errorMessages ?? field.errorMessages ?? {};
|
|
5410
|
+
const fieldErrors = Object.keys(control.errors).map(errorKey => errorMessages[errorKey] || errorKey);
|
|
5411
|
+
allErrors[field.key] = fieldErrors;
|
|
5412
|
+
}
|
|
5413
|
+
}
|
|
5414
|
+
});
|
|
5415
|
+
if (this.config.customValidators && this._editedData()) {
|
|
5416
|
+
const customErrors = this.config.customValidators
|
|
5417
|
+
.flatMap(validator => validator(this._editedData()));
|
|
5418
|
+
if (customErrors.length > 0) {
|
|
5419
|
+
isValid = false;
|
|
5420
|
+
allErrors['_custom'] = customErrors;
|
|
5421
|
+
}
|
|
5422
|
+
}
|
|
5423
|
+
this._fieldErrors.set(allErrors);
|
|
5424
|
+
if (this.config.onValidationChange) {
|
|
5425
|
+
this.config.onValidationChange(allErrors);
|
|
5426
|
+
}
|
|
5427
|
+
return isValid;
|
|
5428
|
+
}
|
|
5429
|
+
reset() {
|
|
5430
|
+
this._editedData.set(null);
|
|
5431
|
+
this._fieldErrors.set({});
|
|
5432
|
+
this._originalData.set(null);
|
|
5433
|
+
this._form.set(this.formBuilder.group({}));
|
|
5434
|
+
this.initializeData();
|
|
5435
|
+
}
|
|
5436
|
+
setData(data) {
|
|
5437
|
+
this.config.initialData = data;
|
|
5438
|
+
this.initializeData();
|
|
5439
|
+
}
|
|
5440
|
+
getPayloadData() {
|
|
5441
|
+
const data = this._editedData();
|
|
5442
|
+
if (!data)
|
|
5443
|
+
return null;
|
|
5444
|
+
let clonedData;
|
|
5445
|
+
if (this.config.modelFactory) {
|
|
5446
|
+
clonedData = this.config.modelFactory(data);
|
|
5447
|
+
}
|
|
5448
|
+
else {
|
|
5449
|
+
clonedData = Object.create(Object.getPrototypeOf(data));
|
|
5450
|
+
Object.assign(clonedData, data);
|
|
5451
|
+
}
|
|
5452
|
+
this.config.fields.forEach(field => {
|
|
5453
|
+
const fieldConfig = this.getFieldConfig(field);
|
|
5454
|
+
const shouldInclude = fieldConfig.includeInPayload !== false;
|
|
5455
|
+
if (!shouldInclude) {
|
|
5456
|
+
const targetKey = (fieldConfig.keyToPayload ?? field.key);
|
|
5457
|
+
delete clonedData[targetKey];
|
|
5458
|
+
}
|
|
5459
|
+
else if (field.keyToPayload && field.keyToPayload !== field.key) {
|
|
5460
|
+
delete clonedData[field.key];
|
|
5461
|
+
}
|
|
5462
|
+
});
|
|
5463
|
+
this.convertEmptyStringsToNull(clonedData);
|
|
5464
|
+
return clonedData;
|
|
5465
|
+
}
|
|
5466
|
+
updateField(fieldKey, value) {
|
|
5467
|
+
if (!this._editedData())
|
|
5468
|
+
return;
|
|
5469
|
+
const field = this.config.fields.find(f => f.key === fieldKey);
|
|
5470
|
+
if (!field)
|
|
5471
|
+
return;
|
|
5472
|
+
const payloadKey = (field.keyToPayload ?? field.key);
|
|
5473
|
+
this._editedData.update(data => {
|
|
5474
|
+
if (data) {
|
|
5475
|
+
data[payloadKey] = value;
|
|
5476
|
+
}
|
|
5477
|
+
return data;
|
|
5478
|
+
});
|
|
5479
|
+
const control = this._form().get(fieldKey);
|
|
5480
|
+
if (control) {
|
|
5481
|
+
control.setValue(value, { emitEvent: false });
|
|
5482
|
+
}
|
|
5483
|
+
}
|
|
5484
|
+
getFieldConfig(field) {
|
|
5485
|
+
const modeConfig = field.modes?.[this.mode];
|
|
5486
|
+
if (!modeConfig)
|
|
5487
|
+
return field;
|
|
5488
|
+
return {
|
|
5489
|
+
...field,
|
|
5490
|
+
defaultValue: modeConfig.defaultValue ?? field.defaultValue,
|
|
5491
|
+
readonly: modeConfig.readonly ?? field.readonly,
|
|
5492
|
+
options: modeConfig.options ?? field.options,
|
|
5493
|
+
validators: modeConfig.validators ?? field.validators,
|
|
5494
|
+
errorMessages: modeConfig.errorMessages ?? field.errorMessages,
|
|
5495
|
+
multiple: modeConfig.multiple ?? field.multiple,
|
|
5496
|
+
visible: modeConfig.visible ?? field.visible,
|
|
5497
|
+
includeInPayload: modeConfig.includeInPayload ?? field.includeInPayload
|
|
5498
|
+
};
|
|
5499
|
+
}
|
|
5500
|
+
detectChanges() {
|
|
5501
|
+
const editedData = this._editedData();
|
|
5502
|
+
const originalData = this._originalData();
|
|
5503
|
+
if (!editedData || !originalData || this.mode === ModalMode.VIEW) {
|
|
5504
|
+
return false;
|
|
5505
|
+
}
|
|
5506
|
+
const relevantFields = this.config.fields.filter(field => {
|
|
5507
|
+
const modeConfig = field.modes?.[this.mode];
|
|
5508
|
+
return modeConfig?.visible !== false;
|
|
5509
|
+
});
|
|
5510
|
+
return relevantFields.some(field => {
|
|
5511
|
+
const fieldKey = field.key;
|
|
5512
|
+
const editedValue = editedData[fieldKey];
|
|
5513
|
+
const originalValue = originalData[fieldKey];
|
|
5514
|
+
if (Array.isArray(editedValue) && Array.isArray(originalValue)) {
|
|
5515
|
+
return JSON.stringify(editedValue) !== JSON.stringify(originalValue);
|
|
5516
|
+
}
|
|
5517
|
+
if (editedValue instanceof Date && originalValue instanceof Date) {
|
|
5518
|
+
return editedValue.getTime() !== originalValue.getTime();
|
|
5519
|
+
}
|
|
5520
|
+
return editedValue !== originalValue;
|
|
5521
|
+
});
|
|
5522
|
+
}
|
|
5523
|
+
isFormValid() {
|
|
5524
|
+
const fieldErrors = this._fieldErrors();
|
|
5525
|
+
return Object.keys(fieldErrors).length === 0;
|
|
5526
|
+
}
|
|
5527
|
+
convertEmptyStringsToNull(data) {
|
|
5528
|
+
Object.keys(data).forEach(key => {
|
|
5529
|
+
const value = data[key];
|
|
5530
|
+
if (typeof value === 'string' && value.trim() === '') {
|
|
5531
|
+
data[key] = null;
|
|
5532
|
+
}
|
|
5533
|
+
else if (Array.isArray(value)) {
|
|
5534
|
+
data[key] = value.map(item => typeof item === 'string' && item.trim() === '' ? null : item);
|
|
5535
|
+
}
|
|
5536
|
+
else if (value && typeof value === 'object' && value.constructor === Object) {
|
|
5537
|
+
this.convertEmptyStringsToNull(value);
|
|
5538
|
+
}
|
|
5539
|
+
});
|
|
5540
|
+
}
|
|
5541
|
+
}
|
|
5542
|
+
|
|
5232
5543
|
class FileModel {
|
|
5233
5544
|
id;
|
|
5234
5545
|
filename;
|
|
@@ -6550,11 +6861,15 @@ class DropdownComponent {
|
|
|
6550
6861
|
actionTriggered = output();
|
|
6551
6862
|
customActionTriggered = output();
|
|
6552
6863
|
TableAction = TableAction;
|
|
6553
|
-
defaultActionsConfigs = computed(() => this.extraDefaultActions()
|
|
6864
|
+
defaultActionsConfigs = computed(() => this.extraDefaultActions()
|
|
6865
|
+
.filter(actionConfig => this.shouldShowAction(actionConfig))
|
|
6866
|
+
.map(actionConfig => ({
|
|
6554
6867
|
actionConfig,
|
|
6555
6868
|
buttonConfig: this.getDefaultActionButtonConfig(actionConfig)
|
|
6556
6869
|
})));
|
|
6557
|
-
customActionsConfigs = computed(() => this.extraCustomActions()
|
|
6870
|
+
customActionsConfigs = computed(() => this.extraCustomActions()
|
|
6871
|
+
.filter(customAction => this.shouldShowCustomAction(customAction))
|
|
6872
|
+
.map(customAction => ({
|
|
6558
6873
|
customAction,
|
|
6559
6874
|
buttonConfig: this.getCustomActionButtonConfigForRow(customAction)
|
|
6560
6875
|
})));
|
|
@@ -6678,6 +6993,24 @@ class DropdownComponent {
|
|
|
6678
6993
|
return true;
|
|
6679
6994
|
return this.permissionService.hasPermission(action.requiredPermission.resource, action.requiredPermission.action);
|
|
6680
6995
|
}
|
|
6996
|
+
shouldShowAction(actionConfig) {
|
|
6997
|
+
const currentRow = this.row();
|
|
6998
|
+
if (!currentRow)
|
|
6999
|
+
return true;
|
|
7000
|
+
if (actionConfig.shouldShow) {
|
|
7001
|
+
return actionConfig.shouldShow(currentRow);
|
|
7002
|
+
}
|
|
7003
|
+
return true;
|
|
7004
|
+
}
|
|
7005
|
+
shouldShowCustomAction(customAction) {
|
|
7006
|
+
const currentRow = this.row();
|
|
7007
|
+
if (!currentRow)
|
|
7008
|
+
return true;
|
|
7009
|
+
if (customAction.shouldShow) {
|
|
7010
|
+
return customAction.shouldShow(currentRow);
|
|
7011
|
+
}
|
|
7012
|
+
return true;
|
|
7013
|
+
}
|
|
6681
7014
|
getActionLabel(action) {
|
|
6682
7015
|
switch (action) {
|
|
6683
7016
|
case TableAction.VIEW:
|
|
@@ -6693,11 +7026,14 @@ class DropdownComponent {
|
|
|
6693
7026
|
}
|
|
6694
7027
|
}
|
|
6695
7028
|
getDefaultActionButtonConfig(actionConfig) {
|
|
7029
|
+
const currentRow = this.row();
|
|
7030
|
+
const isDisabled = currentRow && actionConfig.shouldDisable ? actionConfig.shouldDisable(currentRow) : false;
|
|
6696
7031
|
return {
|
|
6697
7032
|
type: ButtonType.LINK,
|
|
6698
7033
|
text: this.getActionLabel(actionConfig.action),
|
|
6699
7034
|
icon: actionConfig.icon || (actionConfig.action === TableAction.DELETE ? 'icon-delete' : 'icon-more'),
|
|
6700
|
-
context: actionConfig.action === TableAction.DELETE ? ButtonContext.ERROR : undefined
|
|
7035
|
+
context: actionConfig.action === TableAction.DELETE ? ButtonContext.ERROR : undefined,
|
|
7036
|
+
disabled: isDisabled
|
|
6701
7037
|
};
|
|
6702
7038
|
}
|
|
6703
7039
|
getCustomActionButtonConfig(customAction) {
|
|
@@ -8358,6 +8694,17 @@ class GenericTableComponent {
|
|
|
8358
8694
|
});
|
|
8359
8695
|
return actions;
|
|
8360
8696
|
}
|
|
8697
|
+
getVisibleDefaultActions(row, isExtra = false) {
|
|
8698
|
+
const actions = this.actions()
|
|
8699
|
+
.filter(action => action.isExtra === isExtra)
|
|
8700
|
+
.filter(action => {
|
|
8701
|
+
if (!action.shouldShow)
|
|
8702
|
+
return true;
|
|
8703
|
+
const shouldShow = action.shouldShow(row);
|
|
8704
|
+
return shouldShow;
|
|
8705
|
+
});
|
|
8706
|
+
return actions;
|
|
8707
|
+
}
|
|
8361
8708
|
hasExtraCustomActions = computed(() => this.extraCustomActions().length > 0);
|
|
8362
8709
|
regularDefaultActions = computed(() => this.actions().filter(action => !action.isExtra));
|
|
8363
8710
|
extraDefaultActions = computed(() => this.actions().filter(action => action.isExtra));
|
|
@@ -8370,7 +8717,7 @@ class GenericTableComponent {
|
|
|
8370
8717
|
currentFilterValues = signal(new Map());
|
|
8371
8718
|
currentActiveFilters = computed(() => this.generateActiveFilters());
|
|
8372
8719
|
hasExtraActionsForRow(row) {
|
|
8373
|
-
const hasExtraDefaultActionsWithPermissions = this.
|
|
8720
|
+
const hasExtraDefaultActionsWithPermissions = this.getVisibleDefaultActions(row, true).some(action => this.hasPermission(action));
|
|
8374
8721
|
const hasExtraCustomActionsWithPermissions = this.getVisibleCustomActions(row, true).some(action => this.hasPermission(action));
|
|
8375
8722
|
return hasExtraDefaultActionsWithPermissions || hasExtraCustomActionsWithPermissions;
|
|
8376
8723
|
}
|
|
@@ -9488,7 +9835,7 @@ class GenericTableComponent {
|
|
|
9488
9835
|
customClass: this.expansionConfig()?.buttonClass || 'c-icon-btn'
|
|
9489
9836
|
};
|
|
9490
9837
|
}
|
|
9491
|
-
getActionButtonConfig(action, actionConfig) {
|
|
9838
|
+
getActionButtonConfig(action, actionConfig, row) {
|
|
9492
9839
|
const configs = {
|
|
9493
9840
|
[TableAction.VIEW]: {
|
|
9494
9841
|
type: ButtonType.ICON,
|
|
@@ -9536,9 +9883,11 @@ class GenericTableComponent {
|
|
|
9536
9883
|
},
|
|
9537
9884
|
text: action
|
|
9538
9885
|
};
|
|
9886
|
+
const isDisabled = row && actionConfig.shouldDisable ? actionConfig.shouldDisable(row) : false;
|
|
9539
9887
|
return {
|
|
9540
9888
|
...config,
|
|
9541
|
-
customClass: actionConfig.class || 'c-icon-btn'
|
|
9889
|
+
customClass: actionConfig.class || 'c-icon-btn',
|
|
9890
|
+
disabled: isDisabled
|
|
9542
9891
|
};
|
|
9543
9892
|
}
|
|
9544
9893
|
getCustomActionButtonConfig(customAction) {
|
|
@@ -9719,7 +10068,7 @@ class GenericTableComponent {
|
|
|
9719
10068
|
this.tableDataService.updateRowData(rowId, updatedFields, updateFunction);
|
|
9720
10069
|
}
|
|
9721
10070
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: GenericTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9722
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: GenericTableComponent, isStandalone: true, selector: "core-generic-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, modalFields: { classPropertyName: "modalFields", publicName: "modalFields", isSignal: true, isRequired: false, transformFunction: null }, modalTabs: { classPropertyName: "modalTabs", publicName: "modalTabs", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: true, transformFunction: null }, customActions: { classPropertyName: "customActions", publicName: "customActions", isSignal: true, isRequired: false, transformFunction: null }, globalActions: { classPropertyName: "globalActions", publicName: "globalActions", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showFilter: { classPropertyName: "showFilter", publicName: "showFilter", isSignal: true, isRequired: false, transformFunction: null }, showSelection: { classPropertyName: "showSelection", publicName: "showSelection", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, filterButtonConfig: { classPropertyName: "filterButtonConfig", publicName: "filterButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, createButtonConfig: { classPropertyName: "createButtonConfig", publicName: "createButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, dataInput: { classPropertyName: "dataInput", publicName: "dataInput", isSignal: true, isRequired: false, transformFunction: null }, customFilters: { classPropertyName: "customFilters", publicName: "customFilters", isSignal: true, isRequired: false, transformFunction: null }, enablePagination: { classPropertyName: "enablePagination", publicName: "enablePagination", isSignal: true, isRequired: false, transformFunction: null }, modelFactory: { classPropertyName: "modelFactory", publicName: "modelFactory", isSignal: true, isRequired: false, transformFunction: null }, endpoint: { classPropertyName: "endpoint", publicName: "endpoint", isSignal: true, isRequired: false, transformFunction: null }, customParams: { classPropertyName: "customParams", publicName: "customParams", isSignal: true, isRequired: false, transformFunction: null }, customArrayKey: { classPropertyName: "customArrayKey", publicName: "customArrayKey", isSignal: true, isRequired: false, transformFunction: null }, listTitle: { classPropertyName: "listTitle", publicName: "listTitle", isSignal: true, isRequired: false, transformFunction: null }, moreData: { classPropertyName: "moreData", publicName: "moreData", isSignal: true, isRequired: false, transformFunction: null }, inModal: { classPropertyName: "inModal", publicName: "inModal", isSignal: true, isRequired: false, transformFunction: null }, expansionConfig: { classPropertyName: "expansionConfig", publicName: "expansionConfig", isSignal: true, isRequired: false, transformFunction: null }, fileUploadConfig: { classPropertyName: "fileUploadConfig", publicName: "fileUploadConfig", isSignal: true, isRequired: false, transformFunction: null }, rowStyleConfigs: { classPropertyName: "rowStyleConfigs", publicName: "rowStyleConfigs", isSignal: true, isRequired: false, transformFunction: null }, columnDisabledConfigs: { classPropertyName: "columnDisabledConfigs", publicName: "columnDisabledConfigs", isSignal: true, isRequired: false, transformFunction: null }, rowVisibilityConfigs: { classPropertyName: "rowVisibilityConfigs", publicName: "rowVisibilityConfigs", isSignal: true, isRequired: false, transformFunction: null }, headerOrder: { classPropertyName: "headerOrder", publicName: "headerOrder", isSignal: true, isRequired: false, transformFunction: null }, showActiveFilters: { classPropertyName: "showActiveFilters", publicName: "showActiveFilters", isSignal: true, isRequired: false, transformFunction: null }, activeFiltersConfig: { classPropertyName: "activeFiltersConfig", publicName: "activeFiltersConfig", isSignal: true, isRequired: false, transformFunction: null }, sortConfig: { classPropertyName: "sortConfig", publicName: "sortConfig", isSignal: true, isRequired: false, transformFunction: null }, customEdit: { classPropertyName: "customEdit", publicName: "customEdit", isSignal: true, isRequired: false, transformFunction: null }, customDelete: { classPropertyName: "customDelete", publicName: "customDelete", isSignal: true, isRequired: false, transformFunction: null }, customView: { classPropertyName: "customView", publicName: "customView", isSignal: true, isRequired: false, transformFunction: null }, customSave: { classPropertyName: "customSave", publicName: "customSave", isSignal: true, isRequired: false, transformFunction: null }, useCustomSave: { classPropertyName: "useCustomSave", publicName: "useCustomSave", isSignal: true, isRequired: false, transformFunction: null }, onApiError: { classPropertyName: "onApiError", publicName: "onApiError", isSignal: true, isRequired: false, transformFunction: null }, inlineEditConfig: { classPropertyName: "inlineEditConfig", publicName: "inlineEditConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered", selectionChanged: "selectionChanged", dataCreated: "dataCreated", dataUpdated: "dataUpdated", dataDeleted: "dataDeleted", dataFetched: "dataFetched", onMoreDataLoaded: "onMoreDataLoaded", globalActionTriggered: "globalActionTriggered", modalData: "modalData", beforeSave: "beforeSave", onFilterChange: "onFilterChange", onClearFilters: "onClearFilters", activeFilterRemoved: "activeFilterRemoved", activeFiltersCleared: "activeFiltersCleared", inlineEditSave: "inlineEditSave", inlineEditModeChanged: "inlineEditModeChanged", inlineEditValidationError: "inlineEditValidationError" }, host: { listeners: { "window:beforeunload": "onBeforeUnload($event)", "document:click": "closeSubmenu()" } }, providers: [TableDataService, FilterService, PaginationService, ModelApiService, InlineEditService], viewQueries: [{ propertyName: "sentinel", first: true, predicate: ["sentinel"], descendants: true }, { propertyName: "dropdownTrigger", first: true, predicate: ["dropdownTrigger"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "@if (showActiveFilters()) {\n <core-active-filters\n [activeFilters]=\"currentActiveFilters()\"\n [config]=\"activeFiltersConfig()\"\n (onFilterRemove)=\"onActiveFilterRemove($event)\"\n (onClearAll)=\"onActiveFiltersClear()\">\n </core-active-filters>\n}\n\n<div class=\"c-table\" [class.in-modal]=\"inModal()\" [class.inline-edit-mode]=\"inlineEditService.isInlineEditMode()\">\n <table>\n <thead>\n <tr>\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <th class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isAllSelected()\" (change)=\"masterToggle()\" />\n </th>\n }\n @for (column of columns(); track $index) {\n <th [ngClass]=\"column.align ? 'u-align-' + column.align : ''\">\n @if (isColumnSortable(column)) {\n <button class=\"c-table-order\" tabindex=\"-1\"\n [class.is-asc]=\"getColumnSortState(column) === SortDirection.ASC\"\n [class.is-desc]=\"getColumnSortState(column) === SortDirection.DESC\"\n [class.has-multiple-sorts]=\"isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null\"\n [title]=\"getSortButtonTitle(column)\"\n (click)=\"onColumnHeaderClick(column)\">\n {{ column.label | translate }}\n <!-- @if (isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null) {\n <span class=\"c-table-order__priority\">{{ getColumnSortPriority(column)! + 1 }}</span>\n } -->\n <span class=\"c-table-order__controls\">\n <span class=\"c-table-order__arrow--desc icon-arrow-up\"></span>\n <span class=\"c-table-order__arrow--asc icon-arrow-down\"></span>\n </span>\n </button>\n } @else {\n {{ column.label | translate }}\n }\n </th>\n }\n @if (showActions() && (actions().length > 0 || customActions().length > 0)) {\n <th class=\"u-align-right\">{{ 'table.actions' | translate }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of displayedData(); track row.getId()) {\n <tr [ngClass]=\"getRowClasses(row)\" \n [class.is-editing-inline]=\"isRowInEditMode(row.getId())\"\n [class.is-disabled]=\"isRowDisabled(row)\">\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <td class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isRowSelected(row)\" (change)=\"toggleRow(row)\" />\n </td>\n }\n @for (column of columns(); track $index) {\n <td [attr.data-label]=\"column.label | translate\" \n [ngClass]=\"[\n column.align ? 'u-align-' + column.align : '',\n getCellDisabledClasses(row, column)\n ]\" \n [class.is-editing]=\"isColumnEditable(column, row)\"\n [class.is-column-disabled]=\"isColumnDisabledForRow(row, column)\">\n @if (column.template) {\n <!-- Todo: Ver qu\u00E9 es esto -->\n <ng-container *ngTemplateOutlet=\"column.template; context: { $implicit: row, column: column }\"></ng-container>\n } @else if (isColumnEditable(column, row)) {\n <!-- !Solcre: Modo de edici\u00F3n en l\u00EDnea usando DynamicField -->\n <div class=\"c-table__inline-edit\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong>\n <div\n coreDynamicField\n [field]=\"getInlineEditableConfigWithState(row, column)!\"\n [value]=\"getEditingValue(row, column)\"\n [mode]=\"ModalMode.EDIT\"\n [errors]=\"getCellErrors(row, column)\"\n [rowData]=\"row\"\n (valueChange)=\"onCellValueChange(row, column, $event)\"\n (onBlurEvent)=\"onCellBlur(row, column)\"\n (onEnterEvent)=\"onCellEnter(row, column)\"\n ></div>\n </div>\n } @else {\n <div class=\"c-table__content\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong> {{ getFormattedValue(row,\n column) }}\n </div>\n }\n </td>\n }\n\n <!-- Actions-->\n\n @if (showActions() && (actions().length > 0 || customActions().length > 0 || expansionConfig()?.enabled)) {\n\n <td class=\"u-align-right\">\n <div class=\"c-table__actions\">\n <core-dropdown [rowId]=\"row.getId()\" [extraDefaultActions]=\"extraDefaultActions()\"\n [extraCustomActions]=\"getVisibleCustomActions(row, true)\" [row]=\"row\"\n [triggerElementId]=\"'dropdown-trigger-' + row.getId()\"\n (actionTriggered)=\"triggerAction($event.action, $event.row)\"\n (customActionTriggered)=\"triggerCustomAction($event.action, $event.row)\" #dropdown>\n </core-dropdown>\n @for (actionConfig of regularDefaultActions(); track actionConfig.action) {\n @if (hasPermission(actionConfig)) {\n @if (actionConfig.action === TableAction.VIEW || actionConfig.action === TableAction.EDIT ||\n actionConfig.action === TableAction.DELETE) {\n <core-generic-button [config]=\"getActionButtonConfig(actionConfig.action, actionConfig)\"\n (buttonClick)=\"onButtonClick($event, actionConfig.action, row)\">\n </core-generic-button>\n }\n }\n }\n @for (customAction of getVisibleCustomActions(row, false); track customAction.label || $index) {\n @if (hasPermission(customAction)) {\n <core-generic-button [config]=\"getCustomActionButtonConfigForRow(customAction, row)\"\n (buttonClick)=\"onButtonClick($event, customAction, row)\">\n </core-generic-button>\n }\n }\n\n @if (hasExtraActionsForRow(row)) {\n <core-generic-button [config]=\"getMoreActionsButtonConfig(row.getId())\" [data]=\"row\"\n (buttonClick)=\"onMoreActionsClick($event, row.getId())\" #dropdownTrigger>\n </core-generic-button>\n }\n\n @if (expansionConfig()?.enabled) {\n <!-- \u2705 Solcre: Celda dedicada para expansi\u00F3n en su posici\u00F3n correcta -->\n <core-generic-button [config]=\"getExpandButtonConfig(row)\" (buttonClick)=\"onExpandButtonClick($event, row)\">\n </core-generic-button>\n }\n\n </div> <!-- .c-table__actions -->\n </td> <!-- td parent of .c-table__actions -->\n } <!-- @if (showActions() -->\n\n\n </tr>\n @if (expansionConfig()?.enabled && isRowExpanded(row)) {\n <!-- Todo: Ver que es esto -->\n <tr class=\"expansion-row\" [ngClass]=\"getRowClasses(row)\">\n <td [attr.colspan]=\"displayedColumns().length\" class=\"expansion-content\">\n <ng-container *ngTemplateOutlet=\"expansionConfig()!.template; context: { $implicit: row }\">\n </ng-container>\n </td>\n </tr>\n }\n } @empty {\n <tr>\n <!-- Todo: Estilo .no-data -->\n <td [attr.colspan]=\"displayedColumns().length\">\n <p class=\"c-placeholder\">{{ 'table.noData' | translate }}</p>\n </td>\n </tr>\n }\n </tbody>\n </table>\n</div> <!-- .c-table -->\n\n<!-- Todo: Todo lo que viene dsp de la tabla -->\n\n@if (!enablePagination()) {\n<!-- Todo: Ver qu\u00E9 onda esto -->\n<div #sentinel class=\"sentinel\"></div>\n}\n\n@if (enablePagination()) {\n<!-- Todo: Ver qu\u00E9 onda esto -->\n<core-generic-pagination [tableId]=\"tableId\"></core-generic-pagination>\n}\n\n<core-generic-modal [isOpen]=\"tableActionService.getIsModalOpen()\" [mode]=\"tableActionService.getModalMode()\"\n [data]=\"tableActionService.getModalData()\" [fields]=\"hasTabs() ? [] : tableActionService.getModalFieldsToShow()\"\n [tabs]=\"hasTabs() ? modalTabs() : []\" [title]=\"tableActionService.getModalTitle()\" [modelFactory]=\"modelFactory() || null\"\n (save)=\"onModalSave($event)\" (close)=\"tableActionService.closeModal()\" (modalData)=\"onModalData($event)\">\n</core-generic-modal>\n\n<core-filter-modal [isOpen]=\"isFilterModalOpen()\" [filters]=\"customFilters()\" [currentFilterValues]=\"currentFilterValues()\" (close)=\"closeFiltersPopup()\"\n (filterChange)=\"handleFilterChange($event)\" (globalFilterChange)=\"applyGlobalFilter($event)\"\n (clearFilters)=\"handleClearFilters()\">\n</core-filter-modal>", styles: [".in-modal .c-table thead th:last-child,.c-table tbody td:last-child{text-align:left}.c-table__order-btn--asc{transform:rotate(180deg)}.c-table__order-btn--desc{transform:rotate(0)}.c-table tr.is-editing-inline{background-color:#fff3cd;border-left:3px solid #ffc107}.c-table tr.is-editing-inline td{background-color:#fff3cd}.c-table tr.is-editing-inline:hover td{background-color:#ffecb5}.expansion-row .expansion-content{padding:16px;background-color:#f8f9fa;border-top:1px solid #dee2e6}.expansion-row td{border-bottom:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "component", type: GenericModalComponent, selector: "core-generic-modal", inputs: ["isOpen", "mode", "data", "fields", "tabs", "title", "isMultiple", "customTemplate", "customViewTemplate", "buttonConfig", "modelFactory", "errors", "validators", "customHasChanges"], outputs: ["save", "close", "modalData"] }, { kind: "component", type: GenericPaginationComponent, selector: "core-generic-pagination", inputs: ["tableId", "isServerSide"] }, { kind: "component", type: DropdownComponent, selector: "core-dropdown", inputs: ["rowId", "triggerElementId", "extraDefaultActions", "extraCustomActions", "row"], outputs: ["actionTriggered", "customActionTriggered"] }, { kind: "component", type: FilterModalComponent, selector: "core-filter-modal", inputs: ["isOpen", "filters", "currentFilterValues"], outputs: ["close", "filterChange", "clearFilters", "globalFilterChange"] }, { kind: "component", type: GenericButtonComponent, selector: "core-generic-button", inputs: ["config", "data"], outputs: ["buttonClick"] }, { kind: "directive", type: DynamicFieldDirective, selector: "[coreDynamicField]", inputs: ["field", "value", "mode", "errors", "rowData", "formValue"], outputs: ["valueChange", "onBlurEvent", "onEnterEvent", "selectionChange"] }, { kind: "component", type: ActiveFiltersComponent, selector: "core-active-filters", inputs: ["activeFilters", "config"], outputs: ["onFilterRemove", "onClearAll"] }] });
|
|
10071
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: GenericTableComponent, isStandalone: true, selector: "core-generic-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, modalFields: { classPropertyName: "modalFields", publicName: "modalFields", isSignal: true, isRequired: false, transformFunction: null }, modalTabs: { classPropertyName: "modalTabs", publicName: "modalTabs", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: true, transformFunction: null }, customActions: { classPropertyName: "customActions", publicName: "customActions", isSignal: true, isRequired: false, transformFunction: null }, globalActions: { classPropertyName: "globalActions", publicName: "globalActions", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showFilter: { classPropertyName: "showFilter", publicName: "showFilter", isSignal: true, isRequired: false, transformFunction: null }, showSelection: { classPropertyName: "showSelection", publicName: "showSelection", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, filterButtonConfig: { classPropertyName: "filterButtonConfig", publicName: "filterButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, createButtonConfig: { classPropertyName: "createButtonConfig", publicName: "createButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, dataInput: { classPropertyName: "dataInput", publicName: "dataInput", isSignal: true, isRequired: false, transformFunction: null }, customFilters: { classPropertyName: "customFilters", publicName: "customFilters", isSignal: true, isRequired: false, transformFunction: null }, enablePagination: { classPropertyName: "enablePagination", publicName: "enablePagination", isSignal: true, isRequired: false, transformFunction: null }, modelFactory: { classPropertyName: "modelFactory", publicName: "modelFactory", isSignal: true, isRequired: false, transformFunction: null }, endpoint: { classPropertyName: "endpoint", publicName: "endpoint", isSignal: true, isRequired: false, transformFunction: null }, customParams: { classPropertyName: "customParams", publicName: "customParams", isSignal: true, isRequired: false, transformFunction: null }, customArrayKey: { classPropertyName: "customArrayKey", publicName: "customArrayKey", isSignal: true, isRequired: false, transformFunction: null }, listTitle: { classPropertyName: "listTitle", publicName: "listTitle", isSignal: true, isRequired: false, transformFunction: null }, moreData: { classPropertyName: "moreData", publicName: "moreData", isSignal: true, isRequired: false, transformFunction: null }, inModal: { classPropertyName: "inModal", publicName: "inModal", isSignal: true, isRequired: false, transformFunction: null }, expansionConfig: { classPropertyName: "expansionConfig", publicName: "expansionConfig", isSignal: true, isRequired: false, transformFunction: null }, fileUploadConfig: { classPropertyName: "fileUploadConfig", publicName: "fileUploadConfig", isSignal: true, isRequired: false, transformFunction: null }, rowStyleConfigs: { classPropertyName: "rowStyleConfigs", publicName: "rowStyleConfigs", isSignal: true, isRequired: false, transformFunction: null }, columnDisabledConfigs: { classPropertyName: "columnDisabledConfigs", publicName: "columnDisabledConfigs", isSignal: true, isRequired: false, transformFunction: null }, rowVisibilityConfigs: { classPropertyName: "rowVisibilityConfigs", publicName: "rowVisibilityConfigs", isSignal: true, isRequired: false, transformFunction: null }, headerOrder: { classPropertyName: "headerOrder", publicName: "headerOrder", isSignal: true, isRequired: false, transformFunction: null }, showActiveFilters: { classPropertyName: "showActiveFilters", publicName: "showActiveFilters", isSignal: true, isRequired: false, transformFunction: null }, activeFiltersConfig: { classPropertyName: "activeFiltersConfig", publicName: "activeFiltersConfig", isSignal: true, isRequired: false, transformFunction: null }, sortConfig: { classPropertyName: "sortConfig", publicName: "sortConfig", isSignal: true, isRequired: false, transformFunction: null }, customEdit: { classPropertyName: "customEdit", publicName: "customEdit", isSignal: true, isRequired: false, transformFunction: null }, customDelete: { classPropertyName: "customDelete", publicName: "customDelete", isSignal: true, isRequired: false, transformFunction: null }, customView: { classPropertyName: "customView", publicName: "customView", isSignal: true, isRequired: false, transformFunction: null }, customSave: { classPropertyName: "customSave", publicName: "customSave", isSignal: true, isRequired: false, transformFunction: null }, useCustomSave: { classPropertyName: "useCustomSave", publicName: "useCustomSave", isSignal: true, isRequired: false, transformFunction: null }, onApiError: { classPropertyName: "onApiError", publicName: "onApiError", isSignal: true, isRequired: false, transformFunction: null }, inlineEditConfig: { classPropertyName: "inlineEditConfig", publicName: "inlineEditConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered", selectionChanged: "selectionChanged", dataCreated: "dataCreated", dataUpdated: "dataUpdated", dataDeleted: "dataDeleted", dataFetched: "dataFetched", onMoreDataLoaded: "onMoreDataLoaded", globalActionTriggered: "globalActionTriggered", modalData: "modalData", beforeSave: "beforeSave", onFilterChange: "onFilterChange", onClearFilters: "onClearFilters", activeFilterRemoved: "activeFilterRemoved", activeFiltersCleared: "activeFiltersCleared", inlineEditSave: "inlineEditSave", inlineEditModeChanged: "inlineEditModeChanged", inlineEditValidationError: "inlineEditValidationError" }, host: { listeners: { "window:beforeunload": "onBeforeUnload($event)", "document:click": "closeSubmenu()" } }, providers: [TableDataService, FilterService, PaginationService, ModelApiService, InlineEditService], viewQueries: [{ propertyName: "sentinel", first: true, predicate: ["sentinel"], descendants: true }, { propertyName: "dropdownTrigger", first: true, predicate: ["dropdownTrigger"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "@if (showActiveFilters()) {\n <core-active-filters\n [activeFilters]=\"currentActiveFilters()\"\n [config]=\"activeFiltersConfig()\"\n (onFilterRemove)=\"onActiveFilterRemove($event)\"\n (onClearAll)=\"onActiveFiltersClear()\">\n </core-active-filters>\n}\n\n<div class=\"c-table\" [class.in-modal]=\"inModal()\" [class.inline-edit-mode]=\"inlineEditService.isInlineEditMode()\">\n <table>\n <thead>\n <tr>\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <th class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isAllSelected()\" (change)=\"masterToggle()\" />\n </th>\n }\n @for (column of columns(); track $index) {\n <th [ngClass]=\"column.align ? 'u-align-' + column.align : ''\">\n @if (isColumnSortable(column)) {\n <button class=\"c-table-order\" tabindex=\"-1\"\n [class.is-asc]=\"getColumnSortState(column) === SortDirection.ASC\"\n [class.is-desc]=\"getColumnSortState(column) === SortDirection.DESC\"\n [class.has-multiple-sorts]=\"isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null\"\n [title]=\"getSortButtonTitle(column)\"\n (click)=\"onColumnHeaderClick(column)\">\n {{ column.label | translate }}\n <!-- @if (isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null) {\n <span class=\"c-table-order__priority\">{{ getColumnSortPriority(column)! + 1 }}</span>\n } -->\n <span class=\"c-table-order__controls\">\n <span class=\"c-table-order__arrow--desc icon-arrow-up\"></span>\n <span class=\"c-table-order__arrow--asc icon-arrow-down\"></span>\n </span>\n </button>\n } @else {\n {{ column.label | translate }}\n }\n </th>\n }\n @if (showActions() && (actions().length > 0 || customActions().length > 0)) {\n <th class=\"u-align-right\">{{ 'table.actions' | translate }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of displayedData(); track row.getId()) {\n <tr [ngClass]=\"getRowClasses(row)\" \n [class.is-editing-inline]=\"isRowInEditMode(row.getId())\"\n [class.is-disabled]=\"isRowDisabled(row)\">\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <td class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isRowSelected(row)\" (change)=\"toggleRow(row)\" />\n </td>\n }\n @for (column of columns(); track $index) {\n <td [attr.data-label]=\"column.label | translate\" \n [ngClass]=\"[\n column.align ? 'u-align-' + column.align : '',\n getCellDisabledClasses(row, column)\n ]\" \n [class.is-editing]=\"isColumnEditable(column, row)\"\n [class.is-column-disabled]=\"isColumnDisabledForRow(row, column)\">\n @if (column.template) {\n <!-- Todo: Ver qu\u00E9 es esto -->\n <ng-container *ngTemplateOutlet=\"column.template; context: { $implicit: row, column: column }\"></ng-container>\n } @else if (isColumnEditable(column, row)) {\n <!-- !Solcre: Modo de edici\u00F3n en l\u00EDnea usando DynamicField -->\n <div class=\"c-table__inline-edit\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong>\n <div\n coreDynamicField\n [field]=\"getInlineEditableConfigWithState(row, column)!\"\n [value]=\"getEditingValue(row, column)\"\n [mode]=\"ModalMode.EDIT\"\n [errors]=\"getCellErrors(row, column)\"\n [rowData]=\"row\"\n (valueChange)=\"onCellValueChange(row, column, $event)\"\n (onBlurEvent)=\"onCellBlur(row, column)\"\n (onEnterEvent)=\"onCellEnter(row, column)\"\n ></div>\n </div>\n } @else {\n <div class=\"c-table__content\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong> {{ getFormattedValue(row,\n column) }}\n </div>\n }\n </td>\n }\n\n <!-- Actions-->\n\n @if (showActions() && (actions().length > 0 || customActions().length > 0 || expansionConfig()?.enabled)) {\n\n <td class=\"u-align-right\">\n <div class=\"c-table__actions\">\n <core-dropdown [rowId]=\"row.getId()\" [extraDefaultActions]=\"getVisibleDefaultActions(row, true)\"\n [extraCustomActions]=\"getVisibleCustomActions(row, true)\" [row]=\"row\"\n [triggerElementId]=\"'dropdown-trigger-' + row.getId()\"\n (actionTriggered)=\"triggerAction($event.action, $event.row)\"\n (customActionTriggered)=\"triggerCustomAction($event.action, $event.row)\" #dropdown>\n </core-dropdown>\n @for (actionConfig of getVisibleDefaultActions(row, false); track actionConfig.action) {\n @if (hasPermission(actionConfig)) {\n @if (actionConfig.action === TableAction.VIEW || actionConfig.action === TableAction.EDIT ||\n actionConfig.action === TableAction.DELETE) {\n <core-generic-button [config]=\"getActionButtonConfig(actionConfig.action, actionConfig, row)\"\n (buttonClick)=\"onButtonClick($event, actionConfig.action, row)\">\n </core-generic-button>\n }\n }\n }\n @for (customAction of getVisibleCustomActions(row, false); track customAction.label || $index) {\n @if (hasPermission(customAction)) {\n <core-generic-button [config]=\"getCustomActionButtonConfigForRow(customAction, row)\"\n (buttonClick)=\"onButtonClick($event, customAction, row)\">\n </core-generic-button>\n }\n }\n\n @if (hasExtraActionsForRow(row)) {\n <core-generic-button [config]=\"getMoreActionsButtonConfig(row.getId())\" [data]=\"row\"\n (buttonClick)=\"onMoreActionsClick($event, row.getId())\" #dropdownTrigger>\n </core-generic-button>\n }\n\n @if (expansionConfig()?.enabled) {\n <!-- \u2705 Solcre: Celda dedicada para expansi\u00F3n en su posici\u00F3n correcta -->\n <core-generic-button [config]=\"getExpandButtonConfig(row)\" (buttonClick)=\"onExpandButtonClick($event, row)\">\n </core-generic-button>\n }\n\n </div> <!-- .c-table__actions -->\n </td> <!-- td parent of .c-table__actions -->\n } <!-- @if (showActions() -->\n\n\n </tr>\n @if (expansionConfig()?.enabled && isRowExpanded(row)) {\n <!-- Todo: Ver que es esto -->\n <tr class=\"expansion-row\" [ngClass]=\"getRowClasses(row)\">\n <td [attr.colspan]=\"displayedColumns().length\" class=\"expansion-content\">\n <ng-container *ngTemplateOutlet=\"expansionConfig()!.template; context: { $implicit: row }\">\n </ng-container>\n </td>\n </tr>\n }\n } @empty {\n <tr>\n <!-- Todo: Estilo .no-data -->\n <td [attr.colspan]=\"displayedColumns().length\">\n <p class=\"c-placeholder\">{{ 'table.noData' | translate }}</p>\n </td>\n </tr>\n }\n </tbody>\n </table>\n</div> <!-- .c-table -->\n\n<!-- Todo: Todo lo que viene dsp de la tabla -->\n\n@if (!enablePagination()) {\n<!-- Todo: Ver qu\u00E9 onda esto -->\n<div #sentinel class=\"sentinel\"></div>\n}\n\n@if (enablePagination()) {\n<!-- Todo: Ver qu\u00E9 onda esto -->\n<core-generic-pagination [tableId]=\"tableId\"></core-generic-pagination>\n}\n\n<core-generic-modal [isOpen]=\"tableActionService.getIsModalOpen()\" [mode]=\"tableActionService.getModalMode()\"\n [data]=\"tableActionService.getModalData()\" [fields]=\"hasTabs() ? [] : tableActionService.getModalFieldsToShow()\"\n [tabs]=\"hasTabs() ? modalTabs() : []\" [title]=\"tableActionService.getModalTitle()\" [modelFactory]=\"modelFactory() || null\"\n (save)=\"onModalSave($event)\" (close)=\"tableActionService.closeModal()\" (modalData)=\"onModalData($event)\">\n</core-generic-modal>\n\n<core-filter-modal [isOpen]=\"isFilterModalOpen()\" [filters]=\"customFilters()\" [currentFilterValues]=\"currentFilterValues()\" (close)=\"closeFiltersPopup()\"\n (filterChange)=\"handleFilterChange($event)\" (globalFilterChange)=\"applyGlobalFilter($event)\"\n (clearFilters)=\"handleClearFilters()\">\n</core-filter-modal>", styles: [".in-modal .c-table thead th:last-child,.c-table tbody td:last-child{text-align:left}.c-table__order-btn--asc{transform:rotate(180deg)}.c-table__order-btn--desc{transform:rotate(0)}.c-table tr.is-editing-inline{background-color:#fff3cd;border-left:3px solid #ffc107}.c-table tr.is-editing-inline td{background-color:#fff3cd}.c-table tr.is-editing-inline:hover td{background-color:#ffecb5}.expansion-row .expansion-content{padding:16px;background-color:#f8f9fa;border-top:1px solid #dee2e6}.expansion-row td{border-bottom:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "component", type: GenericModalComponent, selector: "core-generic-modal", inputs: ["isOpen", "mode", "data", "fields", "tabs", "title", "isMultiple", "customTemplate", "customViewTemplate", "buttonConfig", "modelFactory", "errors", "validators", "customHasChanges"], outputs: ["save", "close", "modalData"] }, { kind: "component", type: GenericPaginationComponent, selector: "core-generic-pagination", inputs: ["tableId", "isServerSide"] }, { kind: "component", type: DropdownComponent, selector: "core-dropdown", inputs: ["rowId", "triggerElementId", "extraDefaultActions", "extraCustomActions", "row"], outputs: ["actionTriggered", "customActionTriggered"] }, { kind: "component", type: FilterModalComponent, selector: "core-filter-modal", inputs: ["isOpen", "filters", "currentFilterValues"], outputs: ["close", "filterChange", "clearFilters", "globalFilterChange"] }, { kind: "component", type: GenericButtonComponent, selector: "core-generic-button", inputs: ["config", "data"], outputs: ["buttonClick"] }, { kind: "directive", type: DynamicFieldDirective, selector: "[coreDynamicField]", inputs: ["field", "value", "mode", "errors", "rowData", "formValue"], outputs: ["valueChange", "onBlurEvent", "onEnterEvent", "selectionChange"] }, { kind: "component", type: ActiveFiltersComponent, selector: "core-active-filters", inputs: ["activeFilters", "config"], outputs: ["onFilterRemove", "onClearAll"] }] });
|
|
9723
10072
|
}
|
|
9724
10073
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: GenericTableComponent, decorators: [{
|
|
9725
10074
|
type: Component,
|
|
@@ -9733,7 +10082,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
9733
10082
|
GenericButtonComponent,
|
|
9734
10083
|
DynamicFieldDirective,
|
|
9735
10084
|
ActiveFiltersComponent,
|
|
9736
|
-
], hostDirectives: [CoreHostDirective], providers: [TableDataService, FilterService, PaginationService, ModelApiService, InlineEditService], template: "@if (showActiveFilters()) {\n <core-active-filters\n [activeFilters]=\"currentActiveFilters()\"\n [config]=\"activeFiltersConfig()\"\n (onFilterRemove)=\"onActiveFilterRemove($event)\"\n (onClearAll)=\"onActiveFiltersClear()\">\n </core-active-filters>\n}\n\n<div class=\"c-table\" [class.in-modal]=\"inModal()\" [class.inline-edit-mode]=\"inlineEditService.isInlineEditMode()\">\n <table>\n <thead>\n <tr>\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <th class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isAllSelected()\" (change)=\"masterToggle()\" />\n </th>\n }\n @for (column of columns(); track $index) {\n <th [ngClass]=\"column.align ? 'u-align-' + column.align : ''\">\n @if (isColumnSortable(column)) {\n <button class=\"c-table-order\" tabindex=\"-1\"\n [class.is-asc]=\"getColumnSortState(column) === SortDirection.ASC\"\n [class.is-desc]=\"getColumnSortState(column) === SortDirection.DESC\"\n [class.has-multiple-sorts]=\"isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null\"\n [title]=\"getSortButtonTitle(column)\"\n (click)=\"onColumnHeaderClick(column)\">\n {{ column.label | translate }}\n <!-- @if (isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null) {\n <span class=\"c-table-order__priority\">{{ getColumnSortPriority(column)! + 1 }}</span>\n } -->\n <span class=\"c-table-order__controls\">\n <span class=\"c-table-order__arrow--desc icon-arrow-up\"></span>\n <span class=\"c-table-order__arrow--asc icon-arrow-down\"></span>\n </span>\n </button>\n } @else {\n {{ column.label | translate }}\n }\n </th>\n }\n @if (showActions() && (actions().length > 0 || customActions().length > 0)) {\n <th class=\"u-align-right\">{{ 'table.actions' | translate }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of displayedData(); track row.getId()) {\n <tr [ngClass]=\"getRowClasses(row)\" \n [class.is-editing-inline]=\"isRowInEditMode(row.getId())\"\n [class.is-disabled]=\"isRowDisabled(row)\">\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <td class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isRowSelected(row)\" (change)=\"toggleRow(row)\" />\n </td>\n }\n @for (column of columns(); track $index) {\n <td [attr.data-label]=\"column.label | translate\" \n [ngClass]=\"[\n column.align ? 'u-align-' + column.align : '',\n getCellDisabledClasses(row, column)\n ]\" \n [class.is-editing]=\"isColumnEditable(column, row)\"\n [class.is-column-disabled]=\"isColumnDisabledForRow(row, column)\">\n @if (column.template) {\n <!-- Todo: Ver qu\u00E9 es esto -->\n <ng-container *ngTemplateOutlet=\"column.template; context: { $implicit: row, column: column }\"></ng-container>\n } @else if (isColumnEditable(column, row)) {\n <!-- !Solcre: Modo de edici\u00F3n en l\u00EDnea usando DynamicField -->\n <div class=\"c-table__inline-edit\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong>\n <div\n coreDynamicField\n [field]=\"getInlineEditableConfigWithState(row, column)!\"\n [value]=\"getEditingValue(row, column)\"\n [mode]=\"ModalMode.EDIT\"\n [errors]=\"getCellErrors(row, column)\"\n [rowData]=\"row\"\n (valueChange)=\"onCellValueChange(row, column, $event)\"\n (onBlurEvent)=\"onCellBlur(row, column)\"\n (onEnterEvent)=\"onCellEnter(row, column)\"\n ></div>\n </div>\n } @else {\n <div class=\"c-table__content\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong> {{ getFormattedValue(row,\n column) }}\n </div>\n }\n </td>\n }\n\n <!-- Actions-->\n\n @if (showActions() && (actions().length > 0 || customActions().length > 0 || expansionConfig()?.enabled)) {\n\n <td class=\"u-align-right\">\n <div class=\"c-table__actions\">\n <core-dropdown [rowId]=\"row.getId()\" [extraDefaultActions]=\"
|
|
10085
|
+
], hostDirectives: [CoreHostDirective], providers: [TableDataService, FilterService, PaginationService, ModelApiService, InlineEditService], template: "@if (showActiveFilters()) {\n <core-active-filters\n [activeFilters]=\"currentActiveFilters()\"\n [config]=\"activeFiltersConfig()\"\n (onFilterRemove)=\"onActiveFilterRemove($event)\"\n (onClearAll)=\"onActiveFiltersClear()\">\n </core-active-filters>\n}\n\n<div class=\"c-table\" [class.in-modal]=\"inModal()\" [class.inline-edit-mode]=\"inlineEditService.isInlineEditMode()\">\n <table>\n <thead>\n <tr>\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <th class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isAllSelected()\" (change)=\"masterToggle()\" />\n </th>\n }\n @for (column of columns(); track $index) {\n <th [ngClass]=\"column.align ? 'u-align-' + column.align : ''\">\n @if (isColumnSortable(column)) {\n <button class=\"c-table-order\" tabindex=\"-1\"\n [class.is-asc]=\"getColumnSortState(column) === SortDirection.ASC\"\n [class.is-desc]=\"getColumnSortState(column) === SortDirection.DESC\"\n [class.has-multiple-sorts]=\"isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null\"\n [title]=\"getSortButtonTitle(column)\"\n (click)=\"onColumnHeaderClick(column)\">\n {{ column.label | translate }}\n <!-- @if (isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null) {\n <span class=\"c-table-order__priority\">{{ getColumnSortPriority(column)! + 1 }}</span>\n } -->\n <span class=\"c-table-order__controls\">\n <span class=\"c-table-order__arrow--desc icon-arrow-up\"></span>\n <span class=\"c-table-order__arrow--asc icon-arrow-down\"></span>\n </span>\n </button>\n } @else {\n {{ column.label | translate }}\n }\n </th>\n }\n @if (showActions() && (actions().length > 0 || customActions().length > 0)) {\n <th class=\"u-align-right\">{{ 'table.actions' | translate }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of displayedData(); track row.getId()) {\n <tr [ngClass]=\"getRowClasses(row)\" \n [class.is-editing-inline]=\"isRowInEditMode(row.getId())\"\n [class.is-disabled]=\"isRowDisabled(row)\">\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <td class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isRowSelected(row)\" (change)=\"toggleRow(row)\" />\n </td>\n }\n @for (column of columns(); track $index) {\n <td [attr.data-label]=\"column.label | translate\" \n [ngClass]=\"[\n column.align ? 'u-align-' + column.align : '',\n getCellDisabledClasses(row, column)\n ]\" \n [class.is-editing]=\"isColumnEditable(column, row)\"\n [class.is-column-disabled]=\"isColumnDisabledForRow(row, column)\">\n @if (column.template) {\n <!-- Todo: Ver qu\u00E9 es esto -->\n <ng-container *ngTemplateOutlet=\"column.template; context: { $implicit: row, column: column }\"></ng-container>\n } @else if (isColumnEditable(column, row)) {\n <!-- !Solcre: Modo de edici\u00F3n en l\u00EDnea usando DynamicField -->\n <div class=\"c-table__inline-edit\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong>\n <div\n coreDynamicField\n [field]=\"getInlineEditableConfigWithState(row, column)!\"\n [value]=\"getEditingValue(row, column)\"\n [mode]=\"ModalMode.EDIT\"\n [errors]=\"getCellErrors(row, column)\"\n [rowData]=\"row\"\n (valueChange)=\"onCellValueChange(row, column, $event)\"\n (onBlurEvent)=\"onCellBlur(row, column)\"\n (onEnterEvent)=\"onCellEnter(row, column)\"\n ></div>\n </div>\n } @else {\n <div class=\"c-table__content\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong> {{ getFormattedValue(row,\n column) }}\n </div>\n }\n </td>\n }\n\n <!-- Actions-->\n\n @if (showActions() && (actions().length > 0 || customActions().length > 0 || expansionConfig()?.enabled)) {\n\n <td class=\"u-align-right\">\n <div class=\"c-table__actions\">\n <core-dropdown [rowId]=\"row.getId()\" [extraDefaultActions]=\"getVisibleDefaultActions(row, true)\"\n [extraCustomActions]=\"getVisibleCustomActions(row, true)\" [row]=\"row\"\n [triggerElementId]=\"'dropdown-trigger-' + row.getId()\"\n (actionTriggered)=\"triggerAction($event.action, $event.row)\"\n (customActionTriggered)=\"triggerCustomAction($event.action, $event.row)\" #dropdown>\n </core-dropdown>\n @for (actionConfig of getVisibleDefaultActions(row, false); track actionConfig.action) {\n @if (hasPermission(actionConfig)) {\n @if (actionConfig.action === TableAction.VIEW || actionConfig.action === TableAction.EDIT ||\n actionConfig.action === TableAction.DELETE) {\n <core-generic-button [config]=\"getActionButtonConfig(actionConfig.action, actionConfig, row)\"\n (buttonClick)=\"onButtonClick($event, actionConfig.action, row)\">\n </core-generic-button>\n }\n }\n }\n @for (customAction of getVisibleCustomActions(row, false); track customAction.label || $index) {\n @if (hasPermission(customAction)) {\n <core-generic-button [config]=\"getCustomActionButtonConfigForRow(customAction, row)\"\n (buttonClick)=\"onButtonClick($event, customAction, row)\">\n </core-generic-button>\n }\n }\n\n @if (hasExtraActionsForRow(row)) {\n <core-generic-button [config]=\"getMoreActionsButtonConfig(row.getId())\" [data]=\"row\"\n (buttonClick)=\"onMoreActionsClick($event, row.getId())\" #dropdownTrigger>\n </core-generic-button>\n }\n\n @if (expansionConfig()?.enabled) {\n <!-- \u2705 Solcre: Celda dedicada para expansi\u00F3n en su posici\u00F3n correcta -->\n <core-generic-button [config]=\"getExpandButtonConfig(row)\" (buttonClick)=\"onExpandButtonClick($event, row)\">\n </core-generic-button>\n }\n\n </div> <!-- .c-table__actions -->\n </td> <!-- td parent of .c-table__actions -->\n } <!-- @if (showActions() -->\n\n\n </tr>\n @if (expansionConfig()?.enabled && isRowExpanded(row)) {\n <!-- Todo: Ver que es esto -->\n <tr class=\"expansion-row\" [ngClass]=\"getRowClasses(row)\">\n <td [attr.colspan]=\"displayedColumns().length\" class=\"expansion-content\">\n <ng-container *ngTemplateOutlet=\"expansionConfig()!.template; context: { $implicit: row }\">\n </ng-container>\n </td>\n </tr>\n }\n } @empty {\n <tr>\n <!-- Todo: Estilo .no-data -->\n <td [attr.colspan]=\"displayedColumns().length\">\n <p class=\"c-placeholder\">{{ 'table.noData' | translate }}</p>\n </td>\n </tr>\n }\n </tbody>\n </table>\n</div> <!-- .c-table -->\n\n<!-- Todo: Todo lo que viene dsp de la tabla -->\n\n@if (!enablePagination()) {\n<!-- Todo: Ver qu\u00E9 onda esto -->\n<div #sentinel class=\"sentinel\"></div>\n}\n\n@if (enablePagination()) {\n<!-- Todo: Ver qu\u00E9 onda esto -->\n<core-generic-pagination [tableId]=\"tableId\"></core-generic-pagination>\n}\n\n<core-generic-modal [isOpen]=\"tableActionService.getIsModalOpen()\" [mode]=\"tableActionService.getModalMode()\"\n [data]=\"tableActionService.getModalData()\" [fields]=\"hasTabs() ? [] : tableActionService.getModalFieldsToShow()\"\n [tabs]=\"hasTabs() ? modalTabs() : []\" [title]=\"tableActionService.getModalTitle()\" [modelFactory]=\"modelFactory() || null\"\n (save)=\"onModalSave($event)\" (close)=\"tableActionService.closeModal()\" (modalData)=\"onModalData($event)\">\n</core-generic-modal>\n\n<core-filter-modal [isOpen]=\"isFilterModalOpen()\" [filters]=\"customFilters()\" [currentFilterValues]=\"currentFilterValues()\" (close)=\"closeFiltersPopup()\"\n (filterChange)=\"handleFilterChange($event)\" (globalFilterChange)=\"applyGlobalFilter($event)\"\n (clearFilters)=\"handleClearFilters()\">\n</core-filter-modal>", styles: [".in-modal .c-table thead th:last-child,.c-table tbody td:last-child{text-align:left}.c-table__order-btn--asc{transform:rotate(180deg)}.c-table__order-btn--desc{transform:rotate(0)}.c-table tr.is-editing-inline{background-color:#fff3cd;border-left:3px solid #ffc107}.c-table tr.is-editing-inline td{background-color:#fff3cd}.c-table tr.is-editing-inline:hover td{background-color:#ffecb5}.expansion-row .expansion-content{padding:16px;background-color:#f8f9fa;border-top:1px solid #dee2e6}.expansion-row td{border-bottom:none}\n"] }]
|
|
9737
10086
|
}], ctorParameters: () => [], propDecorators: { sentinel: [{
|
|
9738
10087
|
type: ViewChild,
|
|
9739
10088
|
args: ['sentinel', { static: false }]
|
|
@@ -11273,12 +11622,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
11273
11622
|
// Este archivo es generado automáticamente por scripts/update-version.js
|
|
11274
11623
|
// No edites manualmente este archivo
|
|
11275
11624
|
const VERSION = {
|
|
11276
|
-
full: '2.12.
|
|
11625
|
+
full: '2.12.12',
|
|
11277
11626
|
major: 2,
|
|
11278
11627
|
minor: 12,
|
|
11279
|
-
patch:
|
|
11280
|
-
timestamp: '2025-09-
|
|
11281
|
-
buildDate: '
|
|
11628
|
+
patch: 12,
|
|
11629
|
+
timestamp: '2025-09-08T12:06:21.236Z',
|
|
11630
|
+
buildDate: '8/9/2025'
|
|
11282
11631
|
};
|
|
11283
11632
|
|
|
11284
11633
|
class MainNavComponent {
|
|
@@ -13195,5 +13544,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
13195
13544
|
* Generated bundle index. Do not edit.
|
|
13196
13545
|
*/
|
|
13197
13546
|
|
|
13198
|
-
export { ActiveFiltersComponent, AlertComponent, AlertContainerComponent, AlertService, AlertType, ApiConfigurationProvider, BaseFieldComponent, ButtonContext, ButtonSize, ButtonType, CacheBustingInterceptor, CardComponent, CarouselComponent, CheckboxFieldComponent, ConfigurationModel, ConfirmationDialogComponent, ConfirmationDialogService, CoreHostDirective, CoreUiHttpLoaderFactory, CoreUiTranslateLoader, CoreUiTranslateService, DataListComponent, DataListItemComponent, DateFieldComponent, DateUtility, DatetimeFieldComponent, DialogActions, DocumentAction, DocumentDisplayMode, DropdownComponent, DropdownDirection, DropdownService, DynamicFieldDirective, FieldErrorsComponent, FieldType, FileFieldComponent, FileModel, FileTemplateModel, FileTemplateType, FileType, FileTypeModel, FileUploadService, FilterModalComponent, FilterService, FilterType, GenericButtonComponent, GenericDocumentationComponent, GenericModalComponent, GenericPaginationComponent, GenericRatingComponent, GenericSidebarComponent, GenericStepsComponent, GenericTableComponent, GenericTabsComponent, GenericTimelineComponent, GlobalApiConfigService, HeaderComponent, HeaderConfigurationService, HeaderElementType, HeaderService, HttpLoaderFactory, ImageModalComponent, ImageModalService, ImagePreviewComponent, LayoutAuth, LayoutBreakpoint, LayoutComponent, LayoutService, LayoutStateService, LayoutType, LoaderComponent, LoaderService, MainNavComponent, MainNavService, ModalMode, ModelApiService, MultiEntryFieldComponent, MultiEntryOutputFormat, NumberFieldComponent, NumberFieldConfigType, NumberFieldType, NumberRange, PERMISSION_ACTIONS_PROVIDER, PERMISSION_PROVIDER, PERMISSION_RESOURCES_PROVIDER, PaginationService, PasswordFieldComponent, PermissionEnumsService, PermissionModel, PermissionService, PermissionWrapperService, PermissionsActions, PermissionsInterceptor, PermissionsResources, ProgressBarComponent, ProgressBarSize, RatingService, RatingSize, RatingType, ResetPasswordModel, RoleModel, SelectFieldComponent, ServerSelectFieldComponent, ServerSelectService, SidebarCustomModalComponent, SidebarCustomModalService, SidebarHeight, SidebarMobileModalService, SidebarMobileType, SidebarPosition, SidebarService, SidebarState, SidebarTemplateRegistryService, SidebarVisibility, SidebarWidth, SmartFieldComponent, SortDirection, SortMode, StepSize, StepStatus, StepType, StepsService, SwitchFieldComponent, TableAction, TableActionService, TableDataService, TableSortService, TextAreaFieldComponent, TextFieldComponent, TimeFieldComponent, TimeInterval, TimelineService, TimelineStatus, TimelineType, TranslationMergeService, UsersModel, VERSION, equalToValidator, isSameDate, provideCoreUiTranslateLoader, providePermissionActions, providePermissionEnums, providePermissionResources, providePermissionService, providePermissionServiceFactory, provideTranslateLoader };
|
|
13547
|
+
export { ActiveFiltersComponent, AlertComponent, AlertContainerComponent, AlertService, AlertType, ApiConfigurationProvider, BaseFieldComponent, ButtonContext, ButtonSize, ButtonType, CacheBustingInterceptor, CardComponent, CarouselComponent, CheckboxFieldComponent, ConfigurationModel, ConfirmationDialogComponent, ConfirmationDialogService, CoreHostDirective, CoreUiHttpLoaderFactory, CoreUiTranslateLoader, CoreUiTranslateService, DataListComponent, DataListItemComponent, DateFieldComponent, DateUtility, DatetimeFieldComponent, DialogActions, DocumentAction, DocumentDisplayMode, DropdownComponent, DropdownDirection, DropdownService, DynamicFieldDirective, DynamicFieldsHelper, FieldErrorsComponent, FieldType, FileFieldComponent, FileModel, FileTemplateModel, FileTemplateType, FileType, FileTypeModel, FileUploadService, FilterModalComponent, FilterService, FilterType, GenericButtonComponent, GenericDocumentationComponent, GenericModalComponent, GenericPaginationComponent, GenericRatingComponent, GenericSidebarComponent, GenericStepsComponent, GenericTableComponent, GenericTabsComponent, GenericTimelineComponent, GlobalApiConfigService, HeaderComponent, HeaderConfigurationService, HeaderElementType, HeaderService, HttpLoaderFactory, ImageModalComponent, ImageModalService, ImagePreviewComponent, LayoutAuth, LayoutBreakpoint, LayoutComponent, LayoutService, LayoutStateService, LayoutType, LoaderComponent, LoaderService, MainNavComponent, MainNavService, ModalMode, ModelApiService, MultiEntryFieldComponent, MultiEntryOutputFormat, NumberFieldComponent, NumberFieldConfigType, NumberFieldType, NumberRange, PERMISSION_ACTIONS_PROVIDER, PERMISSION_PROVIDER, PERMISSION_RESOURCES_PROVIDER, PaginationService, PasswordFieldComponent, PermissionEnumsService, PermissionModel, PermissionService, PermissionWrapperService, PermissionsActions, PermissionsInterceptor, PermissionsResources, ProgressBarComponent, ProgressBarSize, RatingService, RatingSize, RatingType, ResetPasswordModel, RoleModel, SelectFieldComponent, ServerSelectFieldComponent, ServerSelectService, SidebarCustomModalComponent, SidebarCustomModalService, SidebarHeight, SidebarMobileModalService, SidebarMobileType, SidebarPosition, SidebarService, SidebarState, SidebarTemplateRegistryService, SidebarVisibility, SidebarWidth, SmartFieldComponent, SortDirection, SortMode, StepSize, StepStatus, StepType, StepsService, SwitchFieldComponent, TableAction, TableActionService, TableDataService, TableSortService, TextAreaFieldComponent, TextFieldComponent, TimeFieldComponent, TimeInterval, TimelineService, TimelineStatus, TimelineType, TranslationMergeService, UsersModel, VERSION, equalToValidator, isSameDate, provideCoreUiTranslateLoader, providePermissionActions, providePermissionEnums, providePermissionResources, providePermissionService, providePermissionServiceFactory, provideTranslateLoader };
|
|
13199
13548
|
//# sourceMappingURL=solcre-org-core-ui.mjs.map
|