mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 04:47:29 -08:00
42742de876
* N8N-2619 Value Survey Front-end * N8N-2619 Added Contact Prompt Modal and logic * N8N-2619 Added Link to Toast Message on Successful submitting ValueSurvey * N8N-2619 Updated TypeForm URL in ValueSurvey Success Toast * N8N-2619 Fixed Typo placeholder for ValueSurvey and ContactPrompt Modal * N8N-2619 Fixed Toast not close automatically in ValueSurvey, Make part of the title bold, Changed Font-sizes on Value Survey * N8N-2619 Fixed Close Button on ValueSurvey, Vertical Allignment for Questions in ValueSurvey Drawer * N8N-2619 Make Value Survey with static height * N8N-2619 Fixed Telemetry Events on closing ValueSurvey * N8N-2619 Updated N8NPrompt Interface, Added Dynamic Title and Description on ContactPrompt Modal * N8N-2619 Reversed Answers in ValueSurveyModal * N8N-2619 Added Telemetry Event on user close ValueSurvey on second Question * N8N-2619 Re-work, Optimized, Simplify the code after technical review * N8N-2619 Fixed If else statement in openUserPromptsIfPossible * N8N-2619 Change Text under Email Box - ValueSurvey, ContactPrompt, Added new Telemetary Event on ValueSurvey Open, Fixed Toast to close aftet 15s * N8N-2619 Change ContactPrompt Modal to use Atoms like N8N-Heading and N8N-Text * N8N-2619 Change Design & Logic on ValueSurvey - When to open * N8N-2619 Updated Value Survey with new Telemetry Events (Refactor), Simplified functions, Added Atoms in ValueSurvey + ContactPrompt * N8N-2619 Refactor in Interfaces, Updated/Refactor Getters and Vuex store props * N8N-2619 Defined IN8nValueSurveyData interface * N8N-2619 Disabled Keyboard shortcuts to be activated on typing in ValueSurvey Input field, Fire an event on Saving WF from Menu and with shorcut, Make Drawer keep-alive * N8N-2619 Added Atoms in Value Survey Modal (buttons), Rework css * N8N-2619 Added Responses on ValueSurvey Submit * N8N-2619 Added Response for SubmittingContactInfo * N8N-2619 Added loading state for buttons / ValueSurvey * N8N-2619 Changed ValueSurvey and ContactPrompt to support enter key on submit, Simplifed closeDialog Function, Changed css for button in ValueSurvey, Prevent showing the Modals if Saving WF fails, Add Debouncing on showing prompt * N8N-2619 Added IsTelemetryEnabled Getter in Vuex.store * N8N-2619 Created/Added N8N-SquareButton to Design-system * N8N-2619 Change Promise in MainSideBar with Async/Await function, Nitpick simpliefied * N8N-2619 Update the text under the input fields * N8N-2619 Update the text in ContactPrompt Modal * N8N-2619 Allign Send button on ValueSurvey Modal * N8N-2619 Fixed Input in ValueSurvey Modal * N8N-2619 Check if the workflow is saving * N8N-2619 Check if WF is saving to allowed performs fetchPromptsData * N8N-2619 Hotfix * N8N-2619 Fixed ValueSurvey, Updated onSaveButtonClick function, Created onSaveKeyboardShortcut function in NodeView * N8N-2619 Rework css module classes for ValueSurvey, Simplified * N8N-2619 Simplified N8N-SquareButton Component, removed dead code * N8N-2619 Added Breakpoints for Mobile/Tablet View * N8N-2619 Formatting fix * N8N-2619 Update css for mobile/tablet, change promises to asyn/await functions in ContactPrompt and ValueSurvey, Added isActive prop to ValueSurvey * N8N-2619 Update TEMPLATE_BASE_URL to production
171 lines
4.8 KiB
TypeScript
171 lines
4.8 KiB
TypeScript
// @ts-nocheck
|
|
|
|
import Vue from "vue";
|
|
import Fragment from 'vue-fragment';
|
|
|
|
import "regenerator-runtime/runtime";
|
|
|
|
import Drawer from 'element-ui/lib/drawer';
|
|
import Dialog from 'element-ui/lib/dialog';
|
|
import Dropdown from 'element-ui/lib/dropdown';
|
|
import DropdownMenu from 'element-ui/lib/dropdown-menu';
|
|
import DropdownItem from 'element-ui/lib/dropdown-item';
|
|
import Submenu from 'element-ui/lib/submenu';
|
|
import Radio from 'element-ui/lib/radio';
|
|
import RadioGroup from 'element-ui/lib/radio-group';
|
|
import RadioButton from 'element-ui/lib/radio-button';
|
|
import Checkbox from 'element-ui/lib/checkbox';
|
|
import Switch from 'element-ui/lib/switch';
|
|
import Select from 'element-ui/lib/select';
|
|
import Option from 'element-ui/lib/option';
|
|
import OptionGroup from 'element-ui/lib/option-group';
|
|
import ButtonGroup from 'element-ui/lib/button-group';
|
|
import Table from 'element-ui/lib/table';
|
|
import TableColumn from 'element-ui/lib/table-column';
|
|
import DatePicker from 'element-ui/lib/date-picker';
|
|
import Tabs from 'element-ui/lib/tabs';
|
|
import TabPane from 'element-ui/lib/tab-pane';
|
|
import Tag from 'element-ui/lib/tag';
|
|
import Row from 'element-ui/lib/row';
|
|
import Col from 'element-ui/lib/col';
|
|
import Badge from 'element-ui/lib/badge';
|
|
import Card from 'element-ui/lib/card';
|
|
import ColorPicker from 'element-ui/lib/color-picker';
|
|
import Container from 'element-ui/lib/container';
|
|
import Loading from 'element-ui/lib/loading';
|
|
import MessageBox from 'element-ui/lib/message-box';
|
|
import Message from 'element-ui/lib/message';
|
|
import Notification from 'element-ui/lib/notification';
|
|
import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';
|
|
|
|
// @ts-ignore
|
|
import lang from 'element-ui/lib/locale/lang/en';
|
|
// @ts-ignore
|
|
import locale from 'element-ui/lib/locale';
|
|
|
|
import {
|
|
N8nIconButton,
|
|
N8nButton,
|
|
N8nInfoTip,
|
|
N8nInput,
|
|
N8nInputLabel,
|
|
N8nInputNumber,
|
|
N8nHeading,
|
|
N8nMenu,
|
|
N8nMenuItem,
|
|
N8nSelect,
|
|
N8nSpinner,
|
|
N8nSquareButton,
|
|
N8nText,
|
|
N8nTooltip,
|
|
N8nOption,
|
|
} from 'n8n-design-system';
|
|
import { ElMessageBoxOptions } from "element-ui/types/message-box";
|
|
|
|
Vue.use(Fragment.Plugin);
|
|
|
|
// n8n design system
|
|
Vue.use(N8nButton);
|
|
Vue.use(N8nIconButton);
|
|
Vue.use(N8nInfoTip);
|
|
Vue.use(N8nInput);
|
|
Vue.use(N8nInputLabel);
|
|
Vue.use(N8nInputNumber);
|
|
Vue.use(N8nHeading);
|
|
Vue.use(N8nMenu);
|
|
Vue.use(N8nMenuItem);
|
|
Vue.use(N8nSelect);
|
|
Vue.use(N8nSpinner);
|
|
Vue.component('n8n-square-button', N8nSquareButton);
|
|
Vue.component('n8n-text', N8nText);
|
|
Vue.use(N8nTooltip);
|
|
Vue.use(N8nOption);
|
|
|
|
// element io
|
|
locale.use(lang);
|
|
|
|
Vue.use(Dialog);
|
|
Vue.use(Drawer);
|
|
Vue.use(Dropdown);
|
|
Vue.use(DropdownMenu);
|
|
Vue.use(DropdownItem);
|
|
Vue.use(Submenu);
|
|
Vue.use(Radio);
|
|
Vue.use(RadioGroup);
|
|
Vue.use(RadioButton);
|
|
Vue.use(Checkbox);
|
|
Vue.use(Switch);
|
|
Vue.use(Select);
|
|
Vue.use(Option);
|
|
Vue.use(OptionGroup);
|
|
Vue.use(ButtonGroup);
|
|
Vue.use(Table);
|
|
Vue.use(TableColumn);
|
|
Vue.use(DatePicker);
|
|
Vue.use(Tabs);
|
|
Vue.use(TabPane);
|
|
Vue.use(Tag);
|
|
Vue.use(Row);
|
|
Vue.use(Col);
|
|
Vue.use(Badge);
|
|
Vue.use(Card);
|
|
Vue.use(ColorPicker);
|
|
Vue.use(Container);
|
|
|
|
Vue.component(CollapseTransition.name, CollapseTransition);
|
|
|
|
Vue.use(Loading.directive);
|
|
|
|
Vue.prototype.$loading = Loading.service;
|
|
Vue.prototype.$msgbox = MessageBox;
|
|
|
|
Vue.prototype.$alert = async (message: string, configOrTitle: string | ElMessageBoxOptions | undefined, config: ElMessageBoxOptions | undefined) => {
|
|
let temp = config || (typeof configOrTitle === 'object' ? configOrTitle : {});
|
|
temp = {
|
|
...temp,
|
|
roundButton: true,
|
|
cancelButtonClass: 'btn--cancel',
|
|
confirmButtonClass: 'btn--confirm',
|
|
};
|
|
|
|
if (typeof configOrTitle === 'string') {
|
|
return await MessageBox.alert(message, configOrTitle, temp);
|
|
}
|
|
return await MessageBox.alert(message, temp);
|
|
};
|
|
|
|
Vue.prototype.$confirm = async (message: string, configOrTitle: string | ElMessageBoxOptions | undefined, config: ElMessageBoxOptions | undefined) => {
|
|
let temp = config || (typeof configOrTitle === 'object' ? configOrTitle : {});
|
|
temp = {
|
|
...temp,
|
|
roundButton: true,
|
|
cancelButtonClass: 'btn--cancel',
|
|
confirmButtonClass: 'btn--confirm',
|
|
showClose: false,
|
|
closeOnClickModal: false,
|
|
};
|
|
|
|
if (typeof configOrTitle === 'string') {
|
|
return await MessageBox.confirm(message, configOrTitle, temp);
|
|
}
|
|
return await MessageBox.confirm(message, temp);
|
|
};
|
|
|
|
Vue.prototype.$prompt = async (message: string, configOrTitle: string | ElMessageBoxOptions | undefined, config: ElMessageBoxOptions | undefined) => {
|
|
let temp = config || (typeof configOrTitle === 'object' ? configOrTitle : {});
|
|
temp = {
|
|
...temp,
|
|
roundButton: true,
|
|
cancelButtonClass: 'btn--cancel',
|
|
confirmButtonClass: 'btn--confirm',
|
|
};
|
|
|
|
if (typeof configOrTitle === 'string') {
|
|
return await MessageBox.prompt(message, configOrTitle, temp);
|
|
}
|
|
return await MessageBox.prompt(message, temp);
|
|
};
|
|
|
|
Vue.prototype.$notify = Notification;
|
|
Vue.prototype.$message = Message;
|