@things-factory/worklist 10.1.147 → 10.1.150
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-client/components/decision-slots.d.ts +5 -18
- package/dist-client/components/decision-slots.js +6 -54
- package/dist-client/components/decision-slots.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/index.d.ts +3 -0
- package/dist-server/index.js +7 -0
- package/dist-server/index.js.map +1 -1
- package/dist-server/service/activity/freeze-decision-sentences-for.d.ts +11 -0
- package/dist-server/service/activity/freeze-decision-sentences-for.js +18 -0
- package/dist-server/service/activity/freeze-decision-sentences-for.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +28 -11
- package/shared/decision-sentences.d.ts +30 -0
- package/shared/decision-sentences.js +146 -0
package/dist-server/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import './routes.js';
|
|
2
2
|
export * from './controllers/index.js';
|
|
3
3
|
export * from './service/index.js';
|
|
4
|
+
export { freezeDecisionSentences, DecisionSentenceMissing } from '../shared/decision-sentences.js';
|
|
5
|
+
export { freezeDecisionSentencesFor } from './service/activity/freeze-decision-sentences-for.js';
|
|
6
|
+
export type { DecisionSentenceKey, Translate as DecisionSentenceTranslate } from '../shared/decision-sentences.js';
|
package/dist-server/index.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.freezeDecisionSentencesFor = exports.DecisionSentenceMissing = exports.freezeDecisionSentences = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
require("./routes.js");
|
|
5
6
|
tslib_1.__exportStar(require("./controllers/index.js"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./service/index.js"), exports);
|
|
8
|
+
/* Freezing an approval's value sentences — the same reading of the input the decision screen uses. */
|
|
9
|
+
var decision_sentences_js_1 = require("../shared/decision-sentences.js");
|
|
10
|
+
Object.defineProperty(exports, "freezeDecisionSentences", { enumerable: true, get: function () { return decision_sentences_js_1.freezeDecisionSentences; } });
|
|
11
|
+
Object.defineProperty(exports, "DecisionSentenceMissing", { enumerable: true, get: function () { return decision_sentences_js_1.DecisionSentenceMissing; } });
|
|
12
|
+
var freeze_decision_sentences_for_js_1 = require("./service/activity/freeze-decision-sentences-for.js");
|
|
13
|
+
Object.defineProperty(exports, "freezeDecisionSentencesFor", { enumerable: true, get: function () { return freeze_decision_sentences_for_js_1.freezeDecisionSentencesFor; } });
|
|
7
14
|
//# sourceMappingURL=index.js.map
|
package/dist-server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;;AAAA,uBAAoB;AAEpB,iEAAsC;AACtC,6DAAkC;AAElC,sGAAsG;AACtG,yEAAkG;AAAzF,gIAAA,uBAAuB,OAAA;AAAE,gIAAA,uBAAuB,OAAA;AACzD,wGAAgG;AAAvF,8IAAA,0BAA0B,OAAA","sourcesContent":["import './routes.js'\n\nexport * from './controllers/index.js'\nexport * from './service/index.js'\n\n/* Freezing an approval's value sentences — the same reading of the input the decision screen uses. */\nexport { freezeDecisionSentences, DecisionSentenceMissing } from '../shared/decision-sentences.js'\nexport { freezeDecisionSentencesFor } from './service/activity/freeze-decision-sentences-for.js'\nexport type { DecisionSentenceKey, Translate as DecisionSentenceTranslate } from '../shared/decision-sentences.js'\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DecisionSentenceKey } from '../../../shared/decision-sentences.js';
|
|
2
|
+
/**
|
|
3
|
+
* An approval input with its value sentences frozen **in one language**, read from the server's translations.
|
|
4
|
+
*
|
|
5
|
+
* ── Why here (2026-10-11, chief architect ruling) ──────────────────────────
|
|
6
|
+
* plant and then warehouse each wrote the same line — `freezeDecisionSentences(keys, input, translatorFor('ko'),
|
|
7
|
+
* 'ko')` — in a helper of their own. Two copies of one rule is what this module exists to stop, so the line lives
|
|
8
|
+
* here and the applications call it. The translator does not fall back to another language: a sentence missing in
|
|
9
|
+
* `locale` refuses the raise (`DecisionSentenceMissing`) instead of filing another language's sentence.
|
|
10
|
+
*/
|
|
11
|
+
export declare function freezeDecisionSentencesFor<T>(decisionKeys: DecisionSentenceKey[] | null | undefined, input: T, locale: string): T;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.freezeDecisionSentencesFor = freezeDecisionSentencesFor;
|
|
4
|
+
const translator_1 = require("@things-factory/i18n-base/translator");
|
|
5
|
+
const decision_sentences_js_1 = require("../../../shared/decision-sentences.js");
|
|
6
|
+
/**
|
|
7
|
+
* An approval input with its value sentences frozen **in one language**, read from the server's translations.
|
|
8
|
+
*
|
|
9
|
+
* ── Why here (2026-10-11, chief architect ruling) ──────────────────────────
|
|
10
|
+
* plant and then warehouse each wrote the same line — `freezeDecisionSentences(keys, input, translatorFor('ko'),
|
|
11
|
+
* 'ko')` — in a helper of their own. Two copies of one rule is what this module exists to stop, so the line lives
|
|
12
|
+
* here and the applications call it. The translator does not fall back to another language: a sentence missing in
|
|
13
|
+
* `locale` refuses the raise (`DecisionSentenceMissing`) instead of filing another language's sentence.
|
|
14
|
+
*/
|
|
15
|
+
function freezeDecisionSentencesFor(decisionKeys, input, locale) {
|
|
16
|
+
return (0, decision_sentences_js_1.freezeDecisionSentences)(decisionKeys, input, (0, translator_1.translatorFor)(locale), locale);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=freeze-decision-sentences-for.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freeze-decision-sentences-for.js","sourceRoot":"","sources":["../../../server/service/activity/freeze-decision-sentences-for.ts"],"names":[],"mappings":";;AAcA,gEAMC;AApBD,qEAAoE;AAEpE,iFAA+E;AAG/E;;;;;;;;GAQG;AACH,SAAgB,0BAA0B,CACxC,YAAsD,EACtD,KAAQ,EACR,MAAc;IAEd,OAAO,IAAA,+CAAuB,EAAC,YAAY,EAAE,KAAK,EAAE,IAAA,0BAAa,EAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAA;AACpF,CAAC","sourcesContent":["import { translatorFor } from '@things-factory/i18n-base/translator'\n\nimport { freezeDecisionSentences } from '../../../shared/decision-sentences.js'\nimport type { DecisionSentenceKey } from '../../../shared/decision-sentences.js'\n\n/**\n * An approval input with its value sentences frozen **in one language**, read from the server's translations.\n *\n * ── Why here (2026-10-11, chief architect ruling) ──────────────────────────\n * plant and then warehouse each wrote the same line — `freezeDecisionSentences(keys, input, translatorFor('ko'),\n * 'ko')` — in a helper of their own. Two copies of one rule is what this module exists to stop, so the line lives\n * here and the applications call it. The translator does not fall back to another language: a sentence missing in\n * `locale` refuses the raise (`DecisionSentenceMissing`) instead of filing another language's sentence.\n */\nexport function freezeDecisionSentencesFor<T>(\n decisionKeys: DecisionSentenceKey[] | null | undefined,\n input: T,\n locale: string\n): T {\n return freezeDecisionSentences(decisionKeys, input, translatorFor(locale), locale)\n}\n"]}
|