@docupace/ihub-config 1.1.23 → 1.1.24-admin.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config-extension.d.ts +23 -0
- package/dist/config-extension.d.ts.map +1 -1
- package/dist/config-extension.js +2 -0
- package/dist/config-extension.js.map +1 -1
- package/dist/config-service.d.ts +12 -3
- package/dist/config-service.d.ts.map +1 -1
- package/dist/config-service.js +313 -22
- package/dist/config-service.js.map +1 -1
- package/dist/mappers/config-mapper.d.ts.map +1 -1
- package/dist/mappers/config-mapper.js +1 -0
- package/dist/mappers/config-mapper.js.map +1 -1
- package/dist/model/graphs/config/fields.graphql +30 -0
- package/dist/model/graphs/config/menu.graphql +6 -0
- package/dist/model/graphs/config/page.graphql +8 -1
- package/dist/model/graphs/config/query.graphql +9 -1
- package/dist/model/graphs/config/rules.graphql +13 -1
- package/dist/model/graphs/config/selectOptions.graphql +1 -0
- package/dist/model/graphs/config/table.graphql +17 -0
- package/dist/types/graphql.d.ts +60 -5
- package/dist/types/graphql.d.ts.map +1 -1
- package/dist/types/graphql.js.map +1 -1
- package/model/graphs/config/fields.graphql +30 -0
- package/model/graphs/config/menu.graphql +6 -0
- package/model/graphs/config/page.graphql +8 -1
- package/model/graphs/config/query.graphql +9 -1
- package/model/graphs/config/rules.graphql +13 -1
- package/model/graphs/config/selectOptions.graphql +1 -0
- package/model/graphs/config/table.graphql +17 -0
- 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;
|
|
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;AAseD,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"}
|
|
@@ -103,6 +103,36 @@ type ControlGroup implements IRowElement & IElement {
|
|
|
103
103
|
fields: [Fields!]!
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
# Renders the currently-linked records of a multi-valued reference attribute
|
|
107
|
+
# (`path`) as a table (`columns`, reusing Table's Column config), with a quick
|
|
108
|
+
# typeahead (`search`, reusing Table's SimpleSearch/QuerySelectOptions config)
|
|
109
|
+
# to find and add records of `dataType`, and a delete affordance per row.
|
|
110
|
+
# `rowMenuItems` (reusing Table's MenuItem config) adds further per-row actions,
|
|
111
|
+
# e.g. an `action: "details"` item with a `url` to navigate to that record's own
|
|
112
|
+
# details page.
|
|
113
|
+
type ReferenceTable implements IField & IRowElement & IElement {
|
|
114
|
+
cols: Int
|
|
115
|
+
defaultValue: String
|
|
116
|
+
disabledCondition: String
|
|
117
|
+
excludeFromQueryInput: Boolean
|
|
118
|
+
hidden: Boolean
|
|
119
|
+
label: String
|
|
120
|
+
name: String!
|
|
121
|
+
path: String!
|
|
122
|
+
readonly: Boolean
|
|
123
|
+
required: Boolean
|
|
124
|
+
requiredCondition: String
|
|
125
|
+
skipQuery: Boolean
|
|
126
|
+
visibilityCondition: String
|
|
127
|
+
dataType: String!
|
|
128
|
+
columns: [Column!]!
|
|
129
|
+
search: SimpleSearch
|
|
130
|
+
addLabel: String
|
|
131
|
+
confirmDelete: Boolean
|
|
132
|
+
maxRows: Int
|
|
133
|
+
rowMenuItems: [MenuItem!]
|
|
134
|
+
}
|
|
135
|
+
|
|
106
136
|
type PhoneField implements IField & IRowElement & IElement {
|
|
107
137
|
cols: Int
|
|
108
138
|
defaultValue: String
|
|
@@ -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
|
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
type PageQuery {
|
|
3
|
-
|
|
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
|
|
|
@@ -15,7 +15,7 @@ type RuleGroup {
|
|
|
15
15
|
validationRules: [ValidationRule!]
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
union ValidationRule = ArrayTotalRule
|
|
18
|
+
union ValidationRule = ArrayTotalRule | ArrayCountRule
|
|
19
19
|
|
|
20
20
|
type ArrayTotalRule {
|
|
21
21
|
name: String
|
|
@@ -37,6 +37,18 @@ type ArrayTotalRule {
|
|
|
37
37
|
emptyIsValid: Boolean
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
"""Validates that the combined count of entries across multiple collections does not exceed a maximum."""
|
|
41
|
+
type ArrayCountRule {
|
|
42
|
+
name: String
|
|
43
|
+
message: String!
|
|
44
|
+
|
|
45
|
+
"""Paths to the collections whose combined count should be validated."""
|
|
46
|
+
paths: [String!]!
|
|
47
|
+
|
|
48
|
+
"""Maximum combined number of entries across all specified paths."""
|
|
49
|
+
maxCount: Int!
|
|
50
|
+
}
|
|
51
|
+
|
|
40
52
|
interface IFieldRule {
|
|
41
53
|
defaultValue: String
|
|
42
54
|
messageLabel: String
|
|
@@ -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,17 @@ 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"
|
|
37
48
|
}
|
|
38
49
|
|
|
39
50
|
type TotalsItem {
|
|
@@ -91,6 +102,8 @@ enum TablePinnedPosition {
|
|
|
91
102
|
|
|
92
103
|
type Toolbar {
|
|
93
104
|
columns: ToolbarColumns
|
|
105
|
+
configureColumns: ToolbarColumns
|
|
106
|
+
configureFilters: ToolbarColumns
|
|
94
107
|
}
|
|
95
108
|
|
|
96
109
|
type ToolbarColumns {
|
|
@@ -170,12 +183,16 @@ type Column {
|
|
|
170
183
|
visible: Boolean
|
|
171
184
|
paths: [String!]
|
|
172
185
|
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
|
|
173
188
|
component: String
|
|
174
189
|
sortable: Boolean
|
|
175
190
|
flex: Float
|
|
176
191
|
pinned: TablePinnedPosition
|
|
177
192
|
config: JSON
|
|
178
193
|
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
|
|
179
196
|
}
|
|
180
197
|
|
|
181
198
|
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.24-admin.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": "
|
|
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.
|
|
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",
|