@qoretechnologies/reqraft 0.10.65 → 0.10.66-pr.145.g32331ea
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 +128 -24
- 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 +78 -15
- package/dist/components/form/engine/CompactToolbar.js.map +1 -1
- package/dist/components/form/engine/FormEngine.d.ts +48 -1
- package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
- package/dist/components/form/engine/FormEngine.js +243 -85
- package/dist/components/form/engine/FormEngine.js.map +1 -1
- package/dist/components/form/engine/OptionFieldMessages.d.ts +18 -2
- package/dist/components/form/engine/OptionFieldMessages.d.ts.map +1 -1
- package/dist/components/form/engine/OptionFieldMessages.js +22 -3
- package/dist/components/form/engine/OptionFieldMessages.js.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.js +27 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.js.map +1 -1
- package/dist/components/form/engine/compactRowContext.d.ts +5 -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 +12 -0
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +72 -39
- package/dist/components/form/engine/compactRowStyles.js.map +1 -1
- package/dist/components/form/engine/compactToolbarContext.d.ts +3 -0
- package/dist/components/form/engine/compactToolbarContext.d.ts.map +1 -1
- package/dist/components/form/engine/compactToolbarContext.js.map +1 -1
- package/dist/components/form/engine/formAppearance.d.ts +48 -0
- package/dist/components/form/engine/formAppearance.d.ts.map +1 -0
- package/dist/components/form/engine/formAppearance.js +50 -0
- package/dist/components/form/engine/formAppearance.js.map +1 -0
- package/dist/components/form/engine/readFirst.d.ts +14 -2
- package/dist/components/form/engine/readFirst.d.ts.map +1 -1
- package/dist/components/form/engine/readFirst.js +6 -2
- package/dist/components/form/engine/readFirst.js.map +1 -1
- package/dist/components/form/engine/rowFocus.d.ts +9 -1
- package/dist/components/form/engine/rowFocus.d.ts.map +1 -1
- package/dist/components/form/engine/rowFocus.js +17 -5
- package/dist/components/form/engine/rowFocus.js.map +1 -1
- package/dist/components/form/fields/ChoiceGroupHeading.d.ts +21 -0
- package/dist/components/form/fields/ChoiceGroupHeading.d.ts.map +1 -0
- package/dist/components/form/fields/ChoiceGroupHeading.js +33 -0
- package/dist/components/form/fields/ChoiceGroupHeading.js.map +1 -0
- package/dist/components/form/fields/Field.d.ts.map +1 -1
- package/dist/components/form/fields/Field.js +5 -3
- package/dist/components/form/fields/Field.js.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.d.ts.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.js +4 -2
- package/dist/components/form/fields/allowed-values/AllowedValues.js.map +1 -1
- package/dist/components/form/fields/radio-group/RadioGroup.d.ts.map +1 -1
- package/dist/components/form/fields/radio-group/RadioGroup.js +13 -7
- package/dist/components/form/fields/radio-group/RadioGroup.js.map +1 -1
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +1 -0
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/supportTicket/TicketHeader.d.ts.map +1 -1
- package/dist/components/supportTicket/TicketHeader.js +4 -1
- package/dist/components/supportTicket/TicketHeader.js.map +1 -1
- package/dist/components/supportTicket/TicketReplyBox.d.ts.map +1 -1
- package/dist/components/supportTicket/TicketReplyBox.js +29 -10
- package/dist/components/supportTicket/TicketReplyBox.js.map +1 -1
- package/package.json +1 -1
- package/src/components/form/engine/CompactRow.tsx +141 -22
- package/src/components/form/engine/CompactToolbar.tsx +85 -16
- package/src/components/form/engine/FormEngine.stories.tsx +25 -13
- package/src/components/form/engine/FormEngine.tsx +358 -77
- package/src/components/form/engine/FormEngineAppearance.stories.tsx +540 -0
- package/src/components/form/engine/FormEngineStickyHeaders.stories.tsx +5 -1
- package/src/components/form/engine/OptionFieldMessages.tsx +73 -2
- package/src/components/form/engine/_structuredData/SchemaDataView.tsx +17 -4
- package/src/components/form/engine/compactRowContext.ts +5 -0
- package/src/components/form/engine/compactRowStyles.ts +218 -38
- package/src/components/form/engine/compactToolbarContext.ts +3 -0
- package/src/components/form/engine/formAppearance.ts +78 -0
- package/src/components/form/engine/readFirst.ts +16 -3
- package/src/components/form/engine/rowFocus.ts +17 -6
- package/src/components/form/fields/ChoiceGroupHeading.tsx +38 -0
- package/src/components/form/fields/Field.tsx +6 -5
- package/src/components/form/fields/allowed-values/AllowedValues.tsx +7 -4
- package/src/components/form/fields/radio-group/RadioGroup.tsx +13 -7
- package/src/components/form/index.tsx +1 -0
- package/src/components/supportTicket/TicketHeader.tsx +2 -1
- package/src/components/supportTicket/TicketReplyBox.stories.tsx +17 -2
- package/src/components/supportTicket/TicketReplyBox.tsx +27 -5
|
@@ -26,16 +26,22 @@ exports.RadioGroupFormField = void 0;
|
|
|
26
26
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
27
|
var reqore_1 = require("@qoretechnologies/reqore");
|
|
28
28
|
var react_1 = require("react");
|
|
29
|
+
var formAppearance_1 = require("../../engine/formAppearance");
|
|
29
30
|
var RadioGroupFormField = function (_a) {
|
|
30
31
|
var _items = _a.items, disabled = _a.disabled, onChange = _a.onChange, value = _a.value, rest = __rest(_a, ["items", "disabled", "onChange", "value"]);
|
|
32
|
+
var calm = (0, formAppearance_1.useIsCalmForm)();
|
|
31
33
|
var items = (0, react_1.useMemo)(function () {
|
|
32
|
-
return _items.map(function (item) { return (__assign(__assign({ margin: 'right',
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
return _items.map(function (item) { return (__assign(__assign({ margin: 'right',
|
|
35
|
+
// Calm: an option's name as written — a choice is read, not shouted.
|
|
36
|
+
labelEffect: calm ?
|
|
37
|
+
{ textSize: 'small' }
|
|
38
|
+
: {
|
|
39
|
+
spaced: 1,
|
|
40
|
+
weight: 'bold',
|
|
41
|
+
uppercase: true,
|
|
42
|
+
textSize: 'small',
|
|
43
|
+
} }, item), { disabled: disabled || item.disabled })); });
|
|
44
|
+
}, [_items, calm]);
|
|
39
45
|
return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreRadioGroup, __assign({ items: items, disabled: disabled, onSelectClick: onChange, selected: value }, rest)));
|
|
40
46
|
};
|
|
41
47
|
exports.RadioGroupFormField = RadioGroupFormField;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../../../src/components/form/fields/radio-group/RadioGroup.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAA4D;AAE5D,+BAAgC;
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../../../src/components/form/fields/radio-group/RadioGroup.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAA4D;AAE5D,+BAAgC;AAChC,8DAA4D;AASrD,IAAM,mBAAmB,GAAG,UAAC,EAMR;IAL1B,IAAO,MAAM,WAAA,EACb,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,KAAK,WAAA,EACF,IAAI,cAL2B,0CAMnC,CADQ;IAEP,IAAM,IAAI,GAAG,IAAA,8BAAa,GAAE,CAAC;IAC7B,IAAM,KAAK,GAAoC,IAAA,eAAO,EACpD;QACE,OAAA,MAAM,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,qBACnB,MAAM,EAAE,OAAO;YACf,qEAAqE;YACrE,WAAW,EACT,IAAI,CAAC,CAAC;gBACJ,EAAE,QAAQ,EAAE,OAAO,EAAE;gBACvB,CAAC,CAAC;oBACE,MAAM,EAAE,CAAC;oBACT,MAAM,EAAE,MAAM;oBACd,SAAS,EAAE,IAAI;oBACf,QAAQ,EAAE,OAAO;iBAClB,IACF,IAAI,KACP,QAAQ,EAAE,QAAQ,IAAI,IAAI,CAAC,QAAQ,IACnC,EAdmB,CAcnB,CAAC;IAdH,CAcG,EACL,CAAC,MAAM,EAAE,IAAI,CAAC,CACf,CAAC;IAEF,OAAO,CACL,uBAAC,yBAAgB,aACf,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,QAAQ,EACvB,QAAQ,EAAE,KAAK,IACX,IAAI,EACR,CACH,CAAC;AACJ,CAAC,CAAC;AArCW,QAAA,mBAAmB,uBAqC9B;AAEF,kBAAe,2BAAmB,CAAC"}
|
|
@@ -24,6 +24,7 @@ export * from './fields/string/String';
|
|
|
24
24
|
export * from './fields/template/ExampleValueModal';
|
|
25
25
|
export * from './fields/template/TemplateField';
|
|
26
26
|
export * from './engine/FormEngine';
|
|
27
|
+
export * from './engine/formAppearance';
|
|
27
28
|
export * from './engine/FormFieldsSkeleton';
|
|
28
29
|
export * from './engine/optionActions';
|
|
29
30
|
export * from './engine/rendererTypes';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/form/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uCAAuC,CAAC;AACtD,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CA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AAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AAGvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAG7C,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAChG,YAAY,EACV,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,mCAAmC,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAI9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -41,6 +41,7 @@ __exportStar(require("./fields/string/String"), exports);
|
|
|
41
41
|
__exportStar(require("./fields/template/ExampleValueModal"), exports);
|
|
42
42
|
__exportStar(require("./fields/template/TemplateField"), exports);
|
|
43
43
|
__exportStar(require("./engine/FormEngine"), exports);
|
|
44
|
+
__exportStar(require("./engine/formAppearance"), exports);
|
|
44
45
|
__exportStar(require("./engine/FormFieldsSkeleton"), exports);
|
|
45
46
|
__exportStar(require("./engine/optionActions"), exports);
|
|
46
47
|
__exportStar(require("./engine/rendererTypes"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/form/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,wEAAsD;AACtD,2DAAyC;AACzC,gEAA8C;AAC9C,8DAA4C;AAC5C,8DAA4C;AAC5C,2DAAyC;AACzC,mDAAiC;AACjC,6DAA2C;AAC3C,2DAAyC;AACzC,uDAAqC;AACrC,qDAAmC;AACnC,qDAAmC;AACnC,kEAAgD;AAChD,6DAA2C;AAC3C,6EAA2D;AAC3D,yDAAuC;AACvC,yDAAuC;AACvC,kEAAgD;AAChD,8DAA4C;AAC5C,yDAAuC;AACvC,mEAAiD;AACjD,yDAAuC;AACvC,sEAAoD;AACpD,kEAAgD;AAChD,sDAAoC;AACpC,8DAA4C;AAC5C,yDAAuC;AACvC,yDAAuC;AACvC,8EAA8E;AAC9E,8EAA8E;AAC9E,yDAAuC;AACvC,sDAAoC;AACpC,+DAA6C;AAC7C,wEAAwE;AACxE,qDAAqD;AACrD,yEAAgG;AAAvF,6HAAA,sBAAsB,OAAA;AAAE,0HAAA,mBAAmB,OAAA;AAKpD,gEAA8C;AAC9C,gFAAgF;AAChF,+EAA+E;AAC/E,qEAAqE;AACrE,iDAA0D;AAAjD,4GAAA,iBAAiB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/form/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,wEAAsD;AACtD,2DAAyC;AACzC,gEAA8C;AAC9C,8DAA4C;AAC5C,8DAA4C;AAC5C,2DAAyC;AACzC,mDAAiC;AACjC,6DAA2C;AAC3C,2DAAyC;AACzC,uDAAqC;AACrC,qDAAmC;AACnC,qDAAmC;AACnC,kEAAgD;AAChD,6DAA2C;AAC3C,6EAA2D;AAC3D,yDAAuC;AACvC,yDAAuC;AACvC,kEAAgD;AAChD,8DAA4C;AAC5C,yDAAuC;AACvC,mEAAiD;AACjD,yDAAuC;AACvC,sEAAoD;AACpD,kEAAgD;AAChD,sDAAoC;AACpC,0DAAw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mF;IACnF,KAAK,EAAE,SAAS,CAAC;IACjB;yEACqE;IACrE,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC;gFAC4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACpC,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,4DAMtB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"TicketHeader.d.ts","sourceRoot":"","sources":["../../../src/components/supportTicket/TicketHeader.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAErF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAsBlC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,QAA0C,CAAC;AAE9E;;qEAEqE;AACrE,eAAO,MAAM,YAAY,KAIxB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,KAY7B,CAAC;AAEF,kCAAkC;AAClC,eAAO,MAAM,YAAY,KAaxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,SAAU,MAAM,KAAG,MAM1B,CAAC;AAErB;;;;GAIG;AACH,eAAO,MAAM,eAAe,KAc3B,CAAC;AAWF,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,cAAc,UAClB,MAAM,YACH,OAAO,WACR;IAAE,KAAK,EAAE,kBAAkB,CAAC;IAAC,IAAI,EAAE,kBAAkB,CAAA;CAAE,KAC/D,YAAY,GAAG,SAQjB,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,KAAK,EAAE,SAAS,CAAC;IACjB;yEACqE;IACrE,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC;gFAC4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACpC,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,4DAMtB,kBAAkB,4CA4CpB,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,gBAAgB,kCAI1B;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,iDAAiD;IACjD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,4CAIA,CAAC"}
|
|
@@ -126,7 +126,10 @@ var TicketHeader = function (_a) {
|
|
|
126
126
|
/* The rail's rhythm, which the tab strip below is measured against — see
|
|
127
127
|
TICKET_RAIL_ROW_HEIGHT. Reqore's comfortable default would make the rows 52px
|
|
128
128
|
and the strip would no longer line up with them. */
|
|
129
|
-
rowPadding: 'tiny', labelWidth: LABEL_WIDTH,
|
|
129
|
+
rowPadding: 'tiny', labelWidth: LABEL_WIDTH,
|
|
130
|
+
/* The labels' case is the theme's (`theme.uppercaseLabels`): an app that sets its
|
|
131
|
+
labels in sentence case gets "Opened by", not "OPENED BY". */
|
|
132
|
+
flat: true, transparent: true, padded: false, contentStyle: { padding: "".concat(padding - 4, "px ").concat(padding, "px ").concat(padding - 6, "px") }, className: "".concat(className || '', " ticket-header"), label: subject ? (
|
|
130
133
|
/* The label is the panel's heading, which `padded={false}` leaves flush against
|
|
131
134
|
the edge — `contentStyle` only pads the rows. Pad the subject here so it lines
|
|
132
135
|
up with the values below it, using the same horizontal `padding` as the rows. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TicketHeader.js","sourceRoot":"","sources":["../../../src/components/supportTicket/TicketHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,mDAIkC;AAGlC,uEAA2E;AAE3E,wEAAuC;AAEvC;;;;;;;;;;GAUG;AAEH,kFAAkF;AAClF,IAAM,WAAW,GAAG,MAAM,CAAC;AAC3B,gDAAgD;AAChD,IAAM,SAAS,GAAG,OAAgB,CAAC;AACnC,sFAAsF;AACtF,IAAM,WAAW,GAAG,CAAC,CAAC;AAEtB;;;;;;;;;;;;;GAaG;AACU,QAAA,sBAAsB,GAAG,kBAAU,CAAC,SAAS,CAAC,GAAG,WAAW,GAAG,CAAC,CAAC;AAE9E;;qEAEqE;AACxD,QAAA,YAAY,GAAG,2BAAM,CAAC,IAAI,+LAAA,4HAItC,KAAC;AAEF;;;;;;;;GAQG;AACU,QAAA,iBAAiB,GAAG,2BAAM,CAAC,IAAI,iTAAA,8OAY3C,KAAC;AAEF,kCAAkC;AACrB,QAAA,YAAY,GAAG,2BAAM,CAAC,IAAI,+XAAA,4TAatC,KAAC;AAEF;;;GAGG;AACI,IAAM,cAAc,GAAG,UAAC,IAAY;IACzC,OAAA,IAAI;SACD,KAAK,CAAC,WAAW,CAAC;SAClB,MAAM,CAAC,OAAO,CAAC;SACf,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;SACX,GAAG,CAAC,UAAC,IAAI,gBAAK,OAAA,MAAA,MAAA,IAAI,CAAC,CAAC,CAAC,0CAAE,WAAW,EAAE,mCAAI,EAAE,CAAA,EAAA,CAAC;SAC3C,IAAI,CAAC,EAAE,CAAC,IAAI,GAAG;AALlB,CAKkB,CAAC;AANR,QAAA,cAAc,kBAMN;AAErB;;;;GAIG;AACU,QAAA,eAAe,GAAG,2BAAM,CAAC,GAAG,yRAAA,wMAYvB,EAAsB,YAEvC,KAFiB,8BAAsB,EAEtC;AAEF;;;;;;;;GAQG;AACU,QAAA,gBAAgB,GAAG;IAC9B,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,QAAQ;CACZ,CAAC;AAEX;;;;GAIG;AACI,IAAM,cAAc,GAAG,UAC5B,KAAa,EACb,QAAiB,EACjB,MAAgE;IAEhE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC;AAC/E,CAAC,CAAC;AAZW,QAAA,cAAc,kBAYzB;AAuBK,IAAM,YAAY,GAAG,UAAC,EAMR;QALnB,OAAO,aAAA,EACP,SAAS,eAAA,EACT,UAAU,gBAAA,EACV,eAAY,EAAZ,OAAO,mBAAG,EAAE,KAAA,EACZ,SAAS,eAAA;IACe,OAAA,CACxB,uBAAC,8BAAqB;IACpB;;;6DAGyD;;QAHzD;;;iEAGyD;QACzD,WAAW,EAAE,SAAS,EACtB,IAAI,EAAE,SAAS;QACf;gFACwE;QACxE,aAAa,EAAC,MAAM;QACpB;;8DAEsD;QACtD,UAAU,EAAC,MAAM,EACjB,UAAU,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"TicketHeader.js","sourceRoot":"","sources":["../../../src/components/supportTicket/TicketHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,mDAIkC;AAGlC,uEAA2E;AAE3E,wEAAuC;AAEvC;;;;;;;;;;GAUG;AAEH,kFAAkF;AAClF,IAAM,WAAW,GAAG,MAAM,CAAC;AAC3B,gDAAgD;AAChD,IAAM,SAAS,GAAG,OAAgB,CAAC;AACnC,sFAAsF;AACtF,IAAM,WAAW,GAAG,CAAC,CAAC;AAEtB;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,KAAK,KAAK,EAAvB,CAAuB,CAAC;aAC7C,GAAG,CAAC,UAAC,QAAQ,IAAK,OAAA,CAAC;YAClB,GAAG,EAAE,QAAQ,CAAC,KAAK;YACnB,KAAK,EAAE,QAAQ,CAAC,KAAK;YACrB,OAAO,EAAE,QAAQ,CAAC,KAAK;SACxB,CAAC,EAJiB,CAIjB,CAAC,GACL,CACH;AA5CyB,CA4CzB,CAAC;AAlDW,QAAA,YAAY,gBAkDvB;AAEF,uFAAuF;AAChF,IAAM,gBAAgB,GAAG,UAAC,EAShC;QARC,QAAQ,cAAA,EACR,KAAK,WAAA,EACL,OAAO,aAAA;IAMH,OAAA,CACJ,uBAAC,mBAAU,IAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,YACxF,QAAQ,GACE,CACd;AAJK,CAIL,CAAC;AAbW,QAAA,gBAAgB,oBAa3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TicketReplyBox.d.ts","sourceRoot":"","sources":["../../../src/components/supportTicket/TicketReplyBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,
|
|
1
|
+
{"version":3,"file":"TicketReplyBox.d.ts","sourceRoot":"","sources":["../../../src/components/supportTicket/TicketReplyBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAIL,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAiB3C;;;;GAIG;AACH,KAAK,gB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AUG;AACH,eAAO,MAAM,cAAc,2MAgBxB,oBAAoB,4CAmEtB,CAAC"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
14
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
15
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -40,6 +51,20 @@ exports.TicketReplyBox = void 0;
|
|
|
40
51
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
52
|
var Composer_1 = require("../composer/Composer");
|
|
42
53
|
var fileToAttachment_1 = require("./fileToAttachment");
|
|
54
|
+
/**
|
|
55
|
+
* A ticket reply is not a hand-off to Qonsole, so it does not wear Qonsole's look: no purple
|
|
56
|
+
* bar, no purple send (instruction-files decision 002 — a purple button means "this hands the
|
|
57
|
+
* work to Qonsole / AI" and nothing else). The bar keeps the composer's shape with the theme's
|
|
58
|
+
* own neutral edge (its `main`, a step lighter — how Reqore draws its dividers), and sending
|
|
59
|
+
* the reply is the surface's one primary action: white.
|
|
60
|
+
*/
|
|
61
|
+
var REPLY_BOX_EFFECT = {
|
|
62
|
+
gradient: { direction: 'to bottom right', colors: 'main:lighten:3' },
|
|
63
|
+
};
|
|
64
|
+
var REPLY_SEND_STYLE = {
|
|
65
|
+
intent: 'white',
|
|
66
|
+
minimal: false,
|
|
67
|
+
};
|
|
43
68
|
/**
|
|
44
69
|
* The shared ticket reply composer — now a thin adapter over the universal
|
|
45
70
|
* `<Composer>` (the input extracted from qorus-ide's Qonsole chat). It maps the
|
|
@@ -65,17 +90,11 @@ var TicketReplyBox = function (_a) {
|
|
|
65
90
|
: 'Send reply';
|
|
66
91
|
};
|
|
67
92
|
// Staff surface splits the send button; customer surface is a single "Send reply".
|
|
68
|
-
// Both
|
|
69
|
-
//
|
|
93
|
+
// Both send the reply as the white primary (`REPLY_SEND_STYLE`); the internal note
|
|
94
|
+
// stays amber (`warning`) so it can't be mistaken for a public reply.
|
|
70
95
|
var sendActions = allowInternalNote
|
|
71
96
|
? [
|
|
72
|
-
{
|
|
73
|
-
id: 'reply',
|
|
74
|
-
label: labelFor(false),
|
|
75
|
-
icon: 'SendPlane2Line',
|
|
76
|
-
minimal: true,
|
|
77
|
-
customTheme: { main: 'custom1' },
|
|
78
|
-
},
|
|
97
|
+
__assign({ id: 'reply', label: labelFor(false), icon: 'SendPlane2Line' }, REPLY_SEND_STYLE),
|
|
79
98
|
{
|
|
80
99
|
id: 'internal',
|
|
81
100
|
label: labelFor(true),
|
|
@@ -109,7 +128,7 @@ var TicketReplyBox = function (_a) {
|
|
|
109
128
|
}
|
|
110
129
|
});
|
|
111
130
|
}); };
|
|
112
|
-
return ((0, jsx_runtime_1.jsx)(Composer_1.Composer, { editor: editor, defaultText: defaultText, defaultFiles: defaultFiles, placeholder: resolvedPlaceholder, sending: sending, disabled: disabled, disabledReason: disabledReason, onSend: handleSend, sendLabel: labelFor(false), sendActions: sendActions, sendMenuClassName: 'ticket-send-more', attachMenuItems: attachMenuItems, footerActions: footerActions, aboveInput: aboveInput, belowInput: belowInput }));
|
|
131
|
+
return ((0, jsx_runtime_1.jsx)(Composer_1.Composer, { editor: editor, defaultText: defaultText, defaultFiles: defaultFiles, placeholder: resolvedPlaceholder, sending: sending, disabled: disabled, disabledReason: disabledReason, onSend: handleSend, sendLabel: labelFor(false), sendIntent: REPLY_SEND_STYLE.intent, sendMinimal: REPLY_SEND_STYLE.minimal, sendActions: sendActions, effect: REPLY_BOX_EFFECT, sendMenuClassName: 'ticket-send-more', attachMenuItems: attachMenuItems, footerActions: footerActions, aboveInput: aboveInput, belowInput: belowInput }));
|
|
113
132
|
};
|
|
114
133
|
exports.TicketReplyBox = TicketReplyBox;
|
|
115
134
|
//# sourceMappingURL=TicketReplyBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TicketReplyBox.js","sourceRoot":"","sources":["../../../src/components/supportTicket/TicketReplyBox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TicketReplyBox.js","sourceRoot":"","sources":["../../../src/components/supportTicket/TicketReplyBox.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,iDAK8B;AAC9B,uDAAiF;AAGjF;;;;;;GAMG;AACH,IAAM,gBAAgB,GAA6B;IACjD,QAAQ,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,EAAE,gBAAgB,EAAE;CACrE,CAAC;AACF,IAAM,gBAAgB,GAAoD;IACxE,MAAM,EAAE,OAAO;IACf,OAAO,EAAE,KAAK;CACf,CAAC;AAqDF;;;;;;;;;;GAUG;AACI,IAAM,cAAc,GAAG,UAAC,EAgBR;QAfrB,MAAM,YAAA,EACN,wBAA0C,EAA1C,gBAAgB,mBAAG,mCAAuB,KAAA,EAC1C,OAAO,aAAA,EACP,QAAQ,cAAA,EACR,sBAAyF,EAAzF,cAAc,mBAAG,wEAAwE,KAAA,EACzF,mBAA8B,EAA9B,WAAW,mBAAG,gBAAgB,KAAA,EAC9B,SAAS,eAAA,EACT,iBAAiB,uBAAA,EACjB,eAAe,qBAAA,EACf,aAAa,mBAAA,EACb,UAAU,gBAAA,EACV,UAAU,gBAAA,EACV,cAAe,EAAf,MAAM,mBAAG,MAAM,KAAA,EACf,WAAW,iBAAA,EACX,YAAY,kBAAA;IAEZ,IAAM,mBAAmB,GACvB,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A6C,CAAC;;;;SAC/C,CAAC;IAEF,OAAO,CACL,uBAAC,mBAAQ,IACP,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,mBAAmB,EAChC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,EAC1B,UAAU,EAAE,gBAAgB,CAAC,MAAM,EACnC,WAAW,EAAE,gBAAgB,CAAC,OAAO,EACrC,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,gBAAgB,EACxB,iBAAiB,EAAC,kBAAkB,EACpC,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,GACtB,CACH,CAAC;AACJ,CAAC,CAAC;AAnFW,QAAA,cAAc,kBAmFzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qoretechnologies/reqraft",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.66-pr.145.g32331ea",
|
|
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 { CALM_REQUIRED_LABEL, CALM_REQUIRED_READ_LABEL, useIsCalmForm } from './formAppearance';
|
|
38
39
|
import { revealRow } from './revealRow';
|
|
39
40
|
import {
|
|
40
41
|
StyledActionSlot,
|
|
@@ -192,8 +193,17 @@ export const CompactRow = memo(
|
|
|
192
193
|
clusterLast?: boolean;
|
|
193
194
|
}) => {
|
|
194
195
|
const readOnly = useContextSelector(CompactRowContext, (v) => v.readOnly);
|
|
196
|
+
// The look only — see `TFormEngineAppearance`. Nothing a row DOES reads it.
|
|
197
|
+
const calm = useIsCalmForm();
|
|
195
198
|
const commitMode = useContextSelector(CompactRowContext, (v) => v.commitMode);
|
|
196
199
|
const options = useContextSelector(CompactRowContext, (v) => v.options);
|
|
200
|
+
// Whether this field's emptiness is a fault yet: the person has opened it and left,
|
|
201
|
+
// or the host reported a submit attempt. Before that a required field is only to
|
|
202
|
+
// fill in, and says so in the quiet colour.
|
|
203
|
+
const visited = useContextSelector(
|
|
204
|
+
CompactRowContext,
|
|
205
|
+
(v) => v.revealRequired || !!v.visitedOptions?.includes(optionName)
|
|
206
|
+
);
|
|
197
207
|
|
|
198
208
|
// An absorbed field keeps its own name — it is a different field, not a
|
|
199
209
|
// property of its host — so the label comes from its schema exactly as it
|
|
@@ -296,6 +306,11 @@ export const CompactRow = memo(
|
|
|
296
306
|
const cDanger = useContextSelector(CompactRowContext, (v) => v.cDanger);
|
|
297
307
|
const cWarning = useContextSelector(CompactRowContext, (v) => v.cWarning);
|
|
298
308
|
const cInfo = useContextSelector(CompactRowContext, (v) => v.cInfo);
|
|
309
|
+
const cText = useContextSelector(CompactRowContext, (v) => v.cText);
|
|
310
|
+
// A field's NAME: full text colour by default; grey in the calm look, so the
|
|
311
|
+
// value beside it is what the eye lands on. One colour for the read row, the
|
|
312
|
+
// open row and the edit card, so a name does not change as its field opens.
|
|
313
|
+
const cLabel = calm ? `${cText}b3` : cKey;
|
|
299
314
|
// A markdown value renders as a document in the row's inset; the host's
|
|
300
315
|
// renderer when it supplied one, reqraft's own otherwise.
|
|
301
316
|
|
|
@@ -402,6 +417,11 @@ export const CompactRow = memo(
|
|
|
402
417
|
}
|
|
403
418
|
|
|
404
419
|
if (valueType === 'bool' || valueType === 'boolean') {
|
|
420
|
+
// Calm: Yes and No are words. Neither is a status — "No" is not a
|
|
421
|
+
// failure — so neither is coloured.
|
|
422
|
+
if (calm) {
|
|
423
|
+
return <span style={textStyle}>{formatted}</span>;
|
|
424
|
+
}
|
|
405
425
|
const truthy = field?.value === true || field?.value === 'true';
|
|
406
426
|
return (
|
|
407
427
|
<ReqoreTag
|
|
@@ -701,8 +721,11 @@ export const CompactRow = memo(
|
|
|
701
721
|
);
|
|
702
722
|
};
|
|
703
723
|
const required = !!(schema?.required || schema?.required_groups);
|
|
704
|
-
// The asterisk says "you have to fill this in". Read-only, nobody does.
|
|
705
|
-
|
|
724
|
+
// The asterisk says "you have to fill this in". Read-only, nobody does. The
|
|
725
|
+
// calm look draws none at all: an empty required field says so in its
|
|
726
|
+
// value column instead ("Required · add a value"), and a filled one has
|
|
727
|
+
// nothing left to ask for.
|
|
728
|
+
const requiredMark = required && !readOnly && !calm;
|
|
706
729
|
const removable =
|
|
707
730
|
!readOnly && !schema?.preselected && !schema?.required && !schema?.required_groups;
|
|
708
731
|
const changed = !hidden && !readOnly && hasOptionChanged(optionField?.value, optionName);
|
|
@@ -767,8 +790,15 @@ export const CompactRow = memo(
|
|
|
767
790
|
minimal
|
|
768
791
|
flat
|
|
769
792
|
compact
|
|
770
|
-
effect={{ uppercase: true, spaced: 1 }}
|
|
771
|
-
|
|
793
|
+
effect={calm ? undefined : { uppercase: true, spaced: 1 }}
|
|
794
|
+
// Calm: a met group is nothing to point at — only the unmet one is
|
|
795
|
+
// coloured.
|
|
796
|
+
intent={
|
|
797
|
+
groupResolved ?
|
|
798
|
+
calm ? undefined
|
|
799
|
+
: 'success'
|
|
800
|
+
: 'warning'
|
|
801
|
+
}
|
|
772
802
|
icon={groupResolved ? 'CheckLine' : 'LinkM'}
|
|
773
803
|
label={
|
|
774
804
|
!groupResolved ? 'One of'
|
|
@@ -921,16 +951,39 @@ export const CompactRow = memo(
|
|
|
921
951
|
const editor = editorRef.current;
|
|
922
952
|
if (!editor) return undefined;
|
|
923
953
|
let settled = false;
|
|
954
|
+
/* A control that is not a text box holds the caret PROVISIONALLY. An editor that
|
|
955
|
+
takes text can mount after the row opens (a code editor loads late), and until
|
|
956
|
+
it does the only control there is its chrome: a fullscreen toggle. When the
|
|
957
|
+
text box arrives it takes the caret, unless the reader has moved it since. A
|
|
958
|
+
row that never grows one (a pick-one) simply keeps its control. */
|
|
959
|
+
let provisional: HTMLElement | null = null;
|
|
924
960
|
const takeCaret = (): boolean => {
|
|
925
961
|
if (settled) return true;
|
|
926
962
|
const active = document.activeElement as HTMLElement | null;
|
|
963
|
+
if (provisional) {
|
|
964
|
+
if (active !== provisional) {
|
|
965
|
+
// The reader moved the caret themselves. Leave it there.
|
|
966
|
+
settled = true;
|
|
967
|
+
return true;
|
|
968
|
+
}
|
|
969
|
+
const textEntry = findRowFocusTarget(editor, { textEntryOnly: true });
|
|
970
|
+
if (!textEntry) return false;
|
|
971
|
+
textEntry.focus({ preventScroll: true });
|
|
972
|
+
// An editor's text box can be in the DOM before it can take focus (Monaco's
|
|
973
|
+
// edit area, mid-layout), and `focus()` then does nothing. Only a caret
|
|
974
|
+
// that landed counts; otherwise try again on the editor's next change.
|
|
975
|
+
if (document.activeElement !== textEntry) return false;
|
|
976
|
+
settled = true;
|
|
977
|
+
return true;
|
|
978
|
+
}
|
|
927
979
|
if (active && active !== document.body && !rowRef.current?.contains(active)) {
|
|
928
980
|
// Someone else holds the caret — a field the reader moved into while
|
|
929
981
|
// this row's editor was still arriving. Leave it where it is.
|
|
930
982
|
settled = true;
|
|
931
983
|
return true;
|
|
932
984
|
}
|
|
933
|
-
|
|
985
|
+
// A card hands the caret only to where text goes (see `findRowFocusTarget`).
|
|
986
|
+
const control = findRowFocusTarget(editor, { textEntryOnly: !inlineEditable });
|
|
934
987
|
if (!control) return false;
|
|
935
988
|
// The least scroll that shows the row clear of the pinned box header,
|
|
936
989
|
// and none when it is already in view (see `revealRow`).
|
|
@@ -940,6 +993,9 @@ export const CompactRow = memo(
|
|
|
940
993
|
// `preventScroll`, because the reveal above has already put the row
|
|
941
994
|
// where it belongs; letting focus scroll as well moves it twice.
|
|
942
995
|
control.focus({ preventScroll: true });
|
|
996
|
+
// A control that cannot take focus yet (still laying out) did not take
|
|
997
|
+
// the caret: try again on the editor's next change.
|
|
998
|
+
if (document.activeElement !== control) return false;
|
|
943
999
|
/* …and if the control the row offers is a PICKER, open it.
|
|
944
1000
|
*
|
|
945
1001
|
* A closed picker prints the value it holds, which is exactly what the
|
|
@@ -957,6 +1013,13 @@ export const CompactRow = memo(
|
|
|
957
1013
|
if (openedByAuthor.current && inlineEditable && isClosedPickerTrigger(control)) {
|
|
958
1014
|
openedByAuthor.current = false;
|
|
959
1015
|
setOpenThePicker(true);
|
|
1016
|
+
settled = true;
|
|
1017
|
+
return true;
|
|
1018
|
+
}
|
|
1019
|
+
if (findRowFocusTarget(editor, { textEntryOnly: true }) !== control) {
|
|
1020
|
+
// Not a text box: hold it until one arrives (see `provisional`).
|
|
1021
|
+
provisional = control;
|
|
1022
|
+
return false;
|
|
960
1023
|
}
|
|
961
1024
|
settled = true;
|
|
962
1025
|
return true;
|
|
@@ -965,7 +1028,9 @@ export const CompactRow = memo(
|
|
|
965
1028
|
const observer = new MutationObserver(() => {
|
|
966
1029
|
if (takeCaret()) observer.disconnect();
|
|
967
1030
|
});
|
|
968
|
-
|
|
1031
|
+
// Attributes too: an editor's text box can become focusable by an attribute or
|
|
1032
|
+
// style change after it is inserted (see the `focus()` checks above).
|
|
1033
|
+
observer.observe(editor, { childList: true, subtree: true, attributes: true });
|
|
969
1034
|
return () => observer.disconnect();
|
|
970
1035
|
}, [isExpanded, optionName, inlineEditable]);
|
|
971
1036
|
|
|
@@ -1150,7 +1215,7 @@ export const CompactRow = memo(
|
|
|
1150
1215
|
fixed
|
|
1151
1216
|
flat
|
|
1152
1217
|
compact
|
|
1153
|
-
effect={{ uppercase: true, spaced: 1 }}
|
|
1218
|
+
effect={calm ? undefined : { uppercase: true, spaced: 1 }}
|
|
1154
1219
|
/>
|
|
1155
1220
|
: null;
|
|
1156
1221
|
const isPassiveCloseAction = fixedAllowedValueOption;
|
|
@@ -1174,7 +1239,7 @@ export const CompactRow = memo(
|
|
|
1174
1239
|
minimal
|
|
1175
1240
|
fixed
|
|
1176
1241
|
icon='CloseLine'
|
|
1177
|
-
intent='warning'
|
|
1242
|
+
intent={calm ? undefined : 'warning'}
|
|
1178
1243
|
// "Cancel edit", not "Cancel": a bare Cancel collides with the one
|
|
1179
1244
|
// in Reqore's confirmation modal, and this one is specifically about
|
|
1180
1245
|
// abandoning the edit rather than dismissing a dialog.
|
|
@@ -1195,7 +1260,9 @@ export const CompactRow = memo(
|
|
|
1195
1260
|
<ReqoreButton
|
|
1196
1261
|
className='options-readfirst-done'
|
|
1197
1262
|
size='small'
|
|
1198
|
-
|
|
1263
|
+
// Calm: a neutral button. Closing a field is not a healthy figure and
|
|
1264
|
+
// not the page's one primary action, so it takes neither colour.
|
|
1265
|
+
intent={!isPassiveCloseAction && !calm ? 'success' : undefined}
|
|
1199
1266
|
flat={isPassiveCloseAction}
|
|
1200
1267
|
minimal={isPassiveCloseAction}
|
|
1201
1268
|
fixed
|
|
@@ -1236,6 +1303,10 @@ export const CompactRow = memo(
|
|
|
1236
1303
|
allOptions: availableOptions,
|
|
1237
1304
|
getType: getTypeForOption,
|
|
1238
1305
|
isRendererOnly,
|
|
1306
|
+
calm,
|
|
1307
|
+
readOnly,
|
|
1308
|
+
// Until the person has been to the field, its requirement is stated plainly.
|
|
1309
|
+
requirementPending: !visited,
|
|
1239
1310
|
}).map((m) => ({ intent: m.intent as string, content: String(m.label) }))
|
|
1240
1311
|
: [];
|
|
1241
1312
|
// TWO display channels, matching the Focus prototype:
|
|
@@ -1317,7 +1388,14 @@ export const CompactRow = memo(
|
|
|
1317
1388
|
size='small'
|
|
1318
1389
|
opaque={false}
|
|
1319
1390
|
flat
|
|
1320
|
-
|
|
1391
|
+
// Calm: a note that only informs takes no colour — blue is kept for "a
|
|
1392
|
+
// filter is on", green for a healthy figure. A warning or a failure
|
|
1393
|
+
// keeps its intent: those are what a person has to act on.
|
|
1394
|
+
intent={
|
|
1395
|
+
(calm && (!m.intent || m.intent === 'info' || m.intent === 'success') ?
|
|
1396
|
+
undefined
|
|
1397
|
+
: m.intent) as never
|
|
1398
|
+
}
|
|
1321
1399
|
title={m.title}
|
|
1322
1400
|
style={{ marginBottom: 8 }}
|
|
1323
1401
|
>
|
|
@@ -1493,7 +1571,7 @@ export const CompactRow = memo(
|
|
|
1493
1571
|
tabIndex={0}
|
|
1494
1572
|
aria-label={`Collapse ${label}`}
|
|
1495
1573
|
title={schema?.short_desc || undefined}
|
|
1496
|
-
$color={
|
|
1574
|
+
$color={cLabel}
|
|
1497
1575
|
$pointer
|
|
1498
1576
|
onClick={collapse}
|
|
1499
1577
|
onKeyDown={(event) => {
|
|
@@ -1504,7 +1582,7 @@ export const CompactRow = memo(
|
|
|
1504
1582
|
}}
|
|
1505
1583
|
>
|
|
1506
1584
|
{label}
|
|
1507
|
-
{required ?
|
|
1585
|
+
{required && !calm ?
|
|
1508
1586
|
<ReqoreIcon icon='Asterisk' color='danger' size='10px' />
|
|
1509
1587
|
: null}
|
|
1510
1588
|
{helpIcon}
|
|
@@ -1526,6 +1604,7 @@ export const CompactRow = memo(
|
|
|
1526
1604
|
</StyledLabelBlock>
|
|
1527
1605
|
<div
|
|
1528
1606
|
ref={editorRef}
|
|
1607
|
+
className='options-readfirst-row-editor'
|
|
1529
1608
|
style={{ minWidth: 0 }}
|
|
1530
1609
|
onKeyDown={(event) => {
|
|
1531
1610
|
if (event.key === 'Escape') {
|
|
@@ -1664,6 +1743,7 @@ export const CompactRow = memo(
|
|
|
1664
1743
|
return (
|
|
1665
1744
|
<StyledEditCard
|
|
1666
1745
|
key={optionName}
|
|
1746
|
+
ref={rowRef}
|
|
1667
1747
|
data-field={optionName}
|
|
1668
1748
|
className={
|
|
1669
1749
|
COMPACT_SINGLE_VALUE_TYPES.has(editType) ?
|
|
@@ -1672,6 +1752,7 @@ export const CompactRow = memo(
|
|
|
1672
1752
|
}
|
|
1673
1753
|
$bg={cHover}
|
|
1674
1754
|
$border={schemaIntentColor ? `${schemaIntentColor}66` : `${cInfo}66`}
|
|
1755
|
+
$calm={calm}
|
|
1675
1756
|
>
|
|
1676
1757
|
<div
|
|
1677
1758
|
style={{
|
|
@@ -1682,7 +1763,7 @@ export const CompactRow = memo(
|
|
|
1682
1763
|
}}
|
|
1683
1764
|
>
|
|
1684
1765
|
<StyledCardHeading>
|
|
1685
|
-
<StyledCardLabel $color={
|
|
1766
|
+
<StyledCardLabel $color={cLabel}>
|
|
1686
1767
|
{(
|
|
1687
1768
|
(schema as { icon?: string } | undefined)?.icon ||
|
|
1688
1769
|
(schema as { image?: string } | undefined)?.image
|
|
@@ -1695,7 +1776,7 @@ export const CompactRow = memo(
|
|
|
1695
1776
|
: null}
|
|
1696
1777
|
<span>
|
|
1697
1778
|
{label}
|
|
1698
|
-
{required ?
|
|
1779
|
+
{required && !calm ?
|
|
1699
1780
|
<ReqoreIcon icon='Asterisk' color='danger' size='10px' />
|
|
1700
1781
|
: null}
|
|
1701
1782
|
{/* The `?` belongs here too. The read row and the inline
|
|
@@ -1802,6 +1883,11 @@ export const CompactRow = memo(
|
|
|
1802
1883
|
keystroke a silent commit. Same handler, same `cancelEdit()`, so
|
|
1803
1884
|
the two shapes cannot diverge. */}
|
|
1804
1885
|
<div
|
|
1886
|
+
// The card's editor, as the inline row's is: an opened card takes the
|
|
1887
|
+
// caret too (the tap-to-edit rule above), so opening Description or
|
|
1888
|
+
// Source Code by a click or by a blocked submit puts the cursor in it.
|
|
1889
|
+
ref={editorRef}
|
|
1890
|
+
className='options-readfirst-row-editor'
|
|
1805
1891
|
style={{ display: 'contents' }}
|
|
1806
1892
|
onKeyDown={(event) => {
|
|
1807
1893
|
if (event.key === 'Escape') {
|
|
@@ -1861,7 +1947,7 @@ export const CompactRow = memo(
|
|
|
1861
1947
|
const valueReasons: TInfoMsg[] = [
|
|
1862
1948
|
...inlineMessages,
|
|
1863
1949
|
...(empty && coveredByLabel ?
|
|
1864
|
-
[{ content: `Covered by “${coveredByLabel}”`, intent: 'success' }]
|
|
1950
|
+
[{ content: `Covered by “${coveredByLabel}”`, intent: calm ? undefined : 'success' }]
|
|
1865
1951
|
: []),
|
|
1866
1952
|
];
|
|
1867
1953
|
// A hash row reveals its sub-fields as read-only sub-rows under a "view
|
|
@@ -2207,10 +2293,28 @@ export const CompactRow = memo(
|
|
|
2207
2293
|
covered: !!coveredByLabel || groupResolved,
|
|
2208
2294
|
invalid: worstIntent === 'danger',
|
|
2209
2295
|
warned: worstIntent === 'warning',
|
|
2296
|
+
visited,
|
|
2210
2297
|
});
|
|
2211
2298
|
// No dot at all in a read-only form: the dot reports progress on the
|
|
2212
2299
|
// form, and a read view has no progress to report.
|
|
2213
|
-
|
|
2300
|
+
//
|
|
2301
|
+
// Calm: no dot on a healthy row, and none on an empty required one either —
|
|
2302
|
+
// its value column already says "Required · add a value" in amber, and one
|
|
2303
|
+
// thing is said once. Only a failing value keeps the red dot beside the
|
|
2304
|
+
// reason it gives.
|
|
2305
|
+
const dotStatus =
|
|
2306
|
+
hidden || fieldDisabled || readOnly || (calm && rowStatus !== 'invalid') ?
|
|
2307
|
+
undefined
|
|
2308
|
+
: rowStatus;
|
|
2309
|
+
// Calm: an empty required value is said IN the value column, in amber,
|
|
2310
|
+
// where the value would be — instead of a dash plus a red reason beside it.
|
|
2311
|
+
// Not on a locked field (its lock and reason speak for it) or one that
|
|
2312
|
+
// shows the default it will fall back to.
|
|
2313
|
+
const calmRequiredWord =
|
|
2314
|
+
calm && empty && !hidden && !!schema?.required && !fieldDisabled && !formattedDefault ?
|
|
2315
|
+
readOnly ? CALM_REQUIRED_READ_LABEL
|
|
2316
|
+
: CALM_REQUIRED_LABEL
|
|
2317
|
+
: undefined;
|
|
2214
2318
|
const dotColor =
|
|
2215
2319
|
dotStatus === 'invalid' ? cDanger
|
|
2216
2320
|
: dotStatus === 'todo' ? cWarning
|
|
@@ -2252,7 +2356,7 @@ export const CompactRow = memo(
|
|
|
2252
2356
|
>
|
|
2253
2357
|
{clusterNode}
|
|
2254
2358
|
<StyledLabelBlock className='options-readfirst-label-block'>
|
|
2255
|
-
<StyledRowLabel title={schema?.short_desc || undefined} $color={
|
|
2359
|
+
<StyledRowLabel title={schema?.short_desc || undefined} $color={cLabel}>
|
|
2256
2360
|
{rowChromeIcon}
|
|
2257
2361
|
{/* label + asterisk + help flow as ONE inline run, so the asterisk
|
|
2258
2362
|
stays right after the last word even when the name wraps. */}
|
|
@@ -2322,8 +2426,15 @@ export const CompactRow = memo(
|
|
|
2322
2426
|
// actual data — crucial when stacked under a (muted) description on
|
|
2323
2427
|
// mobile, where a dim value blends into the prose. The bold name still
|
|
2324
2428
|
// outranks it; the empty dash stays faint.
|
|
2325
|
-
$color={
|
|
2326
|
-
|
|
2429
|
+
$color={
|
|
2430
|
+
calmRequiredWord ?
|
|
2431
|
+
rowStatus === 'pending' ?
|
|
2432
|
+
`${cMuted}a6`
|
|
2433
|
+
: cWarning
|
|
2434
|
+
: empty || hidden ? `${cMuted}66`
|
|
2435
|
+
: cKey
|
|
2436
|
+
}
|
|
2437
|
+
$empty={(empty || hidden) && !calmRequiredWord}
|
|
2327
2438
|
>
|
|
2328
2439
|
{/* A markdown value with a host renderer draws in full in the inset
|
|
2329
2440
|
below, so the row prints no value line at all: the stripped-prose
|
|
@@ -2358,13 +2469,16 @@ export const CompactRow = memo(
|
|
|
2358
2469
|
null
|
|
2359
2470
|
: <span className='options-readfirst-valuetext'>
|
|
2360
2471
|
{hidden || empty ?
|
|
2361
|
-
formattedDefault || '—'
|
|
2472
|
+
calmRequiredWord || formattedDefault || '—'
|
|
2362
2473
|
: renderReadFirstValue(optionField, schema, formatted, readOnly)}
|
|
2363
2474
|
</span>}
|
|
2364
2475
|
{readOnlyChoiceDesc ?
|
|
2365
2476
|
<span className='options-readfirst-choice-desc'>{readOnlyChoiceDesc}</span>
|
|
2366
2477
|
: null}
|
|
2367
|
-
{
|
|
2478
|
+
{(calmRequiredWord ?
|
|
2479
|
+
valueReasons.filter((m) => m.content !== calmRequiredWord)
|
|
2480
|
+
: valueReasons
|
|
2481
|
+
).map((m, i) => (
|
|
2368
2482
|
<span
|
|
2369
2483
|
key={`${m.content}-${i}`}
|
|
2370
2484
|
className='options-readfirst-reason'
|
|
@@ -2606,7 +2720,12 @@ export const CompactRow = memo(
|
|
|
2606
2720
|
}}
|
|
2607
2721
|
/>
|
|
2608
2722
|
: dotColor ?
|
|
2609
|
-
<StyledStatusDot
|
|
2723
|
+
<StyledStatusDot
|
|
2724
|
+
className='options-readfirst-status-dot'
|
|
2725
|
+
$color={dotColor}
|
|
2726
|
+
$ring={dotStatus !== 'set'}
|
|
2727
|
+
aria-hidden
|
|
2728
|
+
/>
|
|
2610
2729
|
: null}
|
|
2611
2730
|
</StyledActionSlot>
|
|
2612
2731
|
</StyledRowActions>
|