@things-factory/help 10.1.282 → 10.1.290

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.
Files changed (52) hide show
  1. package/dist-client/bootstrap.js +9 -0
  2. package/dist-client/guide/deep-find.d.ts +4 -0
  3. package/dist-client/guide/deep-find.js +29 -0
  4. package/dist-client/guide/guide-anchors.d.ts +33 -0
  5. package/dist-client/guide/guide-anchors.js +29 -0
  6. package/dist-client/guide/guide-api.d.ts +24 -0
  7. package/dist-client/guide/guide-api.js +23 -0
  8. package/dist-client/guide/guide-progress.d.ts +37 -0
  9. package/dist-client/guide/guide-progress.js +51 -0
  10. package/dist-client/guide/guide-recorder.d.ts +9 -0
  11. package/dist-client/guide/guide-recorder.js +94 -0
  12. package/dist-client/guide/guide-runner.d.ts +18 -0
  13. package/dist-client/guide/guide-runner.js +191 -0
  14. package/dist-client/guide/guide-words.d.ts +8 -0
  15. package/dist-client/guide/guide-words.js +21 -0
  16. package/dist-client/guide/ox-guide-overlay.d.ts +30 -0
  17. package/dist-client/guide/ox-guide-overlay.js +273 -0
  18. package/dist-client/guide/ox-guide-recorder-bar.d.ts +10 -0
  19. package/dist-client/guide/ox-guide-recorder-bar.js +92 -0
  20. package/dist-client/index.d.ts +4 -0
  21. package/dist-client/index.js +4 -0
  22. package/dist-client/pages/guide-editor.d.ts +36 -0
  23. package/dist-client/pages/guide-editor.js +339 -0
  24. package/dist-client/pages/guide-list.d.ts +45 -0
  25. package/dist-client/pages/guide-list.js +74 -0
  26. package/dist-client/route.js +6 -0
  27. package/dist-server/index.d.ts +2 -0
  28. package/dist-server/index.js +8 -1
  29. package/dist-server/role-tasks.d.ts +2 -0
  30. package/dist-server/role-tasks.js +11 -0
  31. package/dist-server/service/guide/guide-conditions.d.ts +21 -0
  32. package/dist-server/service/guide/guide-conditions.js +27 -0
  33. package/dist-server/service/guide/guide-resolver.d.ts +12 -0
  34. package/dist-server/service/guide/guide-resolver.js +142 -0
  35. package/dist-server/service/guide/guide-rules.d.ts +12 -0
  36. package/dist-server/service/guide/guide-rules.js +30 -0
  37. package/dist-server/service/guide/guide-types.d.ts +14 -0
  38. package/dist-server/service/guide/guide-types.js +43 -0
  39. package/dist-server/service/guide/guide.d.ts +24 -0
  40. package/dist-server/service/guide/guide.js +90 -0
  41. package/dist-server/service/guide/index.d.ts +4 -0
  42. package/dist-server/service/guide/index.js +8 -0
  43. package/dist-server/service/index.d.ts +7 -0
  44. package/dist-server/service/index.js +15 -0
  45. package/package.json +15 -3
  46. package/things-factory.config.js +3 -1
  47. package/translations/en.json +74 -2
  48. package/translations/es.json +73 -1
  49. package/translations/ja.json +74 -2
  50. package/translations/ko.json +74 -2
  51. package/translations/ms.json +73 -1
  52. package/translations/zh.json +73 -1
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GuideResolver = void 0;
4
+ const tslib_1 = require("tslib");
5
+ /*
6
+ * The doors of screen guides (ADR-0212 decisions 3, 7). Reading one is open to anyone signed in to the domain - the
7
+ * people an announcement leads through it read its steps. Writing is `guide:mutation`, the module's task `guide.writing`.
8
+ */
9
+ const type_graphql_1 = require("type-graphql");
10
+ const auth_base_1 = require("@things-factory/auth-base");
11
+ const shell_1 = require("@things-factory/shell");
12
+ const guide_1 = require("./guide");
13
+ const guide_conditions_1 = require("./guide-conditions");
14
+ const guide_rules_1 = require("./guide-rules");
15
+ const guide_types_1 = require("./guide-types");
16
+ const WRITE = '@privilege(category: "guide", privilege: "mutation", domainOwnerGranted: true)';
17
+ function refuse(context, code, fallback) {
18
+ const message = context.t ? String(context.t(`guide.refusal.${code}`, { defaultValue: fallback })) : fallback;
19
+ const error = new Error(message);
20
+ error.extensions = { code: `guide.${code}` };
21
+ throw error;
22
+ }
23
+ async function guideOrRefuse(id, context, tx) {
24
+ const { domain } = context.state;
25
+ const one = await (0, shell_1.getRepository)(guide_1.Guide, tx).findOne({ where: { id, domain: { id: domain.id } } });
26
+ if (!one)
27
+ refuse(context, 'unknown-guide', 'there is no such guide.');
28
+ return one;
29
+ }
30
+ function fieldsOf(input, context) {
31
+ const refusal = (0, guide_rules_1.guideRefusal)(input, id => !!(0, guide_conditions_1.guideCondition)(id));
32
+ if (refusal)
33
+ refuse(context, refusal, `the guide cannot be kept (${refusal}).`);
34
+ return { name: input.name.trim(), opening: input.opening.trim(), steps: (0, guide_rules_1.storedSteps)(input.steps), condition: input.condition || null };
35
+ }
36
+ let GuideResolver = class GuideResolver {
37
+ async guide(id, context) {
38
+ const { domain } = context.state;
39
+ return await (0, shell_1.getRepository)(guide_1.Guide).findOne({ where: { id, domain: { id: domain.id } } });
40
+ }
41
+ async guides(context) {
42
+ const { domain } = context.state;
43
+ return await (0, shell_1.getRepository)(guide_1.Guide).find({ where: { domain: { id: domain.id } }, order: { name: 'ASC' } });
44
+ }
45
+ async guideConditions(context) {
46
+ return (0, guide_conditions_1.guideConditions)()
47
+ .map(one => ({ id: one.id, label: context.t ? String(context.t(one.labelKey, { defaultValue: one.id })) : one.id }))
48
+ .sort((a, b) => a.label.localeCompare(b.label));
49
+ }
50
+ async guideMet(id, context) {
51
+ const { domain, user } = context.state;
52
+ const one = await guideOrRefuse(id, context);
53
+ return await (0, guide_conditions_1.conditionMet)(one.condition, { domain, userId: user.id });
54
+ }
55
+ async saveGuide(input, id, context) {
56
+ const { domain, user, tx } = context.state;
57
+ const fields = fieldsOf(input, context);
58
+ const repository = (0, shell_1.getRepository)(guide_1.Guide, tx);
59
+ const same = await repository.findOne({ where: { domain: { id: domain.id }, name: fields.name } });
60
+ if (same && same.id !== id)
61
+ refuse(context, 'name-taken', 'another guide has that name.');
62
+ if (!id)
63
+ return await repository.save({ ...fields, domain, creator: user, updater: user });
64
+ await guideOrRefuse(id, context, tx);
65
+ await repository.update(id, { ...fields, updater: user });
66
+ return (await repository.findOneBy({ id }));
67
+ }
68
+ async deleteGuide(id, context) {
69
+ const { tx } = context.state;
70
+ await guideOrRefuse(id, context, tx);
71
+ await (0, shell_1.getRepository)(guide_1.Guide, tx).softDelete(id);
72
+ return true;
73
+ }
74
+ async updater(one) {
75
+ return one.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: one.updaterId }) : null;
76
+ }
77
+ };
78
+ exports.GuideResolver = GuideResolver;
79
+ tslib_1.__decorate([
80
+ (0, type_graphql_1.Query)(returns => guide_1.Guide, { nullable: true, description: 'One guide of the domain - its steps, for the person led through it.' }),
81
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
82
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
83
+ tslib_1.__metadata("design:type", Function),
84
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
85
+ tslib_1.__metadata("design:returntype", Promise)
86
+ ], GuideResolver.prototype, "guide", null);
87
+ tslib_1.__decorate([
88
+ (0, type_graphql_1.Directive)(WRITE),
89
+ (0, type_graphql_1.Query)(returns => [guide_1.Guide], { description: 'Every guide of the domain, by name - for its writers.' }),
90
+ tslib_1.__param(0, (0, type_graphql_1.Ctx)()),
91
+ tslib_1.__metadata("design:type", Function),
92
+ tslib_1.__metadata("design:paramtypes", [Object]),
93
+ tslib_1.__metadata("design:returntype", Promise)
94
+ ], GuideResolver.prototype, "guides", null);
95
+ tslib_1.__decorate([
96
+ (0, type_graphql_1.Directive)(WRITE),
97
+ (0, type_graphql_1.Query)(returns => [guide_types_1.GuideConditionChoice], { description: 'The completion checks the modules declared, in the reader\'s words.' }),
98
+ tslib_1.__param(0, (0, type_graphql_1.Ctx)()),
99
+ tslib_1.__metadata("design:type", Function),
100
+ tslib_1.__metadata("design:paramtypes", [Object]),
101
+ tslib_1.__metadata("design:returntype", Promise)
102
+ ], GuideResolver.prototype, "guideConditions", null);
103
+ tslib_1.__decorate([
104
+ (0, type_graphql_1.Query)(returns => Boolean, { description: 'Whether the person has done what the guide leads to - its check, or true when it has none. Records nothing.' }),
105
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
106
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
107
+ tslib_1.__metadata("design:type", Function),
108
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
109
+ tslib_1.__metadata("design:returntype", Promise)
110
+ ], GuideResolver.prototype, "guideMet", null);
111
+ tslib_1.__decorate([
112
+ (0, type_graphql_1.Directive)(WRITE),
113
+ (0, type_graphql_1.Directive)('@transaction'),
114
+ (0, type_graphql_1.Mutation)(returns => guide_1.Guide, { description: 'Keeps a guide - a new one without an id, the one named otherwise.' }),
115
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('input', type => guide_types_1.GuideInput)),
116
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('id', { nullable: true })),
117
+ tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
118
+ tslib_1.__metadata("design:type", Function),
119
+ tslib_1.__metadata("design:paramtypes", [guide_types_1.GuideInput, String, Object]),
120
+ tslib_1.__metadata("design:returntype", Promise)
121
+ ], GuideResolver.prototype, "saveGuide", null);
122
+ tslib_1.__decorate([
123
+ (0, type_graphql_1.Directive)(WRITE),
124
+ (0, type_graphql_1.Directive)('@transaction'),
125
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'Deletes a guide. Announcements that carried it keep their record and lead through it no longer.' }),
126
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
127
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
128
+ tslib_1.__metadata("design:type", Function),
129
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
130
+ tslib_1.__metadata("design:returntype", Promise)
131
+ ], GuideResolver.prototype, "deleteGuide", null);
132
+ tslib_1.__decorate([
133
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User, { nullable: true }),
134
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
135
+ tslib_1.__metadata("design:type", Function),
136
+ tslib_1.__metadata("design:paramtypes", [guide_1.Guide]),
137
+ tslib_1.__metadata("design:returntype", Promise)
138
+ ], GuideResolver.prototype, "updater", null);
139
+ exports.GuideResolver = GuideResolver = tslib_1.__decorate([
140
+ (0, type_graphql_1.Resolver)(guide_1.Guide)
141
+ ], GuideResolver);
142
+ //# sourceMappingURL=guide-resolver.js.map
@@ -0,0 +1,12 @@
1
+ import type { GuideStep } from './guide';
2
+ export interface GuideInputFacts {
3
+ name?: string | null;
4
+ opening?: string | null;
5
+ steps?: readonly Partial<GuideStep>[] | null;
6
+ condition?: string | null;
7
+ }
8
+ export declare const GUIDE_STEP_LIMIT = 30;
9
+ /** Why the guide cannot be kept, as a refusal code - undefined when it can. */
10
+ export declare function guideRefusal(input: GuideInputFacts, knownCondition: (id: string) => boolean): string | undefined;
11
+ /** The steps as stored - trimmed, an empty anchor dropped. */
12
+ export declare function storedSteps(steps: readonly Partial<GuideStep>[]): GuideStep[];
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GUIDE_STEP_LIMIT = void 0;
4
+ exports.guideRefusal = guideRefusal;
5
+ exports.storedSteps = storedSteps;
6
+ exports.GUIDE_STEP_LIMIT = 30;
7
+ /** Why the guide cannot be kept, as a refusal code - undefined when it can. */
8
+ function guideRefusal(input, knownCondition) {
9
+ if (!input.name?.trim())
10
+ return 'no-name';
11
+ if (!input.opening?.trim())
12
+ return 'no-opening';
13
+ const steps = input.steps ?? [];
14
+ if (!steps.length)
15
+ return 'no-steps';
16
+ if (steps.length > exports.GUIDE_STEP_LIMIT)
17
+ return 'too-many-steps';
18
+ if (steps.some(step => !step.page?.trim()))
19
+ return 'step-without-page';
20
+ if (steps.some(step => !step.text?.trim()))
21
+ return 'step-without-text';
22
+ if (input.condition && !knownCondition(input.condition))
23
+ return 'unknown-condition';
24
+ return undefined;
25
+ }
26
+ /** The steps as stored - trimmed, an empty anchor dropped. */
27
+ function storedSteps(steps) {
28
+ return steps.map(step => ({ page: step.page.trim(), ...(step.anchor?.trim() ? { anchor: step.anchor.trim() } : {}), text: step.text.trim() }));
29
+ }
30
+ //# sourceMappingURL=guide-rules.js.map
@@ -0,0 +1,14 @@
1
+ export declare class GuideInput {
2
+ name: string;
3
+ opening: string;
4
+ steps: {
5
+ page: string;
6
+ anchor?: string | null;
7
+ text: string;
8
+ }[];
9
+ condition?: string;
10
+ }
11
+ export declare class GuideConditionChoice {
12
+ id: string;
13
+ label: string;
14
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GuideConditionChoice = exports.GuideInput = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const graphql_scalars_1 = require("graphql-scalars");
7
+ let GuideInput = class GuideInput {
8
+ };
9
+ exports.GuideInput = GuideInput;
10
+ tslib_1.__decorate([
11
+ (0, type_graphql_1.Field)({ description: 'What the guide is called, for its writers.' }),
12
+ tslib_1.__metadata("design:type", String)
13
+ ], GuideInput.prototype, "name", void 0);
14
+ tslib_1.__decorate([
15
+ (0, type_graphql_1.Field)({ description: 'The sentence that invites the person to start.' }),
16
+ tslib_1.__metadata("design:type", String)
17
+ ], GuideInput.prototype, "opening", void 0);
18
+ tslib_1.__decorate([
19
+ (0, type_graphql_1.Field)(type => graphql_scalars_1.GraphQLJSON, { description: 'The steps in order - [{ page, anchor, text }].' }),
20
+ tslib_1.__metadata("design:type", Array)
21
+ ], GuideInput.prototype, "steps", void 0);
22
+ tslib_1.__decorate([
23
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The completion check a module declared; empty when the last step finishes it.' }),
24
+ tslib_1.__metadata("design:type", String)
25
+ ], GuideInput.prototype, "condition", void 0);
26
+ exports.GuideInput = GuideInput = tslib_1.__decorate([
27
+ (0, type_graphql_1.InputType)({ description: 'What a guide says and checks.' })
28
+ ], GuideInput);
29
+ let GuideConditionChoice = class GuideConditionChoice {
30
+ };
31
+ exports.GuideConditionChoice = GuideConditionChoice;
32
+ tslib_1.__decorate([
33
+ (0, type_graphql_1.Field)({ description: 'The check - `asset.keeps-computer`.' }),
34
+ tslib_1.__metadata("design:type", String)
35
+ ], GuideConditionChoice.prototype, "id", void 0);
36
+ tslib_1.__decorate([
37
+ (0, type_graphql_1.Field)({ description: 'What it checks, in the reader\'s words.' }),
38
+ tslib_1.__metadata("design:type", String)
39
+ ], GuideConditionChoice.prototype, "label", void 0);
40
+ exports.GuideConditionChoice = GuideConditionChoice = tslib_1.__decorate([
41
+ (0, type_graphql_1.ObjectType)({ description: 'A completion check a module declared.' })
42
+ ], GuideConditionChoice);
43
+ //# sourceMappingURL=guide-types.js.map
@@ -0,0 +1,24 @@
1
+ import { Domain } from '@things-factory/shell';
2
+ import { User } from '@things-factory/auth-base';
3
+ /** One step: the screen it happens on, the point of the screen a module declared (none for a step that only explains), and what it says. */
4
+ export interface GuideStep {
5
+ page: string;
6
+ anchor?: string | null;
7
+ text: string;
8
+ }
9
+ export declare class Guide {
10
+ readonly id: string;
11
+ domain?: Domain;
12
+ domainId?: string;
13
+ name: string;
14
+ opening: string;
15
+ steps: GuideStep[];
16
+ condition?: string;
17
+ creator?: User;
18
+ creatorId?: string;
19
+ updater?: User;
20
+ updaterId?: string;
21
+ createdAt?: Date;
22
+ updatedAt?: Date;
23
+ deletedAt?: Date;
24
+ }
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Guide = void 0;
4
+ const tslib_1 = require("tslib");
5
+ /*
6
+ * A screen guide (ADR-0212 decisions 4, 7): the steps a person is led through on the screens of the application, and the
7
+ * check that tells the work is done. An administrator records it by doing the work once; an announcement carries it to
8
+ * its people (ADR-0212 decision 6).
9
+ */
10
+ const typeorm_1 = require("typeorm");
11
+ const type_graphql_1 = require("type-graphql");
12
+ const graphql_scalars_1 = require("graphql-scalars");
13
+ const shell_1 = require("@things-factory/shell");
14
+ const auth_base_1 = require("@things-factory/auth-base");
15
+ let Guide = class Guide {
16
+ };
17
+ exports.Guide = Guide;
18
+ tslib_1.__decorate([
19
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
20
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Guide id.' }),
21
+ tslib_1.__metadata("design:type", String)
22
+ ], Guide.prototype, "id", void 0);
23
+ tslib_1.__decorate([
24
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
25
+ (0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true, description: 'The domain the guide is in.' }),
26
+ tslib_1.__metadata("design:type", shell_1.Domain)
27
+ ], Guide.prototype, "domain", void 0);
28
+ tslib_1.__decorate([
29
+ (0, typeorm_1.RelationId)((one) => one.domain),
30
+ tslib_1.__metadata("design:type", String)
31
+ ], Guide.prototype, "domainId", void 0);
32
+ tslib_1.__decorate([
33
+ (0, typeorm_1.Column)(),
34
+ (0, type_graphql_1.Field)({ description: 'What the guide is called, for its writers.' }),
35
+ tslib_1.__metadata("design:type", String)
36
+ ], Guide.prototype, "name", void 0);
37
+ tslib_1.__decorate([
38
+ (0, typeorm_1.Column)({ type: 'text' }),
39
+ (0, type_graphql_1.Field)({ description: 'The sentence that invites the person to start - 「오늘은 내가 사용하는 PC를 내 관리자산에 등록해 볼까요?」.' }),
40
+ tslib_1.__metadata("design:type", String)
41
+ ], Guide.prototype, "opening", void 0);
42
+ tslib_1.__decorate([
43
+ (0, typeorm_1.Column)('simple-json'),
44
+ (0, type_graphql_1.Field)(type => graphql_scalars_1.GraphQLJSON, { description: 'The steps in order - [{ page, anchor, text }]. A step with no anchor only explains.' }),
45
+ tslib_1.__metadata("design:type", Array)
46
+ ], Guide.prototype, "steps", void 0);
47
+ tslib_1.__decorate([
48
+ (0, typeorm_1.Column)({ nullable: true }),
49
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The completion check a module declared - `asset.keeps-computer`. Empty: done when the last step is done.' }),
50
+ tslib_1.__metadata("design:type", String)
51
+ ], Guide.prototype, "condition", void 0);
52
+ tslib_1.__decorate([
53
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
54
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who wrote it.' }),
55
+ tslib_1.__metadata("design:type", auth_base_1.User)
56
+ ], Guide.prototype, "creator", void 0);
57
+ tslib_1.__decorate([
58
+ (0, typeorm_1.RelationId)((one) => one.creator),
59
+ tslib_1.__metadata("design:type", String)
60
+ ], Guide.prototype, "creatorId", void 0);
61
+ tslib_1.__decorate([
62
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
63
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who changed it last.' }),
64
+ tslib_1.__metadata("design:type", auth_base_1.User)
65
+ ], Guide.prototype, "updater", void 0);
66
+ tslib_1.__decorate([
67
+ (0, typeorm_1.RelationId)((one) => one.updater),
68
+ tslib_1.__metadata("design:type", String)
69
+ ], Guide.prototype, "updaterId", void 0);
70
+ tslib_1.__decorate([
71
+ (0, typeorm_1.CreateDateColumn)(),
72
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Creation timestamp.' }),
73
+ tslib_1.__metadata("design:type", Date)
74
+ ], Guide.prototype, "createdAt", void 0);
75
+ tslib_1.__decorate([
76
+ (0, typeorm_1.UpdateDateColumn)(),
77
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Last update timestamp.' }),
78
+ tslib_1.__metadata("design:type", Date)
79
+ ], Guide.prototype, "updatedAt", void 0);
80
+ tslib_1.__decorate([
81
+ (0, typeorm_1.DeleteDateColumn)(),
82
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Soft delete timestamp.' }),
83
+ tslib_1.__metadata("design:type", Date)
84
+ ], Guide.prototype, "deletedAt", void 0);
85
+ exports.Guide = Guide = tslib_1.__decorate([
86
+ (0, typeorm_1.Entity)(),
87
+ (0, typeorm_1.Index)('ix_guide_0', (one) => [one.domain, one.name], { unique: true, where: '"deleted_at" IS NULL' }),
88
+ (0, type_graphql_1.ObjectType)({ description: 'A screen guide - the steps a person is led through, and the check that tells the work is done.' })
89
+ ], Guide);
90
+ //# sourceMappingURL=guide.js.map
@@ -0,0 +1,4 @@
1
+ import { Guide } from './guide';
2
+ import { GuideResolver } from './guide-resolver';
3
+ export declare const entities: (typeof Guide)[];
4
+ export declare const resolvers: (typeof GuideResolver)[];
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const guide_1 = require("./guide");
5
+ const guide_resolver_1 = require("./guide-resolver");
6
+ exports.entities = [guide_1.Guide];
7
+ exports.resolvers = [guide_resolver_1.GuideResolver];
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ export * from './guide/guide';
2
+ export * from './guide/guide-conditions';
3
+ export * from './guide/guide-rules';
4
+ export declare const entities: typeof import("./guide/guide").Guide[];
5
+ export declare const schema: {
6
+ resolverClasses: typeof import("./guide/guide-resolver").GuideResolver[];
7
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.schema = exports.entities = void 0;
4
+ const tslib_1 = require("tslib");
5
+ /* EXPORT ENTITY TYPES */
6
+ tslib_1.__exportStar(require("./guide/guide"), exports);
7
+ tslib_1.__exportStar(require("./guide/guide-conditions"), exports);
8
+ tslib_1.__exportStar(require("./guide/guide-rules"), exports);
9
+ /* IMPORT ENTITIES AND RESOLVERS */
10
+ const guide_1 = require("./guide");
11
+ exports.entities = [...guide_1.entities];
12
+ exports.schema = {
13
+ resolverClasses: [...guide_1.resolvers]
14
+ };
15
+ //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/help",
3
- "version": "10.1.282",
3
+ "version": "10.1.290",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "files": [
@@ -44,9 +44,21 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@material/web": "^2.0.0",
47
+ "@operato/data-grist": "^10.29.69",
48
+ "@operato/graphql": "^10.29.69",
47
49
  "@operato/help": "^10.0.0",
50
+ "@operato/i18n": "^10.0.0",
51
+ "@operato/input": "^10.29.79",
48
52
  "@operato/layout": "^10.0.0",
49
- "@things-factory/shell": "^10.1.282"
53
+ "@operato/popup": "^10.29.39",
54
+ "@operato/shell": "^10.29.69",
55
+ "@operato/styles": "^10.29.1",
56
+ "@operato/utils": "^10.0.0",
57
+ "@things-factory/auth-base": "^10.1.290",
58
+ "@things-factory/shell": "^10.1.290",
59
+ "graphql-scalars": "^1.22.0",
60
+ "graphql-tag": "^2.12.6",
61
+ "lit": "^3.1.2"
50
62
  },
51
- "gitHead": "6a232e670bdb52e1420b1d33cdeeb37ceb0f26b8"
63
+ "gitHead": "b3d769457fc4976b73726bb1556b5036351f1b10"
52
64
  }
@@ -7,7 +7,9 @@ export default {
7
7
  {
8
8
  tagname: 'ox-help-home',
9
9
  page: 'help'
10
- }
10
+ },
11
+ { tagname: 'guide-list', page: 'guide-list' },
12
+ { tagname: 'guide-editor', page: 'guide-editor' }
11
13
  ],
12
14
  bootstrap
13
15
  }
@@ -1,3 +1,75 @@
1
1
  {
2
- "text.help": "help"
3
- }
2
+ "text.help": "help",
3
+ "guide.title.list": "Screen guides",
4
+ "guide.title.new": "New screen guide",
5
+ "guide.title.edit": "Edit screen guide",
6
+ "guide.field.name": "Guide name",
7
+ "guide.field.opening": "Opening sentence",
8
+ "guide.field.condition": "Completion check",
9
+ "guide.field.step-count": "Steps",
10
+ "guide.field.updated-at": "Updated",
11
+ "guide.field.page": "Screen",
12
+ "guide.field.anchor": "Point",
13
+ "guide.field.step-text": "Step text",
14
+ "guide.button.new": "New guide",
15
+ "guide.button.record": "Start recording",
16
+ "guide.button.add-explanation": "Add explanation step",
17
+ "guide.button.preview": "Preview",
18
+ "guide.button.save": "Save",
19
+ "guide.button.delete": "Delete",
20
+ "guide.button.cancel": "Cancel",
21
+ "guide.button.move-up": "Move up",
22
+ "guide.button.move-down": "Move down",
23
+ "guide.button.remove-step": "Remove step",
24
+ "guide.button.next": "Next",
25
+ "guide.button.finish": "Finish",
26
+ "guide.button.stop": "End guide",
27
+ "guide.button.close": "Close",
28
+ "guide.button.check-again": "Check again",
29
+ "guide.button.end-recording": "End recording",
30
+ "guide.button.cancel-recording": "Cancel recording",
31
+ "guide.text.section-guide": "Guide",
32
+ "guide.text.section-steps": "Steps",
33
+ "guide.text.name-hint": "Tells guides apart for their writers. Not shown to the people led through it.",
34
+ "guide.text.opening-placeholder": "e.g. Shall we register the PC you use in My assets today?",
35
+ "guide.text.opening-hint": "Shown to the people in the announcement popup, with the Start button.",
36
+ "guide.text.no-condition": "None - done when the last step is done",
37
+ "guide.text.condition-hint": "With a completion check the server confirms the work from the data. People who already did the work are not shown the guide.",
38
+ "guide.text.steps-empty": "No steps yet. Press Start recording and do the work once to record them.",
39
+ "guide.text.step-placeholder": "Enter the sentence shown at this step.",
40
+ "guide.text.explanation-step": "Explanation step - the person moves on with Next.",
41
+ "guide.text.broken-step": "This step cannot be used. Its point was removed from the screen or changed.",
42
+ "guide.text.broken-steps": "{n} step(s) cannot be used. Remove or record them again before the guide can be published in an announcement.",
43
+ "guide.text.explanation-needs-step": "An explanation step needs a recorded step before it.",
44
+ "guide.text.preview-needs-step": "A preview needs at least one step.",
45
+ "guide.text.recording-started": "Recording started. Do the work to guide, then press End recording at the bottom of the screen.",
46
+ "guide.text.recording": "Recording · {n} step(s)",
47
+ "guide.text.recording-hint": "Only buttons and fields with a declared point are recorded.",
48
+ "guide.text.recorded-last": "Last recorded: {label}",
49
+ "guide.text.recorded-added": "{n} recorded step(s) added. Check the text of each step and save.",
50
+ "guide.text.default-click": "Press the 「{label}」 button.",
51
+ "guide.text.default-input": "Enter a value in 「{label}」.",
52
+ "guide.text.default-select": "Choose an item in 「{label}」.",
53
+ "guide.text.saved": "The screen guide was saved.",
54
+ "guide.text.delete-confirm": "Delete this screen guide? Announcements already published will no longer start it.",
55
+ "guide.text.list-empty": "No screen guides yet.",
56
+ "guide.text.list-empty-description": "Press New guide and record the work to make one.",
57
+ "guide.text.progress": "Step {index} / {total}",
58
+ "guide.text.point-not-shown": "The place of this step is not on the screen. Look for it on the screen and carry on.",
59
+ "guide.text.checking": "Checking whether the work is done.",
60
+ "guide.text.unfinished": "The work is not confirmed yet. Make sure it was saved, then press Check again.",
61
+ "guide.text.done": "Guide finished. The work is confirmed.",
62
+ "guide.text.failed": "The request could not be completed.",
63
+ "guide.refusal.no-name": "A guide name is required.",
64
+ "guide.refusal.no-opening": "An opening sentence is required.",
65
+ "guide.refusal.no-steps": "A guide needs at least one step.",
66
+ "guide.refusal.too-many-steps": "A guide can have up to 30 steps.",
67
+ "guide.refusal.step-without-page": "A step has no screen.",
68
+ "guide.refusal.step-without-text": "A step has no text. Enter text for every step.",
69
+ "guide.refusal.unknown-condition": "The completion check chosen cannot be found.",
70
+ "guide.refusal.name-taken": "Another screen guide has that name.",
71
+ "guide.refusal.unknown-guide": "The screen guide cannot be found.",
72
+ "task.guide.writing.name": "Screen guides - writing",
73
+ "task.guide.writing.description": "Records, writes, changes and deletes screen guides.",
74
+ "guide.text.finished": "Guide finished."
75
+ }
@@ -1,3 +1,75 @@
1
1
  {
2
- "text.help": "ayuda"
2
+ "text.help": "ayuda",
3
+ "guide.title.list": "Guías de pantalla",
4
+ "guide.title.new": "Nueva guía de pantalla",
5
+ "guide.title.edit": "Editar guía de pantalla",
6
+ "guide.field.name": "Nombre de la guía",
7
+ "guide.field.opening": "Frase de inicio",
8
+ "guide.field.condition": "Condición de finalización",
9
+ "guide.field.step-count": "Pasos",
10
+ "guide.field.updated-at": "Actualizado",
11
+ "guide.field.page": "Pantalla",
12
+ "guide.field.anchor": "Punto",
13
+ "guide.field.step-text": "Texto del paso",
14
+ "guide.button.new": "Nueva guía",
15
+ "guide.button.record": "Iniciar grabación",
16
+ "guide.button.add-explanation": "Agregar paso explicativo",
17
+ "guide.button.preview": "Vista previa",
18
+ "guide.button.save": "Guardar",
19
+ "guide.button.delete": "Eliminar",
20
+ "guide.button.cancel": "Cancelar",
21
+ "guide.button.move-up": "Subir",
22
+ "guide.button.move-down": "Bajar",
23
+ "guide.button.remove-step": "Eliminar paso",
24
+ "guide.button.next": "Siguiente",
25
+ "guide.button.finish": "Finalizar",
26
+ "guide.button.stop": "Terminar guía",
27
+ "guide.button.close": "Cerrar",
28
+ "guide.button.check-again": "Volver a comprobar",
29
+ "guide.button.end-recording": "Terminar grabación",
30
+ "guide.button.cancel-recording": "Cancelar grabación",
31
+ "guide.text.section-guide": "Guía",
32
+ "guide.text.section-steps": "Pasos",
33
+ "guide.text.name-hint": "Nombre con el que los autores distinguen las guías. No se muestra a los destinatarios.",
34
+ "guide.text.opening-placeholder": "p. ej.: ¿Registramos hoy el PC que usa en Mis activos?",
35
+ "guide.text.opening-hint": "Se muestra a los destinatarios en la ventana del anuncio, con el botón Iniciar.",
36
+ "guide.text.no-condition": "Ninguna - finaliza al completar el último paso",
37
+ "guide.text.condition-hint": "Con una condición de finalización, el servidor confirma el trabajo con los datos reales. A quienes ya lo hicieron no se les muestra la guía.",
38
+ "guide.text.steps-empty": "No hay pasos. Pulse Iniciar grabación y realice el trabajo una vez para registrarlos.",
39
+ "guide.text.step-placeholder": "Introduzca el texto que se mostrará en este paso.",
40
+ "guide.text.explanation-step": "Paso explicativo: el destinatario continúa con Siguiente.",
41
+ "guide.text.broken-step": "Este paso no se puede usar. Su punto se eliminó o cambió en la pantalla.",
42
+ "guide.text.broken-steps": "{n} paso(s) no se pueden usar. Elimínelos o vuelva a grabarlos para poder publicar la guía en un anuncio.",
43
+ "guide.text.explanation-needs-step": "Un paso explicativo necesita un paso grabado antes.",
44
+ "guide.text.preview-needs-step": "La vista previa necesita al menos un paso.",
45
+ "guide.text.recording-started": "Grabación iniciada. Realice el trabajo y pulse Terminar grabación en la parte inferior de la pantalla.",
46
+ "guide.text.recording": "Grabando · {n} paso(s)",
47
+ "guide.text.recording-hint": "Solo se graban los botones y campos con un punto declarado.",
48
+ "guide.text.recorded-last": "Último registro: {label}",
49
+ "guide.text.recorded-added": "Se agregaron {n} paso(s) grabados. Revise el texto de cada paso y guarde.",
50
+ "guide.text.default-click": "Pulse el botón 「{label}」.",
51
+ "guide.text.default-input": "Introduzca un valor en 「{label}」.",
52
+ "guide.text.default-select": "Elija un elemento en 「{label}」.",
53
+ "guide.text.saved": "Se guardó la guía de pantalla.",
54
+ "guide.text.delete-confirm": "¿Eliminar esta guía de pantalla? Los anuncios ya publicados dejarán de iniciarla.",
55
+ "guide.text.list-empty": "No hay guías de pantalla.",
56
+ "guide.text.list-empty-description": "Pulse Nueva guía y grabe el trabajo para crear una.",
57
+ "guide.text.progress": "Paso {index} / {total}",
58
+ "guide.text.point-not-shown": "El lugar de este paso no está en la pantalla. Búsquelo en la pantalla y continúe.",
59
+ "guide.text.checking": "Comprobando si el trabajo está hecho.",
60
+ "guide.text.unfinished": "Aún no se confirma el trabajo. Compruebe que lo guardó y pulse Volver a comprobar.",
61
+ "guide.text.done": "Guía terminada. El trabajo está confirmado.",
62
+ "guide.text.failed": "No se pudo completar la solicitud.",
63
+ "guide.refusal.no-name": "Se requiere el nombre de la guía.",
64
+ "guide.refusal.no-opening": "Se requiere la frase de inicio.",
65
+ "guide.refusal.no-steps": "La guía necesita al menos un paso.",
66
+ "guide.refusal.too-many-steps": "Una guía puede tener hasta 30 pasos.",
67
+ "guide.refusal.step-without-page": "Hay un paso sin pantalla.",
68
+ "guide.refusal.step-without-text": "Hay un paso sin texto. Introduzca texto en todos los pasos.",
69
+ "guide.refusal.unknown-condition": "No se encuentra la condición de finalización elegida.",
70
+ "guide.refusal.name-taken": "Ya existe una guía de pantalla con ese nombre.",
71
+ "guide.refusal.unknown-guide": "No se encuentra la guía de pantalla.",
72
+ "task.guide.writing.name": "Guías de pantalla - redacción",
73
+ "task.guide.writing.description": "Graba, redacta, modifica y elimina guías de pantalla.",
74
+ "guide.text.finished": "Guía terminada."
3
75
  }