@jsb188/app 1.0.4 → 1.1.2

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 (104) hide show
  1. package/package.json +57 -37
  2. package/src/constants/agent.ts +74 -0
  3. package/src/constants/app.ts +389 -0
  4. package/src/constants/emoji.ts +9153 -0
  5. package/src/constants/other.ts +13 -0
  6. package/src/constants/user.ts +27 -0
  7. package/src/constants/wsActions.ts +49 -0
  8. package/src/i18n/account.ts +139 -0
  9. package/src/i18n/agent.ts +397 -0
  10. package/src/i18n/agentToolBusiness.ts +196 -0
  11. package/src/i18n/agentToolGrid.ts +137 -0
  12. package/src/i18n/agentToolWorkflow.ts +101 -0
  13. package/src/i18n/agent_note.ts +109 -0
  14. package/src/i18n/app.ts +124 -0
  15. package/src/i18n/auth.ts +128 -0
  16. package/src/i18n/billing.ts +7 -0
  17. package/src/i18n/c.ts +907 -0
  18. package/src/i18n/campaign.ts +919 -0
  19. package/src/i18n/country.ts +249 -0
  20. package/src/i18n/datetime.ts +66 -0
  21. package/src/i18n/editor.ts +58 -0
  22. package/src/i18n/error.ts +579 -0
  23. package/src/i18n/field_doc_editor.ts +21 -0
  24. package/src/i18n/field_doc_programs.ts +52 -0
  25. package/src/i18n/field_docs.ts +190 -0
  26. package/src/i18n/index.ts +64 -0
  27. package/src/i18n/log.ts +566 -0
  28. package/src/i18n/memory.ts +59 -0
  29. package/src/i18n/message.ts +13 -0
  30. package/src/i18n/note.ts +19 -0
  31. package/src/i18n/org.ts +306 -0
  32. package/src/i18n/schedule.ts +209 -0
  33. package/src/i18n/sheet.ts +339 -0
  34. package/src/i18n/sheet_formula.ts +165 -0
  35. package/src/i18n/workflow.ts +111 -0
  36. package/src/main.ts +89 -0
  37. package/src/platform.ts +166 -0
  38. package/src/types/ai.d.ts +63 -0
  39. package/src/types/app.d.ts +127 -0
  40. package/src/types/auth.d.ts +94 -0
  41. package/src/types/console.d.ts +3 -0
  42. package/src/types/node-polyglot.d.ts +23 -0
  43. package/src/types/other.d.ts +66 -0
  44. package/src/types.d.ts +29 -0
  45. package/src/utils/account.ts +97 -0
  46. package/src/utils/api.ts +358 -0
  47. package/src/utils/authSession.ts +24 -0
  48. package/src/utils/clientIP.ts +213 -0
  49. package/src/utils/color.ts +279 -0
  50. package/src/utils/cron.ts +310 -0
  51. package/src/utils/csv.ts +19 -0
  52. package/src/utils/datetime.ts +1394 -0
  53. package/src/utils/deferredSave.ts +89 -0
  54. package/src/utils/email.ts +39 -0
  55. package/src/utils/emoji.ts +174 -0
  56. package/src/utils/expression.helpers.ts +470 -0
  57. package/src/utils/expression.test.ts +793 -0
  58. package/src/utils/expression.ts +2261 -0
  59. package/src/utils/interval.ts +80 -0
  60. package/src/utils/language.ts +9 -0
  61. package/src/utils/logic.ts +299 -0
  62. package/src/utils/managedSession.ts +34 -0
  63. package/src/utils/managedSessionBff.test.ts +60 -0
  64. package/src/utils/managedSessionBff.ts +117 -0
  65. package/src/utils/number.ts +338 -0
  66. package/src/utils/object.ts +916 -0
  67. package/src/utils/promise.ts +98 -0
  68. package/src/utils/queryReset.ts +266 -0
  69. package/src/utils/recurringTask.ts +60 -0
  70. package/src/utils/schema.ts +293 -0
  71. package/src/utils/string.test.ts +278 -0
  72. package/src/utils/string.ts +709 -0
  73. package/src/utils/timeZone.ts +2048 -0
  74. package/src/utils/url_client.ts +206 -0
  75. package/tsconfig.json +12 -0
  76. package/constants/app.ts +0 -47
  77. package/constants/billing.ts +0 -146
  78. package/constants/emoji.ts +0 -8945
  79. package/constants/user.ts +0 -36
  80. package/constants/ws.ts +0 -47
  81. package/i18n/app.ts +0 -99
  82. package/i18n/auth.ts +0 -57
  83. package/i18n/billing.ts +0 -94
  84. package/i18n/datetime.ts +0 -22
  85. package/i18n/error.ts +0 -138
  86. package/i18n/form.ts +0 -73
  87. package/i18n/index.ts +0 -6
  88. package/i18n/user.ts +0 -98
  89. package/main.ts +0 -62
  90. package/types/app.d.ts +0 -46
  91. package/types/datetime.d.ts +0 -10
  92. package/types/form.d.ts +0 -56
  93. package/types/user.d.ts +0 -52
  94. package/types.d.ts +0 -23
  95. package/utils/api.ts +0 -99
  96. package/utils/billing.ts +0 -134
  97. package/utils/datetime.ts +0 -358
  98. package/utils/emoji.ts +0 -151
  99. package/utils/logic.ts +0 -115
  100. package/utils/number.ts +0 -115
  101. package/utils/object.ts +0 -367
  102. package/utils/string.ts +0 -211
  103. package/utils/url_client.ts +0 -138
  104. package/utils/user.ts +0 -273
@@ -0,0 +1,52 @@
1
+ export default {
2
+ en: {
3
+ // App Settings > Programs tab
4
+ programs: 'Programs',
5
+ login_change_required_msg: "This program isn't available in [em_text##%{orgName}].\n Change your login to access it.",
6
+ programs_msg:
7
+ 'Programs bundle the documents your team fills in, such as food safety logs or inspections. Program documents are maintained for you; add custom instructions to fit how your team works.',
8
+ enrolled_programs: 'Your programs',
9
+ enrolled_empty: "Your organization isn't enrolled in any programs yet.",
10
+ catalog: 'Program catalog',
11
+ catalog_empty: 'There are no programs available for your organization right now.',
12
+ enrolled: 'Enrolled',
13
+ forms_count: '%{smart_count} document||||%{smart_count} documents',
14
+ read_only_msg: "Only members who can manage your organization's settings can enroll in, remove or create programs.",
15
+
16
+ // Enroll, unenroll and restore
17
+ enroll: 'Enroll',
18
+ enroll_title: 'Enroll in %{name}?',
19
+ enroll_msg: "This program's documents and workflows will be added to your organization.",
20
+ enrolled_msg: 'Your organization is now enrolled in %{name}.',
21
+ unenroll: 'Unenroll',
22
+ unenroll_title: 'Unenroll from %{name}?',
23
+ unenroll_msg:
24
+ "This program's documents and submissions will be hidden right away, and every workflow on its documents, including ones your team created, will be turned off. You can restore them for 90 days. After that, the program's documents, submissions and workflows are permanently deleted, and workflows your team created stay off and are unlinked from those documents. AI notes on its documents are archived right away. Restoring the program brings them back; otherwise they are permanently deleted with it after 90 days.",
25
+ yes_unenroll: 'Yes, unenroll',
26
+ recently_removed: 'Recently removed',
27
+ recently_removed_msg: 'Restore a program to bring back its documents, submissions, workflows and AI notes.',
28
+ restorable_until: 'Restorable until %{date}',
29
+ restore: 'Restore',
30
+ restore_title: 'Restore %{name}?',
31
+ restore_msg:
32
+ 'Its documents, submissions and workflows come back, the workflows paused when it was removed resume if they are still on its documents, and the AI notes archived when it was removed come back and are refreshed.',
33
+ restored_msg: '%{name} has been restored.',
34
+
35
+ // Create and edit custom programs
36
+ create_program: 'Create program',
37
+ create_program_msg: 'Group your own documents, such as customer audits, into a program for your organization.',
38
+ edit_program: 'Edit program',
39
+ edit_program_msg: 'Change the name, description or category of %{name}.',
40
+ program_name: 'Program name',
41
+ program_name_ph: 'For example, Customer audits',
42
+ program_short_name: 'Short name',
43
+ program_short_name_ph: 'Optional, shown where space is limited',
44
+ program_description: 'Description',
45
+ program_description_ph: 'Optional, what this program is for',
46
+ program_category: 'Category',
47
+ program_category_ph: 'Select a category',
48
+ custom_program_msg: 'Ask AI in Co-Pilot to add documents to this program.',
49
+ program_created_msg: '%{name} was created. Ask AI in Co-Pilot to add documents to it.',
50
+ program_saved_msg: 'Program saved.',
51
+ },
52
+ };
@@ -0,0 +1,190 @@
1
+ export default {
2
+ en: {
3
+ field_docs: 'Field Docs',
4
+ last_submission_updated_at: 'Last updated',
5
+ answer_state: {
6
+ UNANSWERED: 'Unanswered',
7
+ PROPOSED: 'Awaiting confirmation',
8
+ ANSWERED: 'Answered',
9
+ NOT_APPLICABLE: 'Not applicable',
10
+ NEEDS_REVIEW: 'Needs review',
11
+ },
12
+ state_value: '%{state}: %{value}',
13
+ submissions_end:
14
+ 'There is %{smart_count} submission in this program.||||' + 'There are %{smart_count} submissions in this program.',
15
+ submissions_empty: "There aren't any submissions in this program.",
16
+
17
+ summary_not_done: 'AI is still generating the field doc summary.',
18
+ summary_automatic: 'AI generates a summary for each submission. It always appears first.',
19
+ not_answered_msg: "This question hasn't been answered yet.",
20
+ answer_not_chosen: 'Answer (not chosen yet)',
21
+ table_rows: '%{smart_count} row||||%{smart_count} rows',
22
+ table_empty: 'No answer rows have been added yet.',
23
+
24
+ // Form editor
25
+ editor: 'Editor',
26
+ edit_form: 'Edit form',
27
+ form_editor: 'Form editor',
28
+ submissions: 'Submissions',
29
+ save_draft: 'Save draft',
30
+ publish_form: 'Publish form',
31
+ publish_changes: 'Publish changes',
32
+ published: 'Published',
33
+ discard_draft: 'Discard draft',
34
+ draft_status: {
35
+ PUBLISHED: 'Published',
36
+ DRAFT: 'Unpublished changes',
37
+ STALE: 'Draft is out of date',
38
+ },
39
+ element_kind_label: 'Element type',
40
+ element_kind: {
41
+ LINE_ITEM: 'Question',
42
+ TEXT: 'Written answer',
43
+ TITLE: 'Title',
44
+ SUMMARY: 'Summary',
45
+ },
46
+ answer_type_label: 'Answer type',
47
+ answer_type: {
48
+ TEXT: 'Text',
49
+ NUMBER: 'Number',
50
+ INTEGER: 'Whole number',
51
+ BOOLEAN: 'Yes or no',
52
+ DATE: 'Date',
53
+ TIME: 'Time',
54
+ CHOICE: 'Single choice',
55
+ MULTI_CHOICE: 'Multiple choice',
56
+ MEASUREMENT: 'Measurement',
57
+ TABLE: 'Table',
58
+ },
59
+ question_options: 'Question options',
60
+ use_military_time: 'Use 24-hour time',
61
+ military_time_hint: 'Display times in 24-hour format, for example 14:30.',
62
+ standard_time_hint: 'Display times with AM or PM, for example 2:30 PM.',
63
+ allow_other: 'Allow Other',
64
+ allow_other_hint: 'People can choose a listed option or provide their own answer, up to 255 characters.',
65
+ strict_choice_hint: 'People must choose one of the listed options.',
66
+ boolean_label: {
67
+ trueLabel: 'Label for Yes',
68
+ falseLabel: 'Label for No',
69
+ },
70
+ boolean_labels_hint: 'Leave a label blank to use Yes or No. The two labels must be different.',
71
+ section_options: 'Section options',
72
+ question_label_ph: 'Question',
73
+ title_label_ph: 'Title text',
74
+ summary_label_ph: 'Summary label',
75
+ section_label_ph: 'Section title (required)',
76
+ section_title_required: 'Add a section title to save this draft.',
77
+ description_ph: 'Description (optional)',
78
+ form_description_ph: 'Description',
79
+ hint_ph: 'AI hint (optional): how to read answers to this question',
80
+ section_hint_ph: 'AI hint (optional): guidance for every question in this section',
81
+ agent_hint_ph: 'AI hint (optional): how to read this whole form',
82
+ unit_ph: 'Unit code, for example CELSIUS',
83
+ table_columns: 'Table columns: %{columns}',
84
+ question_key_hint: 'Submission answers use this key, so it never changes.',
85
+ add_question: 'Add question',
86
+ add_question_below: 'Add question below',
87
+ duplicate_question: 'Duplicate question',
88
+ delete_question: 'Delete question',
89
+ add_section: 'Add section',
90
+ add_section_below: 'Add section below',
91
+ delete_section: 'Delete section',
92
+ move_section_up: 'Move section up',
93
+ move_section_down: 'Move section down',
94
+ section_number: 'Section %{number}',
95
+ form_picker: 'Form',
96
+ no_forms: 'This program has no forms for your organization yet.',
97
+ no_manage_access: 'Only people who can manage organization settings can edit this form.',
98
+ invalid_form: 'Finish the highlighted fields before publishing.',
99
+ publish_title: 'Publish this form?',
100
+ publish_message: 'New submissions will use this version. Existing submissions keep the version they started with.',
101
+ publish_confirm: 'Publish',
102
+ discard_title: 'Discard your draft?',
103
+ discard_message: 'Your unpublished changes will be deleted, and the editor will show the published form.',
104
+ discard_confirm: 'Discard draft',
105
+ conflict_title: 'Newer changes were saved',
106
+ conflict_message:
107
+ 'This draft was changed somewhere else after you opened it. Reload to continue from the latest draft. Changes you have not saved yet will be lost.',
108
+ conflict_reload: 'Reload draft',
109
+ stale_title: 'A newer version was published',
110
+ stale_message:
111
+ 'This form was published again after your draft started. Discard your draft to continue from the latest published version.',
112
+ unpublished_title: 'Unpublished changes',
113
+ unpublished_message: 'Your draft is saved but not published. New submissions keep using the published form until you publish it.',
114
+ publish_and_leave: 'Publish and leave',
115
+ leave_without_publishing: 'Leave without publishing',
116
+
117
+ // Program explorer
118
+ program_overview: 'Program overview',
119
+ program_contents: 'Program contents',
120
+ program_contents_hint: 'Explore groups and forms. Select an item to see its details.',
121
+ program_search: 'Find a group or form…',
122
+ program_search_label: 'Search program contents',
123
+ program_clear_search: 'Clear search',
124
+ program_expand_all: 'Expand all',
125
+ program_collapse_all: 'Collapse all',
126
+ program_ungrouped: 'Ungrouped',
127
+ program_group: 'Group',
128
+ program_form: 'Form',
129
+ program_forms_count: '%{smart_count} form||||%{smart_count} forms',
130
+ program_groups_count: '%{smart_count} group||||%{smart_count} groups',
131
+ program_drafts_count: '%{smart_count} unpublished form||||%{smart_count} unpublished forms',
132
+ program_results_count: '%{smart_count} matching form||||%{smart_count} matching forms',
133
+ program_draft: 'Draft',
134
+ program_retired: 'Retired',
135
+ program_empty_group: 'No forms in this group yet.',
136
+ program_empty_title: 'Your program starts here',
137
+ program_empty_description: 'Forms added to this program will appear here, ready to explore.',
138
+ program_no_results: 'No matching groups or forms',
139
+ program_no_results_hint: 'Try another name or clear your search to see everything.',
140
+ program_all_contents: 'Inside this program',
141
+ program_view_submissions: 'View submissions',
142
+ program_form_structure: 'Form structure',
143
+ program_draft_preview: 'Showing the saved draft. Published submissions may use a different version.',
144
+ program_preview_loading: 'Loading form structure…',
145
+ program_preview_error: 'The form structure could not be loaded.',
146
+ program_preview_empty: 'This form has no sections yet.',
147
+ program_retired_hint: 'This form is retired. Its previous submissions are still available.',
148
+ program_form_code: 'Form code',
149
+ program_version: 'Published version',
150
+ program_version_number: 'Version %{number}',
151
+ program_refresh_error: 'Program details could not be refreshed. Showing the last available version.',
152
+ program_section_items: '%{smart_count} item||||%{smart_count} items',
153
+ program_frequency: {
154
+ DAILY: 'Daily',
155
+ WEEKLY: 'Weekly',
156
+ MONTHLY: 'Monthly',
157
+ QUARTERLY: 'Quarterly',
158
+ ANNUALLY: 'Annually',
159
+ PER_INSTANCE: 'Per job',
160
+ },
161
+
162
+ // Programs
163
+ catalog_program: 'Catalog program',
164
+ custom_program: 'Custom program',
165
+ program_doc: 'Program document',
166
+ retired_form_: '%{title} (retired)',
167
+ open_program: 'Open program',
168
+ category: {
169
+ FOOD_SAFETY: 'Food safety',
170
+ QUALITY_ASSURANCE: 'Quality assurance',
171
+ WORKER_SAFETY: 'Worker safety',
172
+ SUSTAINABILITY: 'Sustainability',
173
+ ENVIRONMENTAL: 'Environmental',
174
+ REGULATORY_INSPECTION: 'Regulatory inspection',
175
+ LOGISTICS: 'Logistics',
176
+ OTHER: 'Other',
177
+ },
178
+
179
+ // Enums
180
+ status: {
181
+ ALIVE: 'Alive',
182
+ SICK: 'Sick',
183
+ SOLD: 'Sold',
184
+ DECEASED: 'Deceased',
185
+ PASS: 'Pass',
186
+ WARNING: 'Warning',
187
+ FAIL: 'Fail',
188
+ },
189
+ },
190
+ };
@@ -0,0 +1,64 @@
1
+ /// <reference path="../types/node-polyglot.d.ts" />
2
+
3
+ import Polyglot from 'node-polyglot';
4
+
5
+ import account from './account.ts';
6
+ import agent from './agent.ts';
7
+ import agent_note from './agent_note.ts';
8
+ import agentToolBusiness from './agentToolBusiness.ts';
9
+ import agentToolGrid from './agentToolGrid.ts';
10
+ import agentToolWorkflow from './agentToolWorkflow.ts';
11
+ import app from './app.ts';
12
+ import auth from './auth.ts';
13
+ import billing from './billing.ts';
14
+ import c from './c.ts';
15
+ import campaign from './campaign.ts';
16
+ import country from './country.ts';
17
+ import datetime from './datetime.ts';
18
+ import editor from './editor.ts';
19
+ import error from './error.ts';
20
+ import field_doc_editor from './field_doc_editor.ts';
21
+ import field_doc_programs from './field_doc_programs.ts';
22
+ import field_docs from './field_docs.ts';
23
+ import log from './log.ts';
24
+ import memory from './memory.ts';
25
+ import message from './message.ts';
26
+ import note from './note.ts';
27
+ import org from './org.ts';
28
+ import sheet from './sheet.ts';
29
+ import sheet_formula from './sheet_formula.ts';
30
+ import schedule from './schedule.ts';
31
+ import workflow from './workflow.ts';
32
+
33
+ export const i18nTranslations = {
34
+ account,
35
+ agent,
36
+ agent_note,
37
+ agentToolBusiness,
38
+ agentToolGrid,
39
+ agentToolWorkflow,
40
+ app,
41
+ auth,
42
+ billing,
43
+ c, // c = commons, this key contains all the generic common i18n texts
44
+ country,
45
+ datetime,
46
+ editor,
47
+ error,
48
+ campaign,
49
+ field_doc_editor,
50
+ field_doc_programs,
51
+ field_docs,
52
+ log,
53
+ message,
54
+ memory,
55
+ note,
56
+ org,
57
+ sheet,
58
+ sheet_formula,
59
+ schedule,
60
+ workflow,
61
+ } as Record<string, any>;
62
+
63
+ const i18n = new Polyglot();
64
+ export default i18n;