@mxpicture/gcp-functions-common 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/annotation/anno.head.d.ts +24 -0
  2. package/dist/annotation/anno.head.d.ts.map +1 -1
  3. package/dist/annotation/anno.head.js +24 -0
  4. package/dist/annotation/anno.head.js.map +1 -1
  5. package/dist/annotation/anno.property.d.ts +13 -0
  6. package/dist/annotation/anno.property.d.ts.map +1 -1
  7. package/dist/annotation/anno.property.js +13 -0
  8. package/dist/annotation/anno.property.js.map +1 -1
  9. package/dist/config/config.api.d.ts +24 -0
  10. package/dist/config/config.api.d.ts.map +1 -1
  11. package/dist/config/config.api.js +16 -0
  12. package/dist/config/config.api.js.map +1 -1
  13. package/dist/decorator/DecoArray.d.ts +67 -0
  14. package/dist/decorator/DecoArray.d.ts.map +1 -1
  15. package/dist/decorator/DecoArray.js +57 -0
  16. package/dist/decorator/DecoArray.js.map +1 -1
  17. package/dist/decorator/DecoBoolean.d.ts +19 -0
  18. package/dist/decorator/DecoBoolean.d.ts.map +1 -1
  19. package/dist/decorator/DecoBoolean.js +15 -0
  20. package/dist/decorator/DecoBoolean.js.map +1 -1
  21. package/dist/decorator/DecoDate.d.ts +22 -0
  22. package/dist/decorator/DecoDate.d.ts.map +1 -1
  23. package/dist/decorator/DecoDate.js +18 -0
  24. package/dist/decorator/DecoDate.js.map +1 -1
  25. package/dist/decorator/DecoNumber.d.ts +65 -0
  26. package/dist/decorator/DecoNumber.d.ts.map +1 -1
  27. package/dist/decorator/DecoNumber.js +55 -0
  28. package/dist/decorator/DecoNumber.js.map +1 -1
  29. package/dist/decorator/DecoObject.d.ts +21 -0
  30. package/dist/decorator/DecoObject.d.ts.map +1 -1
  31. package/dist/decorator/DecoObject.js +17 -0
  32. package/dist/decorator/DecoObject.js.map +1 -1
  33. package/dist/decorator/DecoProperty.d.ts +95 -0
  34. package/dist/decorator/DecoProperty.d.ts.map +1 -1
  35. package/dist/decorator/DecoProperty.js +94 -0
  36. package/dist/decorator/DecoProperty.js.map +1 -1
  37. package/dist/decorator/DecoString.d.ts +57 -0
  38. package/dist/decorator/DecoString.d.ts.map +1 -1
  39. package/dist/decorator/DecoString.js +48 -0
  40. package/dist/decorator/DecoString.js.map +1 -1
  41. package/dist/decorator/Decorator.d.ts +93 -0
  42. package/dist/decorator/Decorator.d.ts.map +1 -1
  43. package/dist/decorator/Decorator.js +74 -0
  44. package/dist/decorator/Decorator.js.map +1 -1
  45. package/dist/decorator/deco.cast.d.ts +42 -0
  46. package/dist/decorator/deco.cast.d.ts.map +1 -1
  47. package/dist/decorator/deco.cast.js +42 -0
  48. package/dist/decorator/deco.cast.js.map +1 -1
  49. package/dist/decorator/deco.enum.d.ts +37 -0
  50. package/dist/decorator/deco.enum.d.ts.map +1 -1
  51. package/dist/decorator/deco.enum.js +37 -0
  52. package/dist/decorator/deco.enum.js.map +1 -1
  53. package/dist/decorator/deco.names.d.ts +28 -0
  54. package/dist/decorator/deco.names.d.ts.map +1 -1
  55. package/dist/decorator/deco.names.js +6 -0
  56. package/dist/decorator/deco.names.js.map +1 -1
  57. package/dist/decorator/deco.paths.d.ts +20 -0
  58. package/dist/decorator/deco.paths.d.ts.map +1 -1
  59. package/dist/decorator/deco.paths.js +20 -0
  60. package/dist/decorator/deco.paths.js.map +1 -1
  61. package/dist/decorator/deco.properties.d.ts +20 -0
  62. package/dist/decorator/deco.properties.d.ts.map +1 -1
  63. package/dist/decorator/deco.properties.js +20 -0
  64. package/dist/decorator/deco.properties.js.map +1 -1
  65. package/dist/decorator/deco.routes.d.ts +10 -0
  66. package/dist/decorator/deco.routes.d.ts.map +1 -1
  67. package/dist/decorator/deco.routes.js +10 -0
  68. package/dist/decorator/deco.routes.js.map +1 -1
  69. package/dist/helper/FirebaseTimestamp.d.ts +76 -0
  70. package/dist/helper/FirebaseTimestamp.d.ts.map +1 -1
  71. package/dist/helper/FirebaseTimestamp.js +73 -0
  72. package/dist/helper/FirebaseTimestamp.js.map +1 -1
  73. package/dist/helper/helper.annotation.d.ts +10 -0
  74. package/dist/helper/helper.annotation.d.ts.map +1 -1
  75. package/dist/helper/helper.annotation.js +10 -0
  76. package/dist/helper/helper.annotation.js.map +1 -1
  77. package/dist/helper/helper.date.d.ts +23 -0
  78. package/dist/helper/helper.date.d.ts.map +1 -1
  79. package/dist/helper/helper.date.js +28 -1
  80. package/dist/helper/helper.date.js.map +1 -1
  81. package/dist/helper/helper.document.d.ts +10 -0
  82. package/dist/helper/helper.document.d.ts.map +1 -1
  83. package/dist/helper/helper.document.js +10 -0
  84. package/dist/helper/helper.document.js.map +1 -1
  85. package/dist/helper/helper.object.d.ts +7 -0
  86. package/dist/helper/helper.object.d.ts.map +1 -1
  87. package/dist/helper/helper.object.js +7 -0
  88. package/dist/helper/helper.object.js.map +1 -1
  89. package/dist/path/path.common.d.ts +48 -0
  90. package/dist/path/path.common.d.ts.map +1 -1
  91. package/dist/path/path.common.js +37 -4
  92. package/dist/path/path.common.js.map +1 -1
  93. package/dist/types/types.annotation.d.ts +28 -0
  94. package/dist/types/types.annotation.d.ts.map +1 -1
  95. package/dist/types/types.deco.common.d.ts +26 -0
  96. package/dist/types/types.deco.common.d.ts.map +1 -1
  97. package/dist/types/types.deco.property.d.ts +67 -0
  98. package/dist/types/types.deco.property.d.ts.map +1 -1
  99. package/dist/types/types.document.d.ts +29 -0
  100. package/dist/types/types.document.d.ts.map +1 -1
  101. package/dist/types/types.filter.d.ts +13 -0
  102. package/dist/types/types.filter.d.ts.map +1 -1
  103. package/dist/types/types.function.d.ts +20 -0
  104. package/dist/types/types.function.d.ts.map +1 -1
  105. package/dist/types/types.routes.d.ts +31 -0
  106. package/dist/types/types.routes.d.ts.map +1 -1
  107. package/dist/types/types.validation.d.ts +7 -0
  108. package/dist/types/types.validation.d.ts.map +1 -1
  109. package/package.json +4 -2
@@ -1 +1 @@
1
- {"version":3,"file":"DecoNumber.d.ts","sourceRoot":"","sources":["../../src/decorator/DecoNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,UAAU,kBAAyB,CAAC;AAEjD,qBAAa,UAAW,SAAQ,YAAY,CAAC,cAAc,CAAC;;IAKnD,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI1B,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAIpB,OAAO,CAAC,IAAI,GAAE,OAAc,GAAG,IAAI;IAInC,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAIpB,OAAO,CAAC,IAAI,GAAE,OAAc,GAAG,IAAI;IAInC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI7B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAItC"}
1
+ {"version":3,"file":"DecoNumber.d.ts","sourceRoot":"","sources":["../../src/decorator/DecoNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6BAA6B;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6BAA6B;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,kBAAyB,CAAC;AAEjD;;;;;;GAMG;AACH,qBAAa,UAAW,SAAQ,YAAY,CAAC,cAAc,CAAC;IAC1D,mEAAmE;;IAKnE;;;;;OAKG;IACI,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIjC;;;;;OAKG;IACI,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAI3B;;;;;OAKG;IACI,OAAO,CAAC,IAAI,GAAE,OAAc,GAAG,IAAI;IAI1C;;;;;OAKG;IACI,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAI3B;;;;;OAKG;IACI,OAAO,CAAC,IAAI,GAAE,OAAc,GAAG,IAAI;IAI1C;;;;;OAKG;IACI,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIpC;;;;;OAKG;IACI,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAItC"}
@@ -1,34 +1,89 @@
1
1
  import { DecoPropertyType } from "./deco.enum.js";
2
2
  import { DecoProperty } from "./DecoProperty.js";
3
+ /**
4
+ * Factory function that creates a new {@link DecoNumber} instance.
5
+ *
6
+ * @returns A fresh number property builder.
7
+ */
3
8
  export const decoNumber = () => new DecoNumber();
9
+ /**
10
+ * Fluent builder for configuring number-type decorator properties.
11
+ *
12
+ * @remarks
13
+ * Supports range constraints (min/max with optional exclusivity), multiples,
14
+ * and fractional digit limits.
15
+ */
4
16
  export class DecoNumber extends DecoProperty {
17
+ /** Creates a new number property builder with default settings. */
5
18
  constructor() {
6
19
  super(DecoPropertyType.number, {});
7
20
  }
21
+ /**
22
+ * Sets the default numeric value.
23
+ *
24
+ * @param def - The default value.
25
+ * @returns This instance for chaining.
26
+ */
8
27
  default(def) {
9
28
  this.data.default = def;
10
29
  return this;
11
30
  }
31
+ /**
32
+ * Sets the minimum allowed value.
33
+ *
34
+ * @param m - The minimum value.
35
+ * @returns This instance for chaining.
36
+ */
12
37
  min(m) {
13
38
  this.data.min = m;
14
39
  return this;
15
40
  }
41
+ /**
42
+ * Sets whether the minimum bound is exclusive.
43
+ *
44
+ * @param excl - `true` for exclusive minimum. Defaults to `true`.
45
+ * @returns This instance for chaining.
46
+ */
16
47
  minExcl(excl = true) {
17
48
  this.data.minExcl = excl;
18
49
  return this;
19
50
  }
51
+ /**
52
+ * Sets the maximum allowed value.
53
+ *
54
+ * @param m - The maximum value.
55
+ * @returns This instance for chaining.
56
+ */
20
57
  max(m) {
21
58
  this.data.max = m;
22
59
  return this;
23
60
  }
61
+ /**
62
+ * Sets whether the maximum bound is exclusive.
63
+ *
64
+ * @param excl - `true` for exclusive maximum. Defaults to `true`.
65
+ * @returns This instance for chaining.
66
+ */
24
67
  maxExcl(excl = true) {
25
68
  this.data.maxExcl = excl;
26
69
  return this;
27
70
  }
71
+ /**
72
+ * Constrains the value to be a multiple of the given number.
73
+ *
74
+ * @param val - The divisor.
75
+ * @returns This instance for chaining.
76
+ */
28
77
  multipleOf(val) {
29
78
  this.data.multipleOf = val;
30
79
  return this;
31
80
  }
81
+ /**
82
+ * Sets the number of fractional digits to preserve.
83
+ *
84
+ * @param digits - Maximum fraction digits.
85
+ * @returns This instance for chaining.
86
+ */
32
87
  fraction(digits) {
33
88
  this.data.fractionDigits = digits;
34
89
  return this;
@@ -1 +1 @@
1
- {"version":3,"file":"DecoNumber.js","sourceRoot":"","sources":["../../src/decorator/DecoNumber.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACl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
2
  import { DecoProperty } from "./DecoProperty.js";
3
3
  import { Decorator } from "./Decorator.js";
4
+ /**
5
+ * Configuration data for an object-type decorator property.
6
+ */
4
7
  export interface DecoObjectData extends DecoPropertyBase {
8
+ /** Reference to the nested {@link Decorator} that describes the object shape. */
5
9
  deco: Decorator;
6
10
  }
11
+ /**
12
+ * Factory function that creates a new {@link DecoObject} instance.
13
+ *
14
+ * @param deco - The {@link Decorator} that describes the nested object.
15
+ * @returns A fresh object property builder.
16
+ */
7
17
  export declare const decoObject: (deco: Decorator) => DecoObject;
18
+ /**
19
+ * Fluent builder for configuring object-type decorator properties.
20
+ *
21
+ * @remarks
22
+ * Wraps a nested {@link Decorator} to represent complex sub-document structures.
23
+ */
8
24
  export declare class DecoObject extends DecoProperty<DecoObjectData> {
25
+ /**
26
+ * Creates a new object property builder.
27
+ *
28
+ * @param deco - The {@link Decorator} describing the nested object structure.
29
+ */
9
30
  constructor(deco: Decorator);
10
31
  }
11
32
  //# sourceMappingURL=DecoObject.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DecoObject.d.ts","sourceRoot":"","sources":["../../src/decorator/DecoObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,GAAI,MAAM,SAAS,eAAyB,CAAC;AAEpE,qBAAa,UAAW,SAAQ,YAAY,CAAC,cAAc,CAAC;gBACvC,IAAI,EAAE,SAAS;CAGnC"}
1
+ {"version":3,"file":"DecoObject.d.ts","sourceRoot":"","sources":["../../src/decorator/DecoObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,iFAAiF;IACjF,IAAI,EAAE,SAAS,CAAC;CACjB;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,SAAS,eAAyB,CAAC;AAEpE;;;;;GAKG;AACH,qBAAa,UAAW,SAAQ,YAAY,CAAC,cAAc,CAAC;IAC1D;;;;OAIG;gBACgB,IAAI,EAAE,SAAS;CAGnC"}
@@ -1,7 +1,24 @@
1
1
  import { DecoPropertyType } from "./deco.enum.js";
2
2
  import { DecoProperty } from "./DecoProperty.js";
3
+ /**
4
+ * Factory function that creates a new {@link DecoObject} instance.
5
+ *
6
+ * @param deco - The {@link Decorator} that describes the nested object.
7
+ * @returns A fresh object property builder.
8
+ */
3
9
  export const decoObject = (deco) => new DecoObject(deco);
10
+ /**
11
+ * Fluent builder for configuring object-type decorator properties.
12
+ *
13
+ * @remarks
14
+ * Wraps a nested {@link Decorator} to represent complex sub-document structures.
15
+ */
4
16
  export class DecoObject extends DecoProperty {
17
+ /**
18
+ * Creates a new object property builder.
19
+ *
20
+ * @param deco - The {@link Decorator} describing the nested object structure.
21
+ */
5
22
  constructor(deco) {
6
23
  super(DecoPropertyType.object, { deco });
7
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DecoObject.js","sourceRoot":"","sources":["../../src/decorator/DecoObject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAOjD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAe,EAAE,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;AAEpE,MAAM,OAAO,UAAW,SAAQ,YAA4B;IAC1D,YAAmB,IAAe;QAChC,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,CAAC;CACF"}
1
+ {"version":3,"file":"DecoObject.js","sourceRoot":"","sources":["../../src/decorator/DecoObject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAWjD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAe,EAAE,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,OAAO,UAAW,SAAQ,YAA4B;IAC1D;;;;OAIG;IACH,YAAmB,IAAe;QAChC,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,CAAC;CACF"}
@@ -2,26 +2,121 @@ import type { DecoPropertyType } from "./deco.enum.js";
2
2
  import type { DecoParamsKind } from "../types/types.deco.common.js";
3
3
  import { DecoPropertyBase, DecoPropertyCommon, DecoPropertyRaw } from "../types/types.deco.property.js";
4
4
  import { AnnotationsProperty } from "../types/types.annotation.js";
5
+ /** A record mapping property names to their {@link DecoProperty} instances. */
5
6
  export type DecoProperties = Record<string, DecoProperty<DecoPropertyBase>>;
7
+ /**
8
+ * Generic fluent builder for decorator property metadata.
9
+ *
10
+ * @remarks
11
+ * Serves as the base class for all typed property builders (string, number,
12
+ * boolean, date, array, object). Common display and behaviour attributes are
13
+ * managed through the {@link DecoPropertyCommon} fields while type-specific
14
+ * data lives in the generic `T` payload.
15
+ *
16
+ * @typeParam T - The type-specific data interface extending {@link DecoPropertyBase}.
17
+ */
6
18
  export declare class DecoProperty<T extends DecoPropertyBase> {
7
19
  protected common: DecoPropertyCommon;
8
20
  protected data: T;
21
+ /**
22
+ * Creates a new property builder.
23
+ *
24
+ * @param type - The property type discriminator.
25
+ * @param initData - Initial type-specific data (excluding the `type` field).
26
+ */
9
27
  constructor(type: DecoPropertyType, initData: Omit<T, "type">);
28
+ /**
29
+ * Replaces common and/or type-specific data with the provided values via deep clone.
30
+ *
31
+ * @param p - Object containing optional `common` and `data` payloads.
32
+ * @returns This instance for chaining.
33
+ */
10
34
  setAll(p: {
11
35
  common?: DecoPropertyCommon;
12
36
  data?: T;
13
37
  }): this;
38
+ /**
39
+ * Sets the human-readable title for this property.
40
+ *
41
+ * @param val - Title string or kind-parameterised value.
42
+ * @returns This instance for chaining.
43
+ */
14
44
  title(val: DecoParamsKind<string>): this;
45
+ /**
46
+ * Sets the description text for this property.
47
+ *
48
+ * @param val - Description string or kind-parameterised value.
49
+ * @returns This instance for chaining.
50
+ */
15
51
  description(val: DecoParamsKind<string>): this;
52
+ /**
53
+ * Marks this property as optional.
54
+ *
55
+ * @param val - Whether the property is optional. Defaults to `true`.
56
+ * @returns This instance for chaining.
57
+ */
16
58
  optional(val?: boolean): this;
59
+ /**
60
+ * Marks this property as editable in the UI.
61
+ *
62
+ * @param val - Whether the property is editable. Defaults to `true`.
63
+ * @returns This instance for chaining.
64
+ */
17
65
  editable(val?: boolean): this;
66
+ /**
67
+ * Marks this property as sortable in table views.
68
+ *
69
+ * @param val - Whether the property is sortable. Defaults to `true`.
70
+ * @returns This instance for chaining.
71
+ */
18
72
  sortable(val?: boolean): this;
73
+ /**
74
+ * Marks this property as filterable in table views.
75
+ *
76
+ * @param val - Whether the property is filterable. Defaults to `true`.
77
+ * @returns This instance for chaining.
78
+ */
19
79
  filterable(val?: boolean): this;
80
+ /**
81
+ * Marks this property as hidden in the UI.
82
+ *
83
+ * @param val - Whether the property is hidden, or a kind-parameterised flag. Defaults to `true`.
84
+ * @returns This instance for chaining.
85
+ */
20
86
  hidden(val?: DecoParamsKind<boolean>): this;
87
+ /**
88
+ * Sets the display width for this property in table views.
89
+ *
90
+ * @param val - CSS-compatible width string (e.g. `"200px"`).
91
+ * @returns This instance for chaining.
92
+ */
21
93
  width(val: string): this;
94
+ /**
95
+ * Marks this property as dependent on the popin (responsive detail) column.
96
+ *
97
+ * @param val - Whether popin dependency is enabled. Defaults to `true`.
98
+ * @returns This instance for chaining.
99
+ */
22
100
  depandPopin(val?: boolean): this;
101
+ /**
102
+ * Sets the display order for this property.
103
+ *
104
+ * @param val - Numeric order or kind-parameterised value.
105
+ * @returns This instance for chaining.
106
+ */
23
107
  order(val: DecoParamsKind<number>): this;
108
+ /**
109
+ * Extracts a deep-cloned snapshot of the property's raw common and type-specific data.
110
+ *
111
+ * @returns A plain {@link DecoPropertyRaw} object safe to mutate independently.
112
+ */
24
113
  extractRaw(): DecoPropertyRaw<T>;
114
+ /**
115
+ * Converts this property into an {@link AnnotationsProperty} for code generation.
116
+ *
117
+ * @param propertyKey - The key/name of the property within its parent decorator.
118
+ * @returns The mapped annotations property representation.
119
+ */
25
120
  extractAnnotations(propertyKey: string): AnnotationsProperty<T>;
26
121
  }
27
122
  //# sourceMappingURL=DecoProperty.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DecoProperty.d.ts","sourceRoot":"","sources":["../../src/decorator/DecoProperty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGnE,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAE5E,qBAAa,YAAY,CAAC,CAAC,SAAS,gBAAgB;IAClD,SAAS,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACrC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;gBAEC,IAAI,EAAE,gBAAgB,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eAAe,CAAC,CAAC,CAAC;IAOvC;;;;;OAKG;IACI,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,mBAAmB,CAAC,CAAC,CAAC;CAGvE"}
@@ -1,11 +1,34 @@
1
1
  import { mapAnnotationsProperty } from "../annotation/anno.property.js";
2
+ /**
3
+ * Generic fluent builder for decorator property metadata.
4
+ *
5
+ * @remarks
6
+ * Serves as the base class for all typed property builders (string, number,
7
+ * boolean, date, array, object). Common display and behaviour attributes are
8
+ * managed through the {@link DecoPropertyCommon} fields while type-specific
9
+ * data lives in the generic `T` payload.
10
+ *
11
+ * @typeParam T - The type-specific data interface extending {@link DecoPropertyBase}.
12
+ */
2
13
  export class DecoProperty {
3
14
  common;
4
15
  data;
16
+ /**
17
+ * Creates a new property builder.
18
+ *
19
+ * @param type - The property type discriminator.
20
+ * @param initData - Initial type-specific data (excluding the `type` field).
21
+ */
5
22
  constructor(type, initData) {
6
23
  this.common = {};
7
24
  this.data = { ...initData, type };
8
25
  }
26
+ /**
27
+ * Replaces common and/or type-specific data with the provided values via deep clone.
28
+ *
29
+ * @param p - Object containing optional `common` and `data` payloads.
30
+ * @returns This instance for chaining.
31
+ */
9
32
  setAll(p) {
10
33
  if (p.common)
11
34
  this.common = structuredClone(p.common);
@@ -15,52 +38,123 @@ export class DecoProperty {
15
38
  }
16
39
  return this;
17
40
  }
41
+ /**
42
+ * Sets the human-readable title for this property.
43
+ *
44
+ * @param val - Title string or kind-parameterised value.
45
+ * @returns This instance for chaining.
46
+ */
18
47
  title(val) {
19
48
  this.common.title = val;
20
49
  return this;
21
50
  }
51
+ /**
52
+ * Sets the description text for this property.
53
+ *
54
+ * @param val - Description string or kind-parameterised value.
55
+ * @returns This instance for chaining.
56
+ */
22
57
  description(val) {
23
58
  this.common.description = val;
24
59
  return this;
25
60
  }
61
+ /**
62
+ * Marks this property as optional.
63
+ *
64
+ * @param val - Whether the property is optional. Defaults to `true`.
65
+ * @returns This instance for chaining.
66
+ */
26
67
  optional(val = true) {
27
68
  this.common.optional = val;
28
69
  return this;
29
70
  }
71
+ /**
72
+ * Marks this property as editable in the UI.
73
+ *
74
+ * @param val - Whether the property is editable. Defaults to `true`.
75
+ * @returns This instance for chaining.
76
+ */
30
77
  editable(val = true) {
31
78
  this.common.editable = val;
32
79
  return this;
33
80
  }
81
+ /**
82
+ * Marks this property as sortable in table views.
83
+ *
84
+ * @param val - Whether the property is sortable. Defaults to `true`.
85
+ * @returns This instance for chaining.
86
+ */
34
87
  sortable(val = true) {
35
88
  this.common.sortable = val;
36
89
  return this;
37
90
  }
91
+ /**
92
+ * Marks this property as filterable in table views.
93
+ *
94
+ * @param val - Whether the property is filterable. Defaults to `true`.
95
+ * @returns This instance for chaining.
96
+ */
38
97
  filterable(val = true) {
39
98
  this.common.filterable = val;
40
99
  return this;
41
100
  }
101
+ /**
102
+ * Marks this property as hidden in the UI.
103
+ *
104
+ * @param val - Whether the property is hidden, or a kind-parameterised flag. Defaults to `true`.
105
+ * @returns This instance for chaining.
106
+ */
42
107
  hidden(val = true) {
43
108
  this.common.hidden = val;
44
109
  return this;
45
110
  }
111
+ /**
112
+ * Sets the display width for this property in table views.
113
+ *
114
+ * @param val - CSS-compatible width string (e.g. `"200px"`).
115
+ * @returns This instance for chaining.
116
+ */
46
117
  width(val) {
47
118
  this.common.width = val;
48
119
  return this;
49
120
  }
121
+ /**
122
+ * Marks this property as dependent on the popin (responsive detail) column.
123
+ *
124
+ * @param val - Whether popin dependency is enabled. Defaults to `true`.
125
+ * @returns This instance for chaining.
126
+ */
50
127
  depandPopin(val = true) {
51
128
  this.common.depandPopin = val;
52
129
  return this;
53
130
  }
131
+ /**
132
+ * Sets the display order for this property.
133
+ *
134
+ * @param val - Numeric order or kind-parameterised value.
135
+ * @returns This instance for chaining.
136
+ */
54
137
  order(val) {
55
138
  this.common.order = val;
56
139
  return this;
57
140
  }
141
+ /**
142
+ * Extracts a deep-cloned snapshot of the property's raw common and type-specific data.
143
+ *
144
+ * @returns A plain {@link DecoPropertyRaw} object safe to mutate independently.
145
+ */
58
146
  extractRaw() {
59
147
  return structuredClone({
60
148
  common: this.common,
61
149
  data: this.data,
62
150
  });
63
151
  }
152
+ /**
153
+ * Converts this property into an {@link AnnotationsProperty} for code generation.
154
+ *
155
+ * @param propertyKey - The key/name of the property within its parent decorator.
156
+ * @returns The mapped annotations property representation.
157
+ */
64
158
  extractAnnotations(propertyKey) {
65
159
  return mapAnnotationsProperty(propertyKey, this.extractRaw());
66
160
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DecoProperty.js","sourceRoot":"","sources":["../../src/decorator/DecoProperty.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAIxE,MAAM,OAAO,YAAY;IACb,MAAM,CAAqB;IAC3B,IAAI,CAAI;IAElB,YAAmB,IAAsB,EAAE,QAAyB;QAClE,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,EAAE,GAAG,QAAQ,EAAE,IAAI,EAAO,CAAC;IACzC,CAAC;IAEM,MAAM,CAAC,CAA4C;QACxD,IAAI,CAAC,CAAC,MAAM;YAAE,IAAI,CAAC,MAAM,GAAG,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QAEtD,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;YACX,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YAC5B,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACnD,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,GAA2B;QACtC,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IACM,WAAW,CAAC,GAA2B;QAC5C,IAAI,CAAC,MAAM,CAAC,WAAW,GAAG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ertyBase } from "../types/types.deco.property.js";
2
2
  import { DecoProperty } from "./DecoProperty.js";
3
+ /**
4
+ * Configuration data for a string-type decorator property.
5
+ */
3
6
  export interface DecoStringData extends DecoPropertyBase {
7
+ /** Default string value. */
4
8
  default?: string;
9
+ /** Minimum character length. */
5
10
  minLength?: number;
11
+ /** Maximum character length. */
6
12
  maxLength?: number;
13
+ /** Exact character length required. */
7
14
  exactLength?: number;
15
+ /** Regular expression pattern the value must match. */
8
16
  regex?: string;
17
+ /** Whether this string serves as the document key. */
9
18
  key?: boolean;
10
19
  }
20
+ /**
21
+ * Factory function that creates a new {@link DecoString} instance.
22
+ *
23
+ * @returns A fresh string property builder.
24
+ */
11
25
  export declare const decoString: () => DecoString;
26
+ /**
27
+ * Fluent builder for configuring string-type decorator properties.
28
+ *
29
+ * @remarks
30
+ * Supports length constraints, regex validation, default values, and key designation.
31
+ */
12
32
  export declare class DecoString extends DecoProperty<DecoStringData> {
33
+ /** Creates a new string property builder with default settings. */
13
34
  constructor();
35
+ /**
36
+ * Sets the default string value.
37
+ *
38
+ * @param val - The default value.
39
+ * @returns This instance for chaining.
40
+ */
14
41
  default(val: string): this;
42
+ /**
43
+ * Sets the minimum character length.
44
+ *
45
+ * @param val - Minimum number of characters.
46
+ * @returns This instance for chaining.
47
+ */
15
48
  minLength(val: number): this;
49
+ /**
50
+ * Sets the maximum character length.
51
+ *
52
+ * @param val - Maximum number of characters.
53
+ * @returns This instance for chaining.
54
+ */
16
55
  maxLength(val: number): this;
56
+ /**
57
+ * Sets the exact character length required.
58
+ *
59
+ * @param val - Required number of characters.
60
+ * @returns This instance for chaining.
61
+ */
17
62
  exactLength(val: number): this;
63
+ /**
64
+ * Sets a regular expression pattern the value must match.
65
+ *
66
+ * @param val - The regex pattern string.
67
+ * @returns This instance for chaining.
68
+ */
18
69
  regex(val: string): this;
70
+ /**
71
+ * Marks this string as the document key field.
72
+ *
73
+ * @param val - Whether this is a key field. Defaults to `true`.
74
+ * @returns This instance for chaining.
75
+ */
19
76
  key(val?: boolean): this;
20
77
  }
21
78
  //# sourceMappingURL=DecoString.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DecoString.d.ts","sourceRoot":"","sources":["../../src/decorator/DecoString.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,eAAO,MAAM,UAAU,kBAAyB,CAAC;AAEjD,qBAAa,UAAW,SAAQ,YAAY,CAAC,cAAc,CAAC;;IAKnD,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI1B,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI5B,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI5B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI9B,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIxB,GAAG,CAAC,GAAG,GAAE,OAAc,GAAG,IAAI;CAItC"}
1
+ {"version":3,"file":"DecoString.d.ts","sourceRoot":"","sources":["../../src/decorator/DecoString.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,kBAAyB,CAAC;AAEjD;;;;;GAKG;AACH,qBAAa,UAAW,SAAQ,YAAY,CAAC,cAAc,CAAC;IAC1D,mEAAmE;;IAKnE;;;;;OAKG;IACI,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIjC;;;;;OAKG;IACI,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAInC;;;;;OAKG;IACI,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAInC;;;;;OAKG;IACI,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIrC;;;;;OAKG;IACI,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI/B;;;;;OAKG;IACI,GAAG,CAAC,GAAG,GAAE,OAAc,GAAG,IAAI;CAItC"}
@@ -1,30 +1,78 @@
1
1
  import { DecoPropertyType } from "./deco.enum.js";
2
2
  import { DecoProperty } from "./DecoProperty.js";
3
+ /**
4
+ * Factory function that creates a new {@link DecoString} instance.
5
+ *
6
+ * @returns A fresh string property builder.
7
+ */
3
8
  export const decoString = () => new DecoString();
9
+ /**
10
+ * Fluent builder for configuring string-type decorator properties.
11
+ *
12
+ * @remarks
13
+ * Supports length constraints, regex validation, default values, and key designation.
14
+ */
4
15
  export class DecoString extends DecoProperty {
16
+ /** Creates a new string property builder with default settings. */
5
17
  constructor() {
6
18
  super(DecoPropertyType.string, {});
7
19
  }
20
+ /**
21
+ * Sets the default string value.
22
+ *
23
+ * @param val - The default value.
24
+ * @returns This instance for chaining.
25
+ */
8
26
  default(val) {
9
27
  this.data.default = val;
10
28
  return this;
11
29
  }
30
+ /**
31
+ * Sets the minimum character length.
32
+ *
33
+ * @param val - Minimum number of characters.
34
+ * @returns This instance for chaining.
35
+ */
12
36
  minLength(val) {
13
37
  this.data.minLength = val;
14
38
  return this;
15
39
  }
40
+ /**
41
+ * Sets the maximum character length.
42
+ *
43
+ * @param val - Maximum number of characters.
44
+ * @returns This instance for chaining.
45
+ */
16
46
  maxLength(val) {
17
47
  this.data.maxLength = val;
18
48
  return this;
19
49
  }
50
+ /**
51
+ * Sets the exact character length required.
52
+ *
53
+ * @param val - Required number of characters.
54
+ * @returns This instance for chaining.
55
+ */
20
56
  exactLength(val) {
21
57
  this.data.exactLength = val;
22
58
  return this;
23
59
  }
60
+ /**
61
+ * Sets a regular expression pattern the value must match.
62
+ *
63
+ * @param val - The regex pattern string.
64
+ * @returns This instance for chaining.
65
+ */
24
66
  regex(val) {
25
67
  this.data.regex = val;
26
68
  return this;
27
69
  }
70
+ /**
71
+ * Marks this string as the document key field.
72
+ *
73
+ * @param val - Whether this is a key field. Defaults to `true`.
74
+ * @returns This instance for chaining.
75
+ */
28
76
  key(val = true) {
29
77
  this.data.key = val;
30
78
  return this;
@@ -1 +1 @@
1
- {"version":3,"file":"DecoString.js","sourceRoot":"","sources":["../../src/decorator/DecoString.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAWjD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,IAAI,UAAU,EAAE,CAAC;AAEjD,MAAM,OAAO,UAAW,SAAQ,YAA4B;IAC1D;QACE,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACrC,CAAC;IAEM,OAAO,CAAC,GAAW;QACxB,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC;QACxB,OAAO,IAAI,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