@kalel1500/kalion-js 0.7.0-beta.2 → 0.8.0-beta.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.
@@ -72,6 +72,8 @@ const _Constants = class _Constants {
72
72
  __publicField(_Constants, "instance");
73
73
  let Constants = _Constants;
74
74
  const save$1 = "Guardar";
75
+ const edit$1 = "Editar";
76
+ const update$1 = "Actualizar";
75
77
  const cancel$1 = "Cancelar";
76
78
  const move_to$1 = "Mover a";
77
79
  const close$1 = "Cerrar";
@@ -115,6 +117,8 @@ const check_if_the_loader_was_in_a_div$1 = "Comprueba si el loader estaba en un
115
117
  const you_do_not_have_permissions_to_edit$1 = "No tienes permisos para editar";
116
118
  const es = {
117
119
  save: save$1,
120
+ edit: edit$1,
121
+ update: update$1,
118
122
  cancel: cancel$1,
119
123
  "delete": "Eliminar",
120
124
  move_to: move_to$1,
@@ -159,6 +163,8 @@ const es = {
159
163
  you_do_not_have_permissions_to_edit: you_do_not_have_permissions_to_edit$1
160
164
  };
161
165
  const save = "Save";
166
+ const edit = "Edit";
167
+ const update = "Update";
162
168
  const cancel = "Cancel";
163
169
  const move_to = "Move to";
164
170
  const close = "Close";
@@ -202,6 +208,8 @@ const check_if_the_loader_was_in_a_div = "Check if the loader was in a div. In t
202
208
  const you_do_not_have_permissions_to_edit = "You do not have permissions to edit";
203
209
  const en = {
204
210
  save,
211
+ edit,
212
+ update,
205
213
  cancel,
206
214
  "delete": "Delete",
207
215
  move_to,
@@ -2380,7 +2388,7 @@ function requireSweetalert2() {
2380
2388
  checkIfParamIsDeprecated(param);
2381
2389
  }
2382
2390
  };
2383
- function update(params) {
2391
+ function update2(params) {
2384
2392
  const container = getContainer();
2385
2393
  const popup = getPopup();
2386
2394
  const innerParams = privateProps.innerParams.get(this);
@@ -2486,7 +2494,7 @@ function requireSweetalert2() {
2486
2494
  rejectPromise,
2487
2495
  resetValidationMessage,
2488
2496
  showValidationMessage,
2489
- update
2497
+ update: update2
2490
2498
  });
2491
2499
  const handlePopupClick = (innerParams, domCache, dismissWith) => {
2492
2500
  if (innerParams.toast) {
@@ -3348,7 +3356,7 @@ function requireSweetalert2() {
3348
3356
  SweetAlert.prototype.closeModal = close2;
3349
3357
  SweetAlert.prototype.closeToast = close2;
3350
3358
  SweetAlert.prototype.rejectPromise = rejectPromise;
3351
- SweetAlert.prototype.update = update;
3359
+ SweetAlert.prototype.update = update2;
3352
3360
  SweetAlert.prototype._destroy = _destroy;
3353
3361
  Object.assign(SweetAlert, staticMethods);
3354
3362
  Object.keys(instanceMethods).forEach((key) => {
@@ -4224,7 +4232,7 @@ const _g = class _g {
4224
4232
  if (!_g.isUndefined(from)) console.log("From:", from);
4225
4233
  const finalHtml = html ? html : `<span class="restriction-message">${_g.escapeHtml(text || (error.message || "Error imprevisto (o formato error inesperado)"))}</span>`;
4226
4234
  SModal.errorModal({
4227
- icon: "warning",
4235
+ icon: "error",
4228
4236
  title,
4229
4237
  html: finalHtml,
4230
4238
  confirmButtonText: reloadOnClose ? ___("reload_page") : ___("ok"),
@@ -5384,6 +5392,17 @@ __publicField(_Ttable, "buttons", {
5384
5392
  extraAttributes: `data-action="delete" title="${title}"`
5385
5393
  });
5386
5394
  },
5395
+ btnEdit: (title, showText = false) => {
5396
+ const text = showText ? title : "";
5397
+ const icon = Component.get("icon.edit", { size: "size-4" });
5398
+ return Component.get("btn", {
5399
+ size: "2xs",
5400
+ color: "yellow",
5401
+ slot: `${icon} ${text}`,
5402
+ extraClasses: "mx-1",
5403
+ extraAttributes: `data-action="edit" title="${title}"`
5404
+ });
5405
+ },
5387
5406
  btnNew: (title, id) => {
5388
5407
  const icon = Component.get("icon.new", { size: "size-4" });
5389
5408
  return Component.get("btn", {