* feat(scheduled-messages): add predefined time shortcuts for scheduling
Replace the manual date/time picker with predefined day and time period
chip selectors for faster message scheduling.
Day shortcuts: Today, Tomorrow, This weekend (Sat), Next week (Mon),
Next weekend (next Sat), Next month (1st), Custom (date picker fallback).
Time period shortcuts: Morning (8:00), Afternoon (13:00), Evening (18:00).
Each day chip shows the corresponding date (dd/MM) in secondary color.
Past time periods for 'Today' are automatically disabled.
The existing date picker is preserved as the 'Custom' option.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor(scheduled-messages): use dropdown selectors and remove header
Replace chip/button selectors with native <select> dropdowns for day
and time period selection. Remove the 'Date and time to send' header
from the modal since the dropdown labels serve as placeholders.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(scheduled-messages): close datepicker on confirm and click-outside
Removed manual open/close state management and @click.stop that was
blocking click-outside detection. Added confirm prop so the picker
has an explicit OK button and auto-closes properly.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(scheduled-messages): initialize custom mode when editing existing schedule
When editing a scheduled message, the ScheduleDateShortcuts component
now detects the pre-existing datetime and opens in Custom mode with
the datepicker pre-filled, preserving the original date and time.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(scheduled-messages): use locale-aware date format in shortcuts
Replace hardcoded dd/MM format with Intl.DateTimeFormat using
navigator.language, matching the existing locale-aware pattern
in DatePickerHelper.js. Removes unused date-fns format import.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(scheduled-messages): use app locale for date formatting
Replace navigator.language with the i18n app locale for shortcut date
labels and datepicker calendar. Add getDatePickerLang helper that
generates locale-aware day/month names via Intl.DateTimeFormat.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(scheduled-messages): normalize locale tag to BCP 47 format
Chatwoot uses underscore locale tags (pt_BR) but Intl.DateTimeFormat
requires BCP 47 hyphens (pt-BR). Add toBcp47 normalizer to prevent
RangeError: invalid language tag.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(scheduled-messages): locale-aware time period display
Add formatHour helper using Intl.DateTimeFormat so time periods
show 8:00/13:00/18:00 in pt-BR and 8:00 AM/1:00 PM/6:00 PM in en.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* test(scheduled-messages): add unit tests for scheduleDateShortcutHelpers
Cover getShortcutDate (weekday/Saturday/Sunday edge cases),
applyTimePeriod, isTimePeriodPast, formatShortDate, formatHour,
getDatePickerLang, and getDayShortcutOptions including locale
normalization for underscore tags like pt_BR.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(scheduled-messages): sync customDateTime when modelValue changes in custom mode
Keep DatePicker in sync when the parent changes modelValue while
already in Custom mode (e.g. switching between scheduled messages).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(scheduled-messages): add aria-labels to schedule dropdown selects
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(scheduled-messages): use empty string instead of null for dateTimeError
Avoids Vue prop validation warning since ScheduleDateShortcuts
declares dateTimeError as a String prop.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor(scheduled-messages): simplify to 3 fixed schedule shortcuts
Replace two dropdown selectors (6 day options × 3 time periods) with
3 pre-computed clickable shortcut buttons:
- Tomorrow morning (08:00)
- Tomorrow afternoon (13:00)
- Monday morning (08:00)
Each shortcut shows the exact calendar date and time for clarity.
Special Sunday rule: 'Monday' points to next week's Monday since
'Tomorrow' already covers the immediate Monday.
The 'Custom' option with full DatePicker is preserved.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat(scheduled-messages): Gmail-style list design for schedule shortcuts
Replace chip buttons with full-width clickable rows in a bordered
container, matching Gmail's 'Schedule send' dialog pattern:
- Label on left, formatted date/time on right in gray
- Calendar icon for the custom date/time option
- Subtle border separators between rows
- Selected state with blue highlight
Also improves date formatting from '15/03' to '15 de mar.' using
month short names for better readability.
Updates i18n:
- PT_BR: 'Amanhã à tarde', 'Escolher data e hora'
- EN: 'Choose date and time'
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat(scheduled-messages): improve modal layout and datepicker positioning
- Add 'Schedule send' / 'Programar envio' section header above the
schedule shortcuts for clear visual identification
- Move attachment/template controls next to the message editor so
content-related actions stay grouped together
- Move datepicker outside the bordered shortcut container to avoid
cramped positioning; add rounded-xl and proper text sizing
- Add i18n key SCHEDULE_LABEL (en: 'Schedule send', pt_BR: 'Programar envio')
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor(schedule): replace popup datepicker with inline calendar
Replace the popup-style vue-datepicker-next with an inline calendar
(same approach used by the snooze feature), rendering the calendar
directly within the modal for a more intuitive UX.
- Switch DatePicker to inline mode (no popup/z-index issues)
- Add disablePastTimes validation (prevents selecting past times)
- Full-width responsive calendar with scoped deep styles
- Remove unused DATETIME_PLACEHOLDER and DATETIME_FORMAT i18n keys
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat(schedule): replace datepicker with natural language input
Replace the broken inline datepicker with a natural language text input
powered by chrono-node, similar to Chatwoot's upcoming snooze UX.
Users can now type dates naturally:
- EN: 'tomorrow at 2pm', 'next friday morning', 'in 3 hours'
- PT: 'amanhã às 14h', 'próxima sexta de manhã', '20 de março às 10h'
Changes:
- Add chrono-node dependency for natural language date parsing
- Add preProcessDateInput() to normalize PT time expressions (8h→8:00,
de manhã→8:00, à tarde→13:00, de noite→18:00)
- Add parseNaturalDate() with locale-aware parsing (PT/EN)
- Add formatFullDateTime() for parsed date preview display
- Replace DatePicker with text input + real-time parsed date preview
- Show green checkmark when date is valid, amber warning if in the past,
hint text if input is unrecognizable
- Remove unused getDatePickerLang() and vue-datepicker-next import
- Remove unused DATETIME_PLACEHOLDER/DATETIME_FORMAT i18n keys
- Update i18n: CUSTOM label, placeholder, hint, and past-date warning
- Update tests: 40 tests covering new functions (was 29)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(schedule): improve PT natural language preprocessing
Normalize accent-less input common in casual Brazilian Portuguese:
- 'amanha' → 'amanhã', 'sabado' → 'sábado', 'proxima' → 'próxima'
- 'as' → 'às' before digits or time-of-day words (e.g. 'as 19h')
- Support 'pela manhã/tarde/noite' and 'no período da manhã/tarde/noite'
Previously 'Amanhã as 19h' failed because chrono-node requires 'às'
(with accent) as a time connector. Now all common casual PT patterns
work reliably.
Tests: 50 passing (was 40)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(schedule): use forwardDate to always parse weekdays as upcoming
chrono-node defaults to the *most recent* occurrence of a weekday,
so 'sexta' on Monday returned last Friday (past). Adding
{ forwardDate: true } makes it always return the next occurrence.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat(schedule): add datepicker fallback and dual-language parsing
- Add discrete calendar icon button next to text input that toggles
an inline vue-datepicker-next with date+time selection
- Try both chrono.pt and chrono (EN) parsers, pick the one that
matches more of the input text — supports mixed-language input
like 'quarta 10am' or 'friday às 14h'
- Insert 'às' connector between PT weekday names and bare numbers
so 'quarta 10' parses correctly (chrono.pt requires the connector)
- Add DATEPICKER_TOOLTIP i18n key (EN + PT_BR)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(schedule): toggle between text input and datepicker views
When calendar button is clicked, hide the natural language text input
and show the inline datepicker full-width. A small 'Type a date and
time' link below the calendar lets users switch back to text input.
Calendar button is vertically centered with the input field (size-[34px]
matches input height).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(schedule): align calendar button with text input height
Use self-stretch instead of fixed size so the button stretches to
match the input height in the flex row, eliminating misalignment.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(schedule): adjust margin for custom text input in date shortcuts
* fix(schedule): use popup datepicker with datetime and confirm
Replace the inline datepicker toggle with a popup DatePicker that
opens directly from the calendar button. Uses type='datetime' with
confirm mode so users can pick both date and time. On confirm, the
selected datetime populates the natural language text field. The text
input and calendar button are always visible side by side.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(schedule): hide seconds column in datepicker
Add :show-second='false' to only show hour and minute selection.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(schedule): adjust DatePicker width for better responsiveness
* refactor(schedule): use locale for parser priority and add aria-label
- parseNaturalDate now uses locale to call the matching parser first
(chrono.pt for PT, chrono for EN) before falling back to the other,
removing the eslint-disable comment for unused locale param
- Add aria-label to the natural language date input for screen readers
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: remove leftover planning files
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: gabrieljablonski <contact@gabrieljablonski.com>
178 lines
5.3 KiB
JSON
178 lines
5.3 KiB
JSON
{
|
|
"name": "@chatwoot/chatwoot",
|
|
"version": "4.11.0",
|
|
"license": "MIT",
|
|
"scripts": {
|
|
"eslint": "eslint app/**/*.{js,vue}",
|
|
"eslint:fix": "eslint app/**/*.{js,vue} --fix",
|
|
"test": "TZ=UTC vitest --no-watch --no-cache --no-coverage --logHeapUsage",
|
|
"test:watch": "TZ=UTC vitest --no-cache --no-coverage",
|
|
"test:coverage": "TZ=UTC vitest --no-watch --no-cache --coverage",
|
|
"start:dev": "foreman start -f ./Procfile.dev",
|
|
"start:test": "RAILS_ENV=test foreman start -f ./Procfile.test",
|
|
"dev": "overmind start -f ./Procfile.dev",
|
|
"ruby:prettier": "bundle exec rubocop -a",
|
|
"build:sdk": "BUILD_MODE=library vite build",
|
|
"prepare": "husky install",
|
|
"size": "size-limit",
|
|
"story:dev": "histoire dev",
|
|
"story:build": "histoire build",
|
|
"story:preview": "histoire preview",
|
|
"sync:i18n": "bin/sync_i18n_file_change"
|
|
},
|
|
"size-limit": [
|
|
{
|
|
"path": "public/vite/assets/widget-*.js",
|
|
"limit": "300 KB"
|
|
},
|
|
{
|
|
"path": "public/packs/js/sdk.js",
|
|
"limit": "40 KB"
|
|
}
|
|
],
|
|
"dependencies": {
|
|
"@amplitude/analytics-browser": "^2.11.10",
|
|
"@breezystack/lamejs": "^1.2.7",
|
|
"@chatwoot/ninja-keys": "1.2.3",
|
|
"@chatwoot/prosemirror-schema": "1.3.6",
|
|
"@chatwoot/utils": "^0.0.51",
|
|
"@formkit/core": "^1.6.7",
|
|
"@formkit/vue": "^1.6.7",
|
|
"@hcaptcha/vue3-hcaptcha": "^1.3.0",
|
|
"@highlightjs/vue-plugin": "^2.1.0",
|
|
"@iconify-json/fluent": "^1.2.32",
|
|
"@iconify-json/material-symbols": "^1.2.10",
|
|
"@lk77/vue3-color": "^3.0.6",
|
|
"@radix-ui/colors": "^3.0.0",
|
|
"@rails/actioncable": "6.1.3",
|
|
"@rails/ujs": "^7.1.400",
|
|
"@scmmishra/pico-search": "0.5.4",
|
|
"@sentry/vue": "^8.55.0",
|
|
"@sindresorhus/slugify": "2.2.1",
|
|
"@tailwindcss/typography": "^0.5.15",
|
|
"@tanstack/vue-table": "^8.20.5",
|
|
"@twilio/voice-sdk": "^2.12.4",
|
|
"@vitejs/plugin-vue": "^5.1.4",
|
|
"@vue/compiler-sfc": "^3.5.8",
|
|
"@vuelidate/core": "^2.0.3",
|
|
"@vuelidate/validators": "^2.0.4",
|
|
"@vueuse/components": "^12.0.0",
|
|
"@vueuse/core": "^12.0.0",
|
|
"activestorage": "^5.2.6",
|
|
"axios": "^1.13.2",
|
|
"camelcase-keys": "^9.1.3",
|
|
"chart.js": "~4.4.4",
|
|
"chrono-node": "^2.9.0",
|
|
"color2k": "^2.0.2",
|
|
"company-email-validator": "^1.1.0",
|
|
"core-js": "3.38.1",
|
|
"countries-and-timezones": "^3.6.0",
|
|
"date-fns": "2.21.1",
|
|
"date-fns-tz": "^1.3.3",
|
|
"dompurify": "3.2.4",
|
|
"flag-icons": "^7.2.3",
|
|
"floating-vue": "^5.2.2",
|
|
"highlight.js": "^11.10.0",
|
|
"html-to-image": "^1.11.13",
|
|
"html2canvas": "^1.4.1",
|
|
"idb": "^8.0.0",
|
|
"js-cookie": "^3.0.5",
|
|
"json-logic-js": "^2.0.5",
|
|
"lettersanitizer": "^1.0.6",
|
|
"libphonenumber-js": "^1.11.9",
|
|
"markdown-it": "^13.0.2",
|
|
"markdown-it-link-attributes": "^4.0.1",
|
|
"md5": "^2.3.0",
|
|
"mitt": "^3.0.1",
|
|
"opus-recorder": "^8.0.5",
|
|
"pinia": "^3.0.4",
|
|
"qrcode": "^1.5.4",
|
|
"semver": "7.6.3",
|
|
"snakecase-keys": "^8.0.1",
|
|
"timezone-phone-codes": "^0.0.2",
|
|
"tinykeys": "^3.0.0",
|
|
"turbolinks": "^5.2.0",
|
|
"urlpattern-polyfill": "^10.0.0",
|
|
"video.js": "7.18.1",
|
|
"videojs-record": "4.5.0",
|
|
"videojs-wavesurfer": "3.8.0",
|
|
"vue": "^3.5.12",
|
|
"vue-chartjs": "5.3.1",
|
|
"vue-datepicker-next": "^1.0.3",
|
|
"vue-dompurify-html": "^5.1.0",
|
|
"vue-i18n": "9.14.5",
|
|
"vue-letter": "^0.2.1",
|
|
"vue-multiselect": "3.1.0",
|
|
"vue-router": "~4.4.5",
|
|
"vue-upload-component": "^3.1.17",
|
|
"vue-virtual-scroller": "^2.0.0-beta.8",
|
|
"vue3-click-away": "^1.2.4",
|
|
"vuedraggable": "^4.1.0",
|
|
"vuex": "~4.1.0",
|
|
"vuex-router-sync": "6.0.0-rc.1",
|
|
"wavesurfer.js": "7.8.6"
|
|
},
|
|
"devDependencies": {
|
|
"@egoist/tailwindcss-icons": "^1.9.0",
|
|
"@histoire/plugin-vue": "0.17.15",
|
|
"@iconify-json/logos": "^1.2.10",
|
|
"@iconify-json/lucide": "^1.2.82",
|
|
"@iconify-json/ph": "^1.2.2",
|
|
"@iconify-json/ri": "^1.2.6",
|
|
"@iconify-json/teenyicons": "^1.2.2",
|
|
"@intlify/eslint-plugin-vue-i18n": "^3.2.0",
|
|
"@size-limit/file": "^8.2.4",
|
|
"@vitest/coverage-v8": "3.0.5",
|
|
"@vue/test-utils": "^2.4.6",
|
|
"autoprefixer": "^10.4.20",
|
|
"eslint": "^8.57.0",
|
|
"eslint-config-airbnb-base": "15.0.0",
|
|
"eslint-config-prettier": "^9.1.0",
|
|
"eslint-interactive": "^11.1.0",
|
|
"eslint-plugin-html": "7.1.0",
|
|
"eslint-plugin-import": "2.30.0",
|
|
"eslint-plugin-prettier": "5.2.1",
|
|
"eslint-plugin-vitest-globals": "^1.5.0",
|
|
"eslint-plugin-vue": "^9.28.0",
|
|
"fake-indexeddb": "^6.0.0",
|
|
"histoire": "0.17.15",
|
|
"husky": "^7.0.0",
|
|
"jsdom": "^27.2.0",
|
|
"lint-staged": "^16.2.7",
|
|
"postcss": "^8.4.47",
|
|
"postcss-preset-env": "^8.5.1",
|
|
"prettier": "^3.3.3",
|
|
"prosemirror-model": "^1.22.3",
|
|
"size-limit": "^8.2.4",
|
|
"tailwindcss": "^3.4.13",
|
|
"vite": "^5.4.21",
|
|
"vite-plugin-ruby": "^5.0.0",
|
|
"vitest": "3.0.5"
|
|
},
|
|
"engines": {
|
|
"node": "24.x",
|
|
"pnpm": "10.x"
|
|
},
|
|
"husky": {
|
|
"hooks": {
|
|
"pre-push": "sh bin/validate_push"
|
|
}
|
|
},
|
|
"pnpm": {
|
|
"overrides": {
|
|
"vite-node": "2.0.1",
|
|
"vite": "5.4.21",
|
|
"vitest": "3.0.5"
|
|
}
|
|
},
|
|
"lint-staged": {
|
|
"app/**/*.{js,vue}": [
|
|
"eslint --fix"
|
|
],
|
|
"*.scss": [
|
|
"scss-lint"
|
|
]
|
|
},
|
|
"packageManager": "pnpm@10.2.0+sha512.0d27364e0139c6aadeed65ada153135e0ca96c8da42123bd50047f961339dc7a758fc2e944b428f52be570d1bd3372455c1c65fa2e7aa0bfbf931190f9552001"
|
|
}
|