mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 02:57:57 +00:00 
			
		
		
		
	 3558878ae2
			
		
	
	3558878ae2
	
	
	
		
			
			# Pull Request Template ## Description This PR will replace usage of `macroMixin` with the `useMacros` composable. And updated components from option API to composition API. **Files updated** 1. dashboard/routes/dashboard/settings/macros/MacroNode.vue 2. dashboard/routes/dashboard/settings/macros/MacroEditor.vue Fixes https://linear.app/chatwoot/issue/CW-3449/rewrite-macrosmixin-mixin-to-a-composable ## Type of change - [x] New feature (non-breaking change which adds functionality) ## How Has This Been Tested? **Test cases** 1. Check whether we can create a new macro. 2. Check whether validations and error animation are working or not. 3. Ability to drag the macro files 4. Check whether the edit pages and functionality is working or not. ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules
		
			
				
	
	
		
			89 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			89 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const { slateDark } = require('@radix-ui/colors');
 | |
| import { colors } from './theme/colors';
 | |
| const defaultTheme = require('tailwindcss/defaultTheme');
 | |
| module.exports = {
 | |
|   darkMode: 'class',
 | |
|   content: [
 | |
|     './enterprise/app/views/**/*.html.erb',
 | |
|     './app/javascript/widget/**/*.vue',
 | |
|     './app/javascript/v3/**/*.vue',
 | |
|     './app/javascript/dashboard/**/*.vue',
 | |
|     './app/javascript/portal/**/*.vue',
 | |
|     './app/javascript/shared/**/*.vue',
 | |
|     './app/javascript/survey/**/*.vue',
 | |
|     './app/views/**/*.html.erb',
 | |
|   ],
 | |
|   theme: {
 | |
|     extend: {
 | |
|       fontFamily: {
 | |
|         inter: ['Inter', ...defaultTheme.fontFamily.sans],
 | |
|         interDisplay: ['Inter Display', ...defaultTheme.fontFamily.sans],
 | |
|       },
 | |
|     },
 | |
|     screens: {
 | |
|       xs: '480px',
 | |
|       sm: '640px',
 | |
|       md: '768px',
 | |
|       lg: '1024px',
 | |
|       xl: '1280px',
 | |
|       '2xl': '1536px',
 | |
|     },
 | |
|     fontSize: {
 | |
|       ...defaultTheme.fontSize,
 | |
|       xxs: '0.625rem',
 | |
|     },
 | |
|     colors: {
 | |
|       transparent: 'transparent',
 | |
|       white: '#fff',
 | |
|       'modal-backdrop-light': 'rgba(0, 0, 0, 0.4)',
 | |
|       'modal-backdrop-dark': 'rgba(0, 0, 0, 0.6)',
 | |
|       current: 'currentColor',
 | |
|       ...colors,
 | |
|       body: slateDark.slate7,
 | |
|     },
 | |
|     keyframes: {
 | |
|       ...defaultTheme.keyframes,
 | |
|       wiggle: {
 | |
|         '0%': { transform: 'translateX(0)' },
 | |
|         '15%': { transform: 'translateX(0.375rem)' },
 | |
|         '30%': { transform: 'translateX(-0.375rem)' },
 | |
|         '45%': { transform: 'translateX(0.375rem)' },
 | |
|         '60%': { transform: 'translateX(-0.375rem)' },
 | |
|         '75%': { transform: 'translateX(0.375rem)' },
 | |
|         '90%': { transform: 'translateX(-0.375rem)' },
 | |
|         '100%': { transform: 'translateX(0)' },
 | |
|       },
 | |
|       'loader-pulse': {
 | |
|         '0%': { opacity: 0.4 },
 | |
|         '50%': { opacity: 1 },
 | |
|         '100%': { opacity: 0.4 },
 | |
|       },
 | |
|       'card-select': {
 | |
|         '0%, 100%': {
 | |
|           transform: 'translateX(0)',
 | |
|         },
 | |
|         '50%': {
 | |
|           transform: 'translateX(1px)',
 | |
|         },
 | |
|       },
 | |
|       shake: {
 | |
|         '0%, 100%': { transform: 'translateX(0)' },
 | |
|         '25%': { transform: 'translateX(0.234375rem)' },
 | |
|         '50%': { transform: 'translateX(-0.234375rem)' },
 | |
|         '75%': { transform: 'translateX(0.234375rem)' },
 | |
|       },
 | |
|     },
 | |
|     animation: {
 | |
|       ...defaultTheme.animation,
 | |
|       wiggle: 'wiggle 0.5s ease-in-out',
 | |
|       'loader-pulse': 'loader-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite',
 | |
|       'card-select': 'card-select 0.25s ease-in-out',
 | |
|       shake: 'shake 0.3s ease-in-out 0s 2',
 | |
|     },
 | |
|   },
 | |
|   plugins: [
 | |
|     // eslint-disable-next-line
 | |
|     require('@tailwindcss/typography'),
 | |
|   ],
 | |
| };
 |