@qoretechnologies/reqraft 0.10.78-pr.145.gca7df95 → 0.10.78-pr.145.gd64cc3a
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 +20 -6
- package/dist/components/form/engine/CompactRow.js.map +1 -1
- package/dist/components/form/engine/FormEngine.d.ts +13 -0
- package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
- package/dist/components/form/engine/FormEngine.js +64 -34
- package/dist/components/form/engine/FormEngine.js.map +1 -1
- package/dist/components/form/engine/OptionFieldMessages.js +1 -1
- package/dist/components/form/engine/cardHeaderPin.d.ts +59 -0
- package/dist/components/form/engine/cardHeaderPin.d.ts.map +1 -0
- package/dist/components/form/engine/cardHeaderPin.js +137 -0
- package/dist/components/form/engine/cardHeaderPin.js.map +1 -0
- package/dist/components/form/engine/compactRowContext.d.ts +8 -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 +2 -0
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +39 -33
- package/dist/components/form/engine/compactRowStyles.js.map +1 -1
- package/dist/components/form/engine/revealRow.d.ts +7 -4
- package/dist/components/form/engine/revealRow.d.ts.map +1 -1
- package/dist/components/form/engine/revealRow.js +13 -7
- package/dist/components/form/engine/revealRow.js.map +1 -1
- package/dist/components/form/expressions/DpqlRendering.js +1 -1
- package/dist/components/form/expressions/DpqlRendering.js.map +1 -1
- package/dist/components/form/expressions/labels.js +5 -5
- package/dist/components/form/expressions/labels.js.map +1 -1
- package/dist/components/form/fields/schema-definition/labels.js +4 -4
- package/dist/components/form/fields/schema-definition/labels.js.map +1 -1
- package/dist/components/form/fields/template/TemplatePicker.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplatePicker.js +22 -13
- package/dist/components/form/fields/template/TemplatePicker.js.map +1 -1
- package/dist/components/smartEditor/completionStyle.d.ts +4 -4
- package/dist/components/smartEditor/completionStyle.d.ts.map +1 -1
- package/dist/components/smartEditor/completionStyle.js +12 -17
- package/dist/components/smartEditor/completionStyle.js.map +1 -1
- package/dist/components/smartEditor/types.d.ts +1 -1
- package/dist/helpers/reqraftLabels.js +8 -8
- package/dist/helpers/reqraftLabels.js.map +1 -1
- package/dist/helpers/templateItems.d.ts +13 -0
- package/dist/helpers/templateItems.d.ts.map +1 -1
- package/dist/helpers/templateItems.js +57 -1
- package/dist/helpers/templateItems.js.map +1 -1
- package/dist/helpers/templates.d.ts.map +1 -1
- package/dist/helpers/templates.js +4 -1
- package/dist/helpers/templates.js.map +1 -1
- package/dist/helpers/validationLabels.js +3 -3
- package/dist/helpers/validationLabels.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
|
@@ -692,14 +692,14 @@ var FormEngineImpl = function (_a) {
|
|
|
692
692
|
// been a no-op. Removing it from the API is a separate, breaking change —
|
|
693
693
|
// every consumer passing it today already gets the flush layout by default.
|
|
694
694
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
695
|
-
compactFlush = _k === void 0 ? false : _k, _l = _a.compactNested, compactNested = _l === void 0 ? false : _l, _m = _a.compactScroll, compactScroll = _m === void 0 ? 'host' : _m, compactPanelProps = _a.compactPanelProps, compactCollapsedGroupsProp = _a.compactCollapsedGroups, compactBoxLabels = _a.compactBoxLabels, _o = _a.revealRequired, revealRequired = _o === void 0 ? false : _o, focusAttentionRequest = _a.focusAttentionRequest, onAttentionChange = _a.onAttentionChange, outsideAttention = _a.outsideAttention, _p = _a.compactStickyBoxHeaders, compactStickyBoxHeaders = _p === void 0 ? true : _p, _q = _a.
|
|
695
|
+
compactFlush = _k === void 0 ? false : _k, _l = _a.compactNested, compactNested = _l === void 0 ? false : _l, _m = _a.compactScroll, compactScroll = _m === void 0 ? 'host' : _m, compactPanelProps = _a.compactPanelProps, compactCollapsedGroupsProp = _a.compactCollapsedGroups, compactBoxLabels = _a.compactBoxLabels, _o = _a.revealRequired, revealRequired = _o === void 0 ? false : _o, focusAttentionRequest = _a.focusAttentionRequest, onAttentionChange = _a.onAttentionChange, outsideAttention = _a.outsideAttention, _p = _a.compactStickyBoxHeaders, compactStickyBoxHeaders = _p === void 0 ? true : _p, _q = _a.compactStickyCardHeaders, compactStickyCardHeaders = _q === void 0 ? true : _q, _r = _a.compactStickyOffset, compactStickyOffset = _r === void 0 ? 0 : _r, _s = _a.compactToolbar, compactToolbar = _s === void 0 ? true : _s, _t = _a.commitMode, commitMode = _t === void 0 ? 'immediate' : _t, _u = _a.expandMode, expandMode = _u === void 0 ? 'single' : _u, onCommit = _a.onCommit, operatorsProp = _a.operators, groups = _a.groups, optionsLoader = _a.optionsLoader, onValidityChange = _a.onValidityChange, optionActions = _a.optionActions, _v = _a.optionActionsCollapse, optionActionsCollapse = _v === void 0 ? 'auto' : _v, componentOverrides = _a.componentOverrides, codePreviewRenderer = _a.codePreviewRenderer, readSummaries = _a.readSummaries, cardEditorTypes = _a.cardEditorTypes,
|
|
696
696
|
// consumed by the wrapper below, which publishes it to every description this
|
|
697
697
|
// form draws; destructured here only so it cannot reach `rest` and be spread
|
|
698
698
|
// onto a DOM node
|
|
699
699
|
_markdownRenderer = _a.markdownRenderer, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
700
700
|
rendererOnlyUiTypes = _a.rendererOnlyUiTypes, templateAwareUiTypes = _a.templateAwareUiTypes, anyLikeUiTypes = _a.anyLikeUiTypes, inheritedFromParent = _a.inheritedFromParent, autoFocusFirstRequired = _a.autoFocusFirstRequired, expandFirstRequired = _a.expandFirstRequired, initialExpandedOptions = _a.initialExpandedOptions, expandOptionsRequest = _a.expandOptionsRequest, valueKey = _a.valueKey, maxFieldsShown = _a.maxFieldsShown,
|
|
701
701
|
// The form's own props, read here and never handed on to the collection drawn below (`{...rest}`).
|
|
702
|
-
optionsSchema = _a.options, stringTemplates = _a.stringTemplates, skeletonReason = _a.skeletonReason, rest = __rest(_a, ["name", "uniqueName", "value", "onChange", "onSingleOptionsChange", "onDependableOptionChange", "placeholder", "noValueString", "isValid", "url", "customUrl", "operatorsUrl", "onOptionsLoaded", "recordRequiresSearchOptions", "readOnly", "onReadOnlyActivate", "allowTemplates", "interfaceContext", "templateFieldProps", "forceDropdown", "showTypeToggle", "compact", "appearance", "compactFlush", "compactNested", "compactScroll", "compactPanelProps", "compactCollapsedGroups", "compactBoxLabels", "revealRequired", "focusAttentionRequest", "onAttentionChange", "outsideAttention", "compactStickyBoxHeaders", "compactStickyOffset", "compactToolbar", "commitMode", "expandMode", "onCommit", "operators", "groups", "optionsLoader", "onValidityChange", "optionActions", "optionActionsCollapse", "componentOverrides", "codePreviewRenderer", "readSummaries", "cardEditorTypes", "markdownRenderer", "rendererOnlyUiTypes", "templateAwareUiTypes", "anyLikeUiTypes", "inheritedFromParent", "autoFocusFirstRequired", "expandFirstRequired", "initialExpandedOptions", "expandOptionsRequest", "valueKey", "maxFieldsShown", "options", "stringTemplates", "skeletonReason"]);
|
|
702
|
+
optionsSchema = _a.options, stringTemplates = _a.stringTemplates, skeletonReason = _a.skeletonReason, rest = __rest(_a, ["name", "uniqueName", "value", "onChange", "onSingleOptionsChange", "onDependableOptionChange", "placeholder", "noValueString", "isValid", "url", "customUrl", "operatorsUrl", "onOptionsLoaded", "recordRequiresSearchOptions", "readOnly", "onReadOnlyActivate", "allowTemplates", "interfaceContext", "templateFieldProps", "forceDropdown", "showTypeToggle", "compact", "appearance", "compactFlush", "compactNested", "compactScroll", "compactPanelProps", "compactCollapsedGroups", "compactBoxLabels", "revealRequired", "focusAttentionRequest", "onAttentionChange", "outsideAttention", "compactStickyBoxHeaders", "compactStickyCardHeaders", "compactStickyOffset", "compactToolbar", "commitMode", "expandMode", "onCommit", "operators", "groups", "optionsLoader", "onValidityChange", "optionActions", "optionActionsCollapse", "componentOverrides", "codePreviewRenderer", "readSummaries", "cardEditorTypes", "markdownRenderer", "rendererOnlyUiTypes", "templateAwareUiTypes", "anyLikeUiTypes", "inheritedFromParent", "autoFocusFirstRequired", "expandFirstRequired", "initialExpandedOptions", "expandOptionsRequest", "valueKey", "maxFieldsShown", "options", "stringTemplates", "skeletonReason"]);
|
|
703
703
|
var feWords = (0, reqraftLabels_1.useReqraftLabels)().formEngine;
|
|
704
704
|
// Built-ins + whatever the consumer declared for its own injected editors.
|
|
705
705
|
var isRendererOnly = (0, react_2.useMemo)(function () { return (0, rendererTypes_1.createRendererOnlyUiTypeCheck)(rendererOnlyUiTypes); }, [JSON.stringify(rendererOnlyUiTypes)]);
|
|
@@ -725,7 +725,7 @@ var FormEngineImpl = function (_a) {
|
|
|
725
725
|
enters the component, so the header, the chips, the messages, the meter and
|
|
726
726
|
the read-first summary cannot disagree about it: every one of them reads
|
|
727
727
|
`options`, and none of them has to know the rule. */
|
|
728
|
-
var
|
|
728
|
+
var _w = (0, react_2.useState)(optionsSchema || undefined), servedOptions = _w[0], setOptions = _w[1];
|
|
729
729
|
var options = (0, react_2.useMemo)(function () { return (0, options_1.resolveDegenerateRequiredGroups)(servedOptions); }, [servedOptions]);
|
|
730
730
|
/* Whether the schema the form holds is the one in force: its host is not waiting behind the skeleton, and a
|
|
731
731
|
schema the host hands down has been taken in (`servedOptions` follows the `options` prop a render later).
|
|
@@ -740,33 +740,33 @@ var FormEngineImpl = function (_a) {
|
|
|
740
740
|
JSON.stringify(optionsSchema || undefined) !== JSON.stringify(servedOptions);
|
|
741
741
|
var schemaInForce = !rest.skeleton && !hostSchemaPending;
|
|
742
742
|
// optionsLoader lifecycle: loading feeds the skeleton gate, error the banner.
|
|
743
|
-
var
|
|
744
|
-
var
|
|
743
|
+
var _x = (0, react_2.useState)(!!optionsLoader && !optionsSchema), optionsLoading = _x[0], setOptionsLoading = _x[1];
|
|
744
|
+
var _y = (0, react_2.useState)(), optionsError = _y[0], setOptionsError = _y[1];
|
|
745
745
|
// Operators: prop-provided (compact) or fetched via operatorsUrl (dpql,
|
|
746
746
|
// ported from IDE Options) — the fetch overrides the seeded prop value.
|
|
747
|
-
var
|
|
747
|
+
var _z = (0, react_2.useState)(operatorsProp), operators = _z[0], setOperators = _z[1];
|
|
748
748
|
// Remote-fetch loading (ported from IDE Options); only relevant when one of
|
|
749
749
|
// the fetch urls is set — schema-as-props consumers never see the skeleton.
|
|
750
|
-
var
|
|
750
|
+
var _0 = (0, react_2.useState)(!!(url || customUrl || operatorsUrl)), loading = _0[0], setLoading = _0[1];
|
|
751
751
|
var confirmAction = (0, reqore_1.useReqoreProperty)('confirmAction');
|
|
752
752
|
var theme = (0, reqore_1.useReqoreTheme)();
|
|
753
753
|
var calm = (0, formAppearance_1.useIsCalmForm)();
|
|
754
|
-
var
|
|
755
|
-
var
|
|
754
|
+
var _1 = (0, react_2.useState)(), focusedEditing = _1[0], setFocusedEditing = _1[1];
|
|
755
|
+
var _2 = (0, react_2.useState)(false), showFieldTypes = _2[0], setShowFieldTypes = _2[1];
|
|
756
756
|
// Global toggle (toolbar ⓘ): reveal the short-description info panel on every
|
|
757
757
|
// field that has a short_desc. Per-row ⓘ overrides still win over it.
|
|
758
758
|
// Global field-info visibility, tri-state: `undefined` = default (critical
|
|
759
759
|
// messages auto-open, the rest closed); `true` = show all; `false` = hide all
|
|
760
760
|
// (even message fields). The toolbar ⓘ drives it.
|
|
761
|
-
var
|
|
762
|
-
var
|
|
763
|
-
var
|
|
761
|
+
var _3 = (0, react_2.useState)(undefined), showAllDescriptions = _3[0], setShowAllDescriptions = _3[1];
|
|
762
|
+
var _4 = (0, react_2.useState)(), showHelpForOption = _4[0], setShowHelpForOption = _4[1];
|
|
763
|
+
var _5 = (0, react_2.useState)(false), showInvalidOptionsOnly = _5[0], setShowInvalidOptionsOnly = _5[1];
|
|
764
764
|
// Which options are expanded into their editor (several can be open at once).
|
|
765
|
-
var
|
|
765
|
+
var _6 = (0, react_2.useState)([]), expandedOptions = _6[0], setExpandedOptions = _6[1];
|
|
766
766
|
// The fields the person has opened and left. An empty required field becomes a
|
|
767
767
|
// fault only then (or after a submit attempt, `revealRequired`): a form nobody has
|
|
768
768
|
// touched is not already wrong.
|
|
769
|
-
var
|
|
769
|
+
var _7 = (0, react_2.useState)([]), visitedOptions = _7[0], setVisitedOptions = _7[1];
|
|
770
770
|
var lastExpandedOptions = (0, react_2.useRef)([]);
|
|
771
771
|
(0, react_2.useEffect)(function () {
|
|
772
772
|
var left = lastExpandedOptions.current.filter(function (name) { return !expandedOptions.includes(name); });
|
|
@@ -780,7 +780,7 @@ var FormEngineImpl = function (_a) {
|
|
|
780
780
|
}, [expandedOptions]);
|
|
781
781
|
/** Status boxes whose "N more fields" control the reader has opened. Keyed by
|
|
782
782
|
box so opening Optional does not also unfold Set. */
|
|
783
|
-
var
|
|
783
|
+
var _8 = (0, react_2.useState)([]), expandedMoreBoxes = _8[0], setExpandedMoreBoxes = _8[1];
|
|
784
784
|
// --- Reveal a status box's content when it is opened ----------------------
|
|
785
785
|
//
|
|
786
786
|
// The status boxes stack, so the last one ("Optional", which holds every
|
|
@@ -796,7 +796,7 @@ var FormEngineImpl = function (_a) {
|
|
|
796
796
|
// box has not grown and there is nothing to scroll to. A layout effect runs
|
|
797
797
|
// after the DOM is updated and before paint, which makes the reveal
|
|
798
798
|
// deterministic instead of a guessed delay.
|
|
799
|
-
var
|
|
799
|
+
var _9 = (0, react_2.useState)(undefined), openedStatusBox = _9[0], setOpenedStatusBox = _9[1];
|
|
800
800
|
var statusBoxRefs = (0, react_2.useRef)({});
|
|
801
801
|
(0, react_2.useLayoutEffect)(function () {
|
|
802
802
|
var _a, _b;
|
|
@@ -831,13 +831,13 @@ var FormEngineImpl = function (_a) {
|
|
|
831
831
|
var openBoxes = (0, rowPlaces_1.useOpenBoxes)();
|
|
832
832
|
// Measured form width (not viewport — the form lives in drawers/panels of
|
|
833
833
|
// arbitrary width) drives the stacked narrow layout.
|
|
834
|
-
var
|
|
834
|
+
var _10 = (0, react_use_1.useMeasure)(), compactWrapRef = _10[0], compactWrapWidth = _10[1].width;
|
|
835
835
|
// Own handle on the scroll wrap (useMeasure's ref is a callback, no `.current`)
|
|
836
836
|
// so the label-column measurement can publish its CSS var on the element. It's
|
|
837
837
|
// STATE, not a ref: the wrap mounts only after the loading-skeleton gate
|
|
838
838
|
// resolves, so the measurement effect must re-run when the node appears — a
|
|
839
839
|
// ref wouldn't retrigger it.
|
|
840
|
-
var
|
|
840
|
+
var _11 = (0, react_2.useState)(null), compactWrapNode = _11[0], setCompactWrapNode = _11[1];
|
|
841
841
|
// Ref mirror of the wrap node for callbacks that must not re-create when it
|
|
842
842
|
// mounts (flashOptions reads it inside a rAF).
|
|
843
843
|
var compactWrapNodeRef = (0, react_2.useRef)(null);
|
|
@@ -853,10 +853,28 @@ var FormEngineImpl = function (_a) {
|
|
|
853
853
|
/* The label column the rows are laid out with: measured from the labels (see below), the
|
|
854
854
|
default until it is. A form stacks its rows where its value column would be too narrow
|
|
855
855
|
beside it (`isCompactNarrow`), not at one form width whatever its labels are. */
|
|
856
|
-
var
|
|
856
|
+
var _12 = (0, react_2.useState)(compactRowStyles_1.COMPACT_LABEL_COL), compactLabelColumn = _12[0], setCompactLabelColumn = _12[1];
|
|
857
857
|
// the label column holds a finger's help button where the pointer is a finger (`labelAffordanceWidth`)
|
|
858
858
|
var coarsePointer = (0, useCoarsePointer_1.useCoarsePointer)();
|
|
859
|
-
|
|
859
|
+
/* The wrap's width as it is laid out the moment it mounts, read before it is first drawn.
|
|
860
|
+
`useMeasure` reports only from a ResizeObserver, after the browser's next layout, so until
|
|
861
|
+
then the width was 0 and a narrow form drew its first frames as a wide one: on a 190px form
|
|
862
|
+
a 220px name column, and the editor of an open row in a 0px column past the row's right edge.
|
|
863
|
+
Anything opened in those frames was laid out there - a picker focused as the form appeared
|
|
864
|
+
had its list closed as hidden (board f63). The observer's figure takes over once it has one. */
|
|
865
|
+
var _13 = (0, react_2.useState)(0), mountedWrapWidth = _13[0], setMountedWrapWidth = _13[1];
|
|
866
|
+
(0, react_2.useLayoutEffect)(function () {
|
|
867
|
+
if (!compactWrapNode) {
|
|
868
|
+
return;
|
|
869
|
+
}
|
|
870
|
+
var style = getComputedStyle(compactWrapNode);
|
|
871
|
+
var contentWidth = compactWrapNode.clientWidth -
|
|
872
|
+
(parseFloat(style.paddingLeft) || 0) -
|
|
873
|
+
(parseFloat(style.paddingRight) || 0);
|
|
874
|
+
setMountedWrapWidth(function (current) { return (current === contentWidth ? current : contentWidth); });
|
|
875
|
+
}, [compactWrapNode]);
|
|
876
|
+
var compactLaidOutWidth = compactWrapWidth || mountedWrapWidth;
|
|
877
|
+
var compactNarrow = !!compactLaidOutWidth && (0, compactRowStyles_1.isCompactNarrow)(compactLaidOutWidth, compactLabelColumn);
|
|
860
878
|
/* How much pinned chrome sits above a status-box header.
|
|
861
879
|
|
|
862
880
|
Sticky offsets do not compose on their own: everything pinned in one
|
|
@@ -871,7 +889,7 @@ var FormEngineImpl = function (_a) {
|
|
|
871
889
|
a search row and a field picker that each hide themselves when they have
|
|
872
890
|
nothing to say, and what is left wraps differently at every form width.
|
|
873
891
|
Zero when this form draws no toolbar at all. */
|
|
874
|
-
var
|
|
892
|
+
var _14 = (0, react_2.useState)(0), compactToolbarHeight = _14[0], setCompactToolbarHeight = _14[1];
|
|
875
893
|
(0, react_2.useLayoutEffect)(function () {
|
|
876
894
|
var wrap = compactWrapNode;
|
|
877
895
|
if (!compact || !wrap || compactNested || !compactStickyBoxHeaders) {
|
|
@@ -927,7 +945,7 @@ var FormEngineImpl = function (_a) {
|
|
|
927
945
|
form before anything has moved. The host is whatever paints first above the
|
|
928
946
|
form: the page, a drawer's panel surface, a card. Read once it mounts (and
|
|
929
947
|
when the theme changes), not assumed from the theme's main color. */
|
|
930
|
-
var
|
|
948
|
+
var _15 = (0, react_2.useState)(), compactHostColour = _15[0], setCompactHostColour = _15[1];
|
|
931
949
|
(0, react_2.useLayoutEffect)(function () {
|
|
932
950
|
if (!calm || !compact || compactNested || !compactWrapNode) {
|
|
933
951
|
setCompactHostColour(undefined);
|
|
@@ -999,8 +1017,8 @@ var FormEngineImpl = function (_a) {
|
|
|
999
1017
|
var readRowHeights = (0, react_2.useRef)({});
|
|
1000
1018
|
// Required-groups linkage: hovering a group chip highlights every member row;
|
|
1001
1019
|
// clicking a sibling in the chip's popover scrolls to it and flashes it.
|
|
1002
|
-
var
|
|
1003
|
-
var
|
|
1020
|
+
var _16 = (0, react_2.useState)([]), highlightedOptions = _16[0], setHighlightedOptions = _16[1];
|
|
1021
|
+
var _17 = (0, react_2.useState)([]), flashedOptions = _17[0], setFlashedOptions = _17[1];
|
|
1004
1022
|
var flashTimeout = (0, react_2.useRef)();
|
|
1005
1023
|
var flashOptions = (0, react_2.useCallback)(function (optionNames, scrollToFirst) {
|
|
1006
1024
|
if (scrollToFirst === void 0) { scrollToFirst = false; }
|
|
@@ -1053,16 +1071,16 @@ var FormEngineImpl = function (_a) {
|
|
|
1053
1071
|
}
|
|
1054
1072
|
});
|
|
1055
1073
|
// Info panels auto-open on Tier-1 content; the per-row user override sticks.
|
|
1056
|
-
var
|
|
1074
|
+
var _18 = (0, react_2.useState)({}), infoPanelOverrides = _18[0], setInfoPanelOverrides = _18[1];
|
|
1057
1075
|
// Toolbar filters affect the listed rows only — the meter reflects the full set.
|
|
1058
|
-
var
|
|
1059
|
-
var
|
|
1076
|
+
var _19 = (0, react_2.useState)(false), requiredOnly = _19[0], setRequiredOnly = _19[1];
|
|
1077
|
+
var _20 = (0, react_2.useState)(''), compactQuery = _20[0], setCompactQuery = _20[1];
|
|
1060
1078
|
// Compact field sort (Fields menu → "Sort by"); 'schema' = declared order.
|
|
1061
|
-
var
|
|
1062
|
-
var
|
|
1079
|
+
var _21 = (0, react_2.useState)('schema'), compactSort = _21[0], setCompactSort = _21[1];
|
|
1080
|
+
var _22 = (0, react_2.useState)(function () { return ({
|
|
1063
1081
|
fields: (0, exports.fixOptions)(value, options || {}, undefined, isRendererOnly),
|
|
1064
1082
|
meta: undefined,
|
|
1065
|
-
}); }), localValue =
|
|
1083
|
+
}); }), localValue = _22[0], setLocalValue = _22[1];
|
|
1066
1084
|
var originalValue = (0, react_2.useRef)();
|
|
1067
1085
|
// Track the last value we emitted via onChange so we can skip re-applying fixOptions
|
|
1068
1086
|
// when the parent echoes it back as the new value prop (controlled component loop prevention)
|
|
@@ -1120,7 +1138,7 @@ var FormEngineImpl = function (_a) {
|
|
|
1120
1138
|
originalValue.current = localValue.fields;
|
|
1121
1139
|
}
|
|
1122
1140
|
var unavailableOptionsCount = (0, react_2.useRef)(0);
|
|
1123
|
-
var
|
|
1141
|
+
var _23 = (0, useQorusTypes_1.useQorusTypes)(), compactValue = _23.compactValue, typesLoading = _23.loading;
|
|
1124
1142
|
// an option's type in words, while the form shows field types (qorus#646: it said the type's code, `<string>`)
|
|
1125
1143
|
var typeName = (0, typeSentenceForm_1.useTypeName)();
|
|
1126
1144
|
var templates = (0, useTemplates_1.useTemplates)(allowTemplates, stringTemplates, interfaceContext);
|
|
@@ -2694,6 +2712,10 @@ var FormEngineImpl = function (_a) {
|
|
|
2694
2712
|
// same surface and edge Reqore gives the section panels themselves).
|
|
2695
2713
|
var cPanel = (0, formAppearance_1.getCalmPanelSurface)(theme);
|
|
2696
2714
|
var cHairline = (0, formAppearance_1.getCalmPanelHairline)(theme);
|
|
2715
|
+
/* An open field's card pins its heading while its long body is read (`compactStickyCardHeaders`), on the surface
|
|
2716
|
+
the status box headers pin on. A nested sub-form's card sits in the parent's card, whose heading pins instead. */
|
|
2717
|
+
var stickyCardHeaders = compact && compactStickyCardHeaders && !compactNested;
|
|
2718
|
+
var pinnedHeaderSurface = calm ? cPanel : (0, colors_1.getMainBackgroundColor)(theme);
|
|
2697
2719
|
// The closure surface the extracted CompactRow reads through context. Refs and
|
|
2698
2720
|
// setters are stable; the state/memo/handler fields change identity as they do
|
|
2699
2721
|
// today, so a row re-renders exactly when its inputs do.
|
|
@@ -2711,6 +2733,9 @@ var FormEngineImpl = function (_a) {
|
|
|
2711
2733
|
codeEditor: componentOverrides === null || componentOverrides === void 0 ? void 0 : componentOverrides['code-editor'],
|
|
2712
2734
|
readSummaries: readSummaries,
|
|
2713
2735
|
cardEditorTypes: cardEditorTypes,
|
|
2736
|
+
stickyCardHeaders: stickyCardHeaders,
|
|
2737
|
+
stickyHostOffset: compactStickyOffset,
|
|
2738
|
+
pinnedHeaderSurface: pinnedHeaderSurface,
|
|
2714
2739
|
showAllDescriptions: showAllDescriptions,
|
|
2715
2740
|
expandedOptions: expandedOptions,
|
|
2716
2741
|
visitedOptions: visitedOptions,
|
|
@@ -2765,6 +2790,9 @@ var FormEngineImpl = function (_a) {
|
|
|
2765
2790
|
componentOverrides,
|
|
2766
2791
|
readSummaries,
|
|
2767
2792
|
cardEditorTypes,
|
|
2793
|
+
stickyCardHeaders,
|
|
2794
|
+
compactStickyOffset,
|
|
2795
|
+
pinnedHeaderSurface,
|
|
2768
2796
|
showAllDescriptions,
|
|
2769
2797
|
expandedOptions,
|
|
2770
2798
|
visitedOptions,
|
|
@@ -3358,7 +3386,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3358
3386
|
// Mirrors the toolbar's own search-row gate: when no search
|
|
3359
3387
|
// row renders, the header is a thin strip and sits tight to
|
|
3360
3388
|
// the first status box (see StyledCompactPanel).
|
|
3361
|
-
, __assign({ "$tightHeader": !((compactToolbarParts === null || compactToolbarParts === void 0 ? void 0 : compactToolbarParts.search) && (0, size_1.default)(options) > 1), "$headerBg": compactNested ? 'transparent' : headerBg, "$nested": compactNested, "$calm": calm, "$stickyBoxes": compactStickyBoxHeaders && !compactNested, "$stackHeader": compactNarrow &&
|
|
3389
|
+
, __assign({ "$tightHeader": !((compactToolbarParts === null || compactToolbarParts === void 0 ? void 0 : compactToolbarParts.search) && (0, size_1.default)(options) > 1), "$headerBg": compactNested ? 'transparent' : headerBg, "$nested": compactNested, "$calm": calm, "$stickyBoxes": (compactStickyBoxHeaders || stickyCardHeaders) && !compactNested, "$stackHeader": compactNarrow &&
|
|
3362
3390
|
!!((compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.label) ||
|
|
3363
3391
|
(compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.icon) ||
|
|
3364
3392
|
((_f = compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.actions) === null || _f === void 0 ? void 0 : _f.length)), flat: true,
|
|
@@ -3511,7 +3539,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3511
3539
|
being read — see `compactStickyBoxHeaders`. Sticky
|
|
3512
3540
|
is bounded by its containing block, so the header
|
|
3513
3541
|
leaves with its box and only one is ever pinned. */
|
|
3514
|
-
stickyHeader: stickyBoxHeaders, stickyHeaderOffset: stickyBoxHeaders ? boxStickyOffset : undefined, collapseButtonProps: { flat: true, minimal: true, size: 'small' }, collapsible: true,
|
|
3542
|
+
stickyHeader: stickyBoxHeaders, stickyHeaderOffset: stickyBoxHeaders ? boxStickyOffset : undefined, "$letPin": stickyCardHeaders && !stickyBoxHeaders, collapseButtonProps: { flat: true, minimal: true, size: 'small' }, collapsible: true,
|
|
3515
3543
|
// Which boxes start closed is the consumer's call
|
|
3516
3544
|
// (`compactCollapsedGroups`, default `['optional']`: the
|
|
3517
3545
|
// Optional box holds every not-yet-added field, so a form
|
|
@@ -3569,7 +3597,9 @@ var FormEngineImpl = function (_a) {
|
|
|
3569
3597
|
borderBottomLeftRadius: 'inherit',
|
|
3570
3598
|
borderBottomRightRadius: 'inherit',
|
|
3571
3599
|
}
|
|
3572
|
-
: { paddingTop: 4, paddingBottom: 6 },
|
|
3600
|
+
: __assign({ paddingTop: 4, paddingBottom: 6 }, (stickyCardHeaders ?
|
|
3601
|
+
{ overflowY: 'visible', overflowX: 'clip', display: 'flow-root' }
|
|
3602
|
+
: {})), children: [(0, jsx_runtime_1.jsx)(rowPlaces_1.OpenBoxMark, { box: box.key, onShown: openBoxes.onShown }), (0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupBody, __assign({}, groupBodyProps, { "$boxCorners": true, className: compactNarrow ? 'readfirst-narrow' : undefined, children: [shownGroups.map(function (groupName) {
|
|
3573
3603
|
return renderBoxGroup(box.key, groupName, shownRowSet);
|
|
3574
3604
|
}), deferredCount ? renderMoreRow(box.key, deferredCount, moreOpen) : null, deferredCount && moreOpen ?
|
|
3575
3605
|
deferredGroups.map(function (groupName) {
|