@nethserver/ns8-ui-lib 1.12.3 → 1.12.4

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.
@@ -7425,9 +7425,17 @@ var script$t = {
7425
7425
  type: String,
7426
7426
  default: "Abort"
7427
7427
  },
7428
+ confirmCancelText: {
7429
+ type: String,
7430
+ default: "Abort this task? This action can't be undone"
7431
+ },
7432
+ keepRunningLabel: {
7433
+ type: String,
7434
+ default: "Keep running"
7435
+ },
7428
7436
  confirmCancelLabel: {
7429
7437
  type: String,
7430
- default: "Confirm abort"
7438
+ default: "Yes, abort"
7431
7439
  },
7432
7440
  closeAriaLabel: {
7433
7441
  type: String,
@@ -7444,23 +7452,24 @@ var script$t = {
7444
7452
  data() {
7445
7453
  return {
7446
7454
  isConfirmCancelShown: false,
7447
- isCancelButtonDisabled: false
7455
+ isCancelButtonDisabled: false,
7456
+ isKeepRunningButtonDisabled: false
7448
7457
  };
7449
7458
  },
7450
7459
 
7451
7460
  methods: {
7452
7461
  cancelTask() {
7453
- if (!this.isConfirmCancelShown) {
7454
- // show confirmation
7455
- this.isConfirmCancelShown = true;
7456
- setTimeout(() => {
7457
- this.isConfirmCancelShown = false;
7458
- }, 5000);
7459
- } else {
7460
- // cancel task
7461
- this.$emit("cancelTask", this.id);
7462
- this.isCancelButtonDisabled = true;
7463
- }
7462
+ this.isConfirmCancelShown = true;
7463
+ },
7464
+
7465
+ handleKeepRunning() {
7466
+ this.isConfirmCancelShown = false;
7467
+ },
7468
+
7469
+ confirmCancelTask() {
7470
+ this.$emit("cancelTask", this.id);
7471
+ this.isCancelButtonDisabled = true;
7472
+ this.isKeepRunningButtonDisabled = true;
7464
7473
  }
7465
7474
 
7466
7475
  }
@@ -7510,22 +7519,41 @@ var __vue_render__$F = function () {
7510
7519
  staticClass: "progress-bar-spacer"
7511
7520
  }), _vm._v(" "), _vm.progress ? _c('div', {
7512
7521
  staticClass: "progress-number"
7513
- }, [_vm._v(_vm._s(_vm.progress) + " %")]) : _vm._e()], 1) : _vm._e()], 2), _vm._v(" "), _vm.isCancelShown && _vm.isProgressShown ? _c('div', {
7522
+ }, [_vm._v(_vm._s(_vm.progress) + " %")]) : _vm._e()], 1) : _vm._e()], 2), _vm._v(" "), _vm.isCancelShown && _vm.isProgressShown && !_vm.isConfirmCancelShown ? _c('div', {
7514
7523
  class: [_vm.carbonPrefix + "--toast-notification__caption", "action", "row"]
7515
7524
  }, [_c('button', {
7516
- class: [_vm.carbonPrefix + "--inline-notification__action-button", _vm.carbonPrefix + "--btn", _vm.carbonPrefix + "--btn--sm", {
7517
- 'bx--btn--ghost': !_vm.isConfirmCancelShown
7518
- }, {
7519
- 'bx--btn--danger': _vm.isConfirmCancelShown
7520
- }],
7525
+ class: [_vm.carbonPrefix + "--inline-notification__action-button", _vm.carbonPrefix + "--btn", _vm.carbonPrefix + "--btn--sm", "bx--btn--ghost"],
7521
7526
  attrs: {
7522
- "disabled": _vm.isCancelButtonDisabled,
7523
7527
  "type": "button"
7524
7528
  },
7525
7529
  on: {
7526
7530
  "click": _vm.cancelTask
7527
7531
  }
7528
- }, [_vm._v("\n " + _vm._s(_vm.isConfirmCancelShown ? _vm.confirmCancelLabel : _vm.cancelLabel) + "\n ")])]) : _vm.actionLabel ? _c('div', {
7532
+ }, [_vm._v("\n " + _vm._s(_vm.cancelLabel) + "\n ")])]) : _vm.isCancelShown && _vm.isProgressShown && _vm.isConfirmCancelShown ? _c('div', {
7533
+ staticClass: "cancel-confirmation"
7534
+ }, [_c('p', {
7535
+ staticClass: "cancel-confirmation__text"
7536
+ }, [_vm._v(_vm._s(_vm.confirmCancelText))]), _vm._v(" "), _c('div', {
7537
+ staticClass: "cancel-confirmation__buttons"
7538
+ }, [_c('button', {
7539
+ class: [_vm.carbonPrefix + "--inline-notification__action-button", _vm.carbonPrefix + "--btn", _vm.carbonPrefix + "--btn--sm", "bx--btn--ghost"],
7540
+ attrs: {
7541
+ "type": "button",
7542
+ "disabled": _vm.isKeepRunningButtonDisabled
7543
+ },
7544
+ on: {
7545
+ "click": _vm.handleKeepRunning
7546
+ }
7547
+ }, [_vm._v("\n " + _vm._s(_vm.keepRunningLabel) + "\n ")]), _vm._v(" "), _c('button', {
7548
+ class: [_vm.carbonPrefix + "--inline-notification__action-button", _vm.carbonPrefix + "--btn", _vm.carbonPrefix + "--btn--sm", "bx--btn--danger"],
7549
+ attrs: {
7550
+ "disabled": _vm.isCancelButtonDisabled,
7551
+ "type": "button"
7552
+ },
7553
+ on: {
7554
+ "click": _vm.confirmCancelTask
7555
+ }
7556
+ }, [_vm._v("\n " + _vm._s(_vm.confirmCancelLabel) + "\n ")])])]) : _vm.actionLabel ? _c('div', {
7529
7557
  class: [_vm.carbonPrefix + "--toast-notification__caption", "action", "row"]
7530
7558
  }, [_c('button', {
7531
7559
  class: [_vm.carbonPrefix + "--inline-notification__action-button", _vm.carbonPrefix + "--btn", _vm.carbonPrefix + "--btn--sm", _vm.carbonPrefix + "--btn--ghost"],
@@ -7569,11 +7597,11 @@ var __vue_staticRenderFns__$F = [];
7569
7597
 
7570
7598
  const __vue_inject_styles__$H = function (inject) {
7571
7599
  if (!inject) return;
7572
- inject("data-v-014a0a7f_0", {
7573
- source: ".notification[data-v-014a0a7f]{margin-bottom:0;margin-right:0}.action[data-v-014a0a7f]{padding-top:0;margin-bottom:0}.bx--toast-notification .bx--inline-notification__action-button[data-v-014a0a7f]{margin-left:-1rem}.bx--toast-notification .bx--inline-notification__action-button.bx--btn--danger[data-v-014a0a7f]{margin:.5rem 0 .5rem -1rem}.notification-description-and-progress[data-v-014a0a7f]{margin-top:.75rem;margin-bottom:.75rem}.fix-margin-bottom[data-v-014a0a7f]{margin-bottom:0}.progress[data-v-014a0a7f]{margin-top:.75rem}.progress-bar-spacer[data-v-014a0a7f]{height:.5rem}.cv-notifiation.bx--toast-notification.notification[data-v-014a0a7f]{width:26vw;min-width:20rem;margin-top:0}.notification-drawer .cv-notifiation.bx--toast-notification.notification[data-v-014a0a7f]{margin-top:1rem}.notification-drawer .cv-notifiation.bx--toast-notification.notification[data-v-014a0a7f]{width:100%}.notification-read[data-v-014a0a7f]{border-color:#8d8d8d;color:#c6c6c6}.notification-read .bx--toast-notification__icon[data-v-014a0a7f]{fill:currentColor}.notification-read .bx--toast-notification__subtitle[data-v-014a0a7f]{color:#c6c6c6}.notification-read .bx--toast-notification__title[data-v-014a0a7f]{font-weight:400}.cv-notifiation .timestamp[data-v-014a0a7f]{margin-bottom:.75rem;line-height:1.29;color:#fff;text-decoration:underline}.cv-notifiation .timestamp button[data-v-014a0a7f]{color:#c6c6c6}.bx--tooltip__trigger[data-v-014a0a7f]:not(.bx--btn--icon-only){font-size:inherit}.cv-notifiation .timestamp .bx--tooltip__trigger[data-v-014a0a7f]::before{border-bottom-color:#161616}div.row[data-v-014a0a7f]:last-child{margin-bottom:1.5rem}.bx--toast-notification__details[data-v-014a0a7f]{flex-grow:1}",
7600
+ inject("data-v-4769db45_0", {
7601
+ source: ".notification[data-v-4769db45]{margin-bottom:0;margin-right:0}.action[data-v-4769db45]{padding-top:0;margin-bottom:0}.cancel-confirmation[data-v-4769db45]{margin-top:1rem}.cancel-confirmation__buttons[data-v-4769db45]{margin-top:.5rem;margin-bottom:1.5rem;display:flex;gap:2rem}.bx--toast-notification .bx--inline-notification__action-button[data-v-4769db45]{margin-left:-1rem}.bx--toast-notification .bx--inline-notification__action-button.bx--btn--danger[data-v-4769db45]{margin:.5rem 0 .5rem -1rem}.notification-description-and-progress[data-v-4769db45]{margin-top:.75rem;margin-bottom:.75rem}.fix-margin-bottom[data-v-4769db45]{margin-bottom:0}.progress[data-v-4769db45]{margin-top:.75rem}.progress-bar-spacer[data-v-4769db45]{height:.5rem}.cv-notifiation.bx--toast-notification.notification[data-v-4769db45]{width:26vw;min-width:20rem;margin-top:0}.notification-drawer .cv-notifiation.bx--toast-notification.notification[data-v-4769db45]{margin-top:1rem}.notification-drawer .cv-notifiation.bx--toast-notification.notification[data-v-4769db45]{width:100%}.notification-read[data-v-4769db45]{border-color:#8d8d8d;color:#c6c6c6}.notification-read .bx--toast-notification__icon[data-v-4769db45]{fill:currentColor}.notification-read .bx--toast-notification__subtitle[data-v-4769db45]{color:#c6c6c6}.notification-read .bx--toast-notification__title[data-v-4769db45]{font-weight:400}.cv-notifiation .timestamp[data-v-4769db45]{margin-bottom:.75rem;line-height:1.29;color:#fff;text-decoration:underline}.cv-notifiation .timestamp button[data-v-4769db45]{color:#c6c6c6}.bx--tooltip__trigger[data-v-4769db45]:not(.bx--btn--icon-only){font-size:inherit}.cv-notifiation .timestamp .bx--tooltip__trigger[data-v-4769db45]::before{border-bottom-color:#161616}div.row[data-v-4769db45]:last-child{margin-bottom:1.5rem}.bx--toast-notification__details[data-v-4769db45]{flex-grow:1}",
7574
7602
  map: undefined,
7575
7603
  media: undefined
7576
- }), inject("data-v-014a0a7f_1", {
7604
+ }), inject("data-v-4769db45_1", {
7577
7605
  source: ".cv-notifiation .timestamp button span{background-color:#161616!important;border-left:1px solid #393939;border-right:1px solid #393939;border-bottom:1px solid #393939}",
7578
7606
  map: undefined,
7579
7607
  media: undefined
@@ -7582,7 +7610,7 @@ const __vue_inject_styles__$H = function (inject) {
7582
7610
  /* scoped */
7583
7611
 
7584
7612
 
7585
- const __vue_scope_id__$H = "data-v-014a0a7f";
7613
+ const __vue_scope_id__$H = "data-v-4769db45";
7586
7614
  /* module identifier */
7587
7615
 
7588
7616
  const __vue_module_identifier__$H = undefined;