Skip to content

Commit

Permalink
feat(editor): Update design-system and editor dependencies (no-change…
Browse files Browse the repository at this point in the history
…log) (#5188)
  • Loading branch information
alexgrozav authored Jan 27, 2023
1 parent 7e229a3 commit 99e35f1
Show file tree
Hide file tree
Showing 20 changed files with 3,074 additions and 2,452 deletions.
1 change: 1 addition & 0 deletions packages/cli/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export class Start extends Command {
const streams = [
createReadStream(filePath, 'utf-8'),
replaceStream('/{{BASE_PATH}}/', n8nPath, { ignoreCase: false }),
replaceStream('/%7B%7BBASE_PATH%7D%7D/', n8nPath, { ignoreCase: false }),
replaceStream('/static/', n8nPath + 'static/', { ignoreCase: false }),
];
if (filePath.endsWith('index.html')) {
Expand Down
59 changes: 33 additions & 26 deletions packages/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,48 +34,55 @@
"markdown-it-emoji": "^2.0.0",
"markdown-it-link-attributes": "^4.0.0",
"markdown-it-task-lists": "^2.1.1",
"vue": "^2.7",
"vue": "^2.7.14",
"vue-typed-mixins": "^0.2.0",
"xss": "^1.0.10"
},
"devDependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.35",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/vue-fontawesome": "^2.0.2",
"@storybook/addon-actions": "^6.5.10",
"@storybook/addon-essentials": "^6.5.10",
"@storybook/addon-links": "^6.5.10",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"@fortawesome/vue-fontawesome": "^2.0.9",
"@storybook/addon-actions": "^6.5.15",
"@storybook/addon-essentials": "^6.5.15",
"@storybook/addon-links": "^6.5.15",
"@storybook/addon-postcss": "^2.0.0",
"@storybook/vue": "^6.5.10",
"@testing-library/jest-dom": "^5.16.4",
"@storybook/vue": "^6.5.15",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/vue": "^5.8.3",
"@types/markdown-it": "^12.2.3",
"@types/markdown-it-emoji": "^2.0.2",
"@types/markdown-it-link-attributes": "^3.0.1",
"@types/sanitize-html": "^2.6.2",
"c8": "7.11.0",
"core-js": "^3.6.5",
"jsdom": "19.0.0",
"node-notifier": ">=8.0.1",
"sass": "^1.55.0",
"sass-loader": "^10.1.1",
"@types/sanitize-html": "^2.8.0",
"@vitejs/plugin-vue2": "^2.2.0",
"c8": "7.12.0",
"core-js": "^3.27.1",
"jsdom": "21.0.0",
"node-notifier": "^10.0.1",
"sass": "^1.57.1",
"sass-loader": "^10.3.1",
"storybook-addon-designs": "^6.3.1",
"storybook-addon-themes": "^6.1.0",
"trim": ">=0.0.3",
"vite": "^2.9.5",
"@vitejs/plugin-vue2": "^1.1.2",
"vitest": "^0.9.3",
"vue-class-component": "^7.2.3",
"vue-loader": "^15.9.7",
"trim": "^1.0.1",
"vite": "^4.0.4",
"vitest": "^0.27.2",
"vue-class-component": "^7.2.6",
"vue-loader": "^15.10.1",
"vue-property-decorator": "^9.1.2",
"vue-template-compiler": "^2.7",
"vue-tsc": "^0.35.0",
"vue-template-compiler": "^2.7.14",
"vue-tsc": "^1.0.24",
"vue2-boring-avatars": "0.3.4",
"webpack": "^4.46.0"
},
"dependencies": {
"element-ui": "~2.15.12",
"sanitize-html": "2.7.0",
"vue2-boring-avatars": "0.3.4"
"markdown-it": "^13.0.1",
"markdown-it-emoji": "^2.0.2",
"markdown-it-link-attributes": "^4.0.1",
"markdown-it-task-lists": "^2.1.1",
"sanitize-html": "2.7.3",
"vue": "^2.7.14",
"vue-typed-mixins": "^0.2.0",
"vue2-boring-avatars": "0.3.8",
"xss": "^1.0.14"
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Vitest Snapshot v1

exports[`N8NActionBox > should render correctly 1`] = `
"<div data-test-id=\\"action-box\\" class=\\"n8n-action-box _container_\\">
<div class=\\"_emoji_\\"> 😿 </div>
<div class=\\"_heading_\\">
"<div data-test-id=\\"action-box\\" class=\\"n8n-action-box container\\">
<div class=\\"emoji\\"> 😿 </div>
<div class=\\"heading\\">
<n8n-heading-stub tag=\\"span\\" size=\\"xlarge\\" align=\\"center\\">Headline you need to know</n8n-heading-stub>
</div>
<div class=\\"_description_\\">
<div class=\\"description\\">
<n8n-text-stub size=\\"medium\\" color=\\"text-base\\" tag=\\"span\\"><span>Long description that you should know something is the way it is because of how it is. </span></n8n-text-stub>
</div>
<n8n-button-stub label=\\"Do something\\" type=\\"primary\\" size=\\"large\\"></n8n-button-stub>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// Vitest Snapshot v1

exports[`components > N8nActionDropdown > should render custom styling correctly 1`] = `
"<div class=\\"action-dropdown-container\\">
"<div class=\\"action-dropdown-container actionDropdownContainer\\">
<el-dropdown-stub trigger=\\"click\\" size=\\"\\" hideonclick=\\"true\\" placement=\\"bottom\\" visiblearrow=\\"true\\" showtimeout=\\"250\\" hidetimeout=\\"150\\" tabindex=\\"0\\">
<div class=\\"_activator_\\">
<div class=\\"activator\\">
<n8n-icon-stub icon=\\"ellipsis-v\\" size=\\"medium\\"></n8n-icon-stub>
</div>
</el-dropdown-stub>
</div>"
`;
exports[`components > N8nActionDropdown > should render default styling correctly 1`] = `
"<div class=\\"action-dropdown-container\\">
"<div class=\\"action-dropdown-container actionDropdownContainer\\">
<el-dropdown-stub trigger=\\"click\\" size=\\"\\" hideonclick=\\"true\\" placement=\\"bottom\\" visiblearrow=\\"true\\" showtimeout=\\"250\\" hidetimeout=\\"150\\" tabindex=\\"0\\">
<div class=\\"_activator_\\">
<div class=\\"activator\\">
<n8n-icon-stub icon=\\"ellipsis-v\\" size=\\"medium\\"></n8n-icon-stub>
</div>
</el-dropdown-stub>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Vitest Snapshot v1

exports[`components > N8nBadge > props > should render default theme correctly 1`] = `"<span class=\\"n8n-badge _default_ _badge_\\"><n8n-text-stub bold=\\"true\\" size=\\"large\\" compact=\\"true\\" tag=\\"span\\"><n8n-text-stub size=\\"medium\\" tag=\\"span\\">Default badge</n8n-text-stub></n8n-text-stub></span>"`;
exports[`components > N8nBadge > props > should render default theme correctly 1`] = `"<span class=\\"n8n-badge default\\"><n8n-text-stub bold=\\"true\\" size=\\"large\\" compact=\\"true\\" tag=\\"span\\"><n8n-text-stub size=\\"medium\\" tag=\\"span\\">Default badge</n8n-text-stub></n8n-text-stub></span>"`;
exports[`components > N8nBadge > props > should render secondary theme correctly 1`] = `"<span class=\\"n8n-badge _secondary_ _badge_\\"><n8n-text-stub size=\\"medium\\" compact=\\"true\\" tag=\\"span\\"><n8n-text-stub size=\\"medium\\" tag=\\"span\\">Secondary badge</n8n-text-stub></n8n-text-stub></span>"`;
exports[`components > N8nBadge > props > should render secondary theme correctly 1`] = `"<span class=\\"n8n-badge secondary\\"><n8n-text-stub size=\\"medium\\" compact=\\"true\\" tag=\\"span\\"><n8n-text-stub size=\\"medium\\" tag=\\"span\\">Secondary badge</n8n-text-stub></n8n-text-stub></span>"`;
exports[`components > N8nBadge > props > should render with default values correctly 1`] = `"<span class=\\"n8n-badge _default_ _badge_\\"><n8n-text-stub size=\\"small\\" compact=\\"true\\" tag=\\"span\\"><n8n-text-stub size=\\"medium\\" tag=\\"span\\">A Badge</n8n-text-stub></n8n-text-stub></span>"`;
exports[`components > N8nBadge > props > should render with default values correctly 1`] = `"<span class=\\"n8n-badge default\\"><n8n-text-stub size=\\"small\\" compact=\\"true\\" tag=\\"span\\"><n8n-text-stub size=\\"medium\\" tag=\\"span\\">A Badge</n8n-text-stub></n8n-text-stub></span>"`;
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Vitest Snapshot v1

exports[`components > N8nButton > overrides > should render correctly 1`] = `"<button aria-disabled=\\"false\\" aria-busy=\\"false\\" aria-live=\\"polite\\" class=\\"button _button_ _secondary_ _medium_ _icon_\\" icon=\\"plus-circle\\" type=\\"secondary\\"><span class=\\"_icon_\\"><n8n-icon-stub icon=\\"plus-circle\\" size=\\"medium\\"></n8n-icon-stub></span><span>Button</span></button>"`;
exports[`components > N8nButton > overrides > should render correctly 1`] = `"<button aria-disabled=\\"false\\" aria-busy=\\"false\\" aria-live=\\"polite\\" class=\\"button button secondary medium icon\\" icon=\\"plus-circle\\" type=\\"secondary\\"><span class=\\"icon\\"><n8n-icon-stub icon=\\"plus-circle\\" size=\\"medium\\"></n8n-icon-stub></span><span>Button</span></button>"`;
exports[`components > N8nButton > props > icon > should render icon button 1`] = `"<button aria-disabled=\\"false\\" aria-busy=\\"false\\" aria-live=\\"polite\\" class=\\"button _button_ _primary_ _medium_ _icon_\\"><span class=\\"_icon_\\"><n8n-icon-stub icon=\\"plus-circle\\" size=\\"medium\\"></n8n-icon-stub></span><span>Button</span></button>"`;
exports[`components > N8nButton > props > icon > should render icon button 1`] = `"<button aria-disabled=\\"false\\" aria-busy=\\"false\\" aria-live=\\"polite\\" class=\\"button button primary medium icon\\"><span class=\\"icon\\"><n8n-icon-stub icon=\\"plus-circle\\" size=\\"medium\\"></n8n-icon-stub></span><span>Button</span></button>"`;
exports[`components > N8nButton > props > loading > should render loading spinner 1`] = `"<button disabled=\\"disabled\\" aria-disabled=\\"false\\" aria-busy=\\"true\\" aria-live=\\"polite\\" class=\\"button _button_ _primary_ _medium_ _loading_ _icon_\\"><span class=\\"_icon_\\"><n8n-spinner-stub size=\\"medium\\" type=\\"dots\\"></n8n-spinner-stub></span><span>Button</span></button>"`;
exports[`components > N8nButton > props > loading > should render loading spinner 1`] = `"<button disabled=\\"disabled\\" aria-disabled=\\"false\\" aria-busy=\\"true\\" aria-live=\\"polite\\" class=\\"button button primary medium loading icon\\"><span class=\\"icon\\"><n8n-spinner-stub size=\\"medium\\" type=\\"dots\\"></n8n-spinner-stub></span><span>Button</span></button>"`;
exports[`components > N8nButton > props > square > should render square button 1`] = `
"<button aria-disabled=\\"false\\" aria-busy=\\"false\\" aria-live=\\"polite\\" class=\\"button _button_ _primary_ _medium_ _square_\\">
"<button aria-disabled=\\"false\\" aria-busy=\\"false\\" aria-live=\\"polite\\" class=\\"button button primary medium square\\">
<!----><span>48</span></button>"
`;
exports[`components > N8nButton > should render correctly 1`] = `
"<button aria-disabled=\\"false\\" aria-busy=\\"false\\" aria-live=\\"polite\\" class=\\"button _button_ _primary_ _medium_\\">
"<button aria-disabled=\\"false\\" aria-busy=\\"false\\" aria-live=\\"polite\\" class=\\"button button primary medium\\">
<!----><span>Button</span></button>"
`;
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Vitest Snapshot v1

exports[`components > N8nCallout > should render additional slots correctly 1`] = `
"<div role=\\"alert\\" class=\\"n8n-callout _callout_ _custom_\\">
<div class=\\"_message-section_\\">
<div class=\\"_icon_\\">
"<div role=\\"alert\\" class=\\"n8n-callout callout custom\\">
<div class=\\"message-section\\">
<div class=\\"icon\\">
<n8n-icon-stub icon=\\"code-branch\\" size=\\"large\\"></n8n-icon-stub>
</div>
<n8n-text-stub size=\\"small\\" tag=\\"span\\">
Expand All @@ -15,9 +15,9 @@ exports[`components > N8nCallout > should render additional slots correctly 1`]
`;
exports[`components > N8nCallout > should render custom theme correctly 1`] = `
"<div role=\\"alert\\" class=\\"n8n-callout _callout_ _custom_\\">
<div class=\\"_message-section_\\">
<div class=\\"_icon_\\">
"<div role=\\"alert\\" class=\\"n8n-callout callout custom\\">
<div class=\\"message-section\\">
<div class=\\"icon\\">
<n8n-icon-stub icon=\\"code-branch\\" size=\\"large\\"></n8n-icon-stub>
</div>
<n8n-text-stub size=\\"small\\" tag=\\"span\\">
Expand All @@ -28,9 +28,9 @@ exports[`components > N8nCallout > should render custom theme correctly 1`] = `
`;
exports[`components > N8nCallout > should render danger theme correctly 1`] = `
"<div role=\\"alert\\" class=\\"n8n-callout _callout_ _danger_\\">
<div class=\\"_message-section_\\">
<div class=\\"_icon_\\">
"<div role=\\"alert\\" class=\\"n8n-callout callout danger\\">
<div class=\\"message-section\\">
<div class=\\"icon\\">
<n8n-icon-stub icon=\\"times-circle\\" size=\\"large\\"></n8n-icon-stub>
</div>
<n8n-text-stub size=\\"small\\" tag=\\"span\\">
Expand All @@ -41,9 +41,9 @@ exports[`components > N8nCallout > should render danger theme correctly 1`] = `
`;
exports[`components > N8nCallout > should render info theme correctly 1`] = `
"<div role=\\"alert\\" class=\\"n8n-callout _callout_ _info_\\">
<div class=\\"_message-section_\\">
<div class=\\"_icon_\\">
"<div role=\\"alert\\" class=\\"n8n-callout callout info\\">
<div class=\\"message-section\\">
<div class=\\"icon\\">
<n8n-icon-stub icon=\\"info-circle\\" size=\\"large\\"></n8n-icon-stub>
</div>
<n8n-text-stub size=\\"small\\" tag=\\"span\\">
Expand All @@ -54,9 +54,9 @@ exports[`components > N8nCallout > should render info theme correctly 1`] = `
`;
exports[`components > N8nCallout > should render secondary theme correctly 1`] = `
"<div role=\\"alert\\" class=\\"n8n-callout _callout_ _secondary_\\">
<div class=\\"_message-section_\\">
<div class=\\"_icon_\\">
"<div role=\\"alert\\" class=\\"n8n-callout callout secondary\\">
<div class=\\"message-section\\">
<div class=\\"icon\\">
<n8n-icon-stub icon=\\"info-circle\\" size=\\"medium\\"></n8n-icon-stub>
</div>
<n8n-text-stub size=\\"small\\" tag=\\"span\\">
Expand All @@ -67,9 +67,9 @@ exports[`components > N8nCallout > should render secondary theme correctly 1`] =
`;
exports[`components > N8nCallout > should render success theme correctly 1`] = `
"<div role=\\"alert\\" class=\\"n8n-callout _callout_ _success_\\">
<div class=\\"_message-section_\\">
<div class=\\"_icon_\\">
"<div role=\\"alert\\" class=\\"n8n-callout callout success\\">
<div class=\\"message-section\\">
<div class=\\"icon\\">
<n8n-icon-stub icon=\\"check-circle\\" size=\\"large\\"></n8n-icon-stub>
</div>
<n8n-text-stub size=\\"small\\" tag=\\"span\\">
Expand All @@ -80,9 +80,9 @@ exports[`components > N8nCallout > should render success theme correctly 1`] = `
`;
exports[`components > N8nCallout > should render warning theme correctly 1`] = `
"<div role=\\"alert\\" class=\\"n8n-callout _callout_ _warning_\\">
<div class=\\"_message-section_\\">
<div class=\\"_icon_\\">
"<div role=\\"alert\\" class=\\"n8n-callout callout warning\\">
<div class=\\"message-section\\">
<div class=\\"icon\\">
<n8n-icon-stub icon=\\"exclamation-triangle\\" size=\\"large\\"></n8n-icon-stub>
</div>
<n8n-text-stub size=\\"small\\" tag=\\"span\\">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
// Vitest Snapshot v1

exports[`components > N8nCard > should render correctly 1`] = `
"<div class=\\"card _card_\\">
"<div class=\\"card\\">
<!---->
<div class=\\"_content_\\">
<div class=\\"content\\">
<!---->
<div class=\\"_body_\\">This is a card.</div>
<div class=\\"body\\">This is a card.</div>
<!---->
</div>
<!---->
</div>"
`;
exports[`components > N8nCard > should render correctly with header and footer 1`] = `
"<div class=\\"card _card_\\">
"<div class=\\"card\\">
<!---->
<div class=\\"_content_\\">
<div class=\\"_header_\\">Header</div>
<div class=\\"_body_\\">This is a card.</div>
<div class=\\"_footer_\\">Footer</div>
<div class=\\"content\\">
<div class=\\"header\\">Header</div>
<div class=\\"body\\">This is a card.</div>
<div class=\\"footer\\">Footer</div>
</div>
<!---->
</div>"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Vitest Snapshot v1

exports[`N8nInfoTip > should render correctly as note 1`] = `"<div class=\\"n8n-info-tip _info_ _note_ _base_ _bold_\\"><span class=\\"_iconText_\\"><span class=\\"n8n-icon n8n-text _compact_ _size-medium_ _regular_\\"></span><span>Need help doing something?<a href=\\"/docs\\" target=\\"_blank\\">Open docs</a></span></span></div>"`;
exports[`N8nInfoTip > should render correctly as note 1`] = `"<div class=\\"n8n-info-tip info note bold\\"><span class=\\"iconText\\"><span class=\\"n8n-icon n8n-text compact size-medium regular\\"></span><span>Need help doing something?<a href=\\"/docs\\" target=\\"_blank\\">Open docs</a></span></span></div>"`;
exports[`N8nInfoTip > should render correctly as tooltip 1`] = `
"<div class=\\"n8n-info-tip _info_ _tooltip_ _base_ _bold_\\">
<n8n-tooltip-stub justifybuttons=\\"flex-end\\" buttons=\\"\\" placement=\\"top\\"><span class=\\"_iconText_\\"><span class=\\"n8n-icon n8n-text _compact_ _size-medium_ _regular_\\"></span></span></n8n-tooltip-stub>
"<div class=\\"n8n-info-tip info tooltip bold\\">
<n8n-tooltip-stub justifybuttons=\\"flex-end\\" buttons=\\"\\" placement=\\"top\\" popper-class=\\"tooltipPopper\\"><span class=\\"iconText\\"><span class=\\"n8n-icon n8n-text compact size-medium regular\\"></span></span></n8n-tooltip-stub>
</div>"
`;
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
// Vitest Snapshot v1

exports[`components > N8nNotice > props > content > should render HTML 1`] = `
"<div id=\\"notice\\" role=\\"alert\\" class=\\"notice _notice_ _warning_\\">
"<div id=\\"notice\\" role=\\"alert\\" class=\\"notice notice warning\\">
<div class=\\"notice-content\\">
<n8n-text-stub size=\\"small\\" compact=\\"true\\" tag=\\"span\\"><span id=\\"notice-content\\" role=\\"region\\" class=\\"_truncated_\\"><strong>Hello world!</strong> This is a notice.</span></n8n-text-stub>
<n8n-text-stub size=\\"small\\" compact=\\"true\\" tag=\\"span\\"><span id=\\"notice-content\\" role=\\"region\\" class=\\"truncated\\"><strong>Hello world!</strong> This is a notice.</span></n8n-text-stub>
</div>
</div>"
`;
exports[`components > N8nNotice > props > content > should render correctly with content prop 1`] = `
"<div id=\\"notice\\" role=\\"alert\\" class=\\"notice _notice_ _warning_\\">
"<div id=\\"notice\\" role=\\"alert\\" class=\\"notice notice warning\\">
<div class=\\"notice-content\\">
<n8n-text-stub size=\\"small\\" compact=\\"true\\" tag=\\"span\\"><span id=\\"notice-content\\" role=\\"region\\" class=\\"_truncated_\\">This is a notice.</span></n8n-text-stub>
<n8n-text-stub size=\\"small\\" compact=\\"true\\" tag=\\"span\\"><span id=\\"notice-content\\" role=\\"region\\" class=\\"truncated\\">This is a notice.</span></n8n-text-stub>
</div>
</div>"
`;
exports[`components > N8nNotice > props > content > should sanitize rendered HTML 1`] = `
"<div id=\\"notice\\" role=\\"alert\\" class=\\"notice _notice_ _warning_\\">
"<div id=\\"notice\\" role=\\"alert\\" class=\\"notice notice warning\\">
<div class=\\"notice-content\\">
<n8n-text-stub size=\\"small\\" compact=\\"true\\" tag=\\"span\\"><span id=\\"notice-content\\" role=\\"region\\" class=\\"_truncated_\\"> This is a notice.</span></n8n-text-stub>
<n8n-text-stub size=\\"small\\" compact=\\"true\\" tag=\\"span\\"><span id=\\"notice-content\\" role=\\"region\\" class=\\"truncated\\"> This is a notice.</span></n8n-text-stub>
</div>
</div>"
`;
exports[`components > N8nNotice > should render correctly 1`] = `
"<div id=\\"notice\\" role=\\"alert\\" class=\\"notice _notice_ _warning_\\">
"<div id=\\"notice\\" role=\\"alert\\" class=\\"notice notice warning\\">
<div class=\\"notice-content\\">
<n8n-text-stub size=\\"small\\" compact=\\"true\\" tag=\\"span\\">This is a notice.</n8n-text-stub>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Vitest Snapshot v1

exports[`components > N8nSelect > should render correctly 1`] = `
"<div class=\\"n8n-select _container_\\">
"<div class=\\"n8n-select container\\">
<!---->
<div class=\\"el-select el-select--large\\">
<!---->
Expand Down
Loading

0 comments on commit 99e35f1

Please sign in to comment.