@qoretechnologies/reqraft 0.10.76-pr.145.g53bf0e0 → 0.10.76-pr.145.gb1f8f29
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/FormEngine.d.ts.map +1 -1
- package/dist/components/form/engine/FormEngine.js +87 -36
- package/dist/components/form/engine/FormEngine.js.map +1 -1
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +44 -32
- package/dist/components/form/engine/compactRowStyles.js.map +1 -1
- package/dist/components/form/engine/rowPlaces.d.ts +43 -0
- package/dist/components/form/engine/rowPlaces.d.ts.map +1 -0
- package/dist/components/form/engine/rowPlaces.js +163 -0
- package/dist/components/form/engine/rowPlaces.js.map +1 -0
- package/dist/components/form/expressions/mockExpressions.d.ts.map +1 -1
- package/dist/components/form/expressions/mockExpressions.js +0 -18
- package/dist/components/form/expressions/mockExpressions.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormEngine.d.ts","sourceRoot":"","sources":["../../../../src/components/form/engine/FormEngine.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAE7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAmBzF,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,2BAA2B,EAC3B,kBAAkB,EAClB,yBAAyB,EACzB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,qBAAqB,EACrB,uBAAuB,EACvB,UAAU,EACX,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAA0C,cAAc,EAAE,MAAM,iBAAiB,CAAC;AASzF,OAAO,KAA6E,MAAM,OAAO,CAAC;AASlG,OAAO,EACL,iBAAiB,EAKlB,MAAM,8BAA8B,CAAC;AAStC,OAAO,EACL,mBAAmB,EAGpB,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAyC,oBAAoB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAkChH,OAAO,EAEL,iBAAiB,EAClB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAOL,qBAAqB,EAGtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,uBAAuB,EAExB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"FormEngine.d.ts","sourceRoot":"","sources":["../../../../src/components/form/engine/FormEngine.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAE7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAmBzF,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,2BAA2B,EAC3B,kBAAkB,EAClB,yBAAyB,EACzB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,qBAAqB,EACrB,uBAAuB,EACvB,UAAU,EACX,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAA0C,cAAc,EAAE,MAAM,iBAAiB,CAAC;AASzF,OAAO,KAA6E,MAAM,OAAO,CAAC;AASlG,OAAO,EACL,iBAAiB,EAKlB,MAAM,8BAA8B,CAAC;AAStC,OAAO,EACL,mBAAmB,EAGpB,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAyC,oBAAoB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAkChH,OAAO,EAEL,iBAAiB,EAClB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAOL,qBAAqB,EAGtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,uBAAuB,EAExB,MA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,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAEnE;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE3B;;;;;;;;;;;;;;;OAeG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAy/HD;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,UAAW,gBAAgB,4CAwBjD,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
|
@@ -153,6 +153,7 @@ var allowedValues_1 = require("../../../helpers/allowedValues");
|
|
|
153
153
|
var rowFocus_2 = require("./rowFocus");
|
|
154
154
|
var optionUiTypes_1 = require("../../../helpers/optionUiTypes");
|
|
155
155
|
var readFirst_1 = require("./readFirst");
|
|
156
|
+
var rowPlaces_1 = require("./rowPlaces");
|
|
156
157
|
/** One shared "nothing came down from above" bag. See `inheritedScopeFor`. */
|
|
157
158
|
var NO_INHERITED_SCOPE = Object.freeze({});
|
|
158
159
|
/**
|
|
@@ -824,6 +825,10 @@ var FormEngineImpl = function (_a) {
|
|
|
824
825
|
// stays put when its status flips (e.g. becomes valid) instead of jumping to
|
|
825
826
|
// another box mid-edit and stealing focus. Keyed by option name.
|
|
826
827
|
var settledBucket = (0, react_2.useRef)({});
|
|
828
|
+
// Each row's own node, drawn into once and moved between the boxes (`rowPlaces`)
|
|
829
|
+
var rowHosts = (0, rowPlaces_1.useRowHosts)();
|
|
830
|
+
// Which boxes are open, so a collapsed box's rows are not drawn (`rowPlaces`)
|
|
831
|
+
var openBoxes = (0, rowPlaces_1.useOpenBoxes)();
|
|
827
832
|
// Measured form width (not viewport — the form lives in drawers/panels of
|
|
828
833
|
// arbitrary width) drives the stacked narrow layout.
|
|
829
834
|
var _9 = (0, react_use_1.useMeasure)(), compactWrapRef = _9[0], compactWrapWidth = _9[1].width;
|
|
@@ -1022,17 +1027,18 @@ var FormEngineImpl = function (_a) {
|
|
|
1022
1027
|
// Follow a field across panels: when its status bucket changes — e.g. you fill
|
|
1023
1028
|
// an optional field and it jumps to Set / Needs attention — scroll to its new
|
|
1024
1029
|
// row and flash it so it's easy to keep track of. `settledBucket` holds each
|
|
1025
|
-
// field's current panel
|
|
1026
|
-
//
|
|
1027
|
-
//
|
|
1028
|
-
//
|
|
1030
|
+
// field's current panel, so diffing it after every render catches the move the
|
|
1031
|
+
// instant it lands in the new panel. A field being edited moves as its value
|
|
1032
|
+
// does - the first character typed into an empty required field takes it to Set,
|
|
1033
|
+
// the caret with it (`rowPlaces`) - and is followed the same way. Runs every
|
|
1034
|
+
// render; the diff is cheap and only fires a scroll on an ACTUAL move.
|
|
1029
1035
|
var prevSettledBucket = (0, react_2.useRef)({});
|
|
1030
1036
|
(0, react_2.useEffect)(function () {
|
|
1031
1037
|
if (!compact)
|
|
1032
1038
|
return;
|
|
1033
1039
|
var cur = settledBucket.current;
|
|
1034
1040
|
var prev = prevSettledBucket.current;
|
|
1035
|
-
var moved = Object.keys(cur).find(function (name) { return prev[name] && prev[name] !== cur[name]
|
|
1041
|
+
var moved = Object.keys(cur).find(function (name) { return prev[name] && prev[name] !== cur[name]; });
|
|
1036
1042
|
prevSettledBucket.current = __assign({}, cur);
|
|
1037
1043
|
if (moved) {
|
|
1038
1044
|
flashOptions([moved], true);
|
|
@@ -2892,6 +2898,11 @@ var FormEngineImpl = function (_a) {
|
|
|
2892
2898
|
var compactHeaderActions = (0, react_2.useMemo)(function () { return __spreadArray(__spreadArray([], (compactToolbarParts ? [{ as: CompactToolbar_1.CompactToolbar, responsive: false }] : []), true), ((compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.actions) || []), true); }, [compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.actions, compactToolbarParts]);
|
|
2893
2899
|
var renderCompact = function () {
|
|
2894
2900
|
var _a, _b, _c, _d, _f;
|
|
2901
|
+
/* The rows of this render, each drawn at the stage into its own node; the boxes draw places for them
|
|
2902
|
+
(`renderRow`). A row that changes box is moved, not drawn anew (`rowPlaces`). */
|
|
2903
|
+
var stagedRows = new Map();
|
|
2904
|
+
// Whether the box being drawn shows its rows: a collapsed one keeps only their places (`useOpenBoxes`)
|
|
2905
|
+
var drawingRows = true;
|
|
2895
2906
|
// Calm: the host's own colour (see `compactHostColour`), so the pinned
|
|
2896
2907
|
// toolbar is invisible until something scrolls under it - and opaque, so
|
|
2897
2908
|
// what scrolls under it does not read through. At 88% with a blur the rows
|
|
@@ -3035,20 +3046,32 @@ var FormEngineImpl = function (_a) {
|
|
|
3035
3046
|
set: [],
|
|
3036
3047
|
optional: [],
|
|
3037
3048
|
};
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
var
|
|
3049
|
+
/* A box a row being edited cannot move into: a closed one - collapsed on screen, by the form or the reader,
|
|
3050
|
+
or not drawn yet and to be drawn collapsed (Optional, with no search). The row's place there is not in the
|
|
3051
|
+
page, so the row would leave it, and the caret with it. */
|
|
3052
|
+
var boxIsClosed = function (box) {
|
|
3042
3053
|
var _a;
|
|
3054
|
+
if (readOnly || (calm && compactNested))
|
|
3055
|
+
return false;
|
|
3056
|
+
if ((_a = statusBoxRefs.current[box]) === null || _a === void 0 ? void 0 : _a.isConnected)
|
|
3057
|
+
return !openBoxes.isShown(box);
|
|
3058
|
+
return (compactCollapsedGroupsProp !== null && compactCollapsedGroupsProp !== void 0 ? compactCollapsedGroupsProp : ['optional']).includes(box) && !query;
|
|
3059
|
+
};
|
|
3060
|
+
/* A row's box is what it holds now - the one rule the box headers, the readiness line, the meter and the
|
|
3061
|
+
host's numbers count by (`getOptionBucket`). A row being edited moves with it: it is the same row in its new
|
|
3062
|
+
box, its editor and caret kept (`rowPlaces`), where it was kept in the box it was opened in, and counted
|
|
3063
|
+
elsewhere (Qlip build 489). Into a closed box it does not move until it is closed: an optional value cleared
|
|
3064
|
+
as it is edited stays under the caret, not in a collapsed Optional box. `settledBucket` is the box a row is
|
|
3065
|
+
shown in, which is what follows a field across the boxes (the flash below). */
|
|
3066
|
+
var stableBucketOf = function (entry) {
|
|
3043
3067
|
var fresh = getOptionBucket(entry.name, entry.hidden);
|
|
3044
|
-
var
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
return memo;
|
|
3068
|
+
var shownIn = settledBucket.current[entry.name];
|
|
3069
|
+
if (shownIn &&
|
|
3070
|
+
shownIn !== fresh &&
|
|
3071
|
+
!entry.hidden &&
|
|
3072
|
+
expandedOptions.includes(entry.name) &&
|
|
3073
|
+
boxIsClosed(fresh)) {
|
|
3074
|
+
return shownIn;
|
|
3052
3075
|
}
|
|
3053
3076
|
settledBucket.current[entry.name] = fresh;
|
|
3054
3077
|
return fresh;
|
|
@@ -3166,7 +3189,17 @@ var FormEngineImpl = function (_a) {
|
|
|
3166
3189
|
return Object.keys(absorbedBy).filter(function (absorbedName) { return absorbedBy[absorbedName] === hostName; });
|
|
3167
3190
|
};
|
|
3168
3191
|
var renderGroupRows = function (names) {
|
|
3169
|
-
var renderRow = function (entry, clustered, clusterFirst, clusterLast) {
|
|
3192
|
+
var renderRow = function (entry, clustered, clusterFirst, clusterLast) {
|
|
3193
|
+
// a row is in one place at a time
|
|
3194
|
+
if (stagedRows.has(entry.name))
|
|
3195
|
+
return null;
|
|
3196
|
+
var host = rowHosts.hostFor(entry.name);
|
|
3197
|
+
if (drawingRows) {
|
|
3198
|
+
stagedRows.set(entry.name, (0, rowPlaces_1.stagedRow)(drawRow(entry, clustered, clusterFirst, clusterLast), host, entry.name));
|
|
3199
|
+
}
|
|
3200
|
+
return (0, jsx_runtime_1.jsx)(rowPlaces_1.RowPlace, { host: host }, entry.name);
|
|
3201
|
+
};
|
|
3202
|
+
var drawRow = function (entry, clustered, clusterFirst, clusterLast) { return ((0, jsx_runtime_1.jsx)(CompactRow_1.CompactRow, { optionName: entry.name, optionField: entry.hidden ?
|
|
3170
3203
|
{
|
|
3171
3204
|
type: getOptionSchemaStorageType(options === null || options === void 0 ? void 0 : options[entry.name], isRendererOnly),
|
|
3172
3205
|
value: undefined,
|
|
@@ -3386,6 +3419,9 @@ var FormEngineImpl = function (_a) {
|
|
|
3386
3419
|
var count = bucketCount(box.key);
|
|
3387
3420
|
if (!count)
|
|
3388
3421
|
return null;
|
|
3422
|
+
/* A row being edited is on show in the box it is in: neither the preselected split
|
|
3423
|
+
nor a cap folds it away (it moves only into an open box - `boxIsClosed`). */
|
|
3424
|
+
var isOpenRow = function (entry) { return expandedOptions.includes(entry.name); };
|
|
3389
3425
|
var hasPreselectedRows = boxHasPreselectedRows(box.key);
|
|
3390
3426
|
var wouldCollapse = compactCollapsedGroups.includes(box.key) &&
|
|
3391
3427
|
!query &&
|
|
@@ -3394,24 +3430,30 @@ var FormEngineImpl = function (_a) {
|
|
|
3394
3430
|
// row splits its body; a box that renders open anyway shows
|
|
3395
3431
|
// all of its groups as before.
|
|
3396
3432
|
var splitForPreselected = wouldCollapse && hasPreselectedRows;
|
|
3433
|
+
var opensCollapsed = wouldCollapse && !hasPreselectedRows;
|
|
3434
|
+
// Its rows are drawn while it is open: as the form opens it, or as the reader just
|
|
3435
|
+
// did (the reveal below needs them in the box it scrolls to), or as its content says
|
|
3436
|
+
drawingRows = openBoxes.drawsRows(box.key, !opensCollapsed || openedStatusBox === box.key);
|
|
3397
3437
|
// Which rows this box shows, and which fold away, decided at
|
|
3398
3438
|
// ROW level because `maxFieldsShown` counts fields — a
|
|
3399
3439
|
// group-level split can only ever cut at a group boundary.
|
|
3400
3440
|
// Group order is preserved so the visible rows read in the
|
|
3401
3441
|
// same order they would if nothing were folded.
|
|
3402
3442
|
var orderedRows = groupsInBox.flatMap(function (groupName) { return buckets[box.key][groupName] || []; });
|
|
3403
|
-
// The number in the box's header counts the rows
|
|
3404
|
-
//
|
|
3405
|
-
//
|
|
3406
|
-
// to keep its count too: a box read "To fill in 1" while its last
|
|
3407
|
-
// field already had a value and the host's submit read ready.
|
|
3443
|
+
// The number in the box's header counts the rows in it: what they
|
|
3444
|
+
// hold now, as the line and the host count them (a field being
|
|
3445
|
+
// edited moves box with its value - `stableBucketOf`).
|
|
3408
3446
|
var headerCount = readOnly ? count : (orderedRows.filter(function (entry) { return getOptionBucket(entry.name, entry.hidden) === box.key; }).length);
|
|
3409
3447
|
// Optional's own rule first: a box opened solely to reveal
|
|
3410
3448
|
// preselected rows offers those, not an arbitrary first-N.
|
|
3411
|
-
var candidateRows = splitForPreselected ?
|
|
3412
|
-
|
|
3449
|
+
var candidateRows = splitForPreselected ?
|
|
3450
|
+
orderedRows.filter(function (entry) { return isPreselectedRow(entry) || isOpenRow(entry); })
|
|
3451
|
+
: orderedRows;
|
|
3452
|
+
// …then the cap applies to whatever that left - but for a row being edited.
|
|
3413
3453
|
var capped = maxFieldsShown !== undefined && candidateRows.length > maxFieldsShown;
|
|
3414
|
-
var shownRows = capped ?
|
|
3454
|
+
var shownRows = capped ?
|
|
3455
|
+
candidateRows.filter(function (entry, index) { return index < maxFieldsShown || isOpenRow(entry); })
|
|
3456
|
+
: candidateRows;
|
|
3415
3457
|
var shownRowSet = new Set(shownRows.map(function (entry) { return entry.name; }));
|
|
3416
3458
|
// Everything the box holds that is not on show. Once the
|
|
3417
3459
|
// reader asks for more they get the whole box — withholding
|
|
@@ -3440,7 +3482,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3440
3482
|
var boxBg = box.key === 'optional' && !calm ?
|
|
3441
3483
|
(0, colors_1.changeDarkness)((0, colors_1.getMainBackgroundColor)(theme), 0.06)
|
|
3442
3484
|
: undefined;
|
|
3443
|
-
return ((0, jsx_runtime_1.
|
|
3485
|
+
return ((0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledStatusBox, { "$accent": accent, "$bg": boxBg, "$calm": calm, "$surface": stickyBoxHeaders ?
|
|
3444
3486
|
calm ? cPanel
|
|
3445
3487
|
: (0, colors_1.getMainBackgroundColor)(theme)
|
|
3446
3488
|
: undefined, ref: function (node) {
|
|
@@ -3487,7 +3529,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3487
3529
|
// the box reveals the preselected fields without also
|
|
3488
3530
|
// dumping every not-yet-added optional field on the
|
|
3489
3531
|
// author.
|
|
3490
|
-
isCollapsed:
|
|
3532
|
+
isCollapsed: opensCollapsed, label: calm ?
|
|
3491
3533
|
// One status dot and a word — and only where a
|
|
3492
3534
|
// person is needed. The count is a quiet number.
|
|
3493
3535
|
(0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupHeader, { "$calm": true, children: [box.key === 'attention' && readFirstAttentionFaultCount ?
|
|
@@ -3497,14 +3539,23 @@ var FormEngineImpl = function (_a) {
|
|
|
3497
3539
|
: null] })
|
|
3498
3540
|
: (0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupHeader, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { effect: { weight: 'bold' }, size: 'normal', children: box.label }), headerCount ?
|
|
3499
3541
|
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'small', minimal: true, compact: true, intent: box.intent, label: String(headerCount) })
|
|
3500
|
-
: null] }), icon: calm ? undefined : box.icon, className: 'options-readfirst-group', padded: false,
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3542
|
+
: null] }), icon: calm ? undefined : box.icon, className: 'options-readfirst-group', padded: false,
|
|
3543
|
+
// Calm: the last row's band meets the box's own corner, whatever
|
|
3544
|
+
// the theme makes it (the body inherits it, `$boxCorners`)
|
|
3545
|
+
contentStyle: calm ?
|
|
3546
|
+
{
|
|
3547
|
+
padding: 0,
|
|
3548
|
+
borderBottomLeftRadius: 'inherit',
|
|
3549
|
+
borderBottomRightRadius: 'inherit',
|
|
3550
|
+
}
|
|
3551
|
+
: { padding: '4px 4px 6px' }, 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) {
|
|
3552
|
+
return renderBoxGroup(box.key, groupName, shownRowSet);
|
|
3553
|
+
}), deferredCount ? renderMoreRow(box.key, deferredCount, moreOpen) : null, deferredCount && moreOpen ?
|
|
3554
|
+
deferredGroups.map(function (groupName) {
|
|
3555
|
+
return renderBoxGroup(box.key, groupName, deferredRowSet);
|
|
3556
|
+
})
|
|
3557
|
+
: null] }))] }, box.key));
|
|
3558
|
+
})] })), (0, jsx_runtime_1.jsx)(rowPlaces_1.RowStage, { rows: Array.from(stagedRows.values()) }), commitMode === 'batched' && !readOnly && dirtyOptionNames.length ?
|
|
3508
3559
|
(0, jsx_runtime_1.jsx)(StyledCommitDock, { "$bg": cBg, "$border": cDivider, children: (0, jsx_runtime_1.jsxs)(reqore_1.ReqoreControlGroup, { className: 'options-readfirst-commitbar', verticalAlign: 'center', wrap: true, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'tiny', minimal: true, flat: true, compact: true, effect: { uppercase: true, spaced: 1 }, intent: 'warning', icon: 'EditLine', label: feWords.unsavedChanges(dirtyOptionNames.length) }), validityData.isValid ? null : ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'tiny', minimal: true, flat: true, wrap: true, intent: 'danger', icon: 'ErrorWarningLine', className: 'options-readfirst-commit-blocked', label: (0, readFirst_1.describeBlockedSave)(validityData.invalidFields, options) })), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreButton, { size: 'small', intent: 'success', icon: 'CheckLine', fixed: true, className: 'options-readfirst-save', disabled: !validityData.isValid, tooltip: validityData.isValid ? feWords.applyChanges : feWords.resolveInvalid, onClick: handleCommitClick, children: feWords.save }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreButton, { size: 'small', minimal: true, flat: true, fixed: true, icon: 'HistoryLine', className: 'options-readfirst-discard', onClick: handleRevertChangesClick, children: feWords.discard })] }) })
|
|
3509
3560
|
: null] }) })] }) }) }));
|
|
3510
3561
|
};
|