@jsb188/app 1.1.11 → 1.1.13

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 (64) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +17 -6
  3. package/src/constants/agent.ts +44 -57
  4. package/src/constants/app.ts +43 -0
  5. package/src/constants/wsActions.ts +1 -15
  6. package/src/i18n/account.ts +1 -1
  7. package/src/i18n/agent.ts +321 -96
  8. package/src/i18n/agentToolBusiness.ts +340 -0
  9. package/src/i18n/agentToolGrid.ts +121 -0
  10. package/src/i18n/agentToolWorkflow.ts +101 -0
  11. package/src/i18n/agent_note.ts +110 -0
  12. package/src/i18n/app.ts +23 -17
  13. package/src/i18n/auth.ts +25 -30
  14. package/src/i18n/billing.ts +3 -85
  15. package/src/i18n/c.ts +953 -0
  16. package/src/i18n/campaign.ts +164 -211
  17. package/src/i18n/datetime.ts +6 -0
  18. package/src/i18n/editor.ts +56 -0
  19. package/src/i18n/email_outreach_editor.ts +526 -0
  20. package/src/i18n/error.ts +430 -202
  21. package/src/i18n/field_doc_editor.ts +21 -0
  22. package/src/i18n/field_doc_programs.ts +51 -0
  23. package/src/i18n/field_docs.ts +171 -8
  24. package/src/i18n/form.ts +7 -491
  25. package/src/i18n/index.ts +23 -3
  26. package/src/i18n/log.ts +234 -39
  27. package/src/i18n/memory.ts +18 -5
  28. package/src/i18n/message.ts +1 -0
  29. package/src/i18n/note.ts +5 -3
  30. package/src/i18n/org.ts +97 -45
  31. package/src/i18n/schedule.ts +133 -0
  32. package/src/i18n/sheet.ts +105 -161
  33. package/src/i18n/sheet_formula.ts +165 -0
  34. package/src/i18n/workflow.ts +112 -11
  35. package/src/main.ts +2 -2
  36. package/src/platform.ts +89 -49
  37. package/src/types/ai.d.ts +16 -1
  38. package/src/types/app.d.ts +29 -73
  39. package/src/types/auth.d.ts +1 -1
  40. package/src/types/other.d.ts +8 -1
  41. package/src/utils/api.ts +60 -10
  42. package/src/utils/clientIP.ts +213 -0
  43. package/src/utils/color.ts +95 -0
  44. package/src/utils/csv.ts +19 -0
  45. package/src/utils/datetime.ts +207 -31
  46. package/src/utils/deferredSave.ts +89 -0
  47. package/src/utils/email.ts +50 -0
  48. package/src/utils/expression.helpers.ts +470 -0
  49. package/src/utils/expression.ts +1633 -239
  50. package/src/utils/language.ts +9 -0
  51. package/src/utils/logic.ts +9 -162
  52. package/src/utils/number.ts +30 -11
  53. package/src/utils/object.ts +69 -127
  54. package/src/utils/promise.ts +78 -7
  55. package/src/utils/queryReset.ts +110 -61
  56. package/src/utils/string.ts +80 -143
  57. package/src/utils/url_client.ts +115 -15
  58. package/src/constants/billing.ts +0 -146
  59. package/src/i18n/agentDoc.ts +0 -110
  60. package/src/types/form.d.ts +0 -101
  61. package/src/utils/billing.ts +0 -141
  62. package/src/utils/managedSessionBff.test.ts +0 -60
  63. package/src/utils/string.test.ts +0 -293
  64. package/tsconfig.json +0 -12
@@ -0,0 +1,21 @@
1
+ export default {
2
+ en: {
3
+ // Custom instructions mode (program documents)
4
+ custom_instructions_title: 'Custom instructions',
5
+ custom_instructions_msg:
6
+ 'This document is maintained by its program. Add instructions for your organization to guide how AI answers it. They are added after the program instructions.',
7
+ document_instructions: 'Whole document',
8
+ section_instructions: 'This section',
9
+ question_instructions: 'This question',
10
+ instructions_ph: 'Instructions for your organization (optional)',
11
+ program_hint: 'Program instructions',
12
+ no_program_hint: 'No program instructions.',
13
+ composed_preview: 'What AI reads',
14
+ instructions_max: 'Use at most %{smart_count} character.||||Use at most %{smart_count} characters.',
15
+ save_instructions: 'Save instructions',
16
+ instructions_saved: 'Custom instructions saved.',
17
+ unsaved_instructions_title: 'Unsaved instructions',
18
+ unsaved_instructions_msg: "Your custom instructions haven't been saved. Leave without saving them?",
19
+ leave_without_saving: 'Leave without saving',
20
+ },
21
+ };
@@ -0,0 +1,51 @@
1
+ export default {
2
+ en: {
3
+ // App Settings > Programs tab
4
+ program: 'Program',
5
+ programs: 'Programs',
6
+ login_change_required_msg: "This program isn't available in [em_link##%{orgName}].\n Change your login to access it.",
7
+ programs_msg: 'Please contact us to enable different programs for your organization.',
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
+ program_created_msg: '%{name} was created.',
49
+ program_saved_msg: 'Program saved.',
50
+ },
51
+ };
@@ -1,18 +1,181 @@
1
1
  export default {
2
2
  en: {
3
3
  field_docs: 'Field Docs',
4
+ login_change_required_msg: "This document doesn't belong to [em_link##%{orgName}].\n Change your login to access this document.",
5
+ last_submission_updated_at: 'Last updated',
6
+ answer_state: {
7
+ UNANSWERED: 'Unanswered',
8
+ PROPOSED: 'Awaiting confirmation',
9
+ ANSWERED: 'Answered',
10
+ NOT_APPLICABLE: 'Not applicable',
11
+ NEEDS_REVIEW: 'Needs review',
12
+ },
13
+ state_value: '%{state}: %{value}',
14
+ submissions_end:
15
+ 'There is %{smart_count} submission in this program.||||' + 'There are %{smart_count} submissions in this program.',
16
+ submissions_empty: "There aren't any submissions in this program.",
4
17
 
5
18
  summary_not_done: 'AI is still generating the field doc summary.',
19
+ summary_automatic: 'AI generates a summary for each submission. It always appears first.',
6
20
  not_answered_msg: "This question hasn't been answered yet.",
21
+ answer_not_chosen: 'Answer (not chosen yet)',
22
+ table_rows: '%{smart_count} row||||%{smart_count} rows',
23
+ table_empty: 'No answer rows have been added yet.',
7
24
 
8
- agent_hint: 'AI hint',
9
- agent_hint_edit: 'Edit AI hint',
10
- agent_hint_msg: 'Add synonyms or phrasing for\n [hl]%{name}[/hl].',
11
- agent_hint_help:
12
- 'This guides the AI when matching what people say to this document. It is never shown to your team.',
13
- agent_hint_ph:
14
- 'e.g. Users may call this a water source test or well check.',
15
- agent_hint_fin_msg: 'The AI hint for [hl]%{name}[/hl] has been updated.',
25
+ // Form editor
26
+ editor: 'Editor',
27
+ edit_form: 'Edit form',
28
+ form_editor: 'Form editor',
29
+ submissions: 'Submissions',
30
+ save_draft: 'Save draft',
31
+ publish_form: 'Publish form',
32
+ publish_changes: 'Publish changes',
33
+ published: 'Published',
34
+ discard_draft: 'Discard draft',
35
+ draft_status: {
36
+ PUBLISHED: 'Published',
37
+ DRAFT: 'Unpublished changes',
38
+ STALE: 'Draft is out of date',
39
+ },
40
+ element_kind_label: 'Element type',
41
+ element_kind: {
42
+ LINE_ITEM: 'Question',
43
+ TEXT: 'Written answer',
44
+ TITLE: 'Title',
45
+ SUMMARY: 'Summary',
46
+ },
47
+ answer_type_label: 'Answer type',
48
+ answer_type: {
49
+ TEXT: 'Text',
50
+ NUMBER: 'Number',
51
+ INTEGER: 'Whole number',
52
+ BOOLEAN: 'Yes or no',
53
+ DATE: 'Date',
54
+ TIME: 'Time',
55
+ CHOICE: 'Single choice',
56
+ MULTI_CHOICE: 'Multiple choice',
57
+ MEASUREMENT: 'Measurement',
58
+ TABLE: 'Table',
59
+ },
60
+ question_options: 'Question options',
61
+ use_military_time: 'Use 24-hour time',
62
+ military_time_hint: 'Display times in 24-hour format, for example 14:30.',
63
+ standard_time_hint: 'Display times with AM or PM, for example 2:30 PM.',
64
+ allow_other: 'Allow Other',
65
+ allow_other_hint: 'People can choose a listed option or provide their own answer, up to 255 characters.',
66
+ strict_choice_hint: 'People must choose one of the listed options.',
67
+ boolean_label: {
68
+ trueLabel: 'Label for Yes',
69
+ falseLabel: 'Label for No',
70
+ },
71
+ boolean_labels_hint: 'Leave a label blank to use Yes or No. The two labels must be different.',
72
+ section_options: 'Section options',
73
+ question_label_ph: 'Question',
74
+ title_label_ph: 'Title text',
75
+ summary_label_ph: 'Summary label',
76
+ section_label_ph: 'Section title (required)',
77
+ section_title_required: 'Add a section title to save this draft.',
78
+ description_ph: 'Description (optional)',
79
+ form_description_ph: 'Description',
80
+ hint_ph: 'AI hint (optional): how to read answers to this question',
81
+ section_hint_ph: 'AI hint (optional): guidance for every question in this section',
82
+ agent_hint_ph: 'AI hint (optional): how to read this whole form',
83
+ unit_ph: 'Unit code, for example CELSIUS',
84
+ table_columns: 'Table columns: %{columns}',
85
+ question_key_hint: 'Submission answers use this key, so it never changes.',
86
+ add_question: 'Add question',
87
+ add_question_below: 'Add question below',
88
+ duplicate_question: 'Duplicate question',
89
+ delete_question: 'Delete question',
90
+ add_section: 'Add section',
91
+ add_section_below: 'Add section below',
92
+ delete_section: 'Delete section',
93
+ move_section_up: 'Move section up',
94
+ move_section_down: 'Move section down',
95
+ section_number: 'Section %{number}',
96
+ form_picker: 'Form',
97
+ no_forms: 'This program has no forms for your organization yet.',
98
+ no_manage_access: 'Only people who can manage organization settings can edit this form.',
99
+ invalid_form: 'Finish the highlighted fields before publishing.',
100
+ publish_title: 'Publish this form?',
101
+ publish_message: 'New submissions will use this version. Existing submissions keep the version they started with.',
102
+ publish_confirm: 'Publish',
103
+ discard_title: 'Discard your draft?',
104
+ discard_message: 'Your unpublished changes will be deleted, and the editor will show the published form.',
105
+ discard_confirm: 'Discard draft',
106
+ conflict_title: 'Newer changes were saved',
107
+ conflict_message:
108
+ '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.',
109
+ conflict_reload: 'Reload draft',
110
+ stale_title: 'A newer version was published',
111
+ stale_message:
112
+ 'This form was published again after your draft started. Discard your draft to continue from the latest published version.',
113
+ unpublished_title: 'Unpublished changes',
114
+ unpublished_message: 'Your draft is saved but not published. New submissions keep using the published form until you publish it.',
115
+ publish_and_leave: 'Publish and leave',
116
+ leave_without_publishing: 'Leave without publishing',
117
+
118
+ // Program explorer
119
+ program_overview: 'Program overview',
120
+ program_contents: 'Program contents',
121
+ program_contents_hint: 'Explore groups and forms. Select an item to see its details.',
122
+ program_search: 'Find a group or form…',
123
+ program_search_label: 'Search program contents',
124
+ program_clear_search: 'Clear search',
125
+ program_expand_all: 'Expand all',
126
+ program_collapse_all: 'Collapse all',
127
+ program_ungrouped: 'Ungrouped',
128
+ program_group: 'Group',
129
+ program_form: 'Form',
130
+ program_forms_count: '%{smart_count} form||||%{smart_count} forms',
131
+ program_groups_count: '%{smart_count} group||||%{smart_count} groups',
132
+ program_drafts_count: '%{smart_count} unpublished form||||%{smart_count} unpublished forms',
133
+ program_results_count: '%{smart_count} matching form||||%{smart_count} matching forms',
134
+ program_draft: 'Draft',
135
+ program_retired: 'Retired',
136
+ program_empty_group: 'No forms in this group yet.',
137
+ program_empty_title: 'Your program starts here',
138
+ program_empty_description: 'Forms added to this program will appear here, ready to explore.',
139
+ program_no_results: 'No matching groups or forms',
140
+ program_no_results_hint: 'Try another name or clear your search to see everything.',
141
+ program_all_contents: 'Inside this program',
142
+ program_view_submissions: 'View submissions',
143
+ program_form_structure: 'Form structure',
144
+ program_draft_preview: 'Showing the saved draft. Published submissions may use a different version.',
145
+ program_preview_loading: 'Loading form structure…',
146
+ program_preview_error: 'The form structure could not be loaded.',
147
+ program_preview_empty: 'This form has no sections yet.',
148
+ program_retired_hint: 'This form is retired. Its previous submissions are still available.',
149
+ program_form_code: 'Form code',
150
+ program_version: 'Published version',
151
+ program_version_number: 'Version %{number}',
152
+ program_refresh_error: 'Program details could not be refreshed. Showing the last available version.',
153
+ program_section_items: '%{smart_count} item||||%{smart_count} items',
154
+ program_frequency: {
155
+ DAILY: 'Daily',
156
+ WEEKLY: 'Weekly',
157
+ MONTHLY: 'Monthly',
158
+ QUARTERLY: 'Quarterly',
159
+ ANNUALLY: 'Annually',
160
+ PER_INSTANCE: 'Per job',
161
+ },
162
+
163
+ // Programs
164
+ catalog_program: 'Catalog program',
165
+ custom_program: 'Custom program',
166
+ program_doc: 'Program document',
167
+ retired_form_: '%{title} (retired)',
168
+ open_program: 'Open program',
169
+ category: {
170
+ FOOD_SAFETY: 'Food safety',
171
+ QUALITY_ASSURANCE: 'Quality assurance',
172
+ WORKER_SAFETY: 'Worker safety',
173
+ SUSTAINABILITY: 'Sustainability',
174
+ ENVIRONMENTAL: 'Environmental',
175
+ REGULATORY_INSPECTION: 'Regulatory inspection',
176
+ LOGISTICS: 'Logistics',
177
+ OTHER: 'Other',
178
+ },
16
179
 
17
180
  // Enums
18
181
  status: {