@antelopejs/interface-dms 0.14.6 → 0.14.7-next.1000.g005d1ab

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.
Files changed (49) hide show
  1. package/dist/auth/db/models/sessions.model.d.ts +10 -1
  2. package/dist/auth/db/models/sessions.model.js +15 -4
  3. package/dist/auth/db/models/sessions.model.js.map +1 -1
  4. package/dist/base/chart-schemas.d.ts +252 -0
  5. package/dist/base/chart-schemas.js +14 -0
  6. package/dist/base/chart-schemas.js.map +1 -1
  7. package/dist/base/data-types/default/relations.d.ts +35 -2
  8. package/dist/base/data-types/default/relations.js +12 -8
  9. package/dist/base/data-types/default/relations.js.map +1 -1
  10. package/dist/base/form-relation-options.d.ts +70 -0
  11. package/dist/base/form-relation-options.js +3 -0
  12. package/dist/base/form-relation-options.js.map +1 -0
  13. package/dist/base/form-schema.d.ts +6 -58
  14. package/dist/base/form-schema.js.map +1 -1
  15. package/dist/base/period-selector.d.ts +8 -3
  16. package/dist/base/period-selector.js.map +1 -1
  17. package/dist/base/query-response.d.ts +48 -0
  18. package/dist/base/query-response.js +60 -5
  19. package/dist/base/query-response.js.map +1 -1
  20. package/dist/base/table-view/column-display.d.ts +9 -2
  21. package/dist/base/table-view/column-display.js.map +1 -1
  22. package/dist/base/table-view/internal/factory-private-actions.js +1 -0
  23. package/dist/base/table-view/internal/factory-private-actions.js.map +1 -1
  24. package/dist/base/table-view/internal/guards.d.ts +14 -1
  25. package/dist/base/table-view/internal/guards.js +26 -3
  26. package/dist/base/table-view/internal/guards.js.map +1 -1
  27. package/dist/base/table-view/internal/option-contract.d.ts +4 -1
  28. package/dist/base/types/guards.d.ts +18 -7
  29. package/dist/base/types/row-action.d.ts +7 -0
  30. package/dist/component-options/action-target.d.ts +20 -0
  31. package/dist/component-options/internal/action-target.d.ts +3 -1
  32. package/dist/component-options/internal/action-target.js +9 -1
  33. package/dist/component-options/internal/action-target.js.map +1 -1
  34. package/dist/component-options/row-action.d.ts +6 -0
  35. package/dist/invite-extensions/internal/payload-slices.js +6 -2
  36. package/dist/invite-extensions/internal/payload-slices.js.map +1 -1
  37. package/dist/page/internal/page-record.d.ts +2 -2
  38. package/dist/page/internal/page-record.js +9 -8
  39. package/dist/page/internal/page-record.js.map +1 -1
  40. package/dist/page/types.d.ts +2 -0
  41. package/docs/1.core/2.pages-and-modules.md +1 -0
  42. package/docs/2.auth/3.tokens-and-sessions.md +1 -1
  43. package/docs/3.base/11.page-layouts.md +2 -0
  44. package/docs/3.base/12.table-row-actions.md +1 -1
  45. package/docs/3.base/2.types.md +13 -5
  46. package/docs/3.base/4.tables.md +1 -1
  47. package/docs/3.base/5.charts-and-widgets.md +2 -2
  48. package/docs/3.base/8.data-types.md +3 -0
  49. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"guards.js","sourceRoot":"","sources":["../../../../src/base/table-view/internal/guards.ts"],"names":[],"mappings":";;;AAAA,6DAAyE;AACzE,uEAA2E;AAC3E,+DAAyD;AACzD,uEAIwC;AACxC,0EAGmD;AACnD,gEAA6D;AAC7D,6BAAwB;AACxB,kEAAsE;AAGtE,sDAAqD;AACrD,kCAAwC;AACxC,wCAAkD;AAClD,iCAA6C;AAC7C,mEAAgF;AAChF,2CAA+C;AAI/C,gGAAgG;AAChG,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,MAAM,cAAc,GAAG,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,EAAE,OAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAEhF,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,eAAe,GAAG,CAAC,OAAkB,EAAE,KAAa,EAAE,EAAE;IAC5D,I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AAI,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;YACzE,MAAM,WAAW,GAAG,uBAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YAC/C,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,WAAW,CACzC,IAAI,EACJ,GAAG,EACH,MAAM,EACN,WAAW,EACX,KAAK,CACN,CAAC;YACF,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CACtC,IAAI,EACJ,GAAG,EACH,MAAM,EACN,WAAW,EACX,GAAG,IAAI,CACR,CAAC;YACF,IAAI,UAAU;gBAAE,MAAM,aAAa,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;YAC5D,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,IAAI,EAAE,SAAS,CAAC,IAAI;QACpB,MAAM,EAAE,SAAS,CAAC,MAAM;KACzB,CAAC;AACJ,CAAC,CAAC;AArDW,QAAA,uBAAuB,GAAvB,uBAAuB,CAqDlC"}
1
+ {"version":3,"file":"guards.js","sourceRoot":"","sources":["../../../../src/base/table-view/internal/guards.ts"],"names":[],"mappings":";;;AAAA,6DAAyE;AACzE,uEAA2E;AAC3E,+DAAyD;AACzD,uEAIwC;AACxC,0EAGmD;AACnD,gEAA6D;AAC7D,6BAAwB;AACxB,kEAAsE;AAGtE,sDAAqD;AACrD,kCAAwC;AACxC,wCAAkD;AAClD,iCAA6C;AAC7C,mEAAgF;AAChF,2CAA+C;AAI/C,gGAAgG;AAChG,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,MAAM,cAAc,GAAG,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,EAAE,OAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAEhF,MAAM,WAAW,GAAG,OAAC,CAAC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,WAAW,EACX,KAAK,CACN,CAAC;YACF,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CACtC,IAAI,EACJ,GAAG,EACH,MAAM,EACN,WAAW,EACX,GAAG,IAAI,CACR,CAAC;YACF,IAAI,UAAU;gBAAE,MAAM,aAAa,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC;YAC1E,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,IAAI,EAAE,SAAS,CAAC,IAAI;QACpB,MAAM,EAAE,SAAS,CAAC,MAAM;KACzB,CAAC;AACJ,CAAC,CAAC;AAtDW,QAAA,uBAAuB,GAAvB,uBAAuB,CAsDlC"}
@@ -72,7 +72,10 @@ export interface TableViewLiveHoldOptions {
72
72
  * Defaults to true.
73
73
  */
74
74
  whileOnScreen?: boolean;
75
- /** While one of its rows is open in the side panel. Defaults to false. */
75
+ /**
76
+ * While one of its rows is open in a row action's side panel or drawer.
77
+ * Defaults to false.
78
+ */
76
79
  whileRowOpen?: boolean;
77
80
  /** While the user has scrolled its first row out of view. Defaults to false. */
78
81
  whileScrolled?: boolean;
@@ -43,15 +43,22 @@ export interface NewGuardArgs<T extends object = Record<string, unknown>> {
43
43
  * notification comparing the two belongs here. It runs in the same request,
44
44
  * on the same instance; a failure is logged and never fails the request, the
45
45
  * write being done.
46
+ *
47
+ * `TWritten` lists what it receives. After a `new` or an `edit`, that is
48
+ * `[written]`: the row as stored once the write is done, loaded as the edit
49
+ * guard's `current` is, so a created row comes with its new id. After a
50
+ * `delete`, `archive` or `restore` it receives nothing: the guard already
51
+ * holds the ids.
46
52
  */
47
- export type AfterWrite = () => void | Promise<void>;
53
+ export type AfterWrite<TWritten extends unknown[] = []> = (...written: TWritten) => void | Promise<void>;
48
54
  /**
49
55
  * Throws to refuse the action. A mutating guard (`edit`, `delete`, `archive`,
50
- * `restore`, `new`) may return an {@link AfterWrite}; what `get` returns is
51
- * ignored. It runs with the data controller instance as `this`
52
- * (`TController`), so a guard written as a `function` reaches its models.
56
+ * `restore`, `new`) may return an {@link AfterWrite}, called with the
57
+ * arguments `TWritten` lists; what `get` returns is ignored. It runs with the
58
+ * data controller instance as `this` (`TController`), so a guard written as a
59
+ * `function` reaches its models.
53
60
  */
54
- export type GuardFn<TArgs, TController = unknown> = (this: TController, ctx: RequestContext, args: TArgs) => void | AfterWrite | Promise<void | AfterWrite>;
61
+ export type GuardFn<TArgs, TController = unknown, TWritten extends unknown[] = []> = (this: TController, ctx: RequestContext, args: TArgs) => void | AfterWrite<TWritten> | Promise<void | AfterWrite<TWritten>>;
55
62
  /**
56
63
  * The guards of a table view. `T` is its data controller instance — the type
57
64
  * `TableView()` infers from the controller — so it types both the row a
@@ -60,9 +67,13 @@ export type GuardFn<TArgs, TController = unknown> = (this: TController, ctx: Req
60
67
  export interface TableViewGuards<T extends object = Record<string, unknown>> {
61
68
  /** Runs after view authorization and loading, before response and presence acquisition. Not used by exports. */
62
69
  get?: GuardFn<GetGuardArgs<T>, T>;
63
- edit?: GuardFn<EditGuardArgs<T>, T>;
70
+ edit?: GuardFn<EditGuardArgs<T>, T, [written: T & {
71
+ _id: string;
72
+ }]>;
64
73
  delete?: GuardFn<DeleteGuardArgs, T>;
65
74
  archive?: GuardFn<BulkGuardArgs, T>;
66
75
  restore?: GuardFn<BulkGuardArgs, T>;
67
- new?: GuardFn<NewGuardArgs<T>, T>;
76
+ new?: GuardFn<NewGuardArgs<T>, T, [written: T & {
77
+ _id: string;
78
+ }]>;
68
79
  }
@@ -66,6 +66,12 @@ export interface CustomRowAction<T extends object = Record<string, unknown>> {
66
66
  */
67
67
  confirm?: ActionConfirm;
68
68
  rule?: RowActionRule<T>;
69
+ /**
70
+ * Why `rule` keeps the action off a row (`$`: i18n key, receiving the row's
71
+ * fields as parameters). With it a table row keeps the action, disabled,
72
+ * and shows this text; without it the row hides the action.
73
+ */
74
+ disabledReason?: string;
69
75
  isVisible?: boolean;
70
76
  /**
71
77
  * Makes this action the target of a row click, ahead of the built-in
@@ -121,6 +127,7 @@ export interface CustomRowActionSerialized {
121
127
  target: ActionTargetSerialized;
122
128
  confirm?: ActionConfirmSerialized;
123
129
  rule?: RowActionRule;
130
+ disabledReason?: string;
124
131
  isVisible?: boolean;
125
132
  /**
126
133
  * Makes this action the target of a row click, ahead of the built-in
@@ -197,6 +197,16 @@ export type ActionTarget = ({
197
197
  * share link, a token).
198
198
  */
199
199
  copy?: string;
200
+ /**
201
+ * Page of the dashboard opened once the request succeeded, after the
202
+ * success toast: a path starting with `/` (an absolute URL is refused
203
+ * when the target is serialized). Takes the tokens of `url`, plus
204
+ * `{{response.<field>}}`, a field of the JSON response (a dotted path
205
+ * reads a nested one). A field the response lacks leaves the user on
206
+ * the page, with a console warning.
207
+ * @example "/sales/invoices/{{response._id}}"
208
+ */
209
+ redirect?: string;
200
210
  successMessage: string;
201
211
  } | {
202
212
  type: "exportJob";
@@ -285,6 +295,16 @@ export type ActionTargetSerialized = ({
285
295
  * share link, a token).
286
296
  */
287
297
  copy?: string;
298
+ /**
299
+ * Page of the dashboard opened once the request succeeded, after the
300
+ * success toast: a path starting with `/` (an absolute URL is refused
301
+ * when the target is serialized). Takes the tokens of `url`, plus
302
+ * `{{response.<field>}}`, a field of the JSON response (a dotted path
303
+ * reads a nested one). A field the response lacks leaves the user on
304
+ * the page, with a console warning.
305
+ * @example "/sales/invoices/{{response._id}}"
306
+ */
307
+ redirect?: string;
288
308
  successMessage: string;
289
309
  } | {
290
310
  type: "exportJob";
@@ -1,7 +1,9 @@
1
1
  import type { ActionTarget, ActionTargetSerialized } from "../action-target";
2
2
  /**
3
3
  * An action target as the options carry it: a component target is serialized,
4
- * every other kind is plain data already.
4
+ * every other kind is plain data already. Throws on an `api` target whose
5
+ * `redirect` is not a path of the dashboard (one leading `/`, so neither a
6
+ * scheme nor a protocol-relative `//host`).
5
7
  *
6
8
  * @internal
7
9
  */
@@ -1,9 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.serializeActionTarget = serializeActionTarget;
4
+ const DASHBOARD_PATH = /^\/(?![/\\])/;
4
5
  /**
5
6
  * An action target as the options carry it: a component target is serialized,
6
- * every other kind is plain data already.
7
+ * every other kind is plain data already. Throws on an `api` target whose
8
+ * `redirect` is not a path of the dashboard (one leading `/`, so neither a
9
+ * scheme nor a protocol-relative `//host`).
7
10
  *
8
11
  * @internal
9
12
  */
@@ -13,6 +16,11 @@ function serializeActionTarget(target) {
13
16
  target.type === "sidePanel") {
14
17
  return { ...target, component: target.component.serializeSync() };
15
18
  }
19
+ if (target.type === "api" &&
20
+ target.redirect !== undefined &&
21
+ !DASHBOARD_PATH.test(target.redirect)) {
22
+ throw new Error(`An "api" action target redirects to a path of the dashboard, starting with "/": "${target.redirect}" is not one`);
23
+ }
16
24
  return target;
17
25
  }
18
26
  //# sourceMappingURL=action-target.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"action-target.js","sourceRoot":"","sources":["../../../src/component-options/internal/action-target.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACH,+BACE,MAAoB;IAEpB,IACE,MAAM,CAAC,IAAI,KAAK,QAAQ;QACxB,MAAM,CAAC,IAAI,KAAK,OAAO;QACvB,MAAM,CAAC,IAAI,KAAK,WAAW,EAC3B,CAAC;QACD,OAAO,EAAE,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,EAAE,CAAC;IACpE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"action-target.js","sourceRoot":"","sources":["../../../src/component-options/internal/action-target.ts"],"names":[],"mappings":";;;AAEA,MAAM,cAAc,GAAG,cAAc,CAAC;AAEtC;;;;;;;GAOG;AACH,+BACE,MAAoB;IAEpB,IACE,MAAM,CAAC,IAAI,KAAK,QAAQ;QACxB,MAAM,CAAC,IAAI,KAAK,OAAO;QACvB,MAAM,CAAC,IAAI,KAAK,WAAW,EAC3B,CAAC;QACD,OAAO,EAAE,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,EAAE,CAAC;IACpE,CAAC;IACD,IACE,MAAM,CAAC,IAAI,KAAK,KAAK;QACrB,MAAM,CAAC,QAAQ,KAAK,SAAS;QAC7B,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EACrC,CAAC;QACD,MAAM,IAAI,KAAK,CACb,oFAAoF,MAAM,CAAC,QAAQ,cAAc,CAClH,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -49,6 +49,12 @@ export interface RowActionConfig<T extends object = Record<string, unknown>> {
49
49
  isEnabled?: boolean;
50
50
  isVisible?: boolean;
51
51
  rule?: RowActionRule<T>;
52
+ /**
53
+ * Why `rule` keeps the action off a row (`$`: i18n key, receiving the row's
54
+ * fields as parameters). With it a table row keeps the action, disabled,
55
+ * and shows this text; without it the row hides the action.
56
+ */
57
+ disabledReason?: string;
52
58
  /** Label in place of the built-in one ("Change roles"). `$`: i18n key. */
53
59
  label?: string;
54
60
  /** Icon in place of the built-in one. */
@@ -7,7 +7,6 @@ exports.sliceOf = sliceOf;
7
7
  exports.assertSliceValid = assertSliceValid;
8
8
  exports.readPayload = readPayload;
9
9
  const interface_api_1 = require("@antelopejs/interface-api");
10
- const interface_api_util_1 = require("@antelopejs/interface-api-util");
11
10
  const field_ids_1 = require("./field-ids");
12
11
  const type_check_1 = require("../../utils/internal/type-check");
13
12
  const registry_1 = require("./registry");
@@ -128,7 +127,12 @@ function sliceOf(key, body) {
128
127
  * @internal
129
128
  */
130
129
  function assertSliceValid(info, slice) {
131
- (0, interface_api_util_1.assertValidation)(slice, (v) => info.schema.parse(v), (error) => hasIssues(error) ? describeIssues(info.key, error.issues) : String(error), exports.HTTP_BAD_REQUEST);
130
+ try {
131
+ info.schema.parse(slice);
132
+ }
133
+ catch (error) {
134
+ throw new interface_api_1.HTTPResult(exports.HTTP_BAD_REQUEST, hasIssues(error) ? describeIssues(info.key, error.issues) : String(error));
135
+ }
132
136
  }
133
137
  /**
134
138
  * Parse the stored submission into the payload `onAccept` is typed for.
@@ -1 +1 @@
1
- {"version":3,"file":"payload-slices.js","sourceRoot":"","sources":["../../../src/invite-extensions/internal/payload-slices.ts"],"names":[],"mappings":";;;;;;;;AAAA,6DAAuD;AACvD,uEAAkE;AAClE,2CAGqB;AAErB,gEAMyC;AACzC,yCAAuD;AAQvD,gBAAgB;AACH,QAAA,gBAAgB,GAAG,GAAG,CAAC;AAYpC,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,CACL,IAAA,qBAAQ,EAAC,KAAK,CAAC;QACf,CAAC,IAAA,mBAAM,EAAC,KAAK,CAAC;QACd,MAAM,IAAI,KAAK;QACf,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;QACzB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,qBAAQ,EAAC,IAAI,CAAC,IAAI,IAAA,qBAAQ,EAAC,IAAI,CAAC,CAAC;QAC5D,SAAS,IAAI,KAAK;QAClB,IAAA,qBAAQ,EAAC,KAAK,CAAC,OAAO,CAAC,CACxB,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,IAAI,CAAC,IAAA,qBAAQ,EAAC,KAAK,CAAC,IAAI,IAAA,mBAAM,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,EAAE,CAAC;QAC9D,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,CAAC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ED;;;;GAIG;AACH,0BACE,IAAyB,EACzB,KAAwB;IAExB,IAAA,qCAAgB,EACd,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAC3B,CAAC,KAAK,EAAE,EAAE,CACR,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC3E,QAAA,gBAAgB,CACjB,CAAC;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,qBACE,IAAyB,EACzB,QAAoD,EACpD,OAA8B;IAE9B,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAE3C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC7C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,IAAA,oCAAyB,EACvB,IAAI,CAAC,GAAG,EACR,yBAAyB,EACzB,MAAM,CAAC,KAAK,CACb,CAAC;QACF,IAAI,OAAO,CAAC,cAAc;YAAE,MAAM,MAAM,CAAC,KAAK,CAAC;QAC/C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;AAChC,CAAC"}
1
+ {"version":3,"file":"payload-slices.js","sourceRoot":"","sources":["../../../src/invite-extensions/internal/payload-slices.ts"],"names":[],"mappings":";;;;;;;;AAAA,6DAAuD;AACvD,2CAGqB;AAErB,gEAMyC;AACzC,yCAAuD;AAQvD,gBAAgB;AACH,QAAA,gBAAgB,GAAG,GAAG,CAAC;AAYpC,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,CACL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BACE,IAAyB,EACzB,QAAoD,EACpD,OAA8B;IAE9B,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAE3C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC7C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,IAAA,oCAAyB,EACvB,IAAI,CAAC,GAAG,EACR,yBAAyB,EACzB,MAAM,CAAC,KAAK,CACb,CAAC;QACF,IAAI,OAAO,CAAC,cAAc;YAAE,MAAM,MAAM,CAAC,KAAK,CAAC;QAC/C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;AAChC,CAAC"}
@@ -18,8 +18,8 @@ export declare function readPageRecord(layout: ComponentInfo | undefined, contex
18
18
  /**
19
19
  * A header button as the page's record leaves it: unchanged when the layout
20
20
  * reads no record or the button does not act on it, left out (`undefined`)
21
- * when the record was not found, its target's `{{record.X}}` filled in
22
- * otherwise.
21
+ * when the record was not found, the `{{record.X}}` of its target's `url`
22
+ * (and of an `api` target's `redirect`) filled in otherwise.
23
23
  *
24
24
  * @internal
25
25
  */
@@ -11,6 +11,7 @@ const targetUrl = (target) => {
11
11
  const url = target?.url;
12
12
  return (0, type_check_1.isString)(url) ? url : undefined;
13
13
  };
14
+ const targetRedirect = (target) => target?.type === "api" ? target.redirect : undefined;
14
15
  const isRecordNode = (value) => !!value && typeof value === "object";
15
16
  function leafAt(record, path) {
16
17
  const value = path
@@ -46,8 +47,7 @@ async function readPageRecord(layout, context) {
46
47
  function isRecordBound(button) {
47
48
  if (button.requiresRecord)
48
49
  return true;
49
- const url = targetUrl(button.target);
50
- return !!url && NAMES_RECORD.test(url);
50
+ return [targetUrl(button.target), targetRedirect(button.target)].some((url) => !!url && NAMES_RECORD.test(url));
51
51
  }
52
52
  /**
53
53
  * A URL with its `{{record.X}}` tokens filled in, each value percent-encoded
@@ -63,8 +63,8 @@ function fillRecordTokens(url, record) {
63
63
  /**
64
64
  * A header button as the page's record leaves it: unchanged when the layout
65
65
  * reads no record or the button does not act on it, left out (`undefined`)
66
- * when the record was not found, its target's `{{record.X}}` filled in
67
- * otherwise.
66
+ * when the record was not found, the `{{record.X}}` of its target's `url`
67
+ * (and of an `api` target's `redirect`) filled in otherwise.
68
68
  *
69
69
  * @internal
70
70
  */
@@ -78,9 +78,10 @@ record) {
78
78
  const { target } = button;
79
79
  if (!target || !("url" in target) || !(0, type_check_1.isString)(target.url))
80
80
  return button;
81
- return {
82
- ...button,
83
- target: { ...target, url: fillRecordTokens(target.url, record) },
84
- };
81
+ const filled = { ...target, url: fillRecordTokens(target.url, record) };
82
+ if (filled.type === "api" && filled.redirect !== undefined) {
83
+ filled.redirect = fillRecordTokens(filled.redirect, record);
84
+ }
85
+ return { ...button, target: filled };
85
86
  }
86
87
  //# sourceMappingURL=page-record.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"page-record.js","sourceRoot":"","sources":["../../../src/page/internal/page-record.ts"],"names":[],"mappings":";;;;AAAA,gEAA6D;AAM7D,gEAIyC;AAEzC,MAAM,YAAY,GAAG,kCAAkC,CAAC;AACxD,MAAM,YAAY,GAAG,iBAAiB,CAAC;AACvC,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B,MAAM,SAAS,GAAG,CAChB,MAEa,EACO,EAAE;IACtB,MAAM,GAAG,GAAG,MAAM,EAAE,GAAG,CAAC;IACxB,OAAO,IAAA,qBAAQ,EAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;AACzC,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,KAAc,EAAoC,EAAE,CACxE,CAAC,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAA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AuB;AACvB,wPAAwP;AACxP,MAAqD;IAErD,IAAI,CAAC,cAAc,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IAC7D,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC9B,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC1B,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,IAAA,qBAAQ,EAAC,MAAM,CAAC,GAAG,CAAC;QAAE,OAAO,MAAM,CAAC;IAC1E,MAAM,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,CAAC;IACxE,IAAI,MAAM,CAAC,IAAI,KAAK,KAAK,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3D,MAAM,CAAC,QAAQ,GAAG,gBAAgB,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AACvC,CAAC"}
@@ -257,6 +257,8 @@ export interface MenuOptions {
257
257
  * status dot — the badge wins.
258
258
  */
259
259
  badge?: string;
260
+ /** Draws a first-level entry in the sidebar footer, above "Modules". */
261
+ placement?: "footer";
260
262
  /**
261
263
  * Default layout of the entry and of every page and sub-category declared
262
264
  * under it that sets none of its own (`Category("billing", { category,
@@ -73,6 +73,7 @@ The third argument is the page layout, a `ComponentInfo` from a layout builder s
73
73
  | `variant` | `MenuItemVariant` | Semantic look of the entry. |
74
74
  | `status` | `MenuItemStatus` | Semantic state dot at the end of the entry. |
75
75
  | `badge` | `string` | Short count or label at the end of the entry (`3`, `new`). It takes the place of `status` and of a counted navigation badge. |
76
+ | `placement` | `"footer"` | Draws a first-level entry in the sidebar footer, above "Modules". |
76
77
  | `layout` | `ComponentInfo` | Default layout of the entry and of every page and category under it that sets none. The nearest declaring ancestor wins, and a page's layout argument always overrides it. |
77
78
  | `bypassTenantAccessGate` | `boolean` | Keeps the page reachable while a tenant access gate denies the tenant. The pages of a flagged category inherit it. |
78
79
  | `live` | `PageLiveOptions` | Gives the page a Live and Pause state over the realtime of its blocks. Read on pages only. |
@@ -316,7 +316,7 @@ import {
316
316
  | Method | Signature | Description |
317
317
  | ------ | --------- | ----------- |
318
318
  | `replaceRefreshToken` | `(sessionId: string, refreshToken: string) => Promise<void>` | Makes a token the current one of the session, storing only its hash. Clears the sealed token and the predecessor, so no grace window applies. |
319
- | `rotateRefreshToken` | `(sessionId: string, presentedToken: string, refreshToken: string, rotatedAt?: Date) => Promise<string \| null>` | Replaces the presented token with a new one in one atomic update, and sets `lastActiveAt`. A client that presents the immediate predecessor within the 15-second grace window gets the current token back. Any other token gets `null`. |
319
+ | `rotateRefreshToken` | `(sessionId: string, presentedToken: string, refreshToken: string, rotatedAt?: Date) => Promise<string \| null>` | Replaces the presented token with a new one in one atomic update, and sets `lastActiveAt`. A client that presents the immediate predecessor within the 15-second grace window gets the current token back. Any other token, the predecessor after that window or an older token, is a replay: the session is deleted and the call returns `null`. Pass only a token whose signature you verified and whose claims name `sessionId`. |
320
320
  | `deleteInactiveSince` | `(threshold: Date) => Promise<void>` | Deletes the sessions last active before a date. |
321
321
  | `getByUserId` | `(userId: string) => Promise<Session[]>` | Every session of a user, read through the `userId` index. |
322
322
  | `deleteByUserId` | `(userId: string) => Promise<void>` | Deletes every session of a user. |
@@ -177,6 +177,8 @@ DefaultLayout({
177
177
  });
178
178
  ```
179
179
 
180
+ An `api` button's `redirect` takes the `{{record.X}}` tokens too, filled in the same way, and a button whose `redirect` names one acts on the record. `{{response.<field>}}` is filled by the browser once the call answered: `redirect: "/sites/{{response._id}}?from={{record.address}}"`.
181
+
180
182
  The record travels with the layout, so the header is drawn with it, on the server too, and never waits for it. Like an `availability`, it follows the page URL: the header asks for its buttons again when the route parameters or the query change, and once a write refreshed the page (`refreshPageBlocks()`, which a header button calls after a change, and a form once it saved). Its fields only shape the buttons; the route behind each one still checks the record on its own.
181
183
 
182
184
  #### A record deleted under the page
@@ -78,7 +78,7 @@ A `new` or `edit` `ResourceForm` block over the controller submits to the same r
78
78
 
79
79
  `RowActionConfig` (built-in actions) also takes `label`, `icon` and `confirm` (an `ActionConfirm`: a `ConfirmDialog`, or `{ from }`, a URL answering one for the row, on delete, archive and restore, for a single row); `BulkRowActionConfig` (delete, archive, restore) adds `successMessage`. `CustomRowAction` also takes `confirm`, `permission` (`ButtonPermission`: an action of the table by name, or an `Action`), `permissionId` (an absolute permission id, which wins over `permission`), `color`, `variant`, `showLabel`, `bulk` (`true` or `{ allMatching: true }`: offered on the selection bar, see below) and `deepLink` (a drawer, modal or side panel it opens is kept in the URL as `?record=<id>` (by default for a side panel, which `false` opts out of), or `?<tableId>.record=<id>` on a page with several table views). An action the caller fails the permission for is stripped per request like a custom button; it is only hidden, so the route its target calls must check the permission itself.
80
80
 
81
- A bulk custom action sends the selected ids as a repeated `ids` query parameter, or `allMatching=true` with the table's filters, search and archive view after "Select all N matching". `resolveBulkRowIds(this, ctx, user)`, called from a route of the table's data controller, or `resolveBulkRowIds({ model, tableView }, ctx, user)` (`BulkRowSource`: the model the calling route is given, and the table's `TableViewMeta`) from any other route, a page's included, answers the ids the action covers: the selected ones, or every matching row read like the list reads them, refusing more than `MAX_BULK_MATCHING_ROWS` (413). Either way the caller needs the table's `list` permission (403 otherwise). `BULK_ALL_MATCHING_KEY` is the query flag. The `api` action target also takes `body` (the confirmation's field values merged in) and `copy` (response field copied to the clipboard). `CustomButton` takes `placement` (`"toolbar"`, the default, or `"header"`: drawn in the page header, which the server adds it to); `rowActions.add` takes it too (`AddRowActionConfig`).
81
+ A bulk custom action sends the selected ids as a repeated `ids` query parameter, or `allMatching=true` with the table's filters, search and archive view after "Select all N matching". `resolveBulkRowIds(this, ctx, user)`, called from a route of the table's data controller, or `resolveBulkRowIds({ model, tableView }, ctx, user)` (`BulkRowSource`: the model the calling route is given, and the table's `TableViewMeta`) from any other route, a page's included, answers the ids the action covers: the selected ones, or every matching row read like the list reads them, refusing more than `MAX_BULK_MATCHING_ROWS` (413). Either way the caller needs the table's `list` permission (403 otherwise). `BULK_ALL_MATCHING_KEY` is the query flag. The `api` action target also takes `body` (the confirmation's field values merged in), `copy` (response field copied to the clipboard) and `redirect` (a dashboard path opened on success, taking `{{response.<field>}}` besides the tokens of `url`). `CustomButton` takes `placement` (`"toolbar"`, the default, or `"header"`: drawn in the page header, which the server adds it to); `rowActions.add` takes it too (`AddRowActionConfig`).
82
82
 
83
83
  When several table views share a data controller, each read action of its routes is guarded by the permission ids of every mounted table view, each write action by the writing table view's (`TableViewMeta.actionPermissionIds(action)`; any one suffices). `TableViewMeta.componentBuilders` lists them, `writingComponentBuilders` the ones that write.
84
84
 
@@ -151,7 +151,7 @@ import type { ActionTarget } from "@antelopejs/interface-dms/base/types/action-t
151
151
  | `"external"` | `url: string`, `newTab?: boolean`; the same tokens as `page` |
152
152
  | `"download"` | `url: string`, `filename?: string` (`DownloadActionTarget`); the same tokens as `page`, the file name taking them as written. Fetched with the user's session and saved under `filename`, else the server's `Content-Disposition` name, else the URL's last segment; a failure is toasted |
153
153
  | `"quickAction"` | `id: string` (`category:id`, or the bare id) |
154
- | `"api"` | `url: string`, `method?: "GET" \| "POST" \| "PUT" \| "DELETE" \| "PATCH"`, `body?`, `copy?`, `successMessage: string`; the same tokens as `page` |
154
+ | `"api"` | `url: string`, `method?: "GET" \| "POST" \| "PUT" \| "DELETE" \| "PATCH"`, `body?`, `copy?`, `redirect?: string`, `successMessage: string`; the same tokens as `page`. `redirect` is a dashboard path (starting with `/`, an absolute URL throws when the target is serialized) opened on success; it takes the tokens of `url` plus `{{response.<field>}}` (dotted paths allowed), and a field the response lacks leaves the user on the page |
155
155
  | `"exportJob"` | `url: string`, `method?: "GET" \| "POST"`, `statusUrl?`, `downloadUrl?`, `labels?`; the same tokens as `page`, plus `{{job.id}}` in `statusUrl` and `downloadUrl` |
156
156
 
157
157
  `SidePanelTargetOptions` sets the header the DMS draws above a `sidePanel` target's component: `title` (the action's label by default; `$`: an i18n key), `rowTitle`, the title while a row is open, an i18n key or a literal receiving the row's fields (`"{method} {path}"`), `positionLabel`, an i18n key receiving `{ index }` (from 1) and `{ total }` for the row's position among all the rows the table lists, its count rather than the page loaded (the DMS's "{index} of {total}" by default), and `deepLink`, which keeps the open row in the URL like the action's own `deepLink`. It is on by default for a side panel, `false` opting out (the action's own `deepLink` wins when set), and `notFound` (`SidePanelNotFoundTexts`: `title?`, `description?`), the state the panel draws with a close button when the row a link names answers 404. The panel is non-modal and docked on the right, one at a time with a module's side panels. It is meant for global, page-independent panels (an assistant dock): a detail or record panel opens in a `drawer`.
@@ -278,16 +278,24 @@ The imported `GuardFn` has this signature:
278
278
  ```typescript
279
279
  import type { RequestContext } from "@antelopejs/interface-api";
280
280
 
281
- type AfterWrite = () => void | Promise<void>;
281
+ type AfterWrite<TWritten extends unknown[] = []> = (
282
+ ...written: TWritten
283
+ ) => void | Promise<void>;
282
284
 
283
- type GuardFn<TArgs, TController = unknown> = (
285
+ type GuardFn<
286
+ TArgs,
287
+ TController = unknown,
288
+ TWritten extends unknown[] = [],
289
+ > = (
284
290
  this: TController,
285
291
  ctx: RequestContext,
286
292
  args: TArgs,
287
- ) => void | AfterWrite | Promise<void | AfterWrite>;
293
+ ) => void | AfterWrite<TWritten> | Promise<void | AfterWrite<TWritten>>;
288
294
  ```
289
295
 
290
- A mutating guard may return an `AfterWrite`: the table view runs it once the write succeeded, in the same request. It is where work comparing the row before the write (what the guard saw) with the row after belongs, such as a notification; a failure there is logged and does not fail the request, since the write is done. What a `get` guard returns is ignored.
296
+ A mutating guard may return an `AfterWrite`: the table view runs it once the write succeeded, in the same request. It is where work comparing the row before the write (what the guard saw) with the row after belongs, such as a notification or an audit entry; a failure there is logged and does not fail the request, since the write is done. What a `get` guard returns is ignored.
297
+
298
+ After a `new` or an `edit`, the `AfterWrite` receives `written`: the row as stored once the write is done, read back the way the edit guard's `current` is, so a created row comes with its new `_id`. `TableViewGuards<T>` types it as `T & { _id: string }`, through `AfterWrite<[written]>`; a bare `AfterWrite` takes no argument, and fits every guard. After a `delete`, `archive` or `restore` it receives nothing, since the guard already holds the ids.
291
299
 
292
300
  `ctx` is the `RequestContext` from `@antelopejs/interface-api`. `this` is the data controller instance, typed as such in `TableViewGuards<T>` (`TController` is `T` there), so a guard written as a `function` reaches the properties declared with `@Model` without a cast.
293
301
 
@@ -266,7 +266,7 @@ Typing `TableViewOptions` by `InstanceType<T>` is what makes row-action rules fi
266
266
  | `tabs` | `TableViewTab[]` | Tabs above the table, each applying a hidden filter on one column (`filter` optional). A tab may link to another page instead (`to`: page controller or path, `countFrom`: data controller or location for its counter); a tab with id `"all"` replaces the implicit one; `permission` (an action of the table) or `permissionId` (an absolute id) gates it; `navBadge` (`true`, or `{ tone }`) publishes its counter as the page's nav badge. Serialized as `TableViewTabSerialized` (`to` resolved per request, `toPage`). |
267
267
  | `realtime` | `boolean` | Set to `false` to disable realtime broadcast and presence for this resource. Realtime is on by default. |
268
268
  | `realtimeTopic` | `string \| string[]` | Topics the backend publishes on when rows change outside the table's routes: the table reads its rows again on each event. Registered against the page from `onCreated`; also offered by `TableView.fromSource`. |
269
- | `liveHold` | `boolean \| TableViewLiveHoldOptions` | On a page declared with `live`, keeps the rows while the page is paused, and in Direct while they are on screen or scrolled past (a new row at the top would push them down; `whileOnScreen: false` lets them follow the feed), and shows a "N new · Show" pill over the rows, which moves nothing, counting the rows its tab, search and filters match now beyond those it holds (asked of its count route), not the events; Show reads them once without leaving the pause. `{ whileRowOpen?, whileScrolled?, whileSearching?, whileSorted? }` (all default `false`) also holds the table alone, the page staying live, while a row is open in the side panel, its first row is scrolled out of view, the user's search narrows the rows or they are sorted otherwise than by `defaultSort`; the strip then names the reason ("Table on hold · search active"). `missedLabel` words the strip's count, given `{count}` ("12 new requests"); while the page is paused the strip adds the page's `setMissedDetail` breakdown. A `TableView.fromSource` route receives `liveHeldAt` (ISO 8601) on every request made while held. Also offered by `TableView.fromSource`. |
269
+ | `liveHold` | `boolean \| TableViewLiveHoldOptions` | On a page declared with `live`, keeps the rows while the page is paused, and in Direct while they are on screen or scrolled past (a new row at the top would push them down; `whileOnScreen: false` lets them follow the feed), and shows a "N new · Show" pill over the rows, which moves nothing, counting the rows its tab, search and filters match now beyond those it holds (asked of its count route), not the events; Show reads them once without leaving the pause. `{ whileRowOpen?, whileScrolled?, whileSearching?, whileSorted? }` (all default `false`) also holds the table alone, the page staying live, while a row is open in a row action's side panel or drawer, its first row is scrolled out of view, the user's search narrows the rows or they are sorted otherwise than by `defaultSort`; the strip then names the reason ("Table on hold · search active"). `missedLabel` words the strip's count, given `{count}` ("12 new requests"); while the page is paused the strip adds the page's `setMissedDetail` breakdown. A `TableView.fromSource` route receives `liveHeldAt` (ISO 8601) on every request made while held. Also offered by `TableView.fromSource`. |
270
270
  | `reorder` | `TableViewReorderOptions` | `{ field }`: rows ordered by hand with a drag handle, on the grid and on the `cards` display. `field` must be a `@Sortable()`, writable `NumberType` column, and the edit action on: registration throws otherwise. The rows are listed sorted on it, and a move saves only the rows whose value changed. |
271
271
  | `kanban` | `KanbanOptions` | Enable the kanban display. |
272
272
  | `grouped` | `GroupedOptions` | `{ groupByField, by?: "value" \| "day" \| "week", collapsible?, count? }`: offer the `grouped` display, the grid's columns under a header row per group. `groupByField` must be a `@Sortable()` column, a `DateType` one to group by day or week. |
@@ -445,7 +445,7 @@ const selector = PeriodSelector({
445
445
  | `id` | `string` | Scope identifier other widgets name in `periodScope`, and the prefix of the selector's URL keys. Defaults to `"page"` (`DEFAULT_PERIOD_SCOPE`). |
446
446
  | `defaultPreset` | `PeriodPreset` | Preset selected when neither the URL nor the user's last choice names one. |
447
447
  | `defaultComparison` | `PeriodComparison` | Comparison selected when neither the URL nor the user's last choice names one. |
448
- | `presets` | `PeriodPreset[]` | Presets offered. |
448
+ | `presets` | `PeriodPreset[]` | Presets offered. With `"custom"`, the user can type a start and an end date or pick them in the calendar; without it, the popover's date fields and calendar are read-only. |
449
449
  | `comparisons` | `PeriodComparison[]` | Comparisons offered. |
450
450
  | `presetLabels` | `Partial<Record<PeriodPreset, string>>` | Overrides for preset labels. |
451
451
  | `comparisonLabels` | `Partial<Record<PeriodComparison, string>>` | Overrides for comparison labels. |
@@ -456,7 +456,7 @@ const selector = PeriodSelector({
456
456
  | `comparisonControl` | `PeriodComparisonControl` | `"menu"`, `"toggle"` (one inline button switching a comparison on and off) or `"hidden"` (nothing drawn, the comparison kept on). Defaults to `"toggle"` when `comparisons` offers a single comparison besides `"none"`, `"menu"` otherwise. The menu's trigger names the compared window (`vs 16 – 17 Oct`, the option's name in its tooltip and its list), so the range label beside it keeps the current window only. |
457
457
  | `rememberKey` | `string` | Selectors carrying the same key share the remembered last choice, on any page. |
458
458
  | `variant` | `PeriodSelectorVariant` | `"default"` or `"segmented"`. |
459
- | `maxDays` | `number` | The longest custom range, in days (both ends included), the user can pick in the calendar or the date fields. Presets and a range given by the URL are not limited. |
459
+ | `maxDays` | `number` | The longest custom range, in days (both ends included), the user can pick in the calendar or the date fields (a typed range is cut once focus leaves its field). Presets and a range given by the URL are not limited. |
460
460
 
461
461
  `PeriodPreset` is `"last-hour"`, `"last-24h"`, `"today"`, `"yesterday"`, `"last-7-days"`, `"last-30-days"`, `"last-90-days"`, `"this-month"`, `"last-month"`, `"this-quarter"`, `"last-quarter"`, `"ytd"`, `"last-year"`, `"all"` or `"custom"`. `"all"` is every period: it has no bounds, so the bound widgets are sent no `from` / `to`. `PeriodComparison` is `"none"`, `"previous-period"`, `"previous-year"` or `"custom"`. `PeriodAlign` is `"left" | "center" | "right"`.
462
462
 
@@ -324,10 +324,13 @@ declare customerId: string;
324
324
  | `filterOnly` | `boolean` | Skip the join entirely: the raw scalar id stays in the list output and the funnel filter runs equality on it. A table cell, a card or a kanban card of that column then shows the id: lists draw the joined row only, they never read the ids by `?ids=`. |
325
325
  | `addForm` | `{ displayName?: string; description?: string }` | Title and description of the drawer the picker's "add" entry opens ("New customer"). `$`-prefixed: i18n keys. Default to "New entry". |
326
326
  | `filterBy` | `{ field, from }` | List only the target rows whose `field` equals the form's current value of the field `from`, e.g. `{ field: "customerId", from: "customerId" }` for a site among its customer's sites. `field` must be filterable on the target (`filterable: true` or `@Filter`); `decorateField` throws otherwise. |
327
+ | `filter` | `TableViewTabFilter` (`{ accessorKey, mode, value? }`) | List only the target rows meeting a fixed condition, written like a tab's filter, e.g. `{ accessorKey: "isArchived", mode: "ne", value: "true" }` for the active rows of an `@ArchiveField` table. `mode` is one the target field's filter takes: `eq` or `ne` for an archive field, a compare mode (`is`, `is_not`, `is_empty`, …) for a filterable column. `accessorKey` must be filterable on the target, as for `filterBy`. |
327
328
  | `fallback` | `string` | Text used in place of an empty value. |
328
329
 
329
330
  With `filterBy`, the picker sends the table filter syntax to the `select` endpoint (`filter_<field>=is:<value>`), which honors only the filters the target controller declares. It searches again when `from` changes and clears a pick made for its previous value; the pair a record loaded with is kept, and while `from` is empty every row is offered. It narrows what is offered only: a rule that must hold on save belongs to the module's routes.
330
331
 
332
+ With `filter`, the picker of a form sends `filter_<accessorKey>=<mode>:<value>` on every search, as a tab does, next to `filterBy`'s condition (both apply when they name the same field). The label read of the ids a record holds (`?ids=`) does not carry it, so a held row outside the condition keeps its label as long as the reader may see that row (an archived row stays hidden from a user without the `viewArchived` permission). A table filter's picker leaves it out and reaches every row.
333
+
331
334
  When the target controller exposes a `new` endpoint and has form fields, the picker of an editable form field also carries an inline "add" form built from the target's `new` fields, plus the permission id of the target's `add` action. That form (the target's fields, its validation schema, its own relations' add forms) is the bulk of the component, so a table column's type, its filter and a read-only field leave it out: they read the related rows through the `select` route, and a filter only picks among them.
332
335
 
333
336
  `CascaderRelationType<T>` is the same idea for a self-referencing table: the target's `select` endpoint returns a flat list, and the widget rebuilds the tree client-side. Its cell and its field name the picked row by its path, read by `?ids=` for the picked rows and then each level of their ancestors. Its `keyMapping` is required and adds `parent`, the field pointing at the parent row, which must itself carry `@Select()`, alongside the required `label` and `value`. It adds `maxDepth` and `leafOnly` to the relation options, and supports the same `filterOnly` behaviour. In a table cell it shows the path of the picked node ("Electronics / Audio"); a `multiple` one shows a badge per picked node, named by its own label with its path on hover, and folds those past three into `+N`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/interface-dms",
3
- "version": "0.14.6",
3
+ "version": "0.14.7-next.1000.g005d1ab",
4
4
  "description": "Public AntelopeJS interfaces of the DMS: pages, components, permissions, tenancy, auth, notifications and HTML rendering.",
5
5
  "keywords": [
6
6
  "antelopejs",
@@ -51,7 +51,7 @@
51
51
  "@antelopejs/interface-database": ">=0.4.0 <0.5.0",
52
52
  "@antelopejs/interface-database-decorators": ">=0.5.2 <0.6.0",
53
53
  "@antelopejs/interface-file-storage": ">=0.1.4 <0.2.0",
54
- "@antelopejs/tooling-configs": ">=0.8.4 <0.9.0",
54
+ "@antelopejs/tooling-configs": ">=0.8.7 <0.9.0",
55
55
  "@types/node": "^24.0.0",
56
56
  "@types/randomstring": "^1.3.0",
57
57
  "knip": "^6.34.0",
@@ -132,7 +132,7 @@
132
132
  "provenance": true,
133
133
  "registry": "https://registry.npmjs.org/"
134
134
  },
135
- "gitHead": "c2c574b0781d5e458950a85afa607939def2a79c",
135
+ "gitHead": "005d1ab7d792e9d6c3caaeda3a9061c040d3dd2e",
136
136
  "scripts": {
137
137
  "build": "rimraf dist && antelopejs-tsc",
138
138
  "typecheck": "antelopejs-tsc --noEmit",