@wssto2/vue-core 0.3.0 → 0.4.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.
- package/README.md +3 -0
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-DKX3PH2n.js → AccessGate.vue_vue_type_script_setup_true_lang-DcbZBINh.js} +1 -1
- package/dist/{AccountMenuItem.vue_vue_type_script_setup_true_lang-DIGqTLwd.js → AccountMenuItem.vue_vue_type_script_setup_true_lang-CPeNxh5K.js} +1 -1
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-B7Lpfkf6.js → ActionRow.vue_vue_type_script_setup_true_lang-LlfIPWsJ.js} +2 -2
- package/dist/{Activity-DviO0VQ8.js → Activity-2gGxQn7v.js} +9 -9
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-CvAnzdc1.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-BoinCY93.js} +3 -3
- package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-CJsMUIUg.js → AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js} +1 -1
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-CCtthMRd.js → AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.js} +4 -4
- package/dist/{Banner.vue_vue_type_script_setup_true_lang-Cib_YYpr.js → Banner.vue_vue_type_script_setup_true_lang-DSStj_5z.js} +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-CYil8h9z.js → Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js} +1 -1
- package/dist/{Changes-DlT5mN9G.js → Changes-Bm8xvagD.js} +8 -8
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-CXILftEc.js → CollectionPage.vue_vue_type_script_setup_true_lang-DCBVw2Qd.js} +176 -172
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-DSYgS9lC.js → DataTable.vue_vue_type_script_setup_true_lang-UH6f9puS.js} +1 -1
- package/dist/DateField.vue_vue_type_script_setup_true_lang-GVasv8ao.js +255 -0
- package/dist/DeadLetters-CMRtXn_N.js +104 -0
- package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-Cb3xJI1x.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-D1arePCZ.js} +1 -1
- package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-C2ZYIT9F.js → EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp8I.js} +1 -1
- package/dist/{FormErrors.vue_vue_type_script_setup_true_lang-DVgNBQ8p.js → FormErrors.vue_vue_type_script_setup_true_lang-BQb7wLT0.js} +1 -1
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-0mfG8TkU.js → FormGroup.vue_vue_type_script_setup_true_lang-DG2zdG_a.js} +10 -10
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-Bz2m3AtF.js → FormView.vue_vue_type_script_setup_true_lang-cr0xNDXP.js} +2 -2
- package/dist/{General-BD-Hcz0a.js → General-CTqd0SLK.js} +8 -8
- package/dist/HeaderAction.vue_vue_type_script_setup_true_lang-Cgji-Jrr.js +45 -0
- package/dist/{Icon.vue_vue_type_script_lang-VvcV2Bzo.js → Icon.vue_vue_type_script_lang-D7oC-d-S.js} +33 -29
- package/dist/{IconTile.vue_vue_type_script_setup_true_lang-D7QgnUyN.js → IconTile.vue_vue_type_script_setup_true_lang-BpIjgu5E.js} +1 -1
- package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-C2udmeEA.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-Cv7KlA5y.js} +1 -1
- package/dist/{Menu.vue_vue_type_script_setup_true_lang-BNAjx9tj.js → Menu.vue_vue_type_script_setup_true_lang-DTbAcDzL.js} +30 -26
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-D7SwVPpL.js → Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js} +2 -2
- package/dist/{NewRolePage-Dla4YnMs.js → NewRolePage-DTOWIxxC.js} +4 -4
- package/dist/{NoAccess.vue_vue_type_script_setup_true_lang-8m9cNptR.js → NoAccess.vue_vue_type_script_setup_true_lang-DWxq-MTM.js} +1 -1
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-CYRg7Kfg.js → NumberField.vue_vue_type_script_setup_true_lang-C7N5nq0P.js} +1 -1
- package/dist/{PageBar.vue_vue_type_script_setup_true_lang-Cfr5xsJx.js → PageBar.vue_vue_type_script_setup_true_lang-B7qdEeej.js} +1 -1
- package/dist/{Panel.vue_vue_type_script_setup_true_lang-BCRxRK4D.js → Panel.vue_vue_type_script_setup_true_lang-BA0u_DtS.js} +1 -1
- package/dist/PanelActions.vue_vue_type_script_setup_true_lang-E9VdIGkf.js +46 -0
- package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-B3Q4dhqJ.js → PhotoViewer.vue_vue_type_script_setup_true_lang-QPCW3Xi6.js} +1 -1
- package/dist/ProfilePage-BlpiWH_W.js +654 -0
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-DKsaKlAq.js → RecordHeader.vue_vue_type_script_setup_true_lang-C_ymvhHU.js} +2 -2
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-CJcKa9SW.js → ResourcePage.vue_vue_type_script_setup_true_lang-CwI_sROp.js} +5 -5
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-DuEPOmjI.js → RoleEditor.vue_vue_type_script_setup_true_lang-CmwvSytD.js} +30 -29
- package/dist/{RolePage-bZzv_E4l.js → RolePage-DZk7BZOc.js} +13 -13
- package/dist/{RolesPage-BniZv0nB.js → RolesPage-DzGGCMnm.js} +9 -9
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-BKP_bge8.js → SectionList.vue_vue_type_script_setup_true_lang-BFYls8fR.js} +3 -3
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-BgGEGxSI.js → SectionNavigator.vue_vue_type_script_setup_true_lang-DSMXEaCs.js} +5 -5
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-BZ9UdgA1.js → SegmentedField.vue_vue_type_script_setup_true_lang-BMqWlpsL.js} +1 -1
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BiGaEKBQ.js → SelectField.vue_vue_type_script_setup_true_lang-7O1BAx04.js} +15 -14
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-DUQpr7gb.js → SessionList.vue_vue_type_script_setup_true_lang-D5KRitar.js} +4 -4
- package/dist/{Sessions-Co5-xdeb.js → Sessions-CWqjjTr1.js} +6 -6
- package/dist/SettingsPage-C4s0IdkW.js +255 -0
- package/dist/{Sheet.vue_vue_type_script_setup_true_lang-bHYzx7-J.js → Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js} +48 -45
- package/dist/{SignIn-BWwFbxki.js → SignIn-zzKY__df.js} +7 -7
- package/dist/{SignInPage-FnLtoi2q.js → SignInPage-Rqnus_s-.js} +6 -6
- package/dist/{SignInTable.vue_vue_type_script_setup_true_lang-Dnx3T_42.js → SignInTable.vue_vue_type_script_setup_true_lang-CEbAvZ_C.js} +1 -1
- package/dist/{SignIns-3UcI64_h.js → SignIns-Cnf9BVR0.js} +6 -6
- package/dist/{SwipeActions.vue_vue_type_script_setup_true_lang-4I8m27ol.js → SwipeActions.vue_vue_type_script_setup_true_lang-BJIA2JfI.js} +1 -1
- package/dist/SwitchField.vue_vue_type_script_setup_true_lang-CM8yp9JQ.js +64 -0
- package/dist/{Tabs.vue_vue_type_script_setup_true_lang-BeGaydRr.js → Tabs.vue_vue_type_script_setup_true_lang-CcMcE38r.js} +1 -1
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-C_FMf3Vc.js → TextField.vue_vue_type_script_setup_true_lang-B9dwVASU.js} +3 -3
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CqAWfABZ.js +68 -0
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-DWfAUlnz.js +164 -0
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-1RJGKxbD.js → Timestamp.vue_vue_type_script_setup_true_lang-FVRUr-9y.js} +1 -1
- package/dist/{UserRecord-Ci8HfwbX.js → UserRecord-DqigxVxH.js} +12 -12
- package/dist/{UsersList-vEJ-cgkT.js → UsersList-DNlZsI9J.js} +8 -8
- package/dist/{ViewTabs.vue_vue_type_script_setup_true_lang-ByqTU2JT.js → ViewTabs.vue_vue_type_script_setup_true_lang-BJIoZAlH.js} +1 -1
- package/dist/access/index.js +1 -1
- package/dist/app/index.js +9 -9
- package/dist/button/index.js +1 -1
- package/dist/client/index.js +11 -19
- package/dist/{client-Bw0aM5Gu.js → client-k9euDWF4.js} +19 -19
- package/dist/collection/definition.d.ts +3 -0
- package/dist/collection/index.js +6 -6
- package/dist/collection/useCollection.d.ts +2 -0
- package/dist/content/index.js +2 -2
- package/dist/{contributions-CDDg3fKp.js → contributions-DsfmDoRD.js} +1 -1
- package/dist/control-7EP4tjYy.js +313 -0
- package/dist/controls/index.js +4 -4
- package/dist/form/index.js +987 -1134
- package/dist/{guards-Cd1V28oG.js → guards-Dve61KjR.js} +1 -1
- package/dist/{http-DGGSKWvU.js → http-CNcDHSOj.js} +9 -8
- package/dist/i18n/index.js +20 -20
- package/dist/icon/core.d.ts +4 -0
- package/dist/icon/index.js +1 -1
- package/dist/identity/index.js +1 -1
- package/dist/index-BsJ92eub.js +504 -0
- package/dist/{index-BAcl44SC.js → index-CGv-u1Ws.js} +19 -19
- package/dist/{index-B2dbYZR9.js → index-GcLnFF-z.js} +15 -15
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modal/Sheet.vue.d.ts +2 -0
- package/dist/modal/index.js +5 -5
- package/dist/modules/events/entities.d.ts +16 -0
- package/dist/modules/events/routes.d.ts +17 -0
- package/dist/modules/events/schemas.d.ts +16 -0
- package/dist/modules/notification/entities.d.ts +46 -0
- package/dist/modules/notification/routes.d.ts +26 -0
- package/dist/modules/notification/schemas.d.ts +25 -0
- package/dist/{navigation-BPWa63ge.js → navigation-Cm3iChlR.js} +1 -1
- package/dist/{neighbors-D0WRBxXI.js → neighbors-DpaIMQAL.js} +1 -1
- package/dist/notifications/InboxPanel.vue.d.ts +16 -0
- package/dist/notifications/MarkAllRead.vue.d.ts +7 -0
- package/dist/notifications/NotificationBell.vue.d.ts +2 -0
- package/dist/notifications/SettingsLink.vue.d.ts +6 -0
- package/dist/notifications/context.d.ts +20 -0
- package/dist/notifications/deadletters/DeadLetters.vue.d.ts +2 -0
- package/dist/notifications/deadletters/access.d.ts +3 -0
- package/dist/notifications/deadletters/list.d.ts +3 -0
- package/dist/notifications/deadletters/routes.d.ts +13 -0
- package/dist/notifications/feature.d.ts +31 -0
- package/dist/notifications/inbox.d.ts +62 -0
- package/dist/notifications/index.d.ts +13 -0
- package/dist/notifications/index.js +8 -0
- package/dist/notifications/settings/EmailPanel.vue.d.ts +14 -0
- package/dist/notifications/settings/QuietHoursPanel.vue.d.ts +14 -0
- package/dist/notifications/settings/SettingsMenuItem.vue.d.ts +2 -0
- package/dist/notifications/settings/SettingsPage.vue.d.ts +2 -0
- package/dist/notifications/settings/categoryText.d.ts +9 -0
- package/dist/notifications/settings/routes.d.ts +13 -0
- package/dist/notifications/settings/settings.d.ts +18 -0
- package/dist/notifications/settings/state.d.ts +16 -0
- package/dist/notifications/state.d.ts +27 -0
- package/dist/notifications/stream.d.ts +21 -0
- package/dist/options-Ba_0uLWN.js +18 -0
- package/dist/overlay/index.js +3 -3
- package/dist/page/index.js +7 -7
- package/dist/phone/index.js +68 -67
- package/dist/platform/index.js +2 -2
- package/dist/{platform-hunMqFdB.js → platform-q3cjODLx.js} +1 -1
- package/dist/resource/index.js +1 -1
- package/dist/route-goWMxDUN.js +13 -0
- package/dist/router/index.js +4 -4
- package/dist/{rowLayout-BI7a3Kom.js → rowLayout-BqTEhEuy.js} +5 -5
- package/dist/{sections-BEqW1dOc.js → sections-CntvUTxn.js} +1 -1
- package/dist/shell/index.js +460 -496
- package/dist/state/index.js +4 -4
- package/dist/{status-C9aXR-Jb.js → status-BuP3ULjH.js} +2 -2
- package/dist/styles.css +1 -1
- package/dist/{suggestions-BJAqOj4c.js → suggestions-BxMm6MQA.js} +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/transport-BnP7WC0Y.js +4 -0
- package/dist/{useCommand-BgRwnYlV.js → useCommand-BkONMn3X.js} +2 -2
- package/dist/{useResourceForm-Bgc9jMcu.js → useResourceForm-D1hIpwW5.js} +1 -1
- package/dist/useTypedEntry-aTfPBAhw.js +857 -0
- package/package.json +6 -2
- package/dist/DateField.vue_vue_type_script_setup_true_lang-DMVjNsaM.js +0 -1099
- package/dist/ProfilePage-OJMQ8cr8.js +0 -691
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CU3KTKIJ.js +0 -127
- package/dist/options-BXkMR63B.js +0 -329
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as q } from "./route-goWMxDUN.js";
|
|
2
2
|
import { d as Le, p as Ce } from "./feature-DdUAfyi4.js";
|
|
3
3
|
import { d as Re } from "./context-Ch1r4fdN.js";
|
|
4
4
|
import { d as Ee } from "./defineRoutes-BGAdiIrt.js";
|
|
@@ -6,19 +6,19 @@ import { useI18n as Q } from "vue-i18n";
|
|
|
6
6
|
import { a as Ne } from "./error-CD7x0Jrz.js";
|
|
7
7
|
import { u as ve } from "./describeError-Ctga6GcS.js";
|
|
8
8
|
import { defineComponent as Y, ref as D, computed as j, watch as le, openBlock as f, createBlock as S, unref as t, withCtx as h, createElementVNode as N, createElementBlock as g, toDisplayString as k, createCommentVNode as O, createVNode as $, Fragment as K, renderList as P, createSlots as be, renderSlot as Se, createTextVNode as M, useTemplateRef as ne } from "vue";
|
|
9
|
-
import { _ as I } from "./Button.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { _ as V } from "./FormGroup.vue_vue_type_script_setup_true_lang-
|
|
11
|
-
import { e as U } from "./
|
|
12
|
-
import { _ as Te } from "./AlertDialog.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { _ as I } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
10
|
+
import { _ as V } from "./FormGroup.vue_vue_type_script_setup_true_lang-DG2zdG_a.js";
|
|
11
|
+
import { e as U } from "./control-7EP4tjYy.js";
|
|
12
|
+
import { _ as Te } from "./AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js";
|
|
13
13
|
import { t as ee } from "./toast-D9Z5To38.js";
|
|
14
|
-
import { _ as ce } from "./AccessGate.vue_vue_type_script_setup_true_lang-
|
|
15
|
-
import { _ as Oe } from "./AsyncSection.vue_vue_type_script_setup_true_lang-
|
|
14
|
+
import { _ as ce } from "./AccessGate.vue_vue_type_script_setup_true_lang-DcbZBINh.js";
|
|
15
|
+
import { _ as Oe } from "./AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.js";
|
|
16
16
|
import { u as Ae } from "./useLoad-CYRVx6HW.js";
|
|
17
|
-
import { _ as De, a as Ke } from "./SelectField.vue_vue_type_script_setup_true_lang-
|
|
18
|
-
import { _ as Be } from "./SegmentedField.vue_vue_type_script_setup_true_lang-
|
|
19
|
-
import { u as Pe, _ as Ue } from "./useCommand-
|
|
20
|
-
import { u as Fe } from "./platform-
|
|
21
|
-
import { _ as Ge } from "./IconTile.vue_vue_type_script_setup_true_lang-
|
|
17
|
+
import { _ as De, a as Ke } from "./SelectField.vue_vue_type_script_setup_true_lang-7O1BAx04.js";
|
|
18
|
+
import { _ as Be } from "./SegmentedField.vue_vue_type_script_setup_true_lang-BMqWlpsL.js";
|
|
19
|
+
import { u as Pe, _ as Ue } from "./useCommand-BkONMn3X.js";
|
|
20
|
+
import { u as Fe } from "./platform-q3cjODLx.js";
|
|
21
|
+
import { _ as Ge } from "./IconTile.vue_vue_type_script_setup_true_lang-BpIjgu5E.js";
|
|
22
22
|
import { u as Me } from "./mediaQuery-CygcXmFW.js";
|
|
23
23
|
import { _ as Ve } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
24
24
|
const C = {
|
|
@@ -43,12 +43,12 @@ const C = {
|
|
|
43
43
|
viewAccess: "iam.user:view",
|
|
44
44
|
manageBindings: "iam.user:manage"
|
|
45
45
|
}, re = Ee({
|
|
46
|
-
roles: { name: "access.roles", path: "/iam/roles", component: () => import("./RolesPage-
|
|
47
|
-
newRole: { name: "access.roles.new", path: "/iam/roles/new", component: () => import("./NewRolePage-
|
|
46
|
+
roles: { name: "access.roles", path: "/iam/roles", component: () => import("./RolesPage-DzGGCMnm.js"), meta: { access: F.viewRoles, titleKey: "core.access.title" } },
|
|
47
|
+
newRole: { name: "access.roles.new", path: "/iam/roles/new", component: () => import("./NewRolePage-DTOWIxxC.js"), meta: { access: F.manageRoles, titleKey: "core.access.new_title" } },
|
|
48
48
|
role: {
|
|
49
49
|
name: "access.role",
|
|
50
50
|
path: "/iam/roles/:ref",
|
|
51
|
-
component: () => import("./RolePage-
|
|
51
|
+
component: () => import("./RolePage-DZk7BZOc.js"),
|
|
52
52
|
// A role's ref (its key, or the id of a custom one) swaps in place when a link leads to another role.
|
|
53
53
|
meta: { access: F.viewRoles, titleKey: "core.access.title", remountOnParam: "ref" }
|
|
54
54
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The version of @wssto2/vue-core (kept equal to package.json by index.test.ts). */
|
|
2
|
-
export declare const version = "0.
|
|
2
|
+
export declare const version = "0.4.0";
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,8 @@ type __VLS_Slots = {
|
|
|
26
26
|
header?: (scope: {
|
|
27
27
|
titleId: string;
|
|
28
28
|
}) => unknown;
|
|
29
|
+
/** Buttons in the default header, just before the close button (an inbox's settings gear). */
|
|
30
|
+
actions?: () => unknown;
|
|
29
31
|
};
|
|
30
32
|
declare function present(): void;
|
|
31
33
|
declare function dismiss(): void;
|
package/dist/modal/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as G } from "../DiscardChangesModal.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { _ as y } from "../Modal.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { m as O } from "../Modal.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { _ as T } from "../Sheet.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as G } from "../DiscardChangesModal.vue_vue_type_script_setup_true_lang-D1arePCZ.js";
|
|
2
|
+
import { _ as y } from "../Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js";
|
|
3
|
+
import { m as O } from "../Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js";
|
|
4
|
+
import { _ as T } from "../Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js";
|
|
5
5
|
import { defineComponent as b, ref as k, computed as v, openBlock as t, createBlock as w, unref as i, withCtx as S, createElementVNode as r, createElementBlock as o, Fragment as c, renderList as u, toDisplayString as l, createCommentVNode as C } from "vue";
|
|
6
6
|
import { useI18n as B } from "vue-i18n";
|
|
7
|
-
import { a as K, u as M } from "../Button.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { a as K, u as M } from "../Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
8
8
|
const $ = {
|
|
9
9
|
class: "flex flex-col gap-5",
|
|
10
10
|
"data-test": "shortcut-help"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type ConsumerNames = {
|
|
2
|
+
consumers: string[];
|
|
3
|
+
};
|
|
4
|
+
export type DeadLetterRow = {
|
|
5
|
+
event_id: number;
|
|
6
|
+
consumer: string;
|
|
7
|
+
event_name: string;
|
|
8
|
+
event_created_at: string | null;
|
|
9
|
+
attempts: number;
|
|
10
|
+
last_error: string;
|
|
11
|
+
dead_at: string;
|
|
12
|
+
retryable: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type Retried = {
|
|
15
|
+
retried: number;
|
|
16
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ListResult } from "../../client";
|
|
2
|
+
import type { ConsumerNames, DeadLetterRow, Retried } from "./entities";
|
|
3
|
+
export declare const eventsRoutes: {
|
|
4
|
+
readonly deadLettersList: import("../../client").ApiRoute<{
|
|
5
|
+
consumer?: string | undefined;
|
|
6
|
+
page?: number | undefined;
|
|
7
|
+
per_page?: number | undefined;
|
|
8
|
+
}, ListResult<DeadLetterRow>>;
|
|
9
|
+
readonly deadLettersRetry: import("../../client").ApiRoute<{
|
|
10
|
+
event: number;
|
|
11
|
+
consumer: string;
|
|
12
|
+
}, Retried>;
|
|
13
|
+
readonly deadLettersRetryAll: import("../../client").ApiRoute<{
|
|
14
|
+
consumer: string;
|
|
15
|
+
}, Retried>;
|
|
16
|
+
readonly consumers: import("../../client").ApiRoute<void, ConsumerNames>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const DeadLettersInputSchema: z.ZodObject<{
|
|
3
|
+
consumer: z.ZodOptional<z.ZodString>;
|
|
4
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
per_page: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type DeadLettersInput = z.infer<typeof DeadLettersInputSchema>;
|
|
8
|
+
export declare const RetryAllInputSchema: z.ZodObject<{
|
|
9
|
+
consumer: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type RetryAllInput = z.infer<typeof RetryAllInputSchema>;
|
|
12
|
+
export declare const RetryInputSchema: z.ZodObject<{
|
|
13
|
+
event: z.ZodNumber;
|
|
14
|
+
consumer: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export type RetryInput = z.infer<typeof RetryInputSchema>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type CategorySettings = {
|
|
2
|
+
category: string;
|
|
3
|
+
email: Setting;
|
|
4
|
+
};
|
|
5
|
+
export type Item = {
|
|
6
|
+
id: number;
|
|
7
|
+
category: string;
|
|
8
|
+
title: string;
|
|
9
|
+
body: string;
|
|
10
|
+
link: string;
|
|
11
|
+
data: Record<string, string>;
|
|
12
|
+
read_at: string | null;
|
|
13
|
+
created_at: string;
|
|
14
|
+
};
|
|
15
|
+
export type Page = {
|
|
16
|
+
items: Item[];
|
|
17
|
+
has_more: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type Preferences = {
|
|
20
|
+
email_available: boolean;
|
|
21
|
+
categories: CategorySettings[];
|
|
22
|
+
quiet_hours: QuietHours;
|
|
23
|
+
time_zone: string;
|
|
24
|
+
};
|
|
25
|
+
export type QuietHours = {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
start: number;
|
|
28
|
+
end: number;
|
|
29
|
+
};
|
|
30
|
+
export type Setting = {
|
|
31
|
+
enabled: boolean;
|
|
32
|
+
source: Source;
|
|
33
|
+
};
|
|
34
|
+
export type Source = "enforced" | "person" | "default";
|
|
35
|
+
export type StreamEvent = {
|
|
36
|
+
type: StreamKind;
|
|
37
|
+
notification?: Item | null;
|
|
38
|
+
read_ids?: number[];
|
|
39
|
+
all_read?: boolean;
|
|
40
|
+
read_up_to_id?: number;
|
|
41
|
+
unread_count: number;
|
|
42
|
+
};
|
|
43
|
+
export type StreamKind = "created" | "read" | "unread";
|
|
44
|
+
export type UnreadCount = {
|
|
45
|
+
unread_count: number;
|
|
46
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CategorySettings, Page, Preferences, QuietHours, UnreadCount } from "./entities";
|
|
2
|
+
export declare const notificationRoutes: {
|
|
3
|
+
readonly list: import("../../client").ApiRoute<{
|
|
4
|
+
before_id?: number | undefined;
|
|
5
|
+
limit?: number | undefined;
|
|
6
|
+
}, Page>;
|
|
7
|
+
readonly unread: import("../../client").ApiRoute<void, UnreadCount>;
|
|
8
|
+
readonly read: import("../../client").ApiRoute<{
|
|
9
|
+
id: number;
|
|
10
|
+
}, UnreadCount>;
|
|
11
|
+
readonly readAll: import("../../client").ApiRoute<{
|
|
12
|
+
up_to_id: number;
|
|
13
|
+
}, UnreadCount>;
|
|
14
|
+
readonly stream: import("../../client").RawRoute;
|
|
15
|
+
readonly test: import("../../client").ApiRoute<void, void>;
|
|
16
|
+
readonly preferences: import("../../client").ApiRoute<void, Preferences>;
|
|
17
|
+
readonly preferencesSetEmail: import("../../client").ApiRoute<{
|
|
18
|
+
category: string;
|
|
19
|
+
email: boolean | null;
|
|
20
|
+
}, CategorySettings>;
|
|
21
|
+
readonly quietHours: import("../../client").ApiRoute<{
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
start: number;
|
|
24
|
+
end: number;
|
|
25
|
+
}, QuietHours>;
|
|
26
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ListQuerySchema: z.ZodObject<{
|
|
3
|
+
before_id: z.ZodOptional<z.ZodNumber>;
|
|
4
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type ListQuery = z.infer<typeof ListQuerySchema>;
|
|
7
|
+
export declare const MarkAllInputSchema: z.ZodObject<{
|
|
8
|
+
up_to_id: z.ZodNumber;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type MarkAllInput = z.infer<typeof MarkAllInputSchema>;
|
|
11
|
+
export declare const QuietHoursInputSchema: z.ZodObject<{
|
|
12
|
+
enabled: z.ZodBoolean;
|
|
13
|
+
start: z.ZodNumber;
|
|
14
|
+
end: z.ZodNumber;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export type QuietHoursInput = z.infer<typeof QuietHoursInputSchema>;
|
|
17
|
+
export declare const ReadInputSchema: z.ZodObject<{
|
|
18
|
+
id: z.ZodNumber;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type ReadInput = z.infer<typeof ReadInputSchema>;
|
|
21
|
+
export declare const SetEmailInputSchema: z.ZodObject<{
|
|
22
|
+
category: z.ZodString;
|
|
23
|
+
email: z.ZodNullable<z.ZodBoolean>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type SetEmailInput = z.infer<typeof SetEmailInputSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as k } from "vue";
|
|
2
2
|
import { d as y } from "./context-Ch1r4fdN.js";
|
|
3
|
-
import { h as N } from "./platform-
|
|
3
|
+
import { h as N } from "./platform-q3cjODLx.js";
|
|
4
4
|
function F(l, a = {}) {
|
|
5
5
|
const i = /* @__PURE__ */ new Map(), o = [];
|
|
6
6
|
for (const e of l) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as P, shallowRef as z, watch as X, getCurrentScope as j, onScopeDispose as B } from "vue";
|
|
2
2
|
import { useRoute as F } from "vue-router";
|
|
3
3
|
import { i as M } from "./error-CD7x0Jrz.js";
|
|
4
|
-
import { L as I, o as J, d as Q, e as N, q as U } from "./http-
|
|
4
|
+
import { L as I, o as J, d as Q, e as N, q as U } from "./http-CNcDHSOj.js";
|
|
5
5
|
const V = 8;
|
|
6
6
|
function te(s, r) {
|
|
7
7
|
const v = F(), R = r.from ?? (() => typeof v.query[I] == "string" ? v.query[I] : null), D = r.stateKey ?? "query", y = P(null), p = P(0), h = z(null), d = z(null), b = P(!1), S = z(null), n = /* @__PURE__ */ new Map();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Inbox } from "./inbox";
|
|
2
|
+
/**
|
|
3
|
+
* The inbox: what the popover (wide screens) and the sheet (phones) show. Newest first; a tap marks the
|
|
4
|
+
* notification read and opens its link; "Mark all as read" marks what has been seen; older ones
|
|
5
|
+
* come with "Show older". Loading, failure and emptiness are the library's own states.
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
inbox: Inbox;
|
|
9
|
+
appearance: "popover" | "sheet";
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
close: () => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
onClose?: (() => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Inbox } from "./inbox";
|
|
2
|
+
/** "Mark all as read": what has been seen, up to the newest id the inbox shows. Off while nothing is unread. */
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
inbox: Inbox;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
+
click: () => any;
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
+
onClick?: (() => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ShallowRef } from "vue";
|
|
2
|
+
import type { IconName } from "../icon";
|
|
3
|
+
import type { Hue } from "../state";
|
|
4
|
+
import type { Inbox } from "./inbox";
|
|
5
|
+
/** How a category of notification is drawn in the inbox: the icon of its row and the colour behind it. */
|
|
6
|
+
export interface NotificationCategoryLook {
|
|
7
|
+
/** Default: the bell. */
|
|
8
|
+
icon?: IconName;
|
|
9
|
+
/** One of the category hues; default neutral. */
|
|
10
|
+
hue?: Hue;
|
|
11
|
+
}
|
|
12
|
+
/** What the bell and the inbox read from the feature that installed them. */
|
|
13
|
+
export interface NotificationsContext {
|
|
14
|
+
/** The signed-in session's inbox; null while nobody is signed in (it is made and ended with the session). */
|
|
15
|
+
readonly inbox: ShallowRef<Inbox | null>;
|
|
16
|
+
readonly categories: Readonly<Record<string, NotificationCategoryLook>>;
|
|
17
|
+
/** Whether the settings page is installed: the inbox shows its gear. */
|
|
18
|
+
readonly settings: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const notificationsContextKey: import("vue").InjectionKey<NotificationsContext>, useNotificationsContext: () => NotificationsContext;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { HttpClient } from "../../client";
|
|
2
|
+
/** The dead letters of every consumer of the application's event queue, as go-core's `GET /v1/events/dead-letters` pages them (newest first; only the consumer narrows it). */
|
|
3
|
+
export declare function deadLetterList(http: HttpClient): import("../../collection").CollectionDefinition<import("..").DeadLetterRow, never, "consumer", never>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RouteRecordRaw } from "vue-router";
|
|
2
|
+
/**
|
|
3
|
+
* The route of the dead-letters page (`/events/dead-letters`, name `events.deadletters`), for whoever holds
|
|
4
|
+
* `events.deadletter:view`: a typed target for links and the record `notificationsFeature` installs.
|
|
5
|
+
*/
|
|
6
|
+
export interface DeadLettersRoutes {
|
|
7
|
+
/** The records `notificationsFeature` installs. */
|
|
8
|
+
readonly records: readonly RouteRecordRaw[];
|
|
9
|
+
readonly index: {
|
|
10
|
+
readonly name: "events.deadletters";
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare const deadLettersRoutes: DeadLettersRoutes;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type Feature } from "../app";
|
|
2
|
+
import type { Destination } from "../router";
|
|
3
|
+
import { type NotificationCategoryLook } from "./context";
|
|
4
|
+
export interface NotificationsFeatureOptions {
|
|
5
|
+
/** How each category the application declared in go-core is drawn: the icon of its rows and the colour behind it. A category without an entry gets the bell on a neutral tile. */
|
|
6
|
+
categories?: Readonly<Record<string, NotificationCategoryLook>>;
|
|
7
|
+
/**
|
|
8
|
+
* The dead-letters page (`/events/dead-letters`, route `events.deadletters`) for whoever holds `events.deadletter:view`:
|
|
9
|
+
* the events a consumer of the queue gave up on, with retry behind `events.deadletter:retry`. `destination` is the node of
|
|
10
|
+
* the server's menu that opens it; without one the application binds the page itself. `false` leaves the page out.
|
|
11
|
+
* Default: the page, with no menu binding.
|
|
12
|
+
*/
|
|
13
|
+
deadLetters?: {
|
|
14
|
+
destination?: Destination;
|
|
15
|
+
} | false;
|
|
16
|
+
/**
|
|
17
|
+
* The person's own notification settings (`/profile/notifications`, route `notifications.settings`): the categories they get by e-mail
|
|
18
|
+
* and their quiet hours, reached from the account menu ("Notification settings") and from a gear in the inbox. Needs no permission, only a
|
|
19
|
+
* session. The names of the categories are the application's texts `notifications.categories.<code>.label` (and `.description`), the code
|
|
20
|
+
* split at its dots; a category without a text is shown by its code. `false` leaves the page, the menu entry and the gear out. Default true.
|
|
21
|
+
*/
|
|
22
|
+
settings?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The in-app notifications of go-core's notification module, one feature to install: the bell with the
|
|
26
|
+
* unread count in the shell's `headerActions`, the inbox it opens (a popover on wide screens, a bottom sheet on
|
|
27
|
+
* phones), and the live stream behind both, which follows the session. Needs a shell with a `headerActions` place.
|
|
28
|
+
*
|
|
29
|
+
* createApplication({ platform, shell: backofficeShell(), features: [identityFeature(), notificationsFeature({ categories: { "tickets.assigned": { icon: "user3Line", hue: "blue" } }, deadLetters: { destination: "events.deadletters" } })] })
|
|
30
|
+
*/
|
|
31
|
+
export declare function notificationsFeature(options?: NotificationsFeatureOptions): Feature;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
import { type HttpClient, type Transport } from "../client";
|
|
3
|
+
import type { Item } from "../modules/notification/entities";
|
|
4
|
+
/** The first page of the inbox: not asked yet, on its way, here, or failed (`error` is what the request rejected with). */
|
|
5
|
+
export type InboxList = {
|
|
6
|
+
readonly status: "idle";
|
|
7
|
+
} | {
|
|
8
|
+
readonly status: "loading";
|
|
9
|
+
} | {
|
|
10
|
+
readonly status: "loaded";
|
|
11
|
+
} | {
|
|
12
|
+
readonly status: "failed";
|
|
13
|
+
readonly error: unknown;
|
|
14
|
+
};
|
|
15
|
+
export interface InboxOptions {
|
|
16
|
+
http: HttpClient;
|
|
17
|
+
/** The stream's whole address (the API base and `/v1/notifications/stream`). */
|
|
18
|
+
streamUrl: string;
|
|
19
|
+
/** Ends everything the inbox does: the stream, its timers and listeners, and the answers still on their way. */
|
|
20
|
+
signal: AbortSignal;
|
|
21
|
+
/** Reads the stream; default `fetch`. */
|
|
22
|
+
transport?: Transport;
|
|
23
|
+
/** Notifications per request, at most 50 (go-core's limit). Default 20. */
|
|
24
|
+
pageSize?: number;
|
|
25
|
+
/** The wait before reconnecting grows from `min` to `max`, in milliseconds. Default 1 s to 30 s. */
|
|
26
|
+
backoff?: {
|
|
27
|
+
readonly min: number;
|
|
28
|
+
readonly max: number;
|
|
29
|
+
};
|
|
30
|
+
/** How long a silent connection lives; go-core beats every 25 s, so the default is 50 s. */
|
|
31
|
+
idleTimeout?: number;
|
|
32
|
+
/** The moment to stamp a reading made here with. Default now. */
|
|
33
|
+
now?: () => Date;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* One signed-in person's inbox: what the bell and the list show. It keeps the live stream open for as
|
|
37
|
+
* long as `signal` lives, and nothing of it outlives the session.
|
|
38
|
+
*/
|
|
39
|
+
export interface Inbox {
|
|
40
|
+
/** Newest first: what was loaded plus what the stream brought. */
|
|
41
|
+
readonly items: Readonly<Ref<readonly Item[]>>;
|
|
42
|
+
/** The server's count, kept current by every answer and every stream event. */
|
|
43
|
+
readonly unreadCount: Readonly<Ref<number>>;
|
|
44
|
+
readonly hasMore: Readonly<Ref<boolean>>;
|
|
45
|
+
readonly list: Readonly<Ref<InboxList>>;
|
|
46
|
+
/** Whether "Load more" is running or failed. */
|
|
47
|
+
readonly more: Readonly<Ref<"idle" | "loading" | "failed">>;
|
|
48
|
+
/** Reads the first page again (opening the inbox). A reload while one is running makes the earlier answer irrelevant. */
|
|
49
|
+
load(): Promise<void>;
|
|
50
|
+
loadMore(): Promise<void>;
|
|
51
|
+
/** Marks one notification read here at once and, through the server, on every device. A reading that fails is taken back. */
|
|
52
|
+
markRead(item: Pick<Item, "id" | "read_at">): Promise<void>;
|
|
53
|
+
/** Marks read what the person has seen: everything up to the newest id this inbox shows. A notification that arrives afterwards stays unread. */
|
|
54
|
+
markAllRead(): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Starts the inbox of a session. Staying right when the connection drops: the stream opens with the
|
|
58
|
+
* count; a reconnect waits 1 s, 2 s, … up to 30 s, and refetches the count first (through the platform's
|
|
59
|
+
* client, which also renews an expired session); a connection silent for two heartbeats is dropped and
|
|
60
|
+
* redone; coming back to the foreground or online refetches the count and reconnects at once.
|
|
61
|
+
*/
|
|
62
|
+
export declare function createInbox(options: InboxOptions): Inbox;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type { Item as Notification, Page as InboxPage, StreamEvent, StreamKind, UnreadCount } from "../modules/notification/entities";
|
|
2
|
+
export type * as Inputs from "../modules/notification/schemas";
|
|
3
|
+
export { notificationRoutes } from "../modules/notification/routes";
|
|
4
|
+
export type { DeadLetterRow, Retried } from "../modules/events/entities";
|
|
5
|
+
export type * as DeadLetterInputs from "../modules/events/schemas";
|
|
6
|
+
export { eventsRoutes } from "../modules/events/routes";
|
|
7
|
+
export { notificationsFeature } from "./feature";
|
|
8
|
+
export type { NotificationsFeatureOptions } from "./feature";
|
|
9
|
+
export type { NotificationCategoryLook } from "./context";
|
|
10
|
+
export { notificationSettingsRoutes } from "./settings/routes";
|
|
11
|
+
export type { NotificationSettingsRoutes } from "./settings/routes";
|
|
12
|
+
export { deadLettersRoutes } from "./deadletters/routes";
|
|
13
|
+
export type { DeadLettersRoutes } from "./deadletters/routes";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Preferences } from "../../modules/notification/entities";
|
|
2
|
+
/**
|
|
3
|
+
* "E-mail me about": one switch per category the application declared, saved as it is switched (one on its way ignores another
|
|
4
|
+
* touch). A setting someone else enforces is a row that reads, with who decides; without e-mail there is a sentence and no switches. In-app is not a switch: it is always on.
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
preferences: Preferences;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
change: (category: string, enabled: boolean) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onChange?: ((category: string, enabled: boolean) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { QuietHours } from "../../modules/notification/entities";
|
|
2
|
+
import type { QuietHoursInput } from "../../modules/notification/schemas";
|
|
3
|
+
/**
|
|
4
|
+
* Quiet hours: e-mail made inside them waits until they end (the in-app notification never does). On or off, from and to
|
|
5
|
+
* on the clock of the application's time zone, and one line in words. A window may run over midnight; the same time twice is
|
|
6
|
+
* refused on the field. Saved with the button, like the profile's panels.
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
quietHours: QuietHours;
|
|
10
|
+
timeZone: string;
|
|
11
|
+
submit: (input: QuietHoursInput) => Promise<QuietHours>;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a category is named on the settings page: the application's own texts `notifications.categories.<code>.label`
|
|
3
|
+
* (and an optional `.description`), the code split at its dots (`tickets.assigned` is `notifications.categories.tickets.assigned.label`).
|
|
4
|
+
* A category the application gave no text is shown by its code, never by a missing key.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useCategoryText(): (code: string) => {
|
|
7
|
+
label: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RouteRecordRaw } from "vue-router";
|
|
2
|
+
/**
|
|
3
|
+
* The route of the person's own notification settings (`/profile/notifications`, name `notifications.settings`): any signed-in person
|
|
4
|
+
* may open it, so it has no `access`. A typed target for links and the record `notificationsFeature` installs.
|
|
5
|
+
*/
|
|
6
|
+
export interface NotificationSettingsRoutes {
|
|
7
|
+
/** The records `notificationsFeature` installs. */
|
|
8
|
+
readonly records: readonly RouteRecordRaw[];
|
|
9
|
+
readonly index: {
|
|
10
|
+
readonly name: "notifications.settings";
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare const notificationSettingsRoutes: NotificationSettingsRoutes;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
import type { HttpClient } from "../../client";
|
|
3
|
+
import type { Preferences, QuietHours } from "../../modules/notification/entities";
|
|
4
|
+
import type { QuietHoursInput } from "../../modules/notification/schemas";
|
|
5
|
+
import { type Load } from "../../state";
|
|
6
|
+
/** One person's notification settings: what the page shows and the two ways to change it. */
|
|
7
|
+
export interface Settings {
|
|
8
|
+
/** The load of the preferences, as `AsyncSection` takes it. */
|
|
9
|
+
readonly loaded: Load<Preferences>;
|
|
10
|
+
/** The categories whose switch is on its way to the server: each is locked meanwhile, so a change never overtakes another. */
|
|
11
|
+
readonly saving: Readonly<Ref<readonly string[]>>;
|
|
12
|
+
/** Switches the e-mail of one category at once and saves it; a refusal (an enforced setting) or a failure puts the switch back and rejects. */
|
|
13
|
+
setEmail(category: string, enabled: boolean): Promise<void>;
|
|
14
|
+
/** Saves the quiet hours; the server's answer is what is shown after. A refusal rejects and changes nothing. */
|
|
15
|
+
saveQuietHours(input: QuietHoursInput): Promise<QuietHours>;
|
|
16
|
+
}
|
|
17
|
+
/** The settings of the signed-in person, read from `GET /v1/notifications/preferences` through the platform's client. */
|
|
18
|
+
export declare function useSettings(http?: HttpClient): Settings;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CategorySettings, Preferences, QuietHours } from "../../modules/notification/entities";
|
|
2
|
+
/** The preferences with one category's setting replaced (what the server answered, or what is shown before it does). */
|
|
3
|
+
export declare function withCategory(preferences: Preferences, settings: CategorySettings): Preferences;
|
|
4
|
+
/** One category's e-mail switched here, before the server answers: it is the person's own choice now. */
|
|
5
|
+
export declare function withEmail(preferences: Preferences, category: string, enabled: boolean): Preferences;
|
|
6
|
+
/** Minutes after midnight as the `"HH:mm"` a time field edits. */
|
|
7
|
+
export declare function timeOfMinutes(minutes: number): string;
|
|
8
|
+
/** A time field's `"HH:mm"` as minutes after midnight; null when it is empty. */
|
|
9
|
+
export declare function minutesOfTime(time: string | null): number | null;
|
|
10
|
+
/** What the quiet-hours form edits: the server's minutes as times of day. */
|
|
11
|
+
export interface QuietDraft {
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
start: string | null;
|
|
14
|
+
end: string | null;
|
|
15
|
+
}
|
|
16
|
+
export declare const draftOf: (quiet: QuietHours) => QuietDraft;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Item, StreamEvent } from "../modules/notification/entities";
|
|
2
|
+
/** What the inbox keeps: the notifications this app has loaded or been sent, newest first, and the server's unread count. */
|
|
3
|
+
export interface InboxContents {
|
|
4
|
+
readonly items: readonly Item[];
|
|
5
|
+
readonly unreadCount: number;
|
|
6
|
+
}
|
|
7
|
+
/** The newest id of a list: "Mark all as read" stops there, so a notification nobody has seen stays unread. 0 for none. */
|
|
8
|
+
export declare function newestId(items: readonly Item[]): number;
|
|
9
|
+
/** One notification marked read here (before the server answers). */
|
|
10
|
+
export declare function markedRead(items: readonly Item[], id: number, readAt: string): readonly Item[];
|
|
11
|
+
/** Everything up to `upToId` marked read here. */
|
|
12
|
+
export declare function markedReadUpTo(items: readonly Item[], upToId: number, readAt: string): readonly Item[];
|
|
13
|
+
/**
|
|
14
|
+
* The first page of a (re)load, with anything newer the stream brought while the request was on its way: the page was
|
|
15
|
+
* read before it, so it would otherwise vanish until the next load. Newest first, each id once.
|
|
16
|
+
*/
|
|
17
|
+
export declare function withNewer(page: readonly Item[], current: readonly Item[]): readonly Item[];
|
|
18
|
+
/** A further (older) page appended, ids already shown left out. */
|
|
19
|
+
export declare function withOlder(current: readonly Item[], page: readonly Item[]): readonly Item[];
|
|
20
|
+
/**
|
|
21
|
+
* One stream event applied. Every event carries the server's unread count and it always wins over counting here
|
|
22
|
+
* (NOTIF-READ-001); a reading on another device marks the same notifications read here. A "read all" names the newest
|
|
23
|
+
* id that device had seen, and only notifications up to it are read.
|
|
24
|
+
*/
|
|
25
|
+
export declare function applyStreamEvent(state: InboxContents, event: StreamEvent, readAt: string): InboxContents;
|
|
26
|
+
/** The unread count as a badge shows it: "99+" past 99. */
|
|
27
|
+
export declare function unreadBadge(count: number): string;
|