@docupace/ihub-config 1.1.22-admin.6 → 1.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config-extension.d.ts +0 -23
- package/dist/config-extension.d.ts.map +1 -1
- package/dist/config-extension.js +0 -2
- package/dist/config-extension.js.map +1 -1
- package/dist/config-service.d.ts +3 -12
- package/dist/config-service.d.ts.map +1 -1
- package/dist/config-service.js +22 -313
- package/dist/config-service.js.map +1 -1
- package/dist/mappers/config-mapper.d.ts.map +1 -1
- package/dist/mappers/config-mapper.js +0 -1
- package/dist/mappers/config-mapper.js.map +1 -1
- package/dist/model/graphs/config/fields.graphql +23 -38
- package/dist/model/graphs/config/menu.graphql +0 -6
- package/dist/model/graphs/config/page.graphql +1 -8
- package/dist/model/graphs/config/query.graphql +1 -9
- package/dist/model/graphs/config/rules.graphql +2 -2
- package/dist/model/graphs/config/selectOptions.graphql +0 -1
- package/dist/model/graphs/config/table.graphql +0 -17
- package/dist/types/graphql.d.ts +26 -28
- package/dist/types/graphql.d.ts.map +1 -1
- package/dist/types/graphql.js.map +1 -1
- package/model/graphs/config/fields.graphql +23 -38
- package/model/graphs/config/menu.graphql +0 -6
- package/model/graphs/config/page.graphql +1 -8
- package/model/graphs/config/query.graphql +1 -9
- package/model/graphs/config/rules.graphql +2 -2
- package/model/graphs/config/selectOptions.graphql +0 -1
- package/model/graphs/config/table.graphql +0 -17
- package/package.json +3 -5
|
@@ -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;
|
|
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;AA0dD,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,6BAAW,CAAA;AACb,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAkVD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AA2ZD,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"}
|
|
@@ -32,6 +32,8 @@ interface IDateRangeField {
|
|
|
32
32
|
excludeFromQueryInput: Boolean
|
|
33
33
|
visibilityCondition: String
|
|
34
34
|
disabledCondition: String
|
|
35
|
+
validation: GenericFieldValidation
|
|
36
|
+
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
type InputField implements IField & IRowElement & IElement {
|
|
@@ -101,36 +103,6 @@ type ControlGroup implements IRowElement & IElement {
|
|
|
101
103
|
fields: [Fields!]!
|
|
102
104
|
}
|
|
103
105
|
|
|
104
|
-
# Renders the currently-linked records of a multi-valued reference attribute
|
|
105
|
-
# (`path`) as a table (`columns`, reusing Table's Column config), with a quick
|
|
106
|
-
# typeahead (`search`, reusing Table's SimpleSearch/QuerySelectOptions config)
|
|
107
|
-
# to find and add records of `dataType`, and a delete affordance per row.
|
|
108
|
-
# `rowMenuItems` (reusing Table's MenuItem config) adds further per-row actions,
|
|
109
|
-
# e.g. an `action: "details"` item with a `url` to navigate to that record's own
|
|
110
|
-
# details page.
|
|
111
|
-
type ReferenceTable implements IField & IRowElement & IElement {
|
|
112
|
-
cols: Int
|
|
113
|
-
defaultValue: String
|
|
114
|
-
disabledCondition: String
|
|
115
|
-
excludeFromQueryInput: Boolean
|
|
116
|
-
hidden: Boolean
|
|
117
|
-
label: String
|
|
118
|
-
name: String!
|
|
119
|
-
path: String!
|
|
120
|
-
readonly: Boolean
|
|
121
|
-
required: Boolean
|
|
122
|
-
requiredCondition: String
|
|
123
|
-
skipQuery: Boolean
|
|
124
|
-
visibilityCondition: String
|
|
125
|
-
dataType: String!
|
|
126
|
-
columns: [Column!]!
|
|
127
|
-
search: SimpleSearch
|
|
128
|
-
addLabel: String
|
|
129
|
-
confirmDelete: Boolean
|
|
130
|
-
maxRows: Int
|
|
131
|
-
rowMenuItems: [MenuItem!]
|
|
132
|
-
}
|
|
133
|
-
|
|
134
106
|
type PhoneField implements IField & IRowElement & IElement {
|
|
135
107
|
cols: Int
|
|
136
108
|
defaultValue: String
|
|
@@ -146,7 +118,7 @@ type PhoneField implements IField & IRowElement & IElement {
|
|
|
146
118
|
excludeFromQueryInput: Boolean
|
|
147
119
|
visibilityCondition: String
|
|
148
120
|
disabledCondition: String
|
|
149
|
-
validation:
|
|
121
|
+
validation: GenericFieldValidation
|
|
150
122
|
}
|
|
151
123
|
|
|
152
124
|
type DateField implements IField & IRowElement & IElement {
|
|
@@ -165,7 +137,7 @@ type DateField implements IField & IRowElement & IElement {
|
|
|
165
137
|
disabledCondition: String
|
|
166
138
|
minDate: String # e.q. "now" or "2025-03-20"
|
|
167
139
|
maxDate: String # e.q. "now" or "2025-03-20"
|
|
168
|
-
validation:
|
|
140
|
+
validation: GenericFieldValidation
|
|
169
141
|
}
|
|
170
142
|
|
|
171
143
|
type DateRangeField implements IDateRangeField & IRowElement & IElement {
|
|
@@ -184,6 +156,7 @@ type DateRangeField implements IDateRangeField & IRowElement & IElement {
|
|
|
184
156
|
excludeFromQueryInput: Boolean
|
|
185
157
|
visibilityCondition: String
|
|
186
158
|
disabledCondition: String
|
|
159
|
+
validation: GenericFieldValidation
|
|
187
160
|
}
|
|
188
161
|
|
|
189
162
|
type SelectField implements IField & IRowElement & IElement {
|
|
@@ -208,7 +181,7 @@ type SelectField implements IField & IRowElement & IElement {
|
|
|
208
181
|
excludeId: Boolean
|
|
209
182
|
helperText: String
|
|
210
183
|
autoSelectSingleOption: Boolean
|
|
211
|
-
validation:
|
|
184
|
+
validation: GenericFieldValidation
|
|
212
185
|
}
|
|
213
186
|
|
|
214
187
|
type ToggleField implements IField & IRowElement & IElement {
|
|
@@ -230,7 +203,7 @@ type ToggleField implements IField & IRowElement & IElement {
|
|
|
230
203
|
visibilityCondition: String
|
|
231
204
|
disabledCondition: String
|
|
232
205
|
linkedFields: [String!]
|
|
233
|
-
validation:
|
|
206
|
+
validation: GenericFieldValidation
|
|
234
207
|
}
|
|
235
208
|
|
|
236
209
|
type BooleanField implements IField & IRowElement & IElement {
|
|
@@ -248,7 +221,7 @@ type BooleanField implements IField & IRowElement & IElement {
|
|
|
248
221
|
visibilityCondition: String
|
|
249
222
|
disabledCondition: String
|
|
250
223
|
linkedFields: [String!]
|
|
251
|
-
validation:
|
|
224
|
+
validation: GenericFieldValidation
|
|
252
225
|
}
|
|
253
226
|
|
|
254
227
|
type ChipSelectWithInputField implements IField & IRowElement & IElement {
|
|
@@ -292,7 +265,7 @@ type CustomField implements IField & IRowElement & IElement {
|
|
|
292
265
|
excludeFromQueryInput: Boolean
|
|
293
266
|
visibilityCondition: String
|
|
294
267
|
disabledCondition: String
|
|
295
|
-
validation:
|
|
268
|
+
validation: GenericFieldValidation
|
|
296
269
|
}
|
|
297
270
|
|
|
298
271
|
type StatusChipField implements IField & IRowElement & IElement {
|
|
@@ -301,7 +274,7 @@ type StatusChipField implements IField & IRowElement & IElement {
|
|
|
301
274
|
label: String
|
|
302
275
|
name: String!
|
|
303
276
|
path: String!
|
|
304
|
-
validation:
|
|
277
|
+
validation: GenericFieldValidation
|
|
305
278
|
}
|
|
306
279
|
|
|
307
280
|
type CheckboxGroupValue {
|
|
@@ -329,9 +302,19 @@ enum FieldValueType {
|
|
|
329
302
|
Float
|
|
330
303
|
}
|
|
331
304
|
|
|
332
|
-
type
|
|
305
|
+
type GenericFieldValidation {
|
|
306
|
+
custom : CustomFieldValidation
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
type CustomFieldValidation {
|
|
333
310
|
expression: String
|
|
334
311
|
message: String
|
|
312
|
+
"""
|
|
313
|
+
Paths of other fields this expression reads. When one of these fields changes, this
|
|
314
|
+
field's validation is re-triggered so its error state stays in sync without requiring
|
|
315
|
+
the user to re-touch this field directly.
|
|
316
|
+
"""
|
|
317
|
+
dependentPaths: [String!]
|
|
335
318
|
}
|
|
336
319
|
|
|
337
320
|
type StringValidationRule {
|
|
@@ -363,11 +346,13 @@ type InputValidation {
|
|
|
363
346
|
format: [FormatValidationRule!]
|
|
364
347
|
min: FloatValidationRule
|
|
365
348
|
max: FloatValidationRule
|
|
349
|
+
custom: CustomFieldValidation
|
|
366
350
|
}
|
|
367
351
|
|
|
368
352
|
type ChipSelectValidation {
|
|
369
353
|
compatibleWith: CompatibleWithRule
|
|
370
354
|
uniqueInList: UniqueInListRule
|
|
355
|
+
custom : CustomFieldValidation
|
|
371
356
|
}
|
|
372
357
|
|
|
373
358
|
type CompatibleWithRule {
|
|
@@ -25,12 +25,6 @@ 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!]
|
|
34
28
|
}
|
|
35
29
|
|
|
36
30
|
type ActionButton implements IMenuItem {
|
|
@@ -250,15 +250,8 @@ 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!]
|
|
264
257
|
}
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
type PageQuery {
|
|
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
|
|
3
|
+
getPageConfig(path: String, context: JSON): Page
|
|
12
4
|
getAIConfig(path: String, context: JSON): JSON
|
|
13
5
|
}
|
|
14
6
|
|
|
@@ -56,7 +56,7 @@ type ListFieldRule implements IFieldRule {
|
|
|
56
56
|
requiredCondition: String
|
|
57
57
|
availabilityCondition: String # maps to visibilityCondition on UI
|
|
58
58
|
validationRules: [ListFieldValidationRule!]
|
|
59
|
-
validation:
|
|
59
|
+
validation: GenericFieldValidation
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
type ListFieldValidationRule {
|
|
@@ -100,5 +100,5 @@ type DateFieldRule implements IFieldRule {
|
|
|
100
100
|
availabilityCondition: String # maps to visibilityCondition on UI
|
|
101
101
|
minDate: String # e.q. "now" or "2025-03-20"
|
|
102
102
|
maxDate: String # e.q. "now" or "2025-03-20"
|
|
103
|
-
validation:
|
|
103
|
+
validation: GenericFieldValidation
|
|
104
104
|
}
|
|
@@ -9,7 +9,6 @@ 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
|
|
13
12
|
valueProp: String # defaults to "id" in ui
|
|
14
13
|
queryName: String!
|
|
15
14
|
variableDefinitions: JSON
|
|
@@ -34,17 +34,6 @@ 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
|
-
}
|
|
42
|
-
|
|
43
|
-
"""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}`)."""
|
|
44
|
-
type ConfigurableAttribute {
|
|
45
|
-
name: String! # e.g. "columns", "filter" — matches the field name on the parent type
|
|
46
|
-
configPath: String! # copy of the parent object's own configPath, for convenience
|
|
47
|
-
configSubPath: String! # JSONPath relative to the parent object, e.g. "$.columns"
|
|
48
37
|
}
|
|
49
38
|
|
|
50
39
|
type TotalsItem {
|
|
@@ -102,8 +91,6 @@ enum TablePinnedPosition {
|
|
|
102
91
|
|
|
103
92
|
type Toolbar {
|
|
104
93
|
columns: ToolbarColumns
|
|
105
|
-
configureColumns: ToolbarColumns
|
|
106
|
-
configureFilters: ToolbarColumns
|
|
107
94
|
}
|
|
108
95
|
|
|
109
96
|
type ToolbarColumns {
|
|
@@ -183,16 +170,12 @@ type Column {
|
|
|
183
170
|
visible: Boolean
|
|
184
171
|
paths: [String!]
|
|
185
172
|
expression: String
|
|
186
|
-
"""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."""
|
|
187
|
-
formatterName: String
|
|
188
173
|
component: String
|
|
189
174
|
sortable: Boolean
|
|
190
175
|
flex: Float
|
|
191
176
|
pinned: TablePinnedPosition
|
|
192
177
|
config: JSON
|
|
193
178
|
filter: ColumnFilter
|
|
194
|
-
"""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."""
|
|
195
|
-
ref: String
|
|
196
179
|
}
|
|
197
180
|
|
|
198
181
|
type ColumnFilter {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docupace/ihub-config",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.23",
|
|
4
4
|
"description": "Reusable config GraphQL extension and standalone server",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -13,13 +13,12 @@
|
|
|
13
13
|
"license": "ISC",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@docupace/ihub-cache": "1.0.1",
|
|
16
|
-
"@docupace/ihub-core": "
|
|
16
|
+
"@docupace/ihub-core": "0.0.114-alpha.1",
|
|
17
17
|
"axios": "^1.13.5",
|
|
18
18
|
"cross-env": "^7.0.3",
|
|
19
19
|
"dotenv": "^16.4.1",
|
|
20
|
-
"graphql": "^16.
|
|
20
|
+
"graphql": "^16.8.1",
|
|
21
21
|
"js-yaml": "^4.1.0",
|
|
22
|
-
"jsonpath": "^1.1.1",
|
|
23
22
|
"lodash": "^4.17.21",
|
|
24
23
|
"pino": "^10.3.1",
|
|
25
24
|
"rimraf": "^6.1.3",
|
|
@@ -31,7 +30,6 @@
|
|
|
31
30
|
"@graphql-codegen/typescript-resolvers": "4.0.6",
|
|
32
31
|
"@types/jest": "^30.0.0",
|
|
33
32
|
"@types/js-yaml": "^4.0.9",
|
|
34
|
-
"@types/jsonpath": "^0.2.4",
|
|
35
33
|
"@types/lodash": "^4.17.7",
|
|
36
34
|
"@types/node": "^20.10.6",
|
|
37
35
|
"@typescript-eslint/eslint-plugin": "^7.10.0",
|