wave-ui 1.46.0 → 1.47.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.
@@ -1600,15 +1600,15 @@ var render$E = function() {
1600
1600
  var _c = _vm._self._c || _h;
1601
1601
  return _c("div", { staticClass: "w-confirm" }, [_c("w-menu", _vm._b({ scopedSlots: _vm._u([{ key: "activator", fn: function(ref) {
1602
1602
  var on = ref.on;
1603
- return [_c("w-button", _vm._g(_vm._b({ staticClass: "w-confirm__button" }, "w-button", _vm.buttonProps, false), on), [_vm._t("default")], 2)];
1603
+ return [_c("w-button", _vm._g(_vm._b({ staticClass: "w-confirm__button" }, "w-button", _vm.buttonProps, false), Object.assign({}, _vm.$listeners, on)), [_vm._t("default")], 2)];
1604
1604
  } }], null, true), model: { value: _vm.showPopup, callback: function($$v) {
1605
1605
  _vm.showPopup = $$v;
1606
1606
  }, expression: "showPopup" } }, "w-menu", _vm.wMenuProps, false), [_c("w-flex", { attrs: { "column": !_vm.inline, "align-center": "" } }, [_c("div", [_vm._t("question", function() {
1607
- return [_vm._v("Are you sure?")];
1608
- })], 2), _c("div", { staticClass: "w-flex justify-end", class: _vm.inline ? "ml2" : "mt2" }, [!_vm.noCancel ? _c("w-button", _vm._b({ staticClass: "mr2", attrs: { "bg-color": (_vm.cancelButton || {}).bgColor || "error" }, on: { "click": _vm.onCancel } }, "w-button", _vm.cancelButton, false), [_vm._t("cancel", function() {
1609
- return [_vm._v("Cancel")];
1610
- })], 2) : _vm._e(), _c("w-button", _vm._b({ attrs: { "bg-color": (_vm.confirmButton || {}).bgColor || "success" }, on: { "click": _vm.onConfirm } }, "w-button", _vm.confirmButton, false), [_vm._t("confirm", function() {
1611
- return [_vm._v("Confirm")];
1607
+ return [_vm._v(_vm._s(_vm.question))];
1608
+ })], 2), _c("div", { staticClass: "w-flex justify-end", class: _vm.inline ? "ml2" : "mt2" }, [_vm.cancel !== false ? _c("w-button", _vm._b({ staticClass: "mr2", attrs: { "bg-color": (_vm.cancelButton || {}).bgColor || "error" }, on: { "click": _vm.onCancel } }, "w-button", _vm.cancelButtonProps, false), [_vm._t("cancel", function() {
1609
+ return [_vm._v(_vm._s(_vm.cancelButton.label))];
1610
+ })], 2) : _vm._e(), _c("w-button", _vm._b({ attrs: { "bg-color": (_vm.confirmButton || {}).bgColor || "success" }, on: { "click": _vm.onConfirm } }, "w-button", _vm.confirmButtonProps, false), [_vm._t("confirm", function() {
1611
+ return [_vm._v(_vm._s(_vm.confirmButton.label))];
1612
1612
  })], 2)], 1)])], 1)], 1);
1613
1613
  };
1614
1614
  var staticRenderFns$E = [];
@@ -1619,9 +1619,9 @@ const __vue2_script$E = {
1619
1619
  color: { type: String },
1620
1620
  icon: { type: String },
1621
1621
  mainButton: { type: Object },
1622
- noCancel: { type: Boolean },
1623
- cancelButton: { type: [Boolean, Object] },
1624
- confirmButton: { type: Object },
1622
+ question: { type: String, default: "Are you sure?" },
1623
+ cancel: { type: [Boolean, Object, String], default: void 0 },
1624
+ confirm: { type: [Object, String] },
1625
1625
  inline: { type: Boolean },
1626
1626
  menu: { type: Object },
1627
1627
  noArrow: { type: Boolean },
@@ -1642,6 +1642,26 @@ const __vue2_script$E = {
1642
1642
  props: []
1643
1643
  }),
1644
1644
  computed: {
1645
+ cancelButton() {
1646
+ let button = { label: typeof this.cancel === "string" ? this.cancel : "Cancel" };
1647
+ if (typeof this.cancel === "object")
1648
+ button = Object.assign({}, button, this.cancel);
1649
+ return button;
1650
+ },
1651
+ cancelButtonProps() {
1652
+ const _a = this.cancelButton, { label } = _a, props = __objRest(_a, ["label"]);
1653
+ return props;
1654
+ },
1655
+ confirmButton() {
1656
+ let button = { label: typeof this.confirm === "string" ? this.confirm : "Confirm" };
1657
+ if (typeof this.confirm === "object")
1658
+ button = Object.assign({}, button, this.confirm);
1659
+ return button;
1660
+ },
1661
+ confirmButtonProps() {
1662
+ const _a = this.confirmButton, { label } = _a, props = __objRest(_a, ["label"]);
1663
+ return props;
1664
+ },
1645
1665
  wMenuProps() {
1646
1666
  return __spreadValues({
1647
1667
  top: this.top,