@docupace/ihub-config 1.1.25 → 1.1.26-sync.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.
Files changed (51) hide show
  1. package/dist/config-extension.d.ts +72 -1
  2. package/dist/config-extension.d.ts.map +1 -1
  3. package/dist/config-extension.js +2 -0
  4. package/dist/config-extension.js.map +1 -1
  5. package/dist/config-service.d.ts +31 -4
  6. package/dist/config-service.d.ts.map +1 -1
  7. package/dist/config-service.js +513 -24
  8. package/dist/config-service.js.map +1 -1
  9. package/dist/index.d.ts +4 -2
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +2 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/lib/named-array-merge.d.ts +29 -0
  14. package/dist/lib/named-array-merge.d.ts.map +1 -0
  15. package/dist/lib/named-array-merge.js +158 -0
  16. package/dist/lib/named-array-merge.js.map +1 -0
  17. package/dist/mappers/config-mapper.d.ts.map +1 -1
  18. package/dist/mappers/config-mapper.js +2 -0
  19. package/dist/mappers/config-mapper.js.map +1 -1
  20. package/dist/model/graphs/config/fields.graphql +45 -0
  21. package/dist/model/graphs/config/menu.graphql +6 -0
  22. package/dist/model/graphs/config/page.graphql +8 -1
  23. package/dist/model/graphs/config/panel.graphql +7 -0
  24. package/dist/model/graphs/config/query.graphql +9 -1
  25. package/dist/model/graphs/config/selectOptions.graphql +1 -0
  26. package/dist/model/graphs/config/table.graphql +26 -0
  27. package/dist/model/graphs/config/ui-components.graphql +1 -0
  28. package/dist/providers/index.d.ts +4 -0
  29. package/dist/providers/index.d.ts.map +1 -1
  30. package/dist/providers/index.js +5 -0
  31. package/dist/providers/index.js.map +1 -1
  32. package/dist/providers/screen-layout-patch.d.ts +6 -0
  33. package/dist/providers/screen-layout-patch.d.ts.map +1 -0
  34. package/dist/providers/screen-layout-patch.js +57 -0
  35. package/dist/providers/screen-layout-patch.js.map +1 -0
  36. package/dist/providers/whole-patch.d.ts +6 -0
  37. package/dist/providers/whole-patch.d.ts.map +1 -0
  38. package/dist/providers/whole-patch.js +2 -0
  39. package/dist/providers/whole-patch.js.map +1 -0
  40. package/dist/types/graphql.d.ts +4 -2
  41. package/dist/types/graphql.d.ts.map +1 -1
  42. package/dist/types/graphql.js.map +1 -1
  43. package/model/graphs/config/fields.graphql +45 -0
  44. package/model/graphs/config/menu.graphql +6 -0
  45. package/model/graphs/config/page.graphql +8 -1
  46. package/model/graphs/config/panel.graphql +7 -0
  47. package/model/graphs/config/query.graphql +9 -1
  48. package/model/graphs/config/selectOptions.graphql +1 -0
  49. package/model/graphs/config/table.graphql +26 -0
  50. package/model/graphs/config/ui-components.graphql +1 -0
  51. package/package.json +5 -3
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../src/types/graphql.ts"],"names":[],"mappings":"AA4CA,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,4CAAqB,CAAA;IACrB,wCAAiB,CAAA;IACjB,yDAAkC,CAAA;AACpC,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AA6eD,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,6BAAW,CAAA;AACb,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAyVD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AA4ZD,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,yCAAmB,CAAA;AACrB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAwBD,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,sCAAe,CAAA;AACjB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B"}
1
+ {"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../src/types/graphql.ts"],"names":[],"mappings":"AA4CA,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,4CAAqB,CAAA;IACrB,wCAAiB,CAAA;IACjB,yDAAkC,CAAA;AACpC,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AA8eD,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,6BAAW,CAAA;AACb,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAyVD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AA4ZD,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,yCAAmB,CAAA;AACrB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAwBD,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,sCAAe,CAAA;AACjB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B"}
@@ -64,12 +64,14 @@ type InputField implements IField & IRowElement & IElement {
64
64
  maxRows: Int
65
65
  minRows: Int
66
66
  # End of text area configuration
67
+ custom: Boolean
67
68
  }
68
69
 
69
70
  type CustomValidator implements IRowElement & IElement {
70
71
  validationRule: String
71
72
  errorMessage: String
72
73
  paths: [String!]!
74
+ custom: Boolean
73
75
  }
74
76
 
75
77
  union Fields = InputField | PhoneField | DateField | DateRangeField | SelectField | ToggleField | BooleanField | TextElement
@@ -93,6 +95,7 @@ type RepeaterField implements IRowElement & IElement {
93
95
  validateUnique: Boolean
94
96
  duplicateMessage: String
95
97
  itemValidation: ItemValidation
98
+ custom: Boolean
96
99
  }
97
100
 
98
101
  type ControlGroup implements IRowElement & IElement {
@@ -101,6 +104,38 @@ type ControlGroup implements IRowElement & IElement {
101
104
  skipId: Boolean
102
105
  controlOptions: ISelectOptions!
103
106
  fields: [Fields!]!
107
+ custom: Boolean
108
+ }
109
+
110
+ # Renders the currently-linked records of a multi-valued reference attribute
111
+ # (`path`) as a table (`columns`, reusing Table's Column config), with a quick
112
+ # typeahead (`search`, reusing Table's SimpleSearch/QuerySelectOptions config)
113
+ # to find and add records of `dataType`, and a delete affordance per row.
114
+ # `rowMenuItems` (reusing Table's MenuItem config) adds further per-row actions,
115
+ # e.g. an `action: "details"` item with a `url` to navigate to that record's own
116
+ # details page.
117
+ type ReferenceTable implements IField & IRowElement & IElement {
118
+ cols: Int
119
+ defaultValue: String
120
+ disabledCondition: String
121
+ excludeFromQueryInput: Boolean
122
+ hidden: Boolean
123
+ label: String
124
+ name: String!
125
+ path: String!
126
+ readonly: Boolean
127
+ required: Boolean
128
+ requiredCondition: String
129
+ skipQuery: Boolean
130
+ visibilityCondition: String
131
+ dataType: String!
132
+ columns: [Column!]!
133
+ search: SimpleSearch
134
+ addLabel: String
135
+ confirmDelete: Boolean
136
+ maxRows: Int
137
+ rowMenuItems: [MenuItem!]
138
+ custom: Boolean
104
139
  }
105
140
 
106
141
  type PhoneField implements IField & IRowElement & IElement {
@@ -119,6 +154,7 @@ type PhoneField implements IField & IRowElement & IElement {
119
154
  visibilityCondition: String
120
155
  disabledCondition: String
121
156
  validation: GenericFieldValidation
157
+ custom: Boolean
122
158
  }
123
159
 
124
160
  type DateField implements IField & IRowElement & IElement {
@@ -138,6 +174,7 @@ type DateField implements IField & IRowElement & IElement {
138
174
  minDate: String # e.q. "now" or "2025-03-20"
139
175
  maxDate: String # e.q. "now" or "2025-03-20"
140
176
  validation: GenericFieldValidation
177
+ custom: Boolean
141
178
  }
142
179
 
143
180
  type DateRangeField implements IDateRangeField & IRowElement & IElement {
@@ -157,6 +194,7 @@ type DateRangeField implements IDateRangeField & IRowElement & IElement {
157
194
  visibilityCondition: String
158
195
  disabledCondition: String
159
196
  validation: GenericFieldValidation
197
+ custom: Boolean
160
198
  }
161
199
 
162
200
  type SelectField implements IField & IRowElement & IElement {
@@ -182,6 +220,7 @@ type SelectField implements IField & IRowElement & IElement {
182
220
  helperText: String
183
221
  autoSelectSingleOption: Boolean
184
222
  validation: GenericFieldValidation
223
+ custom: Boolean
185
224
  }
186
225
 
187
226
  type ToggleField implements IField & IRowElement & IElement {
@@ -204,6 +243,7 @@ type ToggleField implements IField & IRowElement & IElement {
204
243
  disabledCondition: String
205
244
  linkedFields: [String!]
206
245
  validation: GenericFieldValidation
246
+ custom: Boolean
207
247
  }
208
248
 
209
249
  type BooleanField implements IField & IRowElement & IElement {
@@ -222,6 +262,7 @@ type BooleanField implements IField & IRowElement & IElement {
222
262
  disabledCondition: String
223
263
  linkedFields: [String!]
224
264
  validation: GenericFieldValidation
265
+ custom: Boolean
225
266
  }
226
267
 
227
268
  type ChipSelectWithInputField implements IField & IRowElement & IElement {
@@ -247,6 +288,7 @@ type ChipSelectWithInputField implements IField & IRowElement & IElement {
247
288
  disabledCondition: String
248
289
  linkedFields: [String!]
249
290
  validation: ChipSelectValidation
291
+ custom: Boolean
250
292
  }
251
293
 
252
294
  type CustomField implements IField & IRowElement & IElement {
@@ -266,6 +308,7 @@ type CustomField implements IField & IRowElement & IElement {
266
308
  visibilityCondition: String
267
309
  disabledCondition: String
268
310
  validation: GenericFieldValidation
311
+ custom: Boolean
269
312
  }
270
313
 
271
314
  type StatusChipField implements IField & IRowElement & IElement {
@@ -275,6 +318,7 @@ type StatusChipField implements IField & IRowElement & IElement {
275
318
  name: String!
276
319
  path: String!
277
320
  validation: GenericFieldValidation
321
+ custom: Boolean
278
322
  }
279
323
 
280
324
  type CheckboxGroupValue {
@@ -295,6 +339,7 @@ type CheckboxGroup implements IRowElement & IElement {
295
339
  values: [CheckboxGroupValue!]!
296
340
  visibilityCondition: String
297
341
  disabledCondition: String
342
+ custom: Boolean
298
343
  }
299
344
 
300
345
  enum FieldValueType {
@@ -25,6 +25,12 @@ type MenuItem implements IMenuItem {
25
25
  visibilityCondition: String
26
26
  disabledCondition: String
27
27
  config: JSON
28
+ """
29
+ Child menu items. When present, this item acts as a collapsible group
30
+ header rather than a navigable leaf (consumers should treat a MenuItem
31
+ with `items` and no `url` as a group).
32
+ """
33
+ items: [MenuItem!]
28
34
  }
29
35
 
30
36
  type ActionButton implements IMenuItem {
@@ -250,8 +250,15 @@ type Viewer {
250
250
  }
251
251
 
252
252
  type Breadcrumb {
253
- label: String!
253
+ label: String
254
254
  path: String
255
255
  isLabelExpression: Boolean
256
256
  isPathExpression: Boolean
257
+ """
258
+ Dot-notation paths (e.g. "name", "folder.title") to try, in order, against
259
+ the already-fetched page record to compute the breadcrumb label. Used only
260
+ when `isLabelExpression` is not set. If none of the paths resolve to a
261
+ non-empty value, the client falls back to the record's `id`.
262
+ """
263
+ valuePaths: [String!]
257
264
  }
@@ -27,4 +27,11 @@ type PanelRow implements IPanelRow {
27
27
  title: String
28
28
  titleVariant: String
29
29
  visibilityCondition: String
30
+ """
31
+ Screen Designer: true when this group exists only via the screen layout patch — no
32
+ counterpart in the raw base config — vs. `false`/absent for a real group (whether or
33
+ not the patch also overrides some of its properties). See `Tab.custom` for the full
34
+ reasoning; stamped the same way, one level down the tree.
35
+ """
36
+ custom: Boolean
30
37
  }
@@ -1,6 +1,14 @@
1
1
 
2
2
  type PageQuery {
3
- getPageConfig(path: String, context: JSON): Page
3
+ """
4
+ impersonateRoleId / impersonateGeneral: preview this page's config as
5
+ someone else would see it — either a specific role (impersonateRoleId)
6
+ or the site default with no role/personal override at all
7
+ (impersonateGeneral) — restricted to admins by the host's identity
8
+ resolution (see docupace-graphql-server's resolveCurrentIdentity), which
9
+ throws for a non-admin caller.
10
+ """
11
+ getPageConfig(path: String, context: JSON, impersonateRoleId: ID, impersonateGeneral: Boolean): Page
4
12
  getAIConfig(path: String, context: JSON): JSON
5
13
  }
6
14
 
@@ -9,6 +9,7 @@ type SelectOptionsFilter {
9
9
  type QuerySelectOptions implements ISelectOptions {
10
10
  type: String
11
11
  labelProp: String # defaults to "name" in ui
12
+ labelExpression: String # JS expression evaluated against each option (e.g. "`${option.name} (${option.internalId})`"); takes precedence over labelProp when set
12
13
  valueProp: String # defaults to "id" in ui
13
14
  queryName: String!
14
15
  variableDefinitions: JSON
@@ -34,6 +34,19 @@ interface ITable {
34
34
  expandable: Expandable
35
35
  totals: [TotalsItem!]
36
36
  config: JSON
37
+ configPath: String
38
+ configurableAttributes: [ConfigurableAttribute!]
39
+ """Admin-defined columns not present in this table's own base `columns`, available to add via the Configure Columns dialog. Site/tenant-scoped catalog — see `$.predefinedColumns` under `configurableAttributes`."""
40
+ predefinedColumns: [Column!]
41
+ """Admin-defined filter criteria not present in this table's own base `filter.criteria`, available to add via the Configure Filters dialog. Site/tenant-scoped catalog — see `$.predefinedFilters` under `configurableAttributes`."""
42
+ predefinedFilters: [TableCriteria!]
43
+ }
44
+
45
+ """One overridable sub-element of a config object identified by `configPath` — see the parent's own `configPath` field for how the two combine (`${configPath}#${configSubPath}`)."""
46
+ type ConfigurableAttribute {
47
+ name: String! # e.g. "columns", "filter" — matches the field name on the parent type
48
+ configPath: String! # copy of the parent object's own configPath, for convenience
49
+ configSubPath: String! # JSONPath relative to the parent object, e.g. "$.columns"
37
50
  }
38
51
 
39
52
  type TotalsItem {
@@ -91,6 +104,8 @@ enum TablePinnedPosition {
91
104
 
92
105
  type Toolbar {
93
106
  columns: ToolbarColumns
107
+ configureColumns: ToolbarColumns
108
+ configureFilters: ToolbarColumns
94
109
  }
95
110
 
96
111
  type ToolbarColumns {
@@ -157,6 +172,11 @@ type TableCriteria {
157
172
  selectOptions: ISelectOptions
158
173
  min: Float
159
174
  max: Float
175
+ visible: Boolean
176
+ """Set when this criterion was added by `$ref`-referencing a predefined/base criterion (e.g. `"#$.predefinedFilters[?(@.name=='status')]"`) rather than being copied inline — see the config-path override merge in `config-service.ts`. Clients that re-save this criterion unchanged should keep sending the same `$ref` (as this value) rather than flattening it into a full copy."""
177
+ ref: String
178
+ """True when this criterion would still show up — present by name *and* not hidden — without the current scope's own override, i.e. from a broader layer (a role/site override, or the table's own base template `filter.criteria`). Drives two things in the Configure Filters editor. Hide-vs-delete: "remove" must hide (`visible: false`) an inherited criterion, since deleting it from the override would just have it reappear from the broader layer on the next read, while a non-inherited one can be deleted outright. And pin-on-add: re-adding a *non*-inherited criterion must write an explicit `visible: true`, or the broader layer's `visible: false` is inherited per-attribute by the name-keyed merge and the criterion stays invisible however it's re-added. Computed fresh on every read in `config-service.ts`'s `applyConfigPathOverride` against the layers below the identity's own scope tier (`ConfigurationOverrideResult.inheritedSubPaths`), never persisted."""
179
+ inherited: Boolean
160
180
  }
161
181
 
162
182
  enum TableFilterVariant {
@@ -170,12 +190,18 @@ type Column {
170
190
  visible: Boolean
171
191
  paths: [String!]
172
192
  expression: String
193
+ """Which predefined formatter (if any) generated `expression` — e.g. `"commaList"`, `"custom"` — see `EXPRESSION_FORMATTERS`/`CUSTOM_FORMATTER_ID` in docupace-ui-main's `expressionGeneration.ts`. Absent for the raw/no-formatting default, which stores neither this nor `expression` at all. Without this field, a column's `expression` round-trips but the formatter that produced it doesn't, so the Configure Columns editor can't tell "built from a known formatter" apart from "hand-authored custom script" on reload and always falls back to showing the latter."""
194
+ formatterName: String
173
195
  component: String
174
196
  sortable: Boolean
175
197
  flex: Float
176
198
  pinned: TablePinnedPosition
177
199
  config: JSON
178
200
  filter: ColumnFilter
201
+ """Set when this column was added by `$ref`-referencing a predefined/base column (e.g. `"#$.predefinedColumns[?(@.name=='email')]"`) rather than being copied inline — see the config-path override merge in `config-service.ts`. Clients that re-save this column unchanged should keep sending the same `$ref` (as this value) rather than flattening it into a full copy."""
202
+ ref: String
203
+ """True when this column would still show up — present by name *and* not hidden — without the current scope's own override, i.e. from a broader layer (a role/site override, or the table's own base template `columns`). Drives hide-vs-delete and pin-on-add in the Configure Columns editor — see `TableCriteria.inherited`'s doc comment for the full reasoning, identical here."""
204
+ inherited: Boolean
179
205
  }
180
206
 
181
207
  type ColumnFilter {
@@ -8,4 +8,5 @@ type TextElement implements IRowElement & IElement {
8
8
  valueExpression: String
9
9
  variant: String
10
10
  visibilityCondition: String
11
+ custom: Boolean
11
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docupace/ihub-config",
3
- "version": "1.1.25",
3
+ "version": "1.1.26-sync.0",
4
4
  "description": "Reusable config GraphQL extension and standalone server",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
@@ -13,12 +13,13 @@
13
13
  "license": "ISC",
14
14
  "dependencies": {
15
15
  "@docupace/ihub-cache": "1.0.1",
16
- "@docupace/ihub-core": "0.0.114-alpha.1",
16
+ "@docupace/ihub-core": "2.0.3-admin.2",
17
17
  "axios": "^1.13.5",
18
18
  "cross-env": "^7.0.3",
19
19
  "dotenv": "^16.4.1",
20
- "graphql": "^16.8.1",
20
+ "graphql": "^16.14.0",
21
21
  "js-yaml": "^4.1.0",
22
+ "jsonpath": "^1.1.1",
22
23
  "lodash": "^4.17.21",
23
24
  "pino": "^10.3.1",
24
25
  "rimraf": "^6.1.3",
@@ -30,6 +31,7 @@
30
31
  "@graphql-codegen/typescript-resolvers": "4.0.6",
31
32
  "@types/jest": "^30.0.0",
32
33
  "@types/js-yaml": "^4.0.9",
34
+ "@types/jsonpath": "^0.2.4",
33
35
  "@types/lodash": "^4.17.7",
34
36
  "@types/node": "^20.10.6",
35
37
  "@typescript-eslint/eslint-plugin": "^7.10.0",