eco-vue-js 0.27.1 → 0.27.2
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/dist/components/Checkbox/WCheckboxGroup.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/WCheckboxGroup.vue_vue_type_script_setup_true_lang.js +6 -1
- package/dist/components/Checkbox/WCheckboxGroupMultiple.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/WCheckboxGroupMultiple.vue_vue_type_script_setup_true_lang.js +6 -1
- package/dist/components/Dropdown/WDropdown.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/WDropdown.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/List/components/ListFilterChip.vue.d.ts.map +1 -1
- package/dist/components/List/components/ListFilterChip.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/Notify/WNotifyCenter.vue.d.ts.map +1 -1
- package/dist/components/Notify/WNotifyCenter.vue_vue_type_script_setup_true_lang.js +42 -22
- package/dist/components/Notify/WNotifyCenterButton.vue.d.ts.map +1 -1
- package/dist/components/Notify/WNotifyCenterButton.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/components/Notify/models/notifyCenter.d.ts +3 -0
- package/dist/components/Notify/models/notifyCenter.d.ts.map +1 -1
- package/dist/components/Notify/models/notifyCenter.js +9 -1
- package/dist/components/Notify/types.d.ts +6 -1
- package/dist/components/Notify/types.d.ts.map +1 -1
- package/docs/components/list.md +1 -1
- package/docs/components/notify.md +7 -3
- package/docs/llms.txt +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WCheckboxGroup.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/WCheckboxGroup.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WCheckboxGroup.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/WCheckboxGroup.vue"],"names":[],"mappings":"AAyEA;AA6HA,OAAO,K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AAC,OAAO,WAAW,CAAC,CAAC,CAAA;CAAI,CAAC;wBACpE,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -72,6 +72,7 @@ var WCheckboxGroup_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
72
72
|
}) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.list, (item, index) => {
|
|
73
73
|
return openBlock(), createBlock(WCheckbox_default, mergeProps({ key: index }, { ref_for: true }, {
|
|
74
74
|
...props,
|
|
75
|
+
noMargin: __props.noMargin || __props.embedded,
|
|
75
76
|
modelValue: getValue(item) === __props.modelValue,
|
|
76
77
|
title: __props.titleMap?.[getValue(item).toString()],
|
|
77
78
|
tooltipText: __props.tooltipTextMap?.[getValue(item).toString()],
|
|
@@ -79,7 +80,11 @@ var WCheckboxGroup_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
79
80
|
loading: __props.loading && getValue(item) === loadingItem.value,
|
|
80
81
|
disabled: __props.disabled || __props.loading && getValue(item) !== loadingItem.value
|
|
81
82
|
}, {
|
|
82
|
-
class: [
|
|
83
|
+
class: [
|
|
84
|
+
{ "py-1": __props.embedded && !__props.noMargin },
|
|
85
|
+
__props.classMap?.[getValue(item).toString()],
|
|
86
|
+
__props.optionClass
|
|
87
|
+
],
|
|
83
88
|
"onUpdate:modelValue": ($event) => updateModelValue(getValue(item))
|
|
84
89
|
}), createSlots({ _: 2 }, [_ctx.$slots.option || __props.optionComponent ? {
|
|
85
90
|
name: "default",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WCheckboxGroupMultiple.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/WCheckboxGroupMultiple.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WCheckboxGroupMultiple.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/WCheckboxGroupMultiple.vue"],"names":[],"mappings":"AA2EA;AA6HA,OAAO,KAAK,EAAC,0BAA0B,EAAwB,MAAM,SAAS,CAAA;AAQ9E,QAAA,MAAM,YAAY,GAAK,KAAK,SAAS,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,SAAS;IAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAA;CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,GAAG,SAAS,EAC1L,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,gBAAgB,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAClE;WAsNO,OAAO,KAAK,EAAE,WAAW,GAAG,mBAAmB,CAAC;;;KAAmC,CAAC,GAAG,CAAC,OAAO,UAAU,SAAS;QAAE,oBAAoB,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,CAAC,GAAG,EAAE,CAAC;YAC5J,CAAC,OAAO,EAAE,EAAE,KAAK,IAAI;WACtB,GAAG;;QAzMT,iCAAiC;gBACzB,MAAM,IAAI;QAClB,iDAAiD;mBACtC,MAAM,IAAI;QACrB,4EAA4E;iBACnE,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,WAAW,SAAS,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;QACrG,2CAA2C;gBACnC,MAAM,IAAI;;;YAdd,QAAQ,SAAS,KAAK,GAAG,IAAI;YAE7B,UAAU,SAAS,KAAK,GAAG,IAAI;;EAkNjC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAA;CAAI,CAAC;wBACpE,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
|
package/dist/components/Checkbox/WCheckboxGroupMultiple.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -71,6 +71,7 @@ var WCheckboxGroupMultiple_vue_vue_type_script_setup_true_lang_default = /*@__PU
|
|
|
71
71
|
}) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.list, (item, index) => {
|
|
72
72
|
return openBlock(), createBlock(WCheckbox_default, mergeProps({ key: index }, { ref_for: true }, {
|
|
73
73
|
...props,
|
|
74
|
+
noMargin: __props.noMargin || __props.embedded,
|
|
74
75
|
modelValue: __props.modelValue?.includes(getValue(item)) ?? false,
|
|
75
76
|
title: __props.titleMap?.[getValue(item).toString()],
|
|
76
77
|
tooltipText: __props.tooltipTextMap?.[getValue(item).toString()],
|
|
@@ -78,7 +79,11 @@ var WCheckboxGroupMultiple_vue_vue_type_script_setup_true_lang_default = /*@__PU
|
|
|
78
79
|
loading: __props.loading && getValue(item) === loadingItem.value,
|
|
79
80
|
disabled: __props.disabled || __props.loading && getValue(item) !== loadingItem.value
|
|
80
81
|
}, {
|
|
81
|
-
class: [
|
|
82
|
+
class: [
|
|
83
|
+
{ "py-1": __props.embedded && !__props.noMargin },
|
|
84
|
+
__props.classMap?.[getValue(item).toString()],
|
|
85
|
+
__props.optionClass
|
|
86
|
+
],
|
|
82
87
|
"onUpdate:modelValue": ($event) => emitUpdateModelValue(getValue(item))
|
|
83
88
|
}), createSlots({ _: 2 }, [_ctx.$slots.option || __props.optionComponent ? {
|
|
84
89
|
name: "default",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/WDropdown.vue"],"names":[],"mappings":"AAkCA;
|
|
1
|
+
{"version":3,"file":"WDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/WDropdown.vue"],"names":[],"mappings":"AAkCA;AA2KA,OAAO,KAAK,EAAC,wBAAwB,EAAE,aAAa,EAAC,MAAM,SAAS,CAAA;AAEpE,OAAO,EAAC,KAAK,KAAK,EAAqF,MAAM,KAAK,CAAA;AAwHlH,KAAK,WAAW,GAAG;IACjB,uMAAuM;IACvM,OAAO,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,KAAK,EAAE,CAAA;CACtD,CAAC;AAgFF,QAAA,MAAM,UAAU;IA5Ed,0CAA0C;;;;;;;kFAgF1C,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -30,6 +30,12 @@ var WDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
30
30
|
const y = ref(0);
|
|
31
31
|
const atBottom = computed(() => y.value > window.innerHeight / 2);
|
|
32
32
|
const order = computed(() => horizontalGetterOrderMap[props.horizontalAlign]);
|
|
33
|
+
const getX = (getter, newRect) => {
|
|
34
|
+
const defaultX = getter.x(newRect);
|
|
35
|
+
if (getter.origin !== OriginX.CENTER || !parentRect.value) return defaultX;
|
|
36
|
+
const keptX = newRect.left + x.value - parentRect.value.left;
|
|
37
|
+
return keptX > newRect.left && keptX < newRect.right ? keptX : defaultX;
|
|
38
|
+
};
|
|
33
39
|
const setParentRect = (updateAlign = false) => {
|
|
34
40
|
if (parentRect.value && (props.freeze || !isAnchorConnected(props.parentElement))) return;
|
|
35
41
|
const newRect = props.parentElement.getBoundingClientRect();
|
|
@@ -37,7 +43,7 @@ var WDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
37
43
|
const isTopChanged = newRect.top !== parentRect.value?.top || newRect.bottom !== parentRect.value?.bottom;
|
|
38
44
|
if (!horizontalGetter.value || isLeftChanged && (props.updateAlign || updateAlign)) horizontalGetter.value = searchStyleGetter(order.value, newRect);
|
|
39
45
|
if (!verticalGetter.value || isTopChanged && (props.updateAlign || updateAlign)) verticalGetter.value = props.top && horizontalGetter.value.verticalGetterOrder[1] ? horizontalGetter.value.verticalGetterOrder[1] : props.bottom ? horizontalGetter.value.verticalGetterOrder[0] : searchStyleGetter(horizontalGetter.value.verticalGetterOrder, newRect);
|
|
40
|
-
if (isLeftChanged) x.value = horizontalGetter.value
|
|
46
|
+
if (isLeftChanged) x.value = getX(horizontalGetter.value, newRect);
|
|
41
47
|
if (isTopChanged) y.value = verticalGetter.value.y(newRect);
|
|
42
48
|
if (isLeftChanged || isTopChanged) parentRect.value = newRect;
|
|
43
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListFilterChip.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/components/ListFilterChip.vue"],"names":[],"mappings":"AAkEA;AA0HA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,IAAI,EAAE,YAAY,GAAG,SAAS,CAAA;IAC9B,0DAA0D;IAC1D,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAC5B,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,OAAO,CAAA;IACf,wDAAwD;IACxD,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mDAAmD;IACnD,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"ListFilterChip.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/components/ListFilterChip.vue"],"names":[],"mappings":"AAkEA;AA0HA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,IAAI,EAAE,YAAY,GAAG,SAAS,CAAA;IAC9B,0DAA0D;IAC1D,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAC5B,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,OAAO,CAAA;IACf,wDAAwD;IACxD,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mDAAmD;IACnD,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAiNF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
package/dist/components/List/components/ListFilterChip.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -52,10 +52,10 @@ var ListFilterChip_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
52
52
|
key: 0,
|
|
53
53
|
class: normalizeClass(["square-[1.25em] shrink-0", hasValue.value ? "text-tone" : "text-description"])
|
|
54
54
|
}, null, 8, ["class"])) : createCommentVNode("", true),
|
|
55
|
-
createElementVNode("span", { class: normalizeClass(["truncate", valuesShown.value.length
|
|
55
|
+
createElementVNode("span", { class: normalizeClass(["text-accent truncate", { "sr-only": valuesShown.value.length }]) }, toDisplayString(__props.title) + toDisplayString(valuesShown.value.length ? ":" : ""), 3),
|
|
56
56
|
valuesShown.value.length ? (openBlock(), createElementBlock("span", {
|
|
57
57
|
key: 1,
|
|
58
|
-
title: valueList.value.join(", "),
|
|
58
|
+
title: [__props.title, valueList.value.join(", ")].filter(Boolean).join(": "),
|
|
59
59
|
class: "text-tone shrink-100 truncate font-semibold"
|
|
60
60
|
}, toDisplayString(valuesShown.value.join(", ")), 9, _hoisted_2)) : createCommentVNode("", true),
|
|
61
61
|
badge.value ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(badge.value), 1)) : createCommentVNode("", true),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WNotifyCenter.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Notify/WNotifyCenter.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WNotifyCenter.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Notify/WNotifyCenter.vue"],"names":[],"mappings":"AAkIA;AAwLA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;AA2B9C,KAAK,WAAW,GAAG;IACjB,wHAAwH;IACxH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB,CAAC;AA4WF,QAAA,MAAM,UAAU,8SAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -3,8 +3,8 @@ import OverlayRegionPart_default from "../Modal/components/OverlayRegionPart.vue
|
|
|
3
3
|
import { useOverlayFrame, useOverlayFrameOptions } from "../../utils/Overlay.js";
|
|
4
4
|
import { SemanticType } from "../../utils/SemanticType.js";
|
|
5
5
|
import NotifyCard_default from "./components/NotifyCard.vue.js";
|
|
6
|
-
import { clearNotifyHistory, getNotifyItemKey, notifyCenterActionEntries, notifyCenterActionItems, notifyCenterActivityEntries, notifyCenterActivityItems, notifyCenterItems, removeNotifyEntry } from "./models/notifyCenter.js";
|
|
7
|
-
import { Fragment, TransitionGroup, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, renderSlot, toDisplayString, unref, withCtx, withModifiers } from "vue";
|
|
6
|
+
import { clearNotifyHistory, dismissNotifyActions, getNotifyItemKey, notifyCenterActionEntries, notifyCenterActionItems, notifyCenterActionRemovableItems, notifyCenterActivityEntries, notifyCenterActivityItems, notifyCenterItems, removeNotifyEntry } from "./models/notifyCenter.js";
|
|
7
|
+
import { Fragment, TransitionGroup, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, renderList, renderSlot, toDisplayString, unref, withCtx, withModifiers } from "vue";
|
|
8
8
|
// src/components/Notify/WNotifyCenter.vue?vue&type=script&setup=true&lang.ts
|
|
9
9
|
var _hoisted_1 = ["aria-label"];
|
|
10
10
|
var _hoisted_2 = { class: "text-accent font-semibold h-8 flex items-center" };
|
|
@@ -14,26 +14,35 @@ var _hoisted_3 = {
|
|
|
14
14
|
};
|
|
15
15
|
var _hoisted_4 = {
|
|
16
16
|
key: 0,
|
|
17
|
-
class: "
|
|
17
|
+
class: "flex min-h-9 items-center justify-between gap-4 py-1"
|
|
18
18
|
};
|
|
19
|
-
var _hoisted_5 = { class: "
|
|
20
|
-
var _hoisted_6 = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
24
|
-
var _hoisted_7 = { class: "min-h-0" };
|
|
19
|
+
var _hoisted_5 = { class: "tone-negative text-tone text-xs font-semibold uppercase" };
|
|
20
|
+
var _hoisted_6 = { class: "min-h-0" };
|
|
21
|
+
var _hoisted_7 = { class: "text-description text-xs font-semibold uppercase" };
|
|
22
|
+
var _hoisted_8 = { class: "min-h-0" };
|
|
25
23
|
var WNotifyCenter_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
26
24
|
__name: "WNotifyCenter",
|
|
27
25
|
props: {
|
|
26
|
+
onDismissActions: { type: Function },
|
|
28
27
|
title: {},
|
|
29
28
|
clearText: {},
|
|
29
|
+
dismissActionsText: {},
|
|
30
30
|
emptyText: {},
|
|
31
31
|
actionText: {},
|
|
32
32
|
activityText: {}
|
|
33
33
|
},
|
|
34
34
|
setup(__props) {
|
|
35
|
+
const props = __props;
|
|
35
36
|
const frame = useOverlayFrame();
|
|
36
37
|
useOverlayFrameOptions(() => ({ padded: true }));
|
|
38
|
+
const dismissingActions = ref(false);
|
|
39
|
+
const dismissActions = () => {
|
|
40
|
+
if (!props.onDismissActions || dismissingActions.value) return;
|
|
41
|
+
dismissingActions.value = true;
|
|
42
|
+
dismissNotifyActions(props.onDismissActions).catch(() => void 0).finally(() => {
|
|
43
|
+
dismissingActions.value = false;
|
|
44
|
+
});
|
|
45
|
+
};
|
|
37
46
|
return (_ctx, _cache) => {
|
|
38
47
|
return openBlock(), createElementBlock("div", {
|
|
39
48
|
class: normalizeClass([{
|
|
@@ -45,22 +54,23 @@ var WNotifyCenter_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
45
54
|
"aria-label": __props.title ?? "Notifications"
|
|
46
55
|
}, [
|
|
47
56
|
createVNode(OverlayRegionPart_default, { region: "header" }, {
|
|
48
|
-
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(["flex items-center justify-between gap-4", { "border-line-subtle border-b border-solid px-4 py-3": unref(frame) === null }]) }, [createElementVNode("div", _hoisted_2, toDisplayString(__props.title ?? "Notifications"), 1),
|
|
49
|
-
key: 0,
|
|
50
|
-
"semantic-type": unref(SemanticType).SECONDARY,
|
|
51
|
-
class: "w-button-h-8 text-xs",
|
|
52
|
-
onClick: withModifiers(unref(clearNotifyHistory), ["stop"])
|
|
53
|
-
}, {
|
|
54
|
-
default: withCtx(() => [createTextVNode(toDisplayString(__props.clearText ?? "Clear"), 1)]),
|
|
55
|
-
_: 1
|
|
56
|
-
}, 8, ["semantic-type", "onClick"])) : createCommentVNode("", true)], 2)]),
|
|
57
|
+
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(["flex items-center justify-between gap-4", { "border-line-subtle border-b border-solid px-4 py-3": unref(frame) === null }]) }, [createElementVNode("div", _hoisted_2, toDisplayString(__props.title ?? "Notifications"), 1)], 2)]),
|
|
57
58
|
_: 1
|
|
58
59
|
}),
|
|
59
60
|
!unref(notifyCenterItems).length ? (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(__props.emptyText ?? "No notifications yet"), 1)) : (openBlock(), createElementBlock("div", {
|
|
60
61
|
key: 1,
|
|
61
62
|
class: normalizeClass(["grid content-start", unref(frame) === null ? "overflow-y-auto overscroll-contain px-4 py-3" : "pt-1"])
|
|
62
63
|
}, [
|
|
63
|
-
unref(notifyCenterActionItems).length ? (openBlock(), createElementBlock("div", _hoisted_4, toDisplayString(__props.actionText ?? "Action required"), 1))
|
|
64
|
+
unref(notifyCenterActionItems).length ? (openBlock(), createElementBlock("div", _hoisted_4, [createElementVNode("div", _hoisted_5, toDisplayString(__props.actionText ?? "Action required"), 1), __props.onDismissActions && unref(notifyCenterActionRemovableItems).length ? (openBlock(), createBlock(WButton_default, {
|
|
65
|
+
key: 0,
|
|
66
|
+
"semantic-type": unref(SemanticType).SECONDARY,
|
|
67
|
+
loading: dismissingActions.value,
|
|
68
|
+
class: "w-button-h-7 text-xs",
|
|
69
|
+
onClick: withModifiers(dismissActions, ["stop"])
|
|
70
|
+
}, {
|
|
71
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.dismissActionsText ?? "Dismiss all"), 1)]),
|
|
72
|
+
_: 1
|
|
73
|
+
}, 8, ["semantic-type", "loading"])) : createCommentVNode("", true)])) : createCommentVNode("", true),
|
|
64
74
|
createVNode(TransitionGroup, {
|
|
65
75
|
"enter-from-class": "opacity-0 grid-rows-[0fr]",
|
|
66
76
|
"enter-to-class": "opacity-1 grid-rows-[1fr]",
|
|
@@ -71,7 +81,7 @@ var WNotifyCenter_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
71
81
|
return openBlock(), createElementBlock("div", {
|
|
72
82
|
key: unref(getNotifyItemKey)(item),
|
|
73
83
|
class: "grid transition-[transform,grid-template-rows] duration-300"
|
|
74
|
-
}, [createElementVNode("div",
|
|
84
|
+
}, [createElementVNode("div", _hoisted_6, [createVNode(NotifyCard_default, {
|
|
75
85
|
item,
|
|
76
86
|
history: "",
|
|
77
87
|
class: "my-1",
|
|
@@ -80,7 +90,17 @@ var WNotifyCenter_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
80
90
|
}), 128))]),
|
|
81
91
|
_: 1
|
|
82
92
|
}),
|
|
83
|
-
unref(notifyCenterActivityItems).length
|
|
93
|
+
unref(notifyCenterActivityItems).length ? (openBlock(), createElementBlock("div", {
|
|
94
|
+
key: 1,
|
|
95
|
+
class: normalizeClass(["flex min-h-9 items-center justify-between gap-4 py-1", { "mt-1": unref(notifyCenterActionItems).length }])
|
|
96
|
+
}, [createElementVNode("div", _hoisted_7, toDisplayString(__props.activityText ?? "Activity"), 1), createVNode(WButton_default, {
|
|
97
|
+
"semantic-type": unref(SemanticType).SECONDARY,
|
|
98
|
+
class: "w-button-h-7 text-xs",
|
|
99
|
+
onClick: withModifiers(unref(clearNotifyHistory), ["stop"])
|
|
100
|
+
}, {
|
|
101
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.clearText ?? "Clear"), 1)]),
|
|
102
|
+
_: 1
|
|
103
|
+
}, 8, ["semantic-type", "onClick"])], 2)) : createCommentVNode("", true),
|
|
84
104
|
createVNode(TransitionGroup, {
|
|
85
105
|
"enter-from-class": "opacity-0 grid-rows-[0fr]",
|
|
86
106
|
"enter-to-class": "opacity-1 grid-rows-[1fr]",
|
|
@@ -91,7 +111,7 @@ var WNotifyCenter_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
91
111
|
return openBlock(), createElementBlock("div", {
|
|
92
112
|
key: unref(getNotifyItemKey)(item),
|
|
93
113
|
class: "grid transition-[transform,grid-template-rows] duration-300"
|
|
94
|
-
}, [createElementVNode("div",
|
|
114
|
+
}, [createElementVNode("div", _hoisted_8, [createVNode(NotifyCard_default, {
|
|
95
115
|
item,
|
|
96
116
|
history: "",
|
|
97
117
|
class: "my-1",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WNotifyCenterButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Notify/WNotifyCenterButton.vue"],"names":[],"mappings":"AAYA;
|
|
1
|
+
{"version":3,"file":"WNotifyCenterButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Notify/WNotifyCenterButton.vue"],"names":[],"mappings":"AAYA;AA4DA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAC9C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAA;AAE5D,OAAO,EAAC,KAAK,KAAK,EAAiB,MAAM,KAAK,CAAA;AAS9C,UAAU,KAAM,SAAQ,iBAAiB;IACvC,2FAA2F;IAC3F,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8CAA8C;IAC9C,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,2QAA2Q;IAC3Q,eAAe,CAAC,EAAE,eAAe,CAAA;CAClC;AAKD,KAAK,WAAW,GAAG;IACjB,sFAAsF;IACtF,MAAM,CAAC,EAAE,MAAM,KAAK,EAAE,CAAA;CACvB,CAAC;AAiFF,QAAA,MAAM,UAAU,sRAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -10,7 +10,9 @@ var WNotifyCenterButton_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
|
|
|
10
10
|
title: {},
|
|
11
11
|
icon: {},
|
|
12
12
|
horizontalAlign: {},
|
|
13
|
+
onDismissActions: { type: Function },
|
|
13
14
|
clearText: {},
|
|
15
|
+
dismissActionsText: {},
|
|
14
16
|
emptyText: {},
|
|
15
17
|
actionText: {},
|
|
16
18
|
activityText: {}
|
|
@@ -23,6 +25,8 @@ var WNotifyCenterButton_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
|
|
|
23
25
|
props: () => ({
|
|
24
26
|
title: props.title,
|
|
25
27
|
clearText: props.clearText,
|
|
28
|
+
dismissActionsText: props.dismissActionsText,
|
|
29
|
+
onDismissActions: props.onDismissActions,
|
|
26
30
|
emptyText: props.emptyText,
|
|
27
31
|
actionText: props.actionText,
|
|
28
32
|
activityText: props.activityText
|
|
@@ -9,6 +9,7 @@ export declare const isNotifyCenterOpen: Ref<boolean, boolean>;
|
|
|
9
9
|
export declare const notifyCenterItems: ComputedRef<NotifyItem[]>;
|
|
10
10
|
export declare const isNotifyPending: (item: NotifyItem) => boolean;
|
|
11
11
|
export declare const notifyCenterActionItems: ComputedRef<NotifyItem[]>;
|
|
12
|
+
export declare const notifyCenterActionRemovableItems: ComputedRef<NotifyItem[]>;
|
|
12
13
|
export declare const notifyCenterActivityItems: ComputedRef<NotifyItem[]>;
|
|
13
14
|
export declare const getNotifyItemKey: (item: NotifyItem) => string;
|
|
14
15
|
export declare const notifyCenterActionEntries: ComputedRef<NotifyItem[]>;
|
|
@@ -30,6 +31,8 @@ export declare const removeNotify: (id: number) => void;
|
|
|
30
31
|
export declare const removeNotifyEntry: (entry: NotifyItem) => void;
|
|
31
32
|
/** Clears the history, keeping pending notifications, those that need action and those on screen. */
|
|
32
33
|
export declare const clearNotifyHistory: () => void;
|
|
34
|
+
/** Hands the notifications that need action to `onDismiss` — such as to dismiss them on the server in one request — and removes them once it resolves, without calling their `onRemove`. Pending ones stay. */
|
|
35
|
+
export declare const dismissNotifyActions: (onDismiss: (items: NotifyItem[]) => unknown) => Promise<void>;
|
|
33
36
|
/** Remembers how to close the open notify center, for `closeNotifyCenter`. */
|
|
34
37
|
export declare const setNotifyCenterClose: (value: (() => void) | null) => void;
|
|
35
38
|
/** Closes the notify center, if it is open — such as from a link in its footer. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifyCenter.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notify/models/notifyCenter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAe,UAAU,EAAE,WAAW,EAAC,MAAM,SAAS,CAAA;AAE/E,OAAO,EAAC,KAAK,WAAW,EAAE,KAAK,GAAG,EAAgC,MAAM,KAAK,CAAA;AAO7E,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EAAgB,UAAU,EAAC,MAAM,cAAc,CAAA;AAEtD,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,UAAU,EAAE,YAAY,CAKtE,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,UAAU,EAAE,YAAY,CAK9D,CAAA;AAgBD,gEAAgE;AAChE,eAAO,MAAM,kBAAkB,uBAAa,CAAA;AAE5C,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,UAAU,EAAE,CAA+B,CAAA;AAIvF,eAAO,MAAM,eAAe,GAAI,MAAM,UAAU,YAAqC,CAAA;AAKrF,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,UAAU,EAAE,CAAwD,CAAA;AAEtH,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,UAA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IAItC,CAAA;AAqDD,uHAAuH;AACvH,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,KAAG,IAWhD,CAAA;AAuDD,iGAAiG;AACjG,eAAO,MAAM,SAAS,GAAI,QAAQ,YAAY,KAAG,MAAM,GAAG,SA2BzD,CAAA;AAED,0FAA0F;AAC1F,eAAO,MAAM,YAAY,GAAI,IAAI,MAAM,EAAE,OAAO,WAAW,KAAG,IAY7D,CAAA;AAUD,6DAA6D;AAC7D,eAAO,MAAM,aAAa,GAAI,IAAI,MAAM,KAAG,IAI1C,CAAA;AAED,gGAAgG;AAChG,eAAO,MAAM,YAAY,GAAI,IAAI,MAAM,KAAG,IAQzC,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,OAAO,UAAU,KAAG,IAWrD,CAAA;AAED,qGAAqG;AACrG,eAAO,MAAM,kBAAkB,QAAO,IAErC,CAAA;AAED,+MAA+M;AAC/M,eAAO,MAAM,oBAAoB,GAAU,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,OAAO,KAAG,OAAO,CAAC,IAAI,CAQpG,CAAA;AAID,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,GAAI,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,KAAG,IAEjE,CAAA;AAED,mFAAmF;AACnF,eAAO,MAAM,iBAAiB,QAAO,IAEpC,CAAA"}
|
|
@@ -39,6 +39,7 @@ var isNotifyPending = (item) => item.type === NotifyType.PENDING;
|
|
|
39
39
|
/** Stays on screen until the user closes it or, for a pending one, until it finishes. */
|
|
40
40
|
var isToastPinned = (item) => isActionRequired(item) || isNotifyPending(item);
|
|
41
41
|
var notifyCenterActionItems = computed(() => items.value.filter(isActionRequired));
|
|
42
|
+
var notifyCenterActionRemovableItems = computed(() => notifyCenterActionItems.value.filter((item) => !isNotifyPending(item)));
|
|
42
43
|
var notifyCenterActivityItems = computed(() => items.value.filter((item) => !isActionRequired(item)));
|
|
43
44
|
var getNotifyItemKey = (item) => item.items ? `group:${item.key}` : `item:${item.id}`;
|
|
44
45
|
var toGroupItem = (group, members) => {
|
|
@@ -228,6 +229,13 @@ var removeNotifyEntry = (entry) => {
|
|
|
228
229
|
var clearNotifyHistory = () => {
|
|
229
230
|
items.value = items.value.filter((item) => isNotifyPending(item) || isActionRequired(item) || toastIds.value.includes(item.id));
|
|
230
231
|
};
|
|
232
|
+
/** Hands the notifications that need action to `onDismiss` — such as to dismiss them on the server in one request — and removes them once it resolves, without calling their `onRemove`. Pending ones stay. */
|
|
233
|
+
var dismissNotifyActions = async (onDismiss) => {
|
|
234
|
+
const removable = notifyCenterActionRemovableItems.value;
|
|
235
|
+
if (!removable.length) return;
|
|
236
|
+
await onDismiss(removable);
|
|
237
|
+
removable.forEach(discardItem);
|
|
238
|
+
};
|
|
231
239
|
var closeCenter = null;
|
|
232
240
|
/** Remembers how to close the open notify center, for `closeNotifyCenter`. */
|
|
233
241
|
var setNotifyCenterClose = (value) => {
|
|
@@ -237,4 +245,4 @@ var setNotifyCenterClose = (value) => {
|
|
|
237
245
|
var closeNotifyCenter = () => {
|
|
238
246
|
closeCenter?.();
|
|
239
247
|
};
|
|
240
|
-
export { addNotify, clearNotifyHistory, closeNotifyCenter, discardNotify, getNotifyItemKey, hideToast, isNotifyCenterOpen, isNotifyPending, notifyCenterActionCount, notifyCenterActionEntries, notifyCenterActionItems, notifyCenterActivityEntries, notifyCenterActivityItems, notifyCenterItems, notifyCenterPendingCount, notifyCenterToastEntries, notifyTypeIconMap, notifyTypeSemanticTypeMap, removeNotify, removeNotifyEntry, setNotifyCenterClose, setToastsPaused, updateNotify };
|
|
248
|
+
export { addNotify, clearNotifyHistory, closeNotifyCenter, discardNotify, dismissNotifyActions, getNotifyItemKey, hideToast, isNotifyCenterOpen, isNotifyPending, notifyCenterActionCount, notifyCenterActionEntries, notifyCenterActionItems, notifyCenterActionRemovableItems, notifyCenterActivityEntries, notifyCenterActivityItems, notifyCenterItems, notifyCenterPendingCount, notifyCenterToastEntries, notifyTypeIconMap, notifyTypeSemanticTypeMap, removeNotify, removeNotifyEntry, setNotifyCenterClose, setToastsPaused, updateNotify };
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
import { NotifyItem } from './models/types';
|
|
1
2
|
export type NotifyPosition = 'top-right' | 'top-center' | 'bottom-right' | 'bottom-center';
|
|
2
3
|
export interface NotifyProps {
|
|
3
4
|
/** Corner or edge of the screen the toasts show in. On top they sit under the header (`--header-height`); new toasts stack away from the edge. On phones they always show at the top edge, over the header or a modal's title, clear of the buttons at the bottom and the fields under the header. */
|
|
4
5
|
position?: NotifyPosition;
|
|
5
6
|
}
|
|
6
7
|
export interface NotifyCenterProps {
|
|
8
|
+
/** Shows a button beside the heading of the notifications that need action that hands them all to this function — such as to dismiss them on the server in one request — and removes them once it resolves, without calling their `onRemove`. A rejection keeps them. */
|
|
9
|
+
onDismissActions?: (items: NotifyItem[]) => unknown;
|
|
7
10
|
/** Heading of the notify center. Defaults to `Notifications`. */
|
|
8
11
|
title?: string;
|
|
9
|
-
/** Text of the button that clears
|
|
12
|
+
/** Text of the button beside the activity heading that clears it. Defaults to `Clear`. */
|
|
10
13
|
clearText?: string;
|
|
14
|
+
/** Text of the button that dismisses the notifications that need action, shown with `onDismissActions`. Defaults to `Dismiss all`. */
|
|
15
|
+
dismissActionsText?: string;
|
|
11
16
|
/** Shown when there are no notifications. Defaults to `No notifications yet`. */
|
|
12
17
|
emptyText?: string;
|
|
13
18
|
/** Heading of the notifications that need action (`NotifyChannel.ACTION`). Defaults to `Action required`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Notify/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,YAAY,GAAG,cAAc,GAAG,eAAe,CAAA;AAE1F,MAAM,WAAW,WAAW;IAC1B,sSAAsS;IACtS,QAAQ,CAAC,EAAE,cAAc,CAAA;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Notify/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,YAAY,GAAG,cAAc,GAAG,eAAe,CAAA;AAE1F,MAAM,WAAW,WAAW;IAC1B,sSAAsS;IACtS,QAAQ,CAAC,EAAE,cAAc,CAAA;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,yQAAyQ;IACzQ,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,OAAO,CAAA;IACnD,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sIAAsI;IACtI,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6GAA6G;IAC7G,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,yGAAyG;IACzG,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB"}
|
package/docs/components/list.md
CHANGED
|
@@ -67,7 +67,7 @@ In place, the filters are chips in a row: the set ones are shown, and a button a
|
|
|
67
67
|
|
|
68
68
|
Put the `WListFilter` in WList's `filter` slot to show it at the start of the selection bar, on one line with the list actions and the list settings. Chips that do not fit go into a "more" chip that opens them as a list, and the list actions, which move to the end of the bar, fold into More before any chip does. While rows are selected, the selection with its bulk actions replaces the filters, so the bar keeps its height. On phones the filters take a row of their own above the actions, and the search narrows for them. `--w-list-toolbar-height` (`w-list-toolbar-h-*`) sets the height of the bar's inputs, chips and actions, by default the inherited input height.
|
|
69
69
|
|
|
70
|
-
Each chip
|
|
70
|
+
Each chip shows its filter's icon and title, or, once values are picked, the icon and those values instead of the title. A filter's `meta.summary` returns them from the query params, such as the titles of the picked options; without it the chip shows how many values are picked. A chip's dropdown keeps its tip where it was as the chip grows or shrinks with the picked values, while the tip still points at the chip. A chip in the "more" list can be removed there too.
|
|
71
71
|
|
|
72
72
|
## Groups
|
|
73
73
|
|
|
@@ -132,7 +132,7 @@ const {isOpen, toggle} = useNotifyCenter({
|
|
|
132
132
|
})
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
`WNotifyCenter` can also be placed on a page as it is. Notifications on the `ACTION` channel need the user: they are pinned on top under their own heading, their toast stays until closed, and clearing the history keeps them — as it keeps pending ones.
|
|
135
|
+
`WNotifyCenter` can also be placed on a page as it is. Notifications on the `ACTION` channel need the user: they are pinned on top under their own heading, their toast stays until closed, and clearing the history keeps them — as it keeps pending ones. Each section has its own button: Clear beside the activity heading, and, with `onDismissActions`, Dismiss all beside the heading of the ones that need action. It hands them all to that function at once — such as to dismiss them on the server with one request by the same filters as the feed they came from — and removes them once it resolves, without calling each one's `onRemove`.
|
|
136
136
|
|
|
137
137
|
```vue
|
|
138
138
|
<template>
|
|
@@ -249,8 +249,10 @@ import WNotifyCenter from 'eco-vue-js/dist/components/Notify/WNotifyCenter.vue'
|
|
|
249
249
|
|
|
250
250
|
| Prop | Type | Default | Description |
|
|
251
251
|
| --- | --- | --- | --- |
|
|
252
|
+
| `onDismissActions` | `((items: NotifyItem[]) => unknown)` | — | Shows a button beside the heading of the notifications that need action that hands them all to this function — such as to dismiss them on the server in one request — and removes them once it resolves, without calling their `onRemove`. A rejection keeps them. |
|
|
252
253
|
| `title` | `string` | — | Heading of the notify center. Defaults to `Notifications`. |
|
|
253
|
-
| `clearText` | `string` | — | Text of the button that clears
|
|
254
|
+
| `clearText` | `string` | — | Text of the button beside the activity heading that clears it. Defaults to `Clear`. |
|
|
255
|
+
| `dismissActionsText` | `string` | — | Text of the button that dismisses the notifications that need action, shown with `onDismissActions`. Defaults to `Dismiss all`. |
|
|
254
256
|
| `emptyText` | `string` | — | Shown when there are no notifications. Defaults to `No notifications yet`. |
|
|
255
257
|
| `actionText` | `string` | — | Heading of the notifications that need action (`NotifyChannel.ACTION`). Defaults to `Action required`. |
|
|
256
258
|
| `activityText` | `string` | — | Heading of the rest of the history, shown under the ones that need action. Defaults to `Activity`. |
|
|
@@ -274,7 +276,9 @@ import WNotifyCenterButton from 'eco-vue-js/dist/components/Notify/WNotifyCenter
|
|
|
274
276
|
| `title` | `string` | — | Tooltip of the button and heading of the notify center. Defaults to `Notifications`. |
|
|
275
277
|
| `icon` | `SVGComponent` | — | Icon of the button. Defaults to a bell. |
|
|
276
278
|
| `horizontalAlign` | `HorizontalAlign` | — | Aligns the notify center to the button — such as `HorizontalAlign.LEFT_INNER` to grow left from its right edge, without a tip, or `HorizontalAlign.LEFT_CENTER` beside it with a tip, for a button in a side rail. Defaults to centered under the button with a tip. |
|
|
277
|
-
| `
|
|
279
|
+
| `onDismissActions` | `((items: NotifyItem[]) => unknown)` | — | Shows a button beside the heading of the notifications that need action that hands them all to this function — such as to dismiss them on the server in one request — and removes them once it resolves, without calling their `onRemove`. A rejection keeps them. |
|
|
280
|
+
| `clearText` | `string` | — | Text of the button beside the activity heading that clears it. Defaults to `Clear`. |
|
|
281
|
+
| `dismissActionsText` | `string` | — | Text of the button that dismisses the notifications that need action, shown with `onDismissActions`. Defaults to `Dismiss all`. |
|
|
278
282
|
| `emptyText` | `string` | — | Shown when there are no notifications. Defaults to `No notifications yet`. |
|
|
279
283
|
| `actionText` | `string` | — | Heading of the notifications that need action (`NotifyChannel.ACTION`). Defaults to `Action required`. |
|
|
280
284
|
| `activityText` | `string` | — | Heading of the rest of the history, shown under the ones that need action. Defaults to `Activity`. |
|
package/docs/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# eco-vue-js
|
|
2
2
|
|
|
3
|
-
> Vue 3 UI kit with Tailwind v4 — components, utilities, icons and recipes. These are the docs of version 0.27.
|
|
3
|
+
> Vue 3 UI kit with Tailwind v4 — components, utilities, icons and recipes. These are the docs of version 0.27.2, the one installed next to them. Start with Getting started and Conventions; each component page lists its props, events and slots with examples.
|
|
4
4
|
|
|
5
5
|
Release notes, for what changed between versions: https://github.com/rsmple/eco-vue-js/releases. The docs site, with live demos: https://rsmple.github.io/eco-vue-js/
|
|
6
6
|
|