@qoretechnologies/reqraft 0.10.59-pr.130.gff5fd49 → 0.10.59
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/components/form/engine/CompactRow.d.ts.map +1 -1
- package/dist/components/form/engine/CompactRow.js +18 -14
- package/dist/components/form/engine/CompactRow.js.map +1 -1
- package/dist/components/form/engine/CompactToolbar.d.ts.map +1 -1
- package/dist/components/form/engine/CompactToolbar.js +1 -1
- package/dist/components/form/engine/CompactToolbar.js.map +1 -1
- package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
- package/dist/components/form/engine/FormEngine.js +24 -29
- package/dist/components/form/engine/FormEngine.js.map +1 -1
- package/dist/components/form/engine/OptionFieldMessages.d.ts +7 -14
- package/dist/components/form/engine/OptionFieldMessages.d.ts.map +1 -1
- package/dist/components/form/engine/OptionFieldMessages.js +22 -6
- package/dist/components/form/engine/OptionFieldMessages.js.map +1 -1
- package/dist/components/form/engine/compactRowContext.d.ts +2 -0
- package/dist/components/form/engine/compactRowContext.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowContext.js.map +1 -1
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +33 -27
- package/dist/components/form/engine/compactRowStyles.js.map +1 -1
- package/dist/components/form/engine/revealRow.d.ts +53 -0
- package/dist/components/form/engine/revealRow.d.ts.map +1 -0
- package/dist/components/form/engine/revealRow.js +120 -0
- package/dist/components/form/engine/revealRow.js.map +1 -0
- package/dist/helpers/allowedValues.d.ts +11 -1
- package/dist/helpers/allowedValues.d.ts.map +1 -1
- package/dist/helpers/allowedValues.js +25 -2
- package/dist/helpers/allowedValues.js.map +1 -1
- package/package.json +1 -1
- package/src/components/form/engine/CompactRow.tsx +21 -19
- package/src/components/form/engine/CompactToolbar.tsx +8 -1
- package/src/components/form/engine/FormEngine.stories.tsx +499 -9
- package/src/components/form/engine/FormEngine.tsx +28 -23
- package/src/components/form/engine/OptionFieldMessages.tsx +27 -18
- package/src/components/form/engine/compactRowContext.ts +2 -0
- package/src/components/form/engine/compactRowStyles.ts +42 -0
- package/src/components/form/engine/revealRow.ts +123 -0
- package/src/helpers/allowedValues.ts +35 -2
- package/src/stories/Tests/utils.ts +36 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Bring a form row into view only when it is not already there, and never
|
|
4
|
+
* under a pinned header.
|
|
5
|
+
*
|
|
6
|
+
* A row that moves between status boxes (filling a field moves it from "Needs
|
|
7
|
+
* attention" to "Set") is followed so the reader does not lose it. That used
|
|
8
|
+
* to be `scrollIntoView({ block: 'center' })`, which scrolls even when the row
|
|
9
|
+
* is already in plain sight, and centres it against the whole scrollport while
|
|
10
|
+
* the box header pinned at the top hides part of it. In the qorus-ide schema
|
|
11
|
+
* editor the moved row landed with the "Needs attention" header (375-423)
|
|
12
|
+
* drawn over it (405).
|
|
13
|
+
*
|
|
14
|
+
* The visible area is the scrollport minus the pinned chrome above the row:
|
|
15
|
+
* the form's sticky toolbar and the sticky header of every status box the row
|
|
16
|
+
* sits in. Both are read from the DOM when the reveal runs, so a host's own
|
|
17
|
+
* offset, a toolbar that wraps, or a header that is not pinned at all are all
|
|
18
|
+
* accounted for without the caller knowing about them.
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.revealRow = exports.isRowInView = exports.getRevealClearance = exports.getPinnedChromeHeight = exports.findScrollContainer = void 0;
|
|
22
|
+
/** Selectors of the elements whose header may be pinned above a row. */
|
|
23
|
+
var PINNED_HEADER_OWNERS = '.options-readfirst-group, .options-readfirst-scroll > .reqore-panel';
|
|
24
|
+
var isScrollable = function (element) {
|
|
25
|
+
var overflowY = getComputedStyle(element).overflowY;
|
|
26
|
+
return ((overflowY === 'auto' || overflowY === 'scroll' || overflowY === 'overlay') &&
|
|
27
|
+
element.scrollHeight > element.clientHeight);
|
|
28
|
+
};
|
|
29
|
+
/** The nearest ancestor that actually scrolls; `undefined` means the viewport. */
|
|
30
|
+
var findScrollContainer = function (element) {
|
|
31
|
+
for (var parent_1 = element.parentElement; parent_1; parent_1 = parent_1.parentElement) {
|
|
32
|
+
if (parent_1 === document.body || parent_1 === document.documentElement) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
if (isScrollable(parent_1)) {
|
|
36
|
+
return parent_1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return undefined;
|
|
40
|
+
};
|
|
41
|
+
exports.findScrollContainer = findScrollContainer;
|
|
42
|
+
/**
|
|
43
|
+
* How far below the top of the scrollport the pinned chrome above `element`
|
|
44
|
+
* reaches: the largest `top + height` of any sticky header of an enclosing
|
|
45
|
+
* status box or form toolbar. Zero when nothing above it is pinned.
|
|
46
|
+
*/
|
|
47
|
+
var getPinnedChromeHeight = function (element) {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
var clearance = 0;
|
|
50
|
+
for (var owner = (_a = element.parentElement) === null || _a === void 0 ? void 0 : _a.closest(PINNED_HEADER_OWNERS); owner; owner = (_b = owner.parentElement) === null || _b === void 0 ? void 0 : _b.closest(PINNED_HEADER_OWNERS)) {
|
|
51
|
+
var header = owner.querySelector(':scope > .reqore-panel-title');
|
|
52
|
+
if (!header || header.contains(element)) {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
var style = getComputedStyle(header);
|
|
56
|
+
if (style.position !== 'sticky') {
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
var top_1 = parseFloat(style.top) || 0;
|
|
60
|
+
clearance = Math.max(clearance, top_1 + header.getBoundingClientRect().height);
|
|
61
|
+
}
|
|
62
|
+
return clearance;
|
|
63
|
+
};
|
|
64
|
+
exports.getPinnedChromeHeight = getPinnedChromeHeight;
|
|
65
|
+
/**
|
|
66
|
+
* How far below the top edge of the row's scrollport the pinned chrome reaches.
|
|
67
|
+
*
|
|
68
|
+
* A sticky `top` is measured from the scrollport's top edge INSET BY ITS
|
|
69
|
+
* PADDING, while `scrollIntoView` and `scroll-margin-top` align against the
|
|
70
|
+
* edge itself. Leaving the padding out put an opened row 16px under its box
|
|
71
|
+
* header inside a padded host scroller (the Storybook canvas, and any panel
|
|
72
|
+
* with padding).
|
|
73
|
+
*/
|
|
74
|
+
var getRevealClearance = function (element) {
|
|
75
|
+
var container = (0, exports.findScrollContainer)(element);
|
|
76
|
+
var inset = container ? parseFloat(getComputedStyle(container).paddingTop) || 0 : 0;
|
|
77
|
+
return inset + (0, exports.getPinnedChromeHeight)(element);
|
|
78
|
+
};
|
|
79
|
+
exports.getRevealClearance = getRevealClearance;
|
|
80
|
+
/**
|
|
81
|
+
* Whether the whole of `element` is visible below `clearance` (measured from
|
|
82
|
+
* the top edge of its scrollport, see {@link getRevealClearance}).
|
|
83
|
+
*/
|
|
84
|
+
var isRowInView = function (element, clearance) {
|
|
85
|
+
var container = (0, exports.findScrollContainer)(element);
|
|
86
|
+
var viewTop = container ? container.getBoundingClientRect().top + container.clientTop : 0;
|
|
87
|
+
var viewBottom = container ?
|
|
88
|
+
viewTop + container.clientHeight
|
|
89
|
+
: window.innerHeight || document.documentElement.clientHeight;
|
|
90
|
+
var rect = element.getBoundingClientRect();
|
|
91
|
+
return rect.top >= viewTop + clearance && rect.bottom <= viewBottom;
|
|
92
|
+
};
|
|
93
|
+
exports.isRowInView = isRowInView;
|
|
94
|
+
/**
|
|
95
|
+
* Scroll `element` the least distance that shows it clear of the pinned chrome
|
|
96
|
+
* above it — and not at all when it is already fully in view.
|
|
97
|
+
*
|
|
98
|
+
* `scroll-margin-top` is what keeps a row that has to come down from above from
|
|
99
|
+
* stopping under the header: `block: 'nearest'` aligns the row's margin box,
|
|
100
|
+
* so the row itself stops exactly below the pinned chrome.
|
|
101
|
+
*
|
|
102
|
+
* Returns whether a scroll was started.
|
|
103
|
+
*/
|
|
104
|
+
var revealRow = function (element, behavior) {
|
|
105
|
+
if (behavior === void 0) { behavior = 'smooth'; }
|
|
106
|
+
// jsdom implements neither layout nor `scrollIntoView`; a missing reveal must
|
|
107
|
+
// never break a form.
|
|
108
|
+
if (typeof element.scrollIntoView !== 'function') {
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
var clearance = (0, exports.getRevealClearance)(element);
|
|
112
|
+
if ((0, exports.isRowInView)(element, clearance)) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
element.style.scrollMarginTop = "".concat(clearance, "px");
|
|
116
|
+
element.scrollIntoView({ block: 'nearest', inline: 'nearest', behavior: behavior });
|
|
117
|
+
return true;
|
|
118
|
+
};
|
|
119
|
+
exports.revealRow = revealRow;
|
|
120
|
+
//# sourceMappingURL=revealRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revealRow.js","sourceRoot":"","sources":["../../../../src/components/form/engine/revealRow.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,wEAAwE;AACxE,IAAM,oBAAoB,GAAG,qEAAqE,CAAC;AAEnG,IAAM,YAAY,GAAG,UAAC,OAAoB;IAChC,IAAA,SAAS,GAAK,gBAAgB,CAAC,OAAO,CAAC,UAA9B,CAA+B;IAChD,OAAO,CACL,CAAC,SAAS,KAAK,MAAM,IAAI,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,SAAS,CAAC;QAC3E,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAC5C,CAAC;AACJ,CAAC,CAAC;AAEF,kFAAkF;AAC3E,IAAM,mBAAmB,GAAG,UAAC,OAAoB;IACtD,KAAK,IAAI,QAAM,GAAG,OAAO,CAAC,aAAa,EAAE,QAAM,EAAE,QAAM,GAAG,QAAM,CAAC,aAAa,EAAE,CAAC;QAC/E,IAAI,QAAM,KAAK,QAAQ,CAAC,IAAI,IAAI,QAAM,KAAK,QAAQ,CAAC,eAAe,EAAE,CAAC;YACpE,OAAO,SAAS,C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GAAG,UAAG,SAAS,OAAI,CAAC;IACjD,OAAO,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,UAAA,EAAE,CAAC,CAAC;IAC1E,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAbW,QAAA,SAAS,aAapB"}
|
|
@@ -41,6 +41,14 @@ export interface IChoiceFieldSchema {
|
|
|
41
41
|
/** Set when the value is an expression, which is resolved at run time. */
|
|
42
42
|
isFunction?: boolean;
|
|
43
43
|
is_expression?: boolean;
|
|
44
|
+
/** The editor the field is drawn with; see {@link hasOwnEditor}. */
|
|
45
|
+
ui_type?: string | readonly string[];
|
|
46
|
+
/**
|
|
47
|
+
* Set by a form that knows the field is drawn by a bespoke editor of the
|
|
48
|
+
* consumer's own (one it declared in `rendererOnlyUiTypes`), which reqraft's
|
|
49
|
+
* built-in list cannot name.
|
|
50
|
+
*/
|
|
51
|
+
hasOwnEditor?: boolean;
|
|
44
52
|
}
|
|
45
53
|
/**
|
|
46
54
|
* The parts of a stored value that are not among the field's fixed choices.
|
|
@@ -52,7 +60,9 @@ export interface IChoiceFieldSchema {
|
|
|
52
60
|
* all of which are resolved when the interface runs;
|
|
53
61
|
* - `allowed_values: []` — the server has no choices to offer right now, which
|
|
54
62
|
* is "unknown", not "nothing is allowed";
|
|
55
|
-
* - creatable choices, where any value may be added
|
|
63
|
+
* - creatable choices, where any value may be added;
|
|
64
|
+
* - a field drawn by a bespoke editor (a renderer-only `ui_type` such as
|
|
65
|
+
* `tool-catalog`), whose values are whatever that editor says they are.
|
|
56
66
|
*
|
|
57
67
|
* A single-valued field is judged as a whole. A multi-select field, and a list
|
|
58
68
|
* whose elements are constrained by `element_allowed_values`, are judged per
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowedValues.d.ts","sourceRoot":"","sources":["../../src/helpers/allowedValues.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"allowedValues.d.ts","sourceRoot":"","sources":["../../src/helpers/allowedValues.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AASrE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,sBAAsB,UAC1B,OAAO,WACL,qBAAqB,KAC7B,GAAG,GAAG,SAoCR,CAAC;AAuBF,2DAA2D;AAC3D,MAAM,WAAW,kBAAkB;IACjC,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC;IACvB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,sBAAsB,CAAC,EAAE,GAAG,EAAE,CAAC;IAC/B,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IACrC;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAkBD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,kBAAkB,UAAW,OAAO,UAAU,kBAAkB,KAAG,OAAO,EAkDtF,CAAC;AAqBF;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,UAC3B,OAAO,UACN,kBAAkB,KACzB,MAAM,GAAG,SAUX,CAAC"}
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getUnlistedChoiceReason = exports.getUnlistedChoices = exports.findAllowedValueOption = void 0;
|
|
7
7
|
var isEqual_1 = __importDefault(require("lodash/isEqual"));
|
|
8
|
+
var rendererTypes_1 = require("../components/form/engine/rendererTypes");
|
|
8
9
|
var common_1 = require("./common");
|
|
9
10
|
var options_1 = require("./options");
|
|
10
11
|
var templates_1 = require("./templates");
|
|
@@ -84,6 +85,22 @@ var isEmptyChoiceValue = function (value) {
|
|
|
84
85
|
value === '' ||
|
|
85
86
|
(Array.isArray(value) && value.length === 0);
|
|
86
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* Does a bespoke editor, rather than reqraft's choice picker, draw this field?
|
|
90
|
+
*
|
|
91
|
+
* Then the editor alone decides what a value means, and `allowed_values` is not
|
|
92
|
+
* a closed set of values the field may hold. The AI endpoint's Tools field is
|
|
93
|
+
* the case that proved it: its `tool-catalog` editor stores SELECTORS -- `*` for
|
|
94
|
+
* every tool, `system:*`, a connection name, `connection/tool` -- and the host
|
|
95
|
+
* hangs the tool catalogue's SOURCES on `allowed_values` for the editor to
|
|
96
|
+
* browse. Judging the selectors against the sources flagged the server's own
|
|
97
|
+
* default, `["*"]`, as "not one of the choices", so no chat endpoint could be
|
|
98
|
+
* published with it. The server says the same: a custom `ui_type` "defines its
|
|
99
|
+
* own value shape".
|
|
100
|
+
*/
|
|
101
|
+
var hasOwnEditor = function (field) {
|
|
102
|
+
return !!field.hasOwnEditor || (0, rendererTypes_1.isRendererOnlyUiType)(field.ui_type);
|
|
103
|
+
};
|
|
87
104
|
/**
|
|
88
105
|
* The parts of a stored value that are not among the field's fixed choices.
|
|
89
106
|
*
|
|
@@ -94,7 +111,9 @@ var isEmptyChoiceValue = function (value) {
|
|
|
94
111
|
* all of which are resolved when the interface runs;
|
|
95
112
|
* - `allowed_values: []` — the server has no choices to offer right now, which
|
|
96
113
|
* is "unknown", not "nothing is allowed";
|
|
97
|
-
* - creatable choices, where any value may be added
|
|
114
|
+
* - creatable choices, where any value may be added;
|
|
115
|
+
* - a field drawn by a bespoke editor (a renderer-only `ui_type` such as
|
|
116
|
+
* `tool-catalog`), whose values are whatever that editor says they are.
|
|
98
117
|
*
|
|
99
118
|
* A single-valued field is judged as a whole. A multi-select field, and a list
|
|
100
119
|
* whose elements are constrained by `element_allowed_values`, are judged per
|
|
@@ -102,7 +121,11 @@ var isEmptyChoiceValue = function (value) {
|
|
|
102
121
|
*/
|
|
103
122
|
var getUnlistedChoices = function (value, field) {
|
|
104
123
|
var _a, _b;
|
|
105
|
-
if (!field ||
|
|
124
|
+
if (!field ||
|
|
125
|
+
isEmptyChoiceValue(value) ||
|
|
126
|
+
field.isFunction ||
|
|
127
|
+
field.is_expression ||
|
|
128
|
+
hasOwnEditor(field)) {
|
|
106
129
|
return [];
|
|
107
130
|
}
|
|
108
131
|
var judgeElements = function (elements, choices) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowedValues.js","sourceRoot":"","sources":["../../src/helpers/allowedValues.ts"],"names":[],"mappings":";;;;;;AAUA,2DAAqC;AACrC,mCAA4D;AAC5D,qCAAgD;AAChD,yCAA8C;AAE9C,IAAM,YAAY,GAAG,UAAC,KAAc,IAAc,OAAA,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAA3C,CAA2C,CAAC;AAE9F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACI,IAAM,sBAAsB,GAAG,UACpC,KAAc,EACd,MAA8B;;IAE9B,IAAM,CAAC,GAAG,MAC6E,CAAC;IACxF,IAAM,OAAO,GACX,CAAC,CAAA,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,cAAc,0CAAE,MAAM,KAAI,CAAC,CAAC,cAAc,CAAC;QAC/C,CAAC,CAAA,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,sBAAsB,0CAAE,MAAM,KAAI,CAAC,CAAC,sBAAsB,CAAC;SAC/D,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,KAAK,CAAA,CAAC;IACX,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAA,EAAE,CAAC;QACrB,OAAO,SAAS,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"@qoretechnologies/reqraft",
|
|
3
|
-
"version": "0.10.59
|
|
3
|
+
"version": "0.10.59",
|
|
4
4
|
"description": "ReQraft is a collection of React components and hooks that are used across Qore Technologies' products made using the ReQore component library from Qore.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -35,6 +35,7 @@ import { Description } from '../../Description';
|
|
|
35
35
|
import { useMarkdownRenderer } from '../../Description/markdownRendererContext';
|
|
36
36
|
import { FocusedEditing } from '../../FocusedEditing';
|
|
37
37
|
import { CompactRowContext } from './compactRowContext';
|
|
38
|
+
import { revealRow } from './revealRow';
|
|
38
39
|
import {
|
|
39
40
|
StyledActionSlot,
|
|
40
41
|
StyledCardHeading,
|
|
@@ -278,6 +279,7 @@ export const CompactRow = memo(
|
|
|
278
279
|
(v) => v.removeSelectedOption
|
|
279
280
|
);
|
|
280
281
|
const getTypeForOption = useContextSelector(CompactRowContext, (v) => v.getTypeForOption);
|
|
282
|
+
const isRendererOnly = useContextSelector(CompactRowContext, (v) => v.isRendererOnly);
|
|
281
283
|
const confirmAction = useContextSelector(CompactRowContext, (v) => v.confirmAction);
|
|
282
284
|
const optionActions = useContextSelector(CompactRowContext, (v) => v.optionActions);
|
|
283
285
|
const collapseOptionActions = useContextSelector(
|
|
@@ -930,8 +932,11 @@ export const CompactRow = memo(
|
|
|
930
932
|
}
|
|
931
933
|
const control = findRowFocusTarget(editor);
|
|
932
934
|
if (!control) return false;
|
|
933
|
-
//
|
|
934
|
-
|
|
935
|
+
// The least scroll that shows the row clear of the pinned box header,
|
|
936
|
+
// and none when it is already in view (see `revealRow`).
|
|
937
|
+
if (rowRef.current) {
|
|
938
|
+
revealRow(rowRef.current, 'auto');
|
|
939
|
+
}
|
|
935
940
|
// `preventScroll`, because the reveal above has already put the row
|
|
936
941
|
// where it belongs; letting focus scroll as well moves it twice.
|
|
937
942
|
control.focus({ preventScroll: true });
|
|
@@ -1214,24 +1219,23 @@ export const CompactRow = memo(
|
|
|
1214
1219
|
})
|
|
1215
1220
|
) as TInfoMsg[])
|
|
1216
1221
|
: [];
|
|
1217
|
-
//
|
|
1218
|
-
// is
|
|
1219
|
-
//
|
|
1220
|
-
//
|
|
1221
|
-
//
|
|
1222
|
+
// A row states what is wrong with what it holds, read-only or not: "This
|
|
1223
|
+
// field is required" under an empty required field, a value that is not a
|
|
1224
|
+
// choice, an unmet dependency. A read-only reader is often the one who has
|
|
1225
|
+
// to get the record fixed, and a view that hides why it is incomplete
|
|
1226
|
+
// leaves them guessing. The value slot of an empty field keeps its plain
|
|
1227
|
+
// "—" (or the default it falls back to), so the message is the only place
|
|
1228
|
+
// the requirement is said: once, and the same way in both modes.
|
|
1222
1229
|
const fieldMessages: TInfoMsg[] =
|
|
1223
|
-
infoActive
|
|
1230
|
+
infoActive ?
|
|
1224
1231
|
getOptionFieldMessages({
|
|
1225
1232
|
schema: options || {},
|
|
1226
1233
|
option: optionField || ({} as IQorusFormField),
|
|
1227
1234
|
name: optionName,
|
|
1228
1235
|
allOptions: availableOptions,
|
|
1229
1236
|
getType: getTypeForOption,
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
// set", so the plain required message would duplicate it.
|
|
1233
|
-
.filter((m) => m.label !== 'This field is required')
|
|
1234
|
-
.map((m) => ({ intent: m.intent as string, content: String(m.label) }))
|
|
1237
|
+
isRendererOnly,
|
|
1238
|
+
}).map((m) => ({ intent: m.intent as string, content: String(m.label) }))
|
|
1235
1239
|
: [];
|
|
1236
1240
|
// TWO display channels, matching the Focus prototype:
|
|
1237
1241
|
// • dedicated schema `messages` → prominent coloured PANELS below the row;
|
|
@@ -1586,9 +1590,7 @@ export const CompactRow = memo(
|
|
|
1586
1590
|
<StyledRowActions>
|
|
1587
1591
|
{draftChip}
|
|
1588
1592
|
{/* No Required tag here: while editing, the editor's own
|
|
1589
|
-
OptionFieldMessages strip below already says it
|
|
1590
|
-
both was redundant. The tag stays on READ rows, where no
|
|
1591
|
-
message strip is visible. */}
|
|
1593
|
+
OptionFieldMessages strip below already says it. */}
|
|
1592
1594
|
{editRowRevertButton}
|
|
1593
1595
|
{cancelEditButton}
|
|
1594
1596
|
{clearValueButton}
|
|
@@ -2526,9 +2528,9 @@ export const CompactRow = memo(
|
|
|
2526
2528
|
the right, so the ⓘ sits at the same x on every row. Revert is shown
|
|
2527
2529
|
whenever a field has changed; delete reveals on hover. */}
|
|
2528
2530
|
{/* No generic invalid/required chip: the intent stripe + the field's
|
|
2529
|
-
own message
|
|
2530
|
-
|
|
2531
|
-
|
|
2531
|
+
own message ("This field is required" for an empty required field)
|
|
2532
|
+
already flag it. Only the required-GROUP chip (One of / Covers)
|
|
2533
|
+
stays — it carries info nothing else does. */}
|
|
2532
2534
|
{/* Railed (clustered) members: the rail conveys the grouping, so drop
|
|
2533
2535
|
the "One of"/"Covers" chip — keep only "Covered by <X>", the one fact
|
|
2534
2536
|
the rail can't show. Non-clustered members (split-across-panels or
|
|
@@ -147,7 +147,14 @@ export const CompactToolbar = memo((reqoreProps: Partial<IReqoreControlGroupProp
|
|
|
147
147
|
const attentionPct = completion.total ? (attentionCount / completion.total) * 100 : 0;
|
|
148
148
|
|
|
149
149
|
return (
|
|
150
|
-
<ReqoreControlGroup
|
|
150
|
+
<ReqoreControlGroup
|
|
151
|
+
{...reqoreProps}
|
|
152
|
+
className='options-readfirst-toolbar'
|
|
153
|
+
vertical
|
|
154
|
+
fluid
|
|
155
|
+
fixed={false}
|
|
156
|
+
gapSize='big'
|
|
157
|
+
>
|
|
151
158
|
{/* No completion in a read-only form. The meter answers "how much is
|
|
152
159
|
left to do", and a reader can do none of it: "4/6 set · 67%" over a
|
|
153
160
|
form nobody can fill in is a progress report on somebody else's
|