@qoretechnologies/reqraft 0.10.79-pr.145.g447ecec → 0.10.79-pr.145.g9aeaa47
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/DefaultsNote.d.ts +7 -4
- package/dist/components/form/engine/DefaultsNote.d.ts.map +1 -1
- package/dist/components/form/engine/DefaultsNote.js +7 -4
- package/dist/components/form/engine/DefaultsNote.js.map +1 -1
- package/dist/components/form/engine/FormEngine.js +2 -2
- package/package.json +1 -1
|
@@ -7,13 +7,16 @@ export interface IDefaultField {
|
|
|
7
7
|
label: string;
|
|
8
8
|
/** Its value, as its row would say it ("Qore"). */
|
|
9
9
|
value: string;
|
|
10
|
-
/** Whether the field is a choice
|
|
10
|
+
/** Whether the field is a choice: its value is the choice's own name ("Qore"), and the field is still named. */
|
|
11
11
|
choice: boolean;
|
|
12
12
|
/** What the schema says of its default (`default_value_desc`): "Falls back to 30 seconds when unset." */
|
|
13
13
|
description?: string;
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
|
|
15
|
+
/**
|
|
16
|
+
* What is said of a field that holds its default: "Uses Qore for Language", or "Uses 30 for Timeout — Falls back to
|
|
17
|
+
* …". The field is always named, a choice's too: "Uses Session (fresh each time)" never said which field it was about.
|
|
18
|
+
*/
|
|
19
|
+
export declare const defaultNoteText: ({ label, value, description }: IDefaultField) => string;
|
|
17
20
|
export interface IDefaultsNoteProps {
|
|
18
21
|
fields: IDefaultField[];
|
|
19
22
|
/** The colour of the quiet words. */
|
|
@@ -22,7 +25,7 @@ export interface IDefaultsNoteProps {
|
|
|
22
25
|
onChange?: (name: string) => void;
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
|
-
* The defaults a form uses, under its boxes: one quiet line each, "Uses Qore · Change", nothing when there are none.
|
|
28
|
+
* The defaults a form uses, under its boxes: one quiet line each, "Uses Qore for Language · Change", nothing when there are none.
|
|
26
29
|
*
|
|
27
30
|
* A field the person never touched whose value is its default is not something they set, so it is not listed as
|
|
28
31
|
* "Set": on a new workflow the only thing "Set" was "Language: Qore", which a person who does not write code never
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultsNote.d.ts","sourceRoot":"","sources":["../../../../src/components/form/engine/DefaultsNote.tsx"],"names":[],"mappings":";AAKA,4DAA4D;AAC5D,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,
|
|
1
|
+
{"version":3,"file":"DefaultsNote.d.ts","sourceRoot":"","sources":["../../../../src/components/form/engine/DefaultsNote.tsx"],"names":[],"mappings":";AAKA,4DAA4D;AAC5D,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,gHAAgH;IAChH,MAAM,EAAE,OAAO,CAAC;IAChB,yGAAyG;IACzG,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,kCAAmC,aAAa,KAAG,MAI9E,CAAC;AAEF,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,oEAAsC,kBAAkB,6CAqC/E,CAAC"}
|
|
@@ -6,15 +6,18 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
6
6
|
var reqore_1 = require("@qoretechnologies/reqore");
|
|
7
7
|
var react_1 = require("react");
|
|
8
8
|
var reqraftLabels_1 = require("../../../helpers/reqraftLabels");
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* What is said of a field that holds its default: "Uses Qore for Language", or "Uses 30 for Timeout — Falls back to
|
|
11
|
+
* …". The field is always named, a choice's too: "Uses Session (fresh each time)" never said which field it was about.
|
|
12
|
+
*/
|
|
10
13
|
var defaultNoteText = function (_a) {
|
|
11
|
-
var label = _a.label, value = _a.value,
|
|
12
|
-
var uses = (0, reqraftLabels_1.reqraftLabels)().formEngine.usesDefault(value,
|
|
14
|
+
var label = _a.label, value = _a.value, description = _a.description;
|
|
15
|
+
var uses = (0, reqraftLabels_1.reqraftLabels)().formEngine.usesDefault(value, label);
|
|
13
16
|
return description ? "".concat(uses, " \u2014 ").concat(description) : uses;
|
|
14
17
|
};
|
|
15
18
|
exports.defaultNoteText = defaultNoteText;
|
|
16
19
|
/**
|
|
17
|
-
* The defaults a form uses, under its boxes: one quiet line each, "Uses Qore · Change", nothing when there are none.
|
|
20
|
+
* The defaults a form uses, under its boxes: one quiet line each, "Uses Qore for Language · Change", nothing when there are none.
|
|
18
21
|
*
|
|
19
22
|
* A field the person never touched whose value is its default is not something they set, so it is not listed as
|
|
20
23
|
* "Set": on a new workflow the only thing "Set" was "Language: Qore", which a person who does not write code never
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultsNote.js","sourceRoot":"","sources":["../../../../src/components/form/engine/DefaultsNote.tsx"],"names":[],"mappings":";;;;AAAA,2CAA2C;AAC3C,mDAAwF;AACxF,+BAA6B;AAC7B,gEAA+D;AAgB/D
|
|
1
|
+
{"version":3,"file":"DefaultsNote.js","sourceRoot":"","sources":["../../../../src/components/form/engine/DefaultsNote.tsx"],"names":[],"mappings":";;;;AAAA,2CAA2C;AAC3C,mDAAwF;AACxF,+BAA6B;AAC7B,gEAA+D;AAgB/D;;;GAGG;AACI,IAAM,eAAe,GAAG,UAAC,EAA4C;QAA1C,KAAK,WAAA,EAAE,KAA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B,YAElC,KAAK,CAAC,aAAa,GACP;oBACjB,CAAC,CAAC,IAAI,KAtBD,KAAK,CAAC,IAAI,CAuBI,CACtB,EA1BsB,CA0BtB,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -811,7 +811,7 @@ var FormEngineImpl = function (_a) {
|
|
|
811
811
|
// fault only then (or after a submit attempt, `revealRequired`): a form nobody has
|
|
812
812
|
// touched is not already wrong.
|
|
813
813
|
var _7 = (0, react_2.useState)([]), visitedOptions = _7[0], setVisitedOptions = _7[1];
|
|
814
|
-
/* The fields the person chose to change from their default ("Uses Qore · Change"): ordinary rows from then on
|
|
814
|
+
/* The fields the person chose to change from their default ("Uses Qore for Language · Change"): ordinary rows from then on
|
|
815
815
|
(`DefaultsNote`). */
|
|
816
816
|
var _8 = (0, react_2.useState)([]), changedDefaults = _8[0], setChangedDefaults = _8[1];
|
|
817
817
|
var lastExpandedOptions = (0, react_2.useRef)([]);
|
|
@@ -3207,7 +3207,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3207
3207
|
return fresh === 'optional' ? undefined : 'set';
|
|
3208
3208
|
};
|
|
3209
3209
|
/* A field the person never touched whose value is its default is not something they set: it is said under the
|
|
3210
|
-
form ("Uses Qore · Change", `DefaultsNote`), not listed as "Set". Not a field
|
|
3210
|
+
form ("Uses Qore for Language · Change", `DefaultsNote`), not listed as "Set". Not a field
|
|
3211
3211
|
they have been to, opened, or chose to change; not one nobody can change, one whose value is an expression,
|
|
3212
3212
|
or a structured value (a hash or a list, which its row summarises). */
|
|
3213
3213
|
var defaultEntries = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qoretechnologies/reqraft",
|
|
3
|
-
"version": "0.10.79-pr.145.
|
|
3
|
+
"version": "0.10.79-pr.145.g9aeaa47",
|
|
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",
|