feat: Add variables feature (#5602)
* feat: add variables db models and migrations * feat: variables api endpoints * feat: add $variables to expressions * test: fix ActiveWorkflowRunner tests failing * test: a different fix for the tests broken by $variables * feat: variables licensing * fix: could create one extra variable than licensed for * feat: Add Variables UI page and $vars global property (#5750) * feat: add support for row slot to datatable * feat: add variables create, read, update, delete * feat: add vars autocomplete * chore: remove alert * feat: add variables autocomplete for code and expressions * feat: add tests for variable components * feat: add variables search and sort * test: update tests for variables view * chore: fix test and linting issue * refactor: review changes * feat: add variable creation telemetry * fix: Improve variables listing and disabled case, fix resource sorting (no-changelog) (#5903) * fix: Improve variables disabled experience and fix sorting * fix: update action box margin * test: update tests for variables row and datatable * fix: Add ee controller to base controller * fix: variables.ee routes not being added * feat: add variables validation * fix: fix vue-fragment bug that breaks everything * chore: Update lock * feat: Add variables input validation and permissions (no-changelog) (#5910) * feat: add input validation * feat: handle variables view for non-instance-owner users * test: update variables tests * fix: fix data-testid pattern * feat: improve overflow styles * test: fix variables row snapshot * feat: update sorting to take newly created variables into account * fix: fix list layout overflow * fix: fix adding variables on page other than 1. fix validation * feat: add docs link * fix: fix default displayName function for resource-list-layout * feat: improve vars expressions ux, cm-tooltip * test: fix datatable test * feat: add MATCH_REGEX validation rule * fix: overhaul how datatable pagination selector works * feat: update completer description * fix: conditionally update usage syntax based on key validation * test: update datatable snapshot * fix: fix variables-row button margins * fix: fix pagination overflow * test: Fix broken test * test: Update snapshot * fix: Remove duplicate declaration * feat: add custom variables icon --------- Co-authored-by: Alex Grozav <alex@grozav.com> Co-authored-by: Omar Ajoue <krynble@gmail.com>
This commit is contained in:
13
packages/editor-ui/src/plugins/icons/custom.ts
Normal file
13
packages/editor-ui/src/plugins/icons/custom.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { IconDefinition, IconName, IconPrefix } from '@fortawesome/fontawesome-svg-core';
|
||||
|
||||
export const faVariable: IconDefinition = {
|
||||
prefix: 'fas' as IconPrefix,
|
||||
iconName: 'variable' as IconName,
|
||||
icon: [
|
||||
52,
|
||||
52,
|
||||
[],
|
||||
'e001',
|
||||
'M42.6,17.8c2.4,0,7.2-2,7.2-8.4c0-6.4-4.6-6.8-6.1-6.8c-2.8,0-5.6,2-8.1,6.3c-2.5,4.4-5.3,9.1-5.3,9.1 l-0.1,0c-0.6-3.1-1.1-5.6-1.3-6.7c-0.5-2.7-3.6-8.4-9.9-8.4c-6.4,0-12.2,3.7-12.2,3.7l0,0C5.8,7.3,5.1,8.5,5.1,9.9 c0,2.1,1.7,3.9,3.9,3.9c0.6,0,1.2-0.2,1.7-0.4l0,0c0,0,4.8-2.7,5.9,0c0.3,0.8,0.6,1.7,0.9,2.7c1.2,4.2,2.4,9.1,3.3,13.5l-4.2,6 c0,0-4.7-1.7-7.1-1.7s-7.2,2-7.2,8.4s4.6,6.8,6.1,6.8c2.8,0,5.6-2,8.1-6.3c2.5-4.4,5.3-9.1,5.3-9.1c0.8,4,1.5,7.1,1.9,8.5 c1.6,4.5,5.3,7.2,10.1,7.2c0,0,5,0,10.9-3.3c1.4-0.6,2.4-2,2.4-3.6c0-2.1-1.7-3.9-3.9-3.9c-0.6,0-1.2,0.2-1.7,0.4l0,0 c0,0-4.2,2.4-5.6,0.5c-1-2-1.9-4.6-2.6-7.8c-0.6-2.8-1.3-6.2-2-9.5l4.3-6.2C35.5,16.1,40.2,17.8,42.6,17.8z',
|
||||
],
|
||||
};
|
||||
268
packages/editor-ui/src/plugins/icons/index.ts
Normal file
268
packages/editor-ui/src/plugins/icons/index.ts
Normal file
@@ -0,0 +1,268 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core';
|
||||
import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
||||
import {
|
||||
faAngleDoubleLeft,
|
||||
faAngleDown,
|
||||
faAngleLeft,
|
||||
faAngleRight,
|
||||
faAngleUp,
|
||||
faArrowLeft,
|
||||
faArrowRight,
|
||||
faAt,
|
||||
faBan,
|
||||
faBolt,
|
||||
faBook,
|
||||
faBoxOpen,
|
||||
faBug,
|
||||
faCalculator,
|
||||
faCalendar,
|
||||
faChartBar,
|
||||
faCheck,
|
||||
faCheckCircle,
|
||||
faCheckSquare,
|
||||
faChevronDown,
|
||||
faChevronUp,
|
||||
faChevronLeft,
|
||||
faChevronRight,
|
||||
faCode,
|
||||
faCodeBranch,
|
||||
faCog,
|
||||
faCogs,
|
||||
faClock,
|
||||
faClone,
|
||||
faCloud,
|
||||
faCloudDownloadAlt,
|
||||
faCopy,
|
||||
faCube,
|
||||
faCut,
|
||||
faDotCircle,
|
||||
faEdit,
|
||||
faEllipsisV,
|
||||
faEnvelope,
|
||||
faEye,
|
||||
faExclamationTriangle,
|
||||
faExpand,
|
||||
faExpandAlt,
|
||||
faExternalLinkAlt,
|
||||
faExchangeAlt,
|
||||
faFile,
|
||||
faFileAlt,
|
||||
faFileArchive,
|
||||
faFileCode,
|
||||
faFileDownload,
|
||||
faFileExport,
|
||||
faFileImport,
|
||||
faFilePdf,
|
||||
faFilter,
|
||||
faFingerprint,
|
||||
faFlask,
|
||||
faFolderOpen,
|
||||
faFont,
|
||||
faGlobeAmericas,
|
||||
faGift,
|
||||
faGlobe,
|
||||
faGraduationCap,
|
||||
faGripVertical,
|
||||
faHandPointLeft,
|
||||
faHashtag,
|
||||
faHdd,
|
||||
faHome,
|
||||
faHourglass,
|
||||
faImage,
|
||||
faInbox,
|
||||
faInfo,
|
||||
faInfoCircle,
|
||||
faKey,
|
||||
faLink,
|
||||
faList,
|
||||
faLightbulb,
|
||||
faMapSigns,
|
||||
faMousePointer,
|
||||
faNetworkWired,
|
||||
faPause,
|
||||
faPauseCircle,
|
||||
faPen,
|
||||
faPencilAlt,
|
||||
faPlay,
|
||||
faPlayCircle,
|
||||
faPlug,
|
||||
faPlus,
|
||||
faPlusCircle,
|
||||
faPlusSquare,
|
||||
faQuestion,
|
||||
faQuestionCircle,
|
||||
faRedo,
|
||||
faRss,
|
||||
faSave,
|
||||
faSatelliteDish,
|
||||
faSearch,
|
||||
faSearchMinus,
|
||||
faSearchPlus,
|
||||
faServer,
|
||||
faSignInAlt,
|
||||
faSignOutAlt,
|
||||
faSlidersH,
|
||||
faSpinner,
|
||||
faStop,
|
||||
faSun,
|
||||
faSync,
|
||||
faSyncAlt,
|
||||
faTable,
|
||||
faTasks,
|
||||
faTerminal,
|
||||
faThLarge,
|
||||
faThumbtack,
|
||||
faTimes,
|
||||
faTimesCircle,
|
||||
faToolbox,
|
||||
faTrash,
|
||||
faUndo,
|
||||
faUnlink,
|
||||
faUser,
|
||||
faUserCircle,
|
||||
faUserFriends,
|
||||
faUsers,
|
||||
faVideo,
|
||||
faTree,
|
||||
faStickyNote as faSolidStickyNote,
|
||||
faUserLock,
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
import { faVariable } from './custom';
|
||||
import { faStickyNote } from '@fortawesome/free-regular-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
|
||||
function addIcon(icon: IconDefinition) {
|
||||
library.add(icon);
|
||||
}
|
||||
|
||||
addIcon(faAngleDoubleLeft);
|
||||
addIcon(faAngleDown);
|
||||
addIcon(faAngleLeft);
|
||||
addIcon(faAngleRight);
|
||||
addIcon(faAngleUp);
|
||||
addIcon(faArrowLeft);
|
||||
addIcon(faArrowRight);
|
||||
addIcon(faAt);
|
||||
addIcon(faBan);
|
||||
addIcon(faBolt);
|
||||
addIcon(faBook);
|
||||
addIcon(faBoxOpen);
|
||||
addIcon(faBug);
|
||||
addIcon(faCalculator);
|
||||
addIcon(faCalendar);
|
||||
addIcon(faChartBar);
|
||||
addIcon(faCheck);
|
||||
addIcon(faCheckCircle);
|
||||
addIcon(faCheckSquare);
|
||||
addIcon(faChevronLeft);
|
||||
addIcon(faChevronRight);
|
||||
addIcon(faChevronDown);
|
||||
addIcon(faChevronUp);
|
||||
addIcon(faCode);
|
||||
addIcon(faCodeBranch);
|
||||
addIcon(faCog);
|
||||
addIcon(faCogs);
|
||||
addIcon(faClock);
|
||||
addIcon(faClone);
|
||||
addIcon(faCloud);
|
||||
addIcon(faCloudDownloadAlt);
|
||||
addIcon(faCopy);
|
||||
addIcon(faCube);
|
||||
addIcon(faCut);
|
||||
addIcon(faDotCircle);
|
||||
addIcon(faGripVertical);
|
||||
addIcon(faEdit);
|
||||
addIcon(faEllipsisV);
|
||||
addIcon(faEnvelope);
|
||||
addIcon(faEye);
|
||||
addIcon(faExclamationTriangle);
|
||||
addIcon(faExpand);
|
||||
addIcon(faExpandAlt);
|
||||
addIcon(faExternalLinkAlt);
|
||||
addIcon(faExchangeAlt);
|
||||
addIcon(faFile);
|
||||
addIcon(faFileAlt);
|
||||
addIcon(faFileArchive);
|
||||
addIcon(faFileCode);
|
||||
addIcon(faFileDownload);
|
||||
addIcon(faFileExport);
|
||||
addIcon(faFileImport);
|
||||
addIcon(faFilePdf);
|
||||
addIcon(faFilter);
|
||||
addIcon(faFingerprint);
|
||||
addIcon(faFlask);
|
||||
addIcon(faFolderOpen);
|
||||
addIcon(faFont);
|
||||
addIcon(faGift);
|
||||
addIcon(faGlobe);
|
||||
addIcon(faGlobeAmericas);
|
||||
addIcon(faGraduationCap);
|
||||
addIcon(faHandPointLeft);
|
||||
addIcon(faHashtag);
|
||||
addIcon(faHdd);
|
||||
addIcon(faHome);
|
||||
addIcon(faHourglass);
|
||||
addIcon(faImage);
|
||||
addIcon(faInbox);
|
||||
addIcon(faInfo);
|
||||
addIcon(faInfoCircle);
|
||||
addIcon(faKey);
|
||||
addIcon(faLink);
|
||||
addIcon(faList);
|
||||
addIcon(faLightbulb);
|
||||
addIcon(faMapSigns);
|
||||
addIcon(faMousePointer);
|
||||
addIcon(faNetworkWired);
|
||||
addIcon(faPause);
|
||||
addIcon(faPauseCircle);
|
||||
addIcon(faPen);
|
||||
addIcon(faPencilAlt);
|
||||
addIcon(faPlay);
|
||||
addIcon(faPlayCircle);
|
||||
addIcon(faPlug);
|
||||
addIcon(faPlus);
|
||||
addIcon(faPlusCircle);
|
||||
addIcon(faPlusSquare);
|
||||
addIcon(faQuestion);
|
||||
addIcon(faQuestionCircle);
|
||||
addIcon(faRedo);
|
||||
addIcon(faRss);
|
||||
addIcon(faSave);
|
||||
addIcon(faSatelliteDish);
|
||||
addIcon(faSearch);
|
||||
addIcon(faSearchMinus);
|
||||
addIcon(faSearchPlus);
|
||||
addIcon(faServer);
|
||||
addIcon(faSignInAlt);
|
||||
addIcon(faSignOutAlt);
|
||||
addIcon(faSlidersH);
|
||||
addIcon(faSpinner);
|
||||
addIcon(faSolidStickyNote);
|
||||
addIcon(faStickyNote as IconDefinition);
|
||||
addIcon(faStop);
|
||||
addIcon(faSun);
|
||||
addIcon(faSync);
|
||||
addIcon(faSyncAlt);
|
||||
addIcon(faTable);
|
||||
addIcon(faTasks);
|
||||
addIcon(faTerminal);
|
||||
addIcon(faThLarge);
|
||||
addIcon(faThumbtack);
|
||||
addIcon(faTimes);
|
||||
addIcon(faTimesCircle);
|
||||
addIcon(faToolbox);
|
||||
addIcon(faTrash);
|
||||
addIcon(faUndo);
|
||||
addIcon(faUnlink);
|
||||
addIcon(faUser);
|
||||
addIcon(faUserCircle);
|
||||
addIcon(faUserFriends);
|
||||
addIcon(faUsers);
|
||||
addIcon(faVariable);
|
||||
addIcon(faVideo);
|
||||
addIcon(faTree);
|
||||
addIcon(faUserLock);
|
||||
|
||||
Vue.component('font-awesome-icon', FontAwesomeIcon);
|
||||
Reference in New Issue
Block a user